zhouzh il y a 3 ans
Parent
commit
6209871657
100 fichiers modifiés avec 5597 ajouts et 1682 suppressions
  1. 8 2
      build/utils.js
  2. 43 36
      src/components/DilCommonUI/packages/table/src/table.js
  3. 23 4
      src/components/DilCommonUI/packages/table/src/table.vue
  4. 0 5
      src/utils/util.js
  5. 21 2
      src/views/RMS/components/addCapacity.vue
  6. 2 1
      src/views/RMS/components/addCarrier.vue
  7. 4 1
      src/views/RMS/components/addMaterial.vue
  8. 140 56
      src/views/RMS/components/addOilPrice.vue
  9. 53 39
      src/views/RMS/components/addPersonnel.vue
  10. 46 19
      src/views/RMS/components/capacity.vue
  11. 1 2
      src/views/RMS/components/carrier.vue
  12. 1 1
      src/views/RMS/components/editCapacity.vue
  13. 62 46
      src/views/RMS/components/oilPrice.vue
  14. 12 16
      src/views/RMS/components/transitRoute.vue
  15. 191 123
      src/views/RMS/components/transitRouteAdd.vue
  16. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue
  17. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/grossWeight.vue
  18. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/outFactory.vue
  19. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/tareWeight.vue
  20. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/unload.vue
  21. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue
  22. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/grossWeight.vue
  23. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/load.vue
  24. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/outFactory.vue
  25. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/tareWeight.vue
  26. 46 47
      src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue
  27. 141 42
      src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/transportAppoint.vue
  28. 45 15
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue
  29. 151 15
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue
  30. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/enFactory.vue
  31. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/grossWeight.vue
  32. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/outFactory.vue
  33. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/tareWeight.vue
  34. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/unload.vue
  35. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/enFactory.vue
  36. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/grossWeight.vue
  37. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/load.vue
  38. 10 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/outFactory.vue
  39. 9 1
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/tareWeight.vue
  40. 86 65
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue
  41. 145 43
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/transportAppoint.vue
  42. 295 1
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/addTransportOrder.vue
  43. 159 277
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue
  44. 0 0
      src/views/SporadicManage/components/sporadicMaterial/transportPlan/addTransportPlan.vue
  45. 235 0
      src/views/SporadicManage/components/sporadicMaterial/transportPlan/transportPlan.vue
  46. 6 0
      src/views/SporadicManage/router/index.js
  47. 2 2
      src/views/TMS/components/importedFuel/transportReserveRan.vue
  48. 126 46
      src/views/TMS/components/importedFuel/transportReserveRanAdd.vue
  49. 81 28
      src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue
  50. 3 1
      src/views/TMS/components/purchase/addShipPrice.vue
  51. 3 1
      src/views/TMS/components/purchase/addTruckPrice.vue
  52. 130 53
      src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue
  53. 0 1
      src/views/WMS/components/steel/steel_restack.vue
  54. 664 0
      src/views/appoint/components/saleContract/addSaleCokeSend.vue
  55. 237 97
      src/views/appoint/components/saleContract/addSaleOrderArrange.vue
  56. 42 12
      src/views/appoint/components/saleContract/addSaleOrderSend.vue
  57. 146 0
      src/views/appoint/components/saleContract/saleCokeInward.vue
  58. 6 1
      src/views/appoint/components/saleContract/saleOrder.vue
  59. 15 7
      src/views/appoint/components/saleContract/transportPrice.vue
  60. 4 0
      src/views/appoint/router/index.js
  61. 3 1
      src/views/inward/components/inwardImport/daZhou/addTruckLoad.vue
  62. 3 1
      src/views/inward/components/inwardImport/oldAreaRailScale/addTruckLoad.vue
  63. 18 5
      src/views/inward/components/inwardImport/oldAreaRailScale/enFactory.vue
  64. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/grossWeightResult.vue
  65. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/outFactory.vue
  66. 11 3
      src/views/inward/components/inwardImport/oldAreaRailScale/qualityResult.vue
  67. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/tareWeightResult.vue
  68. 14 6
      src/views/inward/components/inwardImport/oldAreaRailScale/truckLoad.vue
  69. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/unload.vue
  70. 3 1
      src/views/inward/components/offsetSteel/truckTrain/addApproveWagonPlease.vue
  71. 2 1
      src/views/inward/components/offsetSteel/truckTrain/addWagonPlease.vue
  72. 379 265
      src/views/inward/components/truckAppoint/addRequirement.vue
  73. 0 3
      src/views/inward/components/truckAppoint/plan.vue
  74. 225 0
      src/views/inward/components/truckAppoint/purInwardRequirement.vue
  75. 1 2
      src/views/inward/components/truckAppoint/requirement.vue
  76. 368 0
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  77. 300 0
      src/views/inward/components/truckOrder/purInwardTruckOrder.vue
  78. 12 1
      src/views/inward/router/index.js
  79. 19 13
      src/views/queue/components/qmsEnFacotory/addqueueFCancel.vue
  80. 15 12
      src/views/queue/components/qmsEnFacotory/addqueueFJumpLine.vue
  81. 36 14
      src/views/queue/components/qmsEnFacotory/addqueueFTransfer.vue
  82. 12 6
      src/views/queue/components/qmsEnFacotory/queueFApply.vue
  83. 15 8
      src/views/queue/components/qmsEnFacotory/queueFCancel.vue
  84. 9 4
      src/views/queue/components/qmsEnFacotory/queueFDetails.vue
  85. 9 4
      src/views/queue/components/qmsEnFacotory/queueFEnd.vue
  86. 9 4
      src/views/queue/components/qmsEnFacotory/queueFInstructionReceive.vue
  87. 9 4
      src/views/queue/components/qmsEnFacotory/queueFIssue.vue
  88. 14 7
      src/views/queue/components/qmsEnFacotory/queueFJumpLine.vue
  89. 16 12
      src/views/queue/components/qmsEnFacotory/queueFListMonitor.vue
  90. 9 4
      src/views/queue/components/qmsEnFacotory/queueFStart.vue
  91. 13 6
      src/views/queue/components/qmsEnFacotory/queueFTransfer.vue
  92. 9 4
      src/views/queue/components/qmsEnFacotory/queueFTruckMonitor.vue
  93. 9 2
      src/views/sale/components/saleSelfMachine/printScan.vue
  94. 92 61
      src/views/sale/components/transport_appointment/openDistribution.vue
  95. 18 11
      src/views/sale/components/transport_appointment/openDistributionSection.vue
  96. 12 8
      src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue
  97. 8 4
      src/views/sale/components/transport_excute/tms-offsite/inTransit.vue
  98. 12 8
      src/views/sale/components/transport_excute/tms-offsite/receiptResult.vue
  99. 13 9
      src/views/sale/components/transport_excute/tms-offsite/transportInfo.vue
  100. 134 12
      src/views/sale/components/transport_order/receiveOrder.vue

+ 8 - 2
build/utils.js

@@ -11,14 +11,14 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 
 // 指定开发模式下需要加载的模块(可以做到只加载当前模块,提高开发效率)
 // index模块(登录)为必须,all 为所有
+
 //   index    销售    采购     规范          质量          生产      车间
 // ['index', 'sales', '  ', 'standard', 'qualityControl', 'produce', 'workshop',
 //    物流         进程     成本   报表          基础配置        系统配置
 //  'logistics', 'process', '   ', 'reportform', 'basicconfig', 'system']
 
 // let devModules = ['index','RMS','systemConfig']
- let devModules = ['index','statisticalReport','sale','SporadicManage','TMS','WMS',];
- //let devModules = ['all'];
+ let devModules = ['TMS','WMS','systemConfig','index'];
 // let devModules = ['index','RMS']
 
 
@@ -27,6 +27,12 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // let devModules = ['index','inward','appoint','sale']
 // let devModules = ['index','SporadicManage','RMS']
 
+//    登录     合同                       首页       内转     排队   资源   销售                       零星物资
+// ['index','appoint','configManager','homepage','inward','queue','RMS','sale','serviceManager','SporadicManage'
+//       统计报表       组织机构/系统管理 采购  仓储
+//  'statisticalReport','systemConfig','TMS','WMS','workFlow']
+// let devModules = ['all'];
+
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 43 - 36
src/components/DilCommonUI/packages/table/src/table.js

@@ -19,7 +19,7 @@ export default {
       // 自己的每页显示条目个数
       dataPageSize: 10,
       // 保存表格所有页面所选中的数据
-      dataSelection: [],
+      dataRadioId: [],
       // 保存表格单选的数据 保存数据的id
       dataRadioId: ""
     };
@@ -27,7 +27,6 @@ export default {
   created() {
     this.dataCurrentPage = this.currentPage;
     this.dataPageSize = this.pageSize;
-    console.log(this)
     this.requestData();
   },
   mounted() {
@@ -45,7 +44,6 @@ export default {
       if (options) {
         pageNum = options.pageNum;
         pageSize = options.pageSize;
-        
       }
       
       if (this.requestUrl) {
@@ -56,33 +54,41 @@ export default {
         } else {
           url = this.requestUrl;
         }
-        // 处理请求地址逻辑
-
-        if (
-          !this.dataTotal ||
-          (this.dataCurrentPage - 1) * this.dataPageSize < this.dataTotal
-        ) {
-          // 判断是否需要在请求体中放入参数
-          if(this.requestQuery){
-            console.log(" 判断是否需要在请求体中放入参数")
-            
-            this.dataRequestQuery=this.requestQuery;
-            console.log(this.dataRequestQuery.resultBreakId)
+        // 判断是否需要在请求体中放入参数
+        if(this.requestQuery){
+          this.dataRequestQuery=this.requestQuery;
+          // console.log(this.dataRequestQuery.resultBreakId)
+        }
+        let data = undefined;
+        for (const key in this.dataRequestQuery) {
+          const val = this.dataRequestQuery[key];
+          console.log(val)
+          if (val||val==0) {
+            if (!data) data = {};
+            data[key] = val;
           }
-
-          let data = undefined;
-          for (const key in this.dataRequestQuery) {
-         
-            const val = this.dataRequestQuery[key];
-            console.log(val)
-            if (val||val==0) {
-             
-              if (!data) data = {};
-            
-              data[key] = val;
+        }
+        //判断是否是带分页查询
+        if(this.isKuang){
+          // 发送请求
+          this.axios
+          .post(url, data, {
+            // 请求地址 中
+            params: {
+              pageNum: 1,
+              pageSize: pageSize || this.dataPageSize
             }
-          }
-        
+          })
+          .then(response => {
+            let d = response.data.data;
+            this.dataTabel = d.list;
+            this.dataTotal = d.total;
+            //执行成功的回调
+            this.$emit('func',response.data.data);
+            this.refreshColumnData(d.columnData);
+            this.isShow = true;
+          });
+        }else{
           // 发送请求
           this.axios
             .post(url, data, {
@@ -99,8 +105,12 @@ export default {
               //执行成功的回调
               this.$emit('func',response.data.data);
               this.refreshColumnData(d.columnData);
-
               this.isShow = true;
+              //若父组件存在要合计的值
+              if(this.$parent.totalNumber>=0){
+                //将筛选的字段传给父组件
+                this.$parent.calculationTotalNumber(this.dataRequestQuery);
+              }
             });
         }
       } else {
@@ -109,12 +119,10 @@ export default {
     },
     // 刷新表头显示数据
     refreshColumnData(columnData) {
-      // 表头只赋值一次
-      if (this.dataColumnData.length > 0) return;
-
+      // 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
+      // if (this.dataColumnData.length > 0) return;
       // 如果前端有写表头,则加在后端表头前面
       const d = this.columnData.concat(columnData);
-
       // 把操作列拼接到最后一列
       this.dataColumnData = d;
       this.dataDropColumn = [].concat(this.dataColumnData);
@@ -186,7 +194,7 @@ export default {
     },
     // 多选的选中行改变回调
     selectionChange(selection) {
-      this.dataSelection = selection;
+      // this.dataSelection = selection;
       // 将多选中的数据抛出
       this.$emit("selection-change", selection);
     },
@@ -233,11 +241,11 @@ export default {
     },
     // current-page 改变时会触发
     currentChange(val, isRequest = true) {
-      this.dataCurrentPage = val;
       if (isRequest) {
         this.requestData({ pageNum: val });
       }
       // 最后通知父节点页面改变
+      this.dataCurrentPage = val;
       this.$emit("update:current-page", val);
     },
     // pageSize 改变时会触发
@@ -298,7 +306,6 @@ export default {
         for (const key in val) {
           q[key] = val[key] ? val[key] : undefined;
         }
-
         this.setDataRequestQuery(q);
       }
     },

+ 23 - 4
src/components/DilCommonUI/packages/table/src/table.vue

@@ -16,6 +16,9 @@
       @selection-change="selectionChange"
       @filter-change="filterChange"
       @row-click="rowClick"
+      v-loading="loading"
+      element-loading-text="玩命加载中"
+      element-loading-spinner="el-icon-loading"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -116,6 +119,13 @@ export default {
   name: "DilTable",
   extends: table,
   props: {
+    drawer:{
+      default:false,
+    },
+    //判断是否带分页查询
+    isKuang:{
+      default:false,
+    },
     // 请求地址
     requestUrl: {
       default: "",
@@ -142,9 +152,9 @@ export default {
     selectionType: {
       default: "",
     },
-    // 是否 在数据翻页后保留之前选中的数据(需指定 row-key)
+    // 是否在数据翻页后保留之前选中的数据(需指定 row-key)
     reserveSelection: {
-      default: true,
+      default: false,
     },
     // 是否为斑马纹 table
     stripe: {
@@ -193,7 +203,9 @@ export default {
         return ({ row, rowIndex }) => "";
       },
     },
-
+    loading:{
+      default:false,
+    },
     // 是否启用分页器
     isPagination: {
       default: true,
@@ -205,7 +217,7 @@ export default {
     // 每页显示个数选择器的选项设置
     pageSizes: {
       default() {
-        return [10, 20, 50, 100, 200];
+        return [10, 20, 50, 100, 200, 1000];
       },
     },
     // 每页显示条目个数,支持 .sync 修饰符
@@ -220,12 +232,19 @@ export default {
   watch:{
     requestUrl(){
       this.refreshData();
+    },
+    drawer(val){
+      if(val){
+        this.dataRadioId = null;
+      }
     }
   },
   methods: {
     // 刷新表格数据
     refreshData() {
       this.requestData();
+      //多选表格,清空用户的选择
+      this.$refs.mainTable.clearSelection();
     },
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);

+ 0 - 5
src/utils/util.js

@@ -148,11 +148,6 @@ export const transDate = (str) => {
  */
 export const setCookie = (name, value, expires, path, domain, secure, domainFlag) => {
   let str = name + '=' + encodeURIComponent(value);
-  // if (expires > 0) {
-  //   let date = new Date();
-  //   date.setTime(date.getTime() + expires * 3600 * 1000);
-  //   str += ';expires=' + date.toGMTString();
-  // }
   if (path) { str += ';path=' + path; }
   if (domain) { str += ';domain=' + domain; }
   if (secure) { str += ';secure=' + secure; }

+ 21 - 2
src/views/RMS/components/addCapacity.vue

@@ -44,7 +44,7 @@ export default {
     return {
       form1: {},
       form1Initialization : {
-        capacityTypeId : '汽车',
+        capacityTypeId : 1,
         capacityNumber : '',
         capacityCorlor : '黄',
         capacityOwneris : '否',
@@ -70,7 +70,7 @@ export default {
   },
   mounted() {
    this.axios.post(
-       "api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+       "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
       )
       .then((res) => {
         if(res.data.code == "200"){
@@ -128,7 +128,25 @@ export default {
           }
         })
     },
+    isVehicleNumber(vehicleNumber) {
+				  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}$/;
+			        result = express.test(vehicleNumber);
+			      }
+			      return result;
+				  
+		},
     makeSure() {
+        if(!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())){
+            this.$message.error("车牌号格式不正确")
+            return
+        }
+        if(this.carrierIds == null){
+            this.$message.error("请选择承运商")
+            return
+        }
         let RmsCapacity = {
         capacityTypeId: this.form1.capacityTypeId,
         capacityNumber: this.form1.capacityNumber.toUpperCase(),
@@ -136,6 +154,7 @@ export default {
         capacityOwneris: this.form1.capacityOwneris,
         capacityVip: this.form1.capacityVip,
         capacityBlacklist: this.form1.capacityBlacklist,
+        remark:this.form1.remark,
         carrierId:this.carrierIds,
         state: this.state
       };

+ 2 - 1
src/views/RMS/components/addCarrier.vue

@@ -293,6 +293,8 @@ export default {
                     };
                     //传给后端的数据
                     let mapValue = {
+                      //承运商账号
+                      carrierSsoCode: this.input,
                       //表单数据
                       from: this.form1,
                       //图片数据
@@ -303,7 +305,6 @@ export default {
                     this.axios
                       .post("/api/v1/rms/insertCarrier", mapValue)
                       .then((res) => {
-                        console.log(2)
                         if (res.data.code == "200") {
                           this.cancel();
                           this.$message.success("添加成功");

+ 4 - 1
src/views/RMS/components/addMaterial.vue

@@ -96,7 +96,10 @@ export default {
             });
             // this.$refs.table.refreshData();
             this.$router.go(-1);
-          } else {
+          }else if(res.data.code == '201'){
+            this.$message.warning("该物资已存在")
+          } 
+          else {
             this.$message.error("新增失败");
           }
           //this.$refs['table'].resetField();

+ 140 - 56
src/views/RMS/components/addOilPrice.vue

@@ -1,95 +1,179 @@
 <template>
   <!-- 添加油价信息 -->
   <div class="addWagonLoad">
-    <PageTitle>返回</PageTitle>
-    <div class="form-box" style="margin-right: 10rem">
-      <dil-form :formId="357" v-model="form1" ref="from1"></dil-form>
+    <page-title>返回</page-title>
+    <div class="form_you">
+      <span class="text">油品名称 </span>
+      <el-select v-model="oilNameId" filterable placeholder="请选择">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+      <el-button type="primary" @click="dialogVisible = true">新增油品名称</el-button>
     </div>
-    <div class="button-box">
+    <div class="form_box" style="margin-right: 10rem">
+      <dil-form :formId="357" v-model="form1" ref="from1" @change="onchang"></dil-form>
+    </div>
+    <div class="button_box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
     </div>
+    <el-dialog
+      title="新增油品名称"
+      :visible.sync="dialogVisible"
+      width="30%"
+    >
+      <span>注:<span style="color:red;">不能输入特殊符号('#')</span></span>
+      <el-input v-model="input" placeholder="请输入内容"></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogMakeSure">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { isNumber,sjTime } from '@/utils/sharedJsFile'
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
-      value: undefined,
+      //下拉框选中的值
+      oilNameId:null,
+      //加载状态
+      loading:false,
+      //油品名称新增的值
+      input:null,
+      //是否显示添加油品名称的窗口
+      dialogVisible:false,
+      //下拉框的数据
+      options:[],
+      //表单的数据
+      form1: {
+        priceValue:'',
+        priceDate:new Date(),
+        priceStatus:false,
+      },
     };
   },
-  mounted() {},
+  created(){
+    this.initialization();
+  },
   methods: {
+    initialization(){
+      this.axios.post('/api/v1/rms/oilNameSelect').then((res)=>{
+        if(res.data.code == "200"){
+          this.options = res.data.data;
+        }
+      })
+    },
+    onchang(val){
+      if(val.priceStatus){
+        this.$message.warning('确认启用后将会停用正在执行的油品价格')
+      }
+    },
+    dialogMakeSure(){
+      this.loading = true;
+      if(this.input){
+        this.axios.post('/api/v1/rms/addOilType?oilTypeName='+this.input).then((res)=>{
+          if(res.data.code == "200"){
+            this.loading = false;
+            this.$message.success('新增成功')
+            this.dialogVisible = false;
+            this.initialization();
+          }
+        })
+      }else{
+        this.$message.warning('请输入油品名称')
+      } 
+    },
     makeSure() {
-      console.log(this.form1);
-      let RmsOilPrice = {
-        priceOilName:this.form1.priceOilName,
-        priceId:this.form1.priceId,
-        priceDate:this.form1.priceDate,
-        priceValue:this.form1.priceValue,
-      };
-      if(
-        RmsOilPrice.priceOilName ==null ||
-        RmsOilPrice.priceDate ==null ||
-         RmsOilPrice.priceValue ==null
-      )this.$message.error("存在空值!");
-      else
-      this.axios
-        .post(
-          "/api/v1/rms/insertOilPrice" , RmsOilPrice
-        )
+      this.loading = true;
+      let state = false;
+      if(!this.oilNameId){
+        this.$message.warning('请填写油品名称')
+      }else if(!this.form1.priceValue){
+        this.$message.warning('请填写油品价格')
+      }else if(!isNumber(this.form1.priceValue)){
+        this.$message.warning('油品价格必修为整数或者小数')
+      }else{
+        state = true;            
+      }
+      if(state){
+        let RmsOilPrice = {
+          oilNameId:this.oilNameId,
+          priceValue:this.form1.priceValue,
+          priceDate:sjTime(this.form1.priceDate),
+          priceStatus:this.form1.priceStatus
+        };
+        console.log(RmsOilPrice);
+        this.axios.post("/api/v1/rms/insertOilPrice" , RmsOilPrice)
         .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败,可能存在重复!");
+          if (res.data.code == "200") {
+            this.loading = true;
+            this.$message.success('新增成功');
+            this.cancel();
           }
-        //  this.$refs['table'].resetField();
         });
+      }else{
+        this.loading = true;
+      }
     },
     // 取消
     cancel() {
-      this.$router.go(-1);
+      this.$router.push("/oilPrice");
     },
   },
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
+<style lang='scss'>
+.addWagonLoad{
+  .form_you{
+    margin-left: 35%;
+    margin-top: 30px;
+    .text{
+      display: inline-block;
+      width: 55px;
+    }
+    .el-select{
+      width: 250px;
+      margin-right: 20px;
     }
   }
-.form-box{
-  display: flex;
-  justify-content: center;
-  .el-form-item{
+  .form_box{
+    margin-left: 35%;
+    padding-top: 10px;
+    width: 470px;
     display: flex;
-    justify-content: center;
-    .el-form-item__label{
-      display: flex;
-      align-items: center;
-    }
-    .el-form-item__content{
-      .el-input{
-        .el-input__inner{
-          width: 250px;
+    .el-form{
+      .el-form-item{
+        display: flex;
+        align-items: center;
+        .el-form-item__content{
+          .el-input{
+            width: 250px;
+          }
+          .el-switch{
+            margin-left: -250px;
+          }
         }
       }
     }
+    .addbtn{
+      margin-left: 30px;
+    }
+  }
+  .button_box{
+    margin-left: 40%;
+    padding-top: 30px;
+    width: 310px;
+    display: flex;
+    justify-content: center;
   }
 }
 </style>

+ 53 - 39
src/views/RMS/components/addPersonnel.vue

@@ -203,49 +203,63 @@ export default {
           ){
               this.$message.error("存在空值!");
       }else{
-
-      //新增用户
-      this.$store.dispatch('system/usersManage/addUser',formData)
+      //判断RMS_PERSONNEL表中是否存在该人员信息,存在提示存在,否则开始赋权新增
+      this.axios.post('/api/v1/rms/isInHere?personnelJobNumber='+this.form1.personnelJobNumber)
       .then((res)=>{
-          console.log("role",res)
-          //再新增RMS_PERSONNEL表信息
-          let rmsPersonnel = {
-            personnelJobNumber : this.form1.personnelJobNumber,
-            personnelPost : this.form1.personnelPost,
-            personnelName : this.form1.personnelName,
-            personnelDepartmentId : this.form1.shipperId,
-            // personnelWorkshopid : this.form1.personnelWorkshopid,
-            personnelShifts : this.form1.personnelShifts,
-            personnelTeam : this.form1.personnelTeam,
-            personnelSsoId : res.data.userId
-          }
-          // console.log("rmsPersonnel",rmsPersonnel)
-              this.axios.post('/api/v1/rms/addPersonnel',rmsPersonnel)
-              .then((res)=>{
-                          // console.log("Personnel",res)
-                    if (res.data.code == 200) {
-                    this.$message({
-                      type: "success",
-                      message: "新增成功!",
-                    });
-                    // this.$refs.table.refreshData();
-                  } else {
-                    this.$message.error("新增失败,可能存在重复!");
-                  }
-                  // this.$refs['table'].resetField();
-              })
+        console.log("res",res);
+        if(res.data==0){
+          this.$message.error("新增失败,该账号已存在!");
+        }else{
+          //开始赋权新增
+          //新增用户表
+          this.$store.dispatch('system/usersManage/addUser',formData)
+          .then((res)=>{
+              //console.log("role",res)
+              //保存权限表中的用户主键Id
+              this.personnelSsoId = res.data.userId;
+              //再新增RMS_PERSONNEL表信息
+              let rmsPersonnel = {
+                personnelJobNumber : this.form1.personnelJobNumber,
+                personnelPost : this.form1.personnelPost,
+                personnelName : this.form1.personnelName,
+                personnelDepartmentId : this.form1.shipperId,
+                // personnelWorkshopid : this.form1.personnelWorkshopid,
+                personnelShifts : this.form1.personnelShifts,
+                personnelTeam : this.form1.personnelTeam,
+                personnelSsoId : this.personnelSsoId
+              }
+              //  console.log("rmsPersonnel",rmsPersonnel)
+                  this.axios.post('/api/v1/rms/addPersonnel',rmsPersonnel)
+                  .then((res)=>{
+                              // console.log("Personnel",res)
+                        if (res.data.code == 200) {
+                        this.$message({
+                          type: "success",
+                          message: "新增成功!",
+                        });
+                        // this.$refs.table.refreshData();
+                        
+                        //最后新增角色赋权表
 
-              //最后新增角色赋权表
+                          this.axios.post('pass/v1/sysuserroles/addUserroles?userId='
+                          +this.personnelSsoId+'&userCode='+this.form1.personnelJobNumber+'&roleId='+this.value3)
+                          .then((res)=>{
+                            // console.log("success")
+                              this.$router.go(-1);
+                          })
 
-              this.axios.post('pass/v1/sysuserroles/addUserroles?userId='
-              +res.data.userId+'&userCode='+this.form1.personnelJobNumber+'&roleId='+this.value3)
-              .then((res)=>{
-                // console.log("success")
-                  this.$router.go(-1);
-              })
+                      } else {
+                        this.$message.error("新增失败,可能存在重复!");
+                      }
+                      // this.$refs['table'].resetField();
+                  })
 
-      });//end
-      }
+          });//end
+
+        }
+      });
+      
+      }//else
       
     },
     // 取消

+ 46 - 19
src/views/RMS/components/capacity.vue

@@ -25,6 +25,13 @@
             >
               修改
             </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="deleteCapacity(scope.row.capacityId)"
+              v-if="show==true">
+              删除
+            </el-button>
           </template>
         </el-table-column>
       </dilTable>
@@ -36,6 +43,7 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data(){
     return{
+     show:false,
      name:"homeworkPath",
      textInput:"",
      restaurants: [],
@@ -47,15 +55,26 @@ export default {
     }
   },
   created(){
+    if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        this.show = true
+    }
     if(getCookie("orgCode") == "chengyunshang"){
       this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId");
-    }else{
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + this.ssoId;
-    }
+    }else if(getCookie("orgCode") == "baohua"){
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId");
+     }else{
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + null;
+     } 
   },
   methods:{
     onclick(){
+      if(getCookie("orgCode") == "chengyunshang"){
       this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") +"&con=" +this.textInput + "&i=" + new Date();
+    }else if(getCookie("orgCode") == "baohua"){
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") + this.textInput + "&i=" + new Date();
+     }else{
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null +"&con=" +this.textInput + "&i=" + new Date();
+    }
     },
      toInsert() {
       this.$router.push("/addCapacity");
@@ -63,18 +82,24 @@ export default {
     updateCapacity(capacityId){
       this.$router.push("/editCapacity/" + capacityId)
     },
-    deleteCapacity(scope){
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          this.axios
-            .post("/api/v1/rms/deleteCapacity/" + scope.row.capacityId)
+    deleteUser(userId){
+        this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
+           this.$message.success("删除成功!");
+           });
+    },
+    deleteCapacity(capacityId) {
+        if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.$confirm('是否删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+            this.axios
+            .post("/api/v1/rms/deleteCapacity/" + capacityId)
             .then((res) => {
               if (res.data.code == 200) {
+                console.log(res.data.data)
+                this.deleteUser(res.data.data)
                 this.$message({
                   type: "success",
                   message: "删除成功!",
@@ -87,14 +112,16 @@ export default {
                 });
               }
             });
-        })
-        .catch(() => {
+        }).catch(() => {
           this.$message({
-            type: "info",
-            message: "删除操作已取消!",
-          });
+            type: 'info',
+            message: '已取消删除'
+          });          
         });
-    },
+        }else{
+          this.$message.error("!权限不足,请联系管理员")
+        }  
+      },
     },
   }
 

+ 1 - 2
src/views/RMS/components/carrier.vue

@@ -1,4 +1,4 @@
-//资源管理港口
+//资源管理承运商
 <template>
   <div class="steel_inbound">
     <div class="sache">
@@ -43,7 +43,6 @@ export default {
     onclick() {
       this.options.requestUrl =
         "/api/v1/rms/getCarrierList?apiId=342&con=" + this.inputText;
-      console.log(this.textInput);
     },
     toInsert() {
       this.$router.push("/addCarrier");

+ 1 - 1
src/views/RMS/components/editCapacity.vue

@@ -75,7 +75,7 @@ export default {
   mounted() {
    this.information();
    this.axios.post(
-       "api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+       "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
       )
       .then((res) => {
         if(res.data.code == "200"){

+ 62 - 46
src/views/RMS/components/oilPrice.vue

@@ -7,7 +7,7 @@
         v-model="textInput"
         clearable>
       </el-input>
-      <el-button type="primary" class="btn"  @click="onclick">
+      <el-button type="primary" class="btn1"  @click="onclick" :loading="selectLoading">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="toInsert">
@@ -15,15 +15,29 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
+      <dilTable 
+        v-bind.sync="options"
+        :isKuang="isKuang"
+        @func="func"
+        :loading="tableLoading"
+      >
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
             <el-button
               type="text"
               size="small"
-              @click="updateOilPrice(scope)"
+              @click="onEnable(scope)"
+              v-if="scope.row.priceStatus !== '启用'"
             >
-              修改
+              启用
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="onDeactivate(scope)"
+              v-else
+            >
+              停用
             </el-button>
             <el-button
               type="text"
@@ -43,6 +57,11 @@ export default {
   name:"homeworkPath",
   data(){
     return{
+      tableLoading:false,
+      selectLoading:false,
+      isKuang:false,
+      //切换是否启用按钮和停用按钮
+      enableStatus:true,
       textInput: "" ,
       restaurants: [],
       options:{
@@ -52,64 +71,61 @@ export default {
     }
   },
   methods:{
+    func(res){
+      if(this.selectLoading){
+        this.selectLoading = false;
+      }
+      this.isKuang = false;
+      this.tableLoading = false;
+    },
     onclick(){
-      this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&con=" +this.textInput;
+      this.isKuang = true;
+      this.selectLoading = true;
+      this.tableLoading = true;
+      if(this.textInput){
+        this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&con=" +this.textInput+"&i="+ new Date();
+      }else{
+        this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
+      }
     },
-
+    //跳转到新增页面
     toInsert() {
       this.$router.push("/addOilPrice");
-
-    },
-    /*这里要改一改*/
-    updateOilPrice(scope){
-      console.log(scope.row.priceId)
-      this.$router.push("/editOilPrice/"+scope.row.priceId)
     },
     deleteOilPrice(scope){
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          this.axios
-            .post("/api/v1/rms/deleteOilPrice/" + scope.row.priceId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });
-                this.$router.go(0);
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
+     this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.tableLoading = true;
+        this.axios.post('/api/v1/rms/deleteOilPrice/'+scope.row.priceId).then((res)=>{
+          if(res.data.code == "200"){
+            this.$message.success('删除成功')
+            this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
+          }
         })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "删除操作已取消!",
-          });
-        });
+      }).catch(() => {
+        this.$message.info('已取消删除');       
+      });
     },
   },
-
 }
-
 </script>
 
 <style lang="scss" scode>
 .steel_inbound{
   .sache{
-    padding: 1.25rem 0.375rem;
+    width: 100%;height: 100px;
+    display: flex;
+    align-items: center;
     .el-input {
-      width: 20%;
-      margin-right: 1.25rem;
+      width: 250px;
+      margin-left: 50px;
+      margin-right: 30px;
+    }
+    .btn1{
+      margin-right: 30px;
     }
   }
   }

+ 12 - 16
src/views/RMS/components/transitRoute.vue

@@ -3,12 +3,12 @@
   <div class="steel_inbound">
     <div class="top">
       <!-- 框计算 -->
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      <el-input placeholder="请输入内容" class="input" v-model="inputText" clearable>
       </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" class="btn" @click="AddClick">
+      <el-button type="primary" class="btn1" @click="AddClick">
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
@@ -117,24 +117,20 @@ export default {
   },
 };
 </script>
-
-<style lang="scss" scoped>
-.transitRoute {
-  .top {
+<style lang="scss">
+.steel_inbound{
+  .top{
     width: 100%;
     height: 100px;
     display: flex;
     align-items: center;
-    padding-left: 60px;
-  }
-}
-</style>
-
-<style lang="scss" scode>
-.steel_inbound{
-  .top{
-    display: flex;
-    width: 30%;
+    padding-left: 30px;
+    .input{
+      width: 250px;
+    }
+    .btn{
+      margin: 20px;
+    }
   }
 }
 

+ 191 - 123
src/views/RMS/components/transitRouteAdd.vue

@@ -5,12 +5,17 @@
     <div class="form_top">
       <div class="link_name" v-if="state > 0">
         <span>线路编号:</span>
-        <el-input placeholder="请输入内容" v-model="lineNo" disabled>
+        <el-input placeholder="请输入内容" class="el_input_suffix" v-model="lineNo" disabled>
         </el-input>
       </div>
       <div class="link_name">
         <span>线路名称:</span>
-        <el-input placeholder="请输入内容" v-model="line_name" class="el_input_suffix" clearable>
+        <el-input
+          placeholder="请输入内容"
+          v-model="line_name"
+          class="el_input_suffix"
+          clearable
+        >
         </el-input>
       </div>
       <div class="link_type">
@@ -27,46 +32,54 @@
       </div>
       <div class="spellNumber">
         <span class="text">拼数:</span>
-        <el-input placeholder="请输入内容" v-model="spellNumber" clearable>
+        <el-input placeholder="请输入内容" class="input" v-model="spellNumber" clearable>
         </el-input>
       </div>
       <div class="link_zi_list">
         <span>环节:</span>
-          <el-button
-            type="primary"
-            :key="index"
-            v-for="(item,index) in btnList"
-            :disable-transitions="false"
-            @click="addClick(item)"
-            class="link_zi_list_btn"
-          >
-            {{item.linkName}}
-          </el-button>
-          <el-input
-            class="input-new-tag"
-            v-if="inputVisible"
-            v-model="inputValue"
-            ref="saveTagInput"
-            size="small"
-            @blur="onBlur"
-          >
-          </el-input>
-          <el-button v-else class="button-new-tag" size="small" @click="showInput"> + 新增</el-button>
+        <el-button
+          type="primary"
+          :key="index"
+          v-for="(item, index) in btnList"
+          :disable-transitions="false"
+          @click="addClick(item)"
+          class="link_zi_list_btn"
+        >
+          {{ item.linkName }}
+        </el-button>
+        <el-input
+          class="input-new-tag"
+          v-if="inputVisible"
+          v-model="inputValue"
+          ref="saveTagInput"
+          size="small"
+          @blur="onBlur"
+        >
+        </el-input>
+        <!-- <el-button
+          v-else
+          class="button-new-tag"
+          size="small"
+          @click="showInput"
+        >
+          + 新增</el-button
+        > -->
       </div>
-      
     </div>
     <div class="linkList">
-      <div class="link_list" id="tag">
-        <el-tag
-          class="tag"
-          size="small"
-          v-for="(item, i) in linkList"
-          :key="i"
-          @close="deleteClick(i)"
-          closable
-        >
-          {{ item.linkName }}
-        </el-tag>
+      <div class="link_list">
+        <div class="link_list_zi" v-for="(item,i) in linkList" :key="i">
+          <div class="xhNumber">
+            <span>{{i + 1}}</span>
+          </div>
+          <div class="link_list_name">
+            {{item.linkName}}
+          </div>
+          <div class="link_meng_qicheheng" v-if="item.gjName">
+            {{item.gjName}}
+          </div>
+          <i class="el-icon-delete" @click="deleteClick(i)"></i>
+        </div>
       </div>
     </div>
     <div class="btn">
@@ -75,18 +88,42 @@
         >确认</el-button
       >
     </div>
+    
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogVisible"
+      width="30%"
+    >
+      <el-select v-model="gateGuard" multiple placeholder="请选择">
+        <el-option
+          v-for="(item,i) in gateGuardList"
+          :key="i"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="determine">确 定</el-button>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-import Sortable from "sortablejs";
 export default {
   components: { PageTitle },
   data() {
     return {
-      inputVisible:false,
-      inputValue: '',
+      gateGuardList:[],
+      gateGuard:null,
+      title:"请选择门岗",
+      dialogVisible:false,
+      form:{},
+      inputVisible: false,
+      inputValue: "",
       lineNo: "",
       line_name: "",
       spellNumber: 1,
@@ -116,43 +153,40 @@ export default {
       btnList: [],
       linkList: [],
       state: 0,
+      linkItem:{},
     };
   },
   created() {
     this.initialization();
   },
-  mounted() {
-    this.drag();
-  },
   methods: {
-    A(){
- // 获取所有的作业环节
-            this.axios.post("/api/v1/rms/getLink").then((res) => {
-              if (res.data.code == "200") {
-                this.btnList = res.data.data;
-              }
-            });
-    },
-    //将新增变为输入框
-    showInput() {
-      this.inputVisible = true;
-    },
-    //当输入框失去焦点之后触发,新增作业环节
-    onBlur() {
-      console.log(this.inputValue);
-      if (this.inputValue) {
-        this.axios.post('/api/v1/rms/LinkInsertSelective',
-        {
-          linkName:this.inputValue,
-          userName:""
-        }).then((res)=>{
-          if(res.data.code == "200"){
-            this.A();
+    determine(){
+      let text = "";
+      this.gateGuardList.forEach((e)=>{
+        for(var i = 0;i < this.gateGuard.length;i++){
+          if(this.gateGuard[i] == e.value){
+            text += e.label + "/"
           }
-        })
-      }
-      this.inputVisible = false;
-      this.inputValue = '';
+        }
+      })
+      let index = text.lastIndexOf("/")
+      text =text.substring(0,index);
+      console.log(this.linkItem);
+      this.linkList.push({
+        linkId:this.linkItem.linkId,
+        linkName:this.linkItem.linkName,
+        gjName:text,
+        gateGuard:this.gateGuard
+      })
+      this.dialogVisible = false;
+    },
+    A() {
+      // 获取所有的作业环节
+      this.axios.post("/api/v1/rms/getLink").then((res) => {
+        if (res.data.code == "200") {
+          this.btnList = res.data.data;
+        }
+      });
     },
     // 初始化页面的数据
     initialization() {
@@ -181,8 +215,29 @@ export default {
     },
     // 将点击的对象添加到linkList的数组中
     addClick(item) {
-      console.log(item);
-      this.linkList.push(item);
+      if(item.linkId == 4 || item.linkId == 5 || item.linkId == 6){
+        this.linkList.push({
+          linkId:item.linkId,
+          linkName:item.linkName,
+          gjName:"",
+          gateGuard:[]
+        })
+      }else{
+        this.gateGuard = [];
+        this.gateGuardList = [];
+        if(item.linkId == 1 || item.linkId == 7){
+          this.axios.get('/api/v1/tms/getGatepost').then((res)=>{
+            this.gateGuardList = res.data.data
+          })
+          this.dialogVisible = true;
+        }else if(item.linkId == 2 || item.linkId == 3){
+          this.axios.get('/api/v1/uc/getAllCalculateMes').then((res)=>{
+            this.gateGuardList = res.data
+          })
+          this.dialogVisible = true;
+        }
+        this.linkItem = item;
+      }
     },
     // 删除被点击的对象
     deleteClick(index) {
@@ -207,6 +262,7 @@ export default {
     },
     // 点击确定按钮
     confirmClick() {
+      console.log("sdsd")
       // 判断是否存在空值
       if (this.line_name && this.value && this.linkList.length > 0) {
         var map = {
@@ -216,6 +272,7 @@ export default {
           line_type: parseInt(this.value),
           linkList: this.linkList,
         };
+        console.log(map)
         var URL = "";
         var messageText = "";
         // 若上一个页面传递的值为0则新增
@@ -245,32 +302,6 @@ export default {
         });
       }
     },
-    //拖动事件
-    drag() {
-      var _this = this;
-      var $ul = document.getElementById("tag");
-      new Sortable($ul, {
-        onUpdate: function (event) {
-          //修改items数据顺序
-          var newIndex = event.newIndex,
-            oldIndex = event.oldIndex,
-            $li = $ul.children[newIndex],
-            $oldLi = $ul.children[oldIndex];
-          // 先删除移动的节点
-          $ul.removeChild($li);
-          // 再插入移动的节点到原有节点,还原了移动的操作
-          if (newIndex > oldIndex) {
-            $ul.insertBefore($li, $oldLi);
-          } else {
-            $ul.insertBefore($li, $oldLi.nextSibling);
-          }
-          // 更新items数组
-          var item = _this.linkList.splice(oldIndex, 1);
-          _this.linkList.splice(newIndex, 0, item[0]);
-        },
-        animation: 150,
-      });
-    },
   },
 };
 </script>
@@ -279,76 +310,113 @@ export default {
 .transitRouteAdd {
   .form_top {
     width: 100%;
-    height: 10.625rem;
+    height: 170px;
     .link_name {
       display: flex;
       align-items: center;
       justify-content: center;
-      margin-top: 1.25rem;
-      .el_input_suffix{
-        widows: 50px;
-        
+      margin-top: 20px;
+      .el_input_suffix {
+        width: 220px;
       }
-      
     }
     .link_type {
       display: flex;
       align-items: center;
       justify-content: center;
-      margin-top: 1.25rem;
+      margin-top: 20px;
     }
     .spellNumber {
       display: flex;
       align-items: center;
       justify-content: center;
-      margin-top: 1.25rem;
+      margin-top: 20px;
       .text {
-        width: 80px;
+        width: 60px;
         text-align: right;
       }
+      .input{
+        width: 220px;
+      }
     }
     .link_zi_list {
       display: flex;
       align-items: center;
       justify-content: center;
-      margin-top: 1.25rem;
-      .link_zi_list_btn{
-        width: 3.125rem; height: 2rem;
+      margin-top: 20px;
+      .link_zi_list_btn {
+        width: 50px;
+        height: 32px;
         display: flex;
         align-items: center;
         justify-content: center;
-        margin-right: 0.625rem;
+        margin-right: 10px;
       }
       .input-new-tag {
-        width: 4.375rem;
-        margin-left: 0.625rem;
+        width: 70px;
+        margin-left: 10px;
         vertical-align: bottom;
       }
     }
   }
   .linkList {
-    margin-top: 5.625rem;
+    margin-top: 120px;
     display: flex;
     justify-content: center;
-    .link_list {
-      border: #8d8c8c 0.0625rem solid;
+    .link_list{
+      border: #8d8c8c 1px solid;
       width: 80%;
-      height: 12.5rem;
-      display: flex;
-      flex-wrap: wrap;
-      justify-content: flex-start;
-      overflow: hidden;
-      padding: 0.625rem;
-      .tag {
-        margin: 0.3125rem;
+      min-height: 200px;
+      .link_list_zi{
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-bottom: 1px #9b9898cc solid ;
+        height: 40px;
+        .xhNumber{
+          background-color: #006eff;
+          color: #fff;
+          width: 20px;height: 20px;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          border-radius: 50%;
+          margin-right: 10px;
+        }
+        .link_list_name{
+          font-size: 18px;
+          font-weight: 700;
+          margin-right: 30px;
+        }
+        .link_meng_qicheheng{
+          font-size: 14px;
+          font-weight: 600;
+          margin-right: 50px;
+        }
+        i{
+          cursor: pointer;
+        }
       }
     }
+    // .link_list {
+    //   border: #8d8c8c 1px solid;
+    //   width: 80%;
+    //   height: 200px;
+    //   display: flex;
+    //   flex-wrap: wrap;
+    //   justify-content: flex-start;
+    //   overflow: hidden;
+    //   padding: 10px;
+    //   .tag {
+    //     margin: 5px;
+    //   }
+    // }
   }
   .btn {
     display: flex;
     width: 100%;
     justify-content: center;
-    margin-top: 20px;
+    margin-top: 1.25rem;
   }
 }
 </style>

+ 24 - 3
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue

@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15",
+        requestUrl: "",
       },
     };
   },
+  created(){
+    if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=394&orderType=15&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 25 - 4
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/grossWeight.vue

@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
-    onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15&con=" + this.input;
+      onclick() {
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=15&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 24 - 3
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/outFactory.vue

@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=15&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 24 - 3
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/tareWeight.vue

@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=15&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 25 - 4
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/unload.vue

@@ -12,23 +12,44 @@
   </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getUnloadResult?apiId=389&orderType=15",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=15"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=15&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=15&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=15&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=15&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=15"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=15&userId=" + getCookie("orgCode")
+          }
+      }  
     },
-   }
+  },
 };
 </script>
 <style lang='scss' scoped>

+ 25 - 4
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue

@@ -1,6 +1,6 @@
 //进厂
 <template>
-  <!-- 零星物资厂作业页面 -->
+  <!-- 零星物资厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16",
+        requestUrl: "",
       },
     };
   },
+  created(){
+    if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 25 - 4
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/grossWeight.vue

@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=398&orderType=16",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=16"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=16&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
-    onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=422&orderType=16&con=" + this.input;
+      onclick() {
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=16&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=16&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=16"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=16&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 24 - 3
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/load.vue

@@ -13,6 +13,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,15 +22,35 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getUnloadResult?apiId=404&orderType=16",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=404&orderType=16&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0&userId=" + getCookie("orgCode")
+          }
+      }  
     },
-   }
+  },
 };
 </script>
 <style lang='scss' scoped>

+ 24 - 3
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/outFactory.vue

@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=16&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 24 - 3
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/tareWeight.vue

@@ -14,20 +14,41 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
-      input: "",
+      input: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllJiPiResult?apiId=401&orderType=16",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=16"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=16&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=401&orderType=16&con=" + this.input;
+      if(this.input != null){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=16&con=" + this.input
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=16&userId=" + getCookie("orgCode") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=16"
+          }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=16&userId=" + getCookie("orgCode")
+          }
+      }  
     },
   },
 };

+ 46 - 47
src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue

@@ -1,4 +1,4 @@
-//新增运输预约
+//新增运输需求
 <template>
   <!-- 新增运输作业页面 -->
   <div class="addSporadic">
@@ -74,7 +74,7 @@
           <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
         </el-form-item>
         </el-form>
-        <el-form
+         <el-form
         :inline="true"
         class="demo-form-inline"
         label-width="80px"
@@ -94,7 +94,7 @@
         </el-autocomplete>
         </el-form-item>
         </el-form>
-           <el-form
+        <el-form
         :inline="true"
         class="demo-form-inline"
         label-width="80px"
@@ -217,18 +217,18 @@
       title="选择物资信息"
       :visible.sync="table"
       direction="rtl"
-      size="35%"
+      size="40%"
       :show-close="false"
     >
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input
-      ><el-button type="primary" class="btn" @click="onclick">
+      <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
+      ><el-button type="primary" class="btn" @click="onclickMaterial">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button @click="open">取消</el-button>
+      <!-- <el-button @click="toggleSelection">取消</el-button> -->
       <el-button type="primary" @click="makeSure1">确定</el-button>
       <div class="tablecls">
         <!-- 查询所有的物资 -->
-        <dilTable v-bind.sync="materialOptions" @selection-change="selectionChange">
+        <dilTable ref="materialTable" v-bind.sync="materialOptions" @radio-change="selectionChange">
         </dilTable>
       </div>
     </el-drawer>
@@ -258,17 +258,19 @@
     </div>  
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="makeSure">确认</el-button>
+      <el-button type="primary" @click="makeSure" :disabled = "disabled">确认</el-button>
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
+      disabled:false,
       materialTimes:null,
       options: [],
       value: '',
@@ -278,7 +280,7 @@ export default {
       stateConsignee:null,
       restaurantsConsignee:null,
       restaurantsSupplier:null,
-      restaurantsCarrier: [],
+      restaurantsCarrier:null,
       orderTypeList:[
         {
           value:15,
@@ -288,7 +290,6 @@ export default {
           label:'出厂'
         }
       ],
-      likeCarrierLike:'',
       orderType:15,
       // 线路名称
       lineName: "",
@@ -341,19 +342,18 @@ export default {
       supplierId: null,
       //物资id
       materialId: null,
+      //承运商id
+      carrierId:null,
       //是否需要打开模态窗口
       drawer: false,
-      //卸货点id
-      unloadPointId: "",
-      //卸货点名称
-      unloadPointName: "",
       a: 1,
       direction: "rtl",
-      input: "",
+      inputMaterial:null,
+      input:null,
       //物资模态框
       materialOptions:{
           requestUrl:"",
-          selectionType: "select",
+          selectionType: "radio",
       },
       line: {
         requestUrl: "",
@@ -384,8 +384,15 @@ export default {
     },
   },
   methods: {
+    onclickMaterial(){
+        if(this.inputMaterial != null){
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"+ "&index=" + this.inputMaterial
+        }
+        else{
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
+        }
+    },
     onInputTimes(){
-      console.log(this.materialTimes)
       if(!isNumber(this.materialTimes)){
         this.$message.warning('趟次请输入数字')
       }
@@ -396,7 +403,6 @@ export default {
       }
     },
     onInputWeight(scope){
-      console.log(scope)
       if(!isNumber(scope)){
         this.$message.warning('重量请输入数字')
       }
@@ -407,17 +413,15 @@ export default {
       }
     },
     drawTable(){
-      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=1"
+      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=" + new Date()
       this.selectionList1 = []
       this.table = true
     },
     //收货单位弹出层
-    handleSelectConsignee(item){
-      console.log(this.consigneeId)
+    handleSelectConsignee(item){   
       this.consigneeId = item.consigneeId
       item.consigneeCompanyName = this.consigneeCompanyName
-      console.log(this.consigneeId)
-      console.log('这是选中的收货单位')
+  
     },
     //以下是发货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
@@ -427,7 +431,6 @@ export default {
           var restaurantsConsignee = res.data.data
           var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
             // 调用 callback 返回建议列表的数据
-          console.log(results,"results");
           cb(results);
         }
       })    
@@ -459,7 +462,6 @@ export default {
           return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
         };
       },
-      //以上是返回单位边输边查搜索
     //承运商弹出层
     handleSelectCarrier(item){    
       this.carrierId = item.carrierId
@@ -470,7 +472,6 @@ export default {
         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);
@@ -489,18 +490,8 @@ export default {
     },
     // 返回主界面
     makeSure1() {
-      console.log(this.selectionList1) 
-      this.selectionList1.forEach((e) => {
-        var addmap = {
-          materialCode: e.materialCode,
-          materialName: e.materialName,
-          Specification: e.materialSpecification+e.materialModel,
-          orderMaterialWeight: null,        
-          materialId: e.materialId,
-          materialPriority:1,
-        };
-          this.tableData.push(addmap);
-      });     
+        this.selectionList1.materialPriority = 1
+        this.tableData.push(this.selectionList1);    
         this.selectionList1 = [];
         this.table = false;
         console.log(this.selectionList1)
@@ -544,7 +535,6 @@ export default {
       this.$router.push("/mornThanTransportAppoint");
     },
     currentRadioChange5(selection) {
-      console.log(selection)
       if(selection.lineName == null &&selection.lineDesk == null){
           this.lineName = ''
       }else{
@@ -554,11 +544,14 @@ export default {
     },
     // 确认
     makeSure() {
-        if(this.supplierId==null||this.lineId==null||this.carrierId==null||this.consigneeId==null){
-          this.$alert('存在空值')
+        this.disabled = true
+        if(this.supplierId==null||this.lineId==null||this.consigneeId==null){
+          this.disabled = false
+          this.$message.warning("存在值未填写")
           return
         }else if(this.tableData.length == 0){
-          this.$alert('请点击浏览勾选物资')
+          this.disabled = false
+          this.$message.warning("请点击浏览勾选物资")
           return
         }
         var i = 0;
@@ -571,10 +564,12 @@ export default {
           }            
         })
         if(i != 0){
-           this.$alert('装卸货优先级未填写')
+           this.$message.warning("装卸货优先级未填写")
+           this.disabled = false
            return
         }else if(j != 0){
-           this.$alert('物资重量未填写')
+           this.$message.warning("物资重量未填写")
+           this.disabled = false
            return
         }
         let amsOrder = {
@@ -584,11 +579,15 @@ export default {
           carrierId: this.carrierId,
           receiveId: this.consigneeId,
           orderTime:this.materialTimes,
+          userId:getCookie("orgCode"),
           mapList: this.tableData,
-        };   
+        };
         this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
           if (res.data.code == "200") {
-            this.$router.go(-1)
+            this.$router.push("/mornThanTransportAppoint")
+            this.disabled = false
+          }else{
+            this.disabled = false
           }
         });
       }

+ 141 - 42
src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/transportAppoint.vue

@@ -28,14 +28,10 @@
         >
           <el-table-column
             fixed="right"
-            align="center"
             label="操作"
             width="120"
           >
             <template slot-scope="scope">
-              <!-- <el-button @click="updateClick(scope.row.orderId)" type="text" size="small">
-                修改
-              </el-button> -->
               <el-button @click="deleteClick(scope)" type="text" size="small">
                 删除
               </el-button>
@@ -45,18 +41,36 @@
       </el-tab-pane>
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2"> </dilTable>
+        <dilTable v-bind.sync="option2">
+          <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="stopSpoOrder(scope)" type="text" size="small">
+                停止
+              </el-button>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+       <!-- 已接单 -->
+      <el-tab-pane label="已接单" name="third">
+        <dilTable v-bind.sync="option3">
+        </dilTable>
       </el-tab-pane>
     </el-tabs>
   </div>
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "inplantTMS",
   data() {
     return {
-      input: "",
+      input: null,
       Time: "",
       activeName: "first",
       option1: {
@@ -71,73 +85,158 @@ export default {
         requestUrl:
           "",
       },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+      },
       selection: [],
+      maplist:[]
     };
   },
   created(){
-      console.log('-----sj');
-      console.log(new Date())
-      console.log('-----sj');
-      this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=15&dispatchStatus=0",
-      this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&sporadicStatus=1"
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0",
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1",
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&type1=1"       
+      }else{
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&userId=" + getCookie("orgCode"),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&userId=" + getCookie("orgCode"),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&type1=1&userId=" + getCookie("orgCode")
+      }
   },
   methods: {
+    getRequestUrl(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&test=" + new Date(),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&type1=1&test=" + new Date()
+      }else{
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&type1=1&userId=" + getCookie("orgCode") + "&test=" + new Date()
+     }
+    },
+    stopSpoOrder(scope){
+      this.$confirm("是否停止", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/ams/closeSporadicOrder" ,{
+              sporadicOrderId : scope.row.sporadicOrderId
+            })
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "成功停止!",
+                });
+              this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "停止失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "停止操作已取消!",
+          });
+        });
+    },
     //获取选中的订单
     selectionChange(selection) {
       this.maplist = selection;
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=15&dispatchStatus=0&con=" +
-          this.input;
-      } else {
-        this.option2.requestUrl =
-          "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&sporadicStatus=1&con=" +
-          this.input;
-      }
+      if(this.input != null){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu")
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&con=" + this.input
+          }else if(this.activeName == "second"){
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=11&con=" + this.input
+          }                
+        }else
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }else if(this.activeName == "second"){
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=11&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }       
+        }
+        }else{
+        this.$message.warning("未输入查询条件")
+        }
     },
     handleClick(tab, event) {
-      
-      this.option1.requestUrl = this.option1.requestUrl + "&test=" + new Date()
-      this.option2.requestUrl = this.option2.requestUrl + "&test=" + new Date()
-      console.log(this.option1.requestUrl)
-      console.log(this.option2.requestUrl)
-     
-    }, // 下发
+      this.getRequestUrl()
+    },
     // 下发
     sendClick() {
-      console.log(this.maplist);
+      if(this.maplist.length == 0){
+        this.$message.warning('未选择零星订单')
+        return
+      }
       this.axios
         .post("/api/v1/ams/issueSporadicOrders", this.maplist)
         .then((res) => {
           if (res.data.code == "200") {
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=15&dispatchStatus=0&test=" + new Date();
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&sporadicStatus=1&test=" + new Date();
+            this.getRequestUrl()
+            // this.$router.go(0)
             this.$message({
               type: "success",
               message: "下发成功!",
             });
+            this.maplist = []
           }
         });
     },
     // 删除
     deleteClick(scope) {
-      console.log(scope.row.sporadicOrderId);
-      this.axios
-        .post(
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+          .post(
           "/api/v1/ams/deleteSporadicOrders?sporadicOrderId=" +
             scope.row.sporadicOrderId
-        )
-        .then((res) => {
-          if (res.data.code == "200") {
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=15&dispatchStatus=0&test=" + new Date();
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&sporadicStatus=1&test=" + new Date();
-            this.$message({
-              type: "success",
-              message: "删除成功!",
+            )
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "成功删除!",
+                });
+              this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
             });
-          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
         });
     },
     //新增

+ 45 - 15
src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue

@@ -1,5 +1,6 @@
 //新增运输订单
 <template>
+
   <div class="addSaleOrderSend">
     <page-title>新增运输订单派车</page-title>
     <!-- 零星订单表的数据 -->
@@ -53,15 +54,9 @@
     <!-- 车辆模态框 -->
     <el-drawer 
       :visible.sync="truckDrawer" 
-      :with-header="false"
-      :destroy-on-close="false"
+      :before-close="handleClose"
       direction="rtl"
       size="40%"
-      :show-close="false"
-      :wrapperClosable="false"
-      modal
-      close-on-press-escape
-    
     >
       <el-input
         placeholder="请输入内容"
@@ -96,7 +91,7 @@
     </el-drawer>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure">确定</el-button>
+      <el-button type="primary" @click="makeSure" :disabled = "disabled">确定</el-button>
     </div>
   </div>
 </template>
@@ -108,6 +103,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      disabled:false,
       //零星订单ID
       sporadicOrderId:null,
       //运输订单ID
@@ -149,15 +145,19 @@ export default {
   created() {
     if (getCookie("orgCode") == "chengyunshang") {
       this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-      this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&dispatchStatus=0&carrierSsoId=" + getCookie("userId");
-    } else {
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&dispatchStatus=0&carrierSsoId=" + getCookie("userId");
+    } else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
       this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null;
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
       this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&dispatchStatus=0";
     }
-    
+    else{
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+      this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&dispatchStatus=0&userId=" + getCookie("orgCode");
+    }
   },
   methods: {
     onInput(val){
@@ -165,8 +165,21 @@ export default {
         this.$message.warning('重量请输入数字')
       }
     },
+    handleClose(done){
+      done()
+    },
     //点击确定按钮的事件
-    makeSure(){   
+    makeSure(){
+        this.disabled = true
+        if(this.orderId == 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/ams/addSporadicOrderTimes',{
           orderId:this.orderId,
           sporadicOrderId:this.sporadicOrderId,
@@ -174,6 +187,7 @@ export default {
         }).then((res)=>{
           if(res.data.code == '200'){
             this.$message.success('派车成功')
+            this.disabled = false
             this.cancel();
           }
         })
@@ -186,6 +200,7 @@ export default {
     deleteRow(index){
       this.selectionList.splice(index,1)
     },
+
     //车辆模态框的确定事件
     AddTruckClick(){
       this.selectTruck.forEach(e => {
@@ -198,14 +213,29 @@ export default {
     },
     //车辆模态框框计算
     selectTruckClick(){
-      if (getCookie("orgCode") == "chengyunshang") {
+      if(this.truckText != null){
+         if(getCookie("orgCode") == "chengyunshang") {
         this.truck.requestUrl =
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
           getCookie("userId") + "&index="+this.truckText;
+        this.truckText = null
       } else {
         this.truck.requestUrl =
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
+        this.truckText = null
+      }
+      }else{
+        this.$message.warning("未输入查询条件")
+        if(getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          getCookie("userId")
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null
+      }
       }
+     
     },
     //车辆表格
     currentRadioChange1(select){

+ 151 - 15
src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue

@@ -10,15 +10,51 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
+    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
+    <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>
+    </span>
+    </el-dialog>
     <div class="transportOrder_bottom">
       <el-tabs v-model="activeName" @tab-click="handleClick">
-        <!-- 已下发 -->
-        <el-tab-pane label="已下发" name="first">
-          <dilTable v-bind.sync="first"></dilTable>
+        <el-tab-pane label="未接收" name="first">
+          <dilTable v-bind.sync="first">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+               <el-button @click="updateClick(scope)" type="text" size="small">
+                修改
+              </el-button>
+             <el-button @click="deleteClick(scope)" type="text" size="small">
+                删除
+              </el-button>
+            </template>
+          </el-table-column>
+          </dilTable>
         </el-tab-pane>
         <!-- 已接收 -->
         <el-tab-pane label="已接收" name="Received">
-          <dilTable v-bind.sync="Received"></dilTable>
+          <dilTable v-bind.sync="Received">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="deleteClick(scope)" type="text" size="small">
+                关闭
+              </el-button>
+            </template>
+          </el-table-column>      
+          </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div> 
@@ -34,7 +70,7 @@ export default {
       //模态窗的框计算
       inputText: null,
       //是否弹出对话框
-      dialogVisible: false,
+      dialogTableVisible: false,
       //输入框的值
       input: "",
       //选项卡的当前选中的值
@@ -78,6 +114,7 @@ export default {
       capacityNumber: "",
       //选中的运力id
       capacityId: null,
+      orderId:null,
       //是否关闭模态框
       drawer: false,
       //模态框从左往右打开
@@ -89,25 +126,124 @@ export default {
     };
   },
   created(){
-      this.carrierUserId = getCookie('userId')
-      if(getCookie('orgCode') == "dagangadmin"){
+       if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+      }else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+      }
+      if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId")
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4"
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5"
       }else{
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + this.carrierUserId ,
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + this.carrierUserId 
-      }     
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode")
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode")
+      }    
   },
+  
   methods: {
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    cancelUpdate(){
+      this.dialogTableVisible = false
+      this.$message.info("取消修改运力")
+    },
+    getRequestUrl(){
+      if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date(),
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&test=" + new Date()
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
+      }
+    },
+    //删除运输订单
+    deleteClick(scope){
+      this.$confirm('是否删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+            this.axios
+            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });     
+                this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+      console.log(scope.row.orderId)
+    },
+    //修改运输订单
+    updateClick(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.getRequestUrl()
+            this.dialogTableVisible = false
+          }else{
+            this.$message.error("修改运力失败")
+          }
+        })
+    },
+    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();
+      }
+    },
+    currentRadioChange1(row){
+      console.log(row)
+      this.capacityId = row.capacityId
+    },
+    
     onclick(){
       console.log("dianji")
     },
     handleClick(tab, event) {
-      this.first.requestUrl = this.first.requestUrl + "&test=" + new Date()
-      this.Received.requestUrl = this.Received.requestUrl + "&test=" + new Date()
-      console.log(this.first.requestUrl,this.Received.requestUrl)
-
-    }, // 下发
+      this.getRequestUrl()
+    },
     // 查看物资详情
     detailclick(row) {
       // 记录重复点击次数

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/enFactory.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=12",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=12"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=12&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=394&orderType=12&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/grossWeight.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=12",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=12"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=12&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=12&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/outFactory.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=12",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=12"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=12&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=12&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/tareWeight.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=12",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=12"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=12&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=12&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/unload.vue

@@ -13,6 +13,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getUnloadResult?apiId=389&orderType=12",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=12"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=12&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=12&con=" + this.input;
+          this.$message.info("功能暂时关闭")
     },
    }
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/enFactory.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=13",
+        requestUrl: "",
       },
     };
   },
+  created(){
+    if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=13"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=13&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=13&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/grossWeight.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=398&orderType=13",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=398&orderType=13"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=398&orderType=13&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=422&orderType=13&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/load.vue

@@ -13,6 +13,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=404&orderType=13&status=0",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=13&status=0"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=13&status=0&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=404&orderType=13&status=0&con=" + this.input;
+          this.$message.info("功能暂时关闭")
     },
    }
 };

+ 10 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/outFactory.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,13 +22,20 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=13",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=13"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=13&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=13&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 9 - 1
src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/tareWeight.vue

@@ -14,6 +14,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -25,9 +26,16 @@ export default {
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=401&orderType=13"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=401&orderType=13&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=401&orderType=13&con=" + this.input;
+      this.$message.info("功能暂时关闭")
     },
   },
 };

+ 86 - 65
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue

@@ -1,4 +1,4 @@
-//新增运输预约
+//新增运输需求
 <template>
   <!-- 新增运输作业页面 -->
   <div class="addSporadic">
@@ -74,7 +74,7 @@
           <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
         </el-form-item>
         </el-form>
-        <el-form
+         <el-form
         :inline="true"
         class="demo-form-inline"
         label-width="80px"
@@ -98,6 +98,22 @@
         :inline="true"
         class="demo-form-inline"
         label-width="80px"
+      >
+        <el-form-item label="趟次">
+         <el-input
+          class="inline-input"
+          v-model="materialTimes"
+          placeholder="趟次"
+          :trigger-on-focus="false"
+          @input="onInputTimes()"
+        >
+        </el-input>
+        </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
       >
         <el-form-item label="选择物资">      
         </el-form-item>
@@ -201,23 +217,23 @@
       title="选择物资信息"
       :visible.sync="table"
       direction="rtl"
-      size="35%"
+      size="40%"
       :show-close="false"
     >
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input
-      ><el-button type="primary" class="btn" @click="onclick">
+      <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
+      ><el-button type="primary" class="btn" @click="onclickMaterial">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button @click="open">取消</el-button>
+      <!-- <el-button @click="open">取消</el-button> -->
       <el-button type="primary" @click="makeSure1">确定</el-button>
       <div class="tablecls">
         <!-- 查询所有的物资 -->
-        <dilTable v-bind.sync="materialOptions" @selection-change="selectionChange">
+        <dilTable ref="materialTable" v-bind.sync="materialOptions" @radio-change="selectionChange">
         </dilTable>
       </div>
     </el-drawer>
     <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="30%">
+    <el-drawer :visible.sync="drawer" :direction="direction" size="30%" :before-close="handleClose">
       <el-input
         placeholder="请输入内容"
         v-model="input"
@@ -242,17 +258,20 @@
     </div>  
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="makeSure">确认</el-button>
+      <el-button type="primary" @click="makeSure" :disabled = "disabled">确认</el-button>
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
+      disabled:false,
+      materialTimes:null,
       options: [],
       value: '',
       receiveName:'',
@@ -261,7 +280,7 @@ export default {
       stateConsignee:null,
       restaurantsConsignee:null,
       restaurantsSupplier:null,
-      restaurantsCarrier: [],
+      restaurantsCarrier:null,
       orderTypeList:[
         {
           value:12,
@@ -271,7 +290,6 @@ export default {
           label:'出厂'
         }
       ],
-      likeCarrierLike:'',
       orderType:12,
       // 线路名称
       lineName: "",
@@ -309,7 +327,6 @@ export default {
           slot: true,
         },
       ],
-      consigneeId:null,
       // 收货单位ID
       receiveId:null,
       //承运商ID
@@ -325,25 +342,21 @@ export default {
       supplierId: null,
       //物资id
       materialId: null,
+      //承运商id
+      carrierId:null,
       //是否需要打开模态窗口
       drawer: false,
-      //卸货点id
-      unloadPointId: "",
-      //卸货点名称
-      unloadPointName: "",
-      //订单类别
-      orderType:12,
       a: 1,
       direction: "rtl",
-      input: "",
+      inputMaterial:null,
+      input:null,
       //物资模态框
       materialOptions:{
-          requestUrl:
-            "/api/v1/uc/selectAllMaterialName?apiId=395",
-           selectionType: "select",
+          requestUrl:"",
+          selectionType: "radio",
       },
       line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        requestUrl: "",
         selectionType: "radio",
       },
       row: {},
@@ -371,13 +384,31 @@ export default {
     },
   },
   methods: {
+    //关闭运输线路
+    handleClose(done){
+        done()
+        console.log("这里")
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
+    },
+    onclickMaterial(){
+        if(this.inputMaterial != null){
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"+ "&index=" + this.inputMaterial
+        }
+        else{
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
+        }
+    },
+    onInputTimes(){
+      if(!isNumber(this.materialTimes)){
+        this.$message.warning('趟次请输入数字')
+      }
+    },
     onInputPriority(scope){
       if(!isNumber(scope)){
         this.$message.warning('装卸货次序请输入数字')
       }
     },
     onInputWeight(scope){
-      console.log(scope)
       if(!isNumber(scope)){
         this.$message.warning('重量请输入数字')
       }
@@ -388,18 +419,15 @@ export default {
       }
     },
     drawTable(){
-      console.log('jll')
-      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=1"
+      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=" + new Date()
       this.selectionList1 = []
       this.table = true
     },
     //收货单位弹出层
-    handleSelectConsignee(item){
-      console.log(this.consigneeId)
+    handleSelectConsignee(item){   
       this.consigneeId = item.consigneeId
       item.consigneeCompanyName = this.consigneeCompanyName
-      console.log(this.consigneeId)
-      console.log('这是选中的收货单位')
+  
     },
     //以下是发货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
@@ -409,7 +437,6 @@ export default {
           var restaurantsConsignee = res.data.data
           var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
             // 调用 callback 返回建议列表的数据
-          console.log(results,"results");
           cb(results);
         }
       })    
@@ -441,7 +468,6 @@ export default {
           return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
         };
       },
-      //以上是返回单位边输边查搜索
     //承运商弹出层
     handleSelectCarrier(item){    
       this.carrierId = item.carrierId
@@ -472,24 +498,17 @@ export default {
     // 返回主界面
     makeSure1() {
       console.log(this.selectionList1)
-      //debugger  
-      this.selectionList1.forEach((e) => {
-        var addmap = {
-          materialCode: e.materialCode,
-          materialName: e.materialName,
-          Specification: e.materialSpecification+e.materialModel,
-          orderMaterialWeight: null,        
-          materialId: e.materialId,
-          materialPriority:1
-        };
-          this.tableData.push(addmap);
-      });     
+        this.selectionList1.materialPriority = 1
+        this.tableData.push(this.selectionList1);  
+        console.log(this.tableData)
+        console.log(this.tableData)  
         this.selectionList1 = [];
         this.table = false;
         console.log(this.selectionList1)
     },
     //取消模态框多选
     open() {
+      console.log(this.selectionList1.length)
       if (this.selectionList1.length != 0) {
         this.$confirm("取消会将已选择的数据清空, 是否继续?", "提示", {
           confirmButtonText: "确定",
@@ -511,44 +530,39 @@ export default {
       this.selectionList1 = selection;
     },
     onclick(a) {
-      if (a == 1) {
-        this.frist.requestUrl =
-          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-          this.input;
-      } else if (a == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247" +
-          "&index=" +
-          this.input;
-      } else if (a == 5) {
-        this.option.requestUrl =
+      if (a == 5) {
+        this.line.requestUrl =
           "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
       }
     },
     ondrawer(num) {
+      this.line.requestUrl =
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&test=1";
       this.drawer = true;
       this.a = num;
     },
     // 返回
     onClickCancel() {
-      
+      this.$router.push("/sporadicTransportAppoint");
     },
     currentRadioChange5(selection) {
-      console.log(selection)
       if(selection.lineName == null &&selection.lineDesk == null){
           this.lineName = ''
       }else{
           this.lineName = selection.lineName+'  '+selection.lineDesk 
           this.lineId = selection.lineId;
-      } 
+      }    
     },
     // 确认
     makeSure() {
-        if(this.supplierId==null||this.lineId==null||this.carrierId==null||this.consigneeId==null){
-          this.$alert('存在空值')
+        this.disabled = true
+        if(this.supplierId==null||this.lineId==null||this.consigneeId==null){
+          this.disabled = false
+          this.$message.warning("存在值未填写")
           return
         }else if(this.tableData.length == 0){
-          this.$alert('请点击浏览勾选物资')
+          this.disabled = false
+          this.$message.warning("请点击浏览勾选物资")
           return
         }
         var i = 0;
@@ -561,10 +575,12 @@ export default {
           }            
         })
         if(i != 0){
-           this.$alert('装卸货优先级未填写')
+           this.$message.warning("装卸货优先级未填写")
+           this.disabled = false
            return
         }else if(j != 0){
-           this.$alert('物资重量未填写')
+           this.$message.warning("物资重量未填写")
+           this.disabled = false
            return
         }
         let amsOrder = {
@@ -573,11 +589,16 @@ export default {
           orderType:this.orderType,
           carrierId: this.carrierId,
           receiveId: this.consigneeId,
+          orderTime:this.materialTimes,
+          userId:getCookie("orgCode"),
           mapList: this.tableData,
-        };   
+        };
         this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
           if (res.data.code == "200") {
-            this.$router.go(-1)
+            this.$router.push("/sporadicTransportAppoint")
+            this.disabled = false
+          }else{
+            this.disabled = false
           }
         });
       }

+ 145 - 43
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/transportAppoint.vue

@@ -28,14 +28,10 @@
         >
           <el-table-column
             fixed="right"
-            align="center"
             label="操作"
             width="120"
           >
             <template slot-scope="scope">
-              <!-- <el-button @click="updateClick(scope.row.orderId)" type="text" size="small">
-                修改
-              </el-button> -->
               <el-button @click="deleteClick(scope)" type="text" size="small">
                 删除
               </el-button>
@@ -45,102 +41,208 @@
       </el-tab-pane>
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2"> </dilTable>
+        <dilTable v-bind.sync="option2">
+          <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="stopSpoOrder(scope)" type="text" size="small">
+                停止
+              </el-button>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+       <!-- 已接单 -->
+      <el-tab-pane label="已接单" name="third">
+        <dilTable v-bind.sync="option3">
+        </dilTable>
       </el-tab-pane>
     </el-tabs>
   </div>
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "inplantTMS",
   data() {
     return {
-      input: "",
+      input: null,
       Time: "",
       activeName: "first",
       option1: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getSporadicOrdersList?apiId=427&issueStatus=0&orderType=12",
+          "",
         // 控制显示多选列
         selectionType: "select",
       },
       option2: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getSporadicOrdersList?apiId=427&issueStatus=1&orderType=12",
+          "",
+      },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
       },
       selection: [],
+      maplist:[]
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0",
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12",
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1"       
+      }else{
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode"),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&userId=" + getCookie("orgCode"),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
+    getRequestUrl(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&test=" + new Date(),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&test=" + new Date()
+      }else{
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode") + "&test=" + new Date()
+     }
+    },
+    stopSpoOrder(scope){
+      this.$confirm("是否停止", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/ams/closeSporadicOrder" ,{
+              sporadicOrderId : scope.row.sporadicOrderId
+            })
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "成功停止!",
+                });
+              this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "停止失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "停止操作已取消!",
+          });
+        });
+    },
     //获取选中的订单
     selectionChange(selection) {
       this.maplist = selection;
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12&con=" +
-          this.input;
-      } else {
-        this.option2.requestUrl =
-          "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&con=" +
-          this.input;
-      }
+      if(this.input != null){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu")
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&con=" + this.input
+          }else if(this.activeName == "second"){
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&con=" + this.input
+          }                
+        }else
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }else if(this.activeName == "second"){
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }       
+        }
+        }else{
+        this.$message.warning("未输入查询条件")
+        }
     },
     handleClick(tab, event) {
-      console.log(tab, event);
-    }, // 下发
+      this.getRequestUrl()
+    },
     // 下发
     sendClick() {
-      console.log(this.maplist);
+      if(this.maplist.length == 0){
+        this.$message.warning('未选择零星订单')
+        return
+      }
       this.axios
         .post("/api/v1/ams/issueSporadicOrders", this.maplist)
         .then((res) => {
           if (res.data.code == "200") {
-            this.option1.requestUrl =
-              "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12&test=1"
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&test=1"
+            this.getRequestUrl()
+            // this.$router.go(0)
             this.$message({
               type: "success",
               message: "下发成功!",
             });
+            this.maplist = []
           }
         });
     },
     // 删除
     deleteClick(scope) {
-      console.log(scope.row.sporadicOrderId);
-      this.axios
-        .post(
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+          .post(
           "/api/v1/ams/deleteSporadicOrders?sporadicOrderId=" +
             scope.row.sporadicOrderId
-        )
-        .then((res) => {
-          if (res.data.code == "200") {
-            this.option1.requestUrl =
-              "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12&test=1";
-            this.option2.requestUrl =
-            "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&test=1"
-            this.$message({
-              type: "success",
-              message: "删除成功!",
+            )
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "成功删除!",
+                });
+              this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
             });
-          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
         });
     },
     //新增
     insertClick() {
       this.$router.push("addSporadicTransportAppoint");
     },
-    //修改
-    updateClick(orderId) {
-      this.$router.push(
-        "/importedIngredients/transportReserveFuEdit/" + orderId
-      );
-    },
   },
 };
 </script>

+ 295 - 1
src/views/SporadicManage/components/sporadicMaterial/transportOrder/addTransportOrder.vue

@@ -1 +1,295 @@
-//新增运输派单
+//新增运输派单
+//新增运输订单
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增运输订单派车</page-title>
+    <!-- 零星订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable
+        v-bind.sync="option"
+        @radio-change="currentRadioChange"
+      ></dilTable>
+    </div>
+    <!-- 表单选择车辆-->
+    <div class="from">
+      <div class="vehicle">
+        <span class="text">车辆</span>
+        <el-button type="primary" @click="onClick(2)">浏览</el-button>
+        <span class="span"></span>
+      </div>
+    </div>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="deleteRow(scope.$index)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 车辆模态框 -->
+    <el-drawer 
+      :visible.sync="truckDrawer" 
+      :with-header="false"
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :show-close="false"
+      :wrapperClosable="false"
+      modal
+      close-on-press-escape
+    
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="truckText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的车辆 -->
+        <dilTable
+          v-bind.sync="truck"
+          @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>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      disabled:false,
+      //零星订单ID
+      sporadicOrderId:null,
+      //运输订单ID
+      orderId:null,
+      //线路名称
+      lineName:null,
+      //已经选择车辆物资信息
+      selectionList:[],
+      //销售订单物资信息
+      option: {
+        // 表格请求数据的地址
+        requestUrl:"",
+        // 控制显示当选列
+        selectionType: "radio",
+        isPagination: false,
+      },
+      //当前选中的物资id
+      materialId: null,
+      //当前选中的物资名称
+      materialName: null,   
+      //是否打开选择车辆的模态框
+      truckDrawer:false,
+      //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "select",
+      },
+      tableTop: [
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+        }
+      ],
+      truckText:null,
+      //当前多选选中的车辆
+      selectTruck:[],
+    };
+  },
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&dispatchStatus=0&carrierSsoId=" + getCookie("userId");
+    } else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&dispatchStatus=0&sporadicStatus=0";
+    } else{
+        this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&dispatchStatus=0&sporadicStatus=0&userId=" + getCookie("orgCode");
+    }
+  },
+  methods: {
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量请输入数字')
+      }
+    },
+    //点击确定按钮的事件
+    makeSure(){
+       console.log(this.selectionList)
+        this.disabled = true
+        console.log(this.orderId)
+        if(this.orderId == 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/ams/addSporadicOrderTimes',{
+          orderId:this.orderId,
+          sporadicOrderId:this.sporadicOrderId,
+          mapList:this.selectionList,
+        }).then((res)=>{
+          if(res.data.code == '200'){
+            this.$message.success('派车成功')
+            this.disabled = false
+            this.cancel();
+          }
+        })
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/sporadicTransportOrder')
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index){
+      this.selectionList.splice(index,1)
+    },
+    //车辆模态框的确定事件
+    AddTruckClick(){
+      this.selectTruck.forEach(e => {
+        this.selectionList.push({
+          capacityId:e.capacityId,
+          capacityNumber:e.capacityNumber,
+        })
+      });
+      this.truckDrawer = false;
+    },
+    //车辆模态框框计算
+    selectTruckClick(){
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          getCookie("userId") + "&index="+this.truckText;
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
+      }
+    },
+    //车辆表格
+    currentRadioChange1(select){
+      this.selectTruck = [];
+      this.selectTruck = select;
+    },
+    //主界面表格单选
+    currentRadioChange(row) {
+      console.log(row)
+      this.sporadicOrderId = row.sporadicOrderId
+      this.orderId = row.orderId
+    },
+    onClick() {
+      if(getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId") + "&t=" + new Date();
+    } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + + "&t=" + new Date();;
+    } 
+      this.truckDrawer = true
+    },
+  },
+};
+</script>
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 159 - 277
src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue

@@ -6,94 +6,64 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="Issue" v-if="activeName == 'option'">
-        <i class="el-icon-download"></i>下发
+      <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
+        <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
+    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
+    <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>
+    </span>
+    </el-dialog>
     <div class="transportOrder_bottom">
-      <el-tabs v-model="activeName">
-        <!-- 未下发 -->
-        <el-tab-pane label="未下发" name="option">
-          <dilTable
-            v-bind.sync="option"
-            ref="table"
-            @selection-change="selectionChange"
-          >
-            <el-table-column fixed="right" label="操作" width="150">
-              <template slot-scope="scope">
-                <el-button @click="detailclick(scope.row)" type="text">
-                  物资详情
-                </el-button>
-                <el-button
-                  type="text"
-                  @click="addTruck(scope.row, 1)"
-                  v-if="!scope.row.capacityNumber"
-                >
-                  添加运力
-                </el-button>
-                <el-button type="text" @click="addTruck(scope.row, 2)" v-else>
-                  修改
-                </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">
-                      <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 v-model="activeName" @tab-click="handleClick">
         <!-- 已下发 -->
-        <el-tab-pane label="已下发" name="first">
+        <el-tab-pane label="未接收" name="first">
           <dilTable v-bind.sync="first">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+               <el-button @click="updateClick(scope)" type="text" size="small">
+                修改
+              </el-button>
+             <el-button @click="deleteClick(scope)" type="text" size="small">
+                删除
+              </el-button>
+            </template>
+          </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 已接收 -->
         <el-tab-pane label="已接收" name="Received">
           <dilTable v-bind.sync="Received">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="deleteClick(scope)" type="text" size="small">
+                关闭
+              </el-button>
+            </template>
+          </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+         <!-- 已完成 -->
+        <el-tab-pane label="已完成" name="completed">
+          <dilTable v-bind.sync="completed">
           </dilTable>
         </el-tab-pane>
       </el-tabs>
-    </div>
-    <el-drawer
-      title="请选择车辆信息"
-      :visible.sync="drawer"
-      :direction="direction"
-      :destroy-on-close="true"
-      :before-close="handleClose"
-    >
-      <div class="drawer_top">
-        <el-input placeholder="请输入内容" v-model="inputText" clearable>
-        </el-input>
-        <el-button type="primary" class="btn" @click="inputClick">
-          <i class="el-icon-search"></i>查询
-        </el-button>
-      </div>
-      <div class="drawer_bottom">
-        <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange"
-        ></dilTable>
-      </div>
-    </el-drawer>
+    </div> 
   </div>
 </template>
 
@@ -106,21 +76,14 @@ export default {
       //模态窗的框计算
       inputText: null,
       //是否弹出对话框
-      dialogVisible: false,
+      dialogTableVisible: false,
       //输入框的值
       input: "",
       //选项卡的当前选中的值
-      activeName: "option",
-      //未下发的表格
-      option: {
-        requestUrl:
-          "" ,
-        selectionType: "select",
-      },
+      activeName: "first",
       //已下发的表格
       first: {
-        requestUrl:
-          "" ,
+        requestUrl:"",
       },
       //车辆信息的表格
       truck: {
@@ -131,16 +94,16 @@ export default {
       Received:{
         requestUrl: "",
       },
-      oldRow:"",
-      oldRowCount:1,
-      oldRow1:"",
-      oldRowCount1:1,
-      oldRow2:"",
-      oldRowCount2:1,
+      completed:{
+        requestUrl:"",
+      },
+       //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "radio",
+      },
       //物资信息的数据
       tableData: [],
-      tableData1:[],
-      tableData2:[],
       //物资信息的表头
       tableHead: [
         {
@@ -169,6 +132,8 @@ export default {
       drawer: false,
       //模态框从左往右打开
       direction: "rtl",
+
+      orderId:null,
       //多选的选中的订单id
       selectionList: [],
       //区别点击的是添加运力,还是修改
@@ -176,125 +141,119 @@ export default {
     };
   },
   created(){
-    this.createdLike()
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+      } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+      }
+      if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId"),
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId")
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4"
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5"
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2"
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode")
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode")
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode")
+      }
   },
   methods: {
-    createdLike(){
-        if(getCookie("orgCode") == "chengyunshang"){
-        this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-        getCookie("userId");
-        this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + getCookie("userId") 
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") 
-        this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + getCookie("userId")
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId") 
-    }else{
-        this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null ;
-        this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3" 
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4" 
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5" 
-    }      
-    },
     handleClose(done){
-      if(this.capacityId == null){
-        done();
+      done()
+      this.$message.info("取消修改运力")
+    },
+    getRequestUrl(){
+        if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date() ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId") + "&test=" + new Date()
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4" + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5" + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2" + "&test=" + new Date()
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode") + "&test=" + new Date()
       }
-      else{
-        this.determine();
-        done();
-      }      
     },
-    //下发
-    Issue() {
-      if (this.selectionList.length == 0) {
-        this.$message({
-          message: "请选择订单!",
-          type: "warning",
-        });
+    getTruckRequestUrl(){
+        if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId") + "&test=" + new Date();
       } else {
-        this.selectionList.forEach((e) => {
-          if (!e.capacityNumber) {
-            this.$message({
-              message: "订单号为: " + e.orderNumber + "没有车牌号!",
-              type: "warning",
-            });
-          } else {
-            this.axios.post("/api/v1/oms/dispatchOrder",{mapList:this.selectionList}).then((res) => {
-              if (res.data.code == "200") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+      }
+    },
+    currentRadioChange1(row){
+      console.log(row)
+      this.capacityId = row.capacityId
+    },
+     //删除运输订单
+    deleteClick(scope){
+      this.$confirm('是否删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+            this.axios
+            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
+            .then((res) => {
+              if (res.data.code == 200) {
                 this.$message({
-                  message: "下发成功",
                   type: "success",
+                  message: "删除成功!",
+                });     
+                this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
                 });
-               this.first.requestUrl = this.first.requestUrl + "&test=1" 
-               this.option.requestUrl = this.option.requestUrl + "&test=1" 
-               this.Received.requestUrl = this.Received.requestUrl + "&test=1" 
-               this.truck.requestUrl = this.truck.requestUrl + "&test=1" 
               }
             });
-          }
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
         });
-      }
     },
-    //对话框点击确定,执行增加车牌号
-    determine() {
-      this.axios
-        .post("/api/v1/oms/updateOmstruckOrder", {
-          orderId: this.selectOrderId,
-          capacityId: this.capacityId,
-        })
-        .then((res) => {
-          if (res.data.code == "200") {
-            if (this.index == 1) {
-              this.$message({
-                message: "添加成功!",
-                type: "success",
-              });
-               this.first.requestUrl = this.first.requestUrl + "&test=1" 
-               this.option.requestUrl = this.option.requestUrl + "&test=1" 
-               this.Received.requestUrl = this.Received.requestUrl + "&test=1" 
-               this.truck.requestUrl = this.truck.requestUrl + "&test=1" 
-            } else if (this.index == 2) {
-              this.$message({
-                message: "修改成功!",
-                type: "success",
-              });
-              this.first.requestUrl = this.first.requestUrl + "&test=1" 
-              this.option.requestUrl = this.option.requestUrl + "&test=1" 
-              this.Received.requestUrl = this.Received.requestUrl + "&test=1" 
-              this.truck.requestUrl = this.truck.requestUrl + "&test=1" 
-            }
-           
-          }
-        });
-    },
-    //多选的选中的数据
-    selectionChange(selection) {
-      this.selectionList = [];
-      selection.forEach((element) => {
-        this.selectionList.push({
-          orderId: element.orderId,
-          capacityNumber: element.capacityNumber,
-          orderNumber: element.orderNumber,
-        });
-      });
+    //修改运输订单
+    updateClick(scope){
+      this.getTruckRequestUrl()
+      this.orderId = scope.row.orderId
+      this.dialogTableVisible = true
+      console.log(scope.row.orderId)
     },
-    //单选按钮选中的值
-    currentRadioChange(row) {
-      this.capacityId = row.capacityId;
-      this.capacityNumber = row.capacityNumber;
+    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("修改运力失败")
+          }
+        })
     },
-    //弹出消息窗口
-    addTruck(row, index) {
-      this.index = index;
-      if (index == 1) {
-        this.selectOrderId = row.orderId;
-        this.drawer = true;
-      } else if (index == 2) {
-        this.selectOrderId = row.orderId;
-        this.capacityNumber = row.capacityNumber;
-        this.drawer = true;
-      }
+    handleClick(tab, event) {
+      this.getRequestUrl()
     },
     // 查看物资详情
     detailclick(row) {
@@ -321,86 +280,6 @@ export default {
       this.oldRow = row;
       this.materialDetails(row.orderId);
     },
-    // 查看物资详情
-    detailclick1(row) {
-      console.log(row)
-      // 记录重复点击次数
-      if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
-        if (this.oldRow1 != row) {
-          if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow1);
-          } else {
-            this.oldRowCount1 = 1;
-          }
-        } else {
-          this.oldRow1 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow1 = row;
-      this.axios
-        .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + row.orderId)
-        .then((res) => {
-          if (res.data.code == "200") {
-            this.tableData1 = res.data.data;
-          }
-        });
-
-    },
-    // 查看物资详情
-    detailclick2(row) {
-      // 记录重复点击次数
-      if (this.oldRow2 === row) {
-        this.oldRowCount2 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table2.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow2 != "") {
-        if (this.oldRow2 != row) {
-          if (this.oldRowCount2 % 2 === 1) {
-            this.$refs.table2.toggleRowExpansion(this.oldRow);
-          } else {
-            this.oldRowCount2 = 1;
-          }
-        } else {
-          this.oldRow2 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow2 = row;
-      this.axios
-        .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + row.orderId)
-        .then((res) => {
-          if (res.data.code == "200") {
-            this.tableData2 = res.data.data;
-          }
-        });
-    },
-    //框计算
-    onclick() {
-      if(this.inputText != null){
-        if(this.activeName == 'first'){
-        this.first.requestUrl = this.first.requestUrl + "&con=" + this.inputText
-      }else if(this.activeName = 'option'){
-        this.option.requestUrl = this.option.requestUrl + "&con=" + this.inputText
-      }else if(this.activeName = 'Received'){
-        this.Received.requestUrl = this.Received.requestUrl + "&con=" + this.inputText
-      }else{
-        this.truck.requestUrl = this.truck.requestUrl + "&con=" + this.inputText
-      }
-      }else{
-        this.createdLike()
-      } 
-    },
     //查看当前订单的物资信息
     materialDetails(orderId) {
       this.axios
@@ -411,6 +290,9 @@ export default {
           }
         });
     },
+    Insert(){
+      this.$router.push("addSporadicTransportOrder")
+    }
   },
 };
 </script>

+ 0 - 0
src/views/SporadicManage/components/sporadicMaterial/transportPlan/addTransportPlan.vue


+ 235 - 0
src/views/SporadicManage/components/sporadicMaterial/transportPlan/transportPlan.vue

@@ -0,0 +1,235 @@
+//运输预约展现
+<template>
+  <!-- 零星物资运输预约 -->
+  <div class="homeworkPath">
+    <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>
+      <el-button
+        type="primary"
+        @click="sendClick()"
+        v-if="this.activeName == 'first'"
+      >
+        <i class="el-icon-bottom"></i>下发
+      </el-button>
+    </div>
+<el-dialog title="选择承运商" :visible.sync="dialogFormVisible">
+    <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-form-item>
+        </el-form>
+  <div slot="footer" class="dialog-footer">
+    <el-button @click="dialogFormVisible = false">取 消</el-button>
+    <el-button type="primary" @click="makeSure">确 定</el-button>
+  </div>
+</el-dialog>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 未下发 -->
+      <el-tab-pane label="未下发" name="first">
+        <dilTable
+          v-bind.sync="option1"
+          ref="table"
+          @selection-change="selectionChange"
+        >
+          <el-table-column
+            fixed="right"
+            label="操作"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <el-button @click="addClick(scope,1)" type="text" size="small">
+                添加
+              </el-button>
+               <el-button @click="addClick(scope,2)" type="text" size="small">
+                修改
+              </el-button>
+            </template>
+          </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已下发 -->
+      <el-tab-pane label="已下发" name="second">
+        <dilTable v-bind.sync="option2">
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "inplantTMS",
+  data() {
+    return {
+      index:null,
+      likeCarrierLike:'',
+      restaurantsCarrier: [],
+      stateCarrier:null,
+      dialogFormVisible: false,
+      input: null,
+      Time: "",
+      sporadicOrderId:null,
+      activeName: "first",
+      option1: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+        // 控制显示多选列
+        selectionType: "select",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+      },
+      selection: [],
+      maplist:[]
+    };
+  },
+  created(){
+        this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&orderType=15&issueStatus=1&sporadicStatus=3",
+        this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&sporadicStatus=1&userIds=" + getCookie("userId")        
+  },
+  methods: {
+    makeSure(){
+        console.log(this.carrierId)
+        this.axios.post("/api/v1/ams/addInwardSporadicOrder",{
+            sporadicOrderId:this.sporadicOrderId,
+            carrierId:this.carrierId,
+            userId:getCookie("userId")
+        }).then((res) => {
+            if(res.data.code == '200'){
+                console.log(res)
+                this.sporadicOrderId = null
+                this.carrierId = null
+                if(this.index == 1){
+                    this.$message.success("添加成功")
+                }else{
+                    this.$message.success("修改成功")
+                }
+            }
+        })
+        this.dialogFormVisible = false
+    },
+    selectionChange(selection){
+
+    },
+    addClick(scope,index){
+        console.log(index)
+        this.index = index
+        this.sporadicOrderId = scope.row.sporadicOrderId
+        console.log(scope.row.sporadicOrderId)
+        this.dialogFormVisible = true
+    },
+    getRequestUrl(){
+      if(getCookie("orgCode") == "dagangadmin"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&test=" + new Date()
+            console.log(this.option1.requestUrl)
+            console.log(this.option2.requestUrl)
+      }else{
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&userId=" + getCookie("userId") + "&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&userId=" + getCookie("userId") + "&test=" + new Date()
+            console.log(this.option1.requestUrl)
+            console.log(this.option2.requestUrl)
+     }
+    },
+    //承运商弹出层
+    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);
+        }
+        })     
+      },
+    createFilterCarrier(queryString) {
+        return (restaurantsCarrier)  =>  {
+          return (restaurantsCarrier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //以上是承运商边输边查搜索
+    onclick() {
+      if(this.input != null){
+        if(getCookie("orgCode") == "dagangadmin")
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&con=" + this.input
+          }else{
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&con=" + this.input
+          }                
+        }else
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=15&dispatchStatus=0&userId=" + getCookie("userId") + "&con=" + this.input
+          }else{
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&userId=" + getCookie("userId") + "&con=" + this.input
+          }       
+        }
+        }else{
+        this.$message.warning("未输入查询条件")
+        }
+    },
+    handleClick(tab, event) {
+    //   this.getRequestUrl()
+    },
+    // 下发
+    sendClick() {
+      if(this.maplist.length == 0){
+        this.$message.warning('未选择零星订单')
+        return
+      }
+      this.axios
+        .post("/api/v1/ams/issueSporadicOrders", this.maplist)
+        .then((res) => {
+          if (res.data.code == "200") {
+            this.$router.go(0)
+            this.$message({
+              type: "success",
+              message: "下发成功!",
+            });
+            this.maplist = []
+          }
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 40px;
+    .el-input {
+      width: 250px;
+      margin-right: 20px;
+    }
+  }
+}
+</style>

+ 6 - 0
src/views/SporadicManage/router/index.js

@@ -10,6 +10,9 @@ import main from '@/components/main.vue'
 import sporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/transportAppoint.vue'
 import addSporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue'
 import editSporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/editTransportAppoint.vue'
+//内转零星运输计划
+import addSporadicTransportPlan from '../components/sporadicMaterial/transportPlan/addTransportPlan.vue'
+import sporadicTransportPlan from '../components/sporadicMaterial/transportPlan/transportPlan.vue'
 //零星物资运输派单
 import sporadicTransportOrder from '../components/sporadicMaterial/transportOrder/transportOrder.vue'
 import addSporadicTransportOrder from '../components/sporadicMaterial/transportOrder/addTransportOrder.vue'
@@ -78,6 +81,9 @@ const constantRouterMap = [
       {path:'addSporadicTransportAppoint',name:'addSporadicTransportAppoint',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportAppoint},
       {path:'sporadicTransportAppoint',name:'sporadicTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportAppoint},
       {path: 'editSporadicTransportAppoint', name: 'editSporadicTransportAppoint', meta: {code: 'xtpzgl-yhgl'}, component: editSporadicTransportAppoint},
+      //内转零星运输计划
+      {path:'addSporadicTransportPlan',name:'addSporadicTransportPlan',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportPlan},
+      {path:'sporadicTransportPlan',name:'sporadicTransportPlan',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportPlan},
       //零星物资运输订单
       {path:'addSporadicTransportOrder',name:'addSporadicTransportOrder',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportOrder},
       {path:'sporadicTransportOrder',name:'sporadicTransportOrder',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportOrder},

+ 2 - 2
src/views/TMS/components/importedFuel/transportReserveRan.vue

@@ -102,14 +102,14 @@ export default {
         "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
         getCookie("userId");
       this.option2.requestUrl =
-        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=&carrierSSOId=" +
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
         getCookie("userId");
     } else {
       this.option1.requestUrl =
         "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
         null;
       this.option2.requestUrl =
-        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=&carrierSSOId=" +
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
         null;
     }
   },

+ 126 - 46
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -29,6 +29,12 @@
       <el-input class="input" v-model="lineName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
     </div>
+    <div class="lineId from">
+      <span class="text">采购订单号:</span>
+      <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(6)" v-if="materialId && supplierId">浏览</el-button>
+      <span v-else class="span"></span>
+    </div>
     <div class="orderType from">
       <span class="text">订单类别:</span>
       <el-select
@@ -58,6 +64,14 @@
         >
       </div>
     </div>
+    <div class="lineId from">
+      <span class="text">该批车辆是否一车多趟:</span>
+      <el-switch
+        v-model="isMoreTrips"
+        active-text="是"
+        inactive-text="否">
+      </el-switch>
+    </div>
     <div class="truckListTable">
       <el-table
         :data="selectionList"
@@ -112,38 +126,62 @@
           style="margin-top: 10px; margin-right: 10px; width: 250px"
           clearable
         ></el-input>
-        <el-button type="primary" class="btn" @click="onclick(a)">
+        <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>查询
         </el-button>
       </div>
-      <div v-show="a == 1">
+      <div v-show="onDrawerNumber == 1">
         <dilTable
           v-bind.sync="frist"
           @radio-change="currentRadioChange1"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 2">
+      <div v-show="onDrawerNumber == 2">
         <dilTable
           v-bind.sync="secend"
           @radio-change="currentRadioChange2"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 3">
+      <div v-show="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 4">
+      <div v-show="onDrawerNumber == 4">
         <dilTable
           v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 5">
+      <div v-show="onDrawerNumber == 5">
         <dilTable
           v-bind.sync="line"
           @radio-change="currentRadioChange5"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
+        ></dilTable>
+      </div>
+      <div v-show="onDrawerNumber == 6">
+        <dilTable
+          v-bind.sync="purchaseOrder"
+          @radio-change="currentRadioChange6"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
     </el-drawer>
@@ -161,6 +199,10 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isKuang:false,
+      //采购订单号
+      purchaseOrderNo:'',
+      isMoreTrips:false,
       //订单类别
       orderTypeList: [
         {
@@ -220,11 +262,11 @@ export default {
       unloadPointName: "",
       //订单类别
       orderType: null,
-      a: 1,
+      onDrawerNumber: 1,
       direction: "rtl",
       input: "",
       frist: {
-        requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
+        requestUrl: "",
         selectionType: "radio",
         mapList1: [],
       },
@@ -247,11 +289,15 @@ export default {
         requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
         selectionType: "radio",
       },
+      purchaseOrder:{
+        requestUrl: "/api/v1/ams/getPurchaseOrderList?apiId=81",
+        selectionType: "radio",
+      }
     };
   },
   watch: {
     drawer(val) {
-      if (!val) {
+      if (val) {
         this.input = null;
       }
     },
@@ -296,7 +342,7 @@ export default {
               console.log();
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
-              this.form1 = { purchaseOrderNo: res.data.data.purchaseOrderNo };
+              this.purchaseOrderNo=res.data.data.purchaseOrderNo;
               if (res.data.data.receiveUnitId == 1) {
                 this.orderType = 6;
               } else {
@@ -309,47 +355,71 @@ export default {
         });
       }
     },
-    onclick(a) {
-      if (a == 1) {
-        this.frist.requestUrl =
-          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-          this.input;
-      } else if (a == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId +
-          "&index=" +
-          this.input;
-      } else if (a == 3) {
-        //判断是否是承运商查询车辆
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            getCookie("userId") +
-            "&index=" +
-            this.input;
-        } else {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            null +
-            "&index=" +
-            this.input;
+    func(res){
+      this.isKuang = false;
+    },
+    onclick() {
+      if(this.input){
+        this.isKuang = true;
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" + this.input;
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId + "&index=" + this.input;
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&index=" + this.input;
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index=" + this.input;
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl =  "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
+        } else if (this.onDrawerNumber == 5) {
+          this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&con=" + this.input+"&i="+new Date();
+        }
+      }else{
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050"
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId;
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId");
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null;
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl =  "/api/v1/uc/getUnloadingMesByLike?apiId=374";
+        } else if (this.onDrawerNumber == 5) {
+          this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3";
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81";
         }
-      } else if (a == 4) {
-        this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
-      } else if (a == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
       }
     },
     ondrawer(num) {
+      this.onDrawerNumber = num;
       this.drawer = true;
-      this.a = num;
-      if (num == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId;
+      if(num == 1){
+        this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050"
+      }else if (num == 2) {
+        this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId;
+      } else if (num == 3) {
+        //判断是否是承运商查询车辆
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&i=" + new Date();
+        } else {
+          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null  + "&i=" + new Date();
+        }
+      } else if (num == 4) {
+        this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
+      } else if (num == 5) {
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+      }else if (num == 6) {
+        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i=" + new Date();
       }
     },
     // 返回
@@ -374,6 +444,10 @@ export default {
       this.lineName = selection.lineName;
       this.lineId = selection.lineId;
     },
+    currentRadioChange6(selection) {
+      this.purchaseOrderNo = selection.purchaseOrderNo;
+      this.purchaseOrderId = selection.purchaseOrderId;
+    },
     currentRadioChange3(selection) {
       this.selectionList = [];
       this.selectionList = selection;
@@ -465,6 +539,7 @@ export default {
           driverCapacityIdList: this.selectionList,
           orderType: this.orderType,
           lineId: this.lineId,
+          isMoreTrips:this.isMoreTrips,
         };
         console.log(map, map);
         this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
@@ -517,6 +592,11 @@ export default {
     width: 250px;
     margin-right: 20px;
   }
+  .span{
+    display: inline-block;
+    width: 70px;
+    height: 1px;
+  }
 }
 .material {
   display: flex;

+ 81 - 28
src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue

@@ -12,13 +12,17 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" class="btn" @click="clickClose" v-if="activeName == 'option'">
+        <i class="el-icon-close"></i>关闭
+      </el-button>
     </div>
     <el-tabs v-model="activeName">
-      <!-- 未下发 -->
+      <el-tab-pane label="未接收" name="option">
+        <dilTable v-bind.sync="option" @selection-change="selectionChange"> </dilTable>
+      </el-tab-pane>
       <el-tab-pane label="已接收" name="first">
-        <dilTable v-bind.sync="option1" ref="table"> </dilTable>
+        <dilTable v-bind.sync="option1"> </dilTable>
       </el-tab-pane>
-      <!-- 已下发 -->
       <el-tab-pane label="已拒绝" name="second">
         <dilTable v-bind.sync="option2"> </dilTable>
       </el-tab-pane>
@@ -34,49 +38,98 @@ export default {
     return {
       input: "",
       Time: "",
-      activeName: "first",
+      activeName: "option",
+      option: {
+        // 表格请求数据的地址
+        requestUrl:"",
+        selectionType: "select",
+      },
       option1: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5",
+        requestUrl:"",
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6",
+        requestUrl:"",
       },
+      list:[],
     };
   },
+  watch:{
+    activeName(val){
+      if (getCookie("orgCode") == "chengyunshang") {
+        if(val == "option"){
+          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
+        }else if(val == "first"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+        }else if(val == "second"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+        }
+      }else{
+        if(val == "option"){
+          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
+        }else if(val == "first"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+        }else if(val == "second"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+        }
+      }
+      
+    }
+  },
   created() {
     //判断是否是承运商
     if (getCookie("orgCode") == "chengyunshang") {
-      this.option1.requestUrl =
-        "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" +
-        getCookie("userId");
-      this.option2.requestUrl =
-        "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&carrierSSOId=" +
-        getCookie("userId");
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + getCookie("userId");
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + getCookie("userId");
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + getCookie("userId");
     } else {
-      this.option1.requestUrl =
-        "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" +
-        null;
-      this.option2.requestUrl =
-        "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&carrierSSOId=" +
-        null;
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + null;
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + null;
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + null;
     }
   },
   methods: {
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" +
-          this.input;
-      } else {
-        this.option2.requestUrl =
-          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" +
-          this.input;
+    if (getCookie("orgCode") == "chengyunshang") {
+       if(this.activeName == "option"){
+        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
+      }else if (this.activeName == "first") {
+        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
+      } else if (this.activeName == "second") {
+        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
+      }
+    }else{
+      if(this.activeName == "option"){
+        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
+      }else if (this.activeName == "first") {
+        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
+      } else if (this.activeName == "second") {
+        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
       }
+    }
+      
     },
+    clickClose(){
+      console.log(this.list)
+      if(this.list.length == 0){
+        this.$message.warning('请选择订单之后在关闭')
+      }else{
+        this.axios.post('/api/v1/oms/deleteOrders',{list:this.list}).then((res)=>{
+          if(res.data.code == "200"){
+            this.$message.success('关闭成功')
+            this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date();
+          }
+        })
+      }
+
+    },
+    selectionChange(selection){
+      this.list = [],
+      selection.forEach(e => {
+        this.list.push(e.orderId)
+      });
+    }
   },
 };
 </script>

+ 3 - 1
src/views/TMS/components/purchase/addShipPrice.vue

@@ -25,7 +25,9 @@ export default {
     };
   },
   created(){
-    this.form1.priceDate = new Date();
+    this.form1 = {
+      priceDate:new Date(),
+    }
   },
   methods: {
     // 确定

+ 3 - 1
src/views/TMS/components/purchase/addTruckPrice.vue

@@ -24,7 +24,9 @@ export default {
     };
   },
   created(){
-    this.form1.priceDate = new Date();
+    this.form1 = {
+      priceDate:new Date()
+    }
   },
   methods: {
     // 确定

+ 130 - 53
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -1,6 +1,6 @@
-//采购化工材料运输预约新增
 <template>
-  <div id="transportationReservationAdd">
+  <!-- 新增运输作业页面 -->
+  <div id="contractDetails">
     <page-title>运输预约</page-title>
 
     <div class="material from">
@@ -29,6 +29,12 @@
       <el-input class="input" v-model="lineName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
     </div>
+    <div class="lineId from">
+      <span class="text">采购订单号:</span>
+      <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(6)" v-if="materialId && supplierId">浏览</el-button>
+      <span v-else class="span"></span>
+    </div>
     <div class="orderType from">
       <span class="text">订单类别:</span>
       <el-select
@@ -58,6 +64,14 @@
         >
       </div>
     </div>
+    <div class="lineId from">
+      <span class="text">该批车辆是否一车多趟:</span>
+      <el-switch
+        v-model="isMoreTrips"
+        active-text="是"
+        inactive-text="否">
+      </el-switch>
+    </div>
     <div class="truckListTable">
       <el-table
         :data="selectionList"
@@ -112,38 +126,62 @@
           style="margin-top: 10px; margin-right: 10px; width: 250px"
           clearable
         ></el-input>
-        <el-button type="primary" class="btn" @click="onclick(a)">
+        <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>查询
         </el-button>
       </div>
-      <div v-show="a == 1">
+      <div v-show="onDrawerNumber == 1">
         <dilTable
           v-bind.sync="frist"
           @radio-change="currentRadioChange1"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 2">
+      <div v-show="onDrawerNumber == 2">
         <dilTable
           v-bind.sync="secend"
           @radio-change="currentRadioChange2"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 3">
+      <div v-show="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 4">
+      <div v-show="onDrawerNumber == 4">
         <dilTable
           v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 5">
+      <div v-show="onDrawerNumber == 5">
         <dilTable
           v-bind.sync="line"
           @radio-change="currentRadioChange5"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
+        ></dilTable>
+      </div>
+      <div v-show="onDrawerNumber == 6">
+        <dilTable
+          v-bind.sync="purchaseOrder"
+          @radio-change="currentRadioChange6"
+          :isKuang="isKuang"
+          @func="func"
+          :drawer="drawer"
         ></dilTable>
       </div>
     </el-drawer>
@@ -161,6 +199,10 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isKuang:false,
+      //采购订单号
+      purchaseOrderNo:'',
+      isMoreTrips:false,
       //订单类别
       orderTypeList: [
         {
@@ -220,7 +262,7 @@ export default {
       unloadPointName: "",
       //订单类别
       orderType: null,
-      a: 1,
+      onDrawerNumber: 1,
       direction: "rtl",
       input: "",
       frist: {
@@ -247,8 +289,19 @@ export default {
         requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
         selectionType: "radio",
       },
+      purchaseOrder:{
+        requestUrl: "/api/v1/ams/getPurchaseOrderList?apiId=81",
+        selectionType: "radio",
+      }
     };
   },
+  watch: {
+    drawer(val) {
+      if (val) {
+        this.input = null;
+      }
+    },
+  },
   created() {
     if (getCookie("orgCode") == "chengyunshang") {
       this.third.requestUrl =
@@ -286,9 +339,10 @@ export default {
               });
               this.form1 = [];
             } else {
+              console.log();
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
-              this.form1 = { purchaseOrderNo: res.data.data.purchaseOrderNo };
+              this.purchaseOrderNo=res.data.data.purchaseOrderNo;
               if (res.data.data.receiveUnitId == 1) {
                 this.orderType = 17;
               } else {
@@ -301,59 +355,68 @@ export default {
         });
       }
     },
-    onclick(a) {
-      if (a == 1) {
-        this.frist.requestUrl =
-          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-          this.input;
-      } else if (a == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId +
-          "&index=" +
-          this.input;
-      } else if (a == 3) {
-        //判断是否是承运商查询车辆
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            getCookie("userId") +
-            "&index=" +
-            this.input;
-        } else {
-          this.third.requestUrl =
-            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
-            null +
-            "&index=" +
-            this.input;
+    onclick() {
+      if(this.input){
+        this.isKuang = true;
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" + this.input;
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId + "&index=" + this.input;
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&index=" + this.input;
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index=" + this.input;
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
+        } else if (this.onDrawerNumber == 5) {
+          this.option.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&con=" + this.input+"&i="+new Date();
+        }
+      }else{
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&i="+new Date();
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId+"&i="+new Date();
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId")+"&i="+new Date();
+          } else {
+            this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null+"&i="+new Date();
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i="+new Date();
+        } else if (this.onDrawerNumber == 5) {
+          this.option.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i="+new Date();
+        }else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i="+new Date();
         }
-      } else if (a == 4) {
-        this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
-      } else if (a == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
       }
     },
     ondrawer(num) {
-      this.input = null;
       this.drawer = true;
-      this.a = num;
+      this.onDrawerNumber = num;
       if(num == 1){
-        this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&i="+new Date();
+        this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" + this.input;
       }else if (num == 2) {
-        this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId +"&i=" +new Date();
-      }else if(num == 3){
+        this.secend.requestUrl = "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" + this.materialId;
+      } else if (num == 3) {
         //判断是否是承运商查询车辆
         if (getCookie("orgCode") == "chengyunshang") {
           this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + getCookie("userId") + "&i=" + new Date();
         } else {
-          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&i="+new Date(); 
+          this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null  + "&i=" + new Date();
         }
-      }else if(num == 4){
-        this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=347&i=" + new Date();
-      }else if(num == 5){
-        this.option.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+      } else if (num == 4) {
+        this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
+      } else if (num == 5) {
+        this.option.requestUrl ="/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+      }else if (num == 6) {
+        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i=" + new Date();
       }
     },
     // 返回
@@ -378,10 +441,18 @@ export default {
       this.lineName = selection.lineName;
       this.lineId = selection.lineId;
     },
+    currentRadioChange6(selection) {
+      this.purchaseOrderNo = selection.purchaseOrderNo;
+      this.purchaseOrderId = selection.purchaseOrderId;
+    },
     currentRadioChange3(selection) {
       this.selectionList = [];
       this.selectionList = selection;
     },
+    func(res){
+      console.log(res)
+      this.isKuang = false;
+    },
     // 确认
     onClickConfirm() {
       var state = 0;
@@ -469,6 +540,7 @@ export default {
           driverCapacityIdList: this.selectionList,
           orderType: this.orderType,
           lineId: this.lineId,
+          isMoreTrips:this.isMoreTrips,
         };
         console.log(map, map);
         this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
@@ -479,14 +551,14 @@ export default {
             });
             this.$router.push("/transportationReservation");
           }
-        }); 
+        });
       }
     },
   },
 };
 </script>
 <style lang="scss">
-.transportationReservationAdd {
+.contractDetails {
   width: 100%;
 }
 .from {
@@ -521,6 +593,11 @@ export default {
     width: 250px;
     margin-right: 20px;
   }
+  .span{
+    display: inline-block;
+    width: 70px;
+    height: 1px;
+  }
 }
 .material {
   display: flex;

+ 0 - 1
src/views/WMS/components/steel/steel_restack.vue

@@ -44,7 +44,6 @@
         </el-tabs>
       </template>
     </div>
-  </div>
 </template>
 <script>
 // import { first, values } from "xe-utils";

+ 664 - 0
src/views/appoint/components/saleContract/addSaleCokeSend.vue

@@ -0,0 +1,664 @@
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增销售订单派车</page-title>
+    <!-- 销售订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable
+        v-bind.sync="option"
+        @radio-change="currentRadioChange"
+      ></dilTable>
+    </div>
+    <!-- 表单选择车辆和线路 -->
+    <div class="from">
+      <div class="line">
+        <span class="text">线路</span>
+        <el-input
+          v-model="lineName"
+          placeholder="请选择线路"
+          disabled
+        ></el-input>
+        <el-button type="primary" @click="onClick(1)">浏览</el-button>
+      </div>
+      <div class="vehicle">
+        <span class="text">车辆</span>
+        <el-button type="primary" @click="onClick(2)">浏览</el-button>
+        <span class="span"></span>
+      </div>
+    </div>
+
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <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" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <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 == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                ></el-input>
+              </template>
+
+              <!-- 收货地址id -->
+              <template v-if="item.prop == 'saleShipperAddressName'" >
+                <el-input
+                  style="width: 200px"
+                  v-model="scope.row.saleShipperAddressName"
+                  disabled
+                >
+                </el-input>
+                <el-button
+                  type="primary"
+                  placeholder="(非必填)"
+                  @click="select(scope.$index,3)"
+                  >浏览</el-button
+                >
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="copyRow(scope.$index,scope.row)"
+              type="text"
+              size="big"
+            >
+              复制
+            </el-button>
+            <el-button
+              @click="deleteRow(scope.$index)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 线路模态框 -->
+    <el-drawer 
+      :visible.sync="drawer" 
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :wrapperClosable="false"
+      @keyup.enter.native="AddClick"
+      modal
+      close-on-press-escape
+    
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="lineText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        @keyup.enter.native="selectClick"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的路线 -->
+        <dilTable
+          v-bind.sync="line"
+          @radio-change="currentRadioChange5"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 车辆模态框 -->
+    <el-drawer 
+      :visible.sync="truckDrawer" 
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      @keyup.enter.native="AddTruckClick"
+      :wrapperClosable="false"
+      modal
+      close-on-press-escape
+    
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="truckText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        @keyup.enter.native="selectTruckClick"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的车辆 -->
+        <dilTable
+          v-bind.sync="truck"
+          @selection-change="currentRadioChange1"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 收货地址的模态框 -->
+    <el-drawer 
+      :visible.sync="addressDrawer" 
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :wrapperClosable="false"
+      modal
+      close-on-press-escape
+    
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="addressText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectAddressClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="addAddressClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的收货地址 -->
+        <dilTable
+          v-bind.sync="Address"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>
+    </el-drawer>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      //线路名称
+      lineName:null,
+      lineId:null,
+      //线路表格单选缓存数据的
+      cacheLine:{
+        ROW_ID : 0,
+        lineDesk : '',
+        lineId : 0,
+        lineName : '',
+        lineNo : '',
+        lineType : '',
+        spellNumber : 0,
+      },
+      //已经选择车辆物资信息
+      selectionList:[],
+      //销售订单物资信息
+      option: {
+        // 表格请求数据的地址
+        requestUrl:"",
+        // 控制显示当选列
+        selectionType: "radio",
+        isPagination: false,
+      },
+      //当前选中的物资id
+      materialId: null,
+      //当前选中的物资名称
+      materialName: null,
+      //选中的线路名称
+      lineName: null,
+      //选中的线路id
+      lineId: null,
+      //是否打开选择线路的模态框
+      drawer:false,
+      //是否打开选择车辆的模态框
+      truckDrawer:false,
+      //是否打开收货地址的模态框
+      addressDrawer:false,
+      //线路的表格
+      line: {
+        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        selectionType: "radio",
+      },
+      //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "select",
+      },
+      //收货地址的表格
+      Address: {
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        selectionType: "radio",
+      },
+      addressText:null,
+      //线路表格的框计算输入的值
+      lineText:null,
+      tableTop: [
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+          width: "100",
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "carrierName",
+          label: "承运商",
+          width: "220",
+        },
+        {
+          prop: "lineName",
+          label: "运输线路",
+          width: "220",
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "重量",
+          width: "140",
+          slot: true,
+        },
+        {
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsignee",
+          label: "收货客户",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsigneeTel",
+          label: "收货客户电话号码",
+          slot: true,
+          width: "150",
+        },
+      ],
+      truckText:null,
+      //当前多选选中的车辆
+      selectTruck:[],
+      //销售订单与物资表主键
+      saleMaterialId:null,
+      //记录点击的市哪一个收货地址的浏览
+      addressIndex:null,
+      //缓存当前选中的收货地址
+      addressMap:{},
+    };
+  },
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+        getCookie("userId");
+    } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null;
+    }
+    this.option.requestUrl = "/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=" + this.$route.params.saleOrderId;
+  },
+  methods: {
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+    //点击确定按钮的事件
+    makeSure(){
+      let state = false;
+      this.selectionList.forEach((e)=>{
+        if(!isNumber(e.orderPlanWeight)){
+          this.$message.error('重量请输入数字')
+        }else if(e.saleOrderConsigneeTel){
+          if(!isNumber(e.saleOrderConsigneeTel)){
+            this.$message.error('电话号码请输入数字')
+          }else{
+            e.saleOrderConsigneeTel = e.saleOrderConsigneeTel+"",
+            state = true
+          }
+        }else {
+          e.saleOrderConsigneeTel = null,
+          state = true
+        }
+      })
+      
+      if(state){
+        this.axios.post('/api/v1/ams/dispatchTruckOrderByCarrier',{
+          saleOrderId:this.$route.params.saleOrderId,
+          mapList:this.selectionList,
+        }).then((res)=>{
+          if(res.data.code == '200'){
+            this.$message.success('派车成功')
+            this.cancel();
+          }
+        })
+      }else{
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/saleCokeInward')
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index){
+      this.selectionList.splice(index,1)
+    },
+    //复制的方法
+    copyRow(index,row){
+      let arr = [];
+      for(var i = 0 ;i<this.selectionList.length; i++){
+        if(i == index){
+          arr.push(this.selectionList[i]);
+          arr.push({
+            capacityId:row.capacityId,
+            capacityNumber:row.capacityNumber,
+            carrierName:row.carrierName,
+            lineId:row.lineId,
+            lineName:row.lineName,
+            materialId:row.materialId,
+            materialName:row.materialName,
+            orderPlanWeight:row.orderPlanWeight,
+            saleMaterialId:row.saleMaterialId,
+            saleOrderConsignee:row.saleOrderConsignee,
+            saleOrderConsigneeTel:row.saleOrderConsigneeTel,
+            saleShipperAddressName:row.saleShipperAddressName,
+            saleShippingAddressId:row.saleShippingAddressId,
+          }
+          )
+        }else{
+          arr.push(this.selectionList[i]);
+        }
+      }
+      this.selectionList = [];
+      this.selectionList = arr;
+    },
+    //收货地址模态窗口的框计算
+    selectAddressClick(){
+      this.Address.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
+    },
+    //收货地址模态窗口的点击事件
+    addAddressClick(){
+      this.selectionList[this.addressIndex].saleShipperAddressName = this.addressMap.address
+      this.selectionList[this.addressIndex].saleShippingAddressId = this.addressMap.addressId
+      this.addressDrawer = false;
+      let arr = this.selectionList;
+      this.selectionList = [];
+      arr.forEach((e)=>{
+        this.selectionList.push({
+          //销售订单与物资表主键
+          capacityId:e.capacityId,
+          capacityNumber:e.capacityNumber,
+          carrierName:e.carrierName,
+          lineId:e.lineId,
+          lineName:e.lineName,
+          materialId:e.materialId,
+          materialName:e.materialName,
+          orderPlanWeight:e.orderPlanWeight,
+          saleMaterialId:e.saleMaterialId,
+          saleOrderConsignee:e.saleOrderConsignee,
+          saleOrderConsigneeTel:e.saleOrderConsigneeTel,
+          saleShipperAddressName:e.saleShipperAddressName,
+          saleShippingAddressId:e.saleShippingAddressId,
+        })
+      })
+    },
+    //收货地址点击浏览的事件
+    select(index){
+      this.addressDrawer = true;
+      this.addressIndex = index ;
+    },
+    //收货地址模态框单选选中的事件
+    currentRadioChange2(val){
+      this.addressMap = {};
+      this.addressMap = val;
+    },
+    //车辆模态框的确定事件
+    AddTruckClick(){
+      if(this.selectTruck.length>0){
+      this.selectTruck.forEach(e => {
+        this.selectionList.push({
+          //销售订单与物资表主键
+          saleMaterialId:this.saleMaterialId,
+          capacityId:e.capacityId,
+          capacityNumber:e.capacityNumber,
+          carrierName:e.carrierName,
+          materialName:this.materialName,
+          materialId:this.materialId,
+          lineName:this.lineName,
+          lineId:this.lineId,
+        })
+      });
+      this.truckDrawer = false;
+      //置空当前多选选中的车辆数据
+      this.selectTruck = [];
+      }
+      
+    },
+    //车辆模态框框计算
+    selectTruckClick(){
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          getCookie("userId") + "&index="+this.truckText;
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
+      }
+    },
+    //车辆表格
+    currentRadioChange1(select){
+      this.selectTruck = [];
+      this.selectTruck = select;
+    },
+    //主界面表格单选
+    currentRadioChange(row) {
+      this.materialId = row.materialId;
+      this.materialName = row.materialName;
+      this.saleMaterialId = row.saleMaterialId;
+    },
+    //线路表格的单选事件
+    currentRadioChange5(row){
+      //存在lineName,赋值,否则初始化
+      if(row.lineName){
+        this.cacheLine = row;
+      }else{
+        this.cacheLine = {
+        ROW_ID : 0,
+        lineDesk : '',
+        lineId : 0,
+        lineName : '',
+        lineNo : '',
+        lineType : '',
+        spellNumber : 0,
+      }
+      } 
+    },
+    onClick(num) {
+      if (num == 1) {
+        this.drawer = true;
+        this.lineText = null;
+      }else if(num == 2){
+        //再度初始化选择车辆表头
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+            getCookie("userId") + "&i=" + new Date();
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&i=" + new Date();;
+        }
+        //后续操作
+        if(!this.materialId){
+          this.$message.warning('请选择物资后,再点击')
+        }else if(!this.lineId){
+          this.$message.warning('请选择线路后,再点击')
+        }else{
+          this.truckDrawer = true;
+          this.truckText = null;
+        }
+      }
+    },
+    //线路表格的框计算
+    selectClick(){
+      this.line.requestUrl = '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con='+this.lineText;
+    },
+    //线路表格的确定事件
+    AddClick(){
+        if(this.cacheLine.lineName!=''){
+          this.drawer = false;
+          this.lineName = this.cacheLine.lineName +"  "+ this.cacheLine.lineDesk;
+          this.lineId = this.cacheLine.lineId;
+        }
+
+    }
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 237 - 97
src/views/appoint/components/saleContract/addSaleOrderArrange.vue

@@ -2,20 +2,24 @@
   <!-- 添加销售订单排车 -->
   <div class="addSalePlan">
     <page-title>新增销售订单排车</page-title>
-    <div class="table_form from">
-      <div class="materialId">
-        <span class="text"> 物资: </span>
-        <el-button type="primary" class="btn" @click="table = true">浏览</el-button>
-      </div>
+    <!-- 销售订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable v-bind.sync="option" @selection-change="selectionChange">
+      </dilTable>
     </div>
+
+    <div class="button-box">
+      <el-button type="primary" @click="arragne">确定排车</el-button>
+    </div>
+
     <!-- 车序号表格 -->
     <div class="switch" v-if="selectionList.length > 0">
       <el-tooltip placement="top">
         <div slot="content">下面表格已有数据,不能进行更改!!!</div>
         <el-switch
           v-model="value"
-          active-text="重量"
-          inactive-text="件数"
+          active-text="件数"
+          inactive-text="重量"
           disabled
         >
         </el-switch>
@@ -24,11 +28,12 @@
     <div class="switch" v-else>
       <el-tooltip placement="top">
         <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
-        <el-switch v-model="value" active-text="重量" inactive-text="件数">
+        <el-switch v-model="value" active-text="件数" inactive-text="重量">
         </el-switch>
       </el-tooltip>
     </div>
 
+    <!-- 排车表格 -->
     <div class="selectionTable from">
       <el-table
         :data="selectionList"
@@ -36,6 +41,8 @@
         style="width: 100%"
         highlight-current-row
       >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
         <el-table-column
           v-for="(item, i) in tableTop"
           :key="i"
@@ -45,7 +52,7 @@
           align="center"
           show-overflow-tooltip
         >
-          <template slot="scope" v-if="item.label !== '件数'">
+          <template slot="scope" v-if="item.label !== '重量'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '车序号'">
@@ -54,7 +61,7 @@
           <template slot="scope" v-if="item.label !== '收货地址'">
             <span>{{ item.label }}</span>
           </template>
-          <template slot="scope" v-if="item.label !== '收货日期'">
+          <template slot="scope" v-if="item.label !== '截止日期'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '收货姓名'">
@@ -70,6 +77,7 @@
               <template v-if="item.prop == 'orderPlanWeight'">
                 <el-input
                   class="textinput"
+                  placeholder="(必填)"
                   v-model.number="scope.row.orderPlanWeight"
                 ></el-input>
               </template>
@@ -77,20 +85,29 @@
               <template v-if="item.prop == 'cxh'">
                 <el-input
                   class="textinput1"
+                  placeholder="(必填)"
                   v-model.number="scope.row.cxh"
+                  @change="updateArragneCxh(scope.row.cxh)"
                 ></el-input>
               </template>
               <!-- 收货地址id -->
-              <template style="width: 400px" v-if="item.prop == 'saleShipperAddressName'">
-                <el-input style="width: 200px" v-model="scope.row.saleShipperAddressName" disabled>
+              <template v-if="item.prop == 'saleShipperAddressName'" >
+                <el-input
+                  style="width: 200px"
+                  v-model="scope.row.saleShipperAddressName"
+                  disabled
+                >
                 </el-input>
-                <el-button type="primary" @click="ondrawer(scope.row,scope.$index)"
+                <el-button
+                  type="primary"
+                  placeholder="(非必填)"
+                  @click="select(scope.$index,3)"
                   >浏览</el-button
                 >
               </template>
-              <!-- 收货日期 -->
+              <!-- 截止日期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
-                <el-date-picker
+                 <el-date-picker
                   class="textinput3"
                   type="date"
                   v-model.number="scope.row.saleDateOfReceipt"
@@ -100,6 +117,7 @@
               <template v-if="item.prop == 'saleOrderConsignee'">
                 <el-input
                   class="textinput4"
+                  placeholder="(非必填)"
                   v-model.number="scope.row.saleOrderConsignee"
                 ></el-input>
               </template>
@@ -107,9 +125,17 @@
               <template v-if="item.prop == 'saleOrderConsigneeTel'">
                 <el-input
                   class="textinput5"
+                  placeholder="(非必填)"
                   v-model.number="scope.row.saleOrderConsigneeTel"
                 ></el-input>
               </template>
+              <!-- 排车数(不可见) -->
+            <template v-if="item.prop == 'arragneCount'">
+                <el-input
+                  class="textinput6"
+                  v-model.number="scope.row.arragneCount"
+                ></el-input>
+              </template>
             </template>
             <template v-else>
               <span>{{ scope.row[item.prop] }}</span>
@@ -117,10 +143,25 @@
           </template>
         </el-table-column>
         <!-- 操作列 -->
-        <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="200">
           <template slot-scope="scope">
+            
+                
             <el-button
-              @click.native.prevent="deleteRow(scope.$index, selectionList)"
+              @click="copyRow(scope.$index,scope.row)"
+              type="text"
+              size="big"
+            >
+              复制
+            </el-button>
+
+            <el-input
+            style="width: 50px;"
+              v-model.number="scope.row.arragneCount"
+            ></el-input>
+
+            <el-button
+              @click="deleteRow(scope.$index,scope.row)"
               type="text"
               icon="el-icon-close"
               size="big"
@@ -129,54 +170,46 @@
         </el-table-column>
       </el-table>
     </div>
-
-    <el-drawer
-      :visible.sync="drawer"
-      :direction="direction"
-      :close-on-press-escape="true"
-      :show-close="true"
-      :wrapperClosable="true"
+    <!-- 收货地址的模态框 -->
+    <el-drawer 
+      :visible.sync="addressDrawer" 
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :wrapperClosable="false"
       modal
-      size="30%"
+      close-on-press-escape
+    
     >
       <el-input
         placeholder="请输入内容"
-        v-model="textInput"
-        style="margin-top: 10px; margin-left: 20px;width: 200px"
+        v-model="addressText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
         clearable
       >
       </el-input>
       <el-button
         type="primary"
         class="btn"
-        @click="onclick1()"
-        style="margin-bottom: 15px"
+        @click="selectAddressClick"
+        style="margin-left: 5px"
       >
         <i class="el-icon-search"></i>查询
       </el-button>
-      <dilTable
-        v-bind.sync="frist"
-        @radio-change="currentRadioChange1"
-      ></dilTable>
-    </el-drawer>
-    <el-drawer
-      title="选择物资信息"
-      :visible.sync="table"
-      direction="rtl"
-      size="50%"
-      :show-close="false"
-    >
-      <el-input placeholder="请输入内容" v-model="input"  
-      style="margin-top: 10px; margin-left: 20px;width:160px" clearable> </el-input
-      ><el-button type="primary" class="btn" @click="onclick" style="margin-left: 4px;">
-        <i class="el-icon-search"></i>查询
+      <el-button
+        type="primary"
+        class="btn"
+        @click="addAddressClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
       </el-button>
-      <el-button @click="open">取消</el-button>
-      <el-button type="primary" @click="makeSure1">确定</el-button>
       <div class="tablecls">
-        <!-- 查询所有的物资 -->
-        <dilTable v-bind.sync="option" @selection-change="selectionChange">
-        </dilTable>
+        <!-- 查询所有的收货地址 -->
+        <dilTable
+          v-bind.sync="Address"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
       </div>
     </el-drawer>
 
@@ -188,19 +221,32 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
       textInput: "",
       input: "",
+      //排车数默认
+      arragneCount: 1,
+      //初始化车序号
+      arragneCxh: 1,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=" + this.$route.params.saleOrderId,
         // 控制显示多选列
         selectionType: "select",
       },
+      //是否打开收货地址的模态框
+      addressDrawer:false,
+      //收货地址的表格
+      addressText:null,
+      //线路表格的框计算输入的值
+      Address: {
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        selectionType: "radio",
+      },
       table: false,
       selectionList: [],
       selectionList1: [],
@@ -225,14 +271,10 @@ export default {
       ],
       values: "yes",
       tableTop: [
-        {
-          prop: "materialCode",
-          label: "物资编码",
-          width: "120",
-        },
         {
           prop: "cxh",
           label: "车序号",
+          width: "80",
           slot: true,
         },
         {
@@ -247,29 +289,38 @@ export default {
         },
         {
           prop: "orderPlanWeight",
-          label: "件数",
+          label: "重量",
+          width: "80",
           slot: true,
         },
         {
-          prop: "saleShipperAddressName",
-          label: "收货地址",
-          width: "300",
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "230",
           slot: true,
         },
         {
-          prop: "saleDateOfReceipt",
-          label: "收货日期",
-          width: "110",
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
           slot: true,
         },
         {
           prop: "saleOrderConsignee",
           label: "收货客户",
+          width: "150",
           slot: true,
         },
         {
           prop: "saleOrderConsigneeTel",
           label: "收货客户电话号码",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "arragneCount",
+          label: "复制数",
+          width: "80",
           slot: true,
         },
       ],
@@ -282,49 +333,135 @@ export default {
   watch: {
     value() {
       if (this.value) {
-        this.tableTop[4]={
+        this.tableTop[3]={
           prop: "orderPlanWeight",
-          label: "重量",
+          label: "件数",
           slot: true,
         };
       } else {
-        this.tableTop[4]={
+        this.tableTop[3]={
           prop: "orderPlanWeight",
-          label: "件数",
+          label: "重量",
           slot: true,
         };
       }
     },
   },
   methods: {
-    deleteRow(index, rows) {
-      rows.splice(index, 1);
-    },
     //点击浏览事件
     ondrawer(row,index) {
       this.row = row;
       this.row.index = index;
       this.drawer = true;
     },
+    //修改输入框中的车序号,自动获取车序号最大值
+    updateArragneCxh(cxh){
+      if(this.arragneCxh<cxh){
+          this.arragneCxh = ++cxh;
+      }
+    },
+    //复制多条的方法
+    copyRow(index,row){
+      let arr = [];
+      for(var i = 0 ;i<this.selectionList.length; i++){
+        if(i == index){
+          arr.push(this.selectionList[i]);
+          //车序号自增
+          var cxhStart = row.cxh;
+          for(var j = 0;j<this.selectionList[i].arragneCount; j++){
+            arr.push({
+            Specification:row.Specification,
+            arragneCount:this.arragneCount,
+            cxh:++cxhStart,
+            materialName:row.materialName,
+            orderPlanWeight:row.orderPlanWeight,
+            saleDateOfReceipt:row.saleDateOfReceipt,
+            saleMaterialId:row.saleMaterialId,
+            saleOrderConsignee:row.saleOrderConsignee,
+            saleOrderConsigneeTel:row.saleOrderConsigneeTel,
+            saleShipperAddressId:row.saleShipperAddressId,
+            saleShipperAddressName:row.saleShipperAddressName,
+          })
+
+          }
+          //确定车序号最大值并赋值给初始化车序号
+          if(this.arragneCxh<cxhStart){
+            this.arragneCxh = ++cxhStart;
+          }
+        }else{
+          arr.push(this.selectionList[i]);
+        }
+      }
+      this.selectionList = [];
+      this.selectionList = arr;
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index,row){
+      //统计与当前最大车序号相等的车序号
+      var equalArragneCxh = 0;
+      //若为最后一个删除对象,初始化this.arragneCxh的值
+      if(this.selectionList.length==1){
+        this.arragneCxh = 1;
+      }else{
+        for(var i = 0 ;i<this.selectionList.length; i++){
+          if(this.selectionList[i].cxh==this.arragneCxh){
+            equalArragneCxh++;
+          }
+        }
+        //判断是否要减小最大车序号数
+        if(equalArragneCxh==0){
+          if((this.arragneCxh-1)==row.cxh){
+          this.arragneCxh=row.cxh;
+          }
+        }
+      }
+      
+      //删除当前点击的对象
+      this.selectionList.splice(index,1);
+    },
     //监听模态框点击事件
     currentRadioChange1(radioList) {
       this.selectionList[this.row.index].saleShipperAddressId = radioList.addressId;
       this.selectionList[this.row.index].saleShipperAddressName = radioList.address;
     },
-    //收货地址模态框查询
-    onclick1() {
-      this.option.requestUrl =
-        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" + this.textInput;
+    //收货地址模态窗口的框计算
+    selectAddressClick(){
+      this.Address.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
+    },
+    //收货地址模态窗口的点击事件
+    addAddressClick(){
+      this.selectionList[this.addressIndex].saleShipperAddressName = this.addressMap.address
+      this.selectionList[this.addressIndex].saleShippingAddressId = this.addressMap.addressId
+      this.addressDrawer = false;
+      let arr = this.selectionList;
+      this.selectionList = [];
+      arr.forEach((e)=>{
+        this.selectionList.push({
+          //销售订单与物资表主键
+            Specification:e.Specification,
+            arragneCount:e.arragneCount,
+            cxh:e.cxh,
+            materialName:e.materialName,
+            orderPlanWeight:e.orderPlanWeight,
+            saleDateOfReceipt:e.saleDateOfReceipt,
+            saleMaterialId:e.saleMaterialId,
+            saleOrderConsignee:e.saleOrderConsignee,
+            saleOrderConsigneeTel:e.saleOrderConsigneeTel,
+            saleShipperAddressId:e.saleShipperAddressId,
+            saleShipperAddressName:e.saleShipperAddressName,
+        })
+      })
+    },
+    //收货地址点击浏览的事件
+    select(index){
+      this.addressDrawer = true;
+      this.addressIndex = index ;
+    },
+    //收货地址模态框单选选中的事件
+    currentRadioChange2(val){
+      this.addressMap = {};
+      this.addressMap = val;
     },
-    // dianji() {
-    //   this.axios.get("/api/v1/ams/getAddressDeliveryAddress").then((res) => {
-    //     if (res.data.code == "200") {
-    //       console.log(res);
-    //       this.options1 = res.data.data;
-    //     }
-    //   });
-    // },
-    //物资模态框查询
     // 框计算
     onclick() {
       this.option.requestUrl =
@@ -347,12 +484,12 @@ export default {
         this.table = false;
       }
     },
-    // 返回主界面
-    makeSure1() {
+    // 进行排车
+    arragne() {
       this.selectionList1.forEach((e) => {
         var addmap = {
-          materialCode: e.materialCode,
-          cxh: null,
+          // materialCode: e.materialCode,
+          cxh: this.arragneCxh,
           materialName: e.materialName,
           Specification: e.specificationModel,
           orderPlanWeight: null,
@@ -362,24 +499,25 @@ export default {
           saleOrderConsignee: null,
           saleOrderConsigneeTel: null,
           saleMaterialId: e.saleMaterialId,
-          materialTheoreticalWeight: e.materialTheoreticalWeight,
+          // materialTheoreticalWeight: e.materialTheoreticalWeight,
+          arragneCount : this.arragneCount,
         };
         this.selectionList.push(addmap);
       });
       this.selectionList1 = [];
       this.table = false;
+      //重置销售订单信息
+      this.option.requestUrl = "/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=" + this.$route.params.saleOrderId + "&i=" + new Date();
     },
     // 返回选中的物资信息
     selectionChange(selection) {
       this.selectionList1 = [];
       this.selectionList1 = selection;
-      console.log("this.selectionList1 ",this.selectionList1)
     },
     // 确定
     makeSure() {
         //初始化maplist
       var mapList = [];
-      console.log("this.selectionList",this.selectionList)
       this.selectionList.forEach((item,i) => {
         //初始化mapItem
         var mapItem={
@@ -389,7 +527,7 @@ export default {
                 truckNo : "",
                 //收货地址id
                 shippingAddressId : 0,
-                //收货日期
+                //截止日期
                 dateOfReceipt :null,
                 //收货方姓名   
                 orderConsignee :"",
@@ -403,14 +541,13 @@ export default {
         mapItem.saleOrderId=this.$route.params.saleOrderId;
         mapItem.truckNo=item.cxh;
         mapItem.shippingAddressId=item.saleShipperAddressId;
-        mapItem.dateOfReceipt=item.saleDateOfReceipt;
+        mapItem.dateOfReceipt=sjTime(item.saleDateOfReceipt);
         mapItem.orderConsignee=item.saleOrderConsignee;
         mapItem.orderConsigneeTel=item.saleOrderConsigneeTel;
         mapItem.saleMaterialId=item.saleMaterialId;
         mapItem.materialNumber=item.orderPlanWeight;
         mapList.push(mapItem);
       });
-      // console.log("mapList",mapList);
         this.axios.post("/api/v1/ams/addTruckNo", mapList).then((res) => {
           if (res.data.code == "200") {
             this.$router.go(-1);
@@ -471,10 +608,10 @@ export default {
   margin-left: -16rem;
 }
 .textinput {
-  width: 50px;
+  width: 70px;
 }
 .textinput1 {
-  width: 50px;
+  width: 70px;
   text-align: center;
   size: small;
 }
@@ -483,12 +620,15 @@ export default {
   margin-right: 30px;
 }
 .textinput3 {
-  width: 270px;
+  width: 240px;
 }
 .textinput4 {
-  width: 60px;
+  width: 120px;
 }
 .textinput5 {
   width: 120px;
 }
+.textinput6{
+  width: 70px;
+}
 </style>

+ 42 - 12
src/views/appoint/components/saleContract/addSaleOrderSend.vue

@@ -51,7 +51,7 @@
           <template slot="scope" v-if="item.label !== '收货地址'">
             <span>{{ item.label }}</span>
           </template>
-          <template slot="scope" v-if="item.label !== '收货日期'">
+          <template slot="scope" v-if="item.label !== '截止日期'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '收货姓名'">
@@ -146,6 +146,7 @@
       direction="rtl"
       size="40%"
       :wrapperClosable="false"
+      @keyup.enter.native="AddClick"
       modal
       close-on-press-escape
     
@@ -154,6 +155,7 @@
         placeholder="请输入内容"
         v-model="lineText"
         style="margin-top: 10px; margin-left: 20px; width: 250px"
+        @keyup.enter.native="selectClick"
         clearable
       >
       </el-input>
@@ -187,6 +189,7 @@
       :destroy-on-close="false"
       direction="rtl"
       size="40%"
+      @keyup.enter.native="AddTruckClick"
       :wrapperClosable="false"
       modal
       close-on-press-escape
@@ -196,6 +199,7 @@
         placeholder="请输入内容"
         v-model="truckText"
         style="margin-top: 10px; margin-left: 20px; width: 250px"
+        @keyup.enter.native="selectTruckClick"
         clearable
       >
       </el-input>
@@ -285,7 +289,15 @@ export default {
       lineName:null,
       lineId:null,
       //线路表格单选缓存数据的
-      cacheLine:[],
+      cacheLine:{
+        ROW_ID : 0,
+        lineDesk : '',
+        lineId : 0,
+        lineName : '',
+        lineNo : '',
+        lineType : '',
+        spellNumber : 0,
+      },
       //已经选择车辆物资信息
       selectionList:[],
       //销售订单物资信息
@@ -357,7 +369,7 @@ export default {
         },
         {
           prop: "saleDateOfReceipt",
-          label: "发货日期",
+          label: "截止日期",
           width: "230",
           slot: true,
         },
@@ -412,7 +424,6 @@ export default {
     makeSure(){
       let state = false;
       this.selectionList.forEach((e)=>{
-        console.log(e.orderPlanWeight,"orderPlanWeight")
         if(!isNumber(e.orderPlanWeight)){
           this.$message.error('重量请输入数字')
         }else if(e.saleOrderConsigneeTel){
@@ -429,10 +440,8 @@ export default {
         if(e.saleDateOfReceipt){
           e.saleDateOfReceipt = sjTime(e.saleDateOfReceipt)
         }
-        console.log(typeof e.saleDateOfReceipt)
       })
       
-      console.log("this.selectionList",this.selectionList)
       if(state){
         this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
           saleOrderId:this.$route.params.saleOrderId,
@@ -528,9 +537,8 @@ export default {
     },
     //车辆模态框的确定事件
     AddTruckClick(){
-      console.log(this.selectTruck)
+      if(this.selectTruck.length>0){
       this.selectTruck.forEach(e => {
-        // console.log(e)
         this.selectionList.push({
           //销售订单与物资表主键
           saleMaterialId:this.saleMaterialId,
@@ -544,6 +552,10 @@ export default {
         })
       });
       this.truckDrawer = false;
+      //置空当前多选选中的车辆数据
+      this.selectTruck = [];
+      }
+      
     },
     //车辆模态框框计算
     selectTruckClick(){
@@ -569,11 +581,25 @@ export default {
     },
     //线路表格的单选事件
     currentRadioChange5(row){
-      this.cacheLine = row;
+      //存在lineName,赋值,否则初始化
+      if(row.lineName){
+        this.cacheLine = row;
+      }else{
+        this.cacheLine = {
+        ROW_ID : 0,
+        lineDesk : '',
+        lineId : 0,
+        lineName : '',
+        lineNo : '',
+        lineType : '',
+        spellNumber : 0,
+      }
+      } 
     },
     onClick(num) {
       if (num == 1) {
         this.drawer = true;
+        this.lineText = null;
       }else if(num == 2){
         //再度初始化选择车辆表头
         if (getCookie("orgCode") == "chengyunshang") {
@@ -591,6 +617,7 @@ export default {
           this.$message.warning('请选择线路后,再点击')
         }else{
           this.truckDrawer = true;
+          this.truckText = null;
         }
       }
     },
@@ -600,9 +627,12 @@ export default {
     },
     //线路表格的确定事件
     AddClick(){
-      this.drawer = false;
-      this.lineName = this.cacheLine.lineName +"  "+ this.cacheLine.lineDesk;
-      this.lineId = this.cacheLine.lineId;
+        if(this.cacheLine.lineName!=''){
+          this.drawer = false;
+          this.lineName = this.cacheLine.lineName +"  "+ this.cacheLine.lineDesk;
+          this.lineId = this.cacheLine.lineId;
+        }
+
     }
   },
 };

+ 146 - 0
src/views/appoint/components/saleContract/saleCokeInward.vue

@@ -0,0 +1,146 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <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>
+      <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 name="four"> -->
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="120">
+            <template slot-scope="scope">
+              <el-button
+                @click="sendClick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >派车</el-button
+              >
+              <el-button
+                @click="closeOrder(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >关闭订单</el-button
+              >
+            </template>
+          </el-table-column>
+
+        </dilTable>
+      <!-- </el-tab-pane> -->
+    </el-tabs>
+  </div>
+</template>
+<script>
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "four",
+      input: "",
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getCokeSaleOrderList?apiId=409",
+      },
+      
+      //记录旧的row对象 (销售公司已审批/财务已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批/财务已审批)
+      oldRowCount: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批\财务已审批)
+      tableData: [],
+    };
+  },
+//   created(){
+//       验证订单是否关闭
+      
+//       this.axios.post("/api/v1/ams/getCokeSaleOrderList?apiId=409")
+//       .then((res)=>{
+//           res.data.data.list.
+//           console.log("res",res)
+//           console.log("res111",res.data.data.list[0])
+//       })
+//   },
+  methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+        this.option4.requestUrl = "/api/v1/ams/getCokeSaleOrderList?apiId=409&con="+this.input;      
+    },
+    sendClick(saleOrderId){
+      this.$router.push("/addSaleCokeSend/" + saleOrderId);
+    },
+    closeOrder(saleOrderId) {
+      this.$confirm("是否关闭", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "关闭成功!",
+          });
+          this.axios
+            .post(
+              "/api/v1/ams/closeSaleOrder?saleOrderId=" +
+                saleOrderId
+            )
+            .then(() => {
+              this.$router.go(0);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消关闭!",
+          });
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 6 - 1
src/views/appoint/components/saleContract/saleOrder.vue

@@ -9,6 +9,9 @@
       <el-button type="primary" @click="btnclick(0)">
         <i class="el-icon-plus"></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">
       <!-- 已审批 -->
@@ -227,7 +230,9 @@ export default {
     };
   },
   methods: {
-
+    refresh(){
+      this.$router.go(0);
+    },
     handleClick(tab, event) {
       console.log(tab, event);
     },

+ 15 - 7
src/views/appoint/components/saleContract/transportPrice.vue

@@ -3,17 +3,15 @@
   <div class="salePlan">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+      <el-button type="primary" class="btn" @click="onclick" :loading="loading">
         <i class="el-icon-search"></i>查询
       </el-button>
-      
-
       <el-button type="primary" @click="btnclick(0)">
         <i class="el-icon-plus"></i>新增
       </el-button>
        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
-    <dilTable ref="excelDom" v-bind.sync="option">
+    <dilTable ref="excelDom" v-bind.sync="option" :loading="loading" :isKuang="isKuang" @func="func">
       <el-table-column fixed="right" label="操作" width="200">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
@@ -35,6 +33,8 @@ export default {
   name: "TransportPrice",
   data() {
     return {
+      isKuang:false,
+      loading:false,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -45,10 +45,18 @@ export default {
     };
   },
   methods: {
+    func(){
+      this.loading = false;
+      this.isKuang = false;
+    },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/ams/getAmsContractTransportPrice?apiId=109&con=" +
-        this.input;
+      this.loading = true;
+      this.isKuang = true;
+      if(this.input){
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&con=" +this.input;
+      }else{
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&i="+new Date();
+      }
     },
     btnclick() {
       this.$router.push("/addTransportPrice");

+ 4 - 0
src/views/appoint/router/index.js

@@ -31,6 +31,7 @@ import updateOtherPrice from '../components/purchase/updateOtherPrice.vue'
 import updateShipPrice from '../components/purchase/updateShipPrice.vue'
 import updateTrainPrice from '../components/purchase/updateTrainPrice.vue'
 import updateTruckPrice from '../components/purchase/updateTruckPrice.vue'
+import addSaleCokeSend from '../components/saleContract/addSaleCokeSend.vue'
 import addSaleOrder from '../components/saleContract/addSaleOrder.vue'
 import addSaleOrderArrange from '../components/saleContract/addSaleOrderArrange.vue'
 import addSaleOrderSend from '../components/saleContract/addSaleOrderSend.vue'
@@ -45,6 +46,7 @@ import editSalePalnDetail from '../components/saleContract/editSalePalnDetail.vu
 import editSalePlan from '../components/saleContract/editSalePlan.vue'
 import editTransportPrice from '../components/saleContract/editTransportPrice.vue'
 import editTruckNoDetail from '../components/saleContract/editTruckNoDetail.vue'
+import saleCokeInward from '../components/saleContract/saleCokeInward.vue'
 import saleOrder from '../components/saleContract/saleOrder.vue'
 import saleOrderArrange from '../components/saleContract/saleOrderArrange.vue'
 import saleOrderDetail from '../components/saleContract/saleOrderDetail.vue'
@@ -88,6 +90,7 @@ const constantRouterMap = [
       {path: 'updateShipPrice/:priceId', name: 'updateShipPrice', meta: {code: 'xtpzgl-yhgl'}, component: updateShipPrice},
       {path: 'updateTrainPrice/:priceId', name: 'updateTrainPrice', meta: {code: 'xtpzgl-yhgl'}, component: updateTrainPrice},
       {path: 'updateTruckPrice/:priceId', name: 'updateTruckPrice', meta: {code: 'xtpzgl-yhgl'}, component: updateTruckPrice},
+      {path: 'addSaleCokeSend/:saleOrderId', name: 'addSaleCokeSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleCokeSend},
       {path: 'addSaleOrder', name: 'addSaleOrder', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrder},
       {path: 'addSaleOrderArrange/:saleOrderId', name: 'addSaleOrderArrange', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderArrange},
       {path: 'addSaleOrderSend/:saleOrderId', name: 'addSaleOrderSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSend},
@@ -103,6 +106,7 @@ const constantRouterMap = [
       {path: 'editSalePlan/:planId', name: 'editSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: editSalePlan},
       {path: 'editTransportPrice/:priceId', name: 'editTransportPrice', meta: {code: 'xtpzgl-yhgl'}, component: editTransportPrice},
       {path: 'editTruckNoDetail/:trucknoMaterialId', name: 'editTruckNoDetail', meta: {code: 'xtpzgl-yhgl'}, component: editTruckNoDetail},
+      {path: 'saleCokeInward', name: 'saleCokeInward', meta: {code: 'xtpzgl-yhgl'}, component: saleCokeInward},
       {path: 'saleOrder', name: 'saleOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleOrder},
       {path: 'saleOrderArrange', name: 'saleOrderArrange', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderArrange},
       {path: 'saleOrderDetail/:saleOrderId', name: 'saleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetail},

+ 3 - 1
src/views/inward/components/inwardImport/daZhou/addTruckLoad.vue

@@ -45,7 +45,9 @@ export default {
     };
   },
   created() {
-    this.form.loadTime = new Date();
+    this.form = {
+      loadTime:new Date(),
+    }
   }, 
   methods: {
     selectionChange(val) {

+ 3 - 1
src/views/inward/components/inwardImport/oldAreaRailScale/addTruckLoad.vue

@@ -39,7 +39,9 @@ export default {
   },
 
   created() {
-    this.form.loadTime = new Date();
+    this.form = {
+      loadTime:new Date(),
+    }
     this.form.loadingId = '老区轨道衡'
   },
 

+ 18 - 5
src/views/inward/components/inwardImport/oldAreaRailScale/enFactory.vue

@@ -18,20 +18,33 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
-            inputText:'',
+            inputText:null,
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=10&con=" + this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10"
+        //     }else{
+        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&userId=" + getCookie("orgCode")
+        //     }
+        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&con=" + this.inputText;
+        //     }
     }
 }
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/grossWeightResult.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+            this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/outFactory.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+            this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 11 - 3
src/views/inward/components/inwardImport/oldAreaRailScale/qualityResult.vue

@@ -18,6 +18,7 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
@@ -28,10 +29,17 @@ export default {
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/tareWeightResult.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllJiPiResult?apiId=104&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=104&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
+            this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=436&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=436&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=104&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 14 - 6
src/views/inward/components/inwardImport/oldAreaRailScale/truckLoad.vue

@@ -15,22 +15,30 @@
   </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
       inputText: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=353&orderType=10",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=435&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=435&orderType=10&userId=" + getCookie("orgCode")
+        }
+  },
   methods: {
-    onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getAllLoadResult?apiId=353&orderType=10&con=" +
-        this.inputText;
-    },
+    // onclick() {
+    //   this.option.requestUrl =
+    //     "/api/v1/tms/getAllLoadResult?apiId=353&orderType=10&con=" +
+    //     this.inputText;
+    // },
   },
 };
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/unload.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getUnloadResult?apiId=356&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 3 - 1
src/views/inward/components/offsetSteel/truckTrain/addApproveWagonPlease.vue

@@ -62,7 +62,9 @@ export default {
     // this.unit();
   },
   created(){
-      this.form1.resultApproveDate = new Date();
+      this.form1 = {
+        resultApproveDate: new Date(),
+      }
   },
   methods: {
     handleCheckedCitiesChange(value) {

+ 2 - 1
src/views/inward/components/offsetSteel/truckTrain/addWagonPlease.vue

@@ -35,7 +35,8 @@ export default {
     // this.unit();
   },
   created(){
-      this.form1.resultPleaseDate = new Date();
+      this.form1 = {resultPleaseDate:new Date()}
+      
   },
   methods: {
     handleCheckedCitiesChange(value) {

+ 379 - 265
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -1,348 +1,462 @@
-// 新增采购内转需求
 <template>
-  <div class="addInwardRequirement">
-    <page-title>新增需求</page-title>
-    <div class="form-box f2">
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="采购订单号">
-          <el-input v-model="purchaseOrder" placeholder="必填" disabled>
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="外轮船名" class="tx">
-          <el-input v-model="foreignShipName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="发货单位" class="tx">
-          <el-input v-model="supplierName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="收货单位" class="tx">
-          <el-input v-model="shipperName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="物资名称" class="tx">
-          <el-input v-model="materialName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="装车点">
-          <el-input v-model="truckPoint" placeholder="必填" disabled>
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
-        </el-form-item>
-      </el-form>
-      <el-form
+  <!-- 新增运输作业页面 -->
+  <div class="addPurRequirement">
+    <page-title>运输预约</page-title>
+    <div class="material from">
+      <span class="text">物资:</span>
+      <el-input class="input" v-model="materialName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
+    </div>
+    <div class="forwardingUnit from">
+      <span class="text">发货单位:</span>
+      <el-input class="input" v-model="supplierName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
+    </div>
+    <div class="forwardingUnit from">
+      <span class="text">卸货点:</span>
+      <el-input class="input" v-model="unloadPointName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(4)">浏览</el-button>
+    </div>
+    <div class="purchaseOrderNo from">
+      <span class="text">采购订单号:</span>
+      <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
+    </div>
+    <div class="carrier from">
+       <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
       >
-        <el-form-item label="卸车点">
-          <el-input v-model="truckPoint1" placeholder="必填" disabled>
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(3)">浏览</el-button>
+        <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-form-item>
-      </el-form>
+    </el-form>
     </div>
-    <el-drawer
-      :visible.sync="drawer"
-      :direction="direction"
-      :before-close="handleClose"
-      size="30%"
-    >
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        style="margin-top: 10px ;width:50%"
-        clearable
-      >
-      </el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="onclick(a)"
-        style="margin-bottom: 15px"
-      >
-        <i class="el-icon-search"></i>查询
-      </el-button>
+    <!-- 模态窗口 -->
+    <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
+      <div style="margin-bottom: 10px">
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 10px; margin-right: 10px; width: 250px"
+          clearable
+        ></el-input>
+        <el-button type="primary" class="btn" @click="onclick(a)">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
       <div v-show="a == 1">
         <dilTable
-          v-bind.sync="second"
+          v-bind.sync="frist"
           @radio-change="currentRadioChange1"
         ></dilTable>
       </div>
       <div v-show="a == 2">
         <dilTable
-          v-bind.sync="second1"
+          v-bind.sync="secend"
           @radio-change="currentRadioChange2"
         ></dilTable>
       </div>
       <div v-show="a == 3">
         <dilTable
-          v-bind.sync="second2"
-          @radio-change="currentRadioChange3"
+          v-bind.sync="third"
+          @selection-change="currentRadioChange3"
         ></dilTable>
       </div>
       <div v-show="a == 4">
         <dilTable
-          v-bind.sync="second3"
+          v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
         ></dilTable>
       </div>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="line"
+          @radio-change="currentRadioChange5"
+        ></dilTable>
+      </div>
     </el-drawer>
-    <div class="box-form">
-      <dil-form :formId="300" v-model="form"></dil-form>
-    </div>
-    <div class="button-box">
-      <el-button type="primary" @click="makeSure">确认新增</el-button>
-      <el-button type="primary" @click="cancel">返回</el-button>
+    <div class="button_box">
+      <el-button @click="onClickCancel">返回</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
     </div>
   </div>
 </template>
-
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime } from "@/utils/sharedJsFile";
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      purchaseOrder: null,
-      foreignShipName: null,
-      materialName: null,
-      shipperName: null,
-      supplierName: null,
+      disabled:false,
+      //船名
+      remark: null,
+      //车辆表格数据
+      selectionList: [],
+      stateCarrier:null,
+
+      // 表单
+      form1: {},
+      //采购订单号
+      purchaseOrderNo:"",
+      //采购订单id
+      purchaseOrderId: "",
+      //物资名称
+      materialName: "",
+      //发货单位名称
+      supplierName: "",
+      //发货单位id
+      supplierId: null,
+      carrierId:null,
+      //物资id
+      materialId: null,
+      //是否需要打开模态窗口
+      drawer: false,
+      //卸货点id
+      unloadPointId: "",
+      //卸货点名称
+      unloadPointName: "",
       a: 1,
       direction: "rtl",
       input: "",
-      truckPoint: null,
-      truckPoint1: null,
-      drawer: false,
-      form: {},
-      second: {
-        requestUrl: "/api/v1/ams/getPurchaseIdByBatch?apiId=252",
+      frist: {
+        requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
         selectionType: "radio",
-        mapList1: []
+        mapList1: [],
       },
-      second1: {
-        requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
+      secend: {
+        requestUrl:
+          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=",
         selectionType: "radio",
-        mapList2: []
+        mapList2: [],
       },
-      second2: {
-        requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
-        selectionType: "radio",
-        mapList3: []
+      third: {
+        requestUrl: "",
+        selectionType: "select",
+        mapList3: [],
       },
-      second3: {
-        requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
+      unloadPoint: {
+        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
         selectionType: "radio",
-        mapList4: []
-      }
+      },
     };
+  },
+  watch: {
+    drawer(val) {
+      if (!val) {
+        this.input = null;
+      }
+    },
+  },
+  created() {
+   
   },
   methods: {
+    onClick(index) {
+      this.selectionList.splice(index, 1);
+    },
+    onBlur() {
+      this.getPurchaseOrderNo();
+    },
+    getPurchaseOrderNo() {
+      let map = {
+        materialId: this.materialId,
+        supplierId: this.supplierId,
+      };
+      if (this.remark) {
+        map.remark = this.remark;
+      }
+      console.log(this.map);
+      if (this.materialId && this.supplierId) {
+        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",
+              });
+              this.form1 = [];
+            } else {
+              console.log();
+              this.remark = res.data.data.remark;
+              this.purchaseOrderId = res.data.data.purchaseOrderId;
+              this.purchaseOrderNo = res.data.data.purchaseOrderNo ;           
+            }
+          } else {
+            this.$message.error("请求失败");
+          }
+        });
+      }
+    },
+    onclick(a) {
+      if (a == 1) {
+        this.frist.requestUrl =
+          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
+          this.input;
+      } else if (a == 2) {
+        this.secend.requestUrl =
+          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
+          this.materialId +
+          "&index=" +
+          this.input;
+      } else if (a == 4) {
+        this.unloadPoint.requestUrl =
+          "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
+      }
+    },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
+      if (num == 2) {
+        this.secend.requestUrl =
+          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
+          this.materialId;
+      }
     },
-    handleClose(done) {
-      done();
+     //承运商弹出层
+    handleSelectCarrier(item){    
+      this.carrierId = item.carrierId
+      item.carrierName = this.stateCarrier
     },
-    onclick(a) {
-      if (a == 1) {
-        console.log(a);
-        this.second.requestUrl =
-          "/api/v1/ams/getPurchaseIdByBatch?apiId=252&con=" + this.input;
-      } else {
-        if (this.input == "") {
-          this.second1.requestUrl = "/api/v1/ams/getWareHouse?apiId=251";
-        } else {
-          this.second1.requestUrl =
-            "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
+    //以下是承运商边输边查搜索
+    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);
         }
-      }
+        })     
+      },
+    createFilterCarrier(queryString) {
+        return (restaurantsCarrier)  =>  {
+          return (restaurantsCarrier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //以上是承运商边输边查搜索
+    // 返回
+    onClickCancel() {
+      this.$router.push("/purInwardRequirement");
     },
     currentRadioChange1(selection) {
-      this.mapList1 = selection;
-      this.purchaseOrder = this.mapList1.purchaseOrderNo;
-      this.foreignShipName = this.mapList1.resultForeignShipName;
-      this.supplierName = this.mapList1.supplierName;
-      this.shipperName = this.mapList1.shipperName;
-      this.materialName = this.mapList1.materialName;
+      this.materialName = selection.materialName;
+      this.materialId = selection.materialId;
+      this.getPurchaseOrderNo();
     },
     currentRadioChange2(selection) {
-      this.mapList2 = selection;
-      console.log(this.mapList2);
-      if (this.mapList2.companyBranchName == null) {
-        this.mapList2.companyBranchName = "";
-      }
-      if (this.mapList2.branchFactory == null) {
-        this.mapList2.branchFactory = "";
-      }
-      if (this.mapList2.wareHouseName == null) {
-        this.mapList2.wareHouseName = "";
-      }
-      this.truckPoint =
-        this.mapList2.companyBranchName +
-        this.mapList2.branchFactory +
-        this.mapList2.wareHouseName;
+      this.supplierName = selection.supplierName;
+      this.supplierId = selection.supplierId;
+      this.getPurchaseOrderNo();
+    },
+    currentRadioChange4(selection) {
+      this.unloadPointId = selection.warehouseId;
+      this.unloadPointName = selection.warehouseName;
     },
     currentRadioChange3(selection) {
-      this.mapList3 = selection;
-      console.log(selection);
-      if (this.mapList3.companyBranchName == null) {
-        this.mapList3.companyBranchName = "";
-      }
-      if (this.mapList3.branchFactory == null) {
-        this.mapList3.branchFactory = "";
-      }
-      if (this.mapList3.wareHouseName == null) {
-        this.mapList3.wareHouseName = "";
-      }
-      this.truckPoint1 =
-        this.mapList3.companyBranchName +
-        this.mapList3.branchFactory +
-        this.mapList3.wareHouseName;
+      this.selectionList = [];
+      this.selectionList = selection;
     },
-    // 新增
-    makeSure() {
-      if (this.purchaseOrder == null) {
-        this.$alert("没有选择采购订单,请点击浏览选择采购订单!");
-        return;
-      } else if (this.truckPoint == null) {
-        this.$alert("没有选择装车点,请点击浏览选择装车点!");
-        return;
-      } else if (this.truckPoint1 == null) {
-        this.$alert("没有选择卸货点,请点击浏览选择卸货点!");
-        return;
-      } else if (typeof this.form.materialWeight == "undefined") {
-        this.$alert("没有输入物资重量,请输入!");
-        return;
-      } else if (typeof this.form.requirementType == "undefined") {
-        this.$alert("没有选择需求类型,请选择!");
-        return;
-      } else if (typeof this.form.requirementTruckTime == "undefined") {
-        this.$alert("没有选择用车时间,请选择!");
-        return;
-      } else if (typeof this.form.requirementShipperId == "undefined") {
-        this.$alert("没有选择用车单位,请选择!");
-        return;
-      } else if (typeof this.form.requirementWorkType == "undefined") {
-        this.$alert("没有选择费用类别,请选择!");
-        return;
-      } else if (typeof this.form.requirementEstimatedDuration == "undefined") {
-        this.$alert("没有输入预计作业时长,请输入!");
-        return;
+    // 确认
+    onClickConfirm() {
+      this.disabled = true
+      var state = 0;
+      if (
+        this.materialId &&
+        this.supplierId &&
+        this.purchaseOrderId &&
+        this.unloadPointId
+      ) {
+        state = 1;
+      } else {
+        if (!this.materialId) {
+          this.$message({
+            message: "请选择物资!",
+            type: "warning",
+          });
+          this.disabled = false
+        } else if (!this.supplierId) {
+          this.$message({
+            message: "请选择发货单位!",
+            type: "warning",
+          });
+          this.disabled = false
+        } else if (!this.purchaseOrderId) {
+          this.$message({
+            message: "没有匹配的采购订单号!",
+            type: "warning",
+          });
+          this.disabled = false
+        } else if (!this.unloadPointId) {
+          this.$message({
+            message: "请选择卸货地点!",
+            type: "warning",
+          });
+          this.disabled = false
+        }
       }
-      let requiremnet = {
-        purchaseOrderId: this.mapList1.purchaseOrderId,
-        requiremntUnitId: this.mapList2.wareHouseId,
-        materialWeight: this.form.materialWeight,
-        requirementEstimatedDuration: this.form.requirementEstimatedDuration,
-        requirementOverlimit: this.form.requirementOverlimit,
-        requirementShipperId: this.form.requirementShipperId,
-        requirementTruckTime: sjTime(this.form.requirementTruckTime),
-        requirementType: this.form.requirementType,
-        requirementWorkContent: this.form.requirementWorkContent,
-        requirementWorkEnvironment: this.form.requirementWorkEnvironment,
-        requirementWorkType: this.form.requirementWorkType,
-        requirementUnloadUnitId: this.mapList3.wareHouseId
-      };
-      this.axios
-        .post("/api/v1/ams/addTruckRequirement", requiremnet)
-        .then(res => {
-          if (res.data.code == 200) {
+      if (state == 1) {
+        let map = {
+          materialId: this.materialId,
+          purchaseOrderId: this.purchaseOrderId,
+          unloadPointId: this.unloadPointId,
+          carrierId:this.carrierId,
+          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",
-              message: "新增成功!"
             });
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败!");
+            this.disabled = false
+            this.onClickCancel()
           }
         });
+      }
     },
-    // 返回
-    cancel() {
-      this.$router.go(-1);
-    }
-  }
+  },
 };
 </script>
-<style lang="scss" scoped>
-.addInwardRequirement{
-.form-box {
-  display: inline-block !important;
-  margin-left: 38% !important;
-  .el-input {
-    width: 288px;
+<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;
+  }
+  .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;
   }
-  .el-form {
-    padding: 10px;
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
   }
-  .tx{
-    margin-left: -75px;
+  .input {
+    width: 250px;
+    margin-right: 20px;
   }
 }
-.box-form {
-  display: flex ;
-  padding-left: 38%;
+.orderType {
+  display: flex;
+  justify-content: center;
+  .text {
+    display: inline-block;
+    width: 110px;
+    text-align: right;
+  }
+  .select {
+    width: 250px;
+  }
+  .span {
+    display: inline-block;
+    width: 30px;
+    height: 10px;
+  }
+}
+.contractTitle {
+  display: flex;
+  justify-content: center;
   .el-form-item {
-    display: flex !important;
-    padding: 10px;
+    display: flex;
+    justify-content: center;
     .el-form-item__label {
-      width: 80px !important;
+      display: flex;
+      align-items: center;
     }
     .el-input {
-      width: 288px;
+      width: 250px;
     }
   }
 }
-.button-box {
-  margin-left: 25px !important;
+.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;
+  }
+  .input {
+    width: 250px;
+    margin-right: 90px;
+  }
 }
+.carrier{
+  display: flex;
+  .el-autocomplete{
+    width: 250px;
+  }
 }
-</style>
+.button_box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100px;
+}
+}
+
+</style>

+ 0 - 3
src/views/inward/components/truckAppoint/plan.vue

@@ -104,9 +104,6 @@ export default {
     };
   },
   methods: {
-    // allReceive(){
-
-    // },
     receiver(scope) {
       this.$confirm("是否接收", "提示", {
         confirmButtonText: "确定",

+ 225 - 0
src/views/inward/components/truckAppoint/purInwardRequirement.vue

@@ -0,0 +1,225 @@
+// 采购内转需求
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="toInsert"
+        v-if="activeName == 'first'"
+      >
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="Issue"
+        v-if="activeName == 'first'"
+      >
+        <i class="el-icon-download"></i>下发
+      </el-button>
+    </div>
+    <template>
+      <div>
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="未下发" name="first">
+            <dilTable v-bind.sync="first" @selection-change="selectionChange">
+              <el-table-column fixed="right" label="操作" width="100">
+                <template slot-scope="scope">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="deleteRequirement(scope)"
+                  >
+                    删除
+                  </el-button>
+                </template>
+              </el-table-column>
+            </dilTable>
+          </el-tab-pane>
+          <el-tab-pane label="已下发" name="second">
+            <dilTable v-bind.sync="second">
+              <el-table-column fixed="right" label="操作" width="100">
+                <template slot-scope="scope">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="stopRequirement(scope)"
+                  >
+                    停用
+                  </el-button>
+                </template>
+              </el-table-column>
+            </dilTable>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+    </template>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      inputText: "",
+      first: {
+        // first请求数据的地址
+        requestUrl:
+          "",
+        selectionType: "select",
+        mapList: [],
+      },
+      second: {
+        // second请求数据的地址
+        requestUrl:
+          "",
+      },
+      activeName: "first",
+    };
+  },
+  created(){
+    if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"){
+        this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" 
+        this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1"
+    }else{
+         this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" + getCookie("orgCode")
+         this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" + getCookie("orgCode")
+    }
+  },
+  methods: {
+    getRequestUrl(){
+      if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"){
+        this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" + "&t=" + new Date()
+        this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1"  + "&t=" + new Date()
+    }else{
+         this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" + getCookie("orgCode") + "&t=" + new Date()
+         this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" + getCookie("orgCode") + "&t=" + new Date()
+    }
+    },
+    selectionChange(selection) {
+      this.first.mapList = selection;
+    },
+    toInsert() {
+      this.$router.push("/addRequirement");
+    },
+    deleteRequirement(scope) {
+      console.log(scope.row.requirementId)
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post(
+              "/api/v1/ams/deleteTruckRequirement/" + scope.row.requirementId
+            )
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    stopRequirement(scope){
+
+      this.$confirm("是否停用", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/ams/changePlanStatus/" + scope.row.planId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "停用成功!",
+                });
+              this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "停用失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消下发!",
+          });
+        });
+    },
+    Issue() {
+      this.$confirm("是否下发", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/ams/downRequirement", this.first.mapList)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "下发成功!",
+                });
+              this.getRequestUrl()
+              this.activeName = 'second'
+              } else {
+                this.$message({
+                  message: "下发失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消下发!",
+          });
+        });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.steel_inbound{
+  .sache{
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+  }
+</style>

+ 1 - 2
src/views/inward/components/truckAppoint/requirement.vue

@@ -13,8 +13,7 @@
         @click="toInsert"
         v-if="activeName == 'first'"
       >
-        <i class="el-icon-plus"></i>新增采购内转需求
-      </el-button>
+        <i class="el-icon-plus"></i>新增</el-button>
       <!-- <el-button
         type="primary"
         class="btn"

+ 368 - 0
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -0,0 +1,368 @@
+//新增运输派单
+//新增运输订单
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增运输订单派车</page-title>
+    <!-- 零星订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable
+        v-bind.sync="option"
+        @radio-change="currentRadioChange"
+      ></dilTable>
+    </div>
+    <!-- 表单选择车辆-->
+    <div class="from">
+       <div class="line">
+        <span class="text">线路</span>
+        <el-input
+          v-model="lineName"
+          placeholder="请选择线路"
+          disabled
+        ></el-input>
+        <el-button type="primary" @click="onClick(1)">浏览</el-button>
+      </div>
+      <div class="vehicle">
+        <span class="text">车辆</span>
+        <el-button type="primary" @click="onClick(2)">浏览</el-button>
+        <span class="span"></span>
+      </div>
+    </div>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="deleteRow(scope.$index)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-drawer 
+      :visible.sync="lineDrawer" 
+      :with-header="false"
+      :destroy-on-close="true"
+      direction="rtl"
+      size="40%"
+      :show-close="true"
+      :wrapperClosable="false"
+      close-on-press-escape
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="lineText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的车辆 -->
+        <dilTable
+          v-bind.sync="line"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 车辆模态框 -->
+    <el-drawer 
+      :visible.sync="truckDrawer" 
+      :with-header="false"
+      :destroy-on-close="true"
+      direction="rtl"
+      size="40%"
+      :show-close="true"
+      :wrapperClosable="false"
+      close-on-press-escape
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="truckText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的车辆 -->
+        <dilTable
+          v-bind.sync="truck"
+          @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>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      planId : null ,
+      disabled:false,
+      //线路名称
+      lineId:null,
+      lineName:null,
+      lineText:null,
+      materialId:null,
+      lineDrawer:false,
+      //线路的表格
+      line: {
+        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        selectionType: "radio",
+      },
+      //已经选择车辆物资信息
+      selectionList:[],
+      //销售订单物资信息
+      option: {
+        // 表格请求数据的地址
+        requestUrl:"",
+        // 控制显示当选列
+        selectionType: "radio",
+        isPagination: false,
+      },
+      //是否打开选择车辆的模态框
+      truckDrawer:false,
+      //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "select",
+      },
+      tableTop: [
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+        }
+      ],
+      truckText:null,
+      //当前多选选中的车辆
+      selectTruck:[],
+    };
+  },
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+        this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&carrierSsoId=" + getCookie("userId");
+    } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+        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:10,
+          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')
+    },
+    //点击删除按钮删除当前点击的对象
+    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
+        }
+      
+    },
+    //车辆模态框框计算
+    selectTruckClick(){
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          getCookie("userId") + "&index="+this.truckText;
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
+      }
+    },
+    //车辆表格
+    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;
+      }  
+    },
+    //主界面表格单选
+    currentRadioChange(row) {
+      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 {
+      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;
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 300 - 0
src/views/inward/components/truckOrder/purInwardTruckOrder.vue

@@ -0,0 +1,300 @@
+//运输派单
+<template>
+  <div class="transportOrder">
+    <div class="transportOrder_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>
+      <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
+    <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>
+    </span>
+    </el-dialog>
+    <div class="transportOrder_bottom">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 已下发 -->
+        <el-tab-pane label="未接收" name="first">
+          <dilTable v-bind.sync="first">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+               <el-button @click="updateClick(scope)" type="text" size="small">
+                修改
+              </el-button>
+             <el-button @click="deleteClick(scope)" type="text" size="small">
+                删除
+              </el-button>
+            </template>
+          </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已接收 -->
+        <el-tab-pane label="已接收" name="Received">
+          <dilTable v-bind.sync="Received">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="deleteClick(scope)" type="text" size="small">
+                关闭
+              </el-button>
+            </template>
+          </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已完成 -->
+        <el-tab-pane label="已完成" name="completed">
+          <dilTable v-bind.sync="completed">
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div> 
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      //模态窗的框计算
+      inputText: null,
+      //是否弹出对话框
+      dialogTableVisible: false,
+      //输入框的值
+      input: null,
+      //选项卡的当前选中的值
+      activeName: "first",
+      //已下发的表格
+      first: {
+        requestUrl:"",
+      },
+      //车辆信息的表格
+      truck: {
+        requestUrl: "" ,
+        // 控制显示当选列
+        selectionType: "radio",
+      },
+      Received:{
+        requestUrl: "",
+      },
+      completed:{
+        requestUrl: "",
+      },
+       //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "radio",
+      },
+      //当前选中的订单id
+      selectOrderId: null,
+      //选中的车辆号
+      capacityNumber: "",
+      //选中的运力id
+      capacityId: null,
+      //是否关闭模态框
+      drawer: false,
+      //模态框从左往右打开
+      direction: "rtl",
+
+      orderId:null,
+      //多选的选中的订单id
+      selectionList: [],
+      //区别点击的是添加运力,还是修改
+      index: null,
+    };
+  },
+  created(){
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+      } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+      }
+      if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + getCookie("userId"),
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&carrierId=" + getCookie("userId")
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }
+  },
+  methods: {
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    getRequestUrl(){
+        if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date() ,
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }
+    },
+    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();
+      }
+    },
+    currentRadioChange1(row){
+      console.log(row)
+      this.capacityId = row.capacityId
+    },
+     //删除运输订单
+    deleteClick(scope){
+      this.$confirm('是否删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+            this.axios
+            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });     
+                this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+    },
+    //修改运输订单
+    updateClick(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.getRequestUrl()
+            this.dialogTableVisible = false
+          }else{
+            this.$message.error("修改运力失败")
+          }
+        })
+    },
+    handleClick(tab, event) {
+      this.getRequestUrl()
+    },
+    // 查看物资详情
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      this.materialDetails(row.orderId);
+    },
+    //查看当前订单的物资信息
+    materialDetails(orderId) {
+      this.axios
+        .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + orderId)
+        .then((res) => {
+          if (res.data.code == "200") {
+            this.tableData = res.data.data;
+          }
+        });
+    },
+    Insert(){
+      this.$router.push("addPurInwardOrder")
+    }
+  },
+};
+</script>
+
+<style lang="scss">
+
+.transportOrder {
+  .transportOrder_top {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-input{
+  width: 20%;
+}
+  }
+  .drawer_top {
+    width: 100%;
+    height: 50px;
+    padding-left: 20px;
+    display: flex;
+    align-items: center;
+  }
+}
+</style>

+ 12 - 1
src/views/inward/router/index.js

@@ -8,8 +8,15 @@ import main from '@/components/main.vue'
 // 系统配置管理
 //运输预约--提出需求
 import requirement from '@/views/inward/components/truckAppoint/requirement.vue'
+//运输预约--提出采购内转需求
+import purInwardRequirement from '@/views/inward/components/truckAppoint/purInwardRequirement.vue'
 //运输预约--制定计划
 import truckAppointPlan from '@/views/inward/components/truckAppoint/plan.vue'
+//运输订单--新增采购内转派单
+import addPurInwardOrder from '@/views/inward/components/truckOrder/addPurInwardOrder.vue'
+//运输订单--采购内转派单
+import purInwardTruckOrder from '@/views/inward/components/truckOrder/purInwardTruckOrder.vue'
+
 //运输预约--制定内转钢材到异地库计划
 import RailPlan from '@/views/inward/components/truckAppoint/RailPlan.vue'
 //运输订单--分解计划
@@ -156,7 +163,11 @@ const constantRouterMap = [{
   },
   children: [
     {path: 'requirement',name: 'requirement',meta: {code: 'xtpzgl-yhgl'},component: requirement}, 
-    {path: 'truckAppointPlan',name: 'truckAppointPlan',meta: {code: 'xtpzgl-yhgl'},component: truckAppointPlan}, 
+    {path: 'purInwardRequirement',name: 'purInwardRequirement',meta: {code: 'xtpzgl-yhgl'},component: purInwardRequirement}, 
+    {path: 'truckAppointPlan',name: 'truckAppointPlan',meta: {code: 'xtpzgl-yhgl'},component: truckAppointPlan},
+    {path: 'purInwardTruckOrder',name: 'purInwardTruckOrder',meta: {code: 'xtpzgl-yhgl'},component: purInwardTruckOrder},
+    {path: 'addPurInwardOrder',name: 'addPurInwardOrder',meta: {code: 'xtpzgl-yhgl'},component: addPurInwardOrder},
+    {path: 'truckAppointPlan',name: 'truckAppointPlan',meta: {code: 'xtpzgl-yhgl'},component: truckAppointPlan},
     {path: 'RailPlan',name: 'RailPlan',meta: {code: 'xtpzgl-yhgl'},component: RailPlan}, 
     {path: 'truckOrderPlan',name: 'truckOrderPlan',meta: {code: 'xtpzgl-yhgl'},component: truckOrderPlan}, 
     {path: 'truckOrderRailPlan',name: 'truckOrderRailPlan',meta: {code: 'xtpzgl-yhgl'},component: truckOrderRailPlan}, 

+ 19 - 13
src/views/queue/components/qmsEnFacotory/addqueueFCancel.vue

@@ -27,7 +27,7 @@
       </div>
     </div>
     <div class="btn">
-      <el-button>取消</el-button>
+      <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="onclick">确认</el-button>
     </div>
   </div>
@@ -53,9 +53,14 @@ export default {
     };
   },
   methods: {
+    cancel(){
+        this.$router.push({
+          path: "/queueFCancel",
+        });
+    },
     onChange(val) {
       this.option.requestUrl =
-        "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId;
+        "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId+"&i="+new Date();
     },
     selectionChange(row) {
       this.resultIdList = [];
@@ -71,9 +76,7 @@ export default {
       console.log(mapValue);
       this.axios.post("/api/v1/qms/queueCancel", mapValue).then((res) => {
         if (res.data.code == "200") {
-          this.$router.push({
-            path: "/qmsEnFacotory/queueFCancel",
-          });
+          this.cancel();
           this.$message({
             message: "取消排队成功!",
             type: "success",
@@ -84,21 +87,22 @@ export default {
   },
 };
 </script>
-<style lang="scss" scoped>
+<style lang="scss">
 .addqueueFCancel {
   .top {
     width: 100%;
-    height: 5rem;
-    padding-left: 3.125rem;
-    padding-top: 1.25rem;
+    height: 80px;
+    padding-left: 50px;
+    padding-top: 20px;
   }
   .tab {
     width: 100%;
-    max-height: 18.75rem;
+    max-height: 300px;
   }
   .reason {
     width: 100%;
-    height: 13.125rem;
+    margin-top: 30px;
+    margin-bottom: 30px;
     display: flex;
     align-items: center;
     justify-content: center;
@@ -106,13 +110,15 @@ export default {
       display: flex;
       width: 30%;
       .text {
-        width: 6.25rem;
+        width: 100px;
+        text-align: right;
+        margin-right: 10px;
       }
     }
   }
   .btn {
     width: 100%;
-    height: 5rem;
+    height: 80px;
     display: flex;
     align-items: center;
     justify-content: center;

+ 15 - 12
src/views/queue/components/qmsEnFacotory/addqueueFJumpLine.vue

@@ -27,7 +27,7 @@
       </div>
     </div>
     <div class="btn">
-      <el-button>取消</el-button>
+      <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="onclick">确认</el-button>
     </div>
   </div>
@@ -51,9 +51,14 @@ export default {
     };
   },
   methods: {
+    cancel(){
+        this.$router.push({
+          path: "/queueFJumpLine",
+        });
+    },
     onChange(val) {
       this.option.requestUrl =
-        "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId;
+        "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId+"&i="+new Date();
     },
     currentRadioChange(row) {
         this.resultId = row.resultId;
@@ -66,9 +71,7 @@ export default {
       console.log(mapValue);
       this.axios.post("/api/v1/qms/queueCutInLine", mapValue).then((res) => {
         if (res.data.code == "200") {
-          this.$router.push({
-            path: "/qmsEnFacotory/queueFJumpLine",
-          });
+          this.cancel();
           this.$message({
             message: "插队排队成功!",
             type: "success",
@@ -83,17 +86,17 @@ export default {
 .addqueueFCancel {
   .top {
     width: 100%;
-    height: 5rem;
-    padding-left: 3.125rem;
-    padding-top: 1.25rem;
+    height: 80px;
+    padding-left: 50px;
+    padding-top: 20px;
   }
   .tab {
     width: 100%;
-    max-height: 18.75rem;
+    max-height: 300px;
   }
   .reason {
     width: 100%;
-    height: 13.125rem;
+    height: 210px;
     display: flex;
     align-items: center;
     justify-content: center;
@@ -101,13 +104,13 @@ export default {
       display: flex;
       width: 30%;
       .text {
-        width: 6.25rem;
+        width: 100px;
       }
     }
   }
   .btn {
     width: 100%;
-    height: 5rem;
+    height: 80px;
     display: flex;
     align-items: center;
     justify-content: center;

+ 36 - 14
src/views/queue/components/qmsEnFacotory/addqueueFTransfer.vue

@@ -13,8 +13,17 @@
     <div class="reason">
       <dil-form :formId="248" v-model="form1" @change="onChange1"></dil-form>
     </div>
+    <div class="input_textarea">
+      <span>转移原因:</span>
+      <el-input
+        type="textarea"
+        :rows="2"
+        placeholder="请输入内容"
+        v-model="resultTransferReason">
+      </el-input>
+    </div>
     <div class="btn">
-      <el-button>取消</el-button>
+      <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="onclick">确认</el-button>
     </div>
   </div>
@@ -36,18 +45,21 @@ export default {
       // 排队实绩id
       resultId:0,
         //转移原因 
-        resultTransferReason:''  
+      resultTransferReason:''  
     };
   },
   methods: {
+    cancel(){
+        this.$router.push({
+          path: "/queueFTransfer",
+        });
+    },
     onChange(val) {
-       
       this.option.requestUrl =
-        "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId;
+        "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId+"&i="+new Date();
     },
     onChange1(val) {
       this.gatepostId = val.gatepostId;
-      this.resultTransferReason = val.resultTransferReason;
     },
     currentRadioChange(row) {
       this.resultId = row.resultId
@@ -58,12 +70,11 @@ export default {
         gatepostId:this.gatepostId,
         resultTransferReason: this.resultTransferReason,
       };
+      console.log(mapValue)
       if(mapValue.resultId !== 0 && mapValue.gatepostId !== 0 && mapValue.resultTransferReason !== ""){
         this.axios.post("/api/v1/qms/changeQueue",mapValue).then((res)=>{
           if(res.data.code == "200"){
-            this.$router.push({
-                path: "/qmsEnFacotory/queueFTransfer",
-            });
+            this.cancel();
             this.$message({
                 message: '转移成功!',
                 type: 'success'
@@ -100,24 +111,35 @@ export default {
 .addqueueFCancel {
   .top {
     width: 100%;
-    height: 5rem;
-    padding-left: 3.125rem;
-    padding-top: 1.25rem;
+    height: 80px;
+    padding-left: 50px;
+    padding-top: 20px;
   }
   .tab {
     width: 100%;
-    max-height: 18.75rem;
+    max-height: 300px;
   }
   .reason {
     width: 100%;
-    height: 13.125rem;
     display: flex;
     align-items: center;
     justify-content: center;
+    margin-top: 30px;
+    .el-form{
+      width: 400px;
+    }
+  }
+  .input_textarea{
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .el-textarea{
+      width: 320px;
+    }
   }
   .btn {
     width: 100%;
-    height: 5rem;
+    height: 80px;
     display: flex;
     align-items: center;
     justify-content: center;

+ 12 - 6
src/views/queue/components/qmsEnFacotory/queueFApply.vue

@@ -2,11 +2,13 @@
 <template>
     <div class="sale">
         <div class="top">
-            <!-- 框计算 -->
+            <span>车牌号:</span>
             <el-input
                 placeholder="请输入内容"
                 v-model="inputText"
-                clearable>
+                clearable
+                class="input"
+            >
             </el-input>
             <el-button type="primary" class="btn" @click="onclick">
                 <i class="el-icon-search"></i>查询
@@ -30,18 +32,22 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/qms/getQueueApply?apiId=125&con="+this.inputText;
+            this.option.requestUrl = "/api/v1/qms/getQueueApply?apiId=125&con="+this.inputText+"&i="+new Date();
         }
     }
 }
 </script>
-<style lang="scss" scoped>
+<style lang="scss">
     .sale{
         .top{
-            width: 100%;height: 5rem;
+            width: 100%;height: 80px;
             display: flex;
             align-items: center;
-            padding-left: 2.5rem;
+            padding-left: 40px;
+        }
+        .input{
+            width: 250px;
+            margin-right: 20px;
         }
     }
 </style>

+ 15 - 8
src/views/queue/components/qmsEnFacotory/queueFCancel.vue

@@ -2,13 +2,13 @@
 <template>
   <div class="sale">
     <div class="top">
-      <!-- 框计算 -->
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      <span>车牌号:</span>
+      <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="btn" @click="onclick(1)">
+      <el-button type="primary" class="btn1" @click="onclick(1)">
         <i class="el-icon-plus"></i>新增排队取消
       </el-button>
     </div>
@@ -32,24 +32,31 @@ export default {
     onclick(num) {
       if (num == 0) {
         this.option.requestUrl =
-          "/api/v1/qms/getQueueCancel?apiId=131&con=" + this.inputText;
+          "/api/v1/qms/getQueueCancel?apiId=131&con=" + this.inputText+"&i="+new Date();
       } else if (num == 1) {
         this.$router.push({
-          path: "/addqueueFCancel/",
+          path: "/addqueueFCancel",
         });
       }
     },
   },
 };
 </script>
-<style lang="scss" scoped>
+<style lang="scss">
 .sale {
   .top {
     width: 100%;
-    height: 5rem;
+    height: 80px;
     display: flex;
     align-items: center;
-    padding-left: 2.5rem;
+    padding-left: 40px;
+  }
+  .input{
+    width: 250px;
+    margin-right: 20px;
+  }
+  .btn1{
+    margin-left: 20px;
   }
 }
 </style>

+ 9 - 4
src/views/queue/components/qmsEnFacotory/queueFDetails.vue

@@ -2,10 +2,11 @@
 <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">
@@ -30,7 +31,7 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/qms/getAllQueueMes?apiId=184&con="+this.inputText;
+            this.option.requestUrl = "/api/v1/qms/getAllQueueMes?apiId=184&con="+this.inputText+"&i="+new Date();
         }
     }
 }
@@ -38,10 +39,14 @@ export default {
 <style lang="scss" scoped>
     .sale{
         .top{
-            width: 100%;height: 5rem;
+            width: 100%;height: 80px;
             display: flex;
             align-items: center;
-            padding-left: 2.5rem;
+            padding-left: 40px;
+        }
+        .input{
+            width: 250px;
+            margin-right: 20px;
         }
     }
 </style>

+ 9 - 4
src/views/queue/components/qmsEnFacotory/queueFEnd.vue

@@ -2,10 +2,11 @@
 <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">
@@ -30,7 +31,7 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/qms/getQueueEndResult?apiId=133&con="+this.inputText;
+            this.option.requestUrl = "/api/v1/qms/getQueueEndResult?apiId=133&con="+this.inputText+"&i="+new Date();
         }
     }
 }
@@ -38,10 +39,14 @@ export default {
 <style lang="scss" scoped>
     .sale{
         .top{
-            width: 100%;height: 5rem;
+            width: 100%;height: 80px;
             display: flex;
             align-items: center;
-            padding-left: 2.5rem;
+            padding-left: 40px;
+            .input{
+                width: 250px;
+                margin-right: 20px;
+            }
         }
     }
 </style>

+ 9 - 4
src/views/queue/components/qmsEnFacotory/queueFInstructionReceive.vue

@@ -2,10 +2,11 @@
 <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">
@@ -30,7 +31,7 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/qms/orderReceive?apiId=130&queueType=1&con="+this.inputText;
+            this.option.requestUrl = "/api/v1/qms/orderReceive?apiId=130&queueType=1&con="+this.inputText+"&i="+new Date();
         }
     }
 }
@@ -38,10 +39,14 @@ export default {
 <style lang="scss" scoped>
     .sale{
         .top{
-            width: 100%;height: 5rem;
+            width: 100%;height: 80px;
             display: flex;
             align-items: center;
-            padding-left: 2.5rem;
+            padding-left: 40px;
+            .input{
+                width: 250px;
+                margin-right: 20px;
+            }
         }
     }
 </style>

+ 9 - 4
src/views/queue/components/qmsEnFacotory/queueFIssue.vue

@@ -2,10 +2,11 @@
 <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">
@@ -30,7 +31,7 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/qms/getQueueApply?apiId=127&con="+this.inputText;
+            this.option.requestUrl = "/api/v1/qms/getQueueApply?apiId=127&con="+this.inputText+"&i="+new Date();
         }
     }
 }
@@ -38,10 +39,14 @@ export default {
 <style lang="scss" scoped>
     .sale{
         .top{
-            width: 100%;height: 5rem;
+            width: 100%;height: 80px;
             display: flex;
             align-items: center;
-            padding-left: 2.5rem;
+            padding-left: 40px;
+        }
+        .input{
+            width: 250px;
+            margin-right: 20px;
         }
     }
 </style>

+ 14 - 7
src/views/queue/components/qmsEnFacotory/queueFJumpLine.vue

@@ -2,13 +2,13 @@
 <template>
   <div class="sale">
     <div class="top">
-      <!-- 框计算 -->
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      <span>车牌号:</span>
+      <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="btn" @click="onclick(1)">
+      <el-button type="primary" class="bt" @click="onclick(1)">
         <i class="el-icon-plus"></i>新增排队插队
       </el-button>
     </div>
@@ -32,10 +32,10 @@ export default {
     onclick(num) {
       if (num == 0) {
         this.option.requestUrl =
-          "/api/v1/qms/getQueueInsert?apiId=132&con=" + this.inputText;
+          "/api/v1/qms/getQueueInsert?apiId=132&con=" + this.inputText+"&i="+new Date();
       } else if (num == 1) {
         this.$router.push({
-          path: "/addqueueFJumpLine/",
+          path: "/addqueueFJumpLine",
         });
       }
     },
@@ -46,10 +46,17 @@ export default {
 .sale {
   .top {
     width: 100%;
-    height: 5rem;
+    height: 80px;
     display: flex;
     align-items: center;
-    padding-left: 2.5rem;
+    padding-left: 40px;
+    .input{
+      width: 250px;
+      margin-right: 20px;
+    }
+    .bt{
+      margin-left: 20px;
+    }
   }
 }
 </style>

+ 16 - 12
src/views/queue/components/qmsEnFacotory/queueFListMonitor.vue

@@ -2,8 +2,8 @@
 <template>
   <div class="sale">
     <div class="top">
-      <!-- 框计算 -->
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      <span>门岗名称:</span>
+      <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>查询
@@ -88,7 +88,7 @@ export default {
     onclick(num, row) {
       if (num == 0) {
         this.option.requestUrl =
-          "/api/v1/qms/listMonitor?apiId=134&con=" + this.inputText;
+          "/api/v1/qms/listMonitor?apiId=134&con=" + this.inputText+"&i="+new Date();
       } else if (num == 1) {
         console.log(row);
         // 记录重复点击次数
@@ -131,24 +131,28 @@ export default {
 .sale {
   .top {
     width: 100%;
-    height: 5rem;
+    height: 80px;
     display: flex;
     align-items: center;
-    padding-left: 2.5rem;
+    padding-left: 40px;
+    .input{
+        width: 250px;
+        margin-right: 20px;
+    }
   }
   .tab {
     .xq {
       display: flex;
       .box {
-        padding-right: 1.25rem;
+        padding-right: 20px;
         .index {
           display: flex;
           justify-content: center;
           span {
             background-color: #87ceeb;
             display: inline-block;
-            width: 1.25rem;
-            height: 1.25rem;
+            width: 20px;
+            height: 20px;
             display: flex;
             align-items: center;
             justify-content: center;
@@ -163,17 +167,17 @@ export default {
         .time {
           display: flex;
           color: #fff;
-          font-size: 0.75rem;
+          font-size: 12px;
           .carNumber {
             background-color: #7eb9ff;
-            height: 1.25rem;
+            height: 20px;
             display: flex;
             justify-content: center;
             align-items: center;
           }
           .loadTime {
-            background-color: #4b9eff;
-            height: 1.25rem;
+            background-color: #3e62d8;
+            height: 20px;
             display: flex;
             justify-content: center;
             align-items: center;

+ 9 - 4
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -2,10 +2,11 @@
 <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">
@@ -30,7 +31,7 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/qms/getQueueListByQueueUp?apiId=128&con="+this.inputText;
+            this.option.requestUrl = "/api/v1/qms/getQueueListByQueueUp?apiId=128&con="+this.inputText+"&i="+new Date();
         }
     }
 }
@@ -38,10 +39,14 @@ export default {
 <style lang="scss" scoped>
     .sale{
         .top{
-            width: 100%;height: 5rem;
+            width: 100%;height: 80px;
             display: flex;
             align-items: center;
-            padding-left: 2.5rem;
+            padding-left: 40px;
+        }
+        .input{
+            width: 250px;
+            margin-right: 20px;
         }
     }
 </style>

+ 13 - 6
src/views/queue/components/qmsEnFacotory/queueFTransfer.vue

@@ -2,13 +2,13 @@
 <template>
   <div class="sale">
     <div class="top">
-      <!-- 框计算 -->
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      <span>车牌号:</span>
+      <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="btn" @click="onclick(1)">
+      <el-button type="primary" class="btn1" @click="onclick(1)">
         <i class="el-icon-plus"></i>新增排队转移
       </el-button>
     </div>
@@ -32,7 +32,7 @@ export default {
     onclick(num) {
       if (num == 0) {
         this.option.requestUrl =
-          "/api/v1/qms/getChangeQueue?apiId=124&con=" + this.inputText;
+          "/api/v1/qms/getChangeQueue?apiId=124&con=" + this.inputText+"&i="+new Date();
       } else if (num == 1) {
         this.$router.push({
           path: "/addqueueFTransfer/",
@@ -46,10 +46,17 @@ export default {
 .sale {
   .top {
     width: 100%;
-    height: 5rem;
+    height: 80px;
     display: flex;
     align-items: center;
-    padding-left: 2.5rem;
+    padding-left: 40px;
+  }
+  .input{
+      width: 250px;
+      margin-right: 20px;
+  }
+  .btn1{
+    margin-left: 20px;
   }
 }
 </style>

+ 9 - 4
src/views/queue/components/qmsEnFacotory/queueFTruckMonitor.vue

@@ -2,10 +2,11 @@
 <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">
@@ -30,7 +31,7 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/qms/capacityMonitor?apiId=135&gridType=3&con="+this.inputText;
+            this.option.requestUrl = "/api/v1/qms/capacityMonitor?apiId=135&gridType=3&con="+this.inputText+"&i="+new Date();
         }
     }
 }
@@ -38,10 +39,14 @@ export default {
 <style lang="scss" scoped>
     .sale{
         .top{
-            width: 100%;height: 5rem;
+            width: 100%;height: 80px;
             display: flex;
             align-items: center;
-            padding-left: 2.5rem;
+            padding-left: 40px;
+            .input{
+                width: 250px;
+                margin-right: 20px;
+            }
         }
     }
 </style>

+ 9 - 2
src/views/sale/components/saleSelfMachine/printScan.vue

@@ -4,7 +4,7 @@
             <img :src="backgroundImgURL" width="100%" height="100%"/>
         </div>
         <div class="orderNumberData">
-            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" ref="inputs">
+            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" @blur="onInputBlur" ref="inputs">
             </el-input>
         </div>
     </div>    
@@ -26,10 +26,16 @@ export default {
     methods:{
         //输入框自动聚焦
         changfouce(){
+            console.log("enter")
         this.$nextTick((x)=>{
         this.$refs.inputs.focus();
         })
-        }
+        },
+        //失去焦点后自动执行获得焦点事件
+        // onInputBlur(){
+        //     console.log("获取焦点")
+        //     this.changfouce();
+        // }
         // toSaleSelfMachine(){
         //      this.$router.push({
         //         path:'/saleSelfMachine',
@@ -37,6 +43,7 @@ export default {
         // }
     },
     mounted(){
+        // this.changfouce();
     const timer = setInterval(()=>{
         // if(this.$refs.inputs.focus==false){
         //     console.log("false")

+ 92 - 61
src/views/sale/components/transport_appointment/openDistribution.vue

@@ -15,12 +15,9 @@
       <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 未抢单 -->
       	<el-tab-pane label="未接收" name="first" >
-						  <dilTable v-bind.sync="first" ref="table">
+						  <dilTable v-bind.sync="first" ref="table" @selection-change="currentSelectChange">
              <el-table-column fixed="right" label="操作" width="120">
         <template slot-scope="scope">
-          <el-button @click="Grab(scope)" type="text" size="small">
-            接收
-          </el-button>
           <el-button @click="detailclick(scope.row)" type="text" size="small">
             物资详情
           </el-button>
@@ -45,9 +42,8 @@
             </el-form>
           </template>
         </el-table-column>
-
-
       </dilTable>
+
 		</el-tab-pane>
      	<el-tab-pane label="已接收" name="second">
 				<dilTable v-bind.sync="second" ref="table1">
@@ -82,21 +78,14 @@
           </template>
         </el-table-column>
       </dilTable>
-      <!-- <el-drawer title="司机排班信息表" :visible.sync="drawer" :direction="direction" :before-close="handleClose"
-				:modal="false" size="30%" style="margin-top: 5.625rem;">
-        <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-left:20px;width:160px" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick()"  style="margin-bottom:15px">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-				<dilTable v-bind.sync="third" @radio-change="currentRadioChange"></dilTable>
-				<div>
-					<el-button type="primary" @click="makeSure">派发</el-button>
-				</div>
-			</el-drawer> -->
 		</el-tab-pane>
     </el-tabs>
     
     </div>
+
+    <div class="button-box" v-if="activeName=='first'">
+      <el-button type="primary" @click="receive">接收订单</el-button>
+    </div>
   </div>
 </template>
 
@@ -112,9 +101,12 @@ export default {
       inputText:"",
       dispatchId:null,
       input:"",
+      //所有选中的车序号订单
+      selectTruckOrder: [],
       first:{
         // first请求数据的地址
         requestUrl: "",
+        selectionType: "select",
       },
       second:{
         requestUrl:"",
@@ -198,10 +190,12 @@ export default {
 
 		// 		this.drawer=true
 		// 	},
-      currentRadioChange(selection) {
-				this.mapList = selection
-        console.log(this.mapList)
-			},
+    //车序号订单表格
+    currentSelectChange(select){
+      this.selectTruckOrder = [];
+      this.selectTruckOrder = select;
+      console.log("this.selectTruckOrder",this.selectTruckOrder)
+    },
     onclick() {
         this.third.requestUrl =
         "/api/v1/oms/getCapacityAndDriverList?apiId=246&con=" + this.input;
@@ -214,8 +208,15 @@ export default {
           center:true,
         })
         .then(() => {
+          //初始化承运商SsoId
+          var carrierSsoId = '';
+          if(getCookie("orgCode") == "chengyunshang"){
+            carrierSsoId =  getCookie('userId');
+          }else{
+            carrierSsoId = null;
+          }
         this.axios.post("/api/v1/oms/addAppTruckOrder?orderType=" + 1 + 
-        "&carrierId="+ 73 +"&dispatchId=" + this.dispatchId 
+        "&carrierId="+ carrierSsoId +"&dispatchId=" + this.dispatchId 
         + "&capacityNumber=" + this.mapList.capacityNumber)
         .then((res) => {
           if(res.data.code == 200){
@@ -239,45 +240,6 @@ export default {
         });
        
       },
-  	Grab(scope){
-      console.log(scope)
-      this.$confirm("是否接收", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          var carrierSsoId = '';
-          if(getCookie("orgCode") == "chengyunshang"){
-            carrierSsoId =  getCookie('userId');
-          }else{
-            carrierSsoId = null;
-          }
-          this.axios
-            .post("/api/v1/ams/lockDispatchSaleOrder?dispatchId="+ scope.row.dispatchId+"&carrierSsoId=" + carrierSsoId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "接单成功!",
-                });     
-                this.$router.go(0);
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "删除操作已取消!",
-          });
-        });
-    },
 
     // -------查看物资详情(未接收)
     detailclick(row) {
@@ -344,6 +306,67 @@ export default {
         });
     },
 
+    //接收所有已选中的订单
+    receive(){
+      this.$confirm("是否接收已选中的订单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          //初始化承运商SsoId
+          var carrierSsoId = '';
+          if(getCookie("orgCode") == "chengyunshang"){
+            carrierSsoId =  getCookie('userId');
+          }else{
+            carrierSsoId = null;
+          }
+          //所有选中的分派Id
+          var dispatchIdList = [];
+          this.selectTruckOrder.forEach((item,i) => {
+              //初始化mapItem
+              var mapItem = {
+                //分派Id
+                dispatchId : 0,
+              }
+              mapItem.dispatchId = item.dispatchId;
+              dispatchIdList.push(mapItem);
+          })
+          //保存承运商SsoId和所有选中的分派Id
+          let map = {
+            carrierSsoId : carrierSsoId,
+            mapList : dispatchIdList
+          }
+          console.log("map",map)
+          //请求后端
+          this.axios
+            .post("/api/v1/ams/lockDispatchSaleOrderList",map)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "接收成功!",
+                });     
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "接单失败,请联系管理员!",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "接单操作已取消!",
+          });
+        });
+
+      
+    }
+
   }
 }
 </script>
@@ -358,4 +381,12 @@ export default {
     }
   }
 }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 </style>

+ 18 - 11
src/views/sale/components/transport_appointment/openDistributionSection.vue

@@ -2,12 +2,11 @@
   <!-- 定向派单接单选择路段顺序号 -->
   <div id="contractDetails">
     <page-title>选择路段顺序号和车</page-title>
-
     <div class="lineId from">
       <div class="materialId">
         <span class="text">选择路线:</span>
-        <el-input class="input" v-model="lineName" disabled> </el-input>
-        <el-button type="primary" class="btn" @click="table = true">浏览</el-button>
+        <el-input class="input" v-model="lineNameAndRouter" disabled> </el-input>
+        <el-button type="primary" class="btn" @click="tableOpen">浏览</el-button>
       </div>
     </div>
     
@@ -15,7 +14,7 @@
       <div class="materialId">
         <span class="text">选择车辆:</span>
         <el-input class="input" v-model="capacityNumber" disabled> </el-input>
-        <el-button type="primary" @click="drawer = true" class="truckBtn"
+        <el-button type="primary" @click="drawerOpen" class="truckBtn"
           >浏览</el-button
         >
       </div>
@@ -42,7 +41,7 @@
       </div>
     </el-drawer>
 
-    <el-drawer title="选择车" :visible.sync="drawer" :direction="direction" :before-close="handleClose"
+    <el-drawer title="选择车" :visible.sync="drawer" :direction="direction"
 				:modal="false" size="30%" style="margin-top: 2.625rem;">
         <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-left:20px;width:160px" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick2()"  style="margin-bottom:15px">
@@ -73,6 +72,8 @@ export default {
       drawer: false,
       // 线路名称
       lineName: "",
+      //线路名称和路段
+      lineNameAndRouter : "",
       //线路id
       lineId: null,
       // 车牌号
@@ -91,11 +92,7 @@ export default {
     };
   },
   methods: {
-    onClick(index) {
-      this.selectionList.splice(index, 1);
-    },
     onclick1() {
-        
         this.option.requestUrl =
           "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
 
@@ -105,7 +102,16 @@ export default {
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&index=" +
           this.input;
     },
-    
+    //打开车辆模态框
+    drawerOpen(){
+        this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId="+ getCookie('userId')+"&i=" + new Date(),
+        this.drawer = true;
+    },
+    //打开线路模态框
+    tableOpen(){
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"+"&i=" + new Date(),
+         this.table = true;
+    },
     // 返回
     onClickCancel() {
       this.$router.push("/openDistribution");
@@ -115,6 +121,7 @@ export default {
     },
     currentRadioChange5(selection) {
       this.lineName = selection.lineName;
+      this.lineNameAndRouter = selection.lineName +"  "+selection.lineDesk;
       this.lineId = selection.lineId;
     },
     // 确认
@@ -173,7 +180,7 @@ export default {
     text-align: right;
   }
   .input{
-    width: 250px;
+    width: 380px;
     margin-right: 20px;
   }
 }

+ 12 - 8
src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue

@@ -2,7 +2,7 @@
   <!-- 抵达实绩信息页面 -->
   <div class="arrivalResult">
     <div class="top">
-      <el-form :inline="true">
+      <el-form :inline="true" style="margin-top: 0.5rem;">
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;">时间段</label>
          <el-date-picker
@@ -26,13 +26,17 @@
       </el-autocomplete>
         </el-form-item>
         <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">车牌号</label>
-      <el-input v-model="capacityNumber1" placeholder="请输入内容"></el-input>
-  </el-form-item>
-  <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">收货单位</label>
-      <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
-  </el-form-item> 
+      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">车牌号</label>
+      </el-form-item>
+      <el-form-item>
+          <el-input class="el-form-item__content" v-model="capacityNumber1" placeholder="请输入内容"></el-input>
+      </el-form-item>
+      <el-form-item>
+          <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">收货单位</label>
+      </el-form-item>
+      <el-form-item>
+          <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
+      </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="onSearch"><i class="el-icon-search"></i>查询</el-button>
         </el-form-item>

+ 8 - 4
src/views/sale/components/transport_excute/tms-offsite/inTransit.vue

@@ -2,7 +2,7 @@
   <!-- 在途运输信息选择页面 -->
   <div class="inTransit">
 
-    <el-form :inline="true">
+    <el-form :inline="true" style="margin-top: 0.5rem;">
   <el-form-item>
     <label class="el-form-item__label" style="width: auto;">时间段</label>
          <el-date-picker
@@ -25,11 +25,15 @@
       </el-autocomplete>
   </el-form-item>
   <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">车牌号</label>
-      <el-input v-model="capacityNumber1" placeholder="请输入内容"></el-input>
+      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">车牌号</label>
+  </el-form-item>
+  <el-form-item>
+      <el-input class="el-form-item__content" v-model="capacityNumber1" placeholder="请输入内容"></el-input>
+  </el-form-item>
+  <el-form-item>
+      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">收货单位</label>
   </el-form-item>
   <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">收货单位</label>
       <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
   </el-form-item> 
   <el-form-item>

+ 12 - 8
src/views/sale/components/transport_excute/tms-offsite/receiptResult.vue

@@ -2,7 +2,7 @@
   <!-- 收货实绩信息页面 -->
   <div class="receiptResult">
   <div class="top">
-    <el-form :inline="true">
+    <el-form :inline="true" style="margin-top: 0.5rem;">
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;">时间段</label>
          <el-date-picker
@@ -25,13 +25,17 @@
       </el-autocomplete>
         </el-form-item>
         <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">车牌号</label>
-      <el-input v-model="capacityNumber1" placeholder="请输入内容"></el-input>
-  </el-form-item>
-  <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">收货单位</label>
-      <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
-  </el-form-item> 
+      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">车牌号</label>
+      </el-form-item>
+      <el-form-item>
+          <el-input class="el-form-item__content" v-model="capacityNumber1" placeholder="请输入内容"></el-input>
+      </el-form-item>
+      <el-form-item>
+          <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">收货单位</label>
+      </el-form-item>
+      <el-form-item>
+          <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
+      </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="onSearch"><i class="el-icon-search"></i>查询</el-button>
         </el-form-item>

+ 13 - 9
src/views/sale/components/transport_excute/tms-offsite/transportInfo.vue

@@ -2,7 +2,7 @@
   <!-- 运输实绩信息页面 -->
   <div class="transportInfo">
     <div class="top">
-      <el-form :inline="true">
+      <el-form :inline="true" style="margin-top: 0.5rem;">
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;">时间段</label>
          <el-date-picker
@@ -24,14 +24,18 @@
         <i class="el-icon-edit el-input__icon" slot="suffix"> </i>
       </el-autocomplete>
         </el-form-item>
-        <el-form-item>
-      <label class="el-form-item__label" style="width: auto; margin-left:5px">车牌号</label>
-      <el-input v-model="capacityNumber1" placeholder="请输入内容"></el-input>
-  </el-form-item>
-  <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">收货单位</label>
-      <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
-  </el-form-item> 
+      <el-form-item>
+      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">车牌号</label>
+      </el-form-item>
+      <el-form-item>
+          <el-input class="el-form-item__content" v-model="capacityNumber1" placeholder="请输入内容"></el-input>
+      </el-form-item>
+      <el-form-item>
+          <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">收货单位</label>
+      </el-form-item>
+      <el-form-item>
+          <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
+      </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="onSearch"><i class="el-icon-search"></i>查询</el-button>
         </el-form-item>

+ 134 - 12
src/views/sale/components/transport_order/receiveOrder.vue

@@ -7,13 +7,39 @@
       <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-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>
+    <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">
           <!-- 未接收 -->
           <el-tab-pane label="未接收" name="third">
             <dilTable v-bind.sync="option3" ref="table2">
-              <el-table-column fixed="right" label="操作" width="120">
+              <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"
@@ -129,6 +155,7 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      inputTruck:null,
       inputText: "",
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
@@ -148,6 +175,11 @@ export default {
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
           getCookie("userId"),
       },
+      truck: {
+        requestUrl:
+          "",
+        selectionType:"radio"
+      },
       activeName: "third",
       //记录旧的row对象(已接收)
       oldRow: "",
@@ -186,28 +218,101 @@ export default {
       tableData: [],
       tableData1: [],
       tableData2: [],
+      capacityId:null,
+      dialogTableVisible:false,
+      orderId:null
     };
   },
   methods: {
+    onClickTruck(){
+        if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          getCookie("userId") + "&index="+this.inputTruck;
+      } else {
+        this.truck.requestUrl =
+          "/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()
+    },
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    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();
+      } else {
+      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)
+    },
+    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("修改运力失败")
+          }
+        })
+    },
     onClick() {
       if (this.activeName == "first") {
         this.option1.requestUrl =
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&carrierSsoId=" +
           getCookie("userId") +
           "&con=" +
-          this.input;
+          this.inputText;
       } else if (this.activeName == "second") {
         this.option1.requestUrl =
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&carrierSsoId=" +
           getCookie("userId") +
           "&con=" +
-          this.input;
+          this.inputText;
       } else {
         this.option1.requestUrl =
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierSsoId=" +
           getCookie("userId") +
           "&con=" +
-          this.input;
+          this.inputText;
       }
     },
     // -------查看物资详情 (已接收)
@@ -306,14 +411,31 @@ export default {
     },
     //关闭选中行的订单
     closeOrder(row){
-      this.$message.success('关闭成功');
-      this.axios
-        .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
-        .then((res) => {
-          if(res.data.code == '200'){
-            this.$router.go(0);
-          }
-        });   
+      this.$confirm("是否关闭", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        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);
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消关闭!",
+          });
+        }) 
         
     },
   },

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff