snow 1 year ago
parent
commit
0a59321752

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.0aaec615.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.8d0f8d83.js


BIN
dist/static/js/app.8d0f8d83.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.bd42787e.js


BIN
dist/static/js/app.bd42787e.js.gz


+ 19 - 2
src/ccomponents/reports/src/WanyuCompletion.vue

@@ -149,7 +149,10 @@ export default {
            [current.companyName]:subtraction(current.monthinfo[2].msale_total,current.monthinfo[2].mth_total)
           }),{})
 
-        console.log(mapCompanySupplierSale)
+          const mapCompanySupplierSaleDay = result.data.reduce((prev,current) => ({
+           ...prev,
+           [current.companyName]:subtraction(current.dayinfo[2].sale_total,current.dayinfo[2].th_total)
+          }),{})
 
         let tableData = (res.data || []).map(({
           depart,
@@ -185,15 +188,29 @@ export default {
         this.tableData = tableData.map(({depart,total_tips,dayinfo,monthinfo}) => {
           /* 月净销售 = 月销售 - 月退货 **/
           let monthNetSales = subtraction(monthinfo.msale_total, monthinfo.mth_total)
+          let dayNetSale = subtraction(dayinfo.sale_total,dayinfo.th_total)
 
           const supplierSalekey = Object.keys(mapCompanySupplierSale).find(key => key.includes(depart))
+          const supplierSaleDaykey = Object.keys(mapCompanySupplierSaleDay).find(key => key.includes(depart))
+
           if(supplierSalekey){
             monthNetSales = addition(monthNetSales,mapCompanySupplierSale[supplierSalekey])
           }
+
+          if(supplierSaleDaykey){
+            dayNetSale = addition(dayNetSale,mapCompanySupplierSaleDay[supplierSaleDaykey])
+          }
+
+
+
           if(supplierSalekey === '北京普润心堂商贸有限公司'){
             monthNetSales = addition(monthNetSales,mapCompanySupplierSale['北京锦兴弘昌科技有限公司'])
           }
 
+          if(supplierSaleDaykey === '北京普润心堂商贸有限公司'){
+            dayNetSale = addition(dayNetSale,mapCompanySupplierSaleDay['北京锦兴弘昌科技有限公司'])
+          }
+
           /* 月经销售完成率 = 月净销售 / 销售指标 **/
           const monthProportion = multiplication(division(monthNetSales,total_tips),100).toFixed(2)
           return {
@@ -202,7 +219,7 @@ export default {
             dayinfo:{
               ...dayinfo,
               /** 日销售额 = 日销售额 - 日退货额 */
-              sale_total:subtraction(dayinfo.sale_total,dayinfo.th_total)
+              sale_total:dayNetSale
             },
             monthinfo:{
               monthNetSales,

+ 40 - 0
src/pages/results.vue

@@ -43,6 +43,46 @@ export default {
         ...( openid ? { openid } :  { code })
       })
 
+      // const result ={
+      // "code": 0,
+      // "message": "获取成功",
+      // "data": {
+		  //     "id": "1",
+		  //     "openid": "oOpc26KiZFBKIm7SB8knFGvov1qg",
+		  //     "mobile": "",
+		  //     "gender": "0",
+		  //     "nickname": "雪寒",
+		  //     "avatar": "",
+		  //     "subscribe_time": "2022-12-21 15:52:14",
+		  //     "addr": "\/\/",
+		  //     "status": "1",
+		  //     "is_show": ["1", "2", "4"],
+		  //     "companyArr": [{
+		  //     	"companyNo": "GS2302231125079621",
+		  //     	"companyName": "北京百辰荣达国际科贸有限公司",
+		  //     	"info": [1,2]
+		  //     }, {
+		  //     	"companyNo": "GS2302231323386950",
+		  //     	"companyName": "北京泓源广诚国际商贸有限公司",
+		  //     	"info": [1,2]
+		  //     }, {
+		  //     	"companyNo": "GS2304031312553746",
+		  //     	"companyName": "北京锦兴弘昌科技有限公司",
+		  //     	"info": [1, 2]
+		  //     }, {
+		  //     	"companyNo": "GS2302231124114965",
+		  //     	"companyName": "北京普润心堂商贸有限公司",
+		  //     	"info": [1, 2]
+		  //     }, {
+		  //     	"companyNo": "GS2203161855277894",
+		  //     	"companyName": "北京万宇恒通国际科贸有限公司",
+		  //     	"info": [1, 2]
+		  //     }],
+		  //     "addtime": "2023-04-10 18:11:07",
+		  //     "updatetime": "2023-05-09 16:22:33"
+      // 	}
+      // }
+
       this.state.loading = false
       switch(Number(result.code)){
         case 0:

Some files were not shown because too many files changed in this diff