huk 3 년 전
부모
커밋
6f5f68f0ce
63개의 변경된 파일2507개의 추가작업 그리고 749개의 파일을 삭제
  1. 12 4
      build/utils.js
  2. 1 1
      src/components/DilCommonUI/packages/table/src/table.js
  3. 2 0
      src/components/DilCommonUI/packages/table/src/table.vue
  4. 3 2
      src/views/RMS/components/addCapacity.vue
  5. 1 1
      src/views/RMS/components/addCarDriver.vue
  6. 2 1
      src/views/RMS/components/addCarrier.vue
  7. 62 10
      src/views/RMS/components/addConsignee.vue
  8. 1 1
      src/views/RMS/components/addGatepost.vue
  9. 12 11
      src/views/RMS/components/addMaterial.vue
  10. 1 1
      src/views/RMS/components/addNotice.vue
  11. 1 1
      src/views/RMS/components/addOilPrice.vue
  12. 53 39
      src/views/RMS/components/addPersonnel.vue
  13. 1 1
      src/views/RMS/components/addPier.vue
  14. 1 1
      src/views/RMS/components/addPort.vue
  15. 1 1
      src/views/RMS/components/addPortStorageYard.vue
  16. 1 1
      src/views/RMS/components/addRawWarehouse.vue
  17. 1 1
      src/views/RMS/components/addRmsShipper.vue
  18. 65 10
      src/views/RMS/components/addSupplier.vue
  19. 1 1
      src/views/RMS/components/addTruckCalculate.vue
  20. 4 0
      src/views/RMS/components/capacity.vue
  21. 1 2
      src/views/RMS/components/carrier.vue
  22. 1 1
      src/views/RMS/components/editCapacity.vue
  23. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue
  24. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/grossWeight.vue
  25. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/outFactory.vue
  26. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/tareWeight.vue
  27. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/unload.vue
  28. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue
  29. 25 4
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/grossWeight.vue
  30. 23 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/load.vue
  31. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/outFactory.vue
  32. 24 3
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/tareWeight.vue
  33. 46 47
      src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue
  34. 141 38
      src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/transportAppoint.vue
  35. 29 12
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue
  36. 24 14
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue
  37. 2 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/load.vue
  38. 80 90
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue
  39. 145 43
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/transportAppoint.vue
  40. 270 1
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/addTransportOrder.vue
  41. 34 291
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue
  42. 0 0
      src/views/SporadicManage/components/sporadicMaterial/transportPlan/addTransportPlan.vue
  43. 235 0
      src/views/SporadicManage/components/sporadicMaterial/transportPlan/transportPlan.vue
  44. 1 1
      src/views/SporadicManage/components/steelReturn/transportAppoint/addSteelReturnTransportAppoint.vue
  45. 6 0
      src/views/SporadicManage/router/index.js
  46. 1 1
      src/views/TMS/components/importedTruck/submitWaybill.vue
  47. 0 1
      src/views/WMS/components/steel/steel_restack.vue
  48. 664 0
      src/views/appoint/components/saleContract/addSaleCokeSend.vue
  49. 42 12
      src/views/appoint/components/saleContract/addSaleOrderSend.vue
  50. 146 0
      src/views/appoint/components/saleContract/saleCokeInward.vue
  51. 6 1
      src/views/appoint/components/saleContract/saleOrder.vue
  52. 4 0
      src/views/appoint/router/index.js
  53. 0 3
      src/views/inward/components/truckAppoint/plan.vue
  54. 9 2
      src/views/sale/components/saleSelfMachine/printScan.vue
  55. 12 8
      src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue
  56. 8 4
      src/views/sale/components/transport_excute/tms-offsite/inTransit.vue
  57. 12 8
      src/views/sale/components/transport_excute/tms-offsite/receiptResult.vue
  58. 13 9
      src/views/sale/components/transport_excute/tms-offsite/transportInfo.vue
  59. 34 11
      src/views/sale/components/transport_order/receiveOrder.vue
  60. 4 0
      src/views/statisticalReport/app.js
  61. 3 1
      src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue
  62. 53 23
      src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue
  63. 12 1
      src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

+ 12 - 4
build/utils.js

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

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

@@ -67,7 +67,7 @@ export default {
             console.log(" 判断是否需要在请求体中放入参数")
             
             this.dataRequestQuery=this.requestQuery;
-            console.log(this.dataRequestQuery.resultBreakId)
+            // console.log(this.dataRequestQuery.resultBreakId)
           }
 
           let data = undefined;

+ 2 - 0
src/components/DilCommonUI/packages/table/src/table.vue

@@ -226,6 +226,8 @@ export default {
     // 刷新表格数据
     refreshData() {
       this.requestData();
+      //多选表格,清空用户的选择
+      this.$refs.mainTable.clearSelection();
     },
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);

+ 3 - 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"){
@@ -136,6 +136,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
       };

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

@@ -121,7 +121,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+         // this.$refs['table'].resetField();
         });
     },
     // 取消

+ 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("添加成功");

+ 62 - 10
src/views/RMS/components/addConsignee.vue

@@ -1,10 +1,32 @@
 <template>
   <!-- 添加收货客户信息 -->
-  <div class="addWagonLoad">
+  <div class="addConsignee">
     <PageTitle>返回</PageTitle>
      <div class="form-box" style="margin-right: 10rem">
         <dil-form :formId="367" v-model="form1" ref="from1"></dil-form>
       </div>
+      <div class="f-box">
+         <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+        >
+        <el-form-item label="收货单位">
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateConsignee"
+          :fetch-suggestions="querySearchConsignee"
+          placeholder="请输入收货单位名称"
+          :trigger-on-focus="false"
+          @select="handleSelectConsignee"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.consigneeCompanyName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+        </el-form>
+      </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -20,10 +42,39 @@ export default {
   data() {
     return {
       form1: {},
+      stateConsignee:null,
+      restaurantsConsignee:null,
     };
   },
   mounted() {},
   methods: {
+        //收货单位弹出层
+    handleSelectConsignee(item){
+      console.log(this.consigneeId)
+      this.consigneeId = item.consigneeId
+      item.consigneeCompanyName = this.consigneeCompanyName
+      console.log(this.consigneeId)
+      console.log('这是选中的收货单位')
+    },
+    //以下是发货单位边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      this.axios.post('/api/v1/uc/getConsigneeByLike?index='+queryString).then((res)=>{
+        if(res.data.code == "200"){
+          console.log(res)
+          var restaurantsConsignee = res.data.data
+          var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
+            // 调用 callback 返回建议列表的数据
+          console.log(results,"results");
+          cb(results);
+        }
+      })    
+      },
+    createFilterConsignee(queryString) {
+        return (restaurantsConsignee) => {
+          return (restaurantsConsignee.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+      //以上是收货单位边输边查搜索
      makeSure() {
        console.log(this.form1)
        let RmsConsignee={
@@ -34,16 +85,12 @@ export default {
          consigneeRegistrationTime:this.form1.consigneeRegistrationTime,
          consigneeContactName:this.form1.consigneeContactName,
          consigneeContactTel:this.form1.consigneeContactTel,
+         consigneeFarId:this.consigneeId
        };
-              console.log("RmsConsignee",RmsConsignee)
+        console.log("RmsConsignee",RmsConsignee)
+
        if(
-        RmsConsignee.companyName == null ||
-        RmsConsignee.consigneeAbbreviation==null ||
-        RmsConsignee. consigneeRegisteredAddress ==null ||
-        RmsConsignee.consigneeReceiveAddress == null ||
-        RmsConsignee.consigneeRegistrationTime == null ||
-        RmsConsignee.consigneeContactName == null ||
-        RmsConsignee.consigneeContactTel == null
+        RmsConsignee.companyName == null
        )this.$message.error("存在空值!");
        else
          this.axios
@@ -64,7 +111,6 @@ export default {
             } else {
               this.$message.error("新增失败,可能有重复");
             }
-          // this.$refs['table'].resetField();
           });
     },
     // 取消
@@ -75,6 +121,10 @@ export default {
 };
 </script>
 <style lang='scss' >
+  .addConsignee{
+  .f-box{
+    margin-left: 36%;
+  }
   .button-box{
     display: flex;
     justify-content: center;
@@ -105,4 +155,6 @@ export default {
       }
     }
   }
+  }
+  
 </style>

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

@@ -66,7 +66,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+         // this.$refs['table'].resetField();
         });
     },
     // 取消

+ 12 - 11
src/views/RMS/components/addMaterial.vue

@@ -50,6 +50,7 @@ export default {
       drawer: false,
       direction: 'rtl',
       inputText:"",
+      materialTypeId:"",
       options:{
         requestUrl:"/api/v1/rms/getMaterialTypeList?apiId=376",
         selectionType:"radio",
@@ -61,28 +62,25 @@ export default {
   methods: {
       currentRadioChange(selection){
       this.mapList=selection,
+      this.materialTypeId = this.mapList.materialTypeId;
       console.log(this.mapList)
       this.materialTypeName=this.mapList.materialTypeName
     },
     onclick(){
       this.options.requestUrl="/api/v1/rms/getMaterialTypeList?apiId=376&con=" +this.inputText;
     },
-     makeSure() {
+     makeSure() {  
+       
       let RmsMaterial = {
         materialName:this.form1.materialName,
         materialSpecification:this.form1.materialSpecification,
         materialModel:this.form1.materialModel,
-        materialTypeId:this.mapList.materialTypeId,
+        materialTypeId:this.materialTypeId,
         unitOfMeasureId:this.form1.unitOfMeasureId,
         materialTheoreticalWeight:this.form1.materialTheoreticalWeight,
       };
-      if(
-        RmsMaterial.materialName==null ||
-        RmsMaterial.materialSpecification==null ||
-        RmsMaterial.materialModel==null ||
-        RmsMaterial.materialTypeId==null ||
-        RmsMaterial.unitOfMeasureId==null ||
-        RmsMaterial.materialTheoreticalWeight==null 
+    if(
+        RmsMaterial.materialName==null
       )this.$message.error("存在空值!");
       else
       this.axios
@@ -98,10 +96,13 @@ 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();
+          //this.$refs['table'].resetField();
         });
     },
     // 取消

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

@@ -56,7 +56,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+         // this.$refs['table'].resetField();
         });
     },
     // 取消

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

@@ -54,7 +54,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+        //  this.$refs['table'].resetField();
         });
     },
     // 取消

+ 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
       
     },
     // 取消

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

@@ -52,7 +52,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+        //  this.$refs['table'].resetField();
         });
     },
     // 取消

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

@@ -54,7 +54,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+         // this.$refs['table'].resetField();
         });
     },
     // 取消

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

@@ -52,7 +52,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+         // this.$refs['table'].resetField();
         });
     },
     // 取消

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

@@ -52,7 +52,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+        //  this.$refs['table'].resetField();
         });
     },
     // 取消

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

@@ -64,7 +64,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+         // this.$refs['table'].resetField();
         });
     },
     // 取消

+ 65 - 10
src/views/RMS/components/addSupplier.vue

@@ -1,10 +1,33 @@
 <template>
   <!-- 添加供应商信息 -->
-  <div class="addWagonLoad">
+  <div class="addSupplier">
     <PageTitle>返回</PageTitle>
      <div class="form-box" style="margin-right: 10rem">
         <dil-form :formId="320" v-model="form1" ref="from1"></dil-form>
-      </div>
+     </div>
+     <div class="f-box">
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+        >
+        <el-form-item label="父级单位">
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateSupplier"
+          :fetch-suggestions="querySearchSupplier"
+          placeholder="请输入父级单位名称(非必填)"
+          :trigger-on-focus="false"
+          @select="handleSelectSupplier"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.supplierName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+     </el-form>  
+     </div>
+     
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -21,10 +44,38 @@ export default {
     return {
       form1: {},
       value: undefined,
+       //发货单位名称
+      supplierName: "",
+      //发货单位id
+      supplierId: null,
+      restaurantsSupplier:null,
+      stateSupplier:null,
     };
   },
   mounted() {},
   methods: {
+    //发货单位弹出层
+    handleSelectSupplier(item){
+      this.supplierId = item.supplierId
+      item.supplierName = this.supplierName
+    },
+    //以下是发货单位边输边查搜索
+    querySearchSupplier(queryString, cb) {
+        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
+        if(res.data.code == "200"){    
+          var restaurantsSupplier = res.data.data
+          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
+          // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+      })  
+      },
+    createFilterSupplier(queryString) {
+        return (restaurantsSupplier) => {
+          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+      //以上是发货单位边输边查搜索
      makeSure() {
        console.log(this.form1)
       let RmsSupplier = {
@@ -32,14 +83,12 @@ export default {
         supplierAddress: this.form1.supplierAddress,
         supplierRegisterDate: this.form1.supplierRegisterDate,
         supplierContactsName: this.form1.supplierContactsName,
-        supplierContactNumber: this.form1.supplierContactNumber
+        supplierContactNumber: this.form1.supplierContactNumber,
+        supplierId:this.supplierId
       };
+      console.log(RmsSupplier);
       if(
-        RmsSupplier.supplierName==null ||
-        RmsSupplier.supplierAddress==null ||
-        RmsSupplier.supplierRegisterDate==null ||
-        RmsSupplier.supplierContactsName==null ||
-        RmsSupplier.supplierContactNumber==null 
+        RmsSupplier.supplierName==null
       )this.$message.error("存在空值!");
       else
       this.axios
@@ -58,7 +107,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs['table'].resetField();
+         // this.$refs['table'].resetField();
         });
     },
     // 取消
@@ -69,7 +118,8 @@ export default {
 };
 </script>
 <style lang='scss' >
- .button-box{
+ .addSupplier{
+    .button-box{
     display: flex;
     justify-content: center;
     .el-button{
@@ -77,6 +127,9 @@ export default {
       margin-right: 10px;
     }
   }
+  .f-box{
+    margin-left: 38%;
+  }
 .form-box{
   display: flex;
   justify-content: center;
@@ -97,4 +150,6 @@ export default {
     }
   }
 }
+ }
+ 
 </style>

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

@@ -99,7 +99,7 @@ export default {
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-          this.$refs["table"].resetField();
+         // this.$refs["table"].resetField();
         });
     },
 

+ 4 - 0
src/views/RMS/components/capacity.vue

@@ -55,7 +55,11 @@ export default {
   },
   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{
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null +"&con=" +this.textInput + "&i=" + new Date();
+    }
     },
      toInsert() {
       this.$router.push("/addCapacity");

+ 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"){

+ 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"){
+          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("userId")
+      }
+  },
   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"){
+          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("userId") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          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("userId")
+          }
+      }  
     },
   },
 };

+ 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("userId")
+      }
+  },
   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("userId") + "&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("userId")
+          }
+      }  
     },
   },
 };

+ 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"){
+          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("userId")
+      }
+  },
   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"){
+          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("userId") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          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("userId")
+          }
+      }  
     },
   },
 };

+ 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"){
+          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("userId")
+      }
+  },
   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"){
+          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("userId") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          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("userId")
+          }
+      }  
     },
   },
 };

+ 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("userId")
+      }
+  },
   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("userId") + "&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("userId")
+          }
+      }  
     },
-   }
+  },
 };
 </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"){
+          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("userId")
+      }
+  },
   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"){
+          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("userId") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          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("userId")
+          }
+      }  
     },
   },
 };

+ 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("userId")
+      }
+  },
   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("userId") + "&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("userId")
+          }
+      }  
     },
   },
 };

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

@@ -21,15 +21,35 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getUnloadResult?apiId=404&orderType=16",
+        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0",
       },
     };
   },
+  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("userId")
+      }
+  },
   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("userId") + "&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("userId")
+          }
+      }  
     },
-   }
+  },
 };
 </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"){
+          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("userId")
+      }
+  },
   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"){
+          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("userId") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          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("userId")
+          }
+      }  
     },
   },
 };

+ 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"){
+          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("userId")
+      }
+  },
   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"){
+          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("userId") + "&con=" + this.input
+               }
+      }else{
+          this.$message.warning("未输入查询条件")
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          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("userId")
+          }
+      }  
     },
   },
 };

+ 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("userId"),
           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 - 38
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,69 +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("userId"),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=15&sporadicStatus=1&userId=" + getCookie("userId"),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&type1=1&userId=" + getCookie("userId")
+      }
   },
   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("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(),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&type1=1&userId=" + getCookie("userId") + "&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("userId") + "&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("userId") + "&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=11&userId=" + getCookie("userId") + "&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=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: "删除操作已取消!",
+          });
         });
     },
     //新增

+ 29 - 12
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="请输入内容"
@@ -149,15 +144,18 @@ 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 {
+    } 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("userId");
     }
-    
   },
   methods: {
     onInput(val){
@@ -165,6 +163,9 @@ export default {
         this.$message.warning('重量请输入数字')
       }
     },
+    handleClose(done){
+      done()
+    },
     //点击确定按钮的事件
     makeSure(){   
         this.axios.post('/api/v1/ams/addSporadicOrderTimes',{
@@ -186,6 +187,7 @@ export default {
     deleteRow(index){
       this.selectionList.splice(index,1)
     },
+
     //车辆模态框的确定事件
     AddTruckClick(){
       this.selectTruck.forEach(e => {
@@ -198,14 +200,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){

+ 24 - 14
src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue

@@ -11,7 +11,7 @@
       </el-button>
     </div>
     <div class="transportOrder_bottom">
-      <el-tabs v-model="activeName">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
         <!-- 已下发 -->
         <el-tab-pane label="已下发" name="first">
           <dilTable v-bind.sync="first"></dilTable>
@@ -89,25 +89,35 @@ export default {
     };
   },
   created(){
-      this.carrierUserId = getCookie('userId')
-      console.log("-----")
-      console.log(getCookie('orgCode'))
-      console.log("-----")
-      if(getCookie('orgCode') == "dagangadmin"){
+      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("userId")
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("userId")
+      }    
   },
   methods: {
-    onclick(){
-      if(this.input != ''){
-        this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&con="+this.input +"&carrierId=" + getCookie('userId');
+    getRequestUrl(){
+      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.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.userCarrierId
-      }     
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("userId")
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("userId")
+      }
+    },
+    onclick(){
+      console.log("dianji")
+    },
+    handleClick(tab, event) {
+      this.getRequestUrl()
     },
     // 查看物资详情
     detailclick(row) {

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

@@ -21,13 +21,13 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=404&orderType=13&status=0",
+        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=430&orderType=13&status=0",
       },
     };
   },
   methods: {
     onclick() {
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=404&orderType=13&status=0&con=" + this.input;
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=430&orderType=13&status=0&con=" + this.input;
     },
    }
 };

+ 80 - 90
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,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="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>
@@ -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: "",
@@ -324,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: {},
@@ -370,13 +384,25 @@ 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(){
+      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('重量请输入数字')
       }
@@ -387,18 +413,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) {
@@ -408,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);
         }
       })    
@@ -440,7 +462,6 @@ export default {
           return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
         };
       },
-      //以上是返回单位边输边查搜索
     //承运商弹出层
     handleSelectCarrier(item){    
       this.carrierId = item.carrierId
@@ -470,24 +491,18 @@ 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);
-      });     
+      console.log(this.selectionList1)
+        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: "确定",
@@ -509,71 +524,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("/importedFuel/transportReserveRan");
-    },
-    currentRadioChange1(selection) {
-      console.log(selection);
-      this.receiveName = selection.consigneeCompanyName;
-      this.receiveId = selection.consigneeId;
-    },
-    currentRadioChange2(selection) {
-      this.supplierName = selection.supplierName;
-      this.supplierId = selection.supplierId;
-    },
-    currentRadioChange4(selection) {
-      this.unloadPointId = selection.warehouseId;
-      this.unloadPointName = selection.warehouseName;
+      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;
-      }
-      
-    },
-    currentRadioChange3(selection) {
-      this.carriermapList = [];
-      this.carriermapList = selection;
-    },
-    jgao(){
-      this.$alert('有数据未填写')
-      return
+      }    
     },
     // 确认
     makeSure() {
-        console.log(this.supplierId,"this.supplierId")
-        console.log(this.consigneeId,"this.consigneeId")
-        console.log(this.carrierId,"this.carrierId")
-        console.log(this.lineId,"this.lineId")
-        console.log(this.tableData)
-        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;
@@ -586,10 +569,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 = {
@@ -598,11 +583,16 @@ export default {
           orderType:this.orderType,
           carrierId: this.carrierId,
           receiveId: this.consigneeId,
+          orderTime:this.materialTimes,
+          userId:getCookie("userId"),
           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&sporadicStatus=1",
+            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("userId"),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&sporadicStatus=1&userId=" + getCookie("userId"),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("userId")
+      }
+  },
   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&sporadicStatus=1&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("userId") + "&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&sporadicStatus=1&userId=" + getCookie("userId") + "&test=" + new Date(),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("userId") + "&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&sporadicStatus=1&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("userId") + "&con=" + this.input
+          }else if(this.activeName == "second"){
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&sporadicStatus=1&userId=" + getCookie("userId") + "&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&userId=" + getCookie("userId") + "&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>

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

@@ -1 +1,270 @@
-//新增运输派单
+//新增运输派单
+//新增运输订单
+<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">确定</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 {
+      //零星订单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=1&sporadicStatus=0&carrierSsoId=" + getCookie("userId");
+    } 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&sporadicStatus=0&dispatchStatus=1";
+    } 
+  },
+  methods: {
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量请输入数字')
+      }
+    },
+    //点击确定按钮的事件
+    makeSure(){   
+        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.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() {
+        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>

+ 34 - 291
src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue

@@ -6,94 +6,22 @@
       <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>
     <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">
-          <dilTable v-bind.sync="first">
-          </dilTable>
+          <dilTable v-bind.sync="first"></dilTable>
         </el-tab-pane>
         <!-- 已接收 -->
         <el-tab-pane label="已接收" name="Received">
-          <dilTable v-bind.sync="Received">
-          </dilTable>
+          <dilTable v-bind.sync="Received"></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>
 
@@ -110,37 +38,22 @@ export default {
       //输入框的值
       input: "",
       //选项卡的当前选中的值
-      activeName: "option",
-      //未下发的表格
-      option: {
-        requestUrl:
-          "" ,
-        selectionType: "select",
-      },
+      activeName: "first",
       //已下发的表格
       first: {
-        requestUrl:
-          "" ,
+        requestUrl:"",
       },
       //车辆信息的表格
       truck: {
-        requestUrl: "" ,
+        requestUrl: "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + '',
         // 控制显示当选列
         selectionType: "radio",
       },
       Received:{
         requestUrl: "",
       },
-      oldRow:"",
-      oldRowCount:1,
-      oldRow1:"",
-      oldRowCount1:1,
-      oldRow2:"",
-      oldRowCount2:1,
       //物资信息的数据
       tableData: [],
-      tableData1:[],
-      tableData2:[],
       //物资信息的表头
       tableHead: [
         {
@@ -176,125 +89,32 @@ export default {
     };
   },
   created(){
-    this.createdLike()
+      if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + this.carrierUserId
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        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"
+      }else{
+        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"
+      }
   },
   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();
-      }
-      else{
-        this.determine();
-        done();
-      }      
-    },
-    //下发
-    Issue() {
-      if (this.selectionList.length == 0) {
-        this.$message({
-          message: "请选择订单!",
-          type: "warning",
-        });
-      } 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.$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" 
-              }
-            });
-          }
-        });
+    getRequestUrl(){
+        if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + this.carrierUserId
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        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"
+      }else{
+        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"
       }
     },
-    //对话框点击确定,执行增加车牌号
-    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,
-        });
-      });
-    },
-    //单选按钮选中的值
-    currentRadioChange(row) {
-      this.capacityId = row.capacityId;
-      this.capacityNumber = row.capacityNumber;
-    },
-    //弹出消息窗口
-    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 +141,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 +151,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>

+ 1 - 1
src/views/SporadicManage/components/steelReturn/transportAppoint/addSteelReturnTransportAppoint.vue

@@ -455,7 +455,7 @@ export default {
           mapList: this.tableData,
         };
         console.log(amsOrder);
-        debugger
+        //debugger
         this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
           if (res.data.code == "200") {
             this.$router.push("/steelReturn/steelTransportAppoint");

+ 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},

+ 1 - 1
src/views/TMS/components/importedTruck/submitWaybill.vue

@@ -52,7 +52,7 @@ export default {
     };
   },
   mounted() {
-      debugger
+     // debugger
     this.restaurants = this.loadAll();
   },
   methods: {

+ 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>

+ 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);
     },

+ 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},

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

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

+ 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")

+ 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>

+ 34 - 11
src/views/sale/components/transport_order/receiveOrder.vue

@@ -7,6 +7,9 @@
       <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">
           <!-- 未接收 -->
@@ -189,25 +192,28 @@ export default {
     };
   },
   methods: {
+    refresh(){
+      this.$router.go(0);
+    },
     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 +312,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: "取消关闭!",
+          });
+        }) 
         
     },
   },

+ 4 - 0
src/views/statisticalReport/app.js

@@ -20,6 +20,10 @@ import apollo from '@/config/apolloConfig.js'
 import DilCommonUI from "@/components/DilCommonUI";
 Vue.use(DilCommonUI);
 
+// 导出Excel全局组件
+import tableToExcel from '@/components/exportExcel/exportExcel'
+Vue.use(tableToExcel)
+
 // 关闭生产模式下给出的提示
 Vue.config.productionTip = false;
 

+ 3 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue

@@ -18,9 +18,10 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option"></dilTable>
     </div>
   </div>
 </template>
@@ -35,6 +36,7 @@ export default {
       },
       startTime: null,
       endTime: null,
+      tableTitle:'销售统计报表'
     };
   },
   methods: {

+ 53 - 23
src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue

@@ -2,61 +2,91 @@
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
       <span>进厂时间:</span>
-      <el-date-picker
-        v-model="startTime"
-        type="date"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="startTime" type="date" placeholder="选择日期">
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="date"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="date" placeholder="选择日期">
       </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
     <div class="table">
-      <dilTable v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option"></dilTable>
     </div>
   </div>
 </template>
 
 <script>
-import { sjTime } from '@/utils/sharedJsFile'
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=null&endTime=null&i=" +new Date(),
+        requestUrl:
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=null&endTime=null&i=" +
+          new Date(),
       },
       startTime: null,
       endTime: null,
+      tableTitle: "零星进厂统计报表",
     };
   },
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=null&endTime=null&i=" +
+        new Date();
+    } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12&startTime=null&endTime=null&i=" +
+        new Date();
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
+        getCookie("userId") +
+        "&startTime=null&endTime=null&i=" +
+        new Date();
+    }
+  },
   methods: {
     onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime){
+      if (this.startTime) {
         startTime = sjTime(this.startTime);
       }
-      if(this.endTime){
+      if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-        }else{
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        } else {
           this.startTime = null;
           this.endTime = null;
-          this.$message.warning('开始时间要比结束时间早')
+          this.$message.warning("开始时间要比结束时间早");
         }
-      }else{
-        this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&i=" +
+          new Date();
       }
     },
   },
@@ -71,7 +101,7 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-date-editor{
+    .el-date-editor {
       margin: 20px;
     }
   }

+ 12 - 1
src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

@@ -18,9 +18,10 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option"></dilTable>
     </div>
   </div>
 </template>
@@ -35,7 +36,17 @@ export default {
       },
       startTime: null,
       endTime: null,
+      tableTitle:'零星出厂统计报表'
     };
+  }, 
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=' +new Date();
+      }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +new Date();
+      }else{
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("userId")+"&startTime=null&endTime=null&i=" +new Date();
+      }
   },
   methods: {
     onclick() {