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