luobang hace 2 años
padre
commit
bdc176b929

+ 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', 'appoint']
+let devModules = ['all']
 
 // let devModules = ['index', 'ADMINISTRATORS']
 

+ 31 - 31
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue

@@ -48,14 +48,14 @@
 </template>
 
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       input: null,
       option: {
         requestUrl:
-          "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=null&endTime=null&i=" +
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=null&endTime=null&i=' +
           new Date()
       },
       startTime: null,
@@ -64,67 +64,67 @@ export default {
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
-      tableTitle: "采购燃料新区统计报表"
-    };
+      tableTitle: '采购燃料新区统计报表'
+    }
   },
   methods: {
     refresh() {
-      this.$router.go(0);
+      this.$router.go(0)
     },
     func(res) {
-      console.log(res);
-      var resultNetWeightTotal = 0;
+      console.log(res)
+      var resultNetWeightTotal = 0
       res.list.forEach(e => {
-        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
-      });
-      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t";
-      this.totalCapacity = res.total;
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight
+      })
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + ' t'
+      this.totalCapacity = res.total
       //获取总记录条数作为合计车数
       // this.totalCapacity = res.total;
-      this.isKuang = false;
+      this.isKuang = false
     },
     onclick() {
-      let startTime = null;
-      let endTime = null;
+      let startTime = null
+      let endTime = null
       if (this.startTime) {
-        startTime = sjTime(this.startTime);
+        startTime = sjTime(this.startTime)
       }
       if (this.endTime) {
-        endTime = sjTime(this.endTime);
+        endTime = sjTime(this.endTime)
       }
       if (startTime && endTime) {
         if (startTime < endTime) {
           this.option.requestUrl =
-            "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=" +
+            '/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&con=" +
+            '&con=' +
             this.input +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         } else {
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始时间要比结束时间早");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始时间要比结束时间早')
         }
       } else {
         this.option.requestUrl =
-          "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=" +
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=' +
           startTime +
-          "&endTime=" +
+          '&endTime=' +
           endTime +
-          "&con=" +
+          '&con=' +
           this.input +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
       }
     }
   }
-};
+}
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 .purchasFuelNewMonitor {
   .frameCalculation {
     width: 100%;

+ 31 - 31
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelOldMonitor.vue

@@ -47,14 +47,14 @@
 </template>
 
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       input: null,
       option: {
         requestUrl:
-          "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=null&endTime=null&i=" +
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=null&endTime=null&i=' +
           new Date()
       },
       startTime: null,
@@ -63,67 +63,67 @@ export default {
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
-      tableTitle: "采购燃料老区统计报表"
-    };
+      tableTitle: '采购燃料老区统计报表'
+    }
   },
   methods: {
     refresh() {
-      this.$router.go(0);
+      this.$router.go(0)
     },
     func(res) {
-      console.log(res);
-      var resultNetWeightTotal = 0;
+      console.log(res)
+      var resultNetWeightTotal = 0
       res.list.forEach(e => {
-        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
-      });
-      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t";
-      this.totalCapacity = res.total;
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight
+      })
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + ' t'
+      this.totalCapacity = res.total
       //获取总记录条数作为合计车数
       // this.totalCapacity = res.total;
-      this.isKuang = false;
+      this.isKuang = false
     },
     onclick() {
-      let startTime = null;
-      let endTime = null;
+      let startTime = null
+      let endTime = null
       if (this.startTime) {
-        startTime = sjTime(this.startTime);
+        startTime = sjTime(this.startTime)
       }
       if (this.endTime) {
-        endTime = sjTime(this.endTime);
+        endTime = sjTime(this.endTime)
       }
       if (startTime && endTime) {
         if (startTime < endTime) {
           this.option.requestUrl =
-            "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=" +
+            '/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&con=" +
+            '&con=' +
             this.input +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         } else {
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始时间要比结束时间早");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始时间要比结束时间早')
         }
       } else {
         this.option.requestUrl =
-          "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=" +
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=' +
           startTime +
-          "&con=" +
+          '&con=' +
           this.input +
-          "&endTime=" +
+          '&endTime=' +
           endTime +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
       }
     }
   }
-};
+}
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 .purchasFuelOldMonitor {
   .frameCalculation {
     width: 100%;

+ 155 - 55
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1,6 +1,6 @@
 //钢材统计报表
 <template>
-  <div class="purchasFuelNewMonitor">
+  <div class="saleSteelReports">
     <div class="tableTop">
       <el-form :inline="true" style="margin-top :5px">
         <el-form-item>
@@ -186,8 +186,9 @@
       >
         <el-table-column
           type="selection"
-          width="30"
+          width="50"
           label="选择"
+          align="center"
           v-if="
             !notRoutList.includes('select') ||
               !columnNoRoutList.includes('选择')
@@ -328,6 +329,7 @@
           sortable
           column-key="addressPlace"
           :filters="filteraddressPlace"
+          show-overflow-tooltip
           v-if="!columnNoRoutList.includes('收货地址')"
         >
         </el-table-column>
@@ -529,6 +531,7 @@
           label="发货单位"
           width="170px"
           align="center"
+          show-overflow-tooltip
           v-if="!columnNoRoutList.includes('发货单位')"
         >
         </el-table-column>
@@ -1813,6 +1816,52 @@ export default {
       downloadCapacityNo: null,
       batchCarrierList: [],
       columnNoRoutList: [],
+      salerExportExcelList: [
+        '订单日期',
+        '客户',
+        '物资名称',
+        '物资规格',
+        '物资件数',
+        '理重',
+        '净重',
+        '收货地址',
+        '收货客户电话',
+        '摘要',
+        '备注',
+        '车牌号',
+        '司机电话',
+        '制单日期',
+        '销售订单状态',
+        '运单状态',
+        '承运商',
+        '排队开始时间',
+        '钢材科放行时间',
+        '进厂时间',
+        '皮重时间',
+        '皮重',
+        '装货时间',
+        '毛重时间',
+        '毛重',
+        '送货单打印',
+        '出厂时间',
+        '短信发送',
+        '抵达地址',
+        '抵达时间',
+        '签收地址',
+        '签收时间',
+        '实际运价',
+        '实际运费',
+        '异地库接收标志',
+        '运输订单号',
+        '业务员',
+        '发货单位',
+        '是否自提',
+        '销售订单号',
+        '金蝶分录ID',
+        '订单变更时间',
+        '销售订单变更记录',
+        '运输订单变更记录'
+      ],
       ops: {
         vuescroll: {},
         scrollPanel: {},
@@ -1903,31 +1952,33 @@ export default {
       deep: true,
       handler(val) {
         this.$nextTick(() => {
-          if (
-            val >=
-            this.tableData.length * 30 -
-              document.querySelector('.el-table__body-wrapper').offsetHeight -
-              30
-          ) {
-            console.log('val', val)
-            val =
+          //   debugger
+          if (val >= 0 && this.tableData.length > this.visibleList.length) {
+            if (
+              val >=
               this.tableData.length * 30 -
-              document.querySelector('.el-table__body-wrapper').offsetHeight -
-              20
-          }
-          if (val <= 0) {
-            val = 0
+                document.querySelector('.el-table__body-wrapper').offsetHeight -
+                20
+            ) {
+              val =
+                this.tableData.length * 30 -
+                document.querySelector('.el-table__body-wrapper').offsetHeight
+            }
+            if (val <= 0) {
+              val = 0
+            }
+            const start = Math.floor(val / this.itemHeight)
+            this.visibleList = this.tableData.slice(
+              start,
+              start + Math.floor(this.maxHeight / this.itemHeight) + 1
+            )
+            this.getSpanArr(this.visibleList)
+            document.querySelector(
+              '.el-table__body-wrapper .el-table__body'
+            ).style.transform = `translateY(${val}px)`
+
+            this.debounceS = false
           }
-          console.log(val, 'val')
-          const start = Math.floor(val / this.itemHeight)
-          this.visibleList = this.tableData.slice(
-            start,
-            start + Math.floor(this.maxHeight / this.itemHeight) + 1
-          )
-          this.getSpanArr(this.visibleList)
-          document.querySelector(
-            '.el-table__body-wrapper .el-table__body'
-          ).style.transform = `translateY(${val}px)`
         })
       }
     }
@@ -1950,14 +2001,16 @@ export default {
       if (this.debounceS) return
       this.debounceS = true
       this.scrollTop = e.target.scrollTop
-      console.log(
-        document.querySelector('.el-table__body-wrapper .el-table__body').style
-          .transform,
-        'yyyyy'
-      )
-      setTimeout(() => {
-        this.debounceS = false
-      }, 60)
+      let upDownLenght = this.scrollTop - this.scrollTopUpDownLenght
+      // if (upDownLenght < 0) {
+      //   setTimeout(() => {
+      //     this.debounceS = false
+      //   }, 40)
+      // } else {
+      //   setTimeout(() => {
+      //     this.debounceS = false
+      //   }, 80)
+      // }
       // document.querySelector(
       //   '.el-table__body-wrapper .el-table__body'
       // ).style.transform = `translateY(0px)`
@@ -2917,7 +2970,6 @@ export default {
       this.tableRowIndex = row.group
       this.isRowClick = 1
       this.steelMap = row
-      this.$refs.tableRef.toggleRowSelection(row)
     },
     tableRowClassName({ row, rowIndex }) {
       if (row.group == this.tableRowIndex && this.tableRowIndex !== '') {
@@ -2999,7 +3051,7 @@ export default {
     //筛选客户
     //点击操作弹出框
     operation(row) {
-      this.isRowClick = 0
+      // this.isRowClick = 0
       if (Object.values(this.steelMap).length == 0) {
         this.$message.error('请点击需要执行更改操作的行!')
         return
@@ -3118,17 +3170,43 @@ export default {
       var title = this.tableTitle
       let tHeader = []
       let filterVal = []
-      console.log(this.$refs.tableRef)
-      this.$refs.tableRef.$children.forEach(item => {
-        if (item.label != undefined && item.prop != undefined) {
-          if (tHeader.indexOf(item.label) === -1) {
-            tHeader.push(item.label)
+      if (
+        getCookie('orgCode') == 'shouhuokehu' ||
+        getCookie('orgCode') == 'xiaoshouyewuyuan'
+      ) {
+        tHeader = []
+        filterVal = []
+        let tHeader1 = this.salerExportExcelList.filter(e => {
+          if (this.columnNoRoutList.indexOf(e) == -1) {
+            return e
           }
-          if (filterVal.indexOf(item.prop) === -1) {
-            filterVal.push(item.prop)
+        })
+        console.log(tHeader1)
+        let arr = this.$refs.tableRef.$children
+        for (var i = 0; i < tHeader1.length; i++) {
+          for (var j = 0; j < arr.length; j++) {
+            if (arr[j].label === tHeader1[i]) {
+              if (tHeader.indexOf(arr[j].label) === -1) {
+                tHeader.push(arr[j].label)
+              }
+              if (filterVal.indexOf(arr[j].prop) === -1) {
+                filterVal.push(arr[j].prop)
+              }
+            }
           }
         }
-      })
+      } else {
+        this.$refs.tableRef.$children.forEach(item => {
+          if (item.label != undefined && item.prop != undefined) {
+            if (tHeader.indexOf(item.label) === -1) {
+              tHeader.push(item.label)
+            }
+            if (filterVal.indexOf(item.prop) === -1) {
+              filterVal.push(item.prop)
+            }
+          }
+        })
+      }
       this.downloadLoading = true
       require.ensure([], () => {
         const {
@@ -3687,12 +3765,15 @@ export default {
       for (var i = 0; i < data.length; i++) {
         if (i === 0) {
           data[i].group = i
+          data[i].rowKey = i
         } else {
           // 判断当前元素与上一个元素是否相同
           if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
             data[i].group = data[i - 1].group
+            data[i].rowKey = i
           } else {
             data[i].group = data[i - 1].group + 1
+            data[i].rowKey = i
           }
         }
       }
@@ -3931,20 +4012,18 @@ export default {
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
-          console.log(this.visibleList)
-          console.log(this.maxHeight, 'this.maxHeight')
           loading.close()
           console.log(this.visibleList, 'this.visibleList')
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
-          console.log(this.maxHeight, 'this.maxHeight')
           this.maxHeight = window.innerHeight - 130
-          console.log(this.maxHeight, 'this.maxHeight')
           loading.close()
         })
     },
     //重新获取表格数据
     refresh() {
+      this.filterMap = {}
+      this.visibleList = []
       this.getSteelReport()
     },
     //获取钢材统计报表
@@ -3955,7 +4034,7 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(0, 0, 0, 0.7)'
       })
-      this.isRowClick = 0
+      // this.isRowClick = 0
       let startTime = null
       let endTime = null
       let carrierSsoId = null
@@ -4028,16 +4107,37 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data
+          if (
+            getCookie('orgCode') == 'shouhuokehu' &&
+            this.tableData[0].isGcKeHu == '0'
+          ) {
+            this.columnNoRoutList = this.columnNoRoutList.filter(e => {
+              return e != '净重'
+            })
+          }
           this.totalHeight += this.itemHeight
-          this.visibleList = []
+          // this.visibleList = []
           this.maxHeight = window.innerHeight - 130
           this.getNodeNum(this.tableData)
-          this.visibleList = this.tableData.slice(
-            0,
-            Math.floor(this.maxHeight / this.itemHeight) + 1
-          )
+          if (
+            this.visibleList.length != 0 &&
+            this.visibleList.length < this.tableData.length
+          ) {
+            let visSaleIds = this.visibleList.map(e => {
+              return e.saleOrderMaterialId
+            })
+            this.visibleList = this.tableData.filter(e => {
+              if (visSaleIds.indexOf(e.saleOrderMaterialId) != -1) {
+                return e
+              }
+            })
+          } else {
+            this.visibleList = this.tableData.slice(
+              0,
+              Math.floor(this.maxHeight / this.itemHeight) + 1
+            )
+          }
           this.getSpanArr(this.visibleList)
-          console.log(this.visibleList)
           this.getTotalNum(this.tableData)
           loading.close()
         })
@@ -4051,7 +4151,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.purchasFuelNewMonitor {
+.saleSteelReports {
   .tableTop {
     margin-left: 20px;
     margin-top: 20px;