|
@@ -2,35 +2,33 @@
|
|
|
<!-- 新增运输作业页面 -->
|
|
|
<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"
|
|
|
+ <div class="supplieUnit">
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ label-width="80px"
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select> -->
|
|
|
- <span class="span"></span>
|
|
|
+ <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="material from">
|
|
|
<span class="text">物资:</span>
|
|
|
<el-input class="input" v-model="materialName" disabled> </el-input>
|
|
|
<el-button type="primary" @click="ondrawer(1)">浏览</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="forwardingUnit from">
|
|
|
- <span class="text">发货单位:</span>
|
|
|
- <el-input class="input" v-model="supplierName" disabled> </el-input>
|
|
|
- <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
|
|
|
- </div>
|
|
|
<div class="remark from">
|
|
|
<span class="text">船名:</span>
|
|
|
<el-input class="input" v-model="remark" @blur="onBlur"> </el-input>
|
|
@@ -62,11 +60,6 @@
|
|
|
>
|
|
|
</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"
|
|
@@ -265,6 +258,10 @@ export default {
|
|
|
slot: true,
|
|
|
},
|
|
|
],
|
|
|
+ //发货单位名称
|
|
|
+ supplierName: "",
|
|
|
+ stateSupplier:null,
|
|
|
+ restaurantsSupplier:null,
|
|
|
//车辆表格数据
|
|
|
selectionList: [],
|
|
|
// 表单
|
|
@@ -343,6 +340,27 @@ export default {
|
|
|
onBlur() {
|
|
|
this.getPurchaseOrderNo();
|
|
|
},
|
|
|
+ //发货单位弹出层
|
|
|
+ handleSelectSupplier(item){
|
|
|
+ this.supplierId = item.supplierId
|
|
|
+ this.supplierName = item.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);
|
|
|
+ };
|
|
|
+ },
|
|
|
getPurchaseOrderNo() {
|
|
|
let map = {
|
|
|
materialId: this.materialId,
|
|
@@ -385,7 +403,7 @@ export default {
|
|
|
if (this.onDrawerNumber == 1) {
|
|
|
this.frist.requestUrl =
|
|
|
"/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
|
|
|
- this.input;
|
|
|
+ this.input + "&supplierId=" + this.supplierId;
|
|
|
} else if (this.onDrawerNumber == 2) {
|
|
|
this.secend.requestUrl =
|
|
|
"/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
|
|
@@ -426,7 +444,7 @@ export default {
|
|
|
if (this.onDrawerNumber == 1) {
|
|
|
this.frist.requestUrl =
|
|
|
"/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&i=" +
|
|
|
- new Date();
|
|
|
+ new Date() + "&supplierId=" + this.supplierId;
|
|
|
} else if (this.onDrawerNumber == 2) {
|
|
|
this.secend.requestUrl =
|
|
|
"/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
|
|
@@ -464,12 +482,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
ondrawer(num) {
|
|
|
+ if(this.supplierId == null){
|
|
|
+ this.$message.warning("请先选择发货单位")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log(num)
|
|
|
+ if(num != 1 && this.materialId == null){
|
|
|
+ this.$message.warning("请先选择物资")
|
|
|
+ return
|
|
|
+ }
|
|
|
this.drawer = true;
|
|
|
this.onDrawerNumber = num;
|
|
|
if (num == 1) {
|
|
|
- this.frist.requestUrl =
|
|
|
+ this.frist.requestUrl =
|
|
|
"/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
|
|
|
- this.input;
|
|
|
+ this.input + "&supplierId=" + this.supplierId;
|
|
|
} else if (num == 2) {
|
|
|
this.secend.requestUrl =
|
|
|
"/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
|
|
@@ -512,11 +539,6 @@ export default {
|
|
|
this.materialId = selection.materialId;
|
|
|
this.getPurchaseOrderNo();
|
|
|
},
|
|
|
- currentRadioChange2(selection) {
|
|
|
- this.supplierName = selection.supplierName;
|
|
|
- this.supplierId = selection.supplierId;
|
|
|
- this.getPurchaseOrderNo();
|
|
|
- },
|
|
|
currentRadioChange4(selection) {
|
|
|
this.unloadPointId = selection.warehouseId;
|
|
|
this.unloadPointName = selection.warehouseName;
|
|
@@ -700,6 +722,15 @@ export default {
|
|
|
height: 1px;
|
|
|
}
|
|
|
}
|
|
|
+.supplieUnit {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 20px;
|
|
|
+ .el-input {
|
|
|
+ width: 250px;
|
|
|
+ }
|
|
|
+}
|
|
|
.material {
|
|
|
display: flex;
|
|
|
justify-content: center;
|