huk 3 jaren geleden
bovenliggende
commit
fd7d621cfe

+ 1 - 1
build/utils.js

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

+ 77 - 15
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

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

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

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