luobang 1 gadu atpakaļ
vecāks
revīzija
482718f8ab

+ 1 - 1
build/utils.js

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

+ 10 - 0
src/views/appoint/components/saleContract/saleOrderCoproductCarrier.vue

@@ -22,6 +22,12 @@
                 size="small"
                 >副产品派车</el-button
               >
+              <el-button
+                @click="checkSaleOrderDetails(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >运单详情</el-button
+              >
               <el-button
                 @click="detailclick(scope.row)"
                 type="text"
@@ -102,6 +108,10 @@ export default {
     this.initUrl()
   },
   methods: {
+    checkSaleOrderDetails(saleOrderId) {
+      console.log(saleOrderId)
+      this.$router.push('saleOrderOODetails/' + saleOrderId)
+    },
     initUrl() {
       if (getCookie('orgCode') == 'chengyunshang') {
         this.option4.requestUrl =

+ 274 - 268
src/views/sale/components/transport_order/receiveOrder.vue

@@ -1,13 +1,19 @@
 // 接收运单
 <template>
-  <div >
+  <div>
     <div style="margin:10px">
-       <el-select v-model="condition1" placeholder="请选择筛选条件"  style="width:150px" clearable>
+      <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">
+          :value="item.value"
+        >
         </el-option>
       </el-select>
       <el-input
@@ -17,12 +23,18 @@
         clearable
       >
       </el-input>
-      <el-select v-model="condition2" placeholder="请选择筛选条件" style="width:150px" clearable>
+      <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">
+          :value="item.value"
+        >
         </el-option>
       </el-select>
       <el-input
@@ -209,472 +221,466 @@
   </div>
 </template>
 <script>
-import { getCookie } from "@/utils/util.js";
+import { getCookie } from '@/utils/util.js'
 export default {
   data() {
     return {
-      condition1:null,
-      condition2:null,
-      input1:null,
-      input2:null,
-      options:[
+      condition1: null,
+      condition2: null,
+      input1: null,
+      input2: null,
+      options: [
         {
-          label:"车牌号",
-          value:"capacityNumber"
-        }, 
-        {
-          label:"发货单位",
-          value:"shipperName"
+          label: '车牌号',
+          value: 'capacityNumber'
         },
-         {
-          label:"收货单位",
-          value:"consigneeCompanyName"
+        {
+          label: '发货单位',
+          value: 'shipperName'
         },
+        {
+          label: '收货单位',
+          value: 'consigneeCompanyName'
+        }
       ],
       shiyHeigth: 190,
       isHeigth: true,
       pageSize: 100,
       isKuang: false,
       inputTruck: null,
-      inputText: "",
+      inputText: '',
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-          "",
+        requestUrl: ''
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-          "",
+        requestUrl: ''
       },
       option3: {
         // option3请求数据的地址
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-          "",
-        selectionType: "select",
-        mapList: [],
+        requestUrl: '',
+        selectionType: 'select',
+        mapList: []
       },
       truck: {
-        requestUrl: "",
-        selectionType: "radio",
+        requestUrl: '',
+        selectionType: 'radio'
       },
-      activeName: "third",
+      activeName: 'third',
       //记录旧的row对象(已接收)
-      oldRow: "",
+      oldRow: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
       oldRowCount: 1,
       //记录旧的row对象(已拒绝)
-      oldRow1: "",
+      oldRow1: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已拒绝)
       oldRowCount1: 1,
       //记录旧的row对象(未接收)
-      oldRow2: "",
+      oldRow2: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
       oldRowCount2: 1,
       tableHead: [
         {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
+          prop: 'materialName',
+          label: '物资名称',
+          width: 150
         },
         {
-          prop: "specificationModel",
-          label: "规格型号",
-          width: 150,
+          prop: 'specificationModel',
+          label: '规格型号',
+          width: 150
         },
         {
-          prop: "materialNumber",
-          label: "物资件数",
-          width: 100,
+          prop: 'materialNumber',
+          label: '物资件数',
+          width: 100
         },
         {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 100,
-        },
+          prop: 'materialWeight',
+          label: '物资重量',
+          width: 100
+        }
       ],
       tableData: [],
       tableData1: [],
       tableData2: [],
       capacityId: null,
       dialogTableVisible: false,
-      orderId: null,
-    };
+      orderId: null
+    }
   },
   created() {
-    if (getCookie("orgCode") == "chengyunshang") {
+    if (getCookie('orgCode') == 'chengyunshang') {
       this.option1.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-        getCookie("userId") +
-        "&t=" +
-        new Date();
+        '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=' +
+        getCookie('userId') +
+        '&t=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-        getCookie("userId") +
-        "&t=" +
-        new Date();
+        '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=' +
+        getCookie('userId') +
+        '&t=' +
+        new Date()
       this.option3.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-        getCookie("userId") +
-        "&t=" +
-        new Date();
+        '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=' +
+        getCookie('userId') +
+        '&t=' +
+        new Date()
     } else {
       this.option1.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-        "" +
-        "&t=" +
-        new Date();
+        '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=' +
+        '' +
+        '&t=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-        "" +
-        "&t=" +
-        new Date();
+        '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=' +
+        '' +
+        '&t=' +
+        new Date()
       this.option3.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-        "" +
-        "&t=" +
-        new Date();
+        '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=' +
+        '' +
+        '&t=' +
+        new Date()
     }
   },
   methods: {
     onClickTruck() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") +
-          "&index=" +
-          this.inputTruck;
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
+          getCookie('userId') +
+          '&index=' +
+          this.inputTruck
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
           null +
-          "&index=" +
-          this.inputTruck;
+          '&index=' +
+          this.inputTruck
       }
     },
     getRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
         this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
         this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
       } else {
         this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
         this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
         this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
       }
     },
     selectionChange(selection) {
-      this.option3.mapList = selection;
+      this.option3.mapList = selection
     },
     batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
-          type: "warning",
-          message: "请先选择要关闭的订单!",
-        });
+          type: 'warning',
+          message: '请先选择要关闭的订单!'
+        })
       } else {
-        this.$confirm("是否关闭这些订单", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-          center: true,
+        this.$confirm('是否关闭这些订单', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+          center: true
         })
           .then(() => {
             //初始化maplist
-            var mapList = [];
-            this.option3.mapList.forEach((item) => {
+            var mapList = []
+            this.option3.mapList.forEach(item => {
               //初始化mapItem
               var mapItem = {
                 //销售订单物资中间表id
-                orderId: 0,
-              };
-              mapItem.orderId = item.orderId;
-              mapList.push(mapItem);
-            });
+                orderId: 0
+              }
+              mapItem.orderId = item.orderId
+              mapList.push(mapItem)
+            })
             this.$message({
-              type: "success",
-              message: "关闭成功!",
-            });
+              type: 'success',
+              message: '关闭成功!'
+            })
             this.axios
-              .post("/api/v1/oms/batchCloseOrder", mapList)
-              .then((res) => {
-                if (res.data.code == "200") {
-                  this.getRequestUrl();
+              .post('/api/v1/oms/batchCloseOrder', mapList)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.getRequestUrl()
                 }
-              });
+              })
           })
           .catch(() => {
             this.$message({
-              type: "info",
-              message: "取消关闭!",
-            });
-          });
+              type: 'info',
+              message: '取消关闭!'
+            })
+          })
       }
     },
     refresh() {
-      this.getRequestUrl();
+      this.getRequestUrl()
     },
     handleClose(done) {
-      done();
-      this.$message.info("取消修改运力");
+      done()
+      this.$message.info('取消修改运力')
     },
     updateCapacity(row) {
-      console.log("更新车牌号");
-      this.getTruckRequestUrl();
-      this.orderId = row.orderId;
-      this.dialogTableVisible = true;
-      console.log(row.orderId);
+      console.log('更新车牌号')
+      this.getTruckRequestUrl()
+      this.orderId = row.orderId
+      this.dialogTableVisible = true
+      console.log(row.orderId)
     },
     getTruckRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") +
-          "&test=" +
-          new Date();
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
+          getCookie('userId') +
+          '&test=' +
+          new Date()
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
           null +
-          "&test=" +
-          new Date();
+          '&test=' +
+          new Date()
       }
     },
     updateClick(scope) {
-      this.getTruckRequestUrl();
-      this.orderId = scope.row.orderId;
-      this.dialogTableVisible = true;
-      console.log(scope.row.orderId);
+      this.getTruckRequestUrl()
+      this.orderId = scope.row.orderId
+      this.dialogTableVisible = true
+      console.log(scope.row.orderId)
     },
     currentRadioChange1(row) {
-      console.log(row);
-      this.capacityId = row.capacityId;
+      console.log(row)
+      this.capacityId = row.capacityId
     },
     updateTruckCapacity() {
       if (this.capacityId == null) {
-        this.$message.error("未选中运力");
-        return;
+        this.$message.error('未选中运力')
+        return
       }
       this.axios
-        .post("/api/v1/oms/updateCapacityId", {
+        .post('/api/v1/oms/updateCapacityId', {
           capacityId: this.capacityId,
-          orderId: this.orderId,
+          orderId: this.orderId
         })
-        .then((res) => {
-          if (res.data.code == "200") {
-            this.$message.success("修改运力成功");
-            this.getRequestUrl();
-            this.dialogTableVisible = false;
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('修改运力成功')
+            this.getRequestUrl()
+            this.dialogTableVisible = false
           } else {
-            this.$message.error("修改运力失败");
+            this.$message.error('修改运力失败')
           }
-        });
+        })
     },
-        async onClick() {
-       let option={
-        requestQuery:{}
+    async onClick() {
+      let option = {
+        requestQuery: {}
       }
-      option.requestQuery[this.condition1]=[];
-      option.requestQuery[this.condition2]=[];
-      if(this.condition1 == this.condition2){
-         option.requestQuery[this.condition1]=[this.input1,this.input2]
-      }else{
-         option.requestQuery[this.condition1]=[this.input1]
-         option.requestQuery[this.condition2]=[this.input2]
+      option.requestQuery[this.condition1] = []
+      option.requestQuery[this.condition2] = []
+      if (this.condition1 == this.condition2) {
+        option.requestQuery[this.condition1] = [this.input1, this.input2]
+      } else {
+        option.requestQuery[this.condition1] = [this.input1]
+        option.requestQuery[this.condition2] = [this.input2]
       }
-      if (getCookie("orgCode") == "chengyunshang") {
-        if (this.activeName == "first") {
+      if (getCookie('orgCode') == 'chengyunshang') {
+        if (this.activeName == 'first') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-            getCookie("userId")
-          await this.setOption("option1",option);
-        } else if (this.activeName == "second") {
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option1', option)
+        } else if (this.activeName == 'second') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-            getCookie("userId")
-          await this.setOption("option2",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option2', option)
         } else {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-            getCookie("userId") 
-            await this.setOption("option3",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option3', option)
         }
       } else {
-        if (this.activeName == "first") {
+        if (this.activeName == 'first') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-            "" 
-            await this.setOption("option1",option);
-        } else if (this.activeName == "second") {
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=' +
+            ''
+          await this.setOption('option1', option)
+        } else if (this.activeName == 'second') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-            ""
-            await this.setOption("option2",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=' +
+            ''
+          await this.setOption('option2', option)
         } else {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-            "" 
-           await this.setOption("option3",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=' +
+            ''
+          await this.setOption('option3', option)
         }
       }
     },
-    setOption(prop,option){
-        return new Promise((resolve,reject)=>{
-          this.$set(this,prop,option)
-          resolve("更新表格数据成功!");
-        });
+    setOption(prop, option) {
+      return new Promise((resolve, reject) => {
+        this.$set(this, prop, option)
+        resolve('更新表格数据成功!')
+      })
     },
     // -------查看物资详情 (已接收)
     detailclick(row) {
       // 记录重复点击次数
       if (this.oldRow === row) {
-        this.oldRowCount += 1;
+        this.oldRowCount += 1
       }
       // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
+      this.$refs.table.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
+      if (this.oldRow != '') {
         if (this.oldRow != row) {
           if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
+            this.$refs.table.toggleRowExpansion(this.oldRow)
           } else {
-            this.oldRowCount = 1;
+            this.oldRowCount = 1
           }
         } else {
-          this.oldRow = null;
-          return;
+          this.oldRow = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow = row;
+      this.oldRow = row
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data", res.data.data);
-          this.tableData = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          console.log('res.data.data', res.data.data)
+          this.tableData = res.data.data
+        })
     },
 
     // -------查看物资详情(已拒绝)
     detailclick1(row) {
       // 记录重复点击次数
       if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
+        this.oldRowCount1 += 1
       }
       // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
+      this.$refs.table1.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
+      if (this.oldRow1 != '') {
         if (this.oldRow1 != row) {
           if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow1);
+            this.$refs.table1.toggleRowExpansion(this.oldRow1)
           } else {
-            this.oldRowCount1 = 1;
+            this.oldRowCount1 = 1
           }
         } else {
-          this.oldRow1 = null;
-          return;
+          this.oldRow1 = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow1 = row;
+      this.oldRow1 = row
       // 根据销售订单物资中间表id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data", res.data.data);
-          this.tableData1 = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          console.log('res.data.data', res.data.data)
+          this.tableData1 = res.data.data
+        })
     },
 
     // -------查看物资详情(未接收)
     detailclick2(row) {
       // 记录重复点击次数
       if (this.oldRow2 === row) {
-        this.oldRowCount2 += 1;
+        this.oldRowCount2 += 1
       }
       // 切换当前详情表
-      this.$refs.table2.toggleRowExpansion(row);
+      this.$refs.table2.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow2 != "") {
+      if (this.oldRow2 != '') {
         if (this.oldRow2 != row) {
           if (this.oldRowCount2 % 2 === 1) {
-            this.$refs.table2.toggleRowExpansion(this.oldRow2);
+            this.$refs.table2.toggleRowExpansion(this.oldRow2)
           } else {
-            this.oldRowCount2 = 1;
+            this.oldRowCount2 = 1
           }
         } else {
-          this.oldRow2 = null;
-          return;
+          this.oldRow2 = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow2 = row;
+      this.oldRow2 = row
       // 根据销售订单物资中间表id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          this.tableData2 = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          this.tableData2 = res.data.data
+        })
     },
     //关闭选中行的订单
     closeOrder(row) {
-      this.$confirm("是否关闭", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
+      this.$confirm('是否关闭', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
       })
         .then(() => {
           this.$message({
-            type: "success",
-            message: "关闭成功!",
-          });
+            type: 'success',
+            message: '关闭成功!'
+          })
           this.axios
-            .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-            .then((res) => {
-              if (res.data.code == "200") {
-                this.getRequestUrl();
+            .post('/api/v1/oms/closeOrder?orderId=' + row.orderId)
+            .then(res => {
+              if (res.data.code == '200') {
+                this.getRequestUrl()
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消关闭!",
-          });
-        });
-    },
-  },
-};
+            type: 'info',
+            message: '取消关闭!'
+          })
+        })
+    }
+  }
+}
 </script>
 <style lang="scss" scode>
 .steel_inbound {

+ 255 - 289
src/views/sale/components/transport_order/saleChemicalCokeOrder.vue

@@ -1,13 +1,19 @@
 // 接收化产焦炭运单
 <template>
-  <div >
+  <div>
     <div style="margin:10px">
-       <el-select v-model="condition1" placeholder="请选择筛选条件"  style="width:150px" clearable>
+      <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">
+          :value="item.value"
+        >
         </el-option>
       </el-select>
       <el-input
@@ -17,12 +23,18 @@
         clearable
       >
       </el-input>
-      <el-select v-model="condition2" placeholder="请选择筛选条件" style="width:150px" clearable>
+      <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">
+          :value="item.value"
+        >
         </el-option>
       </el-select>
       <el-input
@@ -209,480 +221,434 @@
   </div>
 </template>
 <script>
-import { getCookie } from "@/utils/util.js";
+import { getCookie } from '@/utils/util.js'
 export default {
   data() {
     return {
-      condition1:null,
-      condition2:null,
-      input1:null,
-      input2:null,
-      options:[
+      condition1: null,
+      condition2: null,
+      input1: null,
+      input2: null,
+      options: [
         {
-          label:"车牌号",
-          value:"capacityNumber"
-        }, 
-        {
-          label:"发货单位",
-          value:"shipperName"
+          label: '车牌号',
+          value: 'capacityNumber'
         },
-         {
-          label:"收货单位",
-          value:"consigneeCompanyName"
+        {
+          label: '发货单位',
+          value: 'shipperName'
         },
+        {
+          label: '收货单位',
+          value: 'consigneeCompanyName'
+        }
       ],
       shiyHeigth: 190,
       isHeigth: true,
       pageSize: 100,
       isKuang: false,
       inputTruck: null,
-      inputText: "",
+      inputText: '',
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-          "",
+        requestUrl: ''
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-          "",
+        requestUrl: ''
       },
       option3: {
         // option3请求数据的地址
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
-          "",
-        selectionType: "select",
-        mapList: [],
+        requestUrl: '',
+        selectionType: 'select',
+        mapList: []
       },
       truck: {
-        requestUrl: "",
-        selectionType: "radio",
+        requestUrl: '',
+        selectionType: 'radio'
       },
-      activeName: "third",
+      activeName: 'third',
       //记录旧的row对象(已接收)
-      oldRow: "",
+      oldRow: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
       oldRowCount: 1,
       //记录旧的row对象(已拒绝)
-      oldRow1: "",
+      oldRow1: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已拒绝)
       oldRowCount1: 1,
       //记录旧的row对象(未接收)
-      oldRow2: "",
+      oldRow2: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
       oldRowCount2: 1,
       tableHead: [
         {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
+          prop: 'materialName',
+          label: '物资名称',
+          width: 150
         },
         {
-          prop: "specificationModel",
-          label: "规格型号",
-          width: 150,
+          prop: 'specificationModel',
+          label: '规格型号',
+          width: 150
         },
         {
-          prop: "materialNumber",
-          label: "物资件数",
-          width: 100,
+          prop: 'materialNumber',
+          label: '物资件数',
+          width: 100
         },
         {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 100,
-        },
+          prop: 'materialWeight',
+          label: '物资重量',
+          width: 100
+        }
       ],
       tableData: [],
       tableData1: [],
       tableData2: [],
       capacityId: null,
       dialogTableVisible: false,
-      orderId: null,
-    };
+      orderId: null
+    }
   },
   created() {
-    if (getCookie("orgCode") == "chengyunshang") {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
-      } else {
-        this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
-      }
-    } else {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
-      } else {
-        this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
-      }
-    }
+    this.getRequestUrl()
   },
 
   methods: {
     onClickTruck() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") +
-          "&index=" +
-          this.inputTruck;
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
+          getCookie('userId') +
+          '&index=' +
+          this.inputTruck
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
           null +
-          "&index=" +
-          this.inputTruck;
+          '&index=' +
+          this.inputTruck
       }
     },
     getRequestUrl() {
-      if(getCookie("orgCode")=="chengyunshang"){
-      this.option1.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-        getCookie("userId") +
-        "&t=" +
-        new Date();
-      this.option2.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-        getCookie("userId") +
-        "&t=" +
-        new Date();
-      this.option3.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
-        getCookie("userId") +
-        "&t=" +
-        new Date();
-      }else{
-         this.option1.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-        "" +
-        "&t=" +
-        new Date();
-      this.option2.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-       ""+
-        "&t=" +
-        new Date();
-      this.option3.requestUrl =
-        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
-        "" +
-        "&t=" +
-        new Date();
+      if (getCookie('orgCode') == 'chengyunshang') {
+        this.option1.requestUrl =
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
+        this.option2.requestUrl =
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
+        this.option3.requestUrl =
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
+      } else {
+        this.option1.requestUrl =
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
+        this.option2.requestUrl =
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
+        this.option3.requestUrl =
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
       }
     },
     selectionChange(selection) {
-      this.option3.mapList = selection;
+      this.option3.mapList = selection
     },
     batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
-          type: "warning",
-          message: "请先选择要关闭的订单!",
-        });
+          type: 'warning',
+          message: '请先选择要关闭的订单!'
+        })
       } else {
-        this.$confirm("是否关闭这些订单", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-          center: true,
+        this.$confirm('是否关闭这些订单', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+          center: true
         })
           .then(() => {
             //初始化maplist
-            var mapList = [];
-            this.option3.mapList.forEach((item) => {
+            var mapList = []
+            this.option3.mapList.forEach(item => {
               //初始化mapItem
               var mapItem = {
                 //销售订单物资中间表id
-                orderId: 0,
-              };
-              mapItem.orderId = item.orderId;
-              mapList.push(mapItem);
-            });
+                orderId: 0
+              }
+              mapItem.orderId = item.orderId
+              mapList.push(mapItem)
+            })
             this.$message({
-              type: "success",
-              message: "关闭成功!",
-            });
+              type: 'success',
+              message: '关闭成功!'
+            })
             this.axios
-              .post("/api/v1/oms/batchCloseOrder", mapList)
-              .then((res) => {
-                if (res.data.code == "200") {
-                  this.getRequestUrl();
+              .post('/api/v1/oms/batchCloseOrder', mapList)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.getRequestUrl()
                 }
-              });
+              })
           })
           .catch(() => {
             this.$message({
-              type: "info",
-              message: "取消关闭!",
-            });
-          });
+              type: 'info',
+              message: '取消关闭!'
+            })
+          })
       }
     },
     refresh() {
-      this.getRequestUrl();
+      this.getRequestUrl()
     },
     handleClose(done) {
-      done();
-      this.$message.info("取消修改运力");
+      done()
+      this.$message.info('取消修改运力')
     },
     updateCapacity(row) {
-      this.getTruckRequestUrl();
-      this.orderId = row.orderId;
-      this.dialogTableVisible = true;
-      console.log(row.orderId);
+      this.getTruckRequestUrl()
+      this.orderId = row.orderId
+      this.dialogTableVisible = true
+      console.log(row.orderId)
     },
     getTruckRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") +
-          "&test=" +
-          new Date();
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
+          getCookie('userId') +
+          '&test=' +
+          new Date()
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
           null +
-          "&test=" +
-          new Date();
+          '&test=' +
+          new Date()
       }
     },
     updateClick(scope) {
-      this.getTruckRequestUrl();
-      this.orderId = scope.row.orderId;
-      this.dialogTableVisible = true;
-      console.log(scope.row.orderId);
+      this.getTruckRequestUrl()
+      this.orderId = scope.row.orderId
+      this.dialogTableVisible = true
+      console.log(scope.row.orderId)
     },
     currentRadioChange1(row) {
-      console.log(row);
-      this.capacityId = row.capacityId;
+      console.log(row)
+      this.capacityId = row.capacityId
     },
     updateTruckCapacity() {
       if (this.capacityId == null) {
-        this.$message.error("未选中运力");
-        return;
+        this.$message.error('未选中运力')
+        return
       }
       this.axios
-        .post("/api/v1/oms/updateCapacityId", {
+        .post('/api/v1/oms/updateCapacityId', {
           capacityId: this.capacityId,
-          orderId: this.orderId,
+          orderId: this.orderId
         })
-        .then((res) => {
-          if (res.data.code == "200") {
-            this.$message.success("修改运力成功");
-            this.getRequestUrl();
-            this.dialogTableVisible = false;
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('修改运力成功')
+            this.getRequestUrl()
+            this.dialogTableVisible = false
           } else {
-            this.$message.error("修改运力失败");
+            this.$message.error('修改运力失败')
           }
-        });
+        })
     },
     async onClick() {
-       let option={
-        requestQuery:{}
+      let option = {
+        requestQuery: {}
       }
-      option.requestQuery[this.condition1]=[];
-      option.requestQuery[this.condition2]=[];
-      if(this.condition1 == this.condition2){
-         option.requestQuery[this.condition1]=[this.input1,this.input2]
-      }else{
-         option.requestQuery[this.condition1]=[this.input1]
-         option.requestQuery[this.condition2]=[this.input2]
+      option.requestQuery[this.condition1] = []
+      option.requestQuery[this.condition2] = []
+      if (this.condition1 == this.condition2) {
+        option.requestQuery[this.condition1] = [this.input1, this.input2]
+      } else {
+        option.requestQuery[this.condition1] = [this.input1]
+        option.requestQuery[this.condition2] = [this.input2]
       }
-      if (getCookie("orgCode") == "chengyunshang") {
-        if (this.activeName == "first") {
+      if (getCookie('orgCode') == 'chengyunshang') {
+        if (this.activeName == 'first') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-            getCookie("userId")
-          await this.setOption("option1",option);
-        } else if (this.activeName == "second") {
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option1', option)
+        } else if (this.activeName == 'second') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-            getCookie("userId")
-          await this.setOption("option2",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option2', option)
         } else {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
-            getCookie("userId") 
-            await this.setOption("option3",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option3', option)
         }
       } else {
-        if (this.activeName == "first") {
+        if (this.activeName == 'first') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-            "" 
-            await this.setOption("option1",option);
-        } else if (this.activeName == "second") {
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=' +
+            ''
+          await this.setOption('option1', option)
+        } else if (this.activeName == 'second') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-            ""
-            await this.setOption("option2",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=' +
+            ''
+          await this.setOption('option2', option)
         } else {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
-            "" 
-           await this.setOption("option3",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=' +
+            ''
+          await this.setOption('option3', option)
         }
       }
     },
-    setOption(prop,option){
-        return new Promise((resolve,reject)=>{
-          this.$set(this,prop,option)
-          resolve("更新表格数据成功!");
-        });
+    setOption(prop, option) {
+      return new Promise((resolve, reject) => {
+        this.$set(this, prop, option)
+        resolve('更新表格数据成功!')
+      })
     },
     // -------查看物资详情 (已接收)
     detailclick(row) {
       // 记录重复点击次数
       if (this.oldRow === row) {
-        this.oldRowCount += 1;
+        this.oldRowCount += 1
       }
       // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
+      this.$refs.table.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
+      if (this.oldRow != '') {
         if (this.oldRow != row) {
           if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
+            this.$refs.table.toggleRowExpansion(this.oldRow)
           } else {
-            this.oldRowCount = 1;
+            this.oldRowCount = 1
           }
         } else {
-          this.oldRow = null;
-          return;
+          this.oldRow = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow = row;
+      this.oldRow = row
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data", res.data.data);
-          this.tableData = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          console.log('res.data.data', res.data.data)
+          this.tableData = res.data.data
+        })
     },
 
     // -------查看物资详情(已拒绝)
     detailclick1(row) {
       // 记录重复点击次数
       if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
+        this.oldRowCount1 += 1
       }
       // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
+      this.$refs.table1.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
+      if (this.oldRow1 != '') {
         if (this.oldRow1 != row) {
           if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow1);
+            this.$refs.table1.toggleRowExpansion(this.oldRow1)
           } else {
-            this.oldRowCount1 = 1;
+            this.oldRowCount1 = 1
           }
         } else {
-          this.oldRow1 = null;
-          return;
+          this.oldRow1 = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow1 = row;
+      this.oldRow1 = row
       // 根据销售订单物资中间表id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data", res.data.data);
-          this.tableData1 = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          console.log('res.data.data', res.data.data)
+          this.tableData1 = res.data.data
+        })
     },
 
     // -------查看物资详情(未接收)
     detailclick2(row) {
       // 记录重复点击次数
       if (this.oldRow2 === row) {
-        this.oldRowCount2 += 1;
+        this.oldRowCount2 += 1
       }
       // 切换当前详情表
-      this.$refs.table2.toggleRowExpansion(row);
+      this.$refs.table2.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow2 != "") {
+      if (this.oldRow2 != '') {
         if (this.oldRow2 != row) {
           if (this.oldRowCount2 % 2 === 1) {
-            this.$refs.table2.toggleRowExpansion(this.oldRow2);
+            this.$refs.table2.toggleRowExpansion(this.oldRow2)
           } else {
-            this.oldRowCount2 = 1;
+            this.oldRowCount2 = 1
           }
         } else {
-          this.oldRow2 = null;
-          return;
+          this.oldRow2 = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow2 = row;
+      this.oldRow2 = row
       // 根据销售订单物资中间表id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          this.tableData2 = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          this.tableData2 = res.data.data
+        })
     },
     //关闭选中行的订单
     closeOrder(row) {
-      this.$confirm("是否关闭", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
+      this.$confirm('是否关闭', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
       })
         .then(() => {
           this.$message({
-            type: "success",
-            message: "关闭成功!",
-          });
+            type: 'success',
+            message: '关闭成功!'
+          })
           this.axios
-            .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-            .then((res) => {
-              if (res.data.code == "200") {
-                this.getRequestUrl();
+            .post('/api/v1/oms/closeOrder?orderId=' + row.orderId)
+            .then(res => {
+              if (res.data.code == '200') {
+                this.getRequestUrl()
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消关闭!",
-          });
-        });
-    },
-  },
-};
+            type: 'info',
+            message: '取消关闭!'
+          })
+        })
+    }
+  }
+}
 </script>
 <style lang="scss" scode>
 .steel_inbound {

+ 251 - 282
src/views/sale/components/transport_order/saleCoproductOrder.vue

@@ -2,12 +2,18 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-             <el-select v-model="condition1" placeholder="请选择筛选条件"  style="width:150px" clearable>
+      <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">
+          :value="item.value"
+        >
         </el-option>
       </el-select>
       <el-input
@@ -17,12 +23,18 @@
         clearable
       >
       </el-input>
-      <el-select v-model="condition2" placeholder="请选择筛选条件" style="width:150px" clearable>
+      <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">
+          :value="item.value"
+        >
         </el-option>
       </el-select>
       <el-input
@@ -209,480 +221,437 @@
   </div>
 </template>
 <script>
-import { getCookie } from "@/utils/util.js";
+import { getCookie } from '@/utils/util.js'
 export default {
   data() {
     return {
-            condition1:null,
-      condition2:null,
-      input1:null,
-      input2:null,
-      options:[
+      condition1: null,
+      condition2: null,
+      input1: null,
+      input2: null,
+      options: [
         {
-          label:"车牌号",
-          value:"capacityNumber"
-        }, 
-        {
-          label:"发货单位",
-          value:"shipperName"
+          label: '车牌号',
+          value: 'capacityNumber'
         },
-         {
-          label:"收货单位",
-          value:"consigneeCompanyName"
+        {
+          label: '发货单位',
+          value: 'shipperName'
         },
+        {
+          label: '收货单位',
+          value: 'consigneeCompanyName'
+        }
       ],
       shiyHeigth: 190,
       isHeigth: true,
       pageSize: 100,
       isKuang: false,
       inputTruck: null,
-      inputText: "",
+      inputText: '',
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-          "",
+        requestUrl: ''
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-          "",
+        requestUrl: ''
       },
       option3: {
         // option3请求数据的地址
-        requestUrl:
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-          "",
-        selectionType: "select",
-        mapList: [],
+        requestUrl: '',
+        selectionType: 'select',
+        mapList: []
       },
       truck: {
-        requestUrl: "",
-        selectionType: "radio",
+        requestUrl: '',
+        selectionType: 'radio'
       },
-      activeName: "third",
+      activeName: 'third',
       //记录旧的row对象(已接收)
-      oldRow: "",
+      oldRow: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
       oldRowCount: 1,
       //记录旧的row对象(已拒绝)
-      oldRow1: "",
+      oldRow1: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已拒绝)
       oldRowCount1: 1,
       //记录旧的row对象(未接收)
-      oldRow2: "",
+      oldRow2: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
       oldRowCount2: 1,
       tableHead: [
         {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
+          prop: 'materialName',
+          label: '物资名称',
+          width: 150
         },
         {
-          prop: "specificationModel",
-          label: "规格型号",
-          width: 150,
+          prop: 'specificationModel',
+          label: '规格型号',
+          width: 150
         },
         {
-          prop: "materialNumber",
-          label: "物资件数",
-          width: 100,
+          prop: 'materialNumber',
+          label: '物资件数',
+          width: 100
         },
         {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 100,
-        },
+          prop: 'materialWeight',
+          label: '物资重量',
+          width: 100
+        }
       ],
       tableData: [],
       tableData1: [],
       tableData2: [],
       capacityId: null,
       dialogTableVisible: false,
-      orderId: null,
-    };
+      orderId: null
+    }
   },
   created() {
-    if (getCookie("orgCode") == "chengyunshang") {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
-      } else {
-        this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
-      }
-    } else {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
-      } else {
-        this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
-      }
-    }
+    this.getRequestUrl()
   },
   methods: {
     onClickTruck() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") +
-          "&index=" +
-          this.inputTruck;
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
+          getCookie('userId') +
+          '&index=' +
+          this.inputTruck
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
           null +
-          "&index=" +
-          this.inputTruck;
+          '&index=' +
+          this.inputTruck
       }
     },
     getRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
         this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
         this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-          getCookie("userId") +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=' +
+          getCookie('userId') +
+          '&t=' +
+          new Date()
       } else {
         this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
         this.option2.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
         this.option3.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-          "" +
-          "&t=" +
-          new Date();
+          '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=' +
+          '' +
+          '&t=' +
+          new Date()
       }
     },
     selectionChange(selection) {
-      this.option3.mapList = selection;
+      this.option3.mapList = selection
     },
     batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
-          type: "warning",
-          message: "请先选择要关闭的订单!",
-        });
+          type: 'warning',
+          message: '请先选择要关闭的订单!'
+        })
       } else {
-        this.$confirm("是否关闭这些订单", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-          center: true,
+        this.$confirm('是否关闭这些订单', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+          center: true
         })
           .then(() => {
             //初始化maplist
-            var mapList = [];
-            this.option3.mapList.forEach((item) => {
+            var mapList = []
+            this.option3.mapList.forEach(item => {
               //初始化mapItem
               var mapItem = {
                 //销售订单物资中间表id
-                orderId: 0,
-              };
-              mapItem.orderId = item.orderId;
-              mapList.push(mapItem);
-            });
+                orderId: 0
+              }
+              mapItem.orderId = item.orderId
+              mapList.push(mapItem)
+            })
             this.$message({
-              type: "success",
-              message: "关闭成功!",
-            });
+              type: 'success',
+              message: '关闭成功!'
+            })
             this.axios
-              .post("/api/v1/oms/batchCloseOrder", mapList)
-              .then((res) => {
-                if (res.data.code == "200") {
-                  this.getRequestUrl();
+              .post('/api/v1/oms/batchCloseOrder', mapList)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.getRequestUrl()
                 }
-              });
+              })
           })
           .catch(() => {
             this.$message({
-              type: "info",
-              message: "取消关闭!",
-            });
-          });
+              type: 'info',
+              message: '取消关闭!'
+            })
+          })
       }
     },
     refresh() {
-      this.getRequestUrl();
+      this.getRequestUrl()
     },
     handleClose(done) {
-      done();
-      this.$message.info("取消修改运力");
+      done()
+      this.$message.info('取消修改运力')
     },
     updateCapacity(row) {
-      console.log("更新车牌号");
-      this.getTruckRequestUrl();
-      this.orderId = row.orderId;
-      this.dialogTableVisible = true;
-      console.log(row.orderId);
+      console.log('更新车牌号')
+      this.getTruckRequestUrl()
+      this.orderId = row.orderId
+      this.dialogTableVisible = true
+      console.log(row.orderId)
     },
     getTruckRequestUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") +
-          "&test=" +
-          new Date();
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
+          getCookie('userId') +
+          '&test=' +
+          new Date()
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=' +
           null +
-          "&test=" +
-          new Date();
+          '&test=' +
+          new Date()
       }
     },
     updateClick(scope) {
-      this.getTruckRequestUrl();
-      this.orderId = scope.row.orderId;
-      this.dialogTableVisible = true;
-      console.log(scope.row.orderId);
+      this.getTruckRequestUrl()
+      this.orderId = scope.row.orderId
+      this.dialogTableVisible = true
+      console.log(scope.row.orderId)
     },
     currentRadioChange1(row) {
-      console.log(row);
-      this.capacityId = row.capacityId;
+      console.log(row)
+      this.capacityId = row.capacityId
     },
     updateTruckCapacity() {
       if (this.capacityId == null) {
-        this.$message.error("未选中运力");
-        return;
+        this.$message.error('未选中运力')
+        return
       }
       this.axios
-        .post("/api/v1/oms/updateCapacityId", {
+        .post('/api/v1/oms/updateCapacityId', {
           capacityId: this.capacityId,
-          orderId: this.orderId,
+          orderId: this.orderId
         })
-        .then((res) => {
-          if (res.data.code == "200") {
-            this.$message.success("修改运力成功");
-            this.getRequestUrl();
-            this.dialogTableVisible = false;
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('修改运力成功')
+            this.getRequestUrl()
+            this.dialogTableVisible = false
           } else {
-            this.$message.error("修改运力失败");
+            this.$message.error('修改运力失败')
           }
-        });
+        })
     },
     async onClick() {
-       let option={
-        requestQuery:{}
+      let option = {
+        requestQuery: {}
       }
-      option.requestQuery[this.condition1]=[];
-      option.requestQuery[this.condition2]=[];
-      if(this.condition1 == this.condition2){
-         option.requestQuery[this.condition1]=[this.input1,this.input2]
-      }else{
-         option.requestQuery[this.condition1]=[this.input1]
-         option.requestQuery[this.condition2]=[this.input2]
+      option.requestQuery[this.condition1] = []
+      option.requestQuery[this.condition2] = []
+      if (this.condition1 == this.condition2) {
+        option.requestQuery[this.condition1] =
+          this.input1 != null && this.input1 != ''
+            ? [this.input1, this.input2]
+            : []
+      } else {
+        option.requestQuery[this.condition1] = [this.input1]
+        option.requestQuery[this.condition2] = [this.input2]
       }
-      if (getCookie("orgCode") == "chengyunshang") {
-        if (this.activeName == "first") {
+      if (getCookie('orgCode') == 'chengyunshang') {
+        if (this.activeName == 'first') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-            getCookie("userId")
-          await this.setOption("option1",option);
-        } else if (this.activeName == "second") {
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option1', option)
+        } else if (this.activeName == 'second') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-            getCookie("userId")
-          await this.setOption("option2",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option2', option)
         } else {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-            getCookie("userId") 
-            await this.setOption("option3",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=' +
+            getCookie('userId')
+          await this.setOption('option3', option)
         }
       } else {
-        if (this.activeName == "first") {
+        if (this.activeName == 'first') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-            "" 
-            await this.setOption("option1",option);
-        } else if (this.activeName == "second") {
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=' +
+            ''
+          await this.setOption('option1', option)
+        } else if (this.activeName == 'second') {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-            ""
-            await this.setOption("option2",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=' +
+            ''
+          await this.setOption('option2', option)
         } else {
           option.requestUrl =
-            "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-            "" 
-           await this.setOption("option3",option);
+            '/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=' +
+            ''
+          await this.setOption('option3', option)
         }
       }
     },
-    setOption(prop,option){
-        return new Promise((resolve,reject)=>{
-          this.$set(this,prop,option)
-          resolve("更新表格数据成功!");
-        });
+    setOption(prop, option) {
+      return new Promise((resolve, reject) => {
+        this.$set(this, prop, option)
+        resolve('更新表格数据成功!')
+      })
     },
     // -------查看物资详情 (已接收)
     detailclick(row) {
       // 记录重复点击次数
       if (this.oldRow === row) {
-        this.oldRowCount += 1;
+        this.oldRowCount += 1
       }
       // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
+      this.$refs.table.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
+      if (this.oldRow != '') {
         if (this.oldRow != row) {
           if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
+            this.$refs.table.toggleRowExpansion(this.oldRow)
           } else {
-            this.oldRowCount = 1;
+            this.oldRowCount = 1
           }
         } else {
-          this.oldRow = null;
-          return;
+          this.oldRow = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow = row;
+      this.oldRow = row
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data", res.data.data);
-          this.tableData = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          console.log('res.data.data', res.data.data)
+          this.tableData = res.data.data
+        })
     },
 
     // -------查看物资详情(已拒绝)
     detailclick1(row) {
       // 记录重复点击次数
       if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
+        this.oldRowCount1 += 1
       }
       // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
+      this.$refs.table1.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
+      if (this.oldRow1 != '') {
         if (this.oldRow1 != row) {
           if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow1);
+            this.$refs.table1.toggleRowExpansion(this.oldRow1)
           } else {
-            this.oldRowCount1 = 1;
+            this.oldRowCount1 = 1
           }
         } else {
-          this.oldRow1 = null;
-          return;
+          this.oldRow1 = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow1 = row;
+      this.oldRow1 = row
       // 根据销售订单物资中间表id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data", res.data.data);
-          this.tableData1 = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          console.log('res.data.data', res.data.data)
+          this.tableData1 = res.data.data
+        })
     },
 
     // -------查看物资详情(未接收)
     detailclick2(row) {
       // 记录重复点击次数
       if (this.oldRow2 === row) {
-        this.oldRowCount2 += 1;
+        this.oldRowCount2 += 1
       }
       // 切换当前详情表
-      this.$refs.table2.toggleRowExpansion(row);
+      this.$refs.table2.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow2 != "") {
+      if (this.oldRow2 != '') {
         if (this.oldRow2 != row) {
           if (this.oldRowCount2 % 2 === 1) {
-            this.$refs.table2.toggleRowExpansion(this.oldRow2);
+            this.$refs.table2.toggleRowExpansion(this.oldRow2)
           } else {
-            this.oldRowCount2 = 1;
+            this.oldRowCount2 = 1
           }
         } else {
-          this.oldRow2 = null;
-          return;
+          this.oldRow2 = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow2 = row;
+      this.oldRow2 = row
       // 根据销售订单物资中间表id查询物资信息
       this.axios
-        .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          this.tableData2 = res.data.data;
-        });
+        .post('/api/v1/oms/getOrderMaterialList?orderId=' + row.orderId)
+        .then(res => {
+          this.tableData2 = res.data.data
+        })
     },
     //关闭选中行的订单
     closeOrder(row) {
-      this.$confirm("是否关闭", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
+      this.$confirm('是否关闭', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
       })
         .then(() => {
           this.$message({
-            type: "success",
-            message: "关闭成功!",
-          });
+            type: 'success',
+            message: '关闭成功!'
+          })
           this.axios
-            .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-            .then((res) => {
-              if (res.data.code == "200") {
-                this.getRequestUrl();
+            .post('/api/v1/oms/closeOrder?orderId=' + row.orderId)
+            .then(res => {
+              if (res.data.code == '200') {
+                this.getRequestUrl()
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消关闭!",
-          });
-        });
-    },
-  },
-};
+            type: 'info',
+            message: '取消关闭!'
+          })
+        })
+    }
+  }
+}
 </script>
 <style lang="scss" scode>
 .steel_inbound {

+ 9 - 1
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue

@@ -57,7 +57,11 @@ export default {
       option: {
         requestUrl:
           '/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=null&endTime=null&i=' +
-          new Date()
+          new Date(),
+        requestQuery: {
+          carrierSsoId:
+            getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
+        }
       },
       startTime: null,
       endTime: null,
@@ -84,6 +88,10 @@ export default {
       this.isKuang = false
     },
     onclick() {
+      this.option.requestQuery = {
+        carrierSsoId:
+          getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
+      }
       let startTime = null
       let endTime = null
       if (this.startTime) {

+ 11 - 1
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelOldMonitor.vue

@@ -47,15 +47,21 @@
 </template>
 
 <script>
+import { getCookie } from '@/utils/util.js'
 import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       input: null,
+      carrierSsoId: null,
       option: {
         requestUrl:
           '/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=null&endTime=null&i=' +
-          new Date()
+          new Date(),
+        requestQuery: {
+          carrierSsoId:
+            getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
+        }
       },
       startTime: null,
       endTime: null,
@@ -83,6 +89,10 @@ export default {
       this.isKuang = false
     },
     onclick() {
+      this.option.requestQuery = {
+        carrierSsoId:
+          getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
+      }
       let startTime = null
       let endTime = null
       if (this.startTime) {

+ 47 - 32
src/views/statisticalReport/components/purchaseAccessoriesMonitor.vue

@@ -3,18 +3,10 @@
   <div class="purchaseAccessoriesMonitor">
     <div class="frameCalculation">
       <span>进厂时间:</span>
-      <el-date-picker
-        v-model="startTime"
-        type="date"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="startTime" type="date" placeholder="选择日期">
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="date"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="date" placeholder="选择日期">
       </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
@@ -27,41 +19,64 @@
 </template>
 
 <script>
+import { getCookie } from '@/utils/util.js'
 import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=null&endTime=null&i=" +new Date(),
+        requestUrl:
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=null&endTime=null&i=' +
+          new Date(),
+        requestQuery: {
+          carrierSsoId:
+            getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
+        }
       },
       startTime: null,
-      endTime: null,
-    };
+      endTime: null
+    }
   },
   methods: {
     onclick() {
-      let startTime = null;
-      let endTime = null;
-      if(this.startTime){
-        startTime = sjTime(this.startTime);
+      this.option.requestQuery = {
+        carrierSsoId:
+          getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
       }
-      if(this.endTime){
-        endTime = sjTime(this.endTime);
+      let startTime = null
+      let endTime = null
+      if (this.startTime) {
+        startTime = sjTime(this.startTime)
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-        }else{
-          this.startTime = null;
-          this.endTime = null;
+      if (this.endTime) {
+        endTime = sjTime(this.endTime)
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            '/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&i=' +
+            new Date()
+        } else {
+          this.startTime = null
+          this.endTime = null
           this.$message.warning('开始时间要比结束时间早')
         }
-      }else{
-        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      } else {
+        this.option.requestUrl =
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=' +
+          startTime +
+          '&endTime=' +
+          endTime +
+          '&i=' +
+          new Date()
       }
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style lang="scss">
@@ -72,9 +87,9 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-date-editor{
+    .el-date-editor {
       margin: 20px;
     }
   }
 }
-</style>
+</style>

+ 74 - 43
src/views/statisticalReport/components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue

@@ -3,30 +3,32 @@
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
       <span>计毛时间:</span>
-      <el-date-picker
-        v-model="startTime"
-        type="date"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="startTime" type="date" placeholder="选择日期">
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="date"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="date" placeholder="选择日期">
       </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
       </el-button>
       <span style="margin-left: 1rem;">合计净重:</span>
-      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <el-input
+        v-model="totalNumber"
+        :disabled="true"
+        style="width: 150px;"
+      ></el-input>
       <span style="margin-left: 1rem;">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
+      <el-input
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 150px;"
+      ></el-input>
     </div>
     <div class="table">
       <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
@@ -35,12 +37,19 @@
 </template>
 
 <script>
+import { getCookie } from '@/utils/util.js'
 import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=null&endTime=null&i=" +new Date(),
+        requestUrl:
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=null&endTime=null&i=' +
+          new Date() +
+          '&carrierSsoId = ' +
+          `${
+            getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
+          }`
       },
       startTime: null,
       endTime: null,
@@ -48,48 +57,70 @@ export default {
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
-      tableTitle:'采购化工原料新区统计报表'
-    };
+      tableTitle: '采购化工原料新区统计报表'
+    }
   },
   methods: {
-    refresh(){
-      this.$router.go(0);
+    refresh() {
+      this.$router.go(0)
     },
-    func(res){
+    func(res) {
       console.log(res)
       var resultNetWeightTotal = 0
       res.list.forEach(e => {
-        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
-      });
-      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
-      this.totalCapacity = res.total;
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight
+      })
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + ' t'
+      this.totalCapacity = res.total
       //获取总记录条数作为合计车数
       // this.totalCapacity = res.total;
-      this.isKuang = false;
+      this.isKuang = false
     },
     onclick() {
-      let startTime = null;
-      let endTime = null;
-      if(this.startTime){
-        startTime = sjTime(this.startTime);
+      let startTime = null
+      let endTime = null
+      if (this.startTime) {
+        startTime = sjTime(this.startTime)
       }
-      if(this.endTime){
-        endTime = sjTime(this.endTime);
+      if (this.endTime) {
+        endTime = sjTime(this.endTime)
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-        }else{
-          this.startTime = null;
-          this.endTime = null;
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            '/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&i=' +
+            new Date() +
+            '&carrierSsoId = ' +
+            `${
+              getCookie('orgCode') == 'chengyunshang'
+                ? getCookie('userId')
+                : null
+            }`
+        } else {
+          this.startTime = null
+          this.endTime = null
           this.$message.warning('开始时间要比结束时间早')
         }
-      }else{
-        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      } else {
+        this.option.requestUrl =
+          '/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=' +
+          startTime +
+          '&endTime=' +
+          endTime +
+          '&i=' +
+          new Date() +
+          '&carrierSsoId = ' +
+          `${
+            getCookie('orgCode') == 'chengyunshang' ? getCookie('userId') : null
+          }`
       }
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style lang="scss">
@@ -100,9 +131,9 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-date-editor{
+    .el-date-editor {
       margin: 20px;
     }
   }
 }
-</style>
+</style>

+ 43 - 7
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue

@@ -4,7 +4,20 @@
     <div class="frameCalculation">
       <el-form :inline="true">
         <el-form-item>
-          <label style="width: 200px;margin-left: 10px">计毛时间:</label>
+          <el-select
+            v-model="screen3"
+            placeholder="请选择查询的时间类型"
+            clearable
+            style="width:90px"
+          >
+            <el-option
+              v-for="item in options3"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
           <el-date-picker
             v-model="startTime"
             type="datetime"
@@ -400,7 +413,18 @@ export default {
         startPointName: '',
         endPointName: '',
         statusCode: '位置'
-      }
+      },
+      screen3: '计毛时间',
+      options3: [
+        {
+          label: '计毛时间',
+          value: '计毛时间'
+        },
+        {
+          label: '进厂时间',
+          value: '进厂时间'
+        }
+      ]
     }
   },
   created() {
@@ -879,6 +903,10 @@ export default {
       let startTime = null
       let endTime = null
       let requestQuery = {}
+      let isEnfactoryFlag = null
+      if (this.screen3 == '进厂时间') {
+        isEnfactoryFlag = 1
+      }
       if (!this.condition1) {
         requestQuery['remarkNo'] = this.input1 + ''
       }
@@ -887,7 +915,7 @@ export default {
       }
       requestQuery[this.condition1] = this.input1 + ''
       requestQuery[this.condition2] = this.input2 + ''
-
+      requestQuery.isEnfactoryFlag = isEnfactoryFlag
       this.option.requestQuery = requestQuery
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)
@@ -906,7 +934,9 @@ export default {
             '&carrierSsoId=' +
             getCookie('userId') +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         } else {
           this.option.requestUrl =
             '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
@@ -917,7 +947,9 @@ export default {
             '&carrierSsoId=' +
             null +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         }
       } else {
         if (this.startTime) {
@@ -936,7 +968,9 @@ export default {
             '&carrierSsoId=' +
             getCookie('userId') +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         } else {
           this.option.requestUrl =
             '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
@@ -947,7 +981,9 @@ export default {
             '&carrierSsoId=' +
             null +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         }
       }
     },

+ 41 - 6
src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductForm.vue

@@ -4,9 +4,20 @@
     <div class="items">
       <el-form :inline="true" style="margin-top :5px">
         <el-form-item>
-          <label class="el-form-item__label" style="width: auto;"
-            >计毛时间:</label
+          <el-select
+            v-model="screen3"
+            placeholder="请选择查询的时间类型"
+            clearable
+            style="width:90px"
           >
+            <el-option
+              v-for="item in options3"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
           <el-date-picker
             v-model="startTime"
             type="datetime"
@@ -326,6 +337,17 @@ export default {
           value: 'wareHouse'
         }
       ],
+      screen3: '计毛时间',
+      options3: [
+        {
+          label: '计毛时间',
+          value: '计毛时间'
+        },
+        {
+          label: '进厂时间',
+          value: '进厂时间'
+        }
+      ],
       orderNumber: null,
       orderId: null,
       disabled: false,
@@ -747,6 +769,10 @@ export default {
     onclick() {
       let startTime = null
       let endTime = null
+      let isEnfactoryFlag = null
+      if (this.screen3 == '进厂时间') {
+        isEnfactoryFlag = 1
+      }
       let requestQuery = {}
       if (!this.condition1) {
         requestQuery['remarkNo'] = this.input1 + ''
@@ -756,6 +782,7 @@ export default {
       }
       requestQuery[this.condition1] = this.input1 + ''
       requestQuery[this.condition2] = this.input2 + ''
+      requestQuery.isEnfactoryFlag = isEnfactoryFlag
       this.option.requestQuery = requestQuery
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)
@@ -774,7 +801,9 @@ export default {
             '&carrierSsoId=' +
             getCookie('userId') +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         } else {
           this.option.requestUrl =
             '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
@@ -785,7 +814,9 @@ export default {
             '&carrierSsoId=' +
             null +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         }
       } else {
         if (this.startTime) {
@@ -804,7 +835,9 @@ export default {
             '&carrierSsoId=' +
             getCookie('userId') +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         } else {
           this.option.requestUrl =
             '/api/v1/tms/getAllSaleReport?apiId=526&startTime=' +
@@ -815,7 +848,9 @@ export default {
             '&carrierSsoId=' +
             null +
             '&i=' +
-            new Date()
+            new Date() +
+            '&isEnfactoryFlag=' +
+            isEnfactoryFlag
         }
       }
     },