luobang 3 år sedan
förälder
incheckning
49bf8b520f
30 ändrade filer med 4386 tillägg och 3098 borttagningar
  1. 2 2
      build/utils.js
  2. 0 2
      config/index.js
  3. 5 1
      src/components/DilCommonUI/packages/table/src/table.js
  4. 48 49
      src/components/DilCommonUI/packages/table/src/table.vue
  5. 13 13
      src/views/ADMINISTRATORS/app.js
  6. 38 40
      src/views/RMS/components/addCapacity.vue
  7. 18 18
      src/views/RMS/components/addOtherCapacity.vue
  8. 546 304
      src/views/appoint/components/saleContract/addSaleOrder.vue
  9. 369 304
      src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue
  10. 355 296
      src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue
  11. 77 96
      src/views/appoint/components/saleContract/saleOrder.vue
  12. 228 120
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  13. 165 99
      src/views/appoint/components/saleContract/saleOrderSteelCar.vue
  14. 313 208
      src/views/inward/components/truckAppoint/addRequirement.vue
  15. 1 0
      src/views/inward/components/truckAppoint/addRequirement2.vue
  16. 198 159
      src/views/inward/components/truckAppoint/plan.vue
  17. 175 146
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  18. 123 148
      src/views/inward/components/truckOrder/dispatchPlan.vue
  19. 122 42
      src/views/queue/components/qmsEnFacotory/queueFApply.vue
  20. 93 14
      src/views/queue/components/qmsEnFacotory/queueFCancel.vue
  21. 115 40
      src/views/queue/components/qmsEnFacotory/queueFEnd.vue
  22. 214 41
      src/views/queue/components/qmsEnFacotory/queueFStart.vue
  23. 13 3
      src/views/queue/components/qmsEnFacotory/updateBill.vue
  24. 1 1
      src/views/queue/router/index.js
  25. 8 4
      src/views/sale/components/saleSelfMachine/printLading.vue
  26. 281 233
      src/views/sale/components/transport_order/receiveOrder.vue
  27. 280 233
      src/views/sale/components/transport_order/saleChemicalCokeOrder.vue
  28. 281 233
      src/views/sale/components/transport_order/saleCoproductOrder.vue
  29. 291 236
      src/views/sale/components/transport_order/saleSteelOrder.vue
  30. 13 13
      src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue

+ 2 - 2
build/utils.js

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

+ 0 - 2
config/index.js

@@ -64,9 +64,7 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    // target: "http://192.168.101.7:8019",
     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.105:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 5 - 1
src/components/DilCommonUI/packages/table/src/table.js

@@ -145,7 +145,11 @@ export default {
     // 刷新表头显示数据
     refreshColumnData(columnData) {
       // 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
-      // if (this.dataColumnData.length > 0) return;
+      console.log("biaof")
+      console.log(this.dataColumnData.length)
+      if (this.dataColumnData.length > 0){
+          return;
+      } 
       // 如果前端有写表头,则加在后端表头前面
       
       const d = this.columnData.concat(columnData);

+ 48 - 49
src/components/DilCommonUI/packages/table/src/table.vue

@@ -120,131 +120,131 @@ export default {
   name: "DilTable",
   extends: table,
   props: {
-    shiyHeigth:{
-      default:null,
+    shiyHeigth: {
+      default: null
     },
-    isHeigth:{
-      default:false,
+    isHeigth: {
+      default: false
     },
-    drawer:{
-      default:false,
+    drawer: {
+      default: false
     },
     //判断是否带分页查询
-    isKuang:{
-      default:false,
+    isKuang: {
+      default: false
     },
     // 请求地址
     requestUrl: {
-      default: "",
+      default: ""
     },
     // 请求参数 请求体中的参数
     requestQuery: {
       default() {
         return {};
-      },
+      }
     },
     // 表头数据
     columnData: {
       default() {
         return [];
-      },
+      }
     },
     // 是否显示序号
     showIndex: {
-      default: true,
+      default: true
     },
     // 是否显示选择框
     // radio : 显示单选框
     // select : 显示多选框
     selectionType: {
-      default: "",
+      default: ""
     },
     // 是否在数据翻页后保留之前选中的数据(需指定 row-key)
     reserveSelection: {
-      default: true,
+      default: true
     },
     // 是否为斑马纹 table
     stripe: {
-      default: true,
+      default: true
     },
     // Table 的高度,默认为自动高度。
     // 如果 height 为 number 类型,单位 px;
     // 如果 height 为 string 类型,则这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。
     height: {
-      default: null,
+      default: null
     },
     // Table 的最大高度。合法的值为数字或者单位为 px 的高度。
     //sdada
     maxHeight: {
-      default: null,
+      default: null
     },
     // 是否启用排序
     sortable: {
-      default: "custom",
+      default: "custom"
     },
     // 对齐方式 left/center/right
     align: {
-      default: "center",
+      default: "center"
     },
     // 是否带有纵向边框
     border: {
-      default: true,
+      default: true
     },
     // 是否要高亮当前行
     highlightCurrentRow: {
-      default: false,
+      default: false
     },
     // 当内容过长被隐藏时显示 tooltip
     showOverflowTooltip: {
-      default: true,
+      default: true
     },
     // 行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className。
     rowClassName: {
       default() {
         return ({ row, rowIndex }) => "";
-      },
+      }
     },
     // 单元格的 className 的回调方法,也可以使用字符串为所有单元格设置一个固定的 className。
     cellClassName: {
       default() {
         return ({ row, rowIndex }) => "";
-      },
+      }
     },
-    loading:{
-      default:false,
+    loading: {
+      default: false
     },
     // 是否启用分页器
     isPagination: {
-      default: true,
+      default: true
     },
     // 当前页数,支持 .sync 修饰符
     currentPage: {
-      default: 1,
+      default: 1
     },
     // 每页显示个数选择器的选项设置
     pageSizes: {
       default() {
-        return [10, 20, 50, 100, 200, 1000];
-      },
+        return [10, 20, 50, 100, 200, 1000, 50000];
+      }
     },
     // 每页显示条目个数,支持 .sync 修饰符
     pageSize: {
-      default: 10,
+      default: 10
     },
     //组件布局,子组件名用逗号分隔
     layout: {
-      default: "total, prev, pager, next, sizes, jumper",
-    },
+      default: "total, prev, pager, next, sizes, jumper"
+    }
   },
-  watch:{
-    requestUrl(){
+  watch: {
+    requestUrl() {
       this.refreshData();
     },
-    drawer(val){
-      if(val){
+    drawer(val) {
+      if (val) {
         this.dataRadioId = null;
       }
-    },
+    }
     // dataTabel: function() {
     //   this.$nextTick(function() {
     //     this.$refs.mainTable.setCurrentRow(this.dataTabel[0])
@@ -260,7 +260,7 @@ export default {
     },
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);
-    },
+    }
     // objectSpanMethod({ row, column, rowIndex, columnIndex }) {
     //     if (columnIndex === 0) {
     //       if (rowIndex % 2 === 0) {
@@ -276,7 +276,7 @@ export default {
     //       }
     //     }
     //   }
-  },
+  }
 };
 </script>
 
@@ -285,14 +285,13 @@ export default {
   .el-pagination {
     display: none;
   }
-  
 }
- /deep/.el-table .success-row {
-    background: #fff !important;
-    color: #f56c6c;
-    height: 44px;
-    line-height: 46px;
-    font-size: 22px;
-    font-weight: 700;
-  }
+/deep/.el-table .success-row {
+  background: #fff !important;
+  color: #f56c6c;
+  height: 44px;
+  line-height: 46px;
+  font-size: 22px;
+  font-weight: 700;
+}
 </style>

+ 13 - 13
src/views/ADMINISTRATORS/app.js

@@ -85,19 +85,19 @@ export function isIntegerNumber(value) {
 }
 
 //写一个方法封装date对象转换为时间字符串
-export function toDateString(value){
-    if(value==null){
-        return
-    }
-    var Year = value.getFullYear();
-    var Month = ("0" + (value.getMonth() + 1)).slice(-2)
-    var Day = ("0" + (value.getDate())).slice(-2)
-    var Hours = ("0" + (value.getHours())).slice(-2)
-    var Minutes = ("0" + (value.getMinutes())).slice(-2)
-    var Seconds = ("0" + (value.getSeconds())).slice(-2)
-    var DATE = Year + "-" + Month + "-" + Day + " " + Hours + ":" + Minutes + ":" + Seconds
-    return DATE
-}
+  export function toDateString(value){
+      if(value==null){
+          return
+      }
+      var Year = value.getFullYear();
+      var Month = ("0" + (value.getMonth() + 1)).slice(-2)
+      var Day = ("0" + (value.getDate())).slice(-2)
+      var Hours = ("0" + (value.getHours())).slice(-2)
+      var Minutes = ("0" + (value.getMinutes())).slice(-2)
+      var Seconds = ("0" + (value.getSeconds())).slice(-2)
+      var DATE = Year + "-" + Month + "-" + Day + " " + Hours + ":" + Minutes + ":" + Seconds
+      return DATE
+  }
 /* eslint-disable no-new */
 new Vue({
   el: '#app',

+ 38 - 40
src/views/RMS/components/addCapacity.vue

@@ -23,10 +23,9 @@
             </template>
           </el-autocomplete>
         </el-form-item>
-        
       </el-form>
-       <el-form :inline="true" class="demo-form-inline" label-width="80px">
-         <el-form-item label="上传行驶证">
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="上传行驶证">
           <el-upload
             class="upload-demo"
             ref="upload1"
@@ -51,7 +50,7 @@
             >
           </el-upload>
         </el-form-item>
-       </el-form>
+      </el-form>
     </div>
 
     <div class="button_box">
@@ -70,17 +69,17 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      driverLicence:"",
+      driverLicence: "",
       addLoading: false,
       form1: {},
-      shippingCertificate:"",
+      shippingCertificate: "",
       form1Initialization: {
         capacityTypeId: 1,
         capacityNumber: "",
         capacityCorlor: "黄",
         capacityOwneris: "否",
         capacityVip: "否",
-        capacityBlacklist: "否",
+        capacityBlacklist: "否"
       },
       value: undefined,
       carrierIds: null,
@@ -90,7 +89,7 @@ export default {
       accessToken: null,
       userCode: null,
       carrierUserId: null,
-      carrierId: null,
+      carrierId: null
     };
   },
   created() {
@@ -103,7 +102,7 @@ export default {
       .post(
         "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
       )
-      .then((res) => {
+      .then(res => {
         if (res.data.code == "200") {
           // console.log(res.data.data);
           if (res.data.data) {
@@ -114,7 +113,7 @@ export default {
       });
   },
   methods: {
-     upCLick(val) {
+    upCLick(val) {
       this.num = val;
     },
     beforeUpload(file) {
@@ -148,7 +147,7 @@ export default {
       }
     },
     handleAvatarSuccess(res, file) {
-      console.log(res,file)
+      console.log(res, file);
       if (res.code) {
         this.upBool = false;
         if (this.num == 1) {
@@ -158,7 +157,7 @@ export default {
           this.imageUrl2 = res.data;
           this.businessLicense = file.name;
         } else if (this.num == 3) {
-          this.imageUrl3 =res.data;
+          this.imageUrl3 = res.data;
           this.businessLicense1 = file.name;
         }
         this.$message.success("上传成功");
@@ -173,7 +172,7 @@ export default {
     querySearch(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             // console.log(res.data.data);
             var restaurants = res.data.data;
@@ -187,7 +186,7 @@ export default {
         });
     },
     createFilter(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -196,7 +195,7 @@ export default {
     },
     //以上是承运商边输边查搜索
     deleteUser(userId) {
-      this.axios.delete("pass/v1/sysusers/" + userId).then((res) => {
+      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {
         this.$message.error("添加失败,车牌可能重复");
       });
     },
@@ -210,7 +209,7 @@ export default {
             "&roleId=" +
             "923693668269953024"
         )
-        .then((res) => {
+        .then(res => {
           if (res.code === "0") {
             this.$message.success("操作成功");
             this.saveLoading = false;
@@ -224,19 +223,18 @@ export default {
       // console.log(vehicleNumber);
       var result = false;
       if (vehicleNumber.length == 7) {
-        var express =
-          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使场领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+        var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使场领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
         result = express.test(vehicleNumber);
       }
       return result;
     },
     makeSure() {
       this.addLoading = true;
-      // if (!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())) {
-      //   this.$message.error("车牌号格式不正确");
-      //   this.addLoading = false;
-      //   return;
-      // }
+      if (!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())) {
+        this.$message.error("车牌号格式不正确");
+        this.addLoading = false;
+        return;
+      }
       if (this.carrierIds == null) {
         this.$message.error("请选择承运商");
         this.addLoading = false;
@@ -249,12 +247,12 @@ export default {
         capacityOwneris: this.form1.capacityOwneris,
         capacityVip: this.form1.capacityVip,
         capacityBlacklist: this.form1.capacityBlacklist,
-        driverLicence:this.driverLicence,
+        driverLicence: this.driverLicence,
         remark: this.form1.remark,
         carrierId: this.carrierIds,
-        state: this.state,
+        state: this.state
       };
-      console.log(RmsCapacity)
+      console.log(RmsCapacity);
       if (
         RmsCapacity.capacityNumber == null ||
         RmsCapacity.capacityCorlor == null ||
@@ -270,7 +268,7 @@ export default {
         formData.append("userCode", this.form1.capacityNumber.toUpperCase());
         formData.append("orgCode", "yunli");
         formData.append("orgName", "运力");
-        
+
         formData.append("groupId", "506514577756917769");
         formData.append("companyId", "713710108567277568");
         formData.append("orgId", "924126716337721344");
@@ -278,7 +276,7 @@ export default {
         // console.log(typeof formData);
         this.$store
           .dispatch("system/usersManage/addUser", formData)
-          .then((res) => {
+          .then(res => {
             // console.log(res);
             if (res.code === "0") {
               // console.log(res.data.userId);
@@ -287,7 +285,7 @@ export default {
               RmsCapacity.ssoId = res.data.userId;
               this.axios
                 .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                .then((res) => {
+                .then(res => {
                   if (res.data.data == 1) {
                     this.insertRole(this.userId, this.userCode);
                     this.$message.success("添加成功");
@@ -307,13 +305,13 @@ export default {
                   {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
-                    type: "warning",
+                    type: "warning"
                   }
                 )
                   .then(() => {
                     this.axios
                       .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                      .then((res) => {
+                      .then(res => {
                         // console.log(res, "res");
                         if (res.data.data == 0) {
                           this.$message.success("新增承运商绑定关系成功!");
@@ -326,7 +324,7 @@ export default {
                   .catch(() => {
                     this.$message({
                       type: "info",
-                      message: "已取消删除",
+                      message: "已取消删除"
                     });
                   });
               }
@@ -338,19 +336,19 @@ export default {
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' >
-.shippingCertificate{
+<style lang="scss">
+.shippingCertificate {
   width: 200px;
 }
 .el-form--inline .el-form-item__content {
-    display: inline-block;
-    vertical-align: top;
-    position: relative;
-    left: 37px;
+  display: inline-block;
+  vertical-align: top;
+  position: relative;
+  left: 37px;
 }
 .addCapacity {
   .elForm {

+ 18 - 18
src/views/RMS/components/addOtherCapacity.vue

@@ -50,7 +50,7 @@ export default {
         capacityCorlor: "黄",
         capacityOwneris: "否",
         capacityVip: "否",
-        capacityBlacklist: "否",
+        capacityBlacklist: "否"
       },
       value: undefined,
       carrierIds: null,
@@ -60,7 +60,7 @@ export default {
       accessToken: null,
       userCode: null,
       carrierUserId: null,
-      carrierId: null,
+      carrierId: null
     };
   },
   created() {
@@ -73,7 +73,7 @@ export default {
       .post(
         "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
       )
-      .then((res) => {
+      .then(res => {
         if (res.data.code == "200") {
           // console.log(res.data.data);
           if (res.data.data) {
@@ -93,7 +93,7 @@ export default {
     querySearch(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             // console.log(res.data.data);
             var restaurants = res.data.data;
@@ -107,7 +107,7 @@ export default {
         });
     },
     createFilter(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -116,7 +116,7 @@ export default {
     },
     //以上是承运商边输边查搜索
     deleteUser(userId) {
-      this.axios.delete("pass/v1/sysusers/" + userId).then((res) => {
+      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {
         this.$message.error("添加失败,车牌可能重复");
       });
     },
@@ -128,9 +128,9 @@ export default {
             "&userCode=" +
             userCode +
             "&roleId=" +
-            "923693668269953024"
+            "956144357092757504"
         )
-        .then((res) => {
+        .then(res => {
           if (res.code === "0") {
             this.$message.success("操作成功");
             this.saveLoading = false;
@@ -147,7 +147,7 @@ export default {
       //   this.addLoading = false;
       //   return;
       // }
-      if(this.form1.capacityNumber.length<=2){
+      if (this.form1.capacityNumber.length <= 2) {
         this.$message.error("车牌号必须大于三位");
         this.addLoading = false;
         return;
@@ -166,7 +166,7 @@ export default {
         capacityBlacklist: this.form1.capacityBlacklist,
         remark: this.form1.remark,
         carrierId: this.carrierIds,
-        state: this.state,
+        state: this.state
       };
       if (
         RmsCapacity.capacityNumber == null ||
@@ -190,7 +190,7 @@ export default {
         // console.log(typeof formData);
         this.$store
           .dispatch("system/usersManage/addUser", formData)
-          .then((res) => {
+          .then(res => {
             // console.log(res);
             if (res.code === "0") {
               // console.log(res.data.userId);
@@ -199,7 +199,7 @@ export default {
               RmsCapacity.ssoId = res.data.userId;
               this.axios
                 .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                .then((res) => {
+                .then(res => {
                   if (res.data.data == 1) {
                     this.insertRole(this.userId, this.userCode);
                     this.$message.success("添加成功");
@@ -219,13 +219,13 @@ export default {
                   {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
-                    type: "warning",
+                    type: "warning"
                   }
                 )
                   .then(() => {
                     this.axios
                       .post("/api/v1/rms/insertCapacity", RmsCapacity)
-                      .then((res) => {
+                      .then(res => {
                         // console.log(res, "res");
                         if (res.data.data == 0) {
                           this.$message.success("新增承运商绑定关系成功!");
@@ -238,7 +238,7 @@ export default {
                   .catch(() => {
                     this.$message({
                       type: "info",
-                      message: "已取消删除",
+                      message: "已取消删除"
                     });
                   });
               }
@@ -250,11 +250,11 @@ export default {
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' >
+<style lang="scss">
 .addCapacity {
   .elForm {
     margin-left: 40%;

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 546 - 304
src/views/appoint/components/saleContract/addSaleOrder.vue


+ 369 - 304
src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue

@@ -43,20 +43,23 @@
           <template slot="scope" v-if="item.label !== '收货客户电话号码'">
             <span>{{ item.label }}</span>
           </template>
+          <template slot="scope" v-if="item.label !== '备注'">
+            <span>{{ item.label }}</span>
+          </template>
           <!-- 插入输入框 -->
           <template slot-scope="scope">
             <template v-if="item.slot">
               <!-- 车牌号 -->
               <template v-if="item.prop == 'capacityNumber'">
                 <el-autocomplete
-                class="inline-input"
-                v-model="scope.row.capacityNumber"
-                :fetch-suggestions="querySearch"
-                placeholder="(必填)"
-                :trigger-on-focus="false"
-                @select="handleSelect"
-                @blur="checkRelationship(scope.$index)"
-                @change="batchUpdateValue(scope.row,scope.$index)"
+                  class="inline-input"
+                  v-model="scope.row.capacityNumber"
+                  :fetch-suggestions="querySearch"
+                  placeholder="(必填)"
+                  :trigger-on-focus="false"
+                  @select="handleSelect"
+                  @blur="checkRelationship(scope.$index)"
+                  @change="batchUpdateValue(scope.row, scope.$index)"
                 ></el-autocomplete>
               </template>
 
@@ -73,20 +76,20 @@
               <!-- 承运商 -->
               <template v-if="item.prop == 'carrierName'">
                 <el-autocomplete
-                    class="inline-input"
-                    v-model="scope.row.carrierName"
-                    :fetch-suggestions="querySearch1"
-                    placeholder="请输入承运商名称"
-                    :trigger-on-focus="false"
-                    @change="batchUpdateValue(scope.row,scope.$index)"
-                    @select="handleSelect1"
-                  >
-                    <template slot-scope="{ item }">
-                      <div class="name" v-if="item.carrierName">
-                        {{ item.carrierName }}
-                      </div>
-                    </template>
-                  </el-autocomplete>
+                  class="inline-input"
+                  v-model="scope.row.carrierName"
+                  :fetch-suggestions="querySearch1"
+                  placeholder="请输入承运商名称"
+                  :trigger-on-focus="false"
+                  @change="batchUpdateValue(scope.row, scope.$index)"
+                  @select="handleSelect1"
+                >
+                  <template slot-scope="{ item }">
+                    <div class="name" v-if="item.carrierName">
+                      {{ item.carrierName }}
+                    </div>
+                  </template>
+                </el-autocomplete>
               </template>
 
               <!-- 物资件数 -->
@@ -110,16 +113,12 @@
               </template>
 
               <!-- 运输单价id -->
-              <template v-if="item.prop == 'priceValue'" >
-                <el-input
-                  v-model="scope.row.priceValue"
-                  disabled
-                >
-                </el-input>
+              <template v-if="item.prop == 'priceValue'">
+                <el-input v-model="scope.row.priceValue" disabled> </el-input>
               </template>
               <!-- 截止日期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
-                 <el-date-picker
+                <el-date-picker
                   class="textinput3"
                   type="date"
                   v-model.number="scope.row.saleDateOfReceipt"
@@ -146,6 +145,16 @@
                   disabled
                 ></el-input>
               </template>
+              <!-- 备注 -->
+              <template v-if="item.prop == 'truckRemark'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.truckRemark"
+                  @input="onInput"
+                  disabled
+                ></el-input>
+              </template>
             </template>
             <template v-else>
               <span>{{ scope.row[item.prop] }}</span>
@@ -168,7 +177,7 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { getCookie } from "@/utils/util.js";
-import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
@@ -176,179 +185,190 @@ export default {
       //存放每一行记录的合并数
       spanArr: [],
       //pos是spanArr的索引
-      pos:0,
+      pos: 0,
       //加载
-      selectLineLoading:false,
+      selectLineLoading: false,
       //所有选中承运商Id和承运商名称暂存
       carrierIdAndName: [],
       //承运商下拉框中的值
-      carrierNameOptions:[],
+      carrierNameOptions: [],
       //当前车序号物资
-      selectionList:[],
+      selectionList: [],
       //是否可发送请求
       canSend: 1,
       tableTop: [
         {
           prop: "truckNo",
           label: "车序号",
-          width: "50",
+          width: "50"
         },
         {
           prop: "capacityNumber",
           label: "车牌号",
           width: "130",
-          slot: true,
+          slot: true
         },
         {
           prop: "driverTel",
           label: "司机电话号码",
           width: "150",
-          slot: true,
+          slot: true
         },
         {
           prop: "carrierName",
           label: "承运商",
           width: "240",
-          slot: true,
+          slot: true
         },
         {
           prop: "materialName",
           label: "物资名称",
-          width: "140",
+          width: "140"
         },
         {
           prop: "Specification",
           label: "规格型号",
-          width: "140",
+          width: "140"
         },
         {
           prop: "orderPlanWeight",
           label: "件数",
           width: "80",
-          slot: true,
+          slot: true
         },
         {
           prop: "materialWeight",
           label: "重量",
           width: "80",
-          slot: true,
+          slot: true
         },
         {
           prop: "lineName",
           label: "厂内运输线路",
-          width: "220",
+          width: "220"
         },
         {
           prop: "saleDateOfReceipt",
           label: "截止日期",
           width: "150",
-          slot: true,
+          slot: true
         },
         {
           prop: "saleShipperAddressName",
           label: "收货地址",
-          width: "300",
+          width: "300"
         },
         {
           prop: "priceValue",
           label: "运输单价",
           width: "80",
-          slot: true,
+          slot: true
         },
         {
           prop: "saleOrderConsignee",
           label: "收货客户",
           width: "150",
-          slot: true,
+          slot: true
         },
         {
           prop: "saleOrderConsigneeTel",
           label: "收货客户电话号码",
           slot: true,
-          width: "150",
+          width: "150"
         },
         {
           prop: "materialCode",
           label: "物资编码",
-          width: "140",
+          width: "140"
         },
-      ],
+        {
+          prop: "truckRemark",
+          label: "备注",
+          width: "140"
+        }
+      ]
     };
   },
-  created(){
+  created() {
     this.getValue();
   },
   methods: {
-    getValue(){
+    getValue() {
       this.axios
-      .post("/api/v1/ams/getTruckNoMaterial?saleOrderMaterialId=" + this.$route.params.saleOrderMaterialId)
-      .then((res)=>{
-        if(res.data.data.length==0){
+        .post(
+          "/api/v1/ams/getTruckNoMaterial?saleOrderMaterialId=" +
+            this.$route.params.saleOrderMaterialId
+        )
+        .then(res => {
+          if (res.data.data.length == 0) {
             this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning",
-              center: true,
-            })
-            .then(() => {
-              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
+              center: true
             })
-            .catch(() => {
-              this.$message({ type: "info", message: "取消!",});
-            });
-        }
-        //赋值派车表格
-        res.data.data.forEach((e,i) => {
-          if(e.saleOrderConsignee=="null"){
-            e.saleOrderConsignee = null
-          }
-          if(e.saleOrderConsigneeTel=="null"){
-            e.saleOrderConsigneeTel = null
+              .then(() => {
+                this.$router.push(
+                  "/addSaleOrderArrange/" + this.$route.params.saleOrderId
+                );
+              })
+              .catch(() => {
+                this.$message({ type: "info", message: "取消!" });
+              });
           }
+          //赋值派车表格
+          res.data.data.forEach((e, i) => {
+            if (e.saleOrderConsignee == "null") {
+              e.saleOrderConsignee = null;
+            }
+            if (e.saleOrderConsigneeTel == "null") {
+              e.saleOrderConsigneeTel = null;
+            }
             //不带承运商初始化派车表格
             var addmap = {
-                truckNo: e.truckNo,
-                saleOrderMaterialId: e.saleOrderMaterialId,
-                capacityNumber: null,
-                driverTel: null,
-                carrierName: null,
-                carrierId: null,
-                materialId: e.materialId,
-                materialName: e.materialName,
-                Specification: e.materialModelSpecification,
-                materialCode: e.materialCode,
-                orderPlanWeight: e.materialNumber,
-                materialWeight: e.materialWeight,
-                lineName:null,
-                lineId:null,
-                saleShipperAddressId: e.placeId,
-                saleShipperAddressName:e.place,
-                saleDateOfReceipt: e.receiptDate,
-                saleOrderConsignee: e.saleOrderConsignee,
-                saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+              truckNo: e.truckNo,
+              saleOrderMaterialId: e.saleOrderMaterialId,
+              capacityNumber: null,
+              driverTel: null,
+              carrierName: null,
+              carrierId: null,
+              materialId: e.materialId,
+              materialName: e.materialName,
+              Specification: e.materialModelSpecification,
+              materialCode: e.materialCode,
+              orderPlanWeight: e.materialNumber,
+              materialWeight: e.materialWeight,
+              lineName: null,
+              lineId: null,
+              saleShipperAddressId: e.placeId,
+              saleShipperAddressName: e.place,
+              saleDateOfReceipt: e.receiptDate,
+              saleOrderConsignee: e.saleOrderConsignee,
+              saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+              truckRemark: e.truckRemark
             };
             this.selectionList.push(addmap);
             //调用记录每一行的合并数的方法
             this.getSpanArr(this.selectionList);
             //初始化每个车的线路
             this.initializeLine();
+          });
         });
-      });
     },
 
     //承运商弹出层
     handleSelect1(item) {
       let carrierIdAndNameItem = {
-        carrierId : item.carrierId,
-        carrierName : item.carrierName
-      }
+        carrierId: item.carrierId,
+        carrierName: item.carrierName
+      };
       this.carrierIdAndName.push(carrierIdAndNameItem);
     },
     //以下是承运商边输边查搜索
     querySearch1(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             var restaurants = res.data.data;
             var results = queryString
@@ -360,7 +380,7 @@ export default {
         });
     },
     createFilter1(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -369,25 +389,24 @@ export default {
     },
     //以上是承运商边输边查搜索
 
-    onInput(val){
-      if(!isNumber(val)){
-        this.$message.warning('重量/电话号码请输入数字')
+    onInput(val) {
+      if (!isNumber(val)) {
+        this.$message.warning("重量/电话号码请输入数字");
       }
     },
     //校验是否为车牌
     isVehicleNumber(vehicleNumber) {
       var result = false;
-      if(vehicleNumber!=null){
+      if (vehicleNumber != null) {
         if (vehicleNumber.length == 7) {
-          var express =
-            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
           result = express.test(vehicleNumber);
         }
       }
       return result;
     },
     //绑定车牌号和承运商的关系
-    bindRelationship(mapValue){
+    bindRelationship(mapValue) {
       let RmsCapacity = {
         capacityTypeId: 1,
         capacityNumber: mapValue.capacityNumber,
@@ -397,62 +416,70 @@ export default {
         capacityBlacklist: "否",
         remark: null,
         carrierId: mapValue.carrierId,
-        state: mapValue.carrierName,
+        state: mapValue.carrierName
       };
-      this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
+      this.$confirm(
+        "车牌号(" +
+          mapValue.capacityNumber +
+          ")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?",
+        "提示",
+        {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning",
-      })
-      .then(() => {
+          type: "warning"
+        }
+      )
+        .then(() => {
           this.axios
             .post("/api/v1/rms/insertCapacity", RmsCapacity)
-            .then((res) => {
-              console.log("res",res)
+            .then(res => {
+              console.log("res", res);
               if (res.data.data == 0) {
                 this.$message.success("该车牌号与承运商绑定关系成功!");
-              } 
+              }
             });
         })
-        .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
+        .catch(() => {
+          this.$message({ type: "info", message: "已取消删除" });
+        });
     },
     //确定车牌号与承运商是否有绑定关系
-    checkRelationship(index){
-      if(this.selectionList[index].carrierId!=null){
+    checkRelationship(index) {
+      if (this.selectionList[index].carrierId != null) {
         //暂存车牌号
-      var capacityNumber1;
-      if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
-        let mapValue = {
-        capacityNumber:this.selectionList[index].capacityNumber,
-        carrierId:this.selectionList[index].carrierId,
-        carrierName:this.selectionList[index].carrierName
-      }
-      this.axios
-       .post("/api/v1/uc/isInCapacityCarrier", mapValue)
-       .then((res)=>{
-         if(res.data.code=="201"){
-           capacityNumber1 = res.data.data;
-           if(capacityNumber1==null){
-             this.selectionList[index].capacityNumber = null;
-             this.$message.error("该车牌号未注册,请先前往注册!");
-           }else{
-             this.bindRelationship(mapValue);
-           }
-         }
-       });
-      }
+        var capacityNumber1;
+        if (this.isVehicleNumber(this.selectionList[index].capacityNumber)) {
+          let mapValue = {
+            capacityNumber: this.selectionList[index].capacityNumber,
+            carrierId: this.selectionList[index].carrierId,
+            carrierName: this.selectionList[index].carrierName
+          };
+          this.axios
+            .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+            .then(res => {
+              if (res.data.code == "201") {
+                capacityNumber1 = res.data.data;
+                if (capacityNumber1 == null) {
+                  this.selectionList[index].capacityNumber = null;
+                  this.$message.error("该车牌号未注册,请先前往注册!");
+                } else {
+                  this.bindRelationship(mapValue);
+                }
+              }
+            });
+        }
       }
     },
     //车牌号弹出层
     handleSelect(item) {
-      console.log("获取下拉值!")
+      console.log("获取下拉值!");
     },
 
     //以下是车牌号边输边查搜索
-    querySearch(queryString, cb){
+    querySearch(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             var restaurants = res.data.data;
             var results = queryString
@@ -464,7 +491,7 @@ export default {
         });
     },
     createFilter(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -474,256 +501,294 @@ export default {
     //以上是车牌号边输边查搜索
 
     //校验是否为电话号码
-    checkIsTelephone(index){
+    checkIsTelephone(index) {
       //电话号码校验
       var reg = /^[1][345789]\d{9}$/;
-      if(!reg.test(this.selectionList[index].driverTel)){
+      if (!reg.test(this.selectionList[index].driverTel)) {
         this.canSend = -1;
-        this.$message.warning('电话号码格式不正确,请输入正确的电话号码!')
-      }else{
+        this.$message.warning("电话号码格式不正确,请输入正确的电话号码!");
+      } else {
         this.canSend = 1;
       }
     },
     //点击确定按钮的事件
-    makeSure(){
-      if(this.canSend==-1){
-          this.$message.warning('电话号码格式不正确,请输入正确的电话号码!')
-      }else{
-          this.$confirm("是否确定进行钢材派单!", "提示", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning",
-              center: true,
-            })
-            .then(() => {
-              var mapList = [];
-              for(var i=0;i<this.spanArr.length;i++){
-                  if(this.spanArr[i]>0&&this.selectionList[i].capacityNumber){
-                  //从所有选中承运商Id和承运商名称暂存中取出当前行的承运商Id
-                  this.carrierIdAndName.forEach((item) => {
-                    if(this.selectionList[i].carrierName==item.carrierName){
-                      this.selectionList[i].carrierId = item.carrierId;
-                    }
-                  })
-                  var mapItem = {
+    makeSure() {
+      if (this.canSend == -1) {
+        this.$message.warning("电话号码格式不正确,请输入正确的电话号码!");
+      } else {
+        this.$confirm("是否确定进行钢材派单!", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true
+        })
+          .then(() => {
+            var mapList = [];
+            for (var i = 0; i < this.spanArr.length; i++) {
+              if (this.spanArr[i] > 0 && this.selectionList[i].capacityNumber) {
+                //从所有选中承运商Id和承运商名称暂存中取出当前行的承运商Id
+                this.carrierIdAndName.forEach(item => {
+                  if (this.selectionList[i].carrierName == item.carrierName) {
+                    this.selectionList[i].carrierId = item.carrierId;
+                  }
+                });
+                var mapItem = {
                   //车牌号
-                  capacityNumber : null,
+                  capacityNumber: null,
                   //司机电话号码
-                  driverTel : null,
+                  driverTel: null,
                   //车序号主键
-                  saleOrderMaterialId : 0,
+                  saleOrderMaterialId: 0,
                   //承运商Id
-                  carrierId : 0,
+                  carrierId: 0,
                   //线路Id
-                  lineId : 0,
-                }
-                mapItem.capacityNumber = this.selectionList[i].capacityNumber,
-                mapItem.driverTel = this.selectionList[i].driverTel,
-                mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
-                mapItem.carrierId = this.selectionList[i].carrierId,
-                mapItem.lineId = this.selectionList[i].lineId,
-                mapList.push(mapItem);
-                }
+                  lineId: 0
+                };
+                (mapItem.capacityNumber = this.selectionList[i].capacityNumber),
+                  (mapItem.driverTel = this.selectionList[i].driverTel),
+                  (mapItem.saleOrderMaterialId = this.selectionList[
+                    i
+                  ].saleOrderMaterialId),
+                  (mapItem.carrierId = this.selectionList[i].carrierId),
+                  (mapItem.lineId = this.selectionList[i].lineId),
+                  mapList.push(mapItem);
               }
-              this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
-              .then((res)=>{
-                  if(res.data.code == '200'){
+            }
+            this.axios
+              .post("/api/v1/ams/dispatchSteelOrder", mapList)
+              .then(res => {
+                if (res.data.code == "200") {
                   this.cancel();
                 }
-                  this.$message.success('派单成功!')               
+                this.$message.success("派单成功!");
               });
-            })
-            .catch(() => {
-              this.$message({ type: "info", message: "取消!",});
-            });
+          })
+          .catch(() => {
+            this.$message({ type: "info", message: "取消!" });
+          });
       }
     },
     //点击取消按钮的事件
-    cancel(){
-      this.$router.push('/saleOrderSteelCar')
+    cancel() {
+      this.$router.push("/saleOrderSteelCar");
     },
 
     //批量修改内层值
-    batchUpdateValue(row,index){
-        for(var i=index;i<this.spanArr[index]+index;i++){
-          this.selectionList[i].capacityNumber=row.capacityNumber;
-          this.selectionList[i].carrierName=row.carrierName;
-        }
+    batchUpdateValue(row, index) {
+      for (var i = index; i < this.spanArr[index] + index; i++) {
+        this.selectionList[i].capacityNumber = row.capacityNumber;
+        this.selectionList[i].carrierName = row.carrierName;
+      }
     },
     //初始化线路
-    initializeLine(){
-      for(var i=0;i<this.spanArr.length;i++){
-        if(this.spanArr[i]==1){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
+    initializeLine() {
+      for (var i = 0; i < this.spanArr.length; i++) {
+        if (this.spanArr[i] == 1) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材单拼路线" + " " + "进厂-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110001;
           }
         }
-        if(this.spanArr[i]==2){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 2) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材二拼路线" +
+              " " +
+              "计皮-进厂-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110002;
           }
         }
-        if(this.spanArr[i]==3){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 3) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材三拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110003;
           }
         }
-        if(this.spanArr[i]==4){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 4) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材四拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110004;
           }
         }
-        if(this.spanArr[i]==5){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 5) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材五拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110005;
           }
         }
-        if(this.spanArr[i]==6){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 6) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材六拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110006;
           }
         }
-        if(this.spanArr[i]==7){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 7) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材七拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110007;
           }
         }
-        if(this.spanArr[i]==8){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 8) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材八拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110008;
           }
         }
-        if(this.spanArr[i]==9){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 9) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材九拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110009;
           }
         }
-        if(this.spanArr[i]==10){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 10) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材十拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110010;
           }
         }
       }
-      
     },
     //记录每一行的合并数
     getSpanArr(data) {
       //每次调用方法初始化
       this.spanArr = [];
       for (var i = 0; i < data.length; i++) {
-            if (i === 0) {
-                  this.spanArr.push(1);
-                  this.pos = 0
-            } else {
-                // 判断当前元素与上一个元素是否相同
-                if (data[i].truckNo === data[i - 1].truckNo) {
-                  this.spanArr[this.pos] += 1;
-                  this.spanArr.push(0);
-                } else {
-                  this.spanArr.push(1);
-                  this.pos = i;
-                }
-            }
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].truckNo === data[i - 1].truckNo) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+          }
         }
+      }
     },
     //根据条件合并行
     cellMerge({ row, column, rowIndex, columnIndex }) {
       if (columnIndex === 0) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 1) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 2) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 3) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 8) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 9) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 10) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 11) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 12) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 13) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
-    },
-  },
+      if (columnIndex === 15) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    }
+  }
 };
 </script>
 
-<style lang='scss'>
+<style lang="scss">
 .addSaleOrderSend {
   .from {
     margin-top: 20px;
@@ -763,17 +828,17 @@ export default {
       }
     }
   }
-  .tablecls{
+  .tablecls {
     margin-top: 20px;
   }
-  .button_box{
+  .button_box {
     display: flex;
     justify-content: center;
     margin: 20px;
-    .el-button{
+    .el-button {
       width: 100px;
       margin-left: 20px;
     }
   }
 }
-</style>
+</style>

+ 355 - 296
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -43,20 +43,23 @@
           <template slot="scope" v-if="item.label !== '收货客户电话号码'">
             <span>{{ item.label }}</span>
           </template>
+          <template slot="scope" v-if="item.label !== '备注'">
+            <span>{{ item.label }}</span>
+          </template>
           <!-- 插入输入框 -->
           <template slot-scope="scope">
             <template v-if="item.slot">
               <!-- 车牌号 -->
               <template v-if="item.prop == 'capacityNumber'">
                 <el-autocomplete
-                class="inline-input"
-                v-model="scope.row.capacityNumber"
-                :fetch-suggestions="querySearch"
-                placeholder="(必填)"
-                :trigger-on-focus="false"
-                @select="handleSelect"
-                @blur="checkRelationship(scope.$index)"
-                @change="batchUpdateValue(scope.row,scope.$index)"
+                  class="inline-input"
+                  v-model="scope.row.capacityNumber"
+                  :fetch-suggestions="querySearch"
+                  placeholder="(必填)"
+                  :trigger-on-focus="false"
+                  @select="handleSelect"
+                  @blur="checkRelationship(scope.$index)"
+                  @change="batchUpdateValue(scope.row, scope.$index)"
                 ></el-autocomplete>
               </template>
 
@@ -72,14 +75,18 @@
 
               <!-- 承运商 -->
               <template v-if="item.prop == 'carrierName'">
-                 <el-select v-model="scope.row.carrierName" placeholder="请选择"  
-                 @change="batchUpdateValue(scope.row,scope.$index)"
-                 disabled>
+                <el-select
+                  v-model="scope.row.carrierName"
+                  placeholder="请选择"
+                  @change="batchUpdateValue(scope.row, scope.$index)"
+                  disabled
+                >
                   <el-option
                     v-for="item in carrierNameOptions[scope.$index]"
                     :key="item.value"
                     :label="item.label"
-                    :value="item.value">
+                    :value="item.value"
+                  >
                   </el-option>
                 </el-select>
               </template>
@@ -105,16 +112,12 @@
               </template>
 
               <!-- 运输单价id -->
-              <template v-if="item.prop == 'priceValue'" >
-                <el-input
-                  v-model="scope.row.priceValue"
-                  disabled
-                >
-                </el-input>
+              <template v-if="item.prop == 'priceValue'">
+                <el-input v-model="scope.row.priceValue" disabled> </el-input>
               </template>
               <!-- 截止日期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
-                 <el-date-picker
+                <el-date-picker
                   class="textinput3"
                   type="date"
                   v-model.number="scope.row.saleDateOfReceipt"
@@ -163,7 +166,7 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { getCookie } from "@/utils/util.js";
-import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
@@ -171,183 +174,193 @@ export default {
       //存放每一行记录的合并数
       spanArr: [],
       //pos是spanArr的索引
-      pos:0,
+      pos: 0,
       //加载
-      selectLineLoading:false,
+      selectLineLoading: false,
       //承运商下拉框中的值
-      carrierNameOptions:[],
+      carrierNameOptions: [],
       //当前车序号物资
-      selectionList:[],
+      selectionList: [],
       //是否可发送请求
       canSend: 1,
       tableTop: [
         {
           prop: "truckNo",
           label: "车序号",
-          width: "50",
+          width: "50"
         },
         {
           prop: "capacityNumber",
           label: "车牌号",
           width: "130",
-          slot: true,
+          slot: true
         },
         {
           prop: "driverTel",
           label: "司机电话号码",
           width: "150",
-          slot: true,
+          slot: true
         },
         {
           prop: "carrierName",
           label: "承运商",
           width: "240",
-          slot: true,
+          slot: true
         },
         {
           prop: "materialName",
           label: "物资名称",
-          width: "140",
+          width: "140"
         },
         {
           prop: "Specification",
           label: "规格型号",
-          width: "140",
+          width: "140"
         },
         {
           prop: "orderPlanWeight",
           label: "件数",
           width: "80",
-          slot: true,
+          slot: true
         },
         {
           prop: "materialWeight",
           label: "重量",
           width: "80",
-          slot: true,
+          slot: true
         },
         {
           prop: "lineName",
           label: "厂内运输线路",
-          width: "220",
+          width: "220"
         },
         {
           prop: "saleDateOfReceipt",
           label: "截止日期",
           width: "150",
-          slot: true,
+          slot: true
         },
         {
           prop: "saleShipperAddressName",
           label: "收货地址",
-          width: "300",
+          width: "300"
         },
         {
           prop: "priceValue",
           label: "运输单价",
           width: "80",
-          slot: true,
+          slot: true
         },
         {
           prop: "saleOrderConsignee",
           label: "收货客户",
           width: "150",
-          slot: true,
+          slot: true
         },
         {
           prop: "saleOrderConsigneeTel",
           label: "收货客户电话号码",
           slot: true,
-          width: "150",
+          width: "150"
         },
         {
           prop: "materialCode",
           label: "物资编码",
-          width: "140",
+          width: "140"
         },
-      ],
+        {
+          prop: "truckRemark",
+          label: "备注",
+          width: "140"
+        }
+      ]
     };
   },
-  created(){
+  created() {
     this.getValue();
   },
   methods: {
-    getValue(){
+    getValue() {
       this.axios
-      .post("/api/v1/ams/getTruckNoAndMaterialList?saleOrderId=" + this.$route.params.saleOrderId)
-      .then((res)=>{
-        if(res.data.data.length==0){
+        .post(
+          "/api/v1/ams/getTruckNoAndMaterialList?saleOrderId=" +
+            this.$route.params.saleOrderId
+        )
+        .then(res => {
+          if (res.data.data.length == 0) {
             this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning",
-              center: true,
+              center: true
             })
-            .then(() => {
-              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
-            })
-            .catch(() => {
-              this.$message({ type: "info", message: "取消!",});
-            });
-        }
-        console.log("res.data.data",res.data.data)
-        //赋值派车表格
-        res.data.data.forEach((e,i) => {
-          if(e.saleOrderConsignee=="null"){
-            e.saleOrderConsignee = null
-          }
-          if(e.saleOrderConsigneeTel=="null"){
-            e.saleOrderConsigneeTel = null
+              .then(() => {
+                this.$router.push(
+                  "/addSaleOrderArrange/" + this.$route.params.saleOrderId
+                );
+              })
+              .catch(() => {
+                this.$message({ type: "info", message: "取消!" });
+              });
           }
+          console.log("res.data.data", res.data.data);
+          //赋值派车表格
+          res.data.data.forEach((e, i) => {
+            if (e.saleOrderConsignee == "null") {
+              e.saleOrderConsignee = null;
+            }
+            if (e.saleOrderConsigneeTel == "null") {
+              e.saleOrderConsigneeTel = null;
+            }
             //带承运商初始化派车表格
             var addmap = {
-                truckNo: e.truckNo,
-                saleOrderMaterialId: e.saleOrderMaterialId,
-                capacityNumber: null,
-                driverTel: null,
-                carrierName: e.carrierName,
-                carrierId: e.carrierId,
-                materialId: e.materialId,
-                materialName: e.materialName,
-                Specification: e.materialModelSpecification,
-                materialCode: e.materialCode,
-                orderPlanWeight: e.materialNumber,
-                materialWeight: e.materialWeight,
-                lineName:null,
-                lineId:null,
-                saleShipperAddressId: e.placeId,
-                saleShipperAddressName:e.place,
-                saleDateOfReceipt: e.receiptDate,
-                saleOrderConsignee: e.saleOrderConsignee,
-                saleOrderConsigneeTel: e.saleOrderConsigneeTel
+              truckNo: e.truckNo,
+              saleOrderMaterialId: e.saleOrderMaterialId,
+              capacityNumber: null,
+              driverTel: null,
+              carrierName: e.carrierName,
+              carrierId: e.carrierId,
+              materialId: e.materialId,
+              materialName: e.materialName,
+              Specification: e.materialModelSpecification,
+              materialCode: e.materialCode,
+              orderPlanWeight: e.materialNumber,
+              materialWeight: e.materialWeight,
+              lineName: null,
+              lineId: null,
+              saleShipperAddressId: e.placeId,
+              saleShipperAddressName: e.place,
+              saleDateOfReceipt: e.receiptDate,
+              saleOrderConsignee: e.saleOrderConsignee,
+              saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+              truckRemark: e.truckRemark
             };
             this.selectionList.push(addmap);
             //调用记录每一行的合并数的方法
             this.getSpanArr(this.selectionList);
             //初始化每个车的线路
             this.initializeLine();
+          });
         });
-      });
     },
-    onInput(val){
-      if(!isNumber(val)){
-        this.$message.warning('重量/电话号码请输入数字')
+    onInput(val) {
+      if (!isNumber(val)) {
+        this.$message.warning("重量/电话号码请输入数字");
       }
     },
     //校验是否为车牌
     isVehicleNumber(vehicleNumber) {
       var result = false;
-      if(vehicleNumber!=null){
+      if (vehicleNumber != null) {
         if (vehicleNumber.length == 7) {
-          var express =
-            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
           result = express.test(vehicleNumber);
         }
       }
       return result;
     },
     //绑定车牌号和承运商的关系
-    bindRelationship(mapValue){
+    bindRelationship(mapValue) {
       let RmsCapacity = {
         capacityTypeId: 1,
         capacityNumber: mapValue.capacityNumber,
@@ -357,74 +370,82 @@ export default {
         capacityBlacklist: "否",
         remark: null,
         carrierId: mapValue.carrierId,
-        state: mapValue.carrierName,
+        state: mapValue.carrierName
       };
-      this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
+      this.$confirm(
+        "车牌号(" +
+          mapValue.capacityNumber +
+          ")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?",
+        "提示",
+        {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning",
-      })
-      .then(() => {
+          type: "warning"
+        }
+      )
+        .then(() => {
           this.axios
             .post("/api/v1/rms/insertCapacity", RmsCapacity)
-            .then((res) => {
-              console.log("res",res)
+            .then(res => {
+              console.log("res", res);
               if (res.data.data == 0) {
                 this.$message.success("该车牌号与承运商绑定关系成功!");
-              } 
+              }
             });
         })
-        .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
+        .catch(() => {
+          this.$message({ type: "info", message: "已取消删除" });
+        });
     },
     //失焦事件后确定车牌号与承运商是否有绑定关系
-    checkRelationship(index){
-      if(this.selectionList[index].carrierId!=null){
+    checkRelationship(index) {
+      if (this.selectionList[index].carrierId != null) {
         //暂存车牌号
-      var capacityNumber1;
-      if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
-        let mapValue = {
-        capacityNumber:this.selectionList[index].capacityNumber,
-        carrierId:this.selectionList[index].carrierId,
-        carrierName:this.selectionList[index].carrierName
-      }
-      this.axios
-       .post("/api/v1/uc/isInCapacityCarrier", mapValue)
-       .then((res)=>{
-         if(res.data.code=="201"){
-           capacityNumber1 = res.data.data;
-           if(capacityNumber1==null){
-             this.selectionList[index].capacityNumber = null;
-             this.$message.error("该车牌号未注册,请先前往注册!");
-           }else{
-             this.bindRelationship(mapValue);
-           }
-         }
-       });
-      }
+        var capacityNumber1;
+        if (this.isVehicleNumber(this.selectionList[index].capacityNumber)) {
+          let mapValue = {
+            capacityNumber: this.selectionList[index].capacityNumber,
+            carrierId: this.selectionList[index].carrierId,
+            carrierName: this.selectionList[index].carrierName
+          };
+          this.axios
+            .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+            .then(res => {
+              if (res.data.code == "201") {
+                capacityNumber1 = res.data.data;
+                if (capacityNumber1 == null) {
+                  this.selectionList[index].capacityNumber = null;
+                  this.$message.error("该车牌号未注册,请先前往注册!");
+                } else {
+                  this.bindRelationship(mapValue);
+                }
+              }
+            });
+        }
       }
     },
     //车牌号弹出层
     handleSelect(item) {
-      console.log("item")
-        // let mapValue = {
-        //   capacityNumber:item.capacityNumber,
-        //   carrierId:this.receiveCarrierId,
-        //   carrierName:this.receiveCarrierName
-        // }
-        // this.axios
-        // .post("/api/v1/uc/isInCapacityCarrier", mapValue)
-        // .then((res)=>{
-        //   if(res.data.code=="201"){
-        //     this.bindRelationship(mapValue);
-        //   }
-        // });
+      console.log("item");
+      // let mapValue = {
+      //   capacityNumber:item.capacityNumber,
+      //   carrierId:this.receiveCarrierId,
+      //   carrierName:this.receiveCarrierName
+      // }
+      // this.axios
+      // .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+      // .then((res)=>{
+      //   if(res.data.code=="201"){
+      //     this.bindRelationship(mapValue);
+      //   }
+      // });
     },
 
     //以下是车牌号边输边查搜索
-    querySearch(queryString, cb){
+    querySearch(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             var restaurants = res.data.data;
             var results = queryString
@@ -436,7 +457,7 @@ export default {
         });
     },
     createFilter(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -445,251 +466,289 @@ export default {
     },
     //以上是车牌号边输边查搜索
 
-     //校验是否为电话号码
-    checkIsTelephone(index){
+    //校验是否为电话号码
+    checkIsTelephone(index) {
       //电话号码校验
       var reg = /^[1][345789]\d{9}$/;
-      if(!reg.test(this.selectionList[index].driverTel)){
+      if (!reg.test(this.selectionList[index].driverTel)) {
         this.canSend = -1;
-        this.$message.warning('电话号码格式不正确,请输入正确的电话号码!')
-      }else{
+        this.$message.warning("电话号码格式不正确,请输入正确的电话号码!");
+      } else {
         this.canSend = 1;
       }
     },
     //点击确定按钮的事件
-    makeSure(){
+    makeSure() {
       //是否可发送请求
-      if(this.canSend==-1){
-          this.$message.warning('电话号码格式不正确,请输入正确的电话号码!')
-      }else{
-          this.$confirm("是否确定进行钢材派单!", "提示", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning",
-              center: true,
-            })
-            .then(() => {
-              var mapList = [];
-              for(var i=0;i<this.spanArr.length;i++){
-                if(this.spanArr[i]>0&&this.selectionList[i].capacityNumber){
-                  var mapItem = {
+      if (this.canSend == -1) {
+        this.$message.warning("电话号码格式不正确,请输入正确的电话号码!");
+      } else {
+        this.$confirm("是否确定进行钢材派单!", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true
+        })
+          .then(() => {
+            var mapList = [];
+            for (var i = 0; i < this.spanArr.length; i++) {
+              if (this.spanArr[i] > 0 && this.selectionList[i].capacityNumber) {
+                var mapItem = {
                   //车牌号
-                  capacityNumber : null,
+                  capacityNumber: null,
                   //司机电话号码
-                  driverTel : null,
+                  driverTel: null,
                   //车序号主键
-                  saleOrderMaterialId : 0,
+                  saleOrderMaterialId: 0,
                   //承运商Id
-                  carrierId : 0,
+                  carrierId: 0,
                   //线路Id
-                  lineId : 0,
-                }
-                mapItem.capacityNumber = this.selectionList[i].capacityNumber,
-                mapItem.driverTel = this.selectionList[i].driverTel,
-                mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
-                mapItem.carrierId = this.selectionList[i].carrierId,
-                mapItem.lineId = this.selectionList[i].lineId,
-                mapList.push(mapItem);
-                }
+                  lineId: 0
+                };
+                (mapItem.capacityNumber = this.selectionList[i].capacityNumber),
+                  (mapItem.driverTel = this.selectionList[i].driverTel),
+                  (mapItem.saleOrderMaterialId = this.selectionList[
+                    i
+                  ].saleOrderMaterialId),
+                  (mapItem.carrierId = this.selectionList[i].carrierId),
+                  (mapItem.lineId = this.selectionList[i].lineId),
+                  mapList.push(mapItem);
               }
-              this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
-              .then((res)=>{
-                  if(res.data.code == '200'){
+            }
+            this.axios
+              .post("/api/v1/ams/dispatchSteelOrder", mapList)
+              .then(res => {
+                if (res.data.code == "200") {
                   this.cancel();
                 }
-                  this.$message.success('派单成功!')               
+                this.$message.success("派单成功!");
               });
-            })
-            .catch(() => {
-              this.$message({ type: "info", message: "取消!",});
-            });
+          })
+          .catch(() => {
+            this.$message({ type: "info", message: "取消!" });
+          });
       }
     },
     //点击取消按钮的事件
-    cancel(){
-      this.$router.push('/saleOrderSteelCarrier')
+    cancel() {
+      this.$router.push("/saleOrderSteelCarrier");
     },
 
     //批量修改内层值
-    batchUpdateValue(row,index){
-        for(var i=index;i<this.spanArr[index]+index;i++){
-          this.selectionList[i].capacityNumber=row.capacityNumber;
-        }
+    batchUpdateValue(row, index) {
+      for (var i = index; i < this.spanArr[index] + index; i++) {
+        this.selectionList[i].capacityNumber = row.capacityNumber;
+      }
     },
     //初始化线路
-    initializeLine(){
-      for(var i=0;i<this.spanArr.length;i++){
-        if(this.spanArr[i]==1){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
+    initializeLine() {
+      for (var i = 0; i < this.spanArr.length; i++) {
+        if (this.spanArr[i] == 1) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材单拼路线" + " " + "进厂-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110001;
           }
         }
-        if(this.spanArr[i]==2){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 2) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材二拼路线" +
+              " " +
+              "计皮-进厂-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110002;
           }
         }
-        if(this.spanArr[i]==3){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 3) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材三拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110003;
           }
         }
-        if(this.spanArr[i]==4){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 4) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材四拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110004;
           }
         }
-        if(this.spanArr[i]==5){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 5) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材五拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110005;
           }
         }
-        if(this.spanArr[i]==6){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 6) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材六拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110006;
           }
         }
-        if(this.spanArr[i]==7){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 7) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材七拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110007;
           }
         }
-        if(this.spanArr[i]==8){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 8) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材八拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110008;
           }
         }
-        if(this.spanArr[i]==9){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 9) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材九拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110009;
           }
         }
-        if(this.spanArr[i]==10){
-          for(var j=i;j<this.spanArr[i]+i;j++){
-            this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+        if (this.spanArr[i] == 10) {
+          for (var j = i; j < this.spanArr[i] + i; j++) {
+            this.selectionList[j].lineName =
+              "总厂:销售钢材十拼路线" +
+              " " +
+              "进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂";
             this.selectionList[j].lineId = 110010;
           }
         }
       }
-      
     },
     //记录每一行的合并数
     getSpanArr(data) {
       //每次调用方法初始化
       this.spanArr = [];
       for (var i = 0; i < data.length; i++) {
-            if (i === 0) {
-                  this.spanArr.push(1);
-                  this.pos = 0
-            } else {
-                // 判断当前元素与上一个元素是否相同
-                if (data[i].truckNo === data[i - 1].truckNo) {
-                  this.spanArr[this.pos] += 1;
-                  this.spanArr.push(0);
-                } else {
-                  this.spanArr.push(1);
-                  this.pos = i;
-                }
-            }
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].truckNo === data[i - 1].truckNo) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+          }
         }
+      }
     },
     //根据条件合并行
     cellMerge({ row, column, rowIndex, columnIndex }) {
       if (columnIndex === 0) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 1) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 2) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 3) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 8) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 9) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 10) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 11) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 12) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (columnIndex === 13) {
-            const _row = this.spanArr[rowIndex];
-            const _col = _row > 0 ? 1 : 0;
-            return {
-                  rowspan: _row,
-                  colspan: _col
-            }
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
-    },
-  },
+      if (columnIndex === 15) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    }
+  }
 };
 </script>
 
-<style lang='scss'>
+<style lang="scss">
 .addSaleOrderSend {
   .from {
     margin-top: 20px;
@@ -729,17 +788,17 @@ export default {
       }
     }
   }
-  .tablecls{
+  .tablecls {
     margin-top: 20px;
   }
-  .button_box{
+  .button_box {
     display: flex;
     justify-content: center;
     margin: 20px;
-    .el-button{
+    .el-button {
       width: 100px;
       margin-left: 20px;
     }
   }
 }
-</style>
+</style>

+ 77 - 96
src/views/appoint/components/saleContract/saleOrder.vue

@@ -2,39 +2,23 @@
   <!-- 销售订单页面 -->
   <div class="salePlan">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" style="width:250px" clearable> </el-input>
-          <el-button type="primary" class="btn" @click="onclick">
-          <i class="el-icon-search"></i>查询
-          </el-button>
-          <el-button type="primary" @click="refresh">
-            <i class="el-icon-refresh"></i>刷新
-          </el-button>
-          <!-- <el-form :inline="true">
-            <el-form-item>
-              <label class="el-form-item__label" style="width: auto;">时间段</label>
-                <el-date-picker
-                v-model="startDate"
-                type="date"
-                placeholder="开始日期"
-                style="width:200px">
-            </el-date-picker>
-            </el-form-item>
-            <el-form-item>
-              <label class="el-form-item__label" style="width: auto;">至</label>
-                <el-date-picker
-                v-model="endDate"
-                type="date"
-                placeholder="结束日期"
-                style="width:200px">
-            </el-date-picker>
-            </el-form-item>
-            <el-form-item>
-            </el-form-item>
-          </el-form> -->
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="width:250px"
+        clearable
+      >
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 已审批 -->
-       <el-tab-pane label="已审批" name="four">
+      <el-tab-pane label="已审批" name="four">
         <dilTable v-bind.sync="option4" ref="table">
           <el-table-column fixed="right" label="操作" width="200">
             <template slot-scope="scope">
@@ -59,27 +43,26 @@
             </template>
           </el-table-column>
           <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
-      
     </el-tabs>
   </div>
 </template>
@@ -92,32 +75,29 @@ export default {
       // shiyHeigth:140,
       // isHeigth:true,
       // isKuang:false,
-      startDate : new Date().getTime() - 3600 * 1000 * 24 * 85,
-      endDate : new Date(),
+      startDate: new Date().getTime() - 3600 * 1000 * 24 * 85,
+      endDate: new Date(),
       activeName: "four",
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408",
+        requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+        requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
       },
       option3: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+        requestUrl: "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409"
       },
       option4: {
         // 表格请求数据的地址
         requestUrl:
           "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2"
-          // &startDate="+sjTime(new Date().getTime() - 3600 * 1000 * 24 * 85)+"&endDate="+sjTime(new Date()),
+        // &startDate="+sjTime(new Date().getTime() - 3600 * 1000 * 24 * 85)+"&endDate="+sjTime(new Date()),
       },
-      
+
       //记录旧的row对象 (销售公司已审批)
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
@@ -138,23 +118,23 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       //(销售公司已审批)
       tableData: [],
@@ -163,23 +143,27 @@ export default {
       //(已上报)
       tableData2: [],
       //(未上报)
-      tableData3: [],
+      tableData3: []
     };
   },
   methods: {
-    refresh(){
+    refresh() {
       this.$router.go(0);
     },
     handleClick(tab, event) {
       console.log(tab, event);
     },
     onclick() {
-      if(this.activeName == "first"){
-        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
-      }else if(this.activeName == "second"){
-        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
-      }else if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2&con="+this.input;      
+      if (this.activeName == "first") {
+        this.option.requestUrl =
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408&con=" + this.input;
+      } else if (this.activeName == "second") {
+        this.option2.requestUrl =
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408&con=" + this.input;
+      } else if (this.activeName == "four") {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2&con=" +
+          this.input;
       }
     },
     seeclick(saleOrderId) {
@@ -188,10 +172,10 @@ export default {
     click(saleOrderId) {
       this.$router.push("/editSaleOrder/" + saleOrderId);
     },
-    addClick(saleOrderId){
+    addClick(saleOrderId) {
       this.$router.push("/addSaleOrderArrange/" + saleOrderId);
     },
-    sendClick(saleOrderId){
+    sendClick(saleOrderId) {
       this.$router.push("/addSaleOrderSend/" + saleOrderId);
     },
     // -------查看物资详情 (已审批)
@@ -219,8 +203,8 @@ export default {
       this.oldRow = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData = res.data.data;
         });
     },
@@ -250,8 +234,8 @@ export default {
       this.oldRow1 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData1 = res.data.data;
         });
     },
@@ -281,8 +265,8 @@ export default {
       this.oldRow2 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
@@ -312,8 +296,8 @@ export default {
       this.oldRow3 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData3 = res.data.data;
         });
     },
@@ -324,18 +308,15 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "上传成功!",
+            message: "上传成功!"
           });
           this.axios
-            .post(
-              "/api/v1/ams/uploadSaleOrder?saleOrderId=" +
-                saleOrderId
-            )
+            .post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
             .then(() => {
               this.$router.go(0);
             });
@@ -343,7 +324,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消上传!",
+            message: "取消上传!"
           });
         });
     },
@@ -354,12 +335,12 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "删除成功!",
+            message: "删除成功!"
           });
           this.axios
             .post(
@@ -373,14 +354,14 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .salePlan {
   .top {
     padding: 1.25rem 0.375rem;
@@ -390,4 +371,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 228 - 120
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -12,12 +12,24 @@
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
       </el-button>
+      <el-button type="primary" @click="batchReport">
+        <i class="upload2"></i>批量上传
+      </el-button>
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 未上报 -->
       <el-tab-pane label="未上报" name="first">
-        <dilTable v-bind.sync="option" ref="table3">
-          <el-table-column fixed="right" label="操作" align="center" width="200">
+        <dilTable
+          v-bind.sync="option"
+          ref="table3"
+          @selection-change="selectionChange"
+        >
+          <el-table-column
+            fixed="right"
+            label="操作"
+            align="center"
+            width="200"
+          >
             <template slot-scope="scope">
               <el-button
                 @click="uploadclick(scope.row.saleOrderId)"
@@ -45,30 +57,29 @@
               >
             </template>
           </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData3" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData3" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
       <!-- 已审批 -->
-       <el-tab-pane label="已审批" name="four">
+      <el-tab-pane label="已审批" name="four">
         <dilTable v-bind.sync="option4" ref="table">
           <el-table-column fixed="right" label="操作" width="80">
             <template slot-scope="scope">
@@ -81,31 +92,30 @@
             </template>
           </el-table-column>
           <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
       <!-- 已上报 -->
       <el-tab-pane label="已上报" name="second">
         <dilTable v-bind.sync="option2" ref="table2">
-        <el-table-column fixed="right" label="操作" width="70">
+          <el-table-column fixed="right" label="操作" width="70">
             <template slot-scope="scope">
               <el-button
                 @click="detailclick2(scope.row)"
@@ -115,37 +125,37 @@
               >
             </template>
           </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData2" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData2" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
-      
     </el-tabs>
   </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "saleOrder",
   data() {
     return {
+      batchReportList: [],
       activeName: "first",
       drawer: false,
       input: "",
@@ -154,26 +164,20 @@ export default {
       carrierName: null,
       option: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408",
+        requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408",
+        selectionType: "select"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
-      },
-      option3: {
-        // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+        requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
       },
       option4: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1",
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1"
       },
       mapList: [],
-      mapItemList:[],
+      mapItemList: [],
       //记录旧的row对象 (销售公司已审批)
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
@@ -194,23 +198,23 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       //(销售公司已审批)
       tableData: [],
@@ -219,23 +223,126 @@ export default {
       //(已上报)
       tableData2: [],
       //(未上报)
-      tableData3: [],
+      tableData3: []
     };
   },
+  created() {
+    if (getCookie("orgCode") == "shouhuokehu") {
+      this.option.requestUrl =
+        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+        getCookie("userId");
+      this.option2.requestUrl =
+        "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
+        getCookie("userId");
+      this.option4.requestUrl =
+        "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
+        getCookie("userId");
+    } else {
+      this.option.requestUrl =
+        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" + null;
+      this.option2.requestUrl =
+        "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" + null;
+      this.option4.requestUrl =
+        "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
+        null;
+    }
+  },
   methods: {
-    refresh(){
+    getRequestUrl() {
+      if (getCookie("orgCode") == "shouhuokehu") {
+        this.option.requestUrl =
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
+          null +
+          "&i=" +
+          new Date();
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
+          null +
+          "&i=" +
+          new Date();
+      }
+    },
+    batchReport() {
+      if (this.batchReportList.length === 0) {
+        this.$message.error("请先选择需要批量上传的销售订单");
+        return;
+      }
+      this.axios
+        .post("/api/v1/ams/uploadSaleOrderList", this.batchReportList)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("上传成功");
+            this.getRequestUrl();
+          } else {
+            this.$message.error("上传失败");
+          }
+        });
+    },
+    selectionChange(selection) {
+      console.log(selection);
+      this.batchReportList = [];
+      this.batchReportList = selection;
+    },
+    refresh() {
       this.$router.go(0);
     },
     handleClick(tab, event) {
       console.log(tab, event);
     },
     onclick() {
-      if(this.activeName == "first"){
-        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
-      }else if(this.activeName == "second"){
-        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
-      }else if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      if (getCookie("orgCode") == "shouhuokehu") {
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+            "/api/v1/ams/getSaleOrderInfoes?apiId=408&con=" +
+            this.input +
+            "&consigneeSsoId=" +
+            getCookie("userId");
+        } else if (this.activeName == "second") {
+          this.option2.requestUrl =
+            "/api/v1/ams/getSaleOrderReportedes?apiId=408&con=" +
+            this.input +
+            "&consigneeSsoId=" +
+            getCookie("userId");
+        } else if (this.activeName == "four") {
+          this.option4.requestUrl =
+            "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
+            this.input +
+            "&consigneeSsoId=" +
+            getCookie("userId");
+        }
+      } else {
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+            "/api/v1/ams/getSaleOrderInfoes?apiId=408&con=" + this.input;
+        } else if (this.activeName == "second") {
+          this.option2.requestUrl =
+            "/api/v1/ams/getSaleOrderReportedes?apiId=408&con=" + this.input;
+        } else if (this.activeName == "four") {
+          this.option4.requestUrl =
+            "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
+            this.input;
+        }
       }
     },
     seeclick(saleOrderId) {
@@ -272,8 +379,8 @@ export default {
       this.oldRow = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData = res.data.data;
         });
     },
@@ -303,8 +410,8 @@ export default {
       this.oldRow1 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData1 = res.data.data;
         });
     },
@@ -334,8 +441,8 @@ export default {
       this.oldRow2 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
@@ -365,8 +472,8 @@ export default {
       this.oldRow3 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
-        .then((res) => {
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .then(res => {
           this.tableData3 = res.data.data;
         });
     },
@@ -377,26 +484,25 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "上传成功!",
-          });
           this.axios
-            .post(
-              "/api/v1/ams/uploadSaleOrder?saleOrderId=" +
-                saleOrderId
-            )
-            .then(() => {
-              this.$router.go(0);
+            .post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
+            .then(res => {
+              if (res.data.code == "200") {
+                this.$message.success("上传成功!");
+                this.getRequestUrl();
+              } else {
+                this.$message.success("上传失败!");
+                this.getRequestUrl();
+              }
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消上传!",
+            message: "取消上传!"
           });
         });
     },
@@ -407,33 +513,35 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
           this.axios
             .post(
               "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
                 saleOrderId
             )
-            .then(() => {
-              this.$router.go(0);
+            .then(res => {
+              if (res.data.code == "200") {
+                this.$message.success("删除成功");
+                this.getRequestUrl();
+              } else {
+                this.$message.success("删除失败");
+                this.getRequestUrl();
+              }
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .salePlan {
   .top {
     padding: 1.25rem 0.375rem;
@@ -443,4 +551,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 165 - 99
src/views/appoint/components/saleContract/saleOrderSteelCar.vue

@@ -10,9 +10,27 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
+    <el-dialog
+      title="承运商信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <el-input style="width:250px" v-model="carrierText"></el-input>
+      <el-button type="primary" @click="getCarrier">查询</el-button>
+      <dilTable
+        v-bind.sync="carrierOption"
+        @radio-change="currentRadioChange1"
+      ></dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 未授权 -->
-       <el-tab-pane label="未授权" name="four">
+      <el-tab-pane label="未授权" name="four">
         <dilTable v-bind.sync="option4" ref="table">
           <el-table-column fixed="right" label="操作" width="200">
             <template slot-scope="scope">
@@ -37,33 +55,35 @@
             </template>
           </el-table-column>
           <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
 
       <!-- 未派车 -->
       <el-tab-pane label="未派车" name="five">
         <dilTable v-bind.sync="option0" ref="table0">
-        <el-table-column fixed="right" label="操作" width="70">
+          <el-table-column fixed="right" label="操作" width="160">
             <template slot-scope="scope">
+              <el-button @click="updateCarrier(scope)" type="text" size="small"
+                >修改承运商授权</el-button
+              >
               <el-button
                 @click="detailclick0(scope.row)"
                 type="text"
@@ -72,26 +92,25 @@
               >
             </template>
           </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData0" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData0" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
       <!-- 已派车 -->
@@ -107,29 +126,27 @@
               >
             </template>
           </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData3" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData3" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
-      
     </el-tabs>
   </div>
 </template>
@@ -138,6 +155,8 @@ export default {
   name: "saleOrder",
   data() {
     return {
+      carrierText: null,
+      dialogTableVisible: false,
       activeName: "four",
       drawer: false,
       input: "",
@@ -146,31 +165,30 @@ export default {
       carrierName: null,
       option: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getHaveCarTruckNoList?apiId=466",
+        requestUrl: "/api/v1/ams/getHaveCarTruckNoList?apiId=466"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+        requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
       },
       option3: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+        requestUrl: "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409"
       },
       option4: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSteelTruckNoList?apiId=411",
+        requestUrl: "/api/v1/ams/getSteelTruckNoList?apiId=411"
       },
       option0: {
         // 表格请求数据的地址
-        requestUrl:
-        "/api/v1/ams/getNoCarTruckNoList?apiId=466"
+        requestUrl: "/api/v1/ams/getNoCarTruckNoList?apiId=466"
+      },
+      carrierOption: {
+        requestUrl: "/api/v1/uc/getCarrierListByLike?apiId=412",
+        selectionType: "radio"
       },
       mapList: [],
-      mapItemList:[],
+      mapItemList: [],
       //记录旧的row对象 (销售公司已审批)
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
@@ -195,23 +213,23 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       //(销售公司已审批)
       tableData: [],
@@ -222,32 +240,71 @@ export default {
       //(未上报)
       tableData3: [],
       //(未派车)
-      tableData0: [],
+      tableData0: []
     };
   },
   methods: {
-    refresh(){
-      this.$router.go(0);
+    getRequestUrl() {
+      this.option.requestUrl =
+        "/api/v1/ams/getHaveCarTruckNoList?apiId=466&i=" + new Date();
+      this.option4.requestUrl =
+        "/api/v1/ams/getSteelTruckNoList?apiId=411&i=" + new Date();
+      this.option0.requestUrl =
+        "/api/v1/ams/getNoCarTruckNoList?apiId=466&i=" + new Date();
+    },
+    updateCarrier(scope) {
+      console.log(scope.row);
+      this.saleOrderMaterialId = scope.row.saleOrderMaterialId;
+      this.dialogTableVisible = true;
+    },
+    currentRadioChange1(row) {
+      console.log(row);
+      this.carrierId = row.carrierId;
+    },
+    getCarrier() {
+      this.carrierOption.requestUrl =
+        "/api/v1/uc/getCarrierListByLike?apiId=412&index=" + this.carrierText;
+    },
+    //修改承运商授权
+    updateTruckCapacity() {
+      let map = {
+        carrierId: this.carrierId,
+        saleOrderMaterialId: this.saleOrderMaterialId
+      };
+      this.axios.post("/api/v1/ams/updateTruckNoCarrier", map).then(res => {
+        if (res.data.code == "200") {
+          this.$message.success("修改授权成功");
+          this.getRequestUrl();
+          this.dialogTableVisible = false;
+        }
+      });
     },
+    refresh() {
+      this.getRequestUrl();
+    },
+
     handleClick(tab, event) {
       console.log(tab, event);
     },
     onclick() {
-      if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSteelTruckNoList?apiId=411&con="+this.input;
-      }else if(this.activeName == "five"){
-        this.option0.requestUrl = "/api/v1/ams/getNoCarTruckNoList?apiId=466&con="+this.input;         
-      }else if(this.activeName == "first"){
-        this.option.requestUrl = "/api/v1/ams/getHaveCarTruckNoList?apiId=466&con="+this.input;      
+      if (this.activeName == "four") {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSteelTruckNoList?apiId=411&con=" + this.input;
+      } else if (this.activeName == "five") {
+        this.option0.requestUrl =
+          "/api/v1/ams/getNoCarTruckNoList?apiId=466&con=" + this.input;
+      } else if (this.activeName == "first") {
+        this.option.requestUrl =
+          "/api/v1/ams/getHaveCarTruckNoList?apiId=466&con=" + this.input;
       }
     },
     seeclick(saleOrderId) {
       this.$router.push("/saleOrderDetail/" + saleOrderId);
     },
-    empowerCarrierClick(saleOrderMaterialId){
+    empowerCarrierClick(saleOrderMaterialId) {
       this.$router.push("/saleOrderSteelEmpower/" + saleOrderMaterialId);
     },
-    steelSendClick(saleOrderMaterialId){
+    steelSendClick(saleOrderMaterialId) {
       this.$router.push("/addSaleOrderSteelSend/" + saleOrderMaterialId);
     },
     // -------查看物资详情 (已审批)
@@ -275,8 +332,11 @@ export default {
       this.oldRow = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
-        .then((res) => {
+        .post(
+          "/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +
+            row.saleOrderMaterialId
+        )
+        .then(res => {
           this.tableData = res.data.data;
         });
     },
@@ -306,8 +366,11 @@ export default {
       this.oldRow3 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
-        .then((res) => {
+        .post(
+          "/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +
+            row.saleOrderMaterialId
+        )
+        .then(res => {
           this.tableData3 = res.data.data;
         });
     },
@@ -337,15 +400,18 @@ export default {
       this.oldRow0 = row;
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
-        .then((res) => {
+        .post(
+          "/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +
+            row.saleOrderMaterialId
+        )
+        .then(res => {
           this.tableData0 = res.data.data;
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .salePlan {
   .top {
     padding: 1.25rem 0.375rem;
@@ -355,4 +421,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 313 - 208
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -4,14 +4,19 @@
     <page-title>运输预约</page-title>
     <div class="purchaseOrder from">
       <span class="text">卸货厂区:</span>
-      <el-select v-model="purchaseOrgId" placeholder="请选择" @change="onchange()" ref="selectlb">
+      <el-select
+        v-model="purchaseOrgId"
+        placeholder="请选择"
+        @change="onchange()"
+        ref="selectlb"
+      >
         <el-option
           v-for="item in purchaseOrgList"
           :key="item.value"
-          :label="item.label" 
+          :label="item.label"
           :value="item.value"
         >
-      </el-option>
+        </el-option>
       </el-select>
     </div>
     <div class="material from">
@@ -24,6 +29,25 @@
       <el-input class="input" v-model="supplierName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
     </div>
+    <div class="shipName from">
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="船名:">
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateConsignee"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入船名"
+            :trigger-on-focus="false"
+            @select="handleSelectConsignee"
+            @input="onInputShipName"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.value }}</div>
+            </template>
+          </el-autocomplete>
+        </el-form-item>
+      </el-form>
+    </div>
     <div class="forwardingUnit from">
       <span class="text">卸货点:</span>
       <el-input class="input" v-model="unloadPointName" disabled> </el-input>
@@ -34,26 +58,22 @@
       <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
     </div>
     <div class="carrier from">
-       <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="选择承运商:">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateCarrier"
-          :fetch-suggestions="querySearchCarrier"
-          placeholder="请输入承运商名称"
-          :trigger-on-focus="false"
-          @select="handleSelectCarrier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.carrierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateCarrier"
+            :fetch-suggestions="querySearchCarrier"
+            placeholder="请输入承运商名称"
+            :trigger-on-focus="false"
+            @select="handleSelectCarrier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.carrierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-    </el-form>
+      </el-form>
     </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
@@ -95,7 +115,9 @@
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -107,18 +129,20 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      disabled:false,
+      disabled: false,
       //船名
       remark: null,
-      rangeId:null,
+      rangeId: null,
+      stateConsignee: null,
+      consigneeId: null,
       //车辆表格数据
       selectionList: [],
-      stateCarrier:null,
-      purchaseOrgId:null,
+      stateCarrier: null,
+      purchaseOrgId: null,
       // 表单
       form1: {},
       //采购订单号
-      purchaseOrderNo:"",
+      purchaseOrderNo: "",
       //采购订单id
       purchaseOrderId: "",
       //物资名称
@@ -127,7 +151,7 @@ export default {
       supplierName: "",
       //发货单位id
       supplierId: null,
-      carrierId:null,
+      carrierId: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -142,32 +166,33 @@ export default {
       frist: {
         requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       secend: {
         requestUrl:
           "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=",
         selectionType: "radio",
-        mapList2: [],
+        mapList2: []
       },
       third: {
         requestUrl: "",
         selectionType: "select",
-        mapList3: [],
+        mapList3: []
       },
       unloadPoint: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      purchaseOrgLable:null,
-      purchaseOrgList : [
+      purchaseOrgLable: null,
+      purchaseOrgList: [
         {
-          value:1,
-          label:'一厂'
-        },{
-          value:2,
-          label:'二厂'
-          }
+          value: 1,
+          label: "一厂"
+        },
+        {
+          value: 2,
+          label: "二厂"
+        }
       ]
     };
   },
@@ -176,56 +201,62 @@ export default {
       if (!val) {
         this.input = null;
       }
-    },
+    }
   },
   created() {
-      this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374"
+    this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374";
   },
   methods: {
     onClick(index) {
       this.selectionList.splice(index, 1);
     },
+    onInputShipName() {
+      if (this.materialId == null) {
+        this.$message.warning("请先选择物资!");
+        return;
+      }
+    },
     onBlur() {
       this.getPurchaseOrderNo();
     },
-    onchange(){
+    onchange() {
       this.getPurchaseOrderNo();
-      console.log(this.purchaseOrgId)
-      if(this.purchaseOrgId == 1) {
-        this.purchaseOrgLable = "一厂"
-        this.rangeId = 2
-      }else{
-        this.purchaseOrgLable = "二厂"
-        this.rangeId = 3
-      }  
+      console.log(this.purchaseOrgId);
+      if (this.purchaseOrgId == 1) {
+        this.purchaseOrgLable = "一厂";
+        this.rangeId = 2;
+      } else {
+        this.purchaseOrgLable = "二厂";
+        this.rangeId = 3;
+      }
     },
     getPurchaseOrderNo() {
       let map = {
         materialId: this.materialId,
         supplierId: this.supplierId,
-        purchaseOrgId:this.purchaseOrgId
+        purchaseOrgId: this.purchaseOrgId
       };
       if (this.remark) {
         map.remark = this.remark;
       }
       console.log(map);
       if (this.materialId && this.supplierId && this.purchaseOrgId) {
-        this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
+        this.axios.post("/api/v1/oms/selectNewOrderId", map).then(res => {
           console.log(res);
           if (res.data.code == "200") {
             if (res.data.data == null) {
               this.$message({
                 message: "没有匹配的采购订单号!",
-                type: "warning",
+                type: "warning"
               });
-              this.purchaseOrderNo = null
+              this.purchaseOrderNo = null;
               this.form1 = [];
             } else {
               console.log();
-              console.log(res.data.data)
+              console.log(res.data.data);
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
-              this.purchaseOrderNo = res.data.data.purchaseOrderNo ;           
+              this.purchaseOrderNo = res.data.data.purchaseOrderNo;
             }
           } else {
             this.$message.error("请求失败");
@@ -246,7 +277,10 @@ export default {
           this.input;
       } else if (a == 4) {
         this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input + "&i=" + new Date();
+          "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" +
+          this.input +
+          "&i=" +
+          new Date();
       }
     },
     ondrawer(num) {
@@ -258,28 +292,36 @@ export default {
           this.materialId;
       }
     },
-     //承运商弹出层
-    handleSelectCarrier(item){    
-      this.carrierId = item.carrierId
-      item.carrierName = this.stateCarrier
+    //承运商弹出层
+    handleSelectCarrier(item) {
+      this.carrierId = item.carrierId;
+      item.carrierName = this.stateCarrier;
     },
     //以下是承运商边输边查搜索
     querySearchCarrier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          var restaurantsCarrier = res.data.data
-          console.log(restaurantsCarrier,"restaurantsCarrier");
-          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsCarrier = res.data.data;
+            console.log(restaurantsCarrier, "restaurantsCarrier");
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterCarrier(queryString) {
-        return (restaurantsCarrier)  =>  {
-          return (restaurantsCarrier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //以上是承运商边输边查搜索
     // 返回
     onClickCancel() {
@@ -303,10 +345,60 @@ export default {
       this.selectionList = [];
       this.selectionList = selection;
     },
+    //收货单位弹出层
+    handleSelectConsignee(item) {
+      this.supplierName = item.supplierName;
+      this.supplierId = item.supplierId;
+      this.purchaseOrderId = item.purchaseOrderId;
+      this.purchaseOrderNo = item.purchaseOrderNo;
+      item.value = this.shipName;
+    },
+    //以下是收货单位边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      if (this.materialId) {
+        this.axios
+          .post(
+            "/api/v1/uc/getShipNameMesByLike?index=" +
+              queryString +
+              "&materialId= " +
+              parseInt(this.materialId)
+          )
+          .then(res => {
+            if (res.data.code == "200") {
+              console.log(res);
+              var restaurantsConsignee = res.data.data;
+              var results = queryString
+                ? restaurantsConsignee.filter(
+                    this.createFilterConsignee(queryString)
+                  )
+                : restaurantsConsignee;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilterConsignee(queryString) {
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    //以上是返回单位边输边查搜索
     // 确认
     onClickConfirm() {
-      console.log(this.purchaseOrgLable,this.materialName,this.supplierName,this.purchaseOrderNo,this.unloadPointName,this.stateCarrier)
-      this.disabled = true
+      console.log(
+        this.purchaseOrgLable,
+        this.materialName,
+        this.supplierName,
+        this.purchaseOrderNo,
+        this.unloadPointName,
+        this.stateCarrier
+      );
+      this.disabled = true;
       var state = 0;
       if (
         this.materialId &&
@@ -319,27 +411,27 @@ export default {
         if (!this.materialId) {
           this.$message({
             message: "请选择物资!",
-            type: "warning",
+            type: "warning"
           });
-          this.disabled = false
+          this.disabled = false;
         } else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",
-            type: "warning",
+            type: "warning"
           });
-          this.disabled = false
+          this.disabled = false;
         } else if (!this.purchaseOrderId) {
           this.$message({
             message: "没有匹配的采购订单号!",
-            type: "warning",
+            type: "warning"
           });
-          this.disabled = false
+          this.disabled = false;
         } else if (!this.unloadPointId) {
           this.$message({
             message: "请选择卸货地点!",
-            type: "warning",
+            type: "warning"
           });
-          this.disabled = false
+          this.disabled = false;
         }
       }
       if (state == 1) {
@@ -347,149 +439,162 @@ export default {
           materialId: this.materialId,
           purchaseOrderId: this.purchaseOrderId,
           unloadPointId: this.unloadPointId,
-          carrierId:this.carrierId,
-          rangeId:this.rangeId,
-          userId:getCookie("orgCode")
+          carrierId: this.carrierId,
+          rangeId: this.rangeId,
+          userId: getCookie("orgCode")
         };
         console.log(map, map);
-        this.axios.post("/api/v1/ams/addPurInwardRequirement", map).then((res) => {
-          if (res.data.code == "200") {
-            this.$message({
-              message: "添加成功!",
-              type: "success",
-            });
-            this.disabled = false
-            this.onClickCancel()
-          }
-        });
+        this.axios
+          .post("/api/v1/ams/addPurInwardRequirement", map)
+          .then(res => {
+            if (res.data.code == "200") {
+              this.$message({
+                message: "添加成功!",
+                type: "success"
+              });
+              this.disabled = false;
+              this.onClickCancel();
+            }
+          });
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scope>
-.addPurRequirement{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.remark {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 100px;
-    text-align: right;
+.addPurRequirement {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
-  }
-}
-.lineId {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
-  }
-  .input {
-    width: 250px;
-    margin-right: 20px;
-  }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .remark {
+    display: flex;
+    justify-content: center;
+    .text {
+      display: inline-block;
+      width: 100px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.orderType {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 110px;
-    text-align: right;
+  .lineId {
+    display: flex;
+    justify-content: center;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .select {
-    width: 250px;
+  .shipName {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .el-form {
+      .el-form-item {
+        .el-input {
+          width: 250px;
+        }
+      }
+    }
   }
-  .span {
-    display: inline-block;
-    width: 30px;
-    height: 10px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.contractTitle {
-  display: flex;
-  justify-content: center;
-  .el-form-item {
+  .orderType {
     display: flex;
     justify-content: center;
-    .el-form-item__label {
-      display: flex;
-      align-items: center;
+    .text {
+      display: inline-block;
+      width: 110px;
+      text-align: right;
     }
-    .el-input {
+    .select {
       width: 250px;
     }
+    .span {
+      display: inline-block;
+      width: 30px;
+      height: 10px;
+    }
   }
-}
-.forwardingUnit {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .contractTitle {
+    display: flex;
+    justify-content: center;
+    .el-form-item {
+      display: flex;
+      justify-content: center;
+      .el-form-item__label {
+        display: flex;
+        align-items: center;
+      }
+      .el-input {
+        width: 250px;
+      }
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .forwardingUnit {
+    display: flex;
+    justify-content: center;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.purchaseOrderNo{
-  display: flex;
-  justify-content: center;
-  .text{
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .purchaseOrderNo {
+    display: flex;
+    justify-content: center;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 90px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 90px;
+  .carrier {
+    display: flex;
+    .el-autocomplete {
+      width: 250px;
+    }
   }
-}
-.carrier{
-  display: flex;
-  .el-autocomplete{
-    width: 250px;
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
   }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-
-</style>
+</style>

+ 1 - 0
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -906,6 +906,7 @@ export default {
     justify-content: center;
     margin-top: 20px;
     margin-bottom: 20px;
+    margin-left: 10px;
     ::v-deep .el-form {
       display: flex;
       justify-content: center;

+ 198 - 159
src/views/inward/components/truckAppoint/plan.vue

@@ -1,22 +1,25 @@
 // 制定计划
 <template>
   <div class="inwardPlan">
-    
     <div class="sache">
       <el-input placeholder="请输入内容" v-model="inputText" clearable>
       </el-input>
       <el-button type="primary" class="btn" @click="bofang">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-badge :value="addPlanCount" class="item" v-if="activeName == 'second'">
-        <el-button
-        type="primary"
-        class="btn"
-        @click="toInsert"
+      <el-badge
+        :value="addPlanCount"
+        class="item"
         v-if="activeName == 'second'"
       >
-        <i class="el-icon-plus"></i>制定计划
-      </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="toInsert"
+          v-if="activeName == 'second'"
+        >
+          <i class="el-icon-plus"></i>制定计划
+        </el-button>
       </el-badge>
       <!-- <audio 
        id="audioId"
@@ -33,16 +36,23 @@
       >
         <i class="el-icon-download"></i>下发
       </el-button>
-      
     </div>
     <template>
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="second">
-            <dilTable v-bind.sync="second" @selection-change="selectionChange" ref="table1">
+            <dilTable
+              v-bind.sync="second"
+              @selection-change="selectionChange"
+              ref="table1"
+            >
               <el-table-column fixed="right" label="操作" width="180">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="getRequirementMaterial1(scope.row)"
+                  >
                     物资详情
                   </el-button>
                   <el-button type="text" size="mini" @click="updatePlan(scope)">
@@ -53,25 +63,29 @@
                   </el-button>
                 </template>
               </el-table-column>
-                 <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-          </el-table-column>
+              <!-- 物资详情抽屉 -->
+              <el-table-column type="expand" width="1">
+                <template slot-scope="props">
+                  <el-form
+                    label-position="center"
+                    inline
+                    class="demo-table-expand"
+                  >
+                    <div v-if="false">{{ props }}</div>
+                    <div>
+                      <el-table :data="tableData" border>
+                        <el-table-column
+                          v-for="(item, i) in tableHead"
+                          :key="i"
+                          :prop="item.prop"
+                          :label="item.label"
+                          :width="item.width"
+                        ></el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form>
+                </template>
+              </el-table-column>
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="third">
@@ -83,7 +97,11 @@
                 width="180"
               >
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial2(scope.row)">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="getRequirementMaterial2(scope.row)"
+                  >
                     物资详情
                   </el-button>
                   <el-button type="text" size="mini" @click="finishPlan(scope)">
@@ -91,29 +109,37 @@
                   </el-button>
                 </template>
               </el-table-column>
-        <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-          </el-table-column>
+              <!-- 物资详情抽屉 -->
+              <el-table-column type="expand" width="1">
+                <template slot-scope="props">
+                  <el-form
+                    label-position="center"
+                    inline
+                    class="demo-table-expand"
+                  >
+                    <div v-if="false">{{ props }}</div>
+                    <div>
+                      <el-table :data="tableData" border>
+                        <el-table-column
+                          v-for="(item, i) in tableHead"
+                          :key="i"
+                          :prop="item.prop"
+                          :label="item.label"
+                          :width="item.width"
+                        ></el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form>
+                </template>
+              </el-table-column>
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已完成" name="fourth">
-            <dilTable v-bind.sync="fourth" @selection-change="selectionChange" ref="table3">
+            <dilTable
+              v-bind.sync="fourth"
+              @selection-change="selectionChange"
+              ref="table3"
+            >
               <el-table-column
                 fixed="right"
                 align="center"
@@ -121,30 +147,38 @@
                 width="100"
               >
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial3(scope.row)">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="getRequirementMaterial3(scope.row)"
+                  >
                     物资详情
                   </el-button>
                 </template>
               </el-table-column>
-        <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-          </el-table-column> 
+              <!-- 物资详情抽屉 -->
+              <el-table-column type="expand" width="1">
+                <template slot-scope="props">
+                  <el-form
+                    label-position="center"
+                    inline
+                    class="demo-table-expand"
+                  >
+                    <div v-if="false">{{ props }}</div>
+                    <div>
+                      <el-table :data="tableData" border>
+                        <el-table-column
+                          v-for="(item, i) in tableHead"
+                          :key="i"
+                          :prop="item.prop"
+                          :label="item.label"
+                          :width="item.width"
+                        ></el-table-column>
+                      </el-table>
+                    </div>
+                  </el-form>
+                </template>
+              </el-table-column>
             </dilTable>
           </el-tab-pane>
         </el-tabs>
@@ -159,20 +193,20 @@ export default {
       inputText: "",
       first: {
         // first请求数据的地址
-        requestUrl:"",
+        requestUrl: ""
       },
       second: {
         // second请求数据的地址
         requestUrl: "",
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       third: {
         // second请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
       fourth: {
-        requestUrl: "",
+        requestUrl: ""
       },
       activeName: "second",
       //记录旧的row对象(未下发)
@@ -186,77 +220,69 @@ export default {
       oldRow2: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
       oldRowCount2: 1,
-       oldRow3: "",
+      oldRow3: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
       oldRowCount3: 1,
       tableHead: [
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
-          prop:"loadName",
-          label:"装货点",
-          width:150
+          prop: "loadName",
+          label: "装货点",
+          width: 150
         },
         {
-          prop:"unloadName",
-          label:"卸货点",
-          width:150
+          prop: "unloadName",
+          label: "卸货点",
+          width: 150
         },
         {
-          prop:"loadSequence",
-          label:"装卸货次序",
-          width:150
+          prop: "loadSequence",
+          label: "装卸货次序",
+          width: 150
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialCount",
           label: "物资数量",
-          width: 150,
-        },
+          width: 150
+        }
       ],
       tableData: [],
-      addPlanCount:0,
-      timer:""
+      addPlanCount: 0,
+      timer: ""
     };
   },
-  created(){
-      
-      this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0",
-      this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1",
-      this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4"  
+  created() {
+    (this.second.requestUrl =
+      "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0"),
+      (this.third.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1"),
+      (this.fourth.requestUrl =
+        "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4");
   },
-  mounted(){
-    this.getAddPlan()
-    this.start()
+  mounted() {
+    this.getAddPlan();
+    this.start();
   },
-  beforeDestroy(){
-    this.timer
+  beforeDestroy() {
+    this.timer;
   },
   methods: {
-    getAddPlan(){
-        this.axios.post("/api/v1/uc/getPlanCount").then((res) =>{
-          this.addPlanCount = res.data
-        })
+    getAddPlan() {
+      this.axios.post("/api/v1/uc/getPlanCount").then(res => {
+        this.addPlanCount = res.data;
+      });
     },
-    start(){
-        this.timer = setInterval(this.getAddPlan,60000)
-    },
-    bofang(){
-      let obj = new Object();
-      obj = document.getElementById('audioId');
-      console.log(obj)
-      if(obj.paused){
-        obj.play()
-      }else{
-        obj.paused
-      }
+    start() {
+      this.timer = setInterval(this.getAddPlan, 60000);
     },
     getRequirementMaterial(row) {
       // 记录重复点击次数
@@ -354,22 +380,35 @@ export default {
       this.oldRow3 = row;
       this.getMaterial(row.requirementId);
     },
-    getMaterial(requirementId){
-      console.log(requirementId)
-      this.axios.post("/api/v1/ams/getRequirementMaterial/" + requirementId).then((res) => {
-        this.tableData = res.data.data
-        console.log(res.data.data)
-      })
+    getMaterial(requirementId) {
+      console.log(requirementId);
+      this.axios
+        .post("/api/v1/ams/getRequirementMaterial/" + requirementId)
+        .then(res => {
+          this.tableData = res.data.data;
+          console.log(res.data.data);
+        });
     },
     handleClick(tab, event) {
-      this.getRequestUrl()
-      this.getRequirementMaterial()
+      this.getRequestUrl();
+      this.getRequirementMaterial();
     },
-    getRequestUrl(){
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" + new Date(),
-      this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0" + "&i=" + new Date(),
-      this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" +  "&i=" + new Date(),
-      this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4" +  "&i=" + new Date()
+    getRequestUrl() {
+      (this.first.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" +
+        new Date()),
+        (this.second.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0" +
+          "&i=" +
+          new Date()),
+        (this.third.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" +
+          "&i=" +
+          new Date()),
+        (this.fourth.requestUrl =
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4" +
+          "&i=" +
+          new Date());
     },
     selectionChange(selection) {
       this.second.mapList = selection;
@@ -386,22 +425,22 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/finishTruckPlan/" + scope.row.planId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == "200") {
                 this.$message({
                   type: "success",
-                  message: "已完成该计划!",
+                  message: "已完成该计划!"
                 });
-                this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "操作失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -409,7 +448,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "操作已取消!",
+            message: "操作已取消!"
           });
         });
     },
@@ -418,23 +457,23 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/deleteTruckPlan/" + scope.row.planId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "删除成功!",
+                  message: "删除成功!"
                 });
-                this.getRequestUrl()
-                this.getAddPlan()
+                this.getRequestUrl();
+                this.getAddPlan();
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -442,38 +481,38 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
     },
     Issue() {
-      if(this.second.mapList.length == 0){
-        this.$message.error("选择计划后才能下发")
-        return
+      if (this.second.mapList.length == 0) {
+        this.$message.error("选择计划后才能下发");
+        return;
       }
       console.log(this.second.mapList);
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/downTruckPlan", this.second.mapList)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "下发成功!",
+                  message: "下发成功!"
                 });
-                this.getRequestUrl()
-                this.getAddPlan()
-                this.activeName = 'third'
+                this.getRequestUrl();
+                this.getAddPlan();
+                this.activeName = "third";
               } else {
                 this.$message({
                   message: "下发失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -481,23 +520,23 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">
-.inwardPlan{
+.inwardPlan {
   margin-top: 20px;
   margin-left: 20px;
-  .sache{
+  .sache {
     padding: 1.25rem 0.375rem;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
-  }
+}
 </style>

+ 175 - 146
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -1,5 +1,4 @@
-//新增运输派单
-//新增运输订单
+//新增运输派单 //新增运输订单
 <template>
   <div class="addSaleOrderSend">
     <page-title>新增运输订单派车</page-title>
@@ -12,7 +11,7 @@
     </div>
     <!-- 表单选择车辆-->
     <div class="from">
-        <div class="line">
+      <div class="line">
         <span class="text">线路</span>
         <el-input
           v-model="lineName"
@@ -24,14 +23,14 @@
       <div class="orderType">
         <span class="text">订单类型</span>
         <el-select v-model="orderType" placeholder="请选择">
-        <el-option
-          v-for="item in orderTypeList"
-          :key="item.value"
-          :label="item.label" 
-          :value="item.value"
-        >
-        </el-option>
-      </el-select>
+          <el-option
+            v-for="item in orderTypeList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
       </div>
       <div class="vehicle">
         <span class="text">车辆</span>
@@ -72,8 +71,8 @@
         </el-table-column>
       </el-table>
     </div>
-    <el-drawer 
-      :visible.sync="lineDrawer" 
+    <el-drawer
+      :visible.sync="lineDrawer"
       :with-header="false"
       :destroy-on-close="true"
       direction="rtl"
@@ -114,8 +113,8 @@
       </div>
     </el-drawer>
     <!-- 车辆模态框 -->
-    <el-drawer 
-      :visible.sync="truckDrawer" 
+    <el-drawer
+      :visible.sync="truckDrawer"
       :with-header="false"
       :destroy-on-close="true"
       direction="rtl"
@@ -151,78 +150,91 @@
         <!-- 查询所有的车辆 -->
         <dilTable
           v-bind.sync="truck"
-          :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
           @selection-change="currentRadioChange1"
         ></dilTable>
       </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure" :disabled = "disabled" >确定</el-button>
+      <el-button type="primary" @click="makeSure" :disabled="disabled"
+        >确定</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
 import { getCookie } from "@/utils/util.js";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
-      shiyHeigth:140,
-      isHeigth:true,
-      isKuang:false,
-      planId : null ,
-      disabled:false,
+      shiyHeigth: 140,
+      isHeigth: true,
+      isKuang: false,
+      planId: null,
+      disabled: false,
       //线路名称
-      lineId:null,
-      lineName:null,
-      lineText:null,
-      materialId:null,
-      lineDrawer:false,
+      lineId: null,
+      lineName: null,
+      lineText: null,
+      materialId: null,
+      lineDrawer: false,
       //线路的表格
       line: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       //订单类型
-      orderTypeList:[
+      orderTypeList: [
         {
-          value:10,
-          label:'采购内转(铁专线-新区)'
-        },{
-          value:20,
-          label:'采购内转(铁专线-老区)'
-          }
+          value: 10,
+          label: "采购内转(铁专线-新区)"
+        },
+        {
+          value: 20,
+          label: "采购内转(铁专线-老区)"
+        },
+        {
+          value: 15,
+          label: "采购内转(老区专线-老区)"
+        },
+        {
+          value: 16,
+          label: "一焦化采购内转"
+        }
       ],
-      orderType:null,
+      orderType: null,
       //已经选择车辆物资信息
-      selectionList:[],
+      selectionList: [],
       //销售订单物资信息
       option: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
         // 控制显示当选列
         selectionType: "radio",
-        isPagination: false,
+        isPagination: false
       },
       //是否打开选择车辆的模态框
-      truckDrawer:false,
+      truckDrawer: false,
       //车辆的表格
       truck: {
         requestUrl: "",
-        selectionType: "select",
+        selectionType: "select"
       },
       tableTop: [
         {
           prop: "capacityNumber",
-          label: "车牌号",
+          label: "车牌号"
         }
       ],
-      truckText:null,
+      truckText: null,
       //当前多选选中的车辆
-      selectTruck:[],
+      selectTruck: []
     };
   },
   created() {
@@ -230,138 +242,156 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
-        this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&carrierSsoId=" + getCookie("userId");
-    }else if(getCookie("orgCode") == "biemeierchejian"){
-         this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=929059510763524096"  + "&con="+"铁专线精煤";
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&con=" + "采购内转"
-        this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
-    } 
-    else {
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+      this.option.requestUrl =
+        "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&carrierSsoId=" +
+        getCookie("userId");
+    } else if (getCookie("orgCode") == "biemeierchejian") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=929059510763524096" +
+        "&con=" +
+        "铁专线精煤";
+      this.line.requestUrl =
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" +
+        "&con=" +
+        "采购内转";
+      this.option.requestUrl =
+        "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
+    } else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
-        this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
-    } 
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+      this.option.requestUrl =
+        "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
+    }
   },
   methods: {
     //点击确定按钮的事件
-    makeSure(){
-        console.log(this.planId,this.lineId);
-       console.log(this.selectionList)
-        this.disabled = true
-        if(this.planId == null){
-          this.$message.error("未勾选计划")
-          this.disabled = false
-          return 
-        }else if(this.lineId == null){
-          this.$message.error("未选择路线") 
-          this.disabled = false
-          return
-        }
-        else if(this.selectionList.length == 0){
-          this.$message.error("未选择车辆")
-          this.disabled = false
-          return
-        }
-        this.axios.post('/api/v1/oms/addPurInwardOrder',{
-          materialId:this.materialId,
-          lineId:this.lineId,
-          orderType:this.orderType,
-          orderId:this.orderId,
-          planId:this.planId,
-          mapList:this.selectionList,
-        }).then((res)=>{
-          if(res.data.code == '200'){
-            this.$message.success('派车成功')
-            this.disabled = false
+    makeSure() {
+      this.disabled = true;
+      if (this.planId == null) {
+        this.$message.error("未勾选计划");
+        this.disabled = false;
+        return;
+      } else if (
+        this.lineId == null &&
+        (this.orderType != 15 || this.orderType != 16)
+      ) {
+        this.$message.error("未选择路线");
+        this.disabled = false;
+        return;
+      } else if (this.selectionList.length == 0) {
+        this.$message.error("未选择车辆");
+        this.disabled = false;
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/addPurInwardOrder", {
+          materialId: this.materialId,
+          lineId: this.lineId,
+          orderType: this.orderType,
+          orderId: this.orderId,
+          planId: this.planId,
+          mapList: this.selectionList
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("派车成功");
+            this.disabled = false;
             this.cancel();
           }
-        })
+        });
     },
     //点击取消按钮的事件
-    cancel(){
-      this.$router.push('/purInwardTruckOrder')
+    cancel() {
+      this.$router.push("/purInwardTruckOrder");
     },
     //点击删除按钮删除当前点击的对象
-    deleteRow(index){
-      this.selectionList.splice(index,1)
+    deleteRow(index) {
+      this.selectionList.splice(index, 1);
     },
     //车辆模态框的确定事件
-    AddTruckClick(){
-        if(this.a==2){
-            this.selectTruck.forEach(e => {
-        this.selectionList.push({
-          capacityId:e.capacityId,
-          capacityNumber:e.capacityNumber,
-        })
-      });
-      this.truckDrawer = false;
-        }else{
-            this.lineDrawer = false
-        }
-      
+    AddTruckClick() {
+      if (this.a == 2) {
+        this.selectTruck.forEach(e => {
+          this.selectionList.push({
+            capacityId: e.capacityId,
+            capacityNumber: e.capacityNumber
+          });
+        });
+        this.truckDrawer = false;
+      } else {
+        this.lineDrawer = false;
+      }
     },
     //车辆模态框框计算
-    selectTruckClick(){
+    selectTruckClick() {
       if (getCookie("orgCode") == "chengyunshang") {
         this.truck.requestUrl =
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.truckText;
+          getCookie("userId") +
+          "&index=" +
+          this.truckText;
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          null +
+          "&index=" +
+          this.truckText;
       }
     },
     //车辆表格
-    currentRadioChange1(select){
+    currentRadioChange1(select) {
       this.selectTruck = [];
       this.selectTruck = select;
     },
-    currentRadioChange2(selection){
-        this.lineId = selection.lineId
-        if(selection.lineName == null &&selection.lineDesk == null){
-          this.lineName = ''
-        }else{
-          this.lineName = selection.lineName+'  '+selection.lineDesk 
-          this.lineId = selection.lineId;
-      }  
+    currentRadioChange2(selection) {
+      this.lineId = selection.lineId;
+      if (selection.lineName == null && selection.lineDesk == null) {
+        this.lineName = "";
+      } else {
+        this.lineName = selection.lineName + "  " + selection.lineDesk;
+        this.lineId = selection.lineId;
+      }
     },
     //主界面表格单选
     currentRadioChange(row) {
-      console.log(row)
-      this.planId = row.planId
-      this.materialId = row.materialId
+      console.log(row);
+      this.planId = row.planId;
+      this.materialId = row.materialId;
     },
     onClick(num) {
-      this.a = num
-      if(num == 2){
-      if(getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId");
-    }else if(getCookie("orgCode") == "biemeierchejian"){
-         this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=929059510763524096"  + "&con="+"铁专线精煤"
-    }else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-    } 
-        this.truckDrawer = true
-        }else{
-            this.lineDrawer = true
+      this.a = num;
+      if (num == 2) {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId");
+        } else if (getCookie("orgCode") == "biemeierchejian") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=929059510763524096" +
+            "&con=" +
+            "铁专线精煤";
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null;
         }
+        this.truckDrawer = true;
+      } else {
+        this.lineDrawer = true;
+      }
     },
     //线路表格的框计算
-    selectClick(){
-      this.line.requestUrl = '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con='+this.lineText;
-    },
-  },
+    selectClick() {
+      this.line.requestUrl =
+        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.lineText;
+    }
+  }
 };
 </script>
 
-<style lang='scss'>
+<style lang="scss">
 .addSaleOrderSend {
   .from {
     margin-top: 20px;
@@ -390,7 +420,7 @@ export default {
       }
     }
   }
-  .orderType{
+  .orderType {
     display: flex;
     justify-content: center;
     align-items: center;
@@ -399,19 +429,18 @@ export default {
     .el-select {
       padding-left: 10px;
     }
-    
   }
-  .tablecls{
+  .tablecls {
     margin-top: 20px;
   }
-  .button_box{
+  .button_box {
     display: flex;
     justify-content: center;
     margin: 20px;
-    .el-button{
+    .el-button {
       width: 100px;
       margin-left: 20px;
     }
   }
 }
-</style>
+</style>

+ 123 - 148
src/views/inward/components/truckOrder/dispatchPlan.vue

@@ -8,23 +8,21 @@
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
-     <!-- 车辆信息 -->
+    <!-- 车辆信息 -->
     <el-dialog
-        title="车辆信息"
-        :visible.sync="dialogTableVisible"
-        :before-close="handleClose"
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
     >
       <el-input v-model="truckInput" style="width:250px"></el-input>
       <el-button type="primary" @click="clickTruck">查询</el-button>
-      <dilTable
-        v-bind.sync="truck"
-        @radio-change="currentRadioChange1"
-        >
+      <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
       </dilTable>
       <span slot="footer" class="dialog-footer">
-      <el-button @click="cancelUpdate()">取 消</el-button>
-      <el-button type="primary" @click="updateTruckCapacity()"
-      >确 定</el-button>
+        <el-button @click="cancelUpdate()">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
     <template>
@@ -32,59 +30,40 @@
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="待接收" name="first">
             <dilTable v-bind.sync="first" ref="table">
-              <el-table-column fixed="right" label="操作" width="180">
+              <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="updatePlan(scope)">
+                    修改
+                  </el-button>
                   <el-button
                     type="text"
                     size="mini"
-                    @click="getRequirementMaterial(scope.row)"
+                    @click="deleteClick(scope)"
                   >
-                    物资详情
-                  </el-button>
-                  <el-button type="text" size="mini" @click="updatePlan(scope)">
-                    修改
-                  </el-button>
-                  <el-button type="text" size="mini" @click="deleteClick(scope)">
                     删除
                   </el-button>
                 </template>
               </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form
-                    label-position="center"
-                    inline
-                    class="demo-table-expand"
-                  >
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已接收" name="second">
-            <dilTable v-bind.sync="second"> 
+            <dilTable v-bind.sync="second">
               <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="deleteClick(scope)">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="deleteClick(scope)"
+                  >
                     关闭
                   </el-button>
                 </template>
               </el-table-column>
             </dilTable>
           </el-tab-pane>
+          <el-tab-pane label="已完成" name="third">
+            <dilTable v-bind.sync="third"> </dilTable>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -96,7 +75,7 @@ export default {
   data() {
     return {
       inputText: "",
-      truckInput:null,
+      truckInput: null,
       userCarrierId: "",
       //是否弹出对话框
       dialogTableVisible: false,
@@ -104,58 +83,24 @@ export default {
         //
         requestUrl:
           "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
-          "",
+          ""
       },
       //车辆信息的表格
       truck: {
         requestUrl:
           "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + "",
         // 控制显示当选列
-        selectionType: "radio",
+        selectionType: "radio"
       },
       //选中的运力id
       capacityId: null,
       activeName: "first",
       second: {
-        requestUrl: "",
+        requestUrl: ""
       },
-      tableHead: [
-        {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
-        },
-        {
-          prop: "loadName",
-          label: "装货点",
-          width: 150,
-        },
-        {
-          prop: "unloadName",
-          label: "卸货点",
-          width: 150,
-        },
-        {
-          prop: "loadSequence",
-          label: "装卸货次序",
-          width: 150,
-        },
-        {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 150,
-        },
-        {
-          prop: "materialCount",
-          label: "物资数量",
-          width: 150,
-        },
-      ],
-      tableData: [],
-      //记录旧的row对象(未下发)
-      oldRow: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount: 1,
+      third: {
+        requestUrl: ""
+      }
     };
   },
   created() {
@@ -166,11 +111,16 @@ export default {
       this.second.requestUrl =
         "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" +
         getCookie("userId");
+      this.third.requestUrl =
+        "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=2&carrierId=" +
+        getCookie("userId");
     } else {
       this.first.requestUrl =
         "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4";
       this.second.requestUrl =
         "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5";
+      this.third.requestUrl =
+        "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=2";
     }
   },
   methods: {
@@ -178,73 +128,96 @@ export default {
       if (getCookie("orgCode") == "chengyunshang") {
         this.first.requestUrl =
           "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
-          getCookie("userId") + "&i=" +
+          getCookie("userId") +
+          "&i=" +
           new Date();
         this.second.requestUrl =
           "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" +
-          getCookie("userId") + "&i=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+        this.third.requestUrl =
+          "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=2&carrierId=" +
+          getCookie("userId") +
+          "&i=" +
           new Date();
       } else {
         this.first.requestUrl =
-          "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4" + "&i=" +
+          "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4" +
+          "&i=" +
           new Date();
         this.second.requestUrl =
-          "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5" + "&i=" +
+          "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5" +
+          "&i=" +
+          new Date();
+        this.third.requestUrl =
+          "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=2" +
+          "&i=" +
           new Date();
       }
     },
     handleClick() {
       this.getRequirementMaterial();
-      this.getRequest()
+      this.getRequest();
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    getTruckRequestUrl(){
+    getTruckRequestUrl() {
       if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
     //修改运输订单
-    updatePlan(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updatePlan(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.dialogTableVisible = false
-            this.getRequest()
-            
-          }else{
-            this.$message.error("修改运力失败")
-            this.dialogTableVisible = false
-            this.getRequest()
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.dialogTableVisible = false;
+            this.getRequest();
+          } else {
+            this.$message.error("修改运力失败");
+            this.dialogTableVisible = false;
+            this.getRequest();
+          }
+        });
     },
-    clickTruck(){
-      this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index=" + this.truckInput
+    clickTruck() {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        null +
+        "&index=" +
+        this.truckInput;
     },
     getRequirementMaterial(row) {
       // 记录重复点击次数
@@ -274,42 +247,44 @@ export default {
       console.log(requirementId);
       this.axios
         .post("/api/v1/ams/getRequirementMaterial/" + requirementId)
-        .then((res) => {
+        .then(res => {
           this.tableData = res.data.data;
           console.log(res.data.data);
         });
     },
-      //删除运输订单
-    deleteClick(scope){
-      this.$confirm('是否删除?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then(() => {
-            this.axios
+    //删除运输订单
+    deleteClick(scope) {
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.axios
             .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "删除成功!",
-                });     
-                this.getRequest()
+                  message: "删除成功!"
+                });
+                this.getRequest();
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
-        }).catch(() => {
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
+            type: "info",
+            message: "已取消删除"
+          });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">

+ 122 - 42
src/views/queue/components/qmsEnFacotory/queueFApply.vue

@@ -1,53 +1,133 @@
 // 排队申请
 <template>
-    <div class="sale">
-        <div class="top">
-            <span>车牌号:</span>
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                clearable
-                class="input"
-            >
-            </el-input>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"></dilTable>
-        </div>
+  <div class="sale">
+    <div class="top">
+      <span>车牌号:</span>
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputText"
+        clearable
+        class="input"
+      >
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
+    <div class="tab">
+      <el-table
+        :data="tableData"
+        :span-method="objectSpanMethod"
+        :stripe="true"
+        fit
+        border
+        style="width: 100%; margin-top: 20px"
+        max-height="250px"
+      >
+        <el-table-column
+          type="index"
+          width="50"
+          label="序号"
+          fixed
+        ></el-table-column>
+        <el-table-column prop="orderNumber" label="运输订单号">
+        </el-table-column>
+        <el-table-column prop="capacityNumber" label="车牌号">
+        </el-table-column>
+        <el-table-column prop="resultApplyforTime" label="申请时间">
+        </el-table-column>
+        <el-table-column prop="resultDownTime" label="下发时间">
+        </el-table-column>
+        <el-table-column prop="materialName" label="物资名称">
+        </el-table-column>
+        <el-table-column prop="materialSpecification" label="物资规格">
+        </el-table-column>
+        <el-table-column prop="materialModel" label="物资型号">
+        </el-table-column>
+        <el-table-column prop="orderMaterialNumber" label="物资件数">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
 </template>
 <script>
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "/api/v1/qms/getQueueApply?apiId=125",
-            },
-        }
+  data() {
+    return {
+      inputText: "",
+      tableData: []
+    };
+  },
+  mounted() {
+    this.information();
+  },
+  methods: {
+    information() {
+      this.axios.post("/api/v1/qms/getQueueApply").then(res => {
+        console.log(res);
+        this.tableData = res.data.data;
+        this.getSpanArr(this.tableData);
+      });
+    },
+    onclick() {
+      this.option.requestUrl =
+        "/api/v1/qms/getQueueApply?apiId=125&con=" +
+        this.inputText +
+        "&i=" +
+        new Date();
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/qms/getQueueApply?apiId=125&con="+this.inputText+"&i="+new Date();
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].cxh === data[i - 1].cxh) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+          }
         }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4 ||
+        columnIndex === 5
+      ) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
     }
-}
+  }
+};
 </script>
 <style lang="scss">
-    .sale{
-        .top{
-            width: 100%;height: 80px;
-            display: flex;
-            align-items: center;
-            padding-left: 40px;
-        }
-        .input{
-            width: 250px;
-            margin-right: 20px;
-        }
-    }
-</style>
+.sale {
+  .top {
+    width: 100%;
+    height: 80px;
+    display: flex;
+    align-items: center;
+    padding-left: 40px;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+</style>

+ 93 - 14
src/views/queue/components/qmsEnFacotory/queueFCancel.vue

@@ -3,17 +3,51 @@
   <div class="sale">
     <div class="top">
       <span>车牌号:</span>
-      <el-input placeholder="请输入内容" class="input" v-model="inputText" clearable>
+      <el-input
+        placeholder="请输入内容"
+        class="input"
+        v-model="inputText"
+        clearable
+      >
       </el-input>
       <el-button type="primary" class="btn" @click="onclick(0)">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" class="btn1" @click="onclick(1)">
+      <!-- <el-button type="primary" class="btn1" @click="onclick(1)">
         <i class="el-icon-plus"></i>新增排队取消
-      </el-button>
+      </el-button> -->
     </div>
     <div class="tab">
-      <dilTable v-bind.sync="option"></dilTable>
+      <el-table
+        :data="tableData"
+        :span-method="objectSpanMethod"
+        :stripe="true"
+        fit
+        border
+        style="width: 100%; margin-top: 20px"
+        max-height="250px"
+      >
+        <el-table-column
+          type="index"
+          width="50"
+          label="序号"
+          fixed
+        ></el-table-column>
+        <el-table-column prop="orderNumber" label="运输订单号">
+        </el-table-column>
+        <el-table-column prop="capacityNumber" label="车牌号">
+        </el-table-column>
+        <el-table-column prop="resultCancelTime" label="取消时间">
+        </el-table-column>
+        <el-table-column prop="resultCancelReason" label="取消理由">
+        </el-table-column>
+        <el-table-column prop="materialName" label="物资名称">
+        </el-table-column>
+        <el-table-column prop="materialSpecification" label="物资规格">
+        </el-table-column>
+        <el-table-column prop="materialModel" label="物资型号">
+        </el-table-column>
+      </el-table>
     </div>
   </div>
 </template>
@@ -22,24 +56,69 @@ export default {
   data() {
     return {
       inputText: "",
-      option: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/qms/getQueueCancel?apiId=131",
-      },
+      tableData: []
     };
   },
+  mounted() {
+    this.information();
+  },
   methods: {
+    information() {
+      this.axios.post("/api/v1/qms/getQueueCancel").then(res => {
+        this.tableData = res.data.data;
+        this.getSpanArr(this.tableData);
+      });
+    },
     onclick(num) {
       if (num == 0) {
         this.option.requestUrl =
-          "/api/v1/qms/getQueueCancel?apiId=131&con=" + this.inputText+"&i="+new Date();
+          "/api/v1/qms/getQueueCancel?apiId=131&con=" +
+          this.inputText +
+          "&i=" +
+          new Date();
       } else if (num == 1) {
         this.$router.push({
-          path: "/addqueueFCancel",
+          path: "/addqueueFCancel"
         });
       }
     },
-  },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].cxh === data[i - 1].cxh) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4
+      ) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    }
+  }
 };
 </script>
 <style lang="scss">
@@ -51,12 +130,12 @@ export default {
     align-items: center;
     padding-left: 40px;
   }
-  .input{
+  .input {
     width: 250px;
     margin-right: 20px;
   }
-  .btn1{
+  .btn1 {
     margin-left: 20px;
   }
 }
-</style>
+</style>

+ 115 - 40
src/views/queue/components/qmsEnFacotory/queueFEnd.vue

@@ -1,52 +1,127 @@
 // 排队结束
 <template>
-    <div class="sale">
-        <div class="top">
-            <span>车牌号:</span>
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                class="input"
-                clearable>
-            </el-input>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"></dilTable>
-        </div>
+  <div class="sale">
+    <div class="top">
+      <span>车牌号:</span>
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputText"
+        class="input"
+        clearable
+      >
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
+    <div class="tab">
+      <el-table
+        :data="tableData"
+        :span-method="objectSpanMethod"
+        :stripe="true"
+        fit
+        border
+        style="width: 100%; margin-top: 20px"
+        max-height="250px"
+      >
+        <el-table-column
+          type="index"
+          width="50"
+          label="序号"
+          fixed
+        ></el-table-column>
+        <el-table-column prop="orderNumber" label="运输订单号">
+        </el-table-column>
+        <el-table-column prop="capacityNumber" label="车牌号">
+        </el-table-column>
+        <el-table-column prop="resultApplyforTime" label="排队结束时间">
+        </el-table-column>
+        <el-table-column prop="materialName" label="物资名称">
+        </el-table-column>
+        <el-table-column prop="materialSpecification" label="物资规格">
+        </el-table-column>
+        <el-table-column prop="materialModel" label="物资型号">
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
 </template>
 <script>
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "/api/v1/qms/getQueueEndResult?apiId=133",
-            },
-        }
+  data() {
+    return {
+      inputText: "",
+      tableData: []
+    };
+  },
+  mounted() {
+    this.information();
+  },
+  methods: {
+    information() {
+      this.axios.post("/api/v1/qms/getQueueEndResult").then(res => {
+        this.tableData = res.data.data;
+        this.getSpanArr(this.tableData);
+      });
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/qms/getQueueEndResult?apiId=133&con="+this.inputText+"&i="+new Date();
+    onclick() {
+      this.option.requestUrl =
+        "/api/v1/qms/getQueueEndResult?apiId=133&con=" +
+        this.inputText +
+        "&i=" +
+        new Date();
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].cxh === data[i - 1].cxh) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+          }
         }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4
+      ) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
     }
-}
+  }
+};
 </script>
 <style lang="scss" scoped>
-    .sale{
-        .top{
-            width: 100%;height: 80px;
-            display: flex;
-            align-items: center;
-            padding-left: 40px;
-            .input{
-                width: 250px;
-                margin-right: 20px;
-            }
-        }
+.sale {
+  .top {
+    width: 100%;
+    height: 80px;
+    display: flex;
+    align-items: center;
+    padding-left: 40px;
+    .input {
+      width: 250px;
+      margin-right: 20px;
     }
-</style>
+  }
+}
+</style>

+ 214 - 41
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -7,12 +7,44 @@
           <label class="el-form-item__label" style="width: auto;">车牌号</label>
         </el-form-item>
         <el-form-item>
-          <el-input
-            placeholder="请输入内容"
-            v-model="materialNameText"
+          <el-input v-model="capacityNo"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclick"
+            style="margin-left: 4px;"
             clearable
-          ></el-input>
+            ><i class="el-icon-search"></i>查询</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclickMaterial"
+            style="margin-left: 4px;"
+            clearable
+            ><i class="el-icon-search"></i>查询物资</el-button
+          >
         </el-form-item>
+        <el-form-item
+          ><el-button type="primary" class="btn" @click="allow">
+            <i class="el-icon-d-arrow-right"></i>放行
+          </el-button></el-form-item
+        >
+      </el-form>
+    </div>
+    <!-- 物资选择模态框 -->
+    <el-drawer
+      title="选择物资信息"
+      :visible.sync="table1"
+      direction="rtl"
+      size="90%"
+      :show-close="true"
+    >
+      <el-form :inline="true" style="margin-top: 0.5rem;">
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;"
             >物资名称</label
@@ -46,28 +78,38 @@
             clearable
           ></el-input>
         </el-form-item>
-        <el-form-item>
-          <el-button
-            type="primary"
-            class="btn"
-            @click="onclick"
-            style="margin-left: 4px;"
-            ><i class="el-icon-search"></i>查询</el-button
-          >
-        </el-form-item>
-        <el-form-item
-          ><el-button type="primary" class="btn" @click="allow">
-            <i class="el-icon-d-arrow-right"></i>放行
-          </el-button></el-form-item
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclickMaterial1"
+          style="margin-left: 4px;"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <el-button type="primary" @click="makeSureMaterial"
+          ><i class="el-icon-check"></i>确定</el-button
         >
       </el-form>
-    </div>
+      <div class="tablecls">
+        <!-- 查询所有的物资 -->
+        <dilTable v-bind.sync="optionMa" @selection-change="selectionChange2">
+        </dilTable>
+      </div>
+    </el-drawer>
     <div class="tabs">
       <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
         <el-tab-pane label="单拼车辆排队链表" name="first">
           <dilTable v-bind.sync="option1" @selection-change="selectionChange">
-            <el-table-column fixed="right" label="操作" width="180">
+            <el-table-column fixed="right" label="操作" width="280">
               <template slot-scope="scope">
+                <el-select size="mini" fixed="right" v-model="scope.row.id">
+                  <el-option
+                    v-for="item in option"
+                    :key="item.id"
+                    :label="item.value"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
                 </el-button>
@@ -79,15 +121,15 @@
           <el-table
             :data="tableData"
             :span-method="objectSpanMethod"
-            :stripe="true"
-            fit
             border
             style="width: 100%; margin-top: 20px"
             @selection-change="handleSelectionChange"
+            max-height="500px"
           >
-            <el-table-column type="selection" width="55"> </el-table-column>
-            <el-table-column prop="capacityNumber" label="车牌号">
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column prop="capacityNumber" label="车牌号" fit>
             </el-table-column>
+            <el-table-column prop="grid" label="拼数" fit> </el-table-column>
             <el-table-column prop="resultStartTime" label="排队开始时间">
             </el-table-column>
             <el-table-column
@@ -102,9 +144,24 @@
             </el-table-column>
             <el-table-column prop="materialNumber" label="物资件数">
             </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码">
+            </el-table-column>
             <el-table-column prop="sureTime" label="可进厂确认时间">
             </el-table-column>
-            <el-table-column fixed="right" label="操作" width="180">
+            <el-table-column label="装货点" width="100">
+              <template slot-scope="scope">
+                <el-select size="mini" v-model="scope.row.id">
+                  <el-option
+                    v-for="item in option"
+                    :key="item.id"
+                    :label="item.value"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
@@ -122,17 +179,36 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      capacityNo: "",
       inputText: "",
       option1: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0",
         selectionType: "select"
       },
+      optionMa: {
+        // 表格请求数据的地址
+        requestUrl: "",
+        // 控制显示多选列
+        selectionType: "select"
+      },
       activeName: "first",
       tableData: [],
       //存放每一行记录的合并数
       spanArr: [],
-      maplist: []
+      maplist: [],
+      id: null,
+      option: [],
+      filterArr1: [],
+      table1: false,
+      //物资选中表格
+      materialList: [],
+      //物资选中暂存
+      materialList1: [],
+      //物资信息查询内容
+      materialNameText: null,
+      materialSpecificationText: null,
+      materialModelText: null
     };
   },
   watch: {
@@ -140,7 +216,65 @@ export default {
       console.log(this.activeName);
     }
   },
+  mounted() {
+    this.infomation();
+  },
   methods: {
+    //物资模态框查询
+    onclickMaterial1() {
+      this.optionMa.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
+        this.materialNameText +
+        "&materialSpecificationText=" +
+        this.materialSpecificationText +
+        "&materialModelText=" +
+        this.materialModelText;
+    },
+    onclickMaterial() {
+      this.table1 = true;
+      this.optionMa.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
+      console.log("dasd");
+    },
+    //返回选中的物资信息
+    selectionChange2(selection) {
+      this.materialList1 = [];
+      this.materialList1 = selection;
+      this.materialList = this.materialList.concat(this.materialList1);
+    },
+    makeSureMaterial() {
+      console.log(this.materialList);
+      var materialIdList = [];
+      this.materialList.forEach(e => {
+        if (materialIdList.indexOf(e.materialId) == -1) {
+          materialIdList.push(e.materialId);
+        }
+      });
+      let map = {
+        materialList: materialIdList
+      };
+      this.materialList = [];
+      this.materialList1 = [];
+      if (this.activeName == "first") {
+        (this.option1.requestUrl =
+          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0"),
+          map;
+      } else {
+        this.axios
+          .post("/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1", map)
+          .then(res => {
+            this.tableData = res.data.data;
+            this.getSpanArr(this.tableData);
+          });
+      }
+      this.table1 = false;
+    },
+    infomation() {
+      this.axios.get("/api/v1/uc/getSteelWarehouse").then(res => {
+        console.log(res.data);
+        this.option = res.data;
+      });
+    },
     //记录每一行的合并数
     getSpanArr(data) {
       //每次调用方法初始化
@@ -151,7 +285,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].cxh === data[i - 1].cxh) {
+          if (data[i].capacityNumber === data[i - 1].capacityNumber) {
             this.spanArr[this.pos] += 1;
             this.spanArr.push(0);
           } else {
@@ -167,8 +301,10 @@ export default {
         columnIndex === 1 ||
         columnIndex === 2 ||
         columnIndex === 3 ||
-        columnIndex === 8 ||
-        columnIndex === 9
+        columnIndex === 4 ||
+        columnIndex === 9 ||
+        columnIndex === 10 ||
+        columnIndex === 12
       ) {
         const _row = this.spanArr[rowIndex];
         const _col = _row > 0 ? 1 : 0;
@@ -195,6 +331,7 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data;
+          console.log(this.tableData);
           this.getSpanArr(this.tableData);
         });
     },
@@ -202,37 +339,73 @@ export default {
       console.log(scope);
     },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/qms/getQueueListByQueueUp?apiId=128&con=" +
-        this.inputText +
-        "&i=" +
-        new Date();
+      if (this.activeName == "first") {
+        this.option1.requestUrl =
+          "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0?capacityNumber=" +
+          this.capacityNo +
+          "&i=" +
+          new Date();
+      } else {
+        this.axios
+          .post(
+            "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=" +
+              new Date() +
+              "&capacityNumber=" +
+              this.capacityNo
+          )
+          .then(res => {
+            this.tableData = res.data.data;
+            this.getSpanArr(this.tableData);
+          });
+      }
     },
     handleSelectionChange(selection) {
       this.maplist = [];
-      console.log(selection);
       this.maplist = selection;
-      console.log("我被多选了");
     },
     selectionChange(selection) {
       this.maplist = [];
       console.log(selection);
-      console.log("我被单选了");
       this.maplist = selection;
     },
     updateBill(scope) {
       console.log(scope.row.capacityId);
-      this.$router.push("/editBill/" + scope.row.capacityId);
+      this.$router.push(
+        `/editBill/${scope.row.capacityId}/${scope.row.capacityNumber}`
+      );
+    },
+    filterArr(resultId) {
+      console.log("fdhjsaj");
+      this.filterArr1 = this.filterArr1.concat(
+        this.tableData.filter(ele => ele.resultId == resultId)
+      );
     },
     allow() {
-      let map = {
-        ssoId: getCookie("userId"),
-        mapList: this.maplist
-      };
       if (this.maplist.length == 0) {
         this.$message.error("请选择需要放行的车辆");
         return;
       }
+      for (let i = 0; i < this.maplist.length; i++) {
+        if (typeof this.maplist[i].id == "undefined") {
+          this.$message.error("请选择装货点");
+          return;
+        }
+        this.filterArr(this.maplist[i].resultId);
+      }
+      debugger;
+      var filterArr2 = [];
+      this.filterArr1.forEach(e => {
+        if (filterArr2.indexOf(e) === -1) {
+          filterArr2.push(e);
+        }
+      });
+      let map = {
+        ssoId: getCookie("userId"),
+        mapList: filterArr2
+      };
+      if (this.activeName == "first") {
+        map.mapList = this.maplist;
+      }
       this.axios.post("/api/v1/qms/allowEnFactory", map).then(res => {
         if (res.data.code == "200") {
           this.$message.success("放行成功,等待进厂");

+ 13 - 3
src/views/queue/components/qmsEnFacotory/updateBill.vue

@@ -20,6 +20,7 @@
                       placeholder="车牌号"
                       :trigger-on-focus="false"
                       @select="handleSelectCapacity"
+                      disabled
                     >
                       <template slot-scope="{ item }">
                         <div class="name">{{ item.capacityNumber }}</div>
@@ -77,7 +78,10 @@
                 type="primary"
                 @click="onClickConfirm"
                 :disabled="disabled"
-                >确认</el-button
+                >修改并放行</el-button
+              >
+              <el-button type="primary" @click="cancel" :disabled="disabled"
+                >返回</el-button
               >
             </div>
           </el-tab-pane>
@@ -111,7 +115,7 @@ export default {
     };
   },
   created() {
-    console.log(this.$route.params.capacityId);
+    this.capacityName = this.$route.params.capacityNumber;
     this.handleSelectCapacity();
   },
   methods: {
@@ -139,6 +143,7 @@ export default {
           this.materialList = res.data.data.materialMes;
           this.materialList1 = res.data.data.materialMes;
           console.log(this.materialList);
+          console.log(this.materialList1);
           this.saleDateOfReceipt = res.data.data.saleDateOfReceipt;
           this.consigneeCompanyName = res.data.data.consigneeCompanyName;
           this.receiveAddressName = res.data.data.receiveAddressName;
@@ -154,6 +159,9 @@ export default {
         }
       });
     },
+    cancel() {
+      this.$router.push("/queueFStart");
+    },
     onblur(item) {
       if (!isNumber(item.materialNum)) {
         this.$message.error("请输入数字!");
@@ -226,8 +234,9 @@ export default {
         for (let j = 0; j < this.materialList1.length; j++) {
           if (
             this.materialList1[j].materialId == e.materialId &&
-            this.materialList1[j].materialNum == e.materialNum
+            this.materialList1[j].materialNum < e.materialNum
           ) {
+            console.log("我居然就来了");
             this.$message.error("修改数量不得大于计划数量");
             i++;
           }
@@ -247,6 +256,7 @@ export default {
           console.log(res);
           if (res.data.code == "200") {
             this.$message.success("修改物资数量成功");
+            this.$router.push("/queueFStart");
           } else {
             this.$message.error("新增失败请联系管理员");
           }

+ 1 - 1
src/views/queue/router/index.js

@@ -63,7 +63,7 @@ const constantRouterMap = [
 		{path: 'queueWStart', name: 'queueWStart', meta: {code: 'xtpzgl-yhgl'}, component: queueWStart},
 		{path: 'queueWTransfer', name: 'queueWTransfer', meta: {code: 'xtpzgl-yhgl'}, component: queueWTransfer},
 		{path: 'queueWTruckMonitor', name: 'queueWTruckMonitor', meta: {code: 'xtpzgl-yhgl'}, component: queueWTruckMonitor},
-		{path:'editBill/:capacityId',name:'editBill', meta: {code: 'xtpzgl-yhgl'}, component: editBill}
+		{path:'editBill/:capacityId/:capacityNumber',name:'editBill', meta: {code: 'xtpzgl-yhgl'}, component: editBill}
 	]
 	}
   ];

+ 8 - 4
src/views/sale/components/saleSelfMachine/printLading.vue

@@ -35,9 +35,10 @@
           <tr>
             <th style="width :8%">序号</th>
             <th style="width :23%">物资名称</th>
-            <th style="width :23%">规格型号</th>
-            <th style="width :23%">物资件数</th>
-            <th style="width :23%">物资理重</th>
+            <th style="width :18%">规格型号</th>
+            <th style="width :18%">件数</th>
+            <th style="width :18%">理重</th>
+            <th style="width :15%">装货点</th>
           </tr>
 
           <tr v-for="(item, index) in materialList" :key="index">
@@ -46,6 +47,7 @@
             <td>{{ item.materialSpe }}{{ item.materialModel }}</td>
             <td>{{ item.materialNumber }}</td>
             <td>{{ item.materialWeight }}</td>
+            <td>{{ item.wareHouseName }}</td>
           </tr>
         </table>
 
@@ -135,7 +137,8 @@ export default {
           materialModel: "",
           materialWeight: 0,
           materialNumber: 0,
-          materialSpe: ""
+          materialSpe: "",
+          wareHouseName: ""
         }
       ],
       capacityNumber: "",
@@ -165,6 +168,7 @@ export default {
       this.axios
         .post("/api/v1/tms/getBillOrder?orderNumber=" + orderNumber)
         .then(res => {
+          console.log(res);
           this.orderNumber = res.data.orderNumber;
           this.carrierName = res.data.carrierName;
           this.capacityNumber = res.data.capacityNumber;

+ 281 - 233
src/views/sale/components/transport_order/receiveOrder.vue

@@ -14,143 +14,170 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
-    <el-input placeholder="请输入内容" v-model="inputTruck" clearable style="width:200px">
+    <el-dialog
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputTruck"
+        clearable
+        style="width:200px"
+      >
       </el-input>
       <el-button type="primary" class="btn" @click="onClickTruck">
         <i class="el-icon-search"></i>查询
       </el-button>
-    <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange1"
+      <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
+      </dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
         >
-    </dilTable>
-    <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogTableVisible = false">取 消</el-button>
-    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
-    </span>
+      </span>
     </el-dialog>
-        <el-tabs v-model="activeName">
-          <!-- 未接收 -->
-          <el-tab-pane label="未接收" name="third">
-            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="180">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="updateCapacity(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    修改运力
-                  </el-button>
-                  <el-button
-                    @click="detailclick2(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                  <el-button
-                    @click="closeOrder(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    关闭订单
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData2" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已接收 -->
-          <el-tab-pane label="已接收" name="first">
-            <dilTable v-bind.sync="option1" ref="table" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData" border >
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已拒绝 -->
-          <el-tab-pane label="已拒绝" name="second">
-            <dilTable v-bind.sync="option2" ref="table1" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick1(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData1" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-        </el-tabs>
+    <el-tabs v-model="activeName">
+      <!-- 未接收 -->
+      <el-tab-pane label="未接收" name="third">
+        <dilTable
+          v-bind.sync="option3"
+          @selection-change="selectionChange"
+          ref="table2"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="180">
+            <template slot-scope="scope">
+              <el-button
+                @click="updateCapacity(scope.row)"
+                type="text"
+                size="small"
+              >
+                修改运力
+              </el-button>
+              <el-button
+                @click="detailclick2(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+              <el-button
+                @click="closeOrder(scope.row)"
+                type="text"
+                size="small"
+              >
+                关闭订单
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData2" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已接收 -->
+      <el-tab-pane label="已接收" name="first">
+        <dilTable
+          v-bind.sync="option1"
+          ref="table"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="50">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已拒绝 -->
+      <el-tab-pane label="已拒绝" name="second">
+        <dilTable
+          v-bind.sync="option2"
+          ref="table1"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="50">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick1(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData1" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 <script>
@@ -158,23 +185,23 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      shiyHeigth:140,
-      isHeigth:true,
-      pageSize:100,
-      isKuang:false,
-      inputTruck:null,
+      shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 100,
+      isKuang: false,
+      inputTruck: null,
       inputText: "",
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option3: {
         // option3请求数据的地址
@@ -182,12 +209,11 @@ export default {
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
           getCookie("userId"),
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       truck: {
-        requestUrl:
-          "",
-        selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       },
       activeName: "third",
       //记录旧的row对象(已接收)
@@ -206,148 +232,171 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       tableData: [],
       tableData1: [],
       tableData2: [],
-      capacityId:null,
-      dialogTableVisible:false,
-      orderId:null
+      capacityId: null,
+      dialogTableVisible: false,
+      orderId: null
     };
   },
   methods: {
-    onClickTruck(){
-        if (getCookie("orgCode") == "chengyunshang") {
+    onClickTruck() {
+      if (getCookie("orgCode") == "chengyunshang") {
         this.truck.requestUrl =
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.inputTruck;
+          getCookie("userId") +
+          "&index=" +
+          this.inputTruck;
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.inputTruck;
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          null +
+          "&index=" +
+          this.inputTruck;
       }
     },
-    getRequestUrl(){
-        this.option1.requestUrl = "/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(),
-        this.option3.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
-          getCookie("userId") + "&t=" + new Date()
+    getRequestUrl() {
+      this.option1.requestUrl =
+        "/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();
+      this.option3.requestUrl =
+        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
+        getCookie("userId") +
+        "&t=" +
+        new Date();
     },
     selectionChange(selection) {
       this.option3.mapList = selection;
     },
-    batchCloseOrder(){
+    batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
           type: "warning",
-          message: "请先选择要关闭的订单!",
+          message: "请先选择要关闭的订单!"
         });
       } else {
         this.$confirm("是否关闭这些订单", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning",
-          center: true,
+          center: true
         })
           .then(() => {
             //初始化maplist
             var mapList = [];
-            this.option3.mapList.forEach((item) => {
+            this.option3.mapList.forEach(item => {
               //初始化mapItem
               var mapItem = {
                 //销售订单物资中间表id
-                orderId: 0,
+                orderId: 0
               };
               mapItem.orderId = item.orderId;
               mapList.push(mapItem);
             });
             this.$message({
               type: "success",
-              message: "关闭成功!",
-            });
-            this.axios.post("/api/v1/oms/batchCloseOrder", mapList).then((res) => {
-              if (res.data.code == "200") {
-                this.$router.go(0);
-              }
+              message: "关闭成功!"
             });
+            this.axios
+              .post("/api/v1/oms/batchCloseOrder", mapList)
+              .then(res => {
+                if (res.data.code == "200") {
+                  this.getRequestUrl();
+                }
+              });
           })
           .catch(() => {
             this.$message({
               type: "info",
-              message: "取消关闭!",
+              message: "取消关闭!"
             });
           });
       }
     },
-    refresh(){
-      this.$router.go(0);
+    refresh() {
+      this.getRequestUrl();
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    updateCapacity(row){
-      console.log("更新车牌号")
-      this.getTruckRequestUrl()
-      this.orderId = row.orderId
-      this.dialogTableVisible = true
-      console.log(row.orderId)
+    updateCapacity(row) {
+      console.log("更新车牌号");
+      this.getTruckRequestUrl();
+      this.orderId = row.orderId;
+      this.dialogTableVisible = true;
+      console.log(row.orderId);
     },
-    getTruckRequestUrl(){
-        if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+    getTruckRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
-    updateClick(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.getRequestUrl()
-            this.dialogTableVisible = false
-          }else{
-            this.$message.error("修改运力失败")
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
     },
     onClick() {
       if (this.activeName == "first") {
@@ -393,11 +442,11 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-// 根据销售订单id查询物资信息
+      // 根据销售订单id查询物资信息
       this.axios
-      .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",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;
         });
     },
@@ -428,8 +477,8 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",res.data.data)
+        .then(res => {
+          console.log("res.data.data", res.data.data);
           this.tableData1 = res.data.data;
         });
     },
@@ -460,40 +509,39 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
     //关闭选中行的订单
-    closeOrder(row){
+    closeOrder(row) {
       this.$confirm("是否关闭", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "关闭成功!",
+            message: "关闭成功!"
           });
           this.axios
             .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-            .then((res) => {
-              if(res.data.code == '200'){
-                this.$router.go(0);
+            .then(res => {
+              if (res.data.code == "200") {
+                this.getRequestUrl();
               }
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消关闭!",
+            message: "取消关闭!"
           });
-        }) 
-        
-    },
-  },
+        });
+    }
+  }
 };
 </script>
 <style lang="scss" scode>

+ 280 - 233
src/views/sale/components/transport_order/saleChemicalCokeOrder.vue

@@ -14,143 +14,170 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
-    <el-input placeholder="请输入内容" v-model="inputTruck" clearable style="width:200px">
+    <el-dialog
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputTruck"
+        clearable
+        style="width:200px"
+      >
       </el-input>
       <el-button type="primary" class="btn" @click="onClickTruck">
         <i class="el-icon-search"></i>查询
       </el-button>
-    <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange1"
+      <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
+      </dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
         >
-    </dilTable>
-    <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogTableVisible = false">取 消</el-button>
-    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
-    </span>
+      </span>
     </el-dialog>
-        <el-tabs v-model="activeName">
-          <!-- 未接收 -->
-          <el-tab-pane label="未接收" name="third">
-            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="180">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="updateCapacity(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    修改运力
-                  </el-button>
-                  <el-button
-                    @click="detailclick2(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                  <el-button
-                    @click="closeOrder(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    关闭订单
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData2" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已接收 -->
-          <el-tab-pane label="已接收" name="first">
-            <dilTable v-bind.sync="option1" ref="table" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData" border >
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已拒绝 -->
-          <el-tab-pane label="已拒绝" name="second">
-            <dilTable v-bind.sync="option2" ref="table1" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick1(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData1" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-        </el-tabs>
+    <el-tabs v-model="activeName">
+      <!-- 未接收 -->
+      <el-tab-pane label="未接收" name="third">
+        <dilTable
+          v-bind.sync="option3"
+          @selection-change="selectionChange"
+          ref="table2"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="180">
+            <template slot-scope="scope">
+              <el-button
+                @click="updateCapacity(scope.row)"
+                type="text"
+                size="small"
+              >
+                修改运力
+              </el-button>
+              <el-button
+                @click="detailclick2(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+              <el-button
+                @click="closeOrder(scope.row)"
+                type="text"
+                size="small"
+              >
+                关闭订单
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData2" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已接收 -->
+      <el-tab-pane label="已接收" name="first">
+        <dilTable
+          v-bind.sync="option1"
+          ref="table"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="50">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已拒绝 -->
+      <el-tab-pane label="已拒绝" name="second">
+        <dilTable
+          v-bind.sync="option2"
+          ref="table1"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="50">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick1(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData1" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 <script>
@@ -158,23 +185,23 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      shiyHeigth:140,
-      isHeigth:true,
-      pageSize:100,
-      isKuang:false,
-      inputTruck:null,
+      shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 100,
+      isKuang: false,
+      inputTruck: null,
       inputText: "",
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=2&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=2&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option3: {
         // option3请求数据的地址
@@ -182,12 +209,11 @@ export default {
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=2&carrierSsoId=" +
           getCookie("userId"),
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       truck: {
-        requestUrl:
-          "",
-        selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       },
       activeName: "third",
       //记录旧的row对象(已接收)
@@ -206,148 +232,170 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       tableData: [],
       tableData1: [],
       tableData2: [],
-      capacityId:null,
-      dialogTableVisible:false,
-      orderId:null
+      capacityId: null,
+      dialogTableVisible: false,
+      orderId: null
     };
   },
   methods: {
-    onClickTruck(){
-        if (getCookie("orgCode") == "chengyunshang") {
+    onClickTruck() {
+      if (getCookie("orgCode") == "chengyunshang") {
         this.truck.requestUrl =
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.inputTruck;
+          getCookie("userId") +
+          "&index=" +
+          this.inputTruck;
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.inputTruck;
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          null +
+          "&index=" +
+          this.inputTruck;
       }
     },
-    getRequestUrl(){
-        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()
+    getRequestUrl() {
+      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();
     },
     selectionChange(selection) {
       this.option3.mapList = selection;
     },
-    batchCloseOrder(){
+    batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
           type: "warning",
-          message: "请先选择要关闭的订单!",
+          message: "请先选择要关闭的订单!"
         });
       } else {
         this.$confirm("是否关闭这些订单", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning",
-          center: true,
+          center: true
         })
           .then(() => {
             //初始化maplist
             var mapList = [];
-            this.option3.mapList.forEach((item) => {
+            this.option3.mapList.forEach(item => {
               //初始化mapItem
               var mapItem = {
                 //销售订单物资中间表id
-                orderId: 0,
+                orderId: 0
               };
               mapItem.orderId = item.orderId;
               mapList.push(mapItem);
             });
             this.$message({
               type: "success",
-              message: "关闭成功!",
-            });
-            this.axios.post("/api/v1/oms/batchCloseOrder", mapList).then((res) => {
-              if (res.data.code == "200") {
-                this.$router.go(0);
-              }
+              message: "关闭成功!"
             });
+            this.axios
+              .post("/api/v1/oms/batchCloseOrder", mapList)
+              .then(res => {
+                if (res.data.code == "200") {
+                  this.getRequestUrl();
+                }
+              });
           })
           .catch(() => {
             this.$message({
               type: "info",
-              message: "取消关闭!",
+              message: "取消关闭!"
             });
           });
       }
     },
-    refresh(){
-      this.$router.go(0);
+    refresh() {
+      this.getRequestUrl();
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    updateCapacity(row){
-      console.log("更新车牌号")
-      this.getTruckRequestUrl()
-      this.orderId = row.orderId
-      this.dialogTableVisible = true
-      console.log(row.orderId)
+    updateCapacity(row) {
+      this.getTruckRequestUrl();
+      this.orderId = row.orderId;
+      this.dialogTableVisible = true;
+      console.log(row.orderId);
     },
-    getTruckRequestUrl(){
-        if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+    getTruckRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
-    updateClick(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.getRequestUrl()
-            this.dialogTableVisible = false
-          }else{
-            this.$message.error("修改运力失败")
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
     },
     onClick() {
       if (this.activeName == "first") {
@@ -393,11 +441,11 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-// 根据销售订单id查询物资信息
+      // 根据销售订单id查询物资信息
       this.axios
-      .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",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;
         });
     },
@@ -428,8 +476,8 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",res.data.data)
+        .then(res => {
+          console.log("res.data.data", res.data.data);
           this.tableData1 = res.data.data;
         });
     },
@@ -460,40 +508,39 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
     //关闭选中行的订单
-    closeOrder(row){
+    closeOrder(row) {
       this.$confirm("是否关闭", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "关闭成功!",
+            message: "关闭成功!"
           });
           this.axios
             .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-            .then((res) => {
-              if(res.data.code == '200'){
-                this.$router.go(0);
+            .then(res => {
+              if (res.data.code == "200") {
+                this.getRequestUrl();
               }
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消关闭!",
+            message: "取消关闭!"
           });
-        }) 
-        
-    },
-  },
+        });
+    }
+  }
 };
 </script>
 <style lang="scss" scode>

+ 281 - 233
src/views/sale/components/transport_order/saleCoproductOrder.vue

@@ -14,143 +14,170 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
-    <el-input placeholder="请输入内容" v-model="inputTruck" clearable style="width:200px">
+    <el-dialog
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputTruck"
+        clearable
+        style="width:200px"
+      >
       </el-input>
       <el-button type="primary" class="btn" @click="onClickTruck">
         <i class="el-icon-search"></i>查询
       </el-button>
-    <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange1"
+      <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
+      </dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
         >
-    </dilTable>
-    <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogTableVisible = false">取 消</el-button>
-    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
-    </span>
+      </span>
     </el-dialog>
-        <el-tabs v-model="activeName">
-          <!-- 未接收 -->
-          <el-tab-pane label="未接收" name="third">
-            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="180">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="updateCapacity(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    修改运力
-                  </el-button>
-                  <el-button
-                    @click="detailclick2(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                  <el-button
-                    @click="closeOrder(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    关闭订单
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData2" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已接收 -->
-          <el-tab-pane label="已接收" name="first">
-            <dilTable v-bind.sync="option1" ref="table" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData" border >
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已拒绝 -->
-          <el-tab-pane label="已拒绝" name="second">
-            <dilTable v-bind.sync="option2" ref="table1" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick1(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData1" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-        </el-tabs>
+    <el-tabs v-model="activeName">
+      <!-- 未接收 -->
+      <el-tab-pane label="未接收" name="third">
+        <dilTable
+          v-bind.sync="option3"
+          @selection-change="selectionChange"
+          ref="table2"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="180">
+            <template slot-scope="scope">
+              <el-button
+                @click="updateCapacity(scope.row)"
+                type="text"
+                size="small"
+              >
+                修改运力
+              </el-button>
+              <el-button
+                @click="detailclick2(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+              <el-button
+                @click="closeOrder(scope.row)"
+                type="text"
+                size="small"
+              >
+                关闭订单
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData2" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已接收 -->
+      <el-tab-pane label="已接收" name="first">
+        <dilTable
+          v-bind.sync="option1"
+          ref="table"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="50">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已拒绝 -->
+      <el-tab-pane label="已拒绝" name="second">
+        <dilTable
+          v-bind.sync="option2"
+          ref="table1"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="50">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick1(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData1" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 <script>
@@ -158,23 +185,23 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      shiyHeigth:140,
-      isHeigth:true,
-      pageSize:100,
-      isKuang:false,
-      inputTruck:null,
+      shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 100,
+      isKuang: false,
+      inputTruck: null,
       inputText: "",
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option3: {
         // option3请求数据的地址
@@ -182,12 +209,11 @@ export default {
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
           getCookie("userId"),
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       truck: {
-        requestUrl:
-          "",
-        selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       },
       activeName: "third",
       //记录旧的row对象(已接收)
@@ -206,148 +232,171 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       tableData: [],
       tableData1: [],
       tableData2: [],
-      capacityId:null,
-      dialogTableVisible:false,
-      orderId:null
+      capacityId: null,
+      dialogTableVisible: false,
+      orderId: null
     };
   },
   methods: {
-    onClickTruck(){
-        if (getCookie("orgCode") == "chengyunshang") {
+    onClickTruck() {
+      if (getCookie("orgCode") == "chengyunshang") {
         this.truck.requestUrl =
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.inputTruck;
+          getCookie("userId") +
+          "&index=" +
+          this.inputTruck;
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.inputTruck;
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          null +
+          "&index=" +
+          this.inputTruck;
       }
     },
-    getRequestUrl(){
-        this.option1.requestUrl = "/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(),
-        this.option3.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
-          getCookie("userId") + "&t=" + new Date()
+    getRequestUrl() {
+      this.option1.requestUrl =
+        "/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();
+      this.option3.requestUrl =
+        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
+        getCookie("userId") +
+        "&t=" +
+        new Date();
     },
     selectionChange(selection) {
       this.option3.mapList = selection;
     },
-    batchCloseOrder(){
+    batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
           type: "warning",
-          message: "请先选择要关闭的订单!",
+          message: "请先选择要关闭的订单!"
         });
       } else {
         this.$confirm("是否关闭这些订单", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning",
-          center: true,
+          center: true
         })
           .then(() => {
             //初始化maplist
             var mapList = [];
-            this.option3.mapList.forEach((item) => {
+            this.option3.mapList.forEach(item => {
               //初始化mapItem
               var mapItem = {
                 //销售订单物资中间表id
-                orderId: 0,
+                orderId: 0
               };
               mapItem.orderId = item.orderId;
               mapList.push(mapItem);
             });
             this.$message({
               type: "success",
-              message: "关闭成功!",
-            });
-            this.axios.post("/api/v1/oms/batchCloseOrder", mapList).then((res) => {
-              if (res.data.code == "200") {
-                this.$router.go(0);
-              }
+              message: "关闭成功!"
             });
+            this.axios
+              .post("/api/v1/oms/batchCloseOrder", mapList)
+              .then(res => {
+                if (res.data.code == "200") {
+                  this.getRequestUrl();
+                }
+              });
           })
           .catch(() => {
             this.$message({
               type: "info",
-              message: "取消关闭!",
+              message: "取消关闭!"
             });
           });
       }
     },
-    refresh(){
-      this.$router.go(0);
+    refresh() {
+      this.getRequestUrl();
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    updateCapacity(row){
-      console.log("更新车牌号")
-      this.getTruckRequestUrl()
-      this.orderId = row.orderId
-      this.dialogTableVisible = true
-      console.log(row.orderId)
+    updateCapacity(row) {
+      console.log("更新车牌号");
+      this.getTruckRequestUrl();
+      this.orderId = row.orderId;
+      this.dialogTableVisible = true;
+      console.log(row.orderId);
     },
-    getTruckRequestUrl(){
-        if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+    getTruckRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
-    updateClick(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.getRequestUrl()
-            this.dialogTableVisible = false
-          }else{
-            this.$message.error("修改运力失败")
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
     },
     onClick() {
       if (this.activeName == "first") {
@@ -393,11 +442,11 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-// 根据销售订单id查询物资信息
+      // 根据销售订单id查询物资信息
       this.axios
-      .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",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;
         });
     },
@@ -428,8 +477,8 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",res.data.data)
+        .then(res => {
+          console.log("res.data.data", res.data.data);
           this.tableData1 = res.data.data;
         });
     },
@@ -460,40 +509,39 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
     //关闭选中行的订单
-    closeOrder(row){
+    closeOrder(row) {
       this.$confirm("是否关闭", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "关闭成功!",
+            message: "关闭成功!"
           });
           this.axios
             .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-            .then((res) => {
-              if(res.data.code == '200'){
-                this.$router.go(0);
+            .then(res => {
+              if (res.data.code == "200") {
+                this.getRequestUrl();
               }
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消关闭!",
+            message: "取消关闭!"
           });
-        }) 
-        
-    },
-  },
+        });
+    }
+  }
 };
 </script>
 <style lang="scss" scode>

+ 291 - 236
src/views/sale/components/transport_order/saleSteelOrder.vue

@@ -14,143 +14,177 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
-    <el-input placeholder="请输入内容" v-model="inputTruck" clearable style="width:200px">
+    <el-dialog
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputTruck"
+        clearable
+        style="width:200px"
+      >
       </el-input>
       <el-button type="primary" class="btn" @click="onClickTruck">
         <i class="el-icon-search"></i>查询
       </el-button>
-    <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange1"
+      <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
+      </dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
         >
-    </dilTable>
-    <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogTableVisible = false">取 消</el-button>
-    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
-    </span>
+      </span>
     </el-dialog>
-        <el-tabs v-model="activeName">
-          <!-- 未接收 -->
-          <el-tab-pane label="未接收" name="third">
-            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="180">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="updateCapacity(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    修改运力
-                  </el-button>
-                  <el-button
-                    @click="detailclick2(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                  <el-button
-                    @click="closeOrder(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    关闭订单
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData2" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已接收 -->
-          <el-tab-pane label="已接收" name="first">
-            <dilTable v-bind.sync="option1" ref="table" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData" border >
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <!-- 已拒绝 -->
-          <el-tab-pane label="已拒绝" name="second">
-            <dilTable v-bind.sync="option2" ref="table1" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
-                  <el-button
-                    @click="detailclick1(scope.row)"
-                    type="text"
-                    size="small"
-                  >
-                    物资详情
-                  </el-button>
-                </template>
-              </el-table-column>
-              <!-- 物资详情抽屉 -->
-              <el-table-column type="expand" width="1">
-                <template slot-scope="props">
-                  <el-form label-position="center" inline class="demo-table-expand">
-                    <div v-if="false">{{ props }}</div>
-                    <div>
-                      <el-table :data="tableData1" border>
-                        <el-table-column
-                          v-for="(item, i) in tableHead"
-                          :key="i"
-                          :prop="item.prop"
-                          :label="item.label"
-                          :width="item.width"
-                        ></el-table-column>
-                      </el-table>
-                    </div>
-                  </el-form>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-        </el-tabs>
+    <el-tabs v-model="activeName">
+      <!-- 未接收 -->
+      <el-tab-pane label="未接收" name="third">
+        <dilTable
+          v-bind.sync="option3"
+          @selection-change="selectionChange"
+          ref="table2"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="180">
+            <template slot-scope="scope">
+              <el-button
+                @click="updateCapacity(scope.row)"
+                type="text"
+                size="small"
+              >
+                修改运力
+              </el-button>
+              <el-button
+                @click="detailclick2(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+              <el-button
+                @click="closeOrder(scope.row)"
+                type="text"
+                size="small"
+              >
+                关闭订单
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData2" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已接收 -->
+      <el-tab-pane label="已接收" name="first">
+        <dilTable
+          v-bind.sync="option1"
+          ref="table"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="120">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+              <el-button
+                @click="updateCapacity(scope.row)"
+                type="text"
+                size="small"
+              >
+                修改运力
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已拒绝 -->
+      <el-tab-pane label="已拒绝" name="second">
+        <dilTable
+          v-bind.sync="option2"
+          ref="table1"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :isKuang="isKuang"
+        >
+          <el-table-column fixed="right" label="操作" width="50">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick1(scope.row)"
+                type="text"
+                size="small"
+              >
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+          <el-table-column type="expand" width="1">
+            <template slot-scope="props">
+              <el-form label-position="center" inline class="demo-table-expand">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData1" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 <script>
@@ -158,23 +192,23 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      shiyHeigth:140,
-      isHeigth:true,
-      pageSize:100,
-      isKuang:false,
-      inputTruck:null,
+      shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 100,
+      isKuang: false,
+      inputTruck: null,
       inputText: "",
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&shipperId=1&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
         requestUrl:
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&shipperId=1&carrierSsoId=" +
-          getCookie("userId"),
+          getCookie("userId")
       },
       option3: {
         // option3请求数据的地址
@@ -182,12 +216,11 @@ export default {
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&shipperId=1&carrierSsoId=" +
           getCookie("userId"),
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       truck: {
-        requestUrl:
-          "",
-        selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       },
       activeName: "third",
       //记录旧的row对象(已接收)
@@ -206,148 +239,171 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
       tableData: [],
       tableData1: [],
       tableData2: [],
-      capacityId:null,
-      dialogTableVisible:false,
-      orderId:null
+      capacityId: null,
+      dialogTableVisible: false,
+      orderId: null
     };
   },
   methods: {
-    onClickTruck(){
-        if (getCookie("orgCode") == "chengyunshang") {
+    onClickTruck() {
+      if (getCookie("orgCode") == "chengyunshang") {
         this.truck.requestUrl =
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.inputTruck;
+          getCookie("userId") +
+          "&index=" +
+          this.inputTruck;
       } else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.inputTruck;
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          null +
+          "&index=" +
+          this.inputTruck;
       }
     },
-    getRequestUrl(){
-        this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&shipperId=1&carrierSsoId=" +
-          getCookie("userId") + "&t=" + new Date(),
-        this.option2.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&shipperId=1&carrierSsoId=" +
-          getCookie("userId") + "&t=" + new Date(),
-        this.option3.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&shipperId=1&carrierSsoId=" +
-          getCookie("userId") + "&t=" + new Date()
+    getRequestUrl() {
+      this.option1.requestUrl =
+        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&shipperId=1&carrierSsoId=" +
+        getCookie("userId") +
+        "&t=" +
+        new Date();
+      this.option2.requestUrl =
+        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&shipperId=1&carrierSsoId=" +
+        getCookie("userId") +
+        "&t=" +
+        new Date();
+      this.option3.requestUrl =
+        "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&shipperId=1&carrierSsoId=" +
+        getCookie("userId") +
+        "&t=" +
+        new Date();
     },
     selectionChange(selection) {
       this.option3.mapList = selection;
     },
-    batchCloseOrder(){
+    batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
           type: "warning",
-          message: "请先选择要关闭的订单!",
+          message: "请先选择要关闭的订单!"
         });
       } else {
         this.$confirm("是否关闭这些订单", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning",
-          center: true,
+          center: true
         })
           .then(() => {
             //初始化maplist
             var mapList = [];
-            this.option3.mapList.forEach((item) => {
+            this.option3.mapList.forEach(item => {
               //初始化mapItem
               var mapItem = {
                 //销售订单物资中间表id
-                orderId: 0,
+                orderId: 0
               };
               mapItem.orderId = item.orderId;
               mapList.push(mapItem);
             });
             this.$message({
               type: "success",
-              message: "关闭成功!",
-            });
-            this.axios.post("/api/v1/oms/batchCloseOrder", mapList).then((res) => {
-              if (res.data.code == "200") {
-                this.$router.go(0);
-              }
+              message: "关闭成功!"
             });
+            this.axios
+              .post("/api/v1/oms/batchCloseOrder", mapList)
+              .then(res => {
+                if (res.data.code == "200") {
+                  this.getRequestUrl();
+                }
+              });
           })
           .catch(() => {
             this.$message({
               type: "info",
-              message: "取消关闭!",
+              message: "取消关闭!"
             });
           });
       }
     },
-    refresh(){
-      this.$router.go(0);
+    refresh() {
+      this.getRequestUrl();
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    updateCapacity(row){
-      console.log("更新车牌号")
-      this.getTruckRequestUrl()
-      this.orderId = row.orderId
-      this.dialogTableVisible = true
-      console.log(row.orderId)
+    updateCapacity(row) {
+      console.log("更新车牌号");
+      this.getTruckRequestUrl();
+      this.orderId = row.orderId;
+      this.dialogTableVisible = true;
+      console.log(row.orderId);
     },
-    getTruckRequestUrl(){
-        if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+    getTruckRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
-    updateClick(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.getRequestUrl()
-            this.dialogTableVisible = false
-          }else{
-            this.$message.error("修改运力失败")
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
     },
     onClick() {
       if (this.activeName == "first") {
@@ -393,11 +449,11 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-// 根据销售订单id查询物资信息
+      // 根据销售订单id查询物资信息
       this.axios
-      .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",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;
         });
     },
@@ -428,8 +484,8 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
-          console.log("res.data.data",res.data.data)
+        .then(res => {
+          console.log("res.data.data", res.data.data);
           this.tableData1 = res.data.data;
         });
     },
@@ -460,40 +516,39 @@ export default {
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
-        .then((res) => {
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
     //关闭选中行的订单
-    closeOrder(row){
+    closeOrder(row) {
       this.$confirm("是否关闭", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "关闭成功!",
-          });
           this.axios
             .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-            .then((res) => {
-              if(res.data.code == '200'){
-                this.$router.go(0);
+            .then(res => {
+              if (res.data.code == "200") {
+                this.getRequestUrl();
+                this.$message({
+                  type: "success",
+                  message: "关闭成功!"
+                });
               }
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消关闭!",
+            message: "取消关闭!"
           });
-        }) 
-        
-    },
-  },
+        });
+    }
+  }
 };
 </script>
 <style lang="scss" scode>

+ 13 - 13
src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue

@@ -1,8 +1,9 @@
 <template>
   <!-- 抽查车牌号页面 -->
   <div class="homeworkPath">
-   <div class="top">
-      <el-input placeholder="请输入车牌号" v-model="input" clearable> </el-input>
+    <div class="top">
+      <el-input placeholder="请输入车牌号" v-model="input" clearable>
+      </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -20,27 +21,26 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "api/v1/tms/getCapacityByDefend?apiId=469",
-      },
+        requestUrl: "api/v1/tms/getCapacityByDefend?apiId=469"
+      }
     };
   },
-  created(){
-   
-  },
+  created() {},
   methods: {
     onclick() {
-          this.option.requestUrl="api/v1/tms/getCapacityByDefend?apiId=469&con="+this.input;
-    },
-   }
+      this.option.requestUrl =
+        "api/v1/tms/getCapacityByDefend?apiId=469&con=" + this.input;
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .homeworkPath {
   .top {
     padding: 1.25rem 1.875rem;
-    .el-input{
+    .el-input {
       width: 20%;
     }
   }
 }
-</style>
+</style>

Vissa filer visades inte eftersom för många filer har ändrats