From 4579f29f72dd47c939d9ba5d834396103401cedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=B8=85?= <3115919733@qq.com> Date: Wed, 23 Apr 2025 14:30:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E9=9C=80=E6=B1=82=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/VehiclePalletForm.vue | 12 ++-- .../modules/DeliveryDemandForm.vue | 62 ++++++++++++++++--- 2 files changed, 61 insertions(+), 13 deletions(-) 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