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: '实际离港日期',