浏览代码

修改销售钢材报表

luobang 2 年之前
父节点
当前提交
b3f023587b

+ 1 - 1
build/utils.js

@@ -16,7 +16,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 //let devModules = ["index", "statisticalReport", "appoint", "sale"];
-let devModules = ['index', 'statisticalReport']
+let devModules = ['all']
 
 if (pathSrc.indexOf('node_modules') > -1) {
   devModules = require('../../../cors.js').devModules

+ 1 - 1
package.json

@@ -30,7 +30,7 @@
     "crypto": "^1.0.1",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",
-    "element-ui": "2.4.2",
+    "element-ui": "2.13.2",
     "file-saver": "^1.3.8",
     "graphql": "^14.1.1",
     "graphql-tag": "^2.10.1",

+ 6 - 1
src/components/main.vue

@@ -2741,7 +2741,12 @@ export default {
   }
   ::-webkit-scrollbar-thumb {
     //滚动条颜色和圆角
-    background-color: #dbd9d9;
+    background-color: #dfe0e0;
+    border-radius: 3px;
+  }
+  ::-webkit-scrollbar-track-piece {
+    // border: 2px solid #000;
+    background-color: #f2f6f8;
     border-radius: 3px;
   }
 }

+ 270 - 261
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -86,54 +86,58 @@
         <el-tab-pane label="已结算" name="second">
           <dilTable v-bind.sync="options2" @func="func2"> </dilTable>
         </el-tab-pane>
-        <!-- <el-tab-pane label="未生成详单" name="third">
+        <el-tab-pane
+          label="未生成详单"
+          name="third"
+          v-if="loginName == 'admin02'"
+        >
           <dilTable v-bind.sync="options3" @func="func3"> </dilTable>
-        </el-tab-pane> -->
+        </el-tab-pane>
       </el-tabs>
     </div>
   </div>
 </template>
 
 <script>
-import { getCookie } from "@/utils/util.js";
-import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js'
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       options: [
         {
-          value: "用车单位",
-          label: "用车单位"
+          value: '用车单位',
+          label: '用车单位'
         },
         {
-          value: "货物名称",
-          label: "货物名称"
+          value: '货物名称',
+          label: '货物名称'
         },
         {
-          value: "车牌号",
-          label: "车牌号"
+          value: '车牌号',
+          label: '车牌号'
         },
         {
-          value: "承运起止范围",
-          label: "承运起止范围"
+          value: '承运起止范围',
+          label: '承运起止范围'
         }
       ],
       optionsF: [
         {
-          value: "用车单位",
-          label: "用车单位"
+          value: '用车单位',
+          label: '用车单位'
         },
         {
-          value: "货物名称",
-          label: "货物名称"
+          value: '货物名称',
+          label: '货物名称'
         },
         {
-          value: "车牌号",
-          label: "车牌号"
+          value: '车牌号',
+          label: '车牌号'
         },
         {
-          value: "承运起止范围",
-          label: "承运起止范围"
+          value: '承运起止范围',
+          label: '承运起止范围'
         }
       ],
       screen: null,
@@ -150,20 +154,20 @@ export default {
       selectLineLoading: false,
       input: null,
       input1: null,
-      activeName: "first",
+      activeName: 'first',
       ssoId: null,
       //详单Id
       detailsId: null,
       options1: {
         // first请求数据的地址
-        requestUrl: ""
+        requestUrl: ''
       },
       options2: {
         // second请求数据的地址
-        requestUrl: ""
+        requestUrl: ''
       },
       options3: {
-        requestUrl: ""
+        requestUrl: ''
       },
       //是否打开修改详单地址弹出框
       dialogFormVisible: false,
@@ -179,437 +183,442 @@ export default {
       priceId: null,
       //运输单价的表格
       Address: {
-        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
-        selectionType: "radio"
+        requestUrl: '/api/v1/ams/getAddressDeliveryAddress?apiId=255',
+        selectionType: 'radio'
       },
       // addressText:null,
       //缓存当前选中的运输单价
       priceMap: {},
-      formLabelWidth: "125px",
-      tableTitle: "内转计重详单",
+      formLabelWidth: '125px',
+      tableTitle: '内转计重详单',
       exportAllList: [],
       noSettleDetailsColumn: [],
       settleDetailsColumn: [],
       noDetailsColumn: [],
       orderList1: [],
       orderList2: [],
-      orderList3: []
-    };
+      orderList3: [],
+      loginName: ''
+    }
   },
   created() {
-    this.options1GetRequestUrl();
-    this.options2GetRequestUrl();
-    this.options3GetRequestUrl();
+    this.loginName = this.loginNames()
+    this.options1GetRequestUrl()
+    this.options2GetRequestUrl()
+    this.options3GetRequestUrl()
   },
   methods: {
+    loginNames() {
+      return getCookie('loginName')
+    },
     handClick() {
-      if (this.activeName == "first") {
-        this.options1GetRequestUrl();
-      } else if (this.activeName == "second") {
-        this.options2GetRequestUrl();
+      if (this.activeName == 'first') {
+        this.options1GetRequestUrl()
+      } else if (this.activeName == 'second') {
+        this.options2GetRequestUrl()
       } else {
-        this.options3GetRequestUrl();
+        this.options3GetRequestUrl()
       }
     },
     func(res) {
-      console.log(res);
-      this.noSettleDetailsColumn = res.columnData;
-      var totalWeight = 0;
-      var totalAllMoney = 0;
+      console.log(res)
+      this.noSettleDetailsColumn = res.columnData
+      var totalWeight = 0
+      var totalAllMoney = 0
       res.list.forEach(e => {
-        totalWeight = totalWeight + e.resultNetWeight;
-        totalAllMoney = totalAllMoney + e.detailsAmount;
-      });
-      this.totalNetWeight = totalWeight.toFixed(2) + "t";
-      this.totalMoney = totalAllMoney.toFixed(2) + "元";
-      this.orderList1 = [];
+        totalWeight = totalWeight + e.resultNetWeight
+        totalAllMoney = totalAllMoney + e.detailsAmount
+      })
+      this.totalNetWeight = totalWeight.toFixed(2) + 't'
+      this.totalMoney = totalAllMoney.toFixed(2) + '元'
+      this.orderList1 = []
       res.list.forEach(e => {
         let map = {
           orderLineSeq: e.orderLineSeq,
           orderId: e.orderId
-        };
-        this.orderList1.push(map);
-      });
+        }
+        this.orderList1.push(map)
+      })
     },
     func2(res) {
-      this.settleDetailsColumn = res.columnData;
+      this.settleDetailsColumn = res.columnData
     },
     func3(res) {
-      console.log(res.list);
-      console.log("res");
-      this.orderList3 = [];
+      console.log(res.list)
+      console.log('res')
+      this.orderList3 = []
       res.list.forEach(e => {
         let map = {
           orderLineSeq: e.orderLineSeq,
           orderId: e.orderId
-        };
-        this.orderList3.push(map);
-      });
-      this.noDetailsColumn = res.columnData;
+        }
+        this.orderList3.push(map)
+      })
+      this.noDetailsColumn = res.columnData
     },
     newSettle() {
-      console.log(this.orderList);
-      let orderList = [];
-      if (this.activeName == "third") {
-        orderList = this.orderList3;
+      console.log(this.orderList)
+      let orderList = []
+      if (this.activeName == 'third') {
+        orderList = this.orderList3
       } else {
-        orderList = this.orderList1;
+        orderList = this.orderList1
       }
       this.axios
-        .post("/api/v1/bms/newInwardSettle", { orderIds: orderList })
+        .post('/api/v1/bms/newInwardSettle', { orderIds: orderList })
         .then(res => {
-          console.log(res);
-          this.$message.success("生成成功");
-          this.options3GetRequestUrl();
-        });
+          console.log(res)
+          this.$message.success('生成成功')
+          this.options3GetRequestUrl()
+        })
     },
     exportAllExcel() {
-      let startTime = null;
-      let endTime = null;
-      let orgCode = null;
-      let materialTypeNames = null;
-      let transRangeValues = null;
-      let shipperNames = null;
-      let capacityNo = null;
-      let carrierSsoId = null;
+      let startTime = null
+      let endTime = null
+      let orgCode = null
+      let materialTypeNames = null
+      let transRangeValues = null
+      let shipperNames = null
+      let capacityNo = null
+      let carrierSsoId = null
       if (this.startTime && this.endTime) {
-        startTime = sjTime(this.startTime);
-        endTime = sjTime(this.endTime);
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
       }
-      if (getCookie("orgCode") == "chengyunshang") {
-        carrierSsoId = getCookie("userId");
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
       }
       if (
-        getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu" ||
-        getCookie("orgCode") == "wuliuchuyunzhongxin"
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu' ||
+        getCookie('orgCode') == 'wuliuchuyunzhongxin'
       ) {
-        orgCode = null;
+        orgCode = null
       } else {
-        orgCode = getCookie("orgCode");
+        orgCode = getCookie('orgCode')
       }
-      if (this.screen == "车牌号") {
-        capacityNo = this.input;
+      if (this.screen == '车牌号') {
+        capacityNo = this.input
       }
-      if (this.screen == "承运起止范围") {
-        transRangeValues = this.input;
+      if (this.screen == '承运起止范围') {
+        transRangeValues = this.input
       }
-      if (this.screen == "货物名称") {
-        materialTypeNames = this.input;
+      if (this.screen == '货物名称') {
+        materialTypeNames = this.input
       }
-      if (this.screen == "用车单位") {
-        shipperNames = this.input;
+      if (this.screen == '用车单位') {
+        shipperNames = this.input
       }
-      if (this.screen1 == "车牌号") {
-        capacityNo = this.input1;
+      if (this.screen1 == '车牌号') {
+        capacityNo = this.input1
       }
-      if (this.screen1 == "承运起止范围") {
-        transRangeValues = this.input1;
+      if (this.screen1 == '承运起止范围') {
+        transRangeValues = this.input1
       }
-      if (this.screen1 == "货物名称") {
-        materialTypeNames = this.input1;
+      if (this.screen1 == '货物名称') {
+        materialTypeNames = this.input1
       }
-      if (this.screen1 == "用车单位") {
-        shipperNames = this.input1;
+      if (this.screen1 == '用车单位') {
+        shipperNames = this.input1
       }
-      if (this.activeName == "first") {
-        this.tableTitle = "未结算计费详单";
+      if (this.activeName == 'first') {
+        this.tableTitle = '未结算计费详单'
         this.axios
           .post(
-            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
-              "&startTime=" +
+            '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0' +
+              '&startTime=' +
               startTime +
-              "&endTime=" +
+              '&endTime=' +
               endTime +
-              "&shipperNames=" +
+              '&shipperNames=' +
               shipperNames +
-              "&materialTypeNames=" +
+              '&materialTypeNames=' +
               materialTypeNames +
-              "&transRangeValues=" +
+              '&transRangeValues=' +
               transRangeValues +
-              "&capacityNo=" +
+              '&capacityNo=' +
               capacityNo +
-              "&i" +
+              '&i' +
               new Date() +
-              "&isPage=yes"
+              '&isPage=yes'
           )
           .then(res => {
-            console.log(res.data.data);
-            this.exportAllList = res.data.data;
+            console.log(res.data.data)
+            this.exportAllList = res.data.data
             this.exportAllReportToExcel(
               this.tableTitle,
               this.exportAllList,
               this.noSettleDetailsColumn
-            );
-          });
-      } else if (this.activeName == "second") {
-        this.tableTitle = "已结算计费详单";
+            )
+          })
+      } else if (this.activeName == 'second') {
+        this.tableTitle = '已结算计费详单'
         this.axios
           .post(
-            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
-              "&startTime=" +
+            '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1' +
+              '&startTime=' +
               startTime +
-              "&endTime=" +
+              '&endTime=' +
               endTime +
-              "&shipperNames=" +
+              '&shipperNames=' +
               shipperNames +
-              "&materialTypeNames=" +
+              '&materialTypeNames=' +
               materialTypeNames +
-              "&transRangeValues=" +
+              '&transRangeValues=' +
               transRangeValues +
-              "&capacityNo=" +
+              '&capacityNo=' +
               capacityNo +
-              "&i" +
+              '&i' +
               new Date() +
-              "&isPage=yes" +
-              "&userId=" +
+              '&isPage=yes' +
+              '&userId=' +
               orgCode
           )
           .then(res => {
-            this.exportAllList = res.data.data;
+            this.exportAllList = res.data.data
             this.exportAllReportToExcel(
               this.tableTitle,
               this.exportAllList,
               this.settleDetailsColumn
-            );
-          });
-      } else if (this.activeName == "third") {
-        this.tableTitle = "未生成计费详单数据";
+            )
+          })
+      } else if (this.activeName == 'third') {
+        this.tableTitle = '未生成计费详单数据'
         this.axios
           .post(
-            "/api/v1/bms/getNoInwardDetails?apiId=490" +
-              "&startTime=" +
+            '/api/v1/bms/getNoInwardDetails?apiId=490' +
+              '&startTime=' +
               startTime +
-              "&endTime=" +
+              '&endTime=' +
               endTime +
-              "&shipperNames=" +
+              '&shipperNames=' +
               shipperNames +
-              "&materialTypeNames=" +
+              '&materialTypeNames=' +
               materialTypeNames +
-              "&transRangeValues=" +
+              '&transRangeValues=' +
               transRangeValues +
-              "&capacityNo=" +
+              '&capacityNo=' +
               capacityNo +
-              "&i" +
+              '&i' +
               new Date() +
-              "&userId=" +
+              '&userId=' +
               orgCode +
-              "&isPage=yes"
+              '&isPage=yes'
           )
           .then(res => {
-            this.exportAllList = res.data.data;
+            this.exportAllList = res.data.data
             this.exportAllReportToExcel(
               this.tableTitle,
               this.exportAllList,
               this.noDetailsColumn
-            );
-          });
+            )
+          })
       }
     },
     //导出excel
     exportAllReportToExcel(tableTitle, dataArr, columnData) {
-      var title = tableTitle;
-      let tHeader = [];
-      let filterVal = [];
+      var title = tableTitle
+      let tHeader = []
+      let filterVal = []
       columnData.forEach(e1 => {
         if (tHeader.indexOf(e1.label) === -1) {
-          tHeader.push(e1.label);
+          tHeader.push(e1.label)
         }
         if (filterVal.indexOf(e1.prop) === -1) {
-          filterVal.push(e1.prop);
+          filterVal.push(e1.prop)
         }
-      });
+      })
       //导出为excel
-      this.downloadLoading = true;
+      this.downloadLoading = true
       require.ensure([], () => {
         const {
           export_json_to_excel
-        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
         // let list = this.$refs.excelDom.dataTabel;
-        let data = dataArr.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
-        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
-      });
+        let data = dataArr.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
     },
     //未结算数据
     options1GetRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
-        this.ssoId = getCookie("userId");
+      if (getCookie('orgCode') == 'chengyunshang') {
+        this.ssoId = getCookie('userId')
         this.options1.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId=" +
-          getCookie("userId") +
-          "&startTime=null&endTime=null&i=" +
-          new Date();
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId=' +
+          getCookie('userId') +
+          '&startTime=null&endTime=null&i=' +
+          new Date()
       } else if (
-        getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu" ||
-        getCookie("orgCode") == "wuliuchuyunzhongxin"
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu' ||
+        getCookie('orgCode') == 'wuliuchuyunzhongxin'
       ) {
         this.options1.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&startTime=null&endTime=null&i=" +
-          new Date();
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&startTime=null&endTime=null&i=' +
+          new Date()
       } else {
         this.options1.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" +
-          getCookie("orgCode") +
-          "&startTime=null&endTime=null&i=" +
-          new Date();
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=' +
+          getCookie('orgCode') +
+          '&startTime=null&endTime=null&i=' +
+          new Date()
       }
     },
     //已结算数据
     options2GetRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
-        this.ssoId = getCookie("userId");
+      if (getCookie('orgCode') == 'chengyunshang') {
+        this.ssoId = getCookie('userId')
         this.options2.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId=" +
-          getCookie("userId") +
-          "&startTime=null&endTime=null&i=" +
-          new Date();
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId=' +
+          getCookie('userId') +
+          '&startTime=null&endTime=null&i=' +
+          new Date()
       } else if (
-        getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu" ||
-        getCookie("orgCode") == "wuliuchuyunzhongxin"
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu' ||
+        getCookie('orgCode') == 'wuliuchuyunzhongxin'
       ) {
         this.options2.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
-          "&startTime=null&endTime=null&i=" +
-          new Date();
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1' +
+          '&startTime=null&endTime=null&i=' +
+          new Date()
       } else {
         this.options2.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" +
-          getCookie("orgCode") +
-          "&startTime=null&endTime=null&i=" +
-          new Date();
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=' +
+          getCookie('orgCode') +
+          '&startTime=null&endTime=null&i=' +
+          new Date()
       }
     },
     options3GetRequestUrl() {
       this.options3.requestUrl =
-        "/api/v1/bms/getNoInwardDetails?apiId=490&i=" + new Date();
+        '/api/v1/bms/getNoInwardDetails?apiId=490&i=' + new Date()
     },
     toInsert() {
-      this.$router.push("/insertCheckInventory");
+      this.$router.push('/insertCheckInventory')
     },
     onclick() {
-      let startTime = null;
-      let endTime = null;
-      let orgCode = null;
-      let materialTypeNames = null;
-      let transRangeValues = null;
-      let shipperNames = null;
-      let capacityNo = null;
-      let carrierSsoId = null;
+      let startTime = null
+      let endTime = null
+      let orgCode = null
+      let materialTypeNames = null
+      let transRangeValues = null
+      let shipperNames = null
+      let capacityNo = null
+      let carrierSsoId = null
       if (this.startTime && this.endTime) {
-        startTime = sjTime(this.startTime);
-        endTime = sjTime(this.endTime);
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
       }
-      if (getCookie("orgCode") == "chengyunshang") {
-        carrierSsoId = getCookie("userId");
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
       }
       if (
-        getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu" ||
-        getCookie("orgCode") == "wuliuchuyunzhongxin"
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu' ||
+        getCookie('orgCode') == 'wuliuchuyunzhongxin'
       ) {
-        orgCode = null;
+        orgCode = null
       } else {
-        orgCode = getCookie("orgCode");
+        orgCode = getCookie('orgCode')
       }
-      if (this.screen == "车牌号") {
-        capacityNo = this.input;
+      if (this.screen == '车牌号') {
+        capacityNo = this.input
       }
-      if (this.screen == "承运起止范围") {
-        transRangeValues = this.input;
+      if (this.screen == '承运起止范围') {
+        transRangeValues = this.input
       }
-      if (this.screen == "货物名称") {
-        materialTypeNames = this.input;
+      if (this.screen == '货物名称') {
+        materialTypeNames = this.input
       }
-      if (this.screen == "用车单位") {
-        shipperNames = this.input;
+      if (this.screen == '用车单位') {
+        shipperNames = this.input
       }
-      if (this.screen1 == "车牌号") {
-        capacityNo = this.input1;
+      if (this.screen1 == '车牌号') {
+        capacityNo = this.input1
       }
-      if (this.screen1 == "承运起止范围") {
-        transRangeValues = this.input1;
+      if (this.screen1 == '承运起止范围') {
+        transRangeValues = this.input1
       }
-      if (this.screen1 == "货物名称") {
-        materialTypeNames = this.input1;
+      if (this.screen1 == '货物名称') {
+        materialTypeNames = this.input1
       }
-      if (this.screen1 == "用车单位") {
-        shipperNames = this.input1;
+      if (this.screen1 == '用车单位') {
+        shipperNames = this.input1
       }
-      if (this.activeName == "first") {
+      if (this.activeName == 'first') {
         this.options1.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
-          "&startTime=" +
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0' +
+          '&startTime=' +
           startTime +
-          "&endTime=" +
+          '&endTime=' +
           endTime +
-          "&shipperNames=" +
+          '&shipperNames=' +
           shipperNames +
-          "&materialTypeNames=" +
+          '&materialTypeNames=' +
           materialTypeNames +
-          "&transRangeValues=" +
+          '&transRangeValues=' +
           transRangeValues +
-          "&capacityNo=" +
+          '&capacityNo=' +
           capacityNo +
-          "&i" +
+          '&i' +
           new Date() +
-          "&userId=" +
-          orgCode;
+          '&userId=' +
+          orgCode
       }
-      if (this.activeName == "second") {
+      if (this.activeName == 'second') {
         this.options2.requestUrl =
-          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
-          "&startTime=" +
+          '/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1' +
+          '&startTime=' +
           startTime +
-          "&endTime=" +
+          '&endTime=' +
           endTime +
-          "&shipperNames=" +
+          '&shipperNames=' +
           shipperNames +
-          "&materialTypeNames=" +
+          '&materialTypeNames=' +
           materialTypeNames +
-          "&transRangeValues=" +
+          '&transRangeValues=' +
           transRangeValues +
-          "&capacityNo=" +
+          '&capacityNo=' +
           capacityNo +
-          "&i" +
+          '&i' +
           new Date() +
-          "&userId=" +
-          orgCode;
+          '&userId=' +
+          orgCode
       }
-      if (this.activeName == "third") {
+      if (this.activeName == 'third') {
         this.options3.requestUrl =
-          "/api/v1/bms/getNoInwardDetails?apiId=490" +
-          "&startTime=" +
+          '/api/v1/bms/getNoInwardDetails?apiId=490' +
+          '&startTime=' +
           startTime +
-          "&endTime=" +
+          '&endTime=' +
           endTime +
-          "&shipperNames=" +
+          '&shipperNames=' +
           shipperNames +
-          "&materialTypeNames=" +
+          '&materialTypeNames=' +
           materialTypeNames +
-          "&transRangeValues=" +
+          '&transRangeValues=' +
           transRangeValues +
-          "&capacityNo=" +
+          '&capacityNo=' +
           capacityNo +
-          "&i" +
+          '&i' +
           new Date() +
-          "&userId=" +
-          orgCode;
+          '&userId=' +
+          orgCode
       }
     },
     //运输订单点击浏览的事件
     select() {
-      this.addressDrawer = true;
+      this.addressDrawer = true
     },
     //运输单价模态窗口的框计算
     selectAddressClick() {
       this.Price.requestUrl =
-        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
-        this.addressText;
+        '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=' +
+        this.addressText
     }
   }
-};
+}
 </script>
 
 <style lang="scss" scoped>

+ 37 - 38
src/views/statisticalReport/components/salesLogisticsStatistics/mapTest.vue

@@ -1,43 +1,6 @@
 <template>
   <div class="container">
-    <div id="amap-container">
-      <el-row style="margin-left:250px">
-        <el-button type="primary" @click="slow">慢速</el-button>
-        <el-button type="success" @click="middle">中速</el-button>
-        <el-button type="danger" @click="fast">快速</el-button>
-        <el-button type="success" @click="addIndex" plain>快进</el-button>
-        <el-button type="danger" @click="stop" plain>暂停</el-button>
-        <el-button type="success" @click="play" plain>开始</el-button>
-        <el-select
-          style="width:100px"
-          @change="changeParkingTime"
-          v-model="parkingTime"
-          placeholder="停车"
-        >
-          <el-option
-            v-for="item in parkingOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          >
-          </el-option>
-        </el-select>
-        <el-select
-          style="width:100px"
-          @change="changeLeaveTime"
-          v-model="leaveTime"
-          placeholder="离线"
-        >
-          <el-option
-            v-for="item in parkingOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          >
-          </el-option>
-        </el-select>
-      </el-row>
-    </div>
+    <div id="amap-container"></div>
     <div class="mapcontroller">
       <div class="in_transit_information">
         <label class="item_details">起点:{{ startPointName }}</label>
@@ -88,6 +51,42 @@
         </div>
       </div>
     </div>
+    <el-row>
+      <el-button type="primary" @click="slow">慢速</el-button>
+      <el-button type="success" @click="middle">中速</el-button>
+      <el-button type="danger" @click="fast">快速</el-button>
+      <el-button type="success" @click="addIndex" plain>快进</el-button>
+      <el-button type="danger" @click="stop" plain>暂停</el-button>
+      <el-button type="success" @click="play" plain>开始</el-button>
+      <el-select
+        style="width:100px"
+        @change="changeParkingTime"
+        v-model="parkingTime"
+        placeholder="停车"
+      >
+        <el-option
+          v-for="item in parkingOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <el-select
+        style="width:100px"
+        @change="changeLeaveTime"
+        v-model="leaveTime"
+        placeholder="离线"
+      >
+        <el-option
+          v-for="item in parkingOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+    </el-row>
     <div class="btnx">
       <el-button type="primary" class="" @click="openInfo"
         >打开信息窗体</el-button

+ 124 - 76
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -9,7 +9,7 @@
             placeholder="请选择需筛选的内容"
             clearable
             @change="changeScreen"
-            style="width:120px"
+            style="width:100px"
           >
             <el-option
               v-for="item in options"
@@ -20,7 +20,7 @@
             </el-option>
           </el-select>
           <el-input
-            style="width:180px"
+            style="width:170px"
             v-model="input"
             placeholder="请输入查询条件"
             clearable
@@ -31,7 +31,7 @@
             v-model="screen1"
             placeholder="请选择需筛选的内容"
             clearable
-            style="width:120px"
+            style="width:100px"
           >
             <el-option
               v-for="item in options1"
@@ -42,7 +42,7 @@
             </el-option>
           </el-select>
           <el-input
-            style="width:180px"
+            style="width:170px"
             v-model="input1"
             placeholder="请输入查询条件"
             clearable
@@ -56,7 +56,7 @@
             v-model="startTime"
             type="date"
             placeholder="选择日期"
-            style="width:180px"
+            style="width:150px"
           >
           </el-date-picker>
           <span>至</span>
@@ -64,7 +64,7 @@
             v-model="endTime"
             type="date"
             placeholder="选择日期"
-            style="width:180px"
+            style="width:150px"
           >
           </el-date-picker>
           <el-button type="primary" class="btn" @click="onclick">
@@ -73,7 +73,7 @@
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="exportAllReportToExcel"
-            ><i class="el-icon-download"></i>Excel</el-button
+            >下载Excel</el-button
           >
         </el-form-item>
         <el-form-item>
@@ -81,6 +81,14 @@
             <i class="el-icon-refresh"></i>
           </el-button>
         </el-form-item>
+        <el-form-item v-if="isShowOperate">
+          <el-button type="primary" @click="checkTrans()"
+            ><i class="el-icon-truck"></i>轨迹</el-button
+          >
+          <el-button type="primary" @click="operation()"
+            ><i class="el-icon-edit"></i>更改</el-button
+          >
+        </el-form-item>
         <el-form-item>
           <span style="margin-left: 1rem;font-size:16px">车数/件数:</span>
           <span style="font-size:16px"
@@ -98,13 +106,12 @@
         style="width: 100%; margin-top: 20px"
         :max-height="maxHeight"
         :height="maxHeight"
-        :row-style="{ height: '30' }"
-        :cell-style="{ fontWeight: '500' }"
+        :row-class-name="tableRowClassName"
         @cell-click="cellClik"
-        :key="saleSteelKey"
-        id="salesLogisticsStat_saleSteelAllReport_table"
-        individual-panel
-        @resetTable="reset"
+        @cell-mouse-enter="cellMouse"
+        @cell-mouse-leave="cellLeave"
+        @row-click="rowClick"
+        :cell-style="cellStyle"
       >
         <el-table-column
           width="50"
@@ -117,7 +124,7 @@
         <el-table-column
           prop="orderTime"
           label="订单日期"
-          width="120px"
+          width="110px"
           align="center"
           show-overflow-tooltip
         >
@@ -134,7 +141,7 @@
           prop="carrierName"
           label="承运商"
           align="center"
-          width="100px"
+          width="60px"
           show-overflow-tooltip
         >
         </el-table-column>
@@ -143,7 +150,7 @@
           column-key="capacityNo"
           label="车牌号"
           align="center"
-          width="140px"
+          width="90px"
           show-overflow-tooltip
         >
         </el-table-column>
@@ -168,7 +175,7 @@
           prop="materialNum"
           label="物资件数"
           align="center"
-          width="100px"
+          width="50px"
         >
         </el-table-column>
         <el-table-column
@@ -185,17 +192,13 @@
           show-overflow-tooltip
         >
         </el-table-column>
-        <el-table-column prop="grossWeight" label="毛重" show-overflow-tooltip>
-        </el-table-column>
         <el-table-column
-          prop="grossWeightTime"
-          label="毛重时间"
+          prop="entryGateTime"
+          label="进厂时间"
           width="130px"
           show-overflow-tooltip
         >
         </el-table-column>
-        <el-table-column prop="tareWeight" label="皮重" show-overflow-tooltip>
-        </el-table-column>
         <el-table-column
           prop="tareWeightTime"
           label="皮重时间"
@@ -203,22 +206,26 @@
           show-overflow-tooltip
         >
         </el-table-column>
-        <el-table-column prop="netWeight" label="净重" show-overflow-tooltip>
+        <el-table-column prop="tareWeight" label="皮重" show-overflow-tooltip>
         </el-table-column>
         <el-table-column
-          prop="entryGateTime"
-          label="进厂时间"
+          prop="loadTime"
+          label="装货时间"
           width="130px"
           show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
-          prop="loadTime"
-          label="装货时间"
+          prop="grossWeightTime"
+          label="毛重时间"
           width="130px"
           show-overflow-tooltip
         >
         </el-table-column>
+        <el-table-column prop="grossWeight" label="毛重" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="netWeight" label="净重" show-overflow-tooltip>
+        </el-table-column>
         <el-table-column
           prop="outGateTime"
           label="出厂时间"
@@ -311,28 +318,6 @@
           show-overflow-tooltip
         >
         </el-table-column>
-        <el-table-column
-          prop="operation"
-          label="操作"
-          width="100px"
-          fixed="right"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              @click="checkTrans(scope.row)"
-              v-if="scope.row.outGateTime != null"
-              >轨迹</el-button
-            >
-            <el-button
-              type="text"
-              @click="operation(scope.row)"
-              v-if="scope.row.carStatus != 2"
-              >编辑</el-button
-            >
-          </template>
-        </el-table-column>
       </el-table>
     </div>
     <div>
@@ -664,10 +649,7 @@
           </el-table>
         </div>
         <span slot="footer" class="dialog-footer">
-          <el-button @click="centerDialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="centerDialogVisible = false"
-            >确 定</el-button
-          >
+          <el-button @click="centerDialogVisible = false">返 回</el-button>
         </span>
         <div>
           <vxe-modal
@@ -797,7 +779,6 @@ export default {
         '收货客户电话',
         '金蝶分录ID',
         '是否自提',
-        '操作',
         '订单日期'
       ],
       //钢材多拼车辆线路ID
@@ -854,32 +835,88 @@ export default {
         startPointName: '',
         endPointName: ''
       },
-      saleSteelKey: false
+      saleSteelKey: false,
+      tableRowIndex: '',
+      isRowClick: 0,
+      orgCodeList: [
+        'wuliuyunshubu',
+        'dagangadmin',
+        'shichangxinxibu',
+        'xiaoshouyewuyuan',
+        'zidonghuabu'
+      ],
+      isShowOperate: false
     }
   },
   created() {
+    if (this.orgCodeList.includes(getCookie('orgCode'))) {
+      this.isShowOperate = true
+    }
     this.getSteelReport()
   },
   mounted() {
-    window.onresize = () => {
-      return (() => {
-        this.maxHeight = window.innerHeight - 140
-      })()
-    }
+    this.$nextTick(() => {
+      window.onresize = () => {
+        return (() => {
+          this.maxHeight = window.innerHeight - 150
+        })()
+      }
+    })
   },
   activated() {
-    this.maxHeight = window.innerHeight - 140
+    this.maxHeight = window.innerHeight - 150
   },
   computed: {},
   methods: {
-    reset() {
-      var that = this
-      that.$nextTick(() => {
-        that.saleSteelKey = !that.saleSteelKey
-      })
+    cellStyle({ row, column, rowIndex, columnIndex }) {
+      if (
+        column.property == 'arrivalAddress' ||
+        column.property == 'receiptAddress'
+      ) {
+        return 'color : blue'
+      }
+    },
+    rowClick(row, column, event) {
+      this.steelMap = {}
+      this.tableRowIndex = row.group
+      this.isRowClick = 1
+      this.steelMap = row
+    },
+    tableRowClassName({ row, rowIndex }) {
+      // console.log(row)
+      if (row.group == this.tableRowIndex && this.tableRowIndex != '') {
+        return 'warning-row'
+      }
+    },
+    cellMouse(row, column, cell, event) {
+      if (this.isRowClick == 0) {
+        this.tableRowIndex = row.group
+      }
     },
+    cellLeave(row, column, cell, event) {
+      if (this.isRowClick == 0) {
+        this.tableRowIndex = ''
+      }
+    },
+    // reset() {
+    //   var that = this
+    //   that.$nextTick(() => {
+    //     that.saleSteelKey = !that.saleSteelKey
+    //   })
+    // },
     checkTrans(row) {
-      console.log(row)
+      this.isRowClick = 0
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.error('请点击需要执行更改操作的行!')
+        return
+      }
+      if (typeof row === 'undefined') {
+        row = this.steelMap
+      }
+      if (row.outGateTime == null) {
+        this.$message.error('该车还未出厂,暂无轨迹')
+        return
+      }
       let that = this
       that.axios
         .post('/api/v1/otms/fullPath?orderNumber=' + row.orderNo)
@@ -899,13 +936,14 @@ export default {
         })
     },
     cellClik(row, column, cell, event) {
+      console.log(row)
       if (column.property == 'arrivalAddress') {
         if (row.orderNo && row.arrivalAddress) {
           this.toPhotoClick(row.orderNo, 1)
         }
       }
       if (column.property == 'receiptAddress') {
-        if (row.orderNo && row.arrivalAddress) {
+        if (row.orderNo && row.receiptAddress) {
           this.receipctPhotoClick(row.orderNo, 1)
         }
       }
@@ -921,12 +959,16 @@ export default {
     },
     //筛选
     //筛选客户
-    filterConsignee(value, row, column) {
-      return row.consigneeName === value
-    },
     //点击操作弹出框
     operation(row) {
-      // debugger
+      this.isRowClick = 0
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.error('请点击需要执行更改操作的行!')
+        return
+      }
+      if (typeof row === 'undefined') {
+        row = this.steelMap
+      }
       this.axios
         .post(
           '/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +
@@ -1678,6 +1720,7 @@ export default {
     },
     //查询,输入查询条件
     onclick() {
+      this.isRowClick = 0
       const loading = this.$loading({
         lock: true,
         text: '正在获取数据',
@@ -1713,9 +1756,9 @@ export default {
       }
       if (this.screen1 == '下单客户') {
         consigneeName = this.input1
-      } else if (this.screen == '承运商') {
+      } else if (this.screen1 == '承运商') {
         carrierName = this.input1
-      } else if (this.screen == '车牌号') {
+      } else if (this.screen1 == '车牌号') {
         capacityNo = this.input1
       } else {
         remark = this.input1
@@ -1753,6 +1796,7 @@ export default {
     },
     //获取钢材统计报表
     getSteelReport() {
+      this.isRowClick = 0
       let startTime = null
       let endTime = null
       let carrierSsoId = null
@@ -1836,9 +1880,13 @@ export default {
     margin-top: 20px;
     ::-webkit-scrollbar {
       // width: 20px;
-      height: 30px;
+      height: 20px;
       background-color: transparent;
     }
+    ::v-deep .el-table .el-table__body-wrapper,
+    .el-table__footer-wrapper {
+      border: 20px solid #000000;
+    }
   }
   .dialog {
     .steelMapClass {