snow 1 gadu atpakaļ
vecāks
revīzija
a1f6e4ad62

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.c6e85817.css


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


BIN
dist/static/js/app.0bec4b0b.js.gz


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


BIN
dist/static/js/app.0d7a37c3.js.gz


+ 5 - 16
src/components/newResults/company-month.vue

@@ -123,21 +123,12 @@ export default {
       return ({ ...item, label })
     })
 
-
-    const wanyuIndex = this.cp_companies.findIndex((item) => item.label === '平台公司: 万宇');
-    if(wanyuIndex !== -1){
-      const item = this.cp_companies.splice(wanyuIndex,1);
-      this.cp_companies.unshift(...item);
-    }
-
-    const allIndex = this.cp_companies.findIndex((item) => item.label === '所有公司');
-    if(allIndex !== -1){
-      const item = this.cp_companies.splice(allIndex,1);
-      this.cp_companies.unshift(...item);
-    }
-
-
+    let list = ['所有公司','平台公司: 万宇','业务公司: 百辰','业务公司: 泓源','业务公司: 普润&锦兴&知事']
+    const cp_list = this.cp_companies.map((item) => item.label);
+    list = list.filter(item => cp_list.includes(item));
+    this.cp_companies = list.map((item) => this.cp_companies.find((cp_item) => cp_item.label === item));
     this.companyNo = this.cp_companies[0].value;
+
     this.daytime = this.transformTime();
     this.requestData();
   },
@@ -288,8 +279,6 @@ export default {
           totalItem.cost_rate = Number(totalItem.cost_tips) === 0 ? 0 : multiplication(division(totalItem.pure_profit, totalItem.cost_tips) || 0, 100).toFixed(2)
           this.tableData = [...this.tableData, totalItem];
 
-          console.log(this.tableData);
-
           // const totalItem = createTotalItem(tableData)
           // totalItem.month = "年度合计"
           // /* 年度指标达成率 = (年度销售净额 / 年度销售指标) **/

+ 17 - 19
src/components/newResults/company.vue

@@ -140,8 +140,8 @@
 
 
 <script>
-import asyncRequest from "@/api/newResults";
 import { addition, unit2TenThousand, subtraction, multiplication, division } from "../newReport/src/_utils";
+import asyncRequest from "@/api/newResults";
 import { mapCompany } from "./mapCompany";
 import dayjs from "dayjs"
 
@@ -189,19 +189,13 @@ export default {
       return ({ ...item, label })
     })
 
-    const wanyuIndex = this.cp_companies.findIndex((item) => item.label === '平台公司: 万宇');
-    if(wanyuIndex !== -1){
-      const item = this.cp_companies.splice(wanyuIndex,1);
-      this.cp_companies.unshift(...item);
-    }
-
-    const allIndex = this.cp_companies.findIndex((item) => item.label === '所有公司');
-    if(allIndex !== -1){
-      const item = this.cp_companies.splice(allIndex,1);
-      this.cp_companies.unshift(...item);
-    }
 
+    let list = ['所有公司','平台公司: 万宇','业务公司: 百辰','业务公司: 泓源','业务公司: 普润&锦兴&知事']
+    const cp_list = this.cp_companies.map((item) => item.label);
+    list = list.filter(item => cp_list.includes(item));
+    this.cp_companies = list.map((item) => this.cp_companies.find((cp_item) => cp_item.label === item));
     this.companyNo = this.cp_companies[0].value;
+
     this.daytime = this.transformTime();
     this.requestData();
   },
@@ -225,7 +219,7 @@ export default {
       // Number(addition(c1.total_tips,c2.total_tips)).toFixed(2)
 
       return {
-        companyName: '普润\n锦兴\n知事',
+        companyName: '普润',
         cost_tips: Number(c1.cost_tips).toFixed(2),
         total_tips: Number(c1.total_tips).toFixed(2),
         monthinfo: c1.monthinfo.map((item, index) => ({
@@ -311,7 +305,6 @@ export default {
         const jxItem = res.data[jxIndex];
         res.data[prIndex] = this.addDataToCompany(jxItem, res.data[prIndex]);
         res.data.splice(jxIndex, 1);
-        console.log(res.data);
       }
 
       if (this.companyNo === "GS2302231124114965") {
@@ -406,13 +399,18 @@ export default {
           ]
 
 
-          const wanyuIndex = this.tableData.findIndex(item => item.companyName === "北京万宇恒通国际科贸有限公司")
+          // const wanyuIndex = this.tableData.findIndex(item => item.companyName === "北京万宇恒通国际科贸有限公司")
+          // if(wanyuIndex !== -1) {
+          //   const item = this.tableData.splice(wanyuIndex, 1);
+          //   this.tableData = [...item,...this.tableData]
+          // }
 
-          if(wanyuIndex !== -1) {
-            const item = this.tableData.splice(wanyuIndex, 1);
-            this.tableData = [...item,...this.tableData]
-          }
         })
+
+        let i = ["北京万宇恒通国际科贸有限公司","北京百辰荣达国际科贸有限公司","北京泓源广诚国际商贸有限公司",'普润'];
+        const l = this.tableData.map(item => item.companyName);
+        i = i.filter(item => l.includes(item));
+        this.tableData = i.map(item => this.tableData.find(l => l.companyName === item));
       } else {
         this.tableData = [];
       }

+ 20 - 11
src/components/newResults/department.vue

@@ -156,12 +156,11 @@ export default {
     }))
 
 
-    const wanyuIndex = this.cp_companies.findIndex((item) => item.label === '平台公司: 万宇');
-
-    if(wanyuIndex !== -1){
-      const item = this.cp_companies.splice(wanyuIndex,1);
-      this.cp_companies.unshift(...item);
-    }
+    let list = ['平台公司: 万宇','业务公司: 百辰','业务公司: 泓源','业务公司: 普润','业务公司: 锦兴']
+    const cp_list = this.cp_companies.map((item) => item.label);
+    list = list.filter(item => cp_list.includes(item));
+    this.cp_companies = list.map((item) => this.cp_companies.find((cp_item) => cp_item.label === item));
+    this.companyNo = this.cp_companies[0].value;
 
     this.companyNo = this.cp_companies[0].value;
     this.daytime = this.transformTime();
@@ -329,13 +328,23 @@ export default {
         })
 
 
-        const wanyuIndex = this.list.findIndex(item => item.depart.indexOf('万宇') !== -1);
+        // const wanyuIndex = this.list.findIndex(item => item.depart.indexOf('万宇') !== -1);
+        // if(wanyuIndex !== -1){
+        //   const item = this.list.splice(wanyuIndex,1);
+        //   this.list.unshift(item[0]);
+        // }
 
-        if(wanyuIndex !== -1){
-          const item = this.list.splice(wanyuIndex,1);
-          this.list.unshift(item[0]);
-        }
+        let l = ['万宇','百辰','泓源','普润'];
+        const cl = this.list.map(item => item.depart)
 
+
+        l = l.filter(item => {
+          return cl.findIndex(i => i.indexOf(item)) !== -1
+        });
+
+        this.list = l.map(item => {
+          return this.list.find(i => i.depart.indexOf(item) !== -1);
+        })
       } else {
         this.list = [];
       }

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