|
|
|
@ -40,6 +40,24 @@
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item label="船公司" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
placeholder="请选择船公司"
|
|
|
|
|
v-decorator="['carrierCode']"
|
|
|
|
|
@search="CarrierHandleSearch"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in carrierCodeData" :key="item.code" :value="item.code">
|
|
|
|
|
{{ item.cnName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item label="映射名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
@ -69,6 +87,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { CommondbAddorupdatemappingyard, commondbYardlist } from '@/api/modular/main/CommondbYardlist'
|
|
|
|
|
import { commondbCarrierlist } from '@/api/modular/main/CommondbCtnlist'
|
|
|
|
|
import { commondbModules } from '@/api/modular/main/ShippingCompanyMapping'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -96,7 +115,8 @@ export default {
|
|
|
|
|
form: this.$form.createForm(this),
|
|
|
|
|
data: {},
|
|
|
|
|
CodeData: [],
|
|
|
|
|
ModulesData: []
|
|
|
|
|
ModulesData: [],
|
|
|
|
|
carrierCodeData: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
@ -105,11 +125,16 @@ export default {
|
|
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
handleSearch(data) {
|
|
|
|
|
commondbYardlist({ KeyWord: data }).then(res => {
|
|
|
|
|
commondbYardlist({ KeyWord: data }).then((res) => {
|
|
|
|
|
this.CodeData = res.data
|
|
|
|
|
console.log(this.CodeData)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
CarrierHandleSearch(data) {
|
|
|
|
|
commondbCarrierlist({ KeyWord: data }).then((res) => {
|
|
|
|
|
this.carrierCodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 初始化方法
|
|
|
|
|
edit(record) {
|
|
|
|
|
this.data = record
|
|
|
|
@ -117,19 +142,23 @@ export default {
|
|
|
|
|
this.visible = true
|
|
|
|
|
const typeOption = this.$options
|
|
|
|
|
this.typeData = typeOption.filters['dictData']('edi_type')
|
|
|
|
|
commondbYardlist().then(res => {
|
|
|
|
|
commondbYardlist().then((res) => {
|
|
|
|
|
this.CodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
commondbModules().then(res => {
|
|
|
|
|
commondbModules().then((res) => {
|
|
|
|
|
this.ModulesData = res.data
|
|
|
|
|
})
|
|
|
|
|
commondbCarrierlist().then((res) => {
|
|
|
|
|
this.carrierCodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
|
code: record.code,
|
|
|
|
|
module: record.module,
|
|
|
|
|
mapName: record.mapName,
|
|
|
|
|
mapCode: record.mapCode,
|
|
|
|
|
remark: record.remark
|
|
|
|
|
remark: record.remark,
|
|
|
|
|
carrierCode: record.carrierCode
|
|
|
|
|
})
|
|
|
|
|
console.log(this.form.getFieldsValue())
|
|
|
|
|
}, 100)
|
|
|
|
@ -152,7 +181,7 @@ export default {
|
|
|
|
|
values.gid = this.data.gid
|
|
|
|
|
console.log(values)
|
|
|
|
|
CommondbAddorupdatemappingyard(values)
|
|
|
|
|
.then(res => {
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('编辑成功')
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
@ -162,7 +191,7 @@ export default {
|
|
|
|
|
this.$message.error(`编辑失败,${res.message}`)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.finally(res => {
|
|
|
|
|
.finally((res) => {
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|