luobang 1 year ago
parent
commit
71ca58d83d

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
 // let devModules = ['all']
-// let devModules = ['index', 'statisticalReport', 'ADMINISTRATORS']
+// let devModules = ['index', 'statisticalReport', 'appoint']
 let devModules = ['all']
 // let devModules = ['index', 'ADMINISTRATORS']
 

+ 1 - 0
package.json

@@ -25,6 +25,7 @@
     "apollo-link-error": "^1.1.11",
     "apollo-link-http": "^1.5.14",
     "axios": "^0.26.1",
+    "babel-polyfill": "^6.26.0",
     "bignumber.js": "^9.0.2",
     "codemirror": "5.65.5",
     "crypto": "^1.0.1",

+ 29 - 32
src/views/ADMINISTRATORS/router/index.js

@@ -1,54 +1,51 @@
-import Vue from "vue";
-import Router from "vue-router";
-import routerBefore from "@/config/routerBefore.js";
+import Vue from 'vue'
+import Router from 'vue-router'
+import routerBefore from '@/config/routerBefore.js'
 // 主要
-import main from "@/components/main.vue";
+import main from '@/components/main.vue'
 // 系统配置管理
-import ADMINISTRATORS1 from "../components/ADMINISTRATORS1.vue";
-import tmstruckCommisson from "../components/tmstruckCommisson.vue";
-import saleLog from "../components/saleLog.vue";
-
-Vue.use(Router);
-
+import ADMINISTRATORS1 from '../components/ADMINISTRATORS1.vue'
+import tmstruckCommisson from '../components/tmstruckCommisson.vue'
+import saleLog from '../components/saleLog.vue'
+Vue.use(Router)
 const constantRouterMap = [
   {
-    path: "/",
-    name: "main",
-    meta: { title: "首页", code: "xtpzgl" },
+    path: '/',
+    name: 'main',
+    meta: { title: '首页', code: 'xtpzgl' },
     component: main,
-    redirect: { name: "ADMINISTRATORS1" },
+    redirect: { name: 'ADMINISTRATORS1' },
     children: [
       {
-        path: "ADMINISTRATORS1",
-        name: "ADMINISTRATORS1",
-        meta: { code: "xtpzgl-jggl" },
+        path: 'ADMINISTRATORS1',
+        name: 'ADMINISTRATORS1',
+        meta: { code: 'xtpzgl-jggl' },
         component: () =>
-          import("@/views/ADMINISTRATORS/components/ADMINISTRATORS1")
+          import('@/views/ADMINISTRATORS/components/ADMINISTRATORS1')
       },
       {
-        path: "tmstruckCommisson",
-        name: "tmstruckCommisson",
-        meta: { code: "xtpzgl-jggl" },
+        path: 'tmstruckCommisson',
+        name: 'tmstruckCommisson',
+        meta: { code: 'xtpzgl-jggl' },
         component: () =>
-          import("@/views/ADMINISTRATORS/components/tmstruckCommisson")
+          import('@/views/ADMINISTRATORS/components/tmstruckCommisson')
       },
       {
-        path: "saleLog",
-        name: "saleLog",
-        meta: { code: "xtpzgl-jggl" },
-        component: () =>
-          import("@/views/ADMINISTRATORS/components/saleLog")
+        path: 'saleLog',
+        name: 'saleLog',
+        meta: { code: 'xtpzgl-jggl' },
+        component: () => import('@/views/ADMINISTRATORS/components/saleLog')
       }
     ]
   }
-];
+]
 
 const router = new Router({
   routes: constantRouterMap
-});
+})
 //  before
-routerBefore(router, constantRouterMap);
+routerBefore(router, constantRouterMap)
 
-export default router;
+export default router
 //  constantRouterMap
-export const routes = constantRouterMap;
+export const routes = constantRouterMap

+ 5 - 1
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -958,7 +958,8 @@ export default {
             let mapValue = {
               number: row.saleNumber,
               saleOrderId: row.saleOrderId,
-              reason: value
+              reason: value,
+              userName: getCookie('loginName')
             }
             console.log(mapValue)
             this.axios
@@ -1391,6 +1392,9 @@ export default {
         })
     },
     batchDelete(rows) {
+      rows.forEach(e => {
+        e.userName = getCookie('loginName')
+      })
       this.axios
         .post('/api/v1/ams/deleteAmsSaleOrderBySaleOrderId', rows)
         .then(res => {

+ 1 - 1
src/views/appoint/components/saleContract/transportPrice.vue

@@ -59,7 +59,7 @@
       <el-button type="primary" @click="btnclick(0)" v-if="!showConsignee">
         <i class="el-icon-plus"></i>新增
       </el-button>
-      <el-button type="primary" @click="exportAllExcel()"
+      <el-button type="primary" @click="exportAllExcel()" v-if="!showConsignee"
         ><i class="el-icon-download"></i>导出(Excel)</el-button
       >
       <el-button

+ 33 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1902,6 +1902,10 @@ export default {
         {
           value: '收货地址',
           lable: '收货地址'
+        },
+        {
+          value: '销售订单号',
+          lable: '销售订单号'
         }
       ],
       input1: null,
@@ -1926,6 +1930,10 @@ export default {
         {
           value: '收货地址',
           lable: '收货地址'
+        },
+        {
+          value: '销售订单号',
+          lable: '销售订单号'
         }
       ],
       pickerOptions: {
@@ -1954,6 +1962,14 @@ export default {
               date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
               picker.$emit('pick', date)
             }
+          },
+          {
+            text: '元年',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(0)
+              picker.$emit('pick', date)
+            }
           }
         ]
       },
@@ -1983,6 +1999,14 @@ export default {
               date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
               picker.$emit('pick', date)
             }
+          },
+          {
+            text: '元年',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(0)
+              picker.$emit('pick', date)
+            }
           }
         ]
       },
@@ -4996,6 +5020,7 @@ export default {
       let consigneeLoginName = null
       let receiveAddress = null
       obj.receiveAddress = null
+      obj.saleNo = null
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)
         endTime = sjTime(this.endTime)
@@ -5022,6 +5047,8 @@ export default {
       } else if (this.screen == '收货地址') {
         receiveAddress = this.input
         obj.receiveAddress = receiveAddress
+      } else if (this.screen == '销售订单号') {
+        obj.saleNo = this.input
       } else {
         remark = this.input
       }
@@ -5052,6 +5079,12 @@ export default {
       ) {
         receiveAddress = this.input1
         obj.receiveAddress = receiveAddress
+      } else if (
+        this.screen1 == '销售订单号' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
+        obj.saleNo = this.input1
       } else if (this.input1 != null && this.input1 != '') {
         remark = this.input1
       }

+ 64 - 30
src/views/statisticalReport/components/salesLogisticsStatistics/yawnReport.vue

@@ -202,6 +202,7 @@
 <script>
 import PageTitle from '@/components/Page/Title'
 import { sjTime } from '@/utils/sharedJsFile'
+import { accAdd } from '@/utils/util.js'
 import FileSaver from 'file-saver'
 import BigNumber from 'bignumber.js'
 export default {
@@ -381,24 +382,40 @@ export default {
               countRow.receivedNum += item.receivedNum
               countRow.queueNum += item.queueNum
               countRow.enFactoryNum += item.enFactoryNum
-              countRow.totalNet =
-                (countRow.totalNet * 10000 + item.totalNet * 10000) / 10000
-              countRow.materialThoWeight =
-                (countRow.materialThoWeight * 10000 +
-                  item.materialThoWeight * 10000) /
-                10000
-
-              countRow.unloadThoWeight =
-                (countRow.unloadThoWeight * 10000 +
-                  item.unloadThoWeight * 10000) /
-                10000
-              countRow.trainWeight =
-                (item.trainWeight * 10000 + countRow.trainWeight * 10000) /
-                10000
-              countRow.trainThoWeight =
-                (item.trainThoWeight * 10000 +
-                  countRow.trainThoWeight * 10000) /
-                10000
+              // countRow.totalNet =
+              //   (countRow.totalNet * 10000 + item.totalNet * 10000) / 10000
+              // countRow.materialThoWeight =
+              //   (countRow.materialThoWeight * 10000 +
+              //     item.materialThoWeight * 10000) /
+              //   10000
+              countRow.totalNet = accAdd(countRow.totalNet, item.totalNet)
+              countRow.materialThoWeight = accAdd(
+                countRow.materialThoWeight,
+                item.materialThoWeight
+              )
+              countRow.unloadThoWeight = accAdd(
+                countRow.unloadThoWeight,
+                item.unloadThoWeight
+              )
+              countRow.trainWeight = accAdd(
+                countRow.trainWeight,
+                item.trainWeight
+              )
+              countRow.trainThoWeight = accAdd(
+                countRow.trainThoWeight,
+                item.trainThoWeight
+              )
+              // countRow.unloadThoWeight =
+              //   (countRow.unloadThoWeight * 10000 +
+              //     item.unloadThoWeight * 10000) /
+              //   10000
+              // countRow.trainWeight =
+              //   (item.trainWeight * 10000 + countRow.trainWeight * 10000) /
+              //   10000
+              // countRow.trainThoWeight =
+              //   (item.trainThoWeight * 10000 +
+              //     countRow.trainThoWeight * 10000) /
+              //   10000
             }
           })
           if (countRow.planNum) {
@@ -460,18 +477,35 @@ export default {
                   countRow1.receivedNum += item.receivedNum
                   countRow1.queueNum += item.queueNum
                   countRow1.enFactoryNum += item.enFactoryNum
-                  countRow1.totalNet =
-                    (countRow1.totalNet * 1000 + item.totalNet * 1000) / 1000
-                  countRow1.materialThoWeight =
-                    (countRow1.materialThoWeight * 1000 +
-                      item.materialThoWeight * 1000) /
-                    1000
-                  countRow1.unloadThoWeight =
-                    (countRow1.unloadThoWeight * 1000 +
-                      item.unloadThoWeight * 1000) /
-                    1000
-                  countRow1.trainWeight += item.trainWeight
-                  countRow1.trainThoWeight += item.trainThoWeight
+                  // countRow1.totalNet =
+                  //   (countRow1.totalNet * 1000 + item.totalNet * 1000) / 1000
+                  // countRow1.materialThoWeight =
+                  //   (countRow1.materialThoWeight * 1000 +
+                  //     item.materialThoWeight * 1000) /
+                  //   1000
+                  // countRow1.unloadThoWeight =
+                  //   (countRow1.unloadThoWeight * 1000 +
+                  //     item.unloadThoWeight * 1000) /
+                  //   1000
+                  countRow1.totalNet = accAdd(countRow1.totalNet, item.totalNet)
+                  countRow1.materialThoWeight = accAdd(
+                    countRow1.materialThoWeight,
+                    item.materialThoWeight
+                  )
+                  countRow1.unloadThoWeight = accAdd(
+                    countRow1.unloadThoWeight,
+                    item.unloadThoWeight
+                  )
+                  countRow1.trainWeight = accAdd(
+                    countRow1.trainWeight,
+                    item.trainWeight
+                  )
+                  countRow1.trainThoWeight = accAdd(
+                    countRow1.trainThoWeight,
+                    item.trainThoWeight
+                  )
+                  // countRow1.trainWeight += item.trainWeight
+                  // countRow1.trainThoWeight += item.trainThoWeight
                 }
               })
               countRow1.percent =