luobang 2 years ago
parent
commit
a2f6b29e68

+ 2 - 2
build/utils.js

@@ -16,9 +16,9 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
-// let devModules = ['all']
-// let devModules = ['index', 'statisticalReport', 'inward', 'appoint']
 let devModules = ['all']
+// let devModules = ['index', 'statisticalReport']
+// let devModules = ['all']
 
 // let devModules = ['index', 'ADMINISTRATORS']
 

+ 1 - 18
src/components/main.vue

@@ -976,8 +976,6 @@ export default {
     } else {
       this.styleControll = false
     }
-    console.log(this.$route, 'this.route')
-    console.log('获取到的orgCode+++++++++++++' + this.orgcodezs)
     this.getinformation()
     let timer = setInterval(() => {
       this.getinformation()
@@ -1012,8 +1010,6 @@ export default {
     theme_color: function(newV, oldV) {
       let that = this
       that.colors.primary = newV
-      console.log(newV)
-      console.log($(document.getElementsByTagName('iframe')))
       window.colorVal = newV
       that.primaryColor = this.colors.primary
       that.colors = objectAssign(
@@ -1042,8 +1038,6 @@ export default {
       let that = this
       window.top.localStorage.setItem('current_theme', n)
       that.theme_color = that.theme_origin_color[n]
-      console.log(that.theme_color)
-      console.log('这是')
       for (let i = 0; i < document.getElementsByTagName('iframe').length; i++) {
         console.log(
           document
@@ -1171,7 +1165,6 @@ export default {
     //弹框删除
     async makeSure() {
       let noticeid = this.noticedata1.noticeid
-      console.log(this.noticedata1)
       this.noticedata1 = []
       this.centerDialogVisible = false
       await this.axios
@@ -1180,11 +1173,9 @@ export default {
           noticeId: noticeid
         })
         .then(res => {
-          console.log(res.data)
           if (res.data.data === 0) {
             this.badgeshow = true
           } else {
-            console.log('进入了小红点标记区')
             this.taskAllNum = res.data.data
           }
         })
@@ -2679,29 +2670,21 @@ export default {
     getinformation() {
       this.taskAllNum = 0
       this.noticedata = []
-      console.log('获取到的userId----------------' + this.userId)
+
       this.axios
         .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
         .then(res => {
-          console.log('进入了获取数据的方法')
           res.data.data.forEach(e => {
-            console.log('进入了数据的遍历')
             if (e.status == 0 && e.insertusername != '销售审核') {
-              console.log('进入了数据的插入')
               this.taskAllNum++
               this.noticedata.push(e)
             }
           })
           //this.taskAllNum = res.data.data.length
-          console.log('获取到的数据')
-          console.log(this.noticedata)
-          console.log(this.taskAllNum)
           if (this.taskAllNum != null) {
             if (this.taskAllNum == 0) {
-              console.log('进入了标记为0')
               this.badgeshow = true
             } else {
-              console.log('进入了标记不为0')
               this.badgeshow = false
               let data = {
                 noticetitle: this.noticedata[0].noticetitle,

+ 1 - 3
src/config/routerBefore.js

@@ -101,9 +101,7 @@ const breadcrumbFn = function(to, menu) {
 const routerBefore = function(router, constantRouterMap) {
   let flag = false
   router.beforeEach((to, from, next) => {
-    //  面包屑
-    // console.log(from, 'from')
-    // localStorage.setItem('fromRoute', from)
+    localStorage.setItem('fromRoute', JSON.stringify(from))
     if (document.domain.indexOf('steerinfo.com') > -1) {
       document.domain = 'steerinfo.com'
     }

+ 9 - 20
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -2175,7 +2175,8 @@ export default {
         saleAreaList: [],
         materialNameList: [],
         carrierList: [],
-        capacityList: []
+        capacityList: [],
+        orderStatusActuallyList: []
       },
       //权限控制
       notRoutList: [],
@@ -2262,9 +2263,13 @@ export default {
     }
   },
   created() {
-    // console.log(this.$route.params.data, 'filterMap')
-    // this.filterMap = this.$route.params.data
-    // this.headColumnList = this.$route.params.headColumnList
+    console.log(this.$route, 'this.$route')
+    let filterMap = JSON.parse(this.$route.query.str)
+    if (filterMap) {
+      this.filterMap = filterMap
+      this.startTime = filterMap.startTime
+      this.endTime = filterMap.endTime
+    }
     this.getSteelReport = this.debounce(() => {
       this.getSteelReportDebounce()
     }, 100)
@@ -5092,14 +5097,6 @@ export default {
             window.innerHeight -
             document.querySelector('.tableTop').offsetHeight -
             40
-          if (
-            getCookie('orgCode') == 'shouhuokehu' &&
-            this.tableData[0].isGcKeHu == '0'
-          ) {
-            this.columnNoRoutList = this.columnNoRoutList.filter(e => {
-              return e != '净重'
-            })
-          }
           let a = 1
           if (
             this.visibleList.length > 0 &&
@@ -5290,14 +5287,6 @@ export default {
             window.innerHeight -
             document.querySelector('.tableTop').offsetHeight -
             40
-          if (
-            getCookie('orgCode') == 'shouhuokehu' &&
-            this.tableData[0].isGcKeHu == '0'
-          ) {
-            this.columnNoRoutList = this.columnNoRoutList.filter(e => {
-              return e != '净重'
-            })
-          }
           let a = 1
           if (
             this.visibleList.length > 0 &&

+ 75 - 37
src/views/statisticalReport/components/salesLogisticsStatistics/steelTransportReport.vue

@@ -45,7 +45,7 @@
         ref="tableRef"
         border
         :row-style="{ height: '30px' }"
-        @cell-dblclick="cellDbclick()"
+        @cell-dblclick="cellDbclick"
       >
         <el-table-column
           prop="carrierDirection"
@@ -325,42 +325,80 @@ export default {
   },
   methods: {
     cellDbclick(row, column, cell, event) {
-      // console.log('双击')
-      // let page = this.$router.resolve({
-      //   name: 'saleSteelReports',
-      //   query: { id: 0, e: 0 },
-      //   meta: {
-      //     title: '销售钢材报表'
-      //   }
-      // })
-      // window.open(page.href, '_blank')
-      // let filterMap = {
-      //   consigneeNameList: [],
-      //   truckRemarkList: [],
-      //   saleRemarkList: [],
-      //   saleOrderStatusList: [],
-      //   materialSpeList: [],
-      //   addressPlaceList: [],
-      //   orderStatusList: [],
-      //   saleAreaList: [],
-      //   materialNameList: [],
-      //   carrierList: [],
-      //   capacityList: [],
-      //   isContinueList: [],
-      //   spellNumList: []
-      // }
-      // if (column.label.includes('未上报')) {
-      //   filterMap.saleOrderStatusList = ['未上报']
-      //   filterMap.carrierList = [row.carrier]
-      //   filterMap.addressPlaceList = [row.carrierDirection]
-      // }
-      // this.$router.push({
-      //   name: 'saleSteelReports',
-      //   params: {
-      //     data: filterMap,
-      //     headColumnList: ['carrierName']
-      //   }
-      // })
+      let filterMap = {
+        consigneeNameList: [],
+        truckRemarkList: [],
+        saleRemarkList: [],
+        saleOrderStatusList: ['审核'],
+        materialSpeList: [],
+        addressPlaceList:
+          row.carrierDirection === '合计' ? [] : [row.carrierDirection],
+        orderStatusList: [],
+        saleAreaList: [],
+        materialNameList: [],
+        carrierList: row.carrier ? [row.carrier] : [],
+        capacityList: [],
+        isContinueList: [],
+        spellNumList: [],
+        orderStatusActuallyList: [],
+        startTime: this.startTime,
+        endTime: new Date(new Date(this.startTime).getTime() + 86400000),
+        steelTransFlag: 1
+      }
+      if (column.label.includes('未上报')) {
+        filterMap.saleOrderStatusList = ['未上报']
+      }
+      if (column.label.includes('保存')) {
+        filterMap.saleOrderStatusList = ['保存']
+      }
+      if (column.label.includes('提交')) {
+        filterMap.saleOrderStatusList = ['提交']
+      }
+      if (column.label.includes('审核')) {
+        filterMap.saleOrderStatusList = ['审核']
+      }
+      if (column.label.includes('未派发')) {
+        filterMap.orderStatusList = ['未派发']
+      }
+      if (column.label.includes('已安排')) {
+        filterMap.orderStatusList = [
+          '已完成',
+          '已出厂',
+          '已进厂',
+          '排队中',
+          '已接单',
+          '已派单'
+        ]
+      }
+      if (column.label.includes('未接收')) {
+        filterMap.orderStatusList = ['已派单']
+        // filterMap.orderStatusActuallyList = ['已派单']
+      }
+      if (column.label.includes('已接单')) {
+        filterMap.orderStatusList = ['已接单']
+      }
+      if (column.label.includes('已进厂')) {
+        filterMap.orderStatusList = ['已进厂']
+      }
+      if (column.label.includes('排队中')) {
+        filterMap.orderStatusList = ['排队中']
+      }
+      if (column.label.includes('已出厂')) {
+        filterMap.orderStatusList = ['已出厂']
+      }
+      if (column.label.includes('已完成')) {
+        filterMap.orderStatusList = ['已完成']
+      }
+      let page = this.$router.resolve({
+        name: 'saleSteelReports',
+        query: {
+          str: JSON.stringify(filterMap)
+        },
+        meta: {
+          title: '销售钢材报表'
+        }
+      })
+      window.open(page.href, '_blank')
     },
     showSummariesPosition() {
       // const table = document.querySelector('.main')

+ 44 - 10
src/views/statisticalReport/components/salesLogisticsStatistics/yawnReport.vue

@@ -253,6 +253,38 @@ export default {
     }
   },
   methods: {
+    cellDbclick(row, column, cell, event) {
+      let filterMap = {
+        consigneeNameList: [],
+        truckRemarkList: [],
+        saleRemarkList: [],
+        saleOrderStatusList: [],
+        materialSpeList: [],
+        addressPlaceList: [],
+        orderStatusList: [],
+        saleAreaList: [],
+        materialNameList: [],
+        carrierList: row.carrier ? [row.carrier] : [],
+        capacityList: [],
+        isContinueList: [],
+        spellNumList: [],
+        orderStatusActuallyList: [],
+        startTime: this.startTime,
+        endTime: this.startTime
+        // steelTransFlag: 1
+      }
+
+      let page = this.$router.resolve({
+        name: 'saleSteelReports',
+        query: {
+          str: JSON.stringify(filterMap)
+        },
+        meta: {
+          title: '销售钢材报表'
+        }
+      })
+      window.open(page.href, '_blank')
+    },
     returnClassName({ row, column, rowIndex, columnIndex }) {
       if (row.flag == 1) {
         console.log(row.carrierName)
@@ -350,21 +382,23 @@ export default {
               countRow.queueNum += item.queueNum
               countRow.enFactoryNum += item.enFactoryNum
               countRow.totalNet =
-                (countRow.totalNet * 1000 + item.totalNet * 1000) / 1000
+                (countRow.totalNet * 10000 + item.totalNet * 10000) / 10000
               countRow.materialThoWeight =
-                (countRow.materialThoWeight * 1000 +
-                  item.materialThoWeight * 1000) /
-                1000
+                (countRow.materialThoWeight * 10000 +
+                  item.materialThoWeight * 10000) /
+                10000
 
               countRow.unloadThoWeight =
-                (countRow.unloadThoWeight * 1000 +
-                  item.unloadThoWeight * 1000) /
-                1000
+                (countRow.unloadThoWeight * 10000 +
+                  item.unloadThoWeight * 10000) /
+                10000
               countRow.trainWeight =
-                (item.trainWeight * 1000 + countRow.trainWeight * 1000) / 1000
+                (item.trainWeight * 10000 + countRow.trainWeight * 10000) /
+                10000
               countRow.trainThoWeight =
-                (item.trainThoWeight * 1000 + countRow.trainThoWeight * 1000) /
-                1000
+                (item.trainThoWeight * 10000 +
+                  countRow.trainThoWeight * 10000) /
+                10000
             }
           })
           if (countRow.planNum) {