zhouzh 3 lat temu
rodzic
commit
12c16b8119

+ 1 - 1
config/index.js

@@ -65,7 +65,7 @@ let proxyTable = {
   // 所有数据的请求域名地址
   "/api/v1": {
      target: "http://172.16.33.166:8080",
-   // target: "http://192.168.1.113:8019",
+  //  target: "http://192.168.1.119:8019",
     // target: "http://192.168.1.114:8019",
     ws: true,
     pathRewrite: {

+ 0 - 3
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue

@@ -289,9 +289,6 @@ export default {
         },{
           value:13,
           label:'出厂'
-        },{
-          value:20,
-          label:'内转(新区-老区)'
         }
       ],
       orderType:12,

+ 44 - 29
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -2,7 +2,24 @@
   <!-- 新增运输作业页面 -->
   <div id="contractDetails">
     <page-title>运输预约</page-title>
-
+    <div class="orderType from">
+      <span class="text">卸货厂区:</span>
+      <el-select
+        class="select"
+        v-model="orderType"
+        placeholder="请选择"
+        @change="onchange()"
+      >
+        <el-option
+          v-for="item in orderTypeList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <span class="span"></span>
+    </div>
     <div class="material from">
       <span class="text">物资:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -34,24 +51,6 @@
       <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(6)">浏览</el-button>
     </div>
-    <div class="orderType from">
-      <span class="text">订单类别:</span>
-      <el-select
-        class="select"
-        v-model="orderType"
-        placeholder="请选择"
-        disabled
-      >
-        <el-option
-          v-for="item in orderTypeList"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
-        >
-        </el-option>
-      </el-select>
-      <span class="span"></span>
-    </div>
     <div class="contractTitle from">
       <dil-form :formId="219" v-model="form1"></dil-form>
     </div>
@@ -103,7 +102,6 @@
             </template>
           </template>
         </el-table-column>
-
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="onClick(scope.$index)"
@@ -229,15 +227,16 @@ export default {
       //采购订单号
       purchaseOrderNo: "",
       isMoreTrips: false,
+      purchaseOrgId:null,
       //订单类别
       orderTypeList: [
         {
           value: 6,
-          label: "老厂区",
+          label: "一厂",
         },
         {
           value: 7,
-          label: "新厂区",
+          label: "二厂",
         },
       ],
       // 线路名称
@@ -341,6 +340,14 @@ export default {
     onClick(index) {
       this.selectionList.splice(index, 1);
     },
+    onchange(){
+      if(this.orderType == 6){
+        this.purchaseOrgId = 1
+      }else{
+        this.purchaseOrgId = 2
+      }
+      this.getPurchaseOrderNo()
+    },
     onBlur() {
       this.getPurchaseOrderNo();
     },
@@ -348,12 +355,13 @@ export default {
       let map = {
         materialId: this.materialId,
         supplierId: this.supplierId,
+        purchaseOrgId: this.purchaseOrgId
       };
       if (this.remark) {
         map.remark = this.remark;
       }
       console.log(this.map);
-      if (this.materialId && this.supplierId) {
+      if (this.materialId && this.supplierId && this.purchaseOrgId) {
         this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
           console.log(res);
           if (res.data.code == "200") {
@@ -362,17 +370,18 @@ export default {
                 message: "没有匹配的采购订单号!",
                 type: "warning",
               });
+              this.purchaseOrderNo = null
               this.form1 = [];
             } else {
               console.log();
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
               this.purchaseOrderNo = res.data.data.purchaseOrderNo;
-              if (res.data.data.receiveUnitId == 1) {
-                this.orderType = 6;
-              } else {
-                this.orderType = 7;
-              }
+              // if (res.data.data.receiveUnitId == 1) {
+              //   this.orderType = 6;
+              // } else {
+              //   this.orderType = 7;
+              // }
             }
           } else {
             this.$message.error("请求失败");
@@ -495,7 +504,7 @@ export default {
           "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
       } else if (num == 5) {
         this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date() + "&con=" + "燃料";
       } else if (num == 6) {
         this.purchaseOrder.requestUrl =
           "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +
@@ -567,6 +576,12 @@ export default {
             type: "warning",
           });
           return;
+        } else if (!this.orderType) {
+          this.$message({
+            message: "请选择订单类别!",
+            type: "warning",
+          });
+          return;
         } else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",

+ 30 - 27
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -2,7 +2,23 @@
   <!-- 新增运输作业页面 -->
   <div id="contractDetails">
     <page-title>运输预约</page-title>
-
+    <div class="orderType from">
+      <span class="text">订单类别:</span>
+      <el-select
+        class="select"
+        v-model="orderType"
+        placeholder="请选择"
+      >
+        <el-option
+          v-for="item in orderTypeList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <span class="span"></span>
+    </div>
     <div class="material from">
       <span class="text">物资:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -34,24 +50,6 @@
       <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(6)">浏览</el-button>
     </div>
-    <div class="orderType from">
-      <span class="text">订单类别:</span>
-      <el-select
-        class="select"
-        v-model="orderType"
-        placeholder="请选择"
-        disabled
-      >
-        <el-option
-          v-for="item in orderTypeList"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
-        >
-        </el-option>
-      </el-select>
-      <span class="span"></span>
-    </div>
     <div class="contractTitle from">
       <dil-form :formId="219" v-model="form1"></dil-form>
     </div>
@@ -372,11 +370,11 @@ export default {
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
               this.purchaseOrderNo=res.data.data.purchaseOrderNo;
-              if (res.data.data.receiveUnitId == 1) {
-                this.orderType = 17;
-              } else {
-                this.orderType = 18;
-              }
+              // if (res.data.data.receiveUnitId == 1) {
+              //   this.orderType = 17;
+              // } else {
+              //   this.orderType = 18;
+              // }
             }
           } else {
             this.$message.error("请求失败");
@@ -443,10 +441,9 @@ export default {
       } else if (num == 4) {
         this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
       } else if (num == 5) {
-        this.line.requestUrl ="/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+        this.line.requestUrl ="/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date() + "&con=化工材料";
       }else if (num == 6) {
-        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81" + "&sendCompId=" +
-          this.supplierId + "&i=" + new Date();
+        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i=" + new Date();
       }
       
     },
@@ -513,6 +510,12 @@ export default {
             type: "warning",
           });
           return;
+        } else if (!this.orderType) {
+          this.$message({
+            message: "请选择订单类别!",
+            type: "warning",
+          });
+          return;
         } else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",

+ 41 - 9
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -2,6 +2,18 @@
   <!-- 新增运输作业页面 -->
   <div class="addPurRequirement">
     <page-title>运输预约</page-title>
+    <div class="purchaseOrder from">
+      <span class="text">卸货厂区:</span>
+      <el-select v-model="purchaseOrgId" placeholder="请选择" @change="onchange()" ref="selectlb">
+        <el-option
+          v-for="item in purchaseOrgList"
+          :key="item.value"
+          :label="item.label" 
+          :value="item.value"
+        >
+      </el-option>
+      </el-select>
+    </div>
     <div class="material from">
       <span class="text">物资:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -80,12 +92,6 @@
           @radio-change="currentRadioChange4"
         ></dilTable>
       </div>
-      <div v-show="a == 5">
-        <dilTable
-          v-bind.sync="line"
-          @radio-change="currentRadioChange5"
-        ></dilTable>
-      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
@@ -107,7 +113,7 @@ export default {
       //车辆表格数据
       selectionList: [],
       stateCarrier:null,
-
+      purchaseOrgId:null,
       // 表单
       form1: {},
       //采购订单号
@@ -152,6 +158,16 @@ export default {
         requestUrl: "",
         selectionType: "radio",
       },
+      purchaseOrgLable:null,
+      purchaseOrgList : [
+        {
+          value:1,
+          label:'一厂'
+        },{
+          value:2,
+          label:'二厂'
+          }
+      ]
     };
   },
   watch: {
@@ -171,16 +187,28 @@ export default {
     onBlur() {
       this.getPurchaseOrderNo();
     },
+    onchange(){
+      this.getPurchaseOrderNo();
+      console.log(this.purchaseOrgId)
+      if(this.purchaseOrgId == 1) {
+        this.purchaseOrgLable = "一厂"
+        console.log(this.purchaseOrgLable)
+      }else{
+        this.purchaseOrgLable = "二厂"
+        console.log(this.purchaseOrgLable)
+      }  
+    },
     getPurchaseOrderNo() {
       let map = {
         materialId: this.materialId,
         supplierId: this.supplierId,
+        purchaseOrgId:this.purchaseOrgId
       };
       if (this.remark) {
         map.remark = this.remark;
       }
-      console.log(this.map);
-      if (this.materialId && this.supplierId) {
+      console.log(map);
+      if (this.materialId && this.supplierId && this.purchaseOrgId) {
         this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
           console.log(res);
           if (res.data.code == "200") {
@@ -189,9 +217,11 @@ export default {
                 message: "没有匹配的采购订单号!",
                 type: "warning",
               });
+              this.purchaseOrderNo = null
               this.form1 = [];
             } else {
               console.log();
+              console.log(res.data.data)
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
               this.purchaseOrderNo = res.data.data.purchaseOrderNo ;           
@@ -274,6 +304,8 @@ export default {
     },
     // 确认
     onClickConfirm() {
+      console.log(this.purchaseOrgLable,this.materialName,this.supplierName,this.purchaseOrderNo,this.unloadPointName,this.stateCarrier)
+      debugger
       this.disabled = true
       var state = 0;
       if (

+ 5 - 3
src/views/inward/components/truckAppoint/purInwardRequirement.vue

@@ -96,12 +96,14 @@ export default {
   },
   methods: {
     func(res){
+        console.log("-----");
         console.log(res.list)
+        console.log("-----");
         res.list.forEach(e => {
-            if(e.enable = "未启用"){
-               this.startStop = "用"
+            if(e.enable == "未启用"){
+               this.startStop = "用"
             }else{
-               this.enable = "停用"
+               this.startStop = "停用"
             }
         });
     },

+ 36 - 2
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -12,7 +12,7 @@
     </div>
     <!-- 表单选择车辆-->
     <div class="from">
-       <div class="line">
+        <div class="line">
         <span class="text">线路</span>
         <el-input
           v-model="lineName"
@@ -21,6 +21,18 @@
         ></el-input>
         <el-button type="primary" @click="onClick(1)">浏览</el-button>
       </div>
+      <div class="orderType">
+        <span class="text">订单类型</span>
+        <el-select v-model="orderType" placeholder="请选择">
+        <el-option
+          v-for="item in orderTypeList"
+          :key="item.value"
+          :label="item.label" 
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      </div>
       <div class="vehicle">
         <span class="text">车辆</span>
         <el-button type="primary" @click="onClick(2)">浏览</el-button>
@@ -170,6 +182,17 @@ export default {
         requestUrl: "",
         selectionType: "radio",
       },
+      //订单类型
+      orderTypeList:[
+        {
+          value:10,
+          label:'采购内转(铁专线-新区)'
+        },{
+          value:20,
+          label:'采购内转(铁专线-老区)'
+          }
+      ],
+      orderType:null,
       //已经选择车辆物资信息
       selectionList:[],
       //销售订单物资信息
@@ -241,7 +264,7 @@ export default {
         this.axios.post('/api/v1/oms/addPurInwardOrder',{
           materialId:this.materialId,
           lineId:this.lineId,
-          orderType:10,
+          orderType:this.orderType,
           orderId:this.orderId,
           planId:this.planId,
           mapList:this.selectionList,
@@ -363,6 +386,17 @@ export default {
       }
     }
   }
+  .orderType{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin-top: 20px;
+    margin-right: 130px;
+    .el-select {
+      padding-left: 10px;
+    }
+    
+  }
   .tablecls{
     margin-top: 20px;
   }