码头换场站

dev
张同海 2 years ago
parent c03c4b4c2c
commit 3f0cd206f1

@ -175,20 +175,20 @@
<a-form-item label="默认场站" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback> <a-form-item label="默认场站" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<!-- <a-input <!-- <a-input
placeholder="请输入默认场站" placeholder="请输入默认场站"
v-decorator="['wharf', { rules: [{ required: true, message: '请输入默认场站!' }] }]" v-decorator="['yard', { rules: [{ required: true, message: '请输入默认场站!' }] }]"
/> --> /> -->
<a-select <a-select
placeholder="请选择默认场站" placeholder="请选择默认场站"
v-decorator="['wharf', { rules: [{ required: true, message: '请选择默认场站!' }] }]" v-decorator="['yardCode', { rules: [{ required: true, message: '请选择默认场站!' }] }]"
show-search show-search
@focus="wharfSearch" @focus="yardSearch"
@search="wharfSearch" @search="yardSearch"
:default-active-first-option="false" :default-active-first-option="false"
:show-arrow="false" :show-arrow="false"
:filter-option="false" :filter-option="false"
:not-found-content="null" :not-found-content="null"
> >
<a-select-option v-for="item in wharfData" :key="item.code" :value="item.name"> <a-select-option v-for="item in yardData" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -250,7 +250,7 @@ export default {
portDischargeData: [], portDischargeData: [],
carrierData: [], carrierData: [],
vesselData: [], vesselData: [],
wharfData: [] yardData: []
} }
}, },
mounted() {}, mounted() {},
@ -289,9 +289,9 @@ export default {
this.vesselData = res.data this.vesselData = res.data
}) })
}, },
wharfSearch(data) { yardSearch(data) {
GetYardlist({ KeyWord: data }).then(res => { 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) DjyVesselInfoServiceAddOrUpdate(values)
.then(res => { .then(res => {
if (res.success) { if (res.success) {

@ -175,16 +175,16 @@
<a-form-item label="默认场站" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback> <a-form-item label="默认场站" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select <a-select
placeholder="请选择默认场站" placeholder="请选择默认场站"
v-decorator="['wharf', { rules: [{ required: true, message: '请选择默认场站!' }] }]" v-decorator="['yardCode', { rules: [{ required: true, message: '请选择默认场站!' }] }]"
show-search show-search
@focus="wharfSearch" @focus="yardSearch"
@search="wharfSearch" @search="yardSearch"
:default-active-first-option="false" :default-active-first-option="false"
:show-arrow="false" :show-arrow="false"
:filter-option="false" :filter-option="false"
:not-found-content="null" :not-found-content="null"
> >
<a-select-option v-for="item in wharfData" :key="item.name" :value="item.name"> <a-select-option v-for="item in yardData" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -246,7 +246,7 @@ export default {
portDischargeData: [], portDischargeData: [],
carrierData: [], carrierData: [],
vesselData: [], vesselData: [],
wharfData: [] yardData: []
} }
}, },
mounted() {}, mounted() {},
@ -270,7 +270,8 @@ export default {
etd: record.etd, etd: record.etd,
closingDate: record.closingDate, closingDate: record.closingDate,
eta: record.eta, eta: record.eta,
wharf: record.wharf, yard: record.yard,
yardCode: record.yardCode,
atd: record.atd, atd: record.atd,
carrierid: record.carrierid, carrierid: record.carrierid,
voynoInside: record.voynoInside voynoInside: record.voynoInside
@ -308,9 +309,9 @@ export default {
this.vesselData = res.data this.vesselData = res.data
}) })
}, },
wharfSearch(data) { yardSearch(data) {
GetYardlist({ KeyWord: data }).then(res => { GetYardlist({ KeyWord: data }).then(res => {
this.wharfData = res.data this.yardData = res.data
}) })
}, },
handleSubmit() { 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) DjyVesselInfoServiceAddOrUpdate(values)
.then(res => { .then(res => {
if (res.success) { if (res.success) {

@ -131,9 +131,9 @@ export default {
dataIndex: 'eta' dataIndex: 'eta'
}, },
{ {
title: '默认码头', title: '默认场站',
align: 'center', align: 'center',
dataIndex: 'wharf' dataIndex: 'yard'
}, },
{ {
title: '实际离港日期', title: '实际离港日期',

Loading…
Cancel
Save