Bläddra i källkod

Merge remote-tracking branch 'origin/feature/v4.7.54' into feature/v4.7.54

wangkaiyue 2 år sedan
förälder
incheckning
f2d429880b

+ 18 - 6
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/report_detail_month.js

@@ -451,10 +451,14 @@ var vNode = {
                             // that.curMonthCountTop.list = that.formatterWinData(res.data.project_buyerclass_count,'count')
                             
                             var pro_count_list = res.data.project_buyerclass_count.filter(function (item, index) {
-                              return item['buyerclass'] != '其它'
+                              return (item['buyerclass'] != '其它' && item['count']!=0)
                              })
+                             if(pro_count_list && pro_count_list.length > 0){
+                              that.isShow.show_7 = true;
+                            } else {
+                              that.isShow.show_7 = false
+                            }
                             that.curMonthCountTop.list = that.formatterWinData(pro_count_list,'count')
-                            that.isShow.show_7 = true;
                         } else {
                             that.isShow.show_7 = false;
                         }
@@ -464,10 +468,14 @@ var vNode = {
                             // that.curMonthScaleTop.list = that.formatterWinData(data,'scale')
                             var data = res.data.project_buyerclass_bidamount;
                             var pro_bidamount_list = data.filter(function (item, index) {
-                              return item['buyerclass'] != '其它'
+                              return (item['buyerclass'] != '其它' && item['bidamount']!=0) 
                              })
+                             if (pro_bidamount_list && pro_bidamount_list.length >0 ) {
+                              that.isShow.show_8 = true;
+                             } else {
+                              that.isShow.show_8 = false
+                             }
                             that.curMonthScaleTop.list = that.formatterWinData(pro_bidamount_list,'scale')
-                            that.isShow.show_8 = true;
                         } else {
                             that.isShow.show_8 = false;
                         }
@@ -477,10 +485,14 @@ var vNode = {
                             // that.averageScaleTop.list = that.formatterWinData(d,'average')
                             var d = res.data.project_buyerclass_average_bidamount;
                             var pro_average_list = d.filter(function (item, index) {
-                              return item['buyerclass'] != '其它'
+                              return (item['buyerclass'] != '其它' && item['average']!=0)
                              })
+                             if (pro_average_list && pro_average_list.length > 0) {
+                              that.isShow.show_9 = true;
+                             } else {
+                              that.isShow.show_9 = false
+                             }
                             that.averageScaleTop.list = that.formatterWinData(pro_average_list,'average')
-                            that.isShow.show_9 = true;
                         } else {
                             that.isShow.show_9 = false;
                         }

+ 3 - 3
src/jfw/modules/app/src/web/templates/big-member/page_report_detail_month.html

@@ -220,7 +220,7 @@
             <div v-if="curMonthCountTop.list.length > 5 && !curMonthCountTop.showAll">
                 <div class="more">
                     <!-- <span @click="curMonthCountTop.showAll = true">查看更多</span> -->
-                    <span @click="goTable('curMonthCountTop')">查看更多</span>
+                    <span @click="goTable('curMonthCountTop')">查看全部</span>
                 </div>
             </div>
         </div>
@@ -250,7 +250,7 @@
             <div v-if="curMonthScaleTop.list.length > 5 && !curMonthScaleTop.showAll">
                 <div class="more">
                     <!-- <span @click="curMonthScaleTop.showAll = true">查看更多</span> -->
-                    <span @click="goTable('curMonthScaleTop')">查看更多</span>
+                    <span @click="goTable('curMonthScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>
@@ -280,7 +280,7 @@
             <div v-if="averageScaleTop.list.length > 5 && !averageScaleTop.showAll">
                 <div class="more">
                     <!-- <span @click="averageScaleTop.showAll = true">查看更多</span> -->
-                    <span @click="goTable('averageScaleTop')">查看更多</span>
+                    <span @click="goTable('averageScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>

+ 64 - 36
src/jfw/modules/app/src/web/templates/big-member/page_report_table.html

@@ -25,16 +25,22 @@
         width: 7rem;
         border: 0.02rem solid #E5E5E5;
         margin: 0 auto;
-        margin-top: 0.32rem;
+        /* margin-top: 0.32rem; */
         margin-bottom: 0;
 
+      }
+      .ml-24{
+        margin-left: 0.24rem;
+
       }
       .fix_{
         position: fixed;
-        left: 0.24rem;
+        left: 50%;
+        transform: translateX(-50%);
         top: calc(21.2vw);
         padding-top: 0.32rem;
         background-color: #fff;  
+
       }
       .fix_analysis{
         position: fixed;
@@ -74,12 +80,13 @@
        text-align: center;
        display: table-cell;
        vertical-align: middle;
+       word-break: break-all;
       
       }
       .table_analysis{
         width: 7rem;
         border: 0.02rem solid #E5E5E5;
-        margin: 0 auto;
+        margin-left: 0.24rem;
         margin-top: 0.24rem;
         margin-bottom: 0;
 
@@ -104,6 +111,7 @@
        text-align: center;
        display: table-cell;
        vertical-align: middle;
+       word-break: break-all;
       
       }
       .table_analysis tr{
@@ -119,7 +127,7 @@
         width: 1.02rem;
       }
       .long_{
-        width: 2.16rem;
+        width: 2.4rem;
       }
       .middle{
         width: 1.92rem;
@@ -127,7 +135,7 @@
       .t_right{
         text-align: right !important;
         box-sizing: border-box;
-        padding: 0 0.24rem;
+        padding:  0 0.2rem;
       }
       .otners{
         font-size: 0.26rem;
@@ -138,11 +146,11 @@
         margin-bottom: 0.32rem;
       }
       .box{
-        /* padding-top: 1.2rem; */
+        padding-top: 1.19rem;
        
       }
       .box_analysis{
-        /* padding-top: 1.84rem; */
+        padding-top: 1.59rem;
       }
       .others{
         font-size: 0.26rem;
@@ -201,31 +209,31 @@
     {{include "/big-member/header.html"}}
     <div id="report_table" class="j-main" v-cloak>
       <div v-if = "parm=='analysis'" class="box_analysis">
-        <!-- <div class="fix_analysis">
+        <div class="fix_analysis">
           <div class="sort_box clearfix">
             <div class="tit">排序:</div>
-            <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}">${item}</div>
+            <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}" @click="sort_click(index)">${item}</div>
           </div>
           <table class="table_analysis">
             <thead>
-              <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==1 ,'middle':index==2||index==3}" v-html="item"></th></tr>
+              <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
             </thead>
           </table>
-        </div> -->
-        <div class="sort_box clearfix">
+        </div>
+        <!-- <div class="sort_box clearfix">
           <div class="tit">排序:</div>
           <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}" @click="sort_click(index)">${item}</div>
-        </div>
+        </div> -->
         <table class="table_analysis">
-          <thead>
-            <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==1 ,'middle':index==2||index==3}" v-html="item"></th></tr>
-          </thead>
+          <!-- <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
+          </thead> -->
            <tbody>
             <tr v-for="(item,index) in data_list" >
             <td class="sort_">${index + 1}</td>
-            <td class="long_">${item.buyclass}</td>
+            <td class="middle">${item.buyclass}</td>
             <td class="t_right middle">${item.total}</td>
-            <td class="t_right middle">${item.amount}</td>
+            <td class="t_right long_">${item.amount}</td>
           </tr>
            </tbody>
         </table>
@@ -236,17 +244,17 @@
         </div>
       </div>
       <div class="box" v-else>
-        <!-- <div class="fix_">
+        <div class="fix_">
           <table class="table_ ">
           <thead>
             <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
           </thead>
         </table>
-        </div> -->
-        <table class="table_">
-          <thead>
+        </div>
+        <table class="table_ ">
+          <!-- <thead>
             <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
-          </thead>
+          </thead> -->
             <tbody>
             <tr v-for="(item,index) in data_list" >
             <td class="sort">${index + 1}</td>
@@ -345,19 +353,12 @@
       },
       analysis_data (){
         let this_=this
-        $.ajax({
-        type: 'POST',
-        url: '/bigmember/marketAnalysis/getAnalysisResult',
-        data: {
-          flag:3,
-          rid: this_.rid,
-        },
-        success: function (res) {
-          if (res && res.error_code === 0 && res.data) {
+       let res= JSON.parse(sessionStorage.getItem('getAnalysisResult_'))
+       if (res && res.error_code === 0 && res.data) {
             let data_ = res.data.customer_scale
             data_.forEach(ele => {
               if(ele.amount){
-                ele.amount=ele.amount.toFixed(2)  
+                ele.amount=utils.formatMoney(ele.amount / 10000, undefined, true)
               } 
             });
             data_.sort(function(a,b){return b.total-a.total});
@@ -367,13 +368,40 @@
             this_.data_list=newarr
             if(res.data.customer_scale_other){
               this_.analysis_num=res.data.customer_scale_other.total
-              this_.analysis_price=res.data.customer_scale_other.amount.toFixed(2)
+              this_.analysis_price=utils.formatMoney(res.data.customer_scale_other.amount / 10000, undefined, true)
             }
           } else {
             // this.$toast('请求失败')
           }
-        }
-      })
+      //   $.ajax({
+      //   type: 'POST',
+      //   url: '/bigmember/marketAnalysis/getAnalysisResult',
+      //   data: {
+      //     flag:3,
+      //     rid: this_.rid,
+      //   },
+      //   success: function (res) {
+      //     if (res && res.error_code === 0 && res.data) {
+      //       let data_ = res.data.customer_scale
+      //       data_.forEach(ele => {
+      //         if(ele.amount){
+      //           ele.amount=utils.formatMoney(ele.amount / 10000, undefined, true)
+      //         } 
+      //       });
+      //       data_.sort(function(a,b){return b.total-a.total});
+      //       let newarr = data_.filter(function (item, index) {
+      //         return !(item['amount'] ==0 && item['total'] ==0 )
+      //       })
+      //       this_.data_list=newarr
+      //       if(res.data.customer_scale_other){
+      //         this_.analysis_num=res.data.customer_scale_other.total
+      //         this_.analysis_price=utils.formatMoney(res.data.customer_scale_other.amount / 10000, undefined, true)
+      //       }
+      //     } else {
+      //       // this.$toast('请求失败')
+      //     }
+      //   }
+      // })
       },
       monthdata(){
         var that = this

+ 19 - 6
src/web/staticres/big-member/js/report_detail_month.js

@@ -451,10 +451,15 @@ var vNode = {
                         // 本月项目数量TOP10采购行业 7
                         if(res.data.project_buyerclass_count && res.data.project_buyerclass_count.length > 0) {
                             var pro_count_list = res.data.project_buyerclass_count.filter(function (item, index) {
-                            return item['buyerclass'] != '其它'
+                            return (item['buyerclass'] != '其它' && item['count']!=0)
                            })
-                            that.curMonthCountTop.list = that.formatterWinData(pro_count_list,'count')
+                           if(pro_count_list && pro_count_list.length > 0){
                             that.isShow.show_7 = true;
+                          } else {
+                            that.isShow.show_7 = false
+                          }
+                          that.curMonthCountTop.list = that.formatterWinData(pro_count_list,'count')
+                            
                         } else {
                             that.isShow.show_7 = false;
                         }
@@ -462,10 +467,14 @@ var vNode = {
                         if(res.data.project_buyerclass_bidamount && res.data.project_buyerclass_bidamount.length > 0) {
                             var data = res.data.project_buyerclass_bidamount;
                             var pro_bidamount_list = data.filter(function (item, index) {
-                              return item['buyerclass'] != '其它'
+                              return  (item['buyerclass'] != '其它' && item['bidamount']!=0) 
                              })
+                             if (pro_bidamount_list && pro_bidamount_list.length >0 ) {
+                              that.isShow.show_8 = true;
+                             } else {
+                              that.isShow.show_8 = false
+                             }
                             that.curMonthScaleTop.list = that.formatterWinData(pro_bidamount_list,'scale')
-                            that.isShow.show_8 = true;
                         } else {
                             that.isShow.show_8 = false;
                         }
@@ -473,10 +482,14 @@ var vNode = {
                         if(res.data.project_buyerclass_average_bidamount && res.data.project_buyerclass_average_bidamount.length > 0) {
                             var d = res.data.project_buyerclass_average_bidamount;
                             var pro_average_list = d.filter(function (item, index) {
-                              return item['buyerclass'] != '其它'
+                              return  (item['buyerclass'] != '其它' && item['average']!=0)
                              })
+                             if (pro_average_list && pro_average_list.length > 0) {
+                              that.isShow.show_9 = true;
+                             } else {
+                              that.isShow.show_9 = false
+                             }
                             that.averageScaleTop.list = that.formatterWinData(pro_average_list,'average')
-                            that.isShow.show_9 = true;
                         } else {
                             that.isShow.show_9 = false;
                         }

+ 13 - 2
src/web/staticres/common-module/report-analysis/js/report_analysis.js

@@ -311,6 +311,7 @@ var vm = new Vue({
       this.rid = decodeURIComponent(id)
       this.filtersPageShow = false
     }
+    
   },
   mounted: function () {
     setTimeout(() => {
@@ -835,8 +836,13 @@ var vm = new Vue({
         url: '/bigmember/marketAnalysis/getAnalysisResult',
         data: query,
         success: function (res) {
-          if (res && res.error_code === 0 && res.data) {
+          if (res && res.error_code === 0 && res.data) {  
+            if(flag==3){
+              sessionStorage.setItem('getAnalysisResult_',JSON.stringify(res))
+            }
             this.formatterData(flag, res.data)
+          
+            
           } else {
             this.$toast('请求失败')
           }
@@ -864,7 +870,12 @@ var vm = new Vue({
         // 地区规模分布
         this.sortAreaScatter(data.area_infos)
         // 客户分布
-        this.sortUserScatter(data.customer_scale)
+        if(data.customer_scale){
+          if(data.customer_scale.length!=0){
+            let data_=data.customer_scale.slice(0,10)
+            this.sortUserScatter(data_)
+          }
+        }
         // 地区分布及客户分布Top3
         this.sortAreaUserTop3(data)
       } else if (flag === 4) {

+ 3 - 3
src/web/templates/big-member/wx/page_report_detail_month.html

@@ -219,7 +219,7 @@
             <div v-if="curMonthCountTop.list.length > 5 && !curMonthCountTop.showAll">
                 <div class="more">
                     <!-- <span @click="curMonthCountTop.showAll = true">查看更多</span> -->
-                    <span @click="goTable('curMonthCountTop')">查看更多</span>
+                    <span @click="goTable('curMonthCountTop')">查看全部</span>
                 </div>
             </div>
         </div>
@@ -249,7 +249,7 @@
             <div v-if="curMonthScaleTop.list.length > 5 && !curMonthScaleTop.showAll">
                 <div class="more">
                     <!-- <span @click="curMonthScaleTop.showAll = true">查看更多</span> -->
-                    <span @click="goTable('curMonthScaleTop')">查看更多</span>
+                    <span @click="goTable('curMonthScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>
@@ -279,7 +279,7 @@
             <div v-if="averageScaleTop.list.length > 5 && !averageScaleTop.showAll">
                 <div class="more">
                     <!-- <span @click="averageScaleTop.showAll = true">查看更多</span> -->
-                    <span @click="goTable('averageScaleTop')">查看更多</span>
+                    <span @click="goTable('averageScaleTop')">查看全部</span>
                 </div>
             </div>
         </div>

+ 64 - 36
src/web/templates/big-member/wx/page_report_table.html

@@ -26,13 +26,14 @@
         width: 7rem;
         border: 0.02rem solid #E5E5E5;
         margin: 0 auto;
-        margin-top: 0.32rem;
+        /* margin-top: 0.32rem; */
         margin-bottom: 0;
 
       }
       .fix_{
         position: fixed;
-        left: 0.24rem;
+        left: 50%;
+        transform: translateX(-50%);
         top: 0;
         padding-top: 0.32rem;
         background-color: #fff;  
@@ -75,12 +76,13 @@
        text-align: center;
        display: table-cell;
        vertical-align: middle;
+       word-break: break-all;
       
       }
       .table_analysis{
         width: 7rem;
         border: 0.02rem solid #E5E5E5;
-        margin: 0 auto;
+        margin-left: 0.24rem;
         margin-top: 0.24rem;
         margin-bottom: 0;
 
@@ -105,6 +107,7 @@
        text-align: center;
        display: table-cell;
        vertical-align: middle;
+       word-break: break-all;
       
       }
       .table_analysis tr{
@@ -120,7 +123,7 @@
         width: 1.02rem;
       }
       .long_{
-        width: 2.16rem;
+        width: 2.4rem;
       }
       .middle{
         width: 1.92rem;
@@ -128,7 +131,7 @@
       .t_right{
         text-align: right !important;
         box-sizing: border-box;
-        padding: 0 0.24rem;
+        padding: 0 0.2rem;
       }
       .otners{
         font-size: 0.26rem;
@@ -138,12 +141,16 @@
         margin-top: 0.32rem;
         margin-bottom: 0.32rem;
       }
+      .ml-24{
+        margin-left: 0.24rem;
+
+      }
       .box{
-        /* padding-top: 1.2rem; */
+        padding-top: 1.19rem;
        
       }
       .box_analysis{
-        /* padding-top: 1.84rem; */
+        padding-top: 1.59rem;
       }
       .others{
         font-size: 0.26rem;
@@ -200,31 +207,31 @@
   <div class="j-container">
     <div id="report_table" class="j-main" v-cloak>
       <div v-if = "parm=='analysis'" class="box_analysis">
-        <!-- <div class="fix_analysis">
+        <div class="fix_analysis">
           <div class="sort_box clearfix">
             <div class="tit">排序:</div>
-            <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}">${item}</div>
+            <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}"  @click="sort_click(index)">${item}</div>
           </div>
           <table class="table_analysis">
             <thead>
-              <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==1 ,'middle':index==2||index==3}" v-html="item"></th></tr>
+              <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
             </thead>
           </table>
-        </div> -->
-        <div class="sort_box clearfix">
+        </div>
+        <!-- <div class="sort_box clearfix">
           <div class="tit">排序:</div>
           <div class="btn" v-for="(item,index) in tabs" :class="{'active': index==tab}" @click="sort_click(index)">${item}</div>
-        </div>
+        </div> -->
         <table class="table_analysis">
-          <thead>
-            <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==1 ,'middle':index==2||index==3}" v-html="item"></th></tr>
-          </thead>
+          <!-- <thead>
+            <tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==3 ,'middle':index==2||index==1}" v-html="item"></th></tr>
+          </thead> -->
            <tbody>
             <tr v-for="(item,index) in data_list" >
             <td class="sort_">${index + 1}</td>
-            <td class="long_">${item.buyclass}</td>
+            <td class="middle">${item.buyclass}</td>
             <td class="t_right middle">${item.total}</td>
-            <td class="t_right middle">${item.amount}</td>
+            <td class="t_right long_">${item.amount}</td>
           </tr>
            </tbody>
         </table>
@@ -235,17 +242,17 @@
         </div>
       </div>
       <div class="box" v-else>
-        <!-- <div class="fix_">
+        <div class="fix_">
           <table class="table_ ">
           <thead>
             <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
           </thead>
         </table>
-        </div> -->
-        <table class="table_">
-          <thead>
+        </div>
+        <table class="table_ ">
+          <!-- <thead>
             <tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
-          </thead>
+          </thead> -->
             <tbody>
             <tr v-for="(item,index) in data_list" >
             <td class="sort">${index + 1}</td>
@@ -336,19 +343,12 @@
       },
       analysis_data (){
         let this_=this
-        $.ajax({
-        type: 'POST',
-        url: '/bigmember/marketAnalysis/getAnalysisResult',
-        data: {
-          flag:3,
-          rid: this_.rid,
-        },
-        success: function (res) {
-          if (res && res.error_code === 0 && res.data) {
+        let res= JSON.parse(sessionStorage.getItem('getAnalysisResult_'))
+        if (res && res.error_code === 0 && res.data) {
             let data_ = res.data.customer_scale
             data_.forEach(ele => {
               if(ele.amount){
-                ele.amount=ele.amount.toFixed(2)  
+                ele.amount=(ele.amount / 10000).toFixed(2)
               } 
             });
             data_.sort(function(a,b){return b.total-a.total});
@@ -358,13 +358,41 @@
             this_.data_list=newarr
             if(res.data.customer_scale_other){
               this_.analysis_num=res.data.customer_scale_other.total
-              this_.analysis_price=res.data.customer_scale_other.amount.toFixed(2)
+              this_.analysis_price=(res.data.customer_scale_other.amount / 10000).toFixed(2)
             }
           } else {
             // this.$toast('请求失败')
           }
-        }
-      })
+      
+      //   $.ajax({
+      //   type: 'POST',
+      //   url: '/bigmember/marketAnalysis/getAnalysisResult',
+      //   data: {
+      //     flag:3,
+      //     rid: this_.rid,
+      //   },
+      //   success: function (res) {
+      //     if (res && res.error_code === 0 && res.data) {
+      //       let data_ = res.data.customer_scale
+      //       data_.forEach(ele => {
+      //         if(ele.amount){
+      //           ele.amount=(ele.amount / 10000).toFixed(2)
+      //         } 
+      //       });
+      //       data_.sort(function(a,b){return b.total-a.total});
+      //       let newarr = data_.filter(function (item, index) {
+      //         return !(item['amount'] ==0 && item['total'] ==0 )
+      //       })
+      //       this_.data_list=newarr
+      //       if(res.data.customer_scale_other){
+      //         this_.analysis_num=res.data.customer_scale_other.total
+      //         this_.analysis_price=(res.data.customer_scale_other.amount / 10000).toFixed(2)
+      //       }
+      //     } else {
+      //       // this.$toast('请求失败')
+      //     }
+      //   }
+      // })
       },
       monthdata(){
         var that = this