snow 1 gadu atpakaļ
vecāks
revīzija
888726f7e5

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/index.html


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.87ec67e7.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.d2791ca5.js


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


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.eb61bdc4.js


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


+ 1 - 1
src/ccomponents/reports/src/WanyuReport.vue

@@ -121,9 +121,9 @@ export default {
     this.searchList();
   },
   methods: {
+    division,
     getCompanyLabel,
     unit2TenThousand,
-    division,
     tableRowClassName({ row, rowIndex }) {
       if ((row && row.child && row.child.length > 0) || rowIndex === 0) {
         return "warning-row";

+ 21 - 7
src/components/newResults/company-month.vue

@@ -58,7 +58,7 @@
 
 <script>
 import asyncRequest from "@/api/newResults";
-import { unit2TenThousand, subtraction, multiplication, division } from "../newReport/src/_utils";
+import { unit2TenThousand, subtraction, multiplication, division, addition } from "../newReport/src/_utils";
 export default {
   data(){
     return {
@@ -93,15 +93,29 @@ export default {
       this.loading = true;
 
 
-      let jxResult = null;
+      const result = await asyncRequest.companyEvery({ year: (this.daytime.split('-'))[0], companyNo: this.companyNo })
+
       if(this.companyNo === "GS2302231124114965"){
-        // console.log(1);
-        jxResult = await asyncRequest.companyEvery({ year: (this.daytime.split('-'))[0], companyNo: "GS2304031312553746" })
+        const jxResult = await asyncRequest.companyEvery({ year: (this.daytime.split('-'))[0], companyNo: "GS2304031312553746" })
+
+        result.data = result.data.map((_,index) => {
+          const prItem = result.data[index];
+          const jxItem = jxResult.data[index];
+
+          return {
+            month:prItem.month,
+            cgd_th_total: Number(addition(prItem['cgd_th_total'],jxItem['cgd_th_total'])).toFixed(2),
+            cgd_total:Number(addition(prItem['cgd_total'],jxItem['cgd_total'])).toFixed(2),
+            cost_tips:Number(addition(prItem['cost_tips'],jxItem['cost_tips'])).toFixed(2),
+            sale_total:Number(addition(prItem['sale_total'],jxItem['sale_total'])).toFixed(2),
+            th_total:Number(addition(prItem['th_total'],jxItem['th_total'])).toFixed(2),
+            total_tips:Number(addition(prItem['total_tips'],jxItem['total_tips'])).toFixed(2),
+          }
+        })
+        
+        console.log(result);
       };
 
-      console.log(jxResult)
-
-      const result = await asyncRequest.companyEvery({ year: (this.daytime.split('-'))[0], companyNo: this.companyNo })
       
       switch(Number(result.code)){
         case 0:

+ 37 - 1
src/components/newResults/company.vue

@@ -156,6 +156,28 @@ export default {
   },
   methods: {
     unit2TenThousand,
+    addDataToCompany(c1,c2){
+      // Number(addition(c1.total_tips,c2.total_tips)).toFixed(2)
+     return {
+        companyName:'普润&锦兴&知事',
+        cost_tips:Number(addition(c1.cost_tips,c2.cost_tips)).toFixed(2),
+        total_tips:Number(c1.total_tips).toFixed(2),
+        monthinfo:c1.monthinfo.map((item,index) => ({
+          mcgd_th_total:Number(addition(item.mcgd_th_total,c2.monthinfo[index].mcgd_th_total)).toFixed(2),
+          mcgd_total:Number(addition(item.mcgd_total,c2.monthinfo[index].mcgd_total)).toFixed(2),
+          msale_total:Number(addition(item.msale_total,c2.monthinfo[index].msale_total)).toFixed(2),
+          mth_total:Number(addition(item.mth_total,c2.monthinfo[index].mth_total)).toFixed(2),
+          type:item.type
+        })),
+        dayinfo:c1.monthinfo.map((item,index) => ({
+          cgd_th_total:Number(addition(item.cgd_th_total,c2.monthinfo[index].cgd_th_total)).toFixed(2),
+          cgd_total:Number(addition(item.cgd_total,c2.monthinfo[index].cgd_total)).toFixed(2),
+          sale_total:Number(addition(item.sale_total,c2.monthinfo[index].sale_total)).toFixed(2),
+          th_total:Number(addition(item.th_total,c2.monthinfo[index].th_total)).toFixed(2),
+          type:item.type
+        })),
+      }
+    },
     setCellClassName({ column }) {
       const { label } = column;
       return label === "当月营业收入(净)" || label === '当月成本合计' ? "pure__cell" : "";
@@ -173,6 +195,20 @@ export default {
 
       const res = await asyncRequest.companyEveryMonth({ daytime: this.daytime , companyNo: this.companyNo});
 
+      const jxIndex = res.data.findIndex((item) => item.companyName === "北京锦兴弘昌科技有限公司");
+      const prIndex = res.data.findIndex((item) => item.companyName === "北京普润心堂商贸有限公司");
+
+      if(jxIndex >= 0 && prIndex >= 0){
+        const jxItem = res.data[jxIndex];
+        res.data[prIndex] = this.addDataToCompany(jxItem,res.data[prIndex]);
+        res.data.splice(jxIndex,1);
+      }
+
+      if(this.companyNo === "GS2302231124114965"){
+        const jxResult = await asyncRequest.companyEveryMonth({ daytime: this.daytime , companyNo: "GS2304031312553746"});
+        res.data[prIndex] = this.addDataToCompany(jxResult.data[0],res.data[prIndex]);
+      }
+
       // const isBeforeDate = this.getDiffDay() < 0 && this.companyNo === "GS2302231323386950"
 
       if (res.code === 0 && res.data && res.data.length > 0) {
@@ -244,7 +280,7 @@ export default {
           this.tableData = [
             ...this.tableData,
             { 
-              companyName:companyName.indexOf('普润') !== -1 ? "普润&锦兴&知事" : companyName,  // 公司名称
+              companyName,  // 公司名称
               cost_tips, // 当月成本指标
               total_tips, // 当月营收目标
               info: [{...item}], // 直营.. 渠道 销售

+ 0 - 2
src/components/newResults/department.vue

@@ -216,8 +216,6 @@ export default {
         const mapToDepartment = { 百辰:"客服部@百辰荣达", 泓源:"网络部@泓源广诚", 普润:"	项目部@普润心堂", 平台:"	平台部@万宇恒通" }
 
         const company = this.companies.find(item => item.value === this.companyNo);
-
-        console.log(this.companies,'===',this.companyNo)
         this.list = list.map(({depart,total_tips,dayinfo,monthinfo,mchannel_sale_total,mzy_sale_total,zy_cost_total,channel_cost_total}) => {
           /* 月净销售 = 月销售 - 月退货 **/
           const monthNetSales = subtraction(monthinfo.msale_total, monthinfo.mth_total)

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels