From 3f0cd206f123dfbf22fd17d7fdd3ad0cc6f14faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Wed, 4 Jan 2023 15:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A0=81=E5=A4=B4=E6=8D=A2=E5=9C=BA=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/vesselinfo/addForm.vue | 23 +++++++++++++++-------- src/views/main/vesselinfo/editForm.vue | 24 ++++++++++++++++-------- src/views/main/vesselinfo/index.vue | 4 ++-- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/src/views/main/vesselinfo/addForm.vue b/src/views/main/vesselinfo/addForm.vue index b04959a..410a521 100644 --- a/src/views/main/vesselinfo/addForm.vue +++ b/src/views/main/vesselinfo/addForm.vue @@ -175,20 +175,20 @@ - + {{ item.name }} @@ -250,7 +250,7 @@ export default { portDischargeData: [], carrierData: [], vesselData: [], - wharfData: [] + yardData: [] } }, mounted() {}, @@ -289,9 +289,9 @@ export default { this.vesselData = res.data }) }, - wharfSearch(data) { + yardSearch(data) { GetYardlist({ KeyWord: data }).then(res => { - this.wharfData = res.data + this.yardData = res.data }) }, @@ -342,6 +342,13 @@ export default { } }) } + if (this.yardData.length) { + this.yardData.forEach(item => { + if (item.code == values.yardCode) { + values.yard = item.name + } + }) + } DjyVesselInfoServiceAddOrUpdate(values) .then(res => { if (res.success) { diff --git a/src/views/main/vesselinfo/editForm.vue b/src/views/main/vesselinfo/editForm.vue index 30980ad..5183b2c 100644 --- a/src/views/main/vesselinfo/editForm.vue +++ b/src/views/main/vesselinfo/editForm.vue @@ -175,16 +175,16 @@ - + {{ item.name }} @@ -246,7 +246,7 @@ export default { portDischargeData: [], carrierData: [], vesselData: [], - wharfData: [] + yardData: [] } }, mounted() {}, @@ -270,7 +270,8 @@ export default { etd: record.etd, closingDate: record.closingDate, eta: record.eta, - wharf: record.wharf, + yard: record.yard, + yardCode: record.yardCode, atd: record.atd, carrierid: record.carrierid, voynoInside: record.voynoInside @@ -308,9 +309,9 @@ export default { this.vesselData = res.data }) }, - wharfSearch(data) { + yardSearch(data) { GetYardlist({ KeyWord: data }).then(res => { - this.wharfData = res.data + this.yardData = res.data }) }, handleSubmit() { @@ -356,6 +357,13 @@ export default { } }) } + if (this.yardData.length) { + this.yardData.forEach(item => { + if (item.code == values.yardCode) { + values.yard = item.name + } + }) + } DjyVesselInfoServiceAddOrUpdate(values) .then(res => { if (res.success) { diff --git a/src/views/main/vesselinfo/index.vue b/src/views/main/vesselinfo/index.vue index bdef55e..940d3c8 100644 --- a/src/views/main/vesselinfo/index.vue +++ b/src/views/main/vesselinfo/index.vue @@ -131,9 +131,9 @@ export default { dataIndex: 'eta' }, { - title: '默认码头', + title: '默认场站', align: 'center', - dataIndex: 'wharf' + dataIndex: 'yard' }, { title: '实际离港日期',