cyy 3 anni fa
parent
commit
3731f5b9fa
1 ha cambiato i file con 48 aggiunte e 37 eliminazioni
  1. 48 37
      src/views/crm/tongji.vue

+ 48 - 37
src/views/crm/tongji.vue

@@ -52,11 +52,14 @@
           </dv-border-box-7>
         </div>
         <div class="customerD" v-if="authority">
-          <!-- <dv-scroll-board
-            
-            :config="orArr"
-            style="width: 100%; height: 100%"
-          /> -->
+          <dv-border-box-7 style="width:32.67%;" backgroundColor="rgba(6, 30, 93, 0.5)">
+            <div class="middleFontC">月度客户销售量</div>
+            <dv-scroll-board style="height: 87%;"
+              v-if="tableData.data && tableData.data.length"
+              :config="tableData"
+            />
+          </dv-border-box-7>
+          
           <dv-border-box-7  backgroundColor="rgba(6, 30, 93, 0.5)" >
             <div class="ttitle">
               <div v-if="teArr.length>0" class="middleFont">年度团队绩效</div>
@@ -87,11 +90,7 @@
               <div class="nullDate" v-else>暂无数据</div>
             </div>
           </dv-border-box-7>
-          <!-- <dv-scroll-board
-                    v-if="tableData.data && tableData.data.length"
-                    :config="tableData"
-                    style="width: 100%; height: 100%"
-                /> -->
+          
         </div>
       </div>
     <!-- </el-scrollbar> -->
@@ -127,20 +126,20 @@
         pmArr:[],
         peArr:[],
         tableData:{
-  header: ['列1', '列2', '列3'],
-  data: [
-    ['行1列1', '行1列2', '行1列3'],
-    ['行2列1', '行2列2', '行2列3'],
-    ['行3列1', '行3列2', '行3列3'],
-    ['行4列1', '行4列2', '行4列3'],
-    ['行5列1', '行5列2', '行5列3'],
-    ['行6列1', '行6列2', '行6列3'],
-    ['行7列1', '行7列2', '行7列3'],
-    ['行8列1', '行8列2', '行8列3'],
-    ['行9列1', '行9列2', '行9列3'],
-    ['行10列1', '行10列2', '行10列3']
-  ]
-}
+          header: ['公司名称', '付款方式', '价格(元)'],
+          data: [
+            ['行1列1', '行1列2', '行1列3'],
+            ['行2列1', '行2列2', '行2列3'],
+            ['行3列1', '行3列2', '行3列3'],
+            ['行4列1', '行4列2', '行4列3'],
+            ['行5列1', '行5列2', '行5列3'],
+            ['行6列1', '行6列2', '行6列3'],
+            ['行7列1', '行7列2', '行7列3'],
+            ['行8列1', '行8列2', '行8列3'],
+            ['行9列1', '行9列2', '行9列3'],
+            ['行10列1', '行10列2', '行10列3']
+          ]
+        }
       }
     },
     components:{
@@ -178,6 +177,7 @@
         this.getCustomerStatisticsYear(this.allDate)
         this.getCustomerStatisticsMonth(this.allDate)
         this.getIndividualPerformanceMonth(this.allDate)
+        this.getIndividualPerformanceCustomerMonth(this.allDate)
         this.getTeamPerformance(this.allDate)
         this.getTeamPerformanceMonth(this.allDate)
         this.getpersonPerformanceAll(this.allDate)
@@ -191,6 +191,7 @@
         this.getCustomerStatisticsYear(date)
         this.getCustomerStatisticsMonth(date)
         this.getIndividualPerformanceMonth(date)
+        this.getIndividualPerformanceCustomerMonth(date)
         this.getTeamPerformance(date)
         this.getTeamPerformanceMonth(date)
         this.getpersonPerformanceAll(date)
@@ -232,18 +233,19 @@
           }
         })
       },
-      // getIndividualPerformanceCustomerMonth(date){
-      //   let sql = "select d.zhuan_huan_ke_hu_ ,SUM(t_mjwtsqb.zong_jia_) as jiage from (select * from t_bjd LEFT JOIN (select a.id_ as leibieid,a.lai_yuan_qu_dao_ as laiyuan,b.id_ as qudaoid, b.lei_bie_ from ((select id_, lai_yuan_qu_dao_ from t_qzkhb GROUP BY id_) UNION (select id_, lai_yuan_qu_dao_ from t_yxkh GROUP BY id_) UNION (select ke_hu_ming_cheng_, lai_yuan_qu_dao_ as khnum from t_khxx GROUP BY ke_hu_ming_cheng_)) as a LEFT JOIN (select t_qdgl.id_,t_qdlbb.lei_bie_ from t_qdgl LEFT JOIN t_qdlbb on t_qdgl.qu_dao_lei_bie_ = t_qdlbb.id_) as b on a.lai_yuan_qu_dao_ = b.id_) as c on t_bjd.ke_hu_ming_cheng_ = c.leibieid where c.lei_bie_ is not NULL and t_bjd.sheng_xiao_shi_ji like '"+date+"%') as d left join t_mjwtsqb on t_mjwtsqb.he_tong_bian_hao_ = d.id_ WHERE t_mjwtsqb.shi_fou_guo_shen_ = '1' GROUP BY d.zhuan_huan_ke_hu_"
-      //   curdPost('sql',sql).then(res=>{
-      //     let arr = res.variables.data
-      //     for (var i = 0; i < arr.length; i++) {
-      //       if (arr[i].lei_bie_ != "空") {//判断key为999的对象是否存在,
-      //         this.orArr.push(arr[i])
-      //       }
-      //     }
-      //     console.log(this.orArr,'oraaaaaaa')
-      //   })
-      // }
+      getIndividualPerformanceCustomerMonth(date){
+        this.tableData.data.length = 0
+        let sql = "select d.*,SUM(t_mjwtsqb.zong_jia_) as jiage from (select * from t_bjd LEFT JOIN (select a.id_ as leibieid,a.lai_yuan_qu_dao_ as laiyuan,b.id_ as qudaoid, b.lei_bie_ from ((select id_, lai_yuan_qu_dao_ from t_qzkhb GROUP BY id_) UNION (select id_, lai_yuan_qu_dao_ from t_yxkh GROUP BY id_) UNION (select ke_hu_ming_cheng_, lai_yuan_qu_dao_ as khnum from t_khxx GROUP BY ke_hu_ming_cheng_)) as a LEFT JOIN (select t_qdgl.id_,t_qdlbb.lei_bie_ from t_qdgl LEFT JOIN t_qdlbb on t_qdgl.qu_dao_lei_bie_ = t_qdlbb.id_) as b on a.lai_yuan_qu_dao_ = b.id_) as c on t_bjd.ke_hu_ming_cheng_ = c.leibieid where t_bjd.shi_xiao_shi_jian = '"+date+"%' or t_bjd.zhuang_tai_ ='生效中') as d left join t_mjwtsqb on t_mjwtsqb.he_tong_bian_hao_ = d.id_ WHERE t_mjwtsqb.shi_fou_guo_shen_ = '1' and t_mjwtsqb.create_time_ like '"+date+"%' GROUP BY d.zhuan_huan_ke_hu_"
+        curdPost('sql',sql).then(res=>{
+          let arr = res.variables.data
+          for (var i = 0; i < arr.length; i++) {
+            let changeArr = [arr[i].zhuan_huan_ke_hu_,arr[i].fu_kuan_fang_shi_,arr[i].jiage]
+            this.tableData.data.push(changeArr)
+          }
+          // }
+          // console.log(this.orArr,'oraaaaaaa')
+        })
+      },
       getTeamPerformance(date){
         this.teArr.length = 0
         date = date.split('-')[0]
@@ -365,7 +367,7 @@
     margin: 1% 1% 0;
     height: 40% !important;
     .dv-border-box-7{
-      width: 49.5%;
+      width: 32.67%;
     }
   }
   .customerG{
@@ -396,4 +398,13 @@
       font-size: 36px;
     }
   }
+  .middleFontC{
+      font-size: 120%;
+      font-weight: 600;
+      text-align: center;
+      height: 13%;
+      display: flex;
+		  align-items: center;
+      justify-content: center;
+    }
 </style>