发货需求新增调整

This commit is contained in:
王帅 2025-04-23 14:30:37 +08:00
parent e4fba1853a
commit 4579f29f72
2 changed files with 61 additions and 13 deletions

View File

@ -3,14 +3,9 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="吨数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxTonnage">
<a-input-number v-model="model.maxTonnage" placeholder="请输入吨数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="车型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="carType">
<a-input v-model="model.carType" placeholder="请输入车型" ></a-input>
<a-input v-model.trim="model.carType" placeholder="请输入车型" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -23,6 +18,11 @@
<a-input-number v-model="model.maxPallets" placeholder="请输入托数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="吨数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxTonnage">
<a-input-number v-model="model.maxTonnage" placeholder="请输入吨数" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>

View File

@ -10,12 +10,13 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pn">
<a-input v-model.trim="model.pn" placeholder="请输入料号" @change="changeGetpalletsNum" ></a-input>
<!-- <a-input v-model.trim="model.pn" placeholder="请输入料号" @change="changeGetpalletsNum" ></a-input> -->
<a-auto-complete v-model="model.pn" placeholder="请输入料号" @select="pnSelect" @change="pnChange" :dataSource="pnList"></a-auto-complete>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
<a-input v-model="model.spec" placeholder="请输入规格" @change="changeGetpalletsNum" ></a-input>
<a-input v-model="model.spec" placeholder="请输入规格" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -39,15 +40,18 @@
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="送货地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryAddress">
<j-dict-select-tag placeholder="请选择送货地点" v-model="model.deliveryAddress" dictCode="tms_logistics_route,target_city,target_city"></j-dict-select-tag>
<a-form-model-item label="取货仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
<!-- <j-dict-select-tag placeholder="请选择取货仓库" v-model="model.pickUpHub" dictCode="tms_logistics_route,start_city,start_city"></j-dict-select-tag> -->
<a-auto-complete v-model="model.pickUpHub" placeholder="请输入取货仓库" @select="pickUpHubSelect" @change="pickUpHubChange" :dataSource="pickUpHubList"></a-auto-complete>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="取货仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pickUpHub">
<j-dict-select-tag placeholder="请选择取货仓库" v-model="model.pickUpHub" dictCode="tms_logistics_route,start_city,start_city"></j-dict-select-tag>
<a-form-model-item label="送货地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryAddress">
<!-- <j-dict-select-tag placeholder="请选择送货地点" v-model="model.deliveryAddress" dictCode="tms_logistics_route,target_city,target_city"></j-dict-select-tag> -->
<a-input v-model="model.deliveryAddress" placeholder="请输入送货地点" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="发货单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoice">
<a-input v-model="model.invoice" placeholder="请输入发货单" ></a-input>
@ -95,6 +99,10 @@ import { min } from 'xe-utils/methods'
},
data () {
return {
cityList:[],
pickUpHubList:[],
pnSpecList:[],
pnList:[],
model:{
},
labelCol: {
@ -120,7 +128,9 @@ import { min } from 'xe-utils/methods'
add: "/deliverydemand/deliveryDemand/add",
edit: "/deliverydemand/deliveryDemand/edit",
queryById: "/deliverydemand/deliveryDemand/queryById",
getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum"
getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum",
getCity: "/logisticsroute/logisticsRoute/getCity",
getPnSpecList: "/vehicleproduct/tmsVehicleProduct/getPnSpecList"
}
}
},
@ -132,6 +142,8 @@ import { min } from 'xe-utils/methods'
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.getCity();
this.getPnSpecList();
},
methods: {
changeGetpalletsNum() {
@ -181,6 +193,42 @@ import { min } from 'xe-utils/methods'
})
},
getCity(){
getAction(this.url.getCity).then(res => {
if (res.success) {
this.cityList = res.result;
this.pickUpHubList = res.result;
}
})
},
pickUpHubSelect(){
let pickUpHub = this.pickUpHubList.filter(x=>x.includes(this.model.pickUpHub))[0].split('&-')[0]
let deliveryAddress = this.pickUpHubList.filter(x=>x.includes(this.model.pickUpHub))[0].split('&-')[1]
this.model.pickUpHub = pickUpHub
this.model.deliveryAddress = deliveryAddress
},
pickUpHubChange(val){
this.pickUpHubList = this.cityList.filter(x => x.includes(val));
},
getPnSpecList(){
getAction(this.url.getPnSpecList).then(res => {
if (res.success) {
this.pnSpecList = res.result;
this.pnList = res.result;
}
})
},
pnSelect(){
let pn = this.pnList.filter(x=>x.includes(this.model.pn))[0].split('&-')[0]
let spec = this.pnList.filter(x=>x.includes(this.model.pn))[0].split('&-')[1]
this.model.pn = pn
this.model.spec = spec
},
pnChange(val){
this.pnList = this.pnSpecList.filter(x => x.includes(val));
},
}
}
</script>