diff --git a/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/modules/VehiclePalletForm.vue b/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/modules/VehiclePalletForm.vue index fdbeeae..83c34ff 100644 --- a/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/modules/VehiclePalletForm.vue +++ b/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/modules/VehiclePalletForm.vue @@ -3,14 +3,9 @@ - - - - - - + @@ -23,6 +18,11 @@ + + + + + diff --git a/ant-design-vue-jeecg/src/views/tms/outbound/deliverydemand/modules/DeliveryDemandForm.vue b/ant-design-vue-jeecg/src/views/tms/outbound/deliverydemand/modules/DeliveryDemandForm.vue index 4658165..bdbf434 100644 --- a/ant-design-vue-jeecg/src/views/tms/outbound/deliverydemand/modules/DeliveryDemandForm.vue +++ b/ant-design-vue-jeecg/src/views/tms/outbound/deliverydemand/modules/DeliveryDemandForm.vue @@ -10,12 +10,13 @@ - + + - + @@ -39,15 +40,18 @@ - - + + + - - + + + + @@ -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)); + }, } } \ No newline at end of file