snow před 1 rokem
rodič
revize
9bef007e8f

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/index.html


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/static/css/app.00e5aead.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/static/js/app.33c7d5c7.js


binární
dist/static/js/app.33c7d5c7.js.gz


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/static/js/app.a0d8f071.js


binární
dist/static/js/app.a0d8f071.js.gz


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/static/js/chunk-libs.3fd8d468.js


binární
dist/static/js/chunk-libs.3fd8d468.js.gz


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/static/js/chunk-libs.9adbfe90.js


binární
dist/static/js/chunk-libs.9adbfe90.js.gz


+ 8 - 0
src/components/newReport/src/Stock.vue

@@ -10,6 +10,7 @@
 <script>
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
+import { addition } from "./_utils";
 export default {
   name: "Consult",
   mixins: [setHeight],
@@ -51,6 +52,13 @@ export default {
 
       if (res.code === 0 && res.data && res.data.length > 0) {
         this.tableData = res.data
+
+        this.tableData.push({
+          name: '总计',
+          num:this.tableData.reduce((prev, {num}) => {
+            return addition(prev, num)
+          }, 0)
+        })
       } else {
         this.tableData = [];
       }

+ 8 - 0
src/components/newReport/src/consult.vue

@@ -10,6 +10,7 @@
 <script>
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
+import { addition } from "./_utils";
 export default {
   name: "Consult",
   mixins: [setHeight],
@@ -45,6 +46,13 @@ export default {
       const res = await asyncRequest.zxOrder({ start:this.date[0] || "", end:this.date[1] || "" });
       if (res.code === 0 && res.data && res.data.length > 0) {
         this.tableData = res.data
+
+        this.tableData.push({
+          name: '合计',
+          num:this.tableData.reduce((prev, {  num }) => addition(prev, num),0)
+        })
+
+        console.log(this.tableData)        
       } else {
         this.tableData = [];
       }

+ 8 - 1
src/components/newReport/src/emptyReturn.vue

@@ -14,6 +14,7 @@
 <script>
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
+import { addition } from "./_utils";
 export default {
   name: "Consult",
   mixins: [setHeight],
@@ -37,7 +38,8 @@ export default {
         { id: '4', label: '已选商品待下单' },
         { id: '5', label: '已成功转单' },
         { id: '6', label: '已取消转单' },
-        { id: '7', label: '招标已暂停' }
+        { id: '7', label: '招标已暂停' },
+        { id: '10086', label: '合计' },
       ]
     };
   },
@@ -67,6 +69,11 @@ export default {
           const { status, num } = res.data.result[key]
           return { status, num }
         })
+
+        this.tableData.push({
+          status:'10086',
+          num:this.tableData.reduce((prev, {num}) => addition(prev, num),0)
+        })
       } else {
         this.tableData = [];
       }

+ 33 - 12
src/components/newReport/src/notDeliverGood.vue

@@ -1,21 +1,20 @@
 <template>
   <div class="SalesReportRejectedNew" v-loading="loading">
     <el-table :data="tableData" size="mini" border>
-      <el-table-column label="计数项:订单编号">
-        <el-table-column width="120px" label="申请人所属部门" prop="name" />
-      </el-table-column>
+      <el-table-column  width="120px" label="申请人所属部门" prop="name" />
+
       <el-table-column label="订单状态" width="110px">
         <template slot-scope="scope">
           {{ getStatus(scope.row) }}
         </template>
       </el-table-column>
-      <el-table-column label="下单月份" align="center">
-        <el-table-column label="01">
+      <el-table-column label="下单月份" align="center" v-if="months">
+        <el-table-column :label="'0' + month" v-for="month in months" :key="month" width="100px">
           <template slot-scope="scope">
-            {{getField('1',scope.row)}}
+            {{getField(month, scope.row)}}
           </template>
         </el-table-column>
-        <el-table-column label="02">
+        <!-- <el-table-column label="02">
           <template slot-scope="scope">
             {{getField('2',scope.row)}}
           </template>
@@ -48,9 +47,9 @@
           <template slot-scope="scope">
             {{getField('7',scope.row)}}
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table-column>
-      <el-table-column label="总计">
+      <el-table-column label="总计" width="110px">
         <template slot-scope="scope">
           {{getTotal(scope.row)}}
         </template>
@@ -78,6 +77,7 @@ export default {
   data() {
     return {
       tableData:[],
+      months: [],
       loading:false,
       statusOptions: [
         { id: "0", label: "待发货" },
@@ -107,14 +107,13 @@ export default {
       }) || {}).label || '--'
     },
     getTotal(row){
-      const keys = ['1','2','3','4','5','6','7'];
-      return keys.reduce((prev, key) => {
+      return this.months.reduce((prev, key) => {
         return addition(prev, (row.result[key]['1'] || {}).num || 0)
       },0)
     },
     getField(month,row){
       if(Array.isArray(row.result[month])) return 0
-      return row.result[month]['1'].num || 0
+      return (row.result[month]['1'] || {}).num || 0
     },
     async searchList() {
       this.loading = true;
@@ -127,6 +126,28 @@ export default {
 
       if (res.code === 0 && res.data && res.data.result.length > 0) {
         this.tableData = res.data.result
+        this.months = Object.keys(this.tableData[0].result)
+
+        const totalItemDefault = this.months.reduce((prev,month) => ({
+          ...prev,
+          [month]:{ 1:{ num:0 }}
+        }), {})
+
+
+        this.tableData.push({
+          name:'合计',
+          result: this.tableData.reduce((prev,current) => {
+            const { result} = current;
+            
+            return this.months.reduce((pre,month) => {
+              const res = Array.isArray(result[month]) ? ({num : 0}) : (result[month]['1'] || {num : 0});
+              const { num } = res;
+              const newNum = addition(prev[month]['1'].num, num)
+              return { ...pre, [month]: { 1: { num:newNum }}
+              }
+            }, {})
+          },{...totalItemDefault})
+        })
       } else {
         this.tableData = [];
       }

+ 25 - 0
src/components/newReport/src/order.vue

@@ -85,6 +85,31 @@ export default {
 
       if (res.code === 0 && res.data && res.data.length > 0) {
         this.tableData = res.data
+
+
+        const keys = ['1','2','3']
+
+        const defaultData = keys.reduce((prev, order_type) => ({
+          ...prev,
+          [order_type]:{ num:0, order_type }
+        }),{})
+
+
+        const totalItem = {
+          name:'总计',
+          result:this.tableData.reduce((prev,current) => {
+            const { result } = current;
+            const row =  keys.reduce((pre,order_type) => {
+              const { num } = result[order_type] || { num: 0 }
+              const newNum = addition(prev[order_type].num, num);
+              return {...pre, [order_type]:{ num:newNum,  order_type }}
+            },{})
+            return row
+        },{...defaultData})}
+
+        
+        this.tableData.push(totalItem)
+
       } else {
         this.tableData = [];
       }

+ 14 - 1
src/components/newReport/src/purchase.vue

@@ -2,7 +2,6 @@
   <div class="SalesReportRejectedNew" v-loading="loading">
     <el-table :data="tableData" size="mini" border>
       <el-table-column label="采购员" prop="cgder" width="110px" />
-      <!-- <el-table-column label="采购部门" prop="name" width="120px" /> -->
       <el-table-column width="110px" label="采购单总量" prop="total_cgd" />
       <el-table-column label="库存品" prop="tag_1" />
       <el-table-column label="非库存品" prop="tag_2" />
@@ -16,6 +15,7 @@
 <script>
 import asyncRequest from "@/api/newReport";
 import setHeight from "@/mixins/index";
+import { addition } from "./_utils";
 export default {
   name: "Purchasee",
   mixins: [setHeight],
@@ -66,6 +66,19 @@ export default {
               }
             })]
         },[])
+
+        const totalItem = {
+          cgder:'合计',
+          name:'--',
+          ...this.tableData.reduce((prev,current) => {
+            const {cgder,name,...rest} = current;
+            const keys = Object.keys(rest)
+            return keys.reduce((preObj,key) => ({ ...preObj,  [key]:addition(current[key] || 0, prev[key] || 0)}),{})
+          },{})
+        }
+
+
+        this.tableData.push(totalItem)
       } else {
         this.tableData = [];
       }

+ 17 - 0
src/components/newReport/src/sendExp.vue

@@ -129,6 +129,23 @@ export default {
           }
         })
 
+        const totalItem = {
+          0:'--',
+          ...list.reduce((prev,current) => {
+            const {name,...rest} = current;
+            const keys = Object.keys(rest)
+            return keys.reduce((pObj,key) => ({
+              ...pObj,
+              [key]:addition(current[key] || 0,prev[key] || 0)
+            }),{})
+          }, {})
+        }
+
+
+        totalItem['name'] = '合计'
+        totalItem['0'] = '--'
+        list.push(totalItem)  
+
         this.tableData = list
       } else {
         this.tableData = [];

+ 17 - 0
src/components/newReport/src/sendOrder.vue

@@ -126,6 +126,23 @@ export default {
           }
         })
 
+        const totalItem = {
+          0:'--',
+          ...list.reduce((prev,current) => {
+            const {name,...rest} = current;
+            const keys = Object.keys(rest)
+            return keys.reduce((pObj,key) => ({
+              ...pObj,
+              [key]:addition(current[key] || 0,prev[key] || 0)
+            }),{})
+          }, {})
+        }
+
+
+        totalItem['name'] = '合计'
+        totalItem['0'] = '--'
+        list.push(totalItem)
+
         this.tableData = list
       } else {
         this.tableData = [];

+ 0 - 4
src/pages/newReport.vue

@@ -46,10 +46,6 @@
       </el-row>
 
       <el-row :gutter="20">
-        <!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-
-        </el-col> -->
-
         <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
           <p class="title">8.发货工单时效:</p>
           <send-order :date="date" />

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů