luobang 2 år sedan
förälder
incheckning
92e0c3c4b2

+ 1 - 1
build/utils.js

@@ -20,7 +20,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 // let devModules = ['index', 'inward']
 // let devModules = ['index', 'inward']
 let devModules = ['all']
 let devModules = ['all']
 
 
-// let devModules = ['index', 'statisticalReport']
+// let devModules = ['index', 'statisticalReport', 'WMS']
 
 
 if (pathSrc.indexOf('node_modules') > -1) {
 if (pathSrc.indexOf('node_modules') > -1) {
   devModules = require('../../../cors.js').devModules
   devModules = require('../../../cors.js').devModules

+ 102 - 92
src/views/WMS/components/steel/bar1_steel/bar1_steel_inboundStatistics.vue

@@ -41,59 +41,69 @@
       </el-input>
       </el-input>
     </div>
     </div>
     <div class="table">
     <div class="table">
-      <dilTable v-bind.sync="options" @func="func" :rowClassName="rowClassName">
+      <dilTable
+        v-bind.sync="options"
+        @func="func"
+        :rowClassName="rowClassName"
+        :pageSize="pageSize"
+        :shiyHeigth="shiyHeigth"
+        :isHeigth="isHeigth"
+      >
       </dilTable>
       </dilTable>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
       rowClassName({ row, rowIndex }) {
       rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
         if (rowIndex === 0) {
-          return "success-row";
+          return 'success-row'
         }
         }
-        return "";
+        return ''
       },
       },
-      input1: "",
-      input2: "",
-      input3: "",
-      input4: "",
-      input5: "",
-      inputText: "",
+      input1: '',
+      input2: '',
+      input3: '',
+      input4: '',
+      input5: '',
+      inputText: '',
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
-      region: "0",
+      pageSize: 100,
+      shiyHeigth: 140,
+      isHeigth: true,
+      region: '0',
       options: {
       options: {
         // first请求数据的地址
         // first请求数据的地址
         requestUrl:
         requestUrl:
-          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 1
+          '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=' + 1
         // selectionType: "select",
         // selectionType: "select",
         // mapList: [],
         // mapList: [],
       }
       }
-    };
+    }
   },
   },
   created() {
   created() {
-    console.log(this.options.data);
+    console.log(this.options.data)
   },
   },
   methods: {
   methods: {
     func(res) {
     func(res) {
       // console.log(res.list[0])
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       // this.input1 = this.input1 + e.furnaceNumber1,
-      let num1 = 0;
-      let num2 = 0;
+      let num1 = 0
+      let num2 = 0
       res.list.forEach(e => {
       res.list.forEach(e => {
-        console.log(e);
-        console.log(e.count);
-        console.log(e.weight);
-        (num1 = num1 + e.count), (num2 = num2 + e.weight);
-      });
-      this.input3 = num1;
-      this.input4 = (num2 / 1000).toFixed(3);
+        console.log(e)
+        console.log(e.count)
+        console.log(e.weight)
+        ;(num1 = num1 + e.count), (num2 = num2 + e.weight)
+      })
+      this.input3 = num1
+      this.input4 = (num2 / 1000).toFixed(3)
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
       // this.input3 = res.list[0].count,
@@ -105,14 +115,14 @@ export default {
     // },
     // },
     // 获取当前月份的最后一天
     // 获取当前月份的最后一天
     getdaysinmonth(year, month) {
     getdaysinmonth(year, month) {
-      month = parseInt(month, 10) + 1;
-      let days = 0;
-      month = month - 1;
-      console.log("othermonth" + month);
-      console.log("otheryear" + year);
+      month = parseInt(month, 10) + 1
+      let days = 0
+      month = month - 1
+      console.log('othermonth' + month)
+      console.log('otheryear' + year)
       // 根据月份获取对应的天数
       // 根据月份获取对应的天数
       if (month == 2) {
       if (month == 2) {
-        days = year % 4 == 0 ? 29 : 28;
+        days = year % 4 == 0 ? 29 : 28
       } else if (
       } else if (
         month == 1 ||
         month == 1 ||
         month == 3 ||
         month == 3 ||
@@ -122,47 +132,47 @@ export default {
         month == 10 ||
         month == 10 ||
         month == 12
         month == 12
       ) {
       ) {
-        days = 31;
+        days = 31
       } else {
       } else {
-        days = 30;
+        days = 30
       }
       }
-      console.log("otherdays" + days);
-      return days;
+      console.log('otherdays' + days)
+      return days
     },
     },
     onclick() {
     onclick() {
-      let startTime = null;
-      let endTime = null;
+      let startTime = null
+      let endTime = null
       // 判断用户有没有班次,有班次则提供默认时间
       // 判断用户有没有班次,有班次则提供默认时间
       if (this.region != null) {
       if (this.region != null) {
-        let date = null;
-        let date2 = null;
-        let year = null;
-        let month = null;
-        let day = null;
-        let year2 = null;
-        let month2 = null;
-        let day2 = null;
+        let date = null
+        let date2 = null
+        let year = null
+        let month = null
+        let day = null
+        let year2 = null
+        let month2 = null
+        let day2 = null
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
         if (this.startTime != null) {
         if (this.startTime != null) {
-          date = this.startTime;
+          date = this.startTime
           // 判断当前开始时间是标准时间还是字符串时间
           // 判断当前开始时间是标准时间还是字符串时间
 
 
-          year = date.getFullYear(); // 年
-          month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日
+          year = date.getFullYear() // 年
+          month = date.getMonth() + 1 // 月
+          day = date.getDate() // 日
         }
         }
         if (this.endTime != null) {
         if (this.endTime != null) {
-          date2 = this.endTime;
-          year2 = date2.getFullYear(); // 年
-          month2 = date2.getMonth() + 1; // 月
-          day2 = date2.getDate(); // 日 // 日
+          date2 = this.endTime
+          year2 = date2.getFullYear() // 年
+          month2 = date2.getMonth() + 1 // 月
+          day2 = date2.getDate() // 日 // 日
         }
         }
         if (this.startTime == null && this.endTime == null) {
         if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           // 获取当前的日期时间
-          date = new Date();
-          year = date.getFullYear(); // 年
-          month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日
+          date = new Date()
+          year = date.getFullYear() // 年
+          month = date.getMonth() + 1 // 月
+          day = date.getDate() // 日
         }
         }
         // 判断开始日期和结束日期是否是同一天
         // 判断开始日期和结束日期是否是同一天
         if (
         if (
@@ -171,83 +181,83 @@ export default {
           this.region == null
           this.region == null
         ) {
         ) {
           // 当不是同一天的时候,直接弹窗警告
           // 当不是同一天的时候,直接弹窗警告
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始日期和结束日期不是同一天");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始日期和结束日期不是同一天')
         }
         }
         // 判断当前用户选择的具体班次
         // 判断当前用户选择的具体班次
         if (this.region == 0) {
         if (this.region == 0) {
-          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '00:00:00'
           // 将结束时间加一
           // 将结束时间加一
-          day = parseInt(day) + 1;
-          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+          day = parseInt(day) + 1
+          this.endTime = year + '-' + month + '-' + day + ' ' + '00:00:00'
         } else if (this.region == 1) {
         } else if (this.region == 1) {
-          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
-          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '08:00:00'
+          this.endTime = year + '-' + month + '-' + day + ' ' + '16:00:00'
         } else if (this.region == 2) {
         } else if (this.region == 2) {
-          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
-          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '16:00:00'
+          this.endTime = year + '-' + month + '-' + day + ' ' + '24:00:00'
         } else if (this.region == 3) {
         } else if (this.region == 3) {
-          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + '-' + month + '-' + day + ' ' + '08:00:00'
           // 判断开始日期和结束日期是否跨月份了
           // 判断开始日期和结束日期是否跨月份了
           if (month != month2) {
           if (month != month2) {
-            month = parseInt(month) - 1;
+            month = parseInt(month) - 1
             // 获取前一个月份的最后一天
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year, month);
+            day = this.$options.methods.getdaysinmonth(year, month)
           } else {
           } else {
             // 将开始时间减一
             // 将开始时间减一
-            day = parseInt(day) - 1;
+            day = parseInt(day) - 1
           }
           }
-          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '24:00:00'
         }
         }
-        this.startTime = new Date(this.startTime);
-        this.endTime = new Date(this.endTime);
-        console.log(this.startTime + "开始时间");
-        console.log(this.endTime + "结束时间");
+        this.startTime = new Date(this.startTime)
+        this.endTime = new Date(this.endTime)
+        console.log(this.startTime + '开始时间')
+        console.log(this.endTime + '结束时间')
         // 将拼接好的日期转换为时间戳
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime);
-        endTime = Date.parse(this.endTime);
-        console.log(startTime + "开始时间2");
-        console.log(endTime + "结束时间2");
+        startTime = Date.parse(this.startTime)
+        endTime = Date.parse(this.endTime)
+        console.log(startTime + '开始时间2')
+        console.log(endTime + '结束时间2')
       } else {
       } else {
         if (this.startTime) {
         if (this.startTime) {
-          startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime)
         }
         }
         if (this.endTime) {
         if (this.endTime) {
-          endTime = sjTime(this.endTime);
+          endTime = sjTime(this.endTime)
         }
         }
       }
       }
       if (startTime && endTime) {
       if (startTime && endTime) {
         if (startTime < endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           this.options.requestUrl =
           this.options.requestUrl =
-            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=' +
             1 +
             1 +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
           // }else{
           // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
           // }
         } else {
         } else {
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始时间要比结束时间早");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始时间要比结束时间早')
         }
         }
       } else {
       } else {
-        this.getRequestUrl();
+        this.getRequestUrl()
       }
       }
     },
     },
     selectionChange(selection) {
     selectionChange(selection) {
-      this.options.mapList = selection;
+      this.options.mapList = selection
     }
     }
   }
   }
-};
+}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 102 - 92
src/views/WMS/components/steel/bar2_steel/bar2_steel_inboundStatistics.vue

@@ -41,59 +41,69 @@
       </el-input>
       </el-input>
     </div>
     </div>
     <div class="table">
     <div class="table">
-      <dilTable v-bind.sync="options" @func="func" :rowClassName="rowClassName">
+      <dilTable
+        v-bind.sync="options"
+        @func="func"
+        :rowClassName="rowClassName"
+        :pageSize="pageSize"
+        :shiyHeigth="shiyHeigth"
+        :isHeigth="isHeigth"
+      >
       </dilTable>
       </dilTable>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
       rowClassName({ row, rowIndex }) {
       rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
         if (rowIndex === 0) {
-          return "success-row";
+          return 'success-row'
         }
         }
-        return "";
+        return ''
       },
       },
-      input1: "",
-      input2: "",
-      input3: "",
-      input4: "",
-      input5: "",
-      inputText: "",
+      input1: '',
+      input2: '',
+      input3: '',
+      input4: '',
+      input5: '',
+      inputText: '',
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
-      region: "0",
+      region: '0',
+      pageSize: 100,
+      shiyHeigth: 140,
+      isHeigth: true,
       options: {
       options: {
         // first请求数据的地址
         // first请求数据的地址
         requestUrl:
         requestUrl:
-          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 2
+          '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=' + 2
         // selectionType: "select",
         // selectionType: "select",
         // mapList: [],
         // mapList: [],
       }
       }
-    };
+    }
   },
   },
   created() {
   created() {
-    console.log(this.options.data);
+    console.log(this.options.data)
   },
   },
   methods: {
   methods: {
     func(res) {
     func(res) {
       // console.log(res.list[0])
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       // this.input1 = this.input1 + e.furnaceNumber1,
-      let num1 = 0;
-      let num2 = 0;
+      let num1 = 0
+      let num2 = 0
       res.list.forEach(e => {
       res.list.forEach(e => {
-        console.log(e);
-        console.log(e.count);
-        console.log(e.weight);
-        (num1 = num1 + e.count), (num2 = num2 + e.weight);
-      });
-      this.input3 = num1;
-      this.input4 = (num2 / 1000).toFixed(3);
+        console.log(e)
+        console.log(e.count)
+        console.log(e.weight)
+        ;(num1 = num1 + e.count), (num2 = num2 + e.weight)
+      })
+      this.input3 = num1
+      this.input4 = (num2 / 1000).toFixed(3)
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
       // this.input3 = res.list[0].count,
@@ -105,14 +115,14 @@ export default {
     // },
     // },
     // 获取当前月份的最后一天
     // 获取当前月份的最后一天
     getdaysinmonth(year, month) {
     getdaysinmonth(year, month) {
-      month = parseInt(month, 10) + 1;
-      let days = 0;
-      month = month - 1;
-      console.log("othermonth" + month);
-      console.log("otheryear" + year);
+      month = parseInt(month, 10) + 1
+      let days = 0
+      month = month - 1
+      console.log('othermonth' + month)
+      console.log('otheryear' + year)
       // 根据月份获取对应的天数
       // 根据月份获取对应的天数
       if (month == 2) {
       if (month == 2) {
-        days = year % 4 == 0 ? 29 : 28;
+        days = year % 4 == 0 ? 29 : 28
       } else if (
       } else if (
         month == 1 ||
         month == 1 ||
         month == 3 ||
         month == 3 ||
@@ -122,47 +132,47 @@ export default {
         month == 10 ||
         month == 10 ||
         month == 12
         month == 12
       ) {
       ) {
-        days = 31;
+        days = 31
       } else {
       } else {
-        days = 30;
+        days = 30
       }
       }
-      console.log("otherdays" + days);
-      return days;
+      console.log('otherdays' + days)
+      return days
     },
     },
     onclick() {
     onclick() {
-      let startTime = null;
-      let endTime = null;
+      let startTime = null
+      let endTime = null
       // 判断用户有没有班次,有班次则提供默认时间
       // 判断用户有没有班次,有班次则提供默认时间
       if (this.region != null) {
       if (this.region != null) {
-        let date = null;
-        let date2 = null;
-        let year = null;
-        let month = null;
-        let day = null;
-        let year2 = null;
-        let month2 = null;
-        let day2 = null;
+        let date = null
+        let date2 = null
+        let year = null
+        let month = null
+        let day = null
+        let year2 = null
+        let month2 = null
+        let day2 = null
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
         if (this.startTime != null) {
         if (this.startTime != null) {
-          date = this.startTime;
+          date = this.startTime
           // 判断当前开始时间是标准时间还是字符串时间
           // 判断当前开始时间是标准时间还是字符串时间
 
 
-          year = date.getFullYear(); // 年
-          month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日
+          year = date.getFullYear() // 年
+          month = date.getMonth() + 1 // 月
+          day = date.getDate() // 日
         }
         }
         if (this.endTime != null) {
         if (this.endTime != null) {
-          date2 = this.endTime;
-          year2 = date2.getFullYear(); // 年
-          month2 = date2.getMonth() + 1; // 月
-          day2 = date2.getDate(); // 日 // 日
+          date2 = this.endTime
+          year2 = date2.getFullYear() // 年
+          month2 = date2.getMonth() + 1 // 月
+          day2 = date2.getDate() // 日 // 日
         }
         }
         if (this.startTime == null && this.endTime == null) {
         if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           // 获取当前的日期时间
-          date = new Date();
-          year = date.getFullYear(); // 年
-          month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日
+          date = new Date()
+          year = date.getFullYear() // 年
+          month = date.getMonth() + 1 // 月
+          day = date.getDate() // 日
         }
         }
         // 判断开始日期和结束日期是否是同一天
         // 判断开始日期和结束日期是否是同一天
         if (
         if (
@@ -171,83 +181,83 @@ export default {
           this.region == null
           this.region == null
         ) {
         ) {
           // 当不是同一天的时候,直接弹窗警告
           // 当不是同一天的时候,直接弹窗警告
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始日期和结束日期不是同一天");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始日期和结束日期不是同一天')
         }
         }
         // 判断当前用户选择的具体班次
         // 判断当前用户选择的具体班次
         if (this.region == 0) {
         if (this.region == 0) {
-          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '00:00:00'
           // 将结束时间加一
           // 将结束时间加一
-          day = parseInt(day) + 1;
-          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+          day = parseInt(day) + 1
+          this.endTime = year + '-' + month + '-' + day + ' ' + '00:00:00'
         } else if (this.region == 1) {
         } else if (this.region == 1) {
-          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
-          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '08:00:00'
+          this.endTime = year + '-' + month + '-' + day + ' ' + '16:00:00'
         } else if (this.region == 2) {
         } else if (this.region == 2) {
-          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
-          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '16:00:00'
+          this.endTime = year + '-' + month + '-' + day + ' ' + '24:00:00'
         } else if (this.region == 3) {
         } else if (this.region == 3) {
-          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + '-' + month + '-' + day + ' ' + '08:00:00'
           // 判断开始日期和结束日期是否跨月份了
           // 判断开始日期和结束日期是否跨月份了
           if (month != month2) {
           if (month != month2) {
-            month = parseInt(month) - 1;
+            month = parseInt(month) - 1
             // 获取前一个月份的最后一天
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year, month);
+            day = this.$options.methods.getdaysinmonth(year, month)
           } else {
           } else {
             // 将开始时间减一
             // 将开始时间减一
-            day = parseInt(day) - 1;
+            day = parseInt(day) - 1
           }
           }
-          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '24:00:00'
         }
         }
-        this.startTime = new Date(this.startTime);
-        this.endTime = new Date(this.endTime);
-        console.log(this.startTime + "开始时间");
-        console.log(this.endTime + "结束时间");
+        this.startTime = new Date(this.startTime)
+        this.endTime = new Date(this.endTime)
+        console.log(this.startTime + '开始时间')
+        console.log(this.endTime + '结束时间')
         // 将拼接好的日期转换为时间戳
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime);
-        endTime = Date.parse(this.endTime);
-        console.log(startTime + "开始时间2");
-        console.log(endTime + "结束时间2");
+        startTime = Date.parse(this.startTime)
+        endTime = Date.parse(this.endTime)
+        console.log(startTime + '开始时间2')
+        console.log(endTime + '结束时间2')
       } else {
       } else {
         if (this.startTime) {
         if (this.startTime) {
-          startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime)
         }
         }
         if (this.endTime) {
         if (this.endTime) {
-          endTime = sjTime(this.endTime);
+          endTime = sjTime(this.endTime)
         }
         }
       }
       }
       if (startTime && endTime) {
       if (startTime && endTime) {
         if (startTime < endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           this.options.requestUrl =
           this.options.requestUrl =
-            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=' +
             2 +
             2 +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
           // }else{
           // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
           // }
         } else {
         } else {
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始时间要比结束时间早");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始时间要比结束时间早')
         }
         }
       } else {
       } else {
-        this.getRequestUrl();
+        this.getRequestUrl()
       }
       }
     },
     },
     selectionChange(selection) {
     selectionChange(selection) {
-      this.options.mapList = selection;
+      this.options.mapList = selection
     }
     }
   }
   }
-};
+}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 102 - 92
src/views/WMS/components/steel/steel_inboundStatistics.vue

@@ -41,60 +41,70 @@
       </el-input>
       </el-input>
     </div>
     </div>
     <div class="table">
     <div class="table">
-      <dilTable v-bind.sync="options" @func="func" :rowClassName="rowClassName">
+      <dilTable
+        v-bind.sync="options"
+        @func="func"
+        :rowClassName="rowClassName"
+        :pageSize="pageSize"
+        :shiyHeigth="shiyHeigth"
+        :isHeigth="isHeigth"
+      >
       </dilTable>
       </dilTable>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
       rowClassName({ row, rowIndex }) {
       rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
         if (rowIndex === 0) {
-          return "success-row";
+          return 'success-row'
         }
         }
-        return "";
+        return ''
       },
       },
-      input1: "",
-      input2: "",
-      input3: "",
-      input4: "",
-      input5: "",
-      inputText: "",
+      input1: '',
+      input2: '',
+      input3: '',
+      input4: '',
+      input5: '',
+      inputText: '',
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
-      region: "0",
+      region: '0',
+      pageSize: 100,
+      shiyHeigth: 140,
+      isHeigth: true,
       options: {
       options: {
         // first请求数据的地址
         // first请求数据的地址
         requestUrl:
         requestUrl:
-          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 3
+          '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=' + 3
         // selectionType: "select",
         // selectionType: "select",
         // mapList: [],
         // mapList: [],
       }
       }
-    };
+    }
   },
   },
   created() {
   created() {
-    console.log(this.options.data);
+    console.log(this.options.data)
   },
   },
   methods: {
   methods: {
     func(res) {
     func(res) {
       // console.log(res.list[0])
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       // this.input1 = this.input1 + e.furnaceNumber1,
-      let num1 = 0;
-      let num2 = 0;
+      let num1 = 0
+      let num2 = 0
       res.list.forEach(e => {
       res.list.forEach(e => {
-        console.log(e);
-        console.log(e.count);
-        console.log(e.weight);
-        num1 = num1 + e.count;
-        num2 = num2 + e.weight;
-      });
-      this.input3 = num1;
-      this.input4 = (num2 / 1000).toFixed(3);
+        console.log(e)
+        console.log(e.count)
+        console.log(e.weight)
+        num1 = num1 + e.count
+        num2 = num2 + e.weight
+      })
+      this.input3 = num1
+      this.input4 = (num2 / 1000).toFixed(3)
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
       // this.input3 = res.list[0].count,
@@ -106,14 +116,14 @@ export default {
     // },
     // },
     // 获取当前月份的最后一天
     // 获取当前月份的最后一天
     getdaysinmonth(year, month) {
     getdaysinmonth(year, month) {
-      month = parseInt(month, 10) + 1;
-      let days = 0;
-      month = month - 1;
-      console.log("othermonth" + month);
-      console.log("otheryear" + year);
+      month = parseInt(month, 10) + 1
+      let days = 0
+      month = month - 1
+      console.log('othermonth' + month)
+      console.log('otheryear' + year)
       // 根据月份获取对应的天数
       // 根据月份获取对应的天数
       if (month == 2) {
       if (month == 2) {
-        days = year % 4 == 0 ? 29 : 28;
+        days = year % 4 == 0 ? 29 : 28
       } else if (
       } else if (
         month == 1 ||
         month == 1 ||
         month == 3 ||
         month == 3 ||
@@ -123,47 +133,47 @@ export default {
         month == 10 ||
         month == 10 ||
         month == 12
         month == 12
       ) {
       ) {
-        days = 31;
+        days = 31
       } else {
       } else {
-        days = 30;
+        days = 30
       }
       }
-      console.log("otherdays" + days);
-      return days;
+      console.log('otherdays' + days)
+      return days
     },
     },
     onclick() {
     onclick() {
-      let startTime = null;
-      let endTime = null;
+      let startTime = null
+      let endTime = null
       // 判断用户有没有班次,有班次则提供默认时间
       // 判断用户有没有班次,有班次则提供默认时间
       if (this.region != null) {
       if (this.region != null) {
-        let date = null;
-        let date2 = null;
-        let year = null;
-        let month = null;
-        let day = null;
-        let year2 = null;
-        let month2 = null;
-        let day2 = null;
+        let date = null
+        let date2 = null
+        let year = null
+        let month = null
+        let day = null
+        let year2 = null
+        let month2 = null
+        let day2 = null
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
         if (this.startTime != null) {
         if (this.startTime != null) {
-          date = this.startTime;
+          date = this.startTime
           // 判断当前开始时间是标准时间还是字符串时间
           // 判断当前开始时间是标准时间还是字符串时间
 
 
-          year = date.getFullYear(); // 年
-          month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日
+          year = date.getFullYear() // 年
+          month = date.getMonth() + 1 // 月
+          day = date.getDate() // 日
         }
         }
         if (this.endTime != null) {
         if (this.endTime != null) {
-          date2 = this.endTime;
-          year2 = date2.getFullYear(); // 年
-          month2 = date2.getMonth() + 1; // 月
-          day2 = date2.getDate(); // 日 // 日
+          date2 = this.endTime
+          year2 = date2.getFullYear() // 年
+          month2 = date2.getMonth() + 1 // 月
+          day2 = date2.getDate() // 日 // 日
         }
         }
         if (this.startTime == null && this.endTime == null) {
         if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           // 获取当前的日期时间
-          date = new Date();
-          year = date.getFullYear(); // 年
-          month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日
+          date = new Date()
+          year = date.getFullYear() // 年
+          month = date.getMonth() + 1 // 月
+          day = date.getDate() // 日
         }
         }
         // 判断开始日期和结束日期是否是同一天
         // 判断开始日期和结束日期是否是同一天
         if (
         if (
@@ -172,81 +182,81 @@ export default {
           this.region == null
           this.region == null
         ) {
         ) {
           // 当不是同一天的时候,直接弹窗警告
           // 当不是同一天的时候,直接弹窗警告
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始日期和结束日期不是同一天");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始日期和结束日期不是同一天')
         }
         }
         // 判断当前用户选择的具体班次
         // 判断当前用户选择的具体班次
         if (this.region == 0) {
         if (this.region == 0) {
-          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '00:00:00'
           // 将结束时间加一
           // 将结束时间加一
-          day = parseInt(day) + 1;
-          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+          day = parseInt(day) + 1
+          this.endTime = year + '-' + month + '-' + day + ' ' + '00:00:00'
         } else if (this.region == 1) {
         } else if (this.region == 1) {
-          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
-          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '08:00:00'
+          this.endTime = year + '-' + month + '-' + day + ' ' + '16:00:00'
         } else if (this.region == 2) {
         } else if (this.region == 2) {
-          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
-          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '16:00:00'
+          this.endTime = year + '-' + month + '-' + day + ' ' + '24:00:00'
         } else if (this.region == 3) {
         } else if (this.region == 3) {
-          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + '-' + month + '-' + day + ' ' + '08:00:00'
           // 判断开始日期和结束日期是否跨月份了
           // 判断开始日期和结束日期是否跨月份了
           if (month != month2) {
           if (month != month2) {
-            month = parseInt(month) - 1;
+            month = parseInt(month) - 1
             // 获取前一个月份的最后一天
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year, month);
+            day = this.$options.methods.getdaysinmonth(year, month)
           } else {
           } else {
             // 将开始时间减一
             // 将开始时间减一
-            day = parseInt(day) - 1;
+            day = parseInt(day) - 1
           }
           }
-          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
+          this.startTime = year + '-' + month + '-' + day + ' ' + '24:00:00'
         }
         }
-        this.startTime = new Date(this.startTime);
-        this.endTime = new Date(this.endTime);
-        console.log(this.startTime + "开始时间");
-        console.log(this.endTime + "结束时间");
+        this.startTime = new Date(this.startTime)
+        this.endTime = new Date(this.endTime)
+        console.log(this.startTime + '开始时间')
+        console.log(this.endTime + '结束时间')
         // 将拼接好的日期转换为时间戳
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime);
-        endTime = Date.parse(this.endTime);
-        console.log(startTime + "开始时间2");
-        console.log(endTime + "结束时间2");
+        startTime = Date.parse(this.startTime)
+        endTime = Date.parse(this.endTime)
+        console.log(startTime + '开始时间2')
+        console.log(endTime + '结束时间2')
       } else {
       } else {
         if (this.startTime) {
         if (this.startTime) {
-          startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime)
         }
         }
         if (this.endTime) {
         if (this.endTime) {
-          endTime = sjTime(this.endTime);
+          endTime = sjTime(this.endTime)
         }
         }
       }
       }
       if (startTime && endTime) {
       if (startTime && endTime) {
         if (startTime < endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           this.options.requestUrl =
           this.options.requestUrl =
-            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=' +
             3 +
             3 +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
           // }else{
           // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
           // }
         } else {
         } else {
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始时间要比结束时间早");
+          this.startTime = null
+          this.endTime = null
+          this.$message.warning('开始时间要比结束时间早')
         }
         }
       }
       }
     },
     },
     selectionChange(selection) {
     selectionChange(selection) {
-      this.options.mapList = selection;
+      this.options.mapList = selection
     }
     }
   }
   }
-};
+}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 272 - 235
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue

@@ -2,11 +2,9 @@
 <template>
 <template>
   <div>
   <div>
     <div class="frameCalculation">
     <div class="frameCalculation">
-      <el-form :inline="true" >
+      <el-form :inline="true">
         <el-form-item>
         <el-form-item>
-          <label style="width: 200px;margin-left: 10px"
-            >计毛时间:</label
-          >
+          <label style="width: 200px;margin-left: 10px">计毛时间:</label>
           <el-date-picker
           <el-date-picker
             v-model="startTime"
             v-model="startTime"
             type="datetime"
             type="datetime"
@@ -21,36 +19,48 @@
           >
           >
           </el-date-picker>
           </el-date-picker>
           <el-form-item>
           <el-form-item>
-             <el-select v-model="condition1" placeholder="请选择筛选条件"  style="width:150px" clearable>
-          <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-          </el-option>
-      </el-select>
-      <el-input
-          placeholder="请输入内容"
-          v-model="input1"
-          style="width:200px"
-          clearable
-      >
-      </el-input>
-      <el-select v-model="condition2" placeholder="请选择筛选条件" style="width:150px" clearable>
-          <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-          </el-option>
-      </el-select>
-      <el-input
-          placeholder="请输入内容"
-          v-model="input2"
-          style="width:200px"
-          clearable
-      >
-      </el-input>
+            <el-select
+              v-model="condition1"
+              placeholder="请选择筛选条件"
+              style="width:150px"
+              clearable
+            >
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <el-input
+              placeholder="请输入内容"
+              v-model="input1"
+              style="width:200px"
+              clearable
+            >
+            </el-input>
+            <el-select
+              v-model="condition2"
+              placeholder="请选择筛选条件"
+              style="width:150px"
+              clearable
+            >
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <el-input
+              placeholder="请输入内容"
+              v-model="input2"
+              style="width:200px"
+              clearable
+            >
+            </el-input>
           </el-form-item>
           </el-form-item>
         </el-form-item>
         </el-form-item>
         <el-button type="primary" class="btn" @click="onclick">
         <el-button type="primary" class="btn" @click="onclick">
@@ -66,7 +76,7 @@
             <i class="el-icon-refresh"></i>
             <i class="el-icon-refresh"></i>
           </el-button>
           </el-button>
         </el-form-item>
         </el-form-item>
-        <el-form-item >
+        <el-form-item>
           <span>合计净重:</span>
           <span>合计净重:</span>
           <el-input
           <el-input
             v-model="totalNumber"
             v-model="totalNumber"
@@ -112,14 +122,32 @@
         @radio-change="selectOne"
         @radio-change="selectOne"
         :pageSize="pageSize"
         :pageSize="pageSize"
       >
       >
-        <el-table-column label="抵达地址" width="150" :show-overflow-tooltip="true">
+        <el-table-column
+          label="抵达地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="showPic(scope.row.arrivalPhoto)">{{scope.row.arrivalAddress}}</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.arrivalPhoto)"
+              >{{ scope.row.arrivalAddress }}</el-button
+            >
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column label="签收地址" width="150" :show-overflow-tooltip="true">
+        <el-table-column
+          label="签收地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button type="text"  size="small" @click="showPic(scope.row.receiptPhoto)">{{scope.row.receiptAddress}}</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.receiptPhoto)"
+              >{{ scope.row.receiptAddress }}</el-button
+            >
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </dilTable>
       </dilTable>
@@ -140,41 +168,34 @@
     </div>
     </div>
     <el-dialog :visible.sync="disvisiable">
     <el-dialog :visible.sync="disvisiable">
       <div class="admin2">
       <div class="admin2">
-              <div class="carrier from">
-                <el-form
-                  :inline="true"
-                  class="demo-form-inline"
-                  label-width="80px"
-                >
-                  <el-form-item label="车牌号:">
-                    <el-autocomplete
-                      class="inline-input"
-                      v-model="capacityName"
-                      :fetch-suggestions="querySearchCapacity"
-                      placeholder="车牌号"
-                      :trigger-on-focus="false"
-                      @select="handleSelectCapacity"
-                    >
-                      <template slot-scope="{ item }">
-                        <div class="name">{{ item.capacityNumber }}</div>
-                      </template>
-                    </el-autocomplete>
-                  </el-form-item>
-                </el-form>
-              </div>
-              <div class="poundNo from">
-                <span class="text">运输订单号:</span>
-                <el-input v-model="orderNumber" disabled></el-input>
-              </div>
-              <div class="button_box">
-                <el-button
-                  type="primary"
-                  @click="updateCanwork"
-                  :disabled="disabled"
-                  >确认</el-button
-                >
-              </div>
-            </div>
+        <div class="carrier from">
+          <el-form :inline="true" class="demo-form-inline" label-width="80px">
+            <el-form-item label="车牌号:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="capacityName"
+                :fetch-suggestions="querySearchCapacity"
+                placeholder="车牌号"
+                :trigger-on-focus="false"
+                @select="handleSelectCapacity"
+              >
+                <template slot-scope="{ item }">
+                  <div class="name">{{ item.capacityNumber }}</div>
+                </template>
+              </el-autocomplete>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="poundNo from">
+          <span class="text">运输订单号:</span>
+          <el-input v-model="orderNumber" disabled></el-input>
+        </div>
+        <div class="button_box">
+          <el-button type="primary" @click="updateCanwork" :disabled="disabled"
+            >确认</el-button
+          >
+        </div>
+      </div>
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
       title="抵达签收"
       title="抵达签收"
@@ -261,13 +282,19 @@
       <img width="100%" :src="dialogImageUrl" alt="" />
       <img width="100%" :src="dialogImageUrl" alt="" />
     </el-dialog>
     </el-dialog>
     <el-dialog title="图片查看" :visible.sync="dialogVisible2" width="80%">
     <el-dialog title="图片查看" :visible.sync="dialogVisible2" width="80%">
-      <img width="100%" v-for="item in picList" :src="item" :key="item" alt="" />
+      <img
+        width="100%"
+        v-for="item in picList"
+        :src="item"
+        :key="item"
+        alt=""
+      />
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
+import { sjTime } from '@/utils/sharedJsFile'
 import { getCookie } from '@/utils/util.js'
 import { getCookie } from '@/utils/util.js'
 import PathView from './mapTest.vue'
 import PathView from './mapTest.vue'
 import currentLocation from './currentLocation.vue'
 import currentLocation from './currentLocation.vue'
@@ -279,33 +306,33 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      condition1:null,
-      condition2:null,
-      input1:null,
-      input2:null,
-      options:[
-          {
-          label:"车牌号",
-          value:"capacityNumber"
-          },
-          {
-          label:"收货单位",
-          value:"receivName"
-          },
-          {
-          label:"物资名称/备注",
-          value:"remark"
-          },
-          {
-          label:"装货地点",
-          value:"wareHouse"
-          }
+      condition1: null,
+      condition2: null,
+      input1: null,
+      input2: null,
+      options: [
+        {
+          label: '车牌号',
+          value: 'capacityNumber'
+        },
+        {
+          label: '收货单位',
+          value: 'receivName'
+        },
+        {
+          label: '物资名称/备注',
+          value: 'remark'
+        },
+        {
+          label: '装货地点',
+          value: 'wareHouse'
+        }
       ],
       ],
       orderNumber: null,
       orderNumber: null,
-      orderId:null,
+      orderId: null,
       disabled: false,
       disabled: false,
-      capacityName:null,
-      disvisiable:false,
+      capacityName: null,
+      disvisiable: false,
       wareHouse: null,
       wareHouse: null,
       inputMaterial: null,
       inputMaterial: null,
       shiyHeigth: 140,
       shiyHeigth: 140,
@@ -313,9 +340,9 @@ export default {
       pageSize: 100,
       pageSize: 100,
       isKuang: false,
       isKuang: false,
       option: {
       option: {
-        requestUrl: "",
-        selectionType:"radio",
-        requestQuery:null
+        requestUrl: '',
+        selectionType: 'radio',
+        requestQuery: null
       },
       },
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
@@ -323,11 +350,11 @@ export default {
       totalNumber: 0,
       totalNumber: 0,
       //合计车数
       //合计车数
       totalCapacity: 0,
       totalCapacity: 0,
-      tableTitle: "销售统计报表",
+      tableTitle: '销售统计报表',
       inputReceiveName: null,
       inputReceiveName: null,
       //抵达签收
       //抵达签收
-      selection:null,
-      orgCode:null,
+      selection: null,
+      orgCode: null,
       location: null,
       location: null,
       capacityNumber: null,
       capacityNumber: null,
       arrivalReceiving: false,
       arrivalReceiving: false,
@@ -337,8 +364,8 @@ export default {
       fileListReceive: [],
       fileListReceive: [],
       dialogImageUrl: '',
       dialogImageUrl: '',
       dialogVisible: false,
       dialogVisible: false,
-      picList:[],
-      dialogVisible2:false,
+      picList: [],
+      dialogVisible2: false,
       isLoading: false,
       isLoading: false,
       arrivalTime: null,
       arrivalTime: null,
       receiptTime: null,
       receiptTime: null,
@@ -351,37 +378,37 @@ export default {
         startPointName: '',
         startPointName: '',
         endPointName: '',
         endPointName: '',
         statusCode: '位置'
         statusCode: '位置'
-      },
-    };
+      }
+    }
   },
   },
   created() {
   created() {
     //初始化表头
     //初始化表头
-    if (getCookie("orgCode") == "chengyunshang") {
+    if (getCookie('orgCode') == 'chengyunshang') {
       this.option.requestUrl =
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-        getCookie("userId") +
-        "&i=" +
-        new Date();
+        '/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=' +
+        getCookie('userId') +
+        '&i=' +
+        new Date()
     } else {
     } else {
       this.option.requestUrl =
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+        '/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=' +
         null +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
     }
     }
     //时间段初始化
     //时间段初始化
-    const start = new Date(new Date(new Date().toLocaleDateString()).getTime());
-    var startTime = this.dataFormat(sjTime(start));
-    var endTime = this.dataFormat(sjTime(new Date()));
-    this.tableTitle = startTime + " 至 " + endTime;
-    this.orgCode=getCookie('orgCode');
-    console.log(this.orgCode);
+    const start = new Date(new Date(new Date().toLocaleDateString()).getTime())
+    var startTime = this.dataFormat(sjTime(start))
+    var endTime = this.dataFormat(sjTime(new Date()))
+    this.tableTitle = startTime + ' 至 ' + endTime
+    this.orgCode = getCookie('orgCode')
+    console.log(this.orgCode)
   },
   },
   methods: {
   methods: {
     //选中
     //选中
-    selectOne(selection){
-      console.log("selection",selection);
-      this.selection=selection;
+    selectOne(selection) {
+      console.log('selection', selection)
+      this.selection = selection
     },
     },
     //抵达签收
     //抵达签收
     openReceive() {
     openReceive() {
@@ -401,7 +428,8 @@ export default {
         //其次获取车辆定位
         //其次获取车辆定位
         this.axios
         this.axios
           .get(
           .get(
-            '/api/v1/otms/getCurrentLocation?capcityNumber=' + row.capacityNumber
+            '/api/v1/otms/getCurrentLocation?capcityNumber=' +
+              row.capacityNumber
           )
           )
           .then(res => {
           .then(res => {
             if (
             if (
@@ -441,7 +469,9 @@ export default {
         })
         })
       //签收图片
       //签收图片
       this.axios
       this.axios
-        .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNumber)
+        .post(
+          '/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNumber
+        )
         .then(res => {
         .then(res => {
           console.log('ReceivingPhoto:', res)
           console.log('ReceivingPhoto:', res)
           if (res.data) {
           if (res.data) {
@@ -552,7 +582,7 @@ export default {
     },
     },
     showPic(urls) {
     showPic(urls) {
       //获取图片到本地
       //获取图片到本地
-      this.axios.post('/api/v1/uc/getPicture', {urls:urls}).then(res => {
+      this.axios.post('/api/v1/uc/getPicture', { urls: urls }).then(res => {
         console.log(res)
         console.log(res)
         if (res.data) {
         if (res.data) {
           // let remarkPicList = []
           // let remarkPicList = []
@@ -606,40 +636,47 @@ export default {
           }
           }
         })
         })
     },
     },
-     exportToExcel(tableTitle="表格标题") {
-        //创建工作簿对象
-        let wb = XLSX.utils.book_new();
-        //查询数据
-        let map={isExcel:1};
-        this.axios.post(this.option.requestUrl,map).then(res=>{
-          let columnData=res.data.data.columnData;
-          let data=[];
-          if(!res.data.data.list || res.data.data.list.length<=0){
-            this.$message({
-              message:"请先查询,再导出!",
-              type:"warning",
-              duration:1000
-            });
-            return;
-          }else{
-            //替换表头
-            console.log("columnData",columnData);
-            res.data.data.list.forEach((item,index)=>{
-              let temp={};
-              columnData.forEach((col)=>{
-                temp[col.label] = item[col.prop];
-              });
-              data.push(temp);
-            });
-            console.log("data",data);
-            //将json数组转换成sheet
-            let table_sheet = XLSX.utils.json_to_sheet(data);
-            //为工作簿添加sheet
-            XLSX.utils.book_append_sheet(wb, table_sheet, "第一页");
-            //导出
-            XLSX.writeFile(wb, tableTitle+'.xlsx');
-          }
-        });
+    exportToExcel(tableTitle = '表格标题') {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let startTime = null
+      let endTime = null
+      let requestQuery = {}
+      requestQuery[this.condition1] = this.input1 + ''
+      requestQuery[this.condition2] = this.input2 + ''
+      requestQuery.isExcel = 1
+      //查询数据
+      let map = { isExcel: 1 }
+      this.axios.post(this.option.requestUrl, requestQuery).then(res => {
+        console.log(res, 'res')
+        let columnData = res.data.data.columnData
+        let data = []
+        if (!res.data.data.list || res.data.data.list.length <= 0) {
+          this.$message({
+            message: '请先查询,再导出!',
+            type: 'warning',
+            duration: 1000
+          })
+          return
+        } else {
+          //替换表头
+          console.log('columnData', columnData)
+          res.data.data.list.forEach((item, index) => {
+            let temp = {}
+            columnData.forEach(col => {
+              temp[col.label] = item[col.prop]
+            })
+            data.push(temp)
+          })
+          console.log('data', data)
+          //将json数组转换成sheet
+          let table_sheet = XLSX.utils.json_to_sheet(data)
+          //为工作簿添加sheet
+          XLSX.utils.book_append_sheet(wb, table_sheet, '第一页')
+          //导出
+          XLSX.writeFile(wb, tableTitle + '.xlsx')
+        }
+      })
     },
     },
     // getReceiveName() {
     // getReceiveName() {
     //   let startTime = null;
     //   let startTime = null;
@@ -690,8 +727,8 @@ export default {
     //     }
     //     }
     //   }
     //   }
     // },
     // },
-    dealWithOverWeight(){
-      this.disvisiable=true
+    dealWithOverWeight() {
+      this.disvisiable = true
     },
     },
     //以下是运力边输边查搜索
     //以下是运力边输边查搜索
     querySearchCapacity(queryString, cb) {
     querySearchCapacity(queryString, cb) {
@@ -751,116 +788,116 @@ export default {
         })
         })
     },
     },
     refresh() {
     refresh() {
-      this.$router.go(0);
+      this.$router.go(0)
     },
     },
     func(res) {
     func(res) {
-      console.log(res);
-      var resultNetWeightTotal = 0;
+      console.log(res)
+      var resultNetWeightTotal = 0
       res.list.forEach(e => {
       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.totalCapacity = res.total;
-      this.isKuang = false;
+      this.isKuang = false
     },
     },
     onclick() {
     onclick() {
-      let startTime = null;
-      let endTime = null;
-      let requestQuery={}
-      requestQuery[this.condition1]=this.input1+''
-      requestQuery[this.condition2]=this.input2+''
-      this.option.requestQuery=requestQuery;
+      let startTime = null
+      let endTime = null
+      let requestQuery = {}
+      requestQuery[this.condition1] = this.input1 + ''
+      requestQuery[this.condition2] = this.input2 + ''
+      this.option.requestQuery = requestQuery
       if (this.startTime && this.endTime) {
       if (this.startTime && this.endTime) {
-        startTime = sjTime(this.startTime);
-        endTime = sjTime(this.endTime);
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
         //修改报表名称
         //修改报表名称
         this.tableTitle =
         this.tableTitle =
-          this.dataFormat(startTime) + " 至 " + this.dataFormat(endTime);
+          this.dataFormat(startTime) + ' 至 ' + this.dataFormat(endTime)
         //加上时间重置表头
         //加上时间重置表头
-        if (getCookie("orgCode") == "chengyunshang") {
+        if (getCookie('orgCode') == 'chengyunshang') {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=2" +
-            "&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date();
+            '&orderType=2&shipperId=2' +
+            '&carrierSsoId=' +
+            getCookie('userId') +
+            '&i=' +
+            new Date()
         } else {
         } else {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=2" +
-            "&carrierSsoId=" +
+            '&orderType=2&shipperId=2' +
+            '&carrierSsoId=' +
             null +
             null +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         }
         }
       } else {
       } else {
         if (this.startTime) {
         if (this.startTime) {
-          startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime)
         } else if (this.endTime) {
         } else if (this.endTime) {
-          endTime = sjTime(this.endTime);
+          endTime = sjTime(this.endTime)
         }
         }
         //加上时间重置表头
         //加上时间重置表头
-        if (getCookie("orgCode") == "chengyunshang") {
+        if (getCookie('orgCode') == 'chengyunshang') {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=2" +
-            "&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date();
+            '&orderType=2&shipperId=2' +
+            '&carrierSsoId=' +
+            getCookie('userId') +
+            '&i=' +
+            new Date()
         } else {
         } else {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=2" +
-            "&carrierSsoId=" +
+            '&orderType=2&shipperId=2' +
+            '&carrierSsoId=' +
             null +
             null +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         }
         }
       }
       }
     },
     },
     //格式化日期
     //格式化日期
     dataFormat(value) {
     dataFormat(value) {
-      let date = new Date(value);
-      let y = date.getFullYear();
-      let MM = date.getMonth() + 1;
-      MM = MM < 10 ? "0" + MM : MM;
-      let d = date.getDate();
-      d = d < 10 ? "0" + d : d;
-      let h = date.getHours();
-      h = h < 10 ? "0" + h : h;
-      let m = date.getMinutes();
-      m = m < 10 ? "0" + m : m;
-      let s = date.getSeconds();
-      s = s < 10 ? "0" + s : s;
-      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
+      let date = new Date(value)
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      let h = date.getHours()
+      h = h < 10 ? '0' + h : h
+      let m = date.getMinutes()
+      m = m < 10 ? '0' + m : m
+      let s = date.getSeconds()
+      s = s < 10 ? '0' + s : s
+      return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
     }
     }
   }
   }
-};
+}
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-  .frameCalculation {
-    margin-left: 20px;
-    margin-top: 20px;
-  }
-  .table {
-    margin-left: 20px;
-    margin-top: 20px;
-  }
+.frameCalculation {
+  margin-left: 20px;
+  margin-top: 20px;
+}
+.table {
+  margin-left: 20px;
+  margin-top: 20px;
+}
 </style>
 </style>

+ 209 - 177
src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductForm.vue

@@ -20,34 +20,46 @@
             placeholder="选择日期时间"
             placeholder="选择日期时间"
           >
           >
           </el-date-picker>
           </el-date-picker>
-          <el-select v-model="condition1" placeholder="请选择筛选条件"  style="width:150px" clearable>
-              <el-option
+          <el-select
+            v-model="condition1"
+            placeholder="请选择筛选条件"
+            style="width:150px"
+            clearable
+          >
+            <el-option
               v-for="item in options"
               v-for="item in options"
               :key="item.value"
               :key="item.value"
               :label="item.label"
               :label="item.label"
-              :value="item.value">
-              </el-option>
+              :value="item.value"
+            >
+            </el-option>
           </el-select>
           </el-select>
           <el-input
           <el-input
-              placeholder="请输入内容"
-              v-model="input1"
-              style="width:200px"
-              clearable
+            placeholder="请输入内容"
+            v-model="input1"
+            style="width:200px"
+            clearable
           >
           >
           </el-input>
           </el-input>
-          <el-select v-model="condition2" placeholder="请选择筛选条件" style="width:150px" clearable>
-              <el-option
+          <el-select
+            v-model="condition2"
+            placeholder="请选择筛选条件"
+            style="width:150px"
+            clearable
+          >
+            <el-option
               v-for="item in options"
               v-for="item in options"
               :key="item.value"
               :key="item.value"
               :label="item.label"
               :label="item.label"
-              :value="item.value">
-              </el-option>
+              :value="item.value"
+            >
+            </el-option>
           </el-select>
           </el-select>
           <el-input
           <el-input
-              placeholder="请输入内容"
-              v-model="input2"
-              style="width:200px"
-              clearable
+            placeholder="请输入内容"
+            v-model="input2"
+            style="width:200px"
+            clearable
           >
           >
           </el-input>
           </el-input>
           <el-button type="primary" class="btn" @click="onclick">
           <el-button type="primary" class="btn" @click="onclick">
@@ -105,18 +117,36 @@
         :shiyHeigth="shiyHeigth"
         :shiyHeigth="shiyHeigth"
         :isKuang="isKuang"
         :isKuang="isKuang"
         @func="func"
         @func="func"
-         highlight-current-row
+        highlight-current-row
         @radio-change="selectOne"
         @radio-change="selectOne"
         :pageSize="pageSize"
         :pageSize="pageSize"
       >
       >
-        <el-table-column label="抵达地址" width="150" :show-overflow-tooltip="true">
+        <el-table-column
+          label="抵达地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="showPic(scope.row.arrivalPhoto)">{{scope.row.arrivalAddress}}</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.arrivalPhoto)"
+              >{{ scope.row.arrivalAddress }}</el-button
+            >
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column label="签收地址" width="150" :show-overflow-tooltip="true">
+        <el-table-column
+          label="签收地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button type="text"  size="small" @click="showPic(scope.row.receiptPhoto)">{{scope.row.receiptAddress}}</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.receiptPhoto)"
+              >{{ scope.row.receiptAddress }}</el-button
+            >
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </dilTable>
       </dilTable>
@@ -137,41 +167,34 @@
     </div>
     </div>
     <el-dialog :visible.sync="disvisiable">
     <el-dialog :visible.sync="disvisiable">
       <div class="admin2">
       <div class="admin2">
-              <div class="carrier from">
-                <el-form
-                  :inline="true"
-                  class="demo-form-inline"
-                  label-width="80px"
-                >
-                  <el-form-item label="车牌号:">
-                    <el-autocomplete
-                      class="inline-input"
-                      v-model="capacityName"
-                      :fetch-suggestions="querySearchCapacity"
-                      placeholder="车牌号"
-                      :trigger-on-focus="false"
-                      @select="handleSelectCapacity"
-                    >
-                      <template slot-scope="{ item }">
-                        <div class="name">{{ item.capacityNumber }}</div>
-                      </template>
-                    </el-autocomplete>
-                  </el-form-item>
-                </el-form>
-              </div>
-              <div class="poundNo from">
-                <span class="text">运输订单号:</span>
-                <el-input v-model="orderNumber" disabled></el-input>
-              </div>
-              <div class="button_box">
-                <el-button
-                  type="primary"
-                  @click="updateCanwork"
-                  :disabled="disabled"
-                  >确认</el-button
-                >
-              </div>
-            </div>
+        <div class="carrier from">
+          <el-form :inline="true" class="demo-form-inline" label-width="80px">
+            <el-form-item label="车牌号:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="capacityName"
+                :fetch-suggestions="querySearchCapacity"
+                placeholder="车牌号"
+                :trigger-on-focus="false"
+                @select="handleSelectCapacity"
+              >
+                <template slot-scope="{ item }">
+                  <div class="name">{{ item.capacityNumber }}</div>
+                </template>
+              </el-autocomplete>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="poundNo from">
+          <span class="text">运输订单号:</span>
+          <el-input v-model="orderNumber" disabled></el-input>
+        </div>
+        <div class="button_box">
+          <el-button type="primary" @click="updateCanwork" :disabled="disabled"
+            >确认</el-button
+          >
+        </div>
+      </div>
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
       title="抵达签收"
       title="抵达签收"
@@ -258,14 +281,20 @@
       <img width="100%" :src="dialogImageUrl" alt="" />
       <img width="100%" :src="dialogImageUrl" alt="" />
     </el-dialog>
     </el-dialog>
     <el-dialog title="图片查看" :visible.sync="dialogVisible2" width="80%">
     <el-dialog title="图片查看" :visible.sync="dialogVisible2" width="80%">
-      <img width="100%" v-for="item in picList" :src="item" :key="item" alt="" />
+      <img
+        width="100%"
+        v-for="item in picList"
+        :src="item"
+        :key="item"
+        alt=""
+      />
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 import PathView from './mapTest.vue'
 import PathView from './mapTest.vue'
 import currentLocation from './currentLocation.vue'
 import currentLocation from './currentLocation.vue'
 export default {
 export default {
@@ -275,41 +304,41 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      condition1:null,
-      condition2:null,
-      input1:null,
-      input2:null,
-      options:[
-          {
-          label:"车牌号",
-          value:"capacityNumber"
-          },
-          {
-          label:"收货单位",
-          value:"receivName"
-          },
-          {
-          label:"物资名称/备注",
-          value:"remark"
-          },
-          {
-          label:"装货地点",
-          value:"wareHouse"
-          }
+      condition1: null,
+      condition2: null,
+      input1: null,
+      input2: null,
+      options: [
+        {
+          label: '车牌号',
+          value: 'capacityNumber'
+        },
+        {
+          label: '收货单位',
+          value: 'receivName'
+        },
+        {
+          label: '物资名称/备注',
+          value: 'remark'
+        },
+        {
+          label: '装货地点',
+          value: 'wareHouse'
+        }
       ],
       ],
       orderNumber: null,
       orderNumber: null,
-      orderId:null,
+      orderId: null,
       disabled: false,
       disabled: false,
-      capacityName:null,
-      disvisiable:false,
+      capacityName: null,
+      disvisiable: false,
       shiyHeigth: 140,
       shiyHeigth: 140,
       isHeigth: true,
       isHeigth: true,
       pageSize: 100,
       pageSize: 100,
       isKuang: false,
       isKuang: false,
       option: {
       option: {
-        requestUrl: "",
-        selectionType:"radio",
-        requestQuery:null
+        requestUrl: '',
+        selectionType: 'radio',
+        requestQuery: null
       },
       },
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
@@ -317,13 +346,13 @@ export default {
       totalNumber: 0,
       totalNumber: 0,
       //合计车数
       //合计车数
       totalCapacity: 0,
       totalCapacity: 0,
-      tableTitle: "销售统计报表",
+      tableTitle: '销售统计报表',
       inputMaterial: null,
       inputMaterial: null,
       inputReceiveName: null,
       inputReceiveName: null,
-      wareHouse:null,
+      wareHouse: null,
       //抵达签收
       //抵达签收
-      selection:null,
-      orgCode:null,
+      selection: null,
+      orgCode: null,
       location: null,
       location: null,
       capacityNumber: null,
       capacityNumber: null,
       arrivalReceiving: false,
       arrivalReceiving: false,
@@ -333,8 +362,8 @@ export default {
       fileListReceive: [],
       fileListReceive: [],
       dialogImageUrl: '',
       dialogImageUrl: '',
       dialogVisible: false,
       dialogVisible: false,
-      picList:[],
-      dialogVisible2:false,
+      picList: [],
+      dialogVisible2: false,
       isLoading: false,
       isLoading: false,
       arrivalTime: null,
       arrivalTime: null,
       receiptTime: null,
       receiptTime: null,
@@ -347,37 +376,37 @@ export default {
         startPointName: '',
         startPointName: '',
         endPointName: '',
         endPointName: '',
         statusCode: '位置'
         statusCode: '位置'
-      },
-    };
+      }
+    }
   },
   },
   created() {
   created() {
     //初始化表头
     //初始化表头
-    if (getCookie("orgCode") == "chengyunshang") {
+    if (getCookie('orgCode') == 'chengyunshang') {
       this.option.requestUrl =
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=" +
-        getCookie("userId") +
-        "&i=" +
-        new Date();
+        '/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=' +
+        getCookie('userId') +
+        '&i=' +
+        new Date()
     } else {
     } else {
       this.option.requestUrl =
       this.option.requestUrl =
-        "/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=" +
+        '/api/v1/tms/getAllSaleReport?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=' +
         null +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
     }
     }
     //时间段初始化
     //时间段初始化
-    const start = new Date(new Date(new Date().toLocaleDateString()).getTime());
-    var startTime = this.dataFormat(sjTime(start));
-    var endTime = this.dataFormat(sjTime(new Date()));
-    this.tableTitle = startTime + " 至 " + endTime;
-    this.orgCode=getCookie('orgCode');
-    console.log(this.orgCode);
+    const start = new Date(new Date(new Date().toLocaleDateString()).getTime())
+    var startTime = this.dataFormat(sjTime(start))
+    var endTime = this.dataFormat(sjTime(new Date()))
+    this.tableTitle = startTime + ' 至 ' + endTime
+    this.orgCode = getCookie('orgCode')
+    console.log(this.orgCode)
   },
   },
   methods: {
   methods: {
     //选中
     //选中
-    selectOne(selection){
-      console.log("selection",selection);
-      this.selection=selection;
+    selectOne(selection) {
+      console.log('selection', selection)
+      this.selection = selection
     },
     },
     //抵达签收
     //抵达签收
     openReceive() {
     openReceive() {
@@ -397,7 +426,8 @@ export default {
         //其次获取车辆定位
         //其次获取车辆定位
         this.axios
         this.axios
           .get(
           .get(
-            '/api/v1/otms/getCurrentLocation?capcityNumber=' + row.capacityNumber
+            '/api/v1/otms/getCurrentLocation?capcityNumber=' +
+              row.capacityNumber
           )
           )
           .then(res => {
           .then(res => {
             if (
             if (
@@ -437,7 +467,9 @@ export default {
         })
         })
       //签收图片
       //签收图片
       this.axios
       this.axios
-        .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNumber)
+        .post(
+          '/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNumber
+        )
         .then(res => {
         .then(res => {
           console.log('ReceivingPhoto:', res)
           console.log('ReceivingPhoto:', res)
           if (res.data) {
           if (res.data) {
@@ -548,7 +580,7 @@ export default {
     },
     },
     showPic(urls) {
     showPic(urls) {
       //获取图片到本地
       //获取图片到本地
-      this.axios.post('/api/v1/uc/getPicture', {urls:urls}).then(res => {
+      this.axios.post('/api/v1/uc/getPicture', { urls: urls }).then(res => {
         console.log(res)
         console.log(res)
         if (res.data) {
         if (res.data) {
           // let remarkPicList = []
           // let remarkPicList = []
@@ -637,8 +669,8 @@ export default {
     //     }
     //     }
     //   }
     //   }
     // },
     // },
-    dealWithOverWeight(){
-      this.disvisiable=true
+    dealWithOverWeight() {
+      this.disvisiable = true
     },
     },
     //以下是运力边输边查搜索
     //以下是运力边输边查搜索
     querySearchCapacity(queryString, cb) {
     querySearchCapacity(queryString, cb) {
@@ -698,107 +730,107 @@ export default {
         })
         })
     },
     },
     refresh() {
     refresh() {
-      this.$router.go(0);
+      this.$router.go(0)
     },
     },
     func(res) {
     func(res) {
-      console.log(res);
-      var resultNetWeightTotal = 0;
+      console.log(res)
+      var resultNetWeightTotal = 0
       res.list.forEach(e => {
       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.totalCapacity = res.total;
-      this.isKuang = false;
+      this.isKuang = false
     },
     },
     onclick() {
     onclick() {
-      let startTime = null;
-      let endTime = null;
-      let requestQuery={}
-      requestQuery[this.condition1]=this.input1+''
-      requestQuery[this.condition2]=this.input2+''
-      this.option.requestQuery=requestQuery;
+      let startTime = null
+      let endTime = null
+      let requestQuery = {}
+      requestQuery[this.condition1] = this.input1 + ''
+      requestQuery[this.condition2] = this.input2 + ''
+      this.option.requestQuery = requestQuery
       if (this.startTime && this.endTime) {
       if (this.startTime && this.endTime) {
-        startTime = sjTime(this.startTime);
-        endTime = sjTime(this.endTime);
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
         //修改报表名称
         //修改报表名称
         this.tableTitle =
         this.tableTitle =
-          this.dataFormat(startTime) + " 至 " + this.dataFormat(endTime);
+          this.dataFormat(startTime) + ' 至 ' + this.dataFormat(endTime)
         //加上时间重置表头
         //加上时间重置表头
-        if (getCookie("orgCode") == "chengyunshang") {
+        if (getCookie('orgCode') == 'chengyunshang') {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=1" +
-            "&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date();
+            '&orderType=2&shipperId=1' +
+            '&carrierSsoId=' +
+            getCookie('userId') +
+            '&i=' +
+            new Date()
         } else {
         } else {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=1" +
-            "&carrierSsoId=" +
+            '&orderType=2&shipperId=1' +
+            '&carrierSsoId=' +
             null +
             null +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         }
         }
       } else {
       } else {
         if (this.startTime) {
         if (this.startTime) {
-          startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime)
         } else if (this.endTime) {
         } else if (this.endTime) {
-          endTime = sjTime(this.endTime);
+          endTime = sjTime(this.endTime)
         }
         }
         //加上时间重置表头
         //加上时间重置表头
-        if (getCookie("orgCode") == "chengyunshang") {
+        if (getCookie('orgCode') == 'chengyunshang') {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=1" +
-            "&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date();
+            '&orderType=2&shipperId=1' +
+            '&carrierSsoId=' +
+            getCookie('userId') +
+            '&i=' +
+            new Date()
         } else {
         } else {
           this.option.requestUrl =
           this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=526&startTime=" +
+            '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
             startTime +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
             endTime +
-            "&orderType=2&shipperId=1" +
-            "&carrierSsoId=" +
+            '&orderType=2&shipperId=1' +
+            '&carrierSsoId=' +
             null +
             null +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         }
         }
       }
       }
     },
     },
     //格式化日期
     //格式化日期
     dataFormat(value) {
     dataFormat(value) {
-      let date = new Date(value);
-      let y = date.getFullYear();
-      let MM = date.getMonth() + 1;
-      MM = MM < 10 ? "0" + MM : MM;
-      let d = date.getDate();
-      d = d < 10 ? "0" + d : d;
-      let h = date.getHours();
-      h = h < 10 ? "0" + h : h;
-      let m = date.getMinutes();
-      m = m < 10 ? "0" + m : m;
-      let s = date.getSeconds();
-      s = s < 10 ? "0" + s : s;
-      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
+      let date = new Date(value)
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      let h = date.getHours()
+      h = h < 10 ? '0' + h : h
+      let m = date.getMinutes()
+      m = m < 10 ? '0' + m : m
+      let s = date.getSeconds()
+      s = s < 10 ? '0' + s : s
+      return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
     }
     }
   }
   }
-};
+}
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">

+ 11 - 8
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -326,9 +326,8 @@
           label="物资名称"
           label="物资名称"
           align="center"
           align="center"
           width="150px"
           width="150px"
-          sortable
-          :filters="filtermaterialNameList"
           v-if="!columnNoRoutList.includes('物资名称')"
           v-if="!columnNoRoutList.includes('物资名称')"
+          :render-header="renderHeader"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
@@ -337,10 +336,9 @@
           column-key="materialSpe"
           column-key="materialSpe"
           key="materialSpe"
           key="materialSpe"
           align="center"
           align="center"
-          sortable
-          :filters="filtermaterialSpe"
           width="120px"
           width="120px"
           v-if="!columnNoRoutList.includes('物资规格')"
           v-if="!columnNoRoutList.includes('物资规格')"
+          :render-header="renderHeader"
         >
         >
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
@@ -2358,9 +2356,9 @@ export default {
     },
     },
     //动态渲染表头
     //动态渲染表头
     renderHeader(h, { column }) {
     renderHeader(h, { column }) {
-      let arr = []
       let renderColumnFilterList = []
       let renderColumnFilterList = []
       let filterVal = ''
       let filterVal = ''
+      let optionList = []
       if (column.label === '客户') {
       if (column.label === '客户') {
         filterVal = 'consigneeNameList'
         filterVal = 'consigneeNameList'
         renderColumnFilterList = this.filterConsigneeList
         renderColumnFilterList = this.filterConsigneeList
@@ -2376,6 +2374,12 @@ export default {
       } else if (column.label === '备注') {
       } else if (column.label === '备注') {
         filterVal = 'truckRemarkList'
         filterVal = 'truckRemarkList'
         renderColumnFilterList = this.filterTruckRemark
         renderColumnFilterList = this.filterTruckRemark
+      } else if (column.label === '物资名称') {
+        filterVal = 'materialNameList'
+        renderColumnFilterList = this.filtermaterialNameList
+      } else if (column.label === '物资规格') {
+        filterVal = 'materialSpeList'
+        renderColumnFilterList = this.filtermaterialSpe
       }
       }
       if (filterVal == '') {
       if (filterVal == '') {
         return h('div', column.label, {})
         return h('div', column.label, {})
@@ -2430,7 +2434,7 @@ export default {
                     width: '250px'
                     width: '250px'
                   },
                   },
                   props: {
                   props: {
-                    placeholder: '请输入客户名称查询',
+                    placeholder: '请输入查询',
                     reserveKeyword: true,
                     reserveKeyword: true,
                     filterable: true,
                     filterable: true,
                     multiple: true,
                     multiple: true,
@@ -2439,9 +2443,8 @@ export default {
                   },
                   },
                   on: {
                   on: {
                     change: val => {
                     change: val => {
-                      console.log(val)
+                      console.log(val, 'val')
                       if (val) {
                       if (val) {
-                        // this.consigneeCheckList.push(val)
                         this.filterMap[filterVal] = [...new Set(val)]
                         this.filterMap[filterVal] = [...new Set(val)]
                       } else {
                       } else {
                         let i = this.filterMap[filterVal].findIndex(
                         let i = this.filterMap[filterVal].findIndex(