|
|
|
@ -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="['yardCode']"
|
|
|
|
|
@search="YardCodeSearch"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="filterOption"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in YardCodeData" :key="item.code" :value="item.code">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</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
|
|
|
|
@ -48,6 +66,14 @@
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item label="映射代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入映射代码"
|
|
|
|
|
v-decorator="['mapCode', { rules: [{ required: true, message: '请输入映射代码!' }] }]"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="21">
|
|
|
|
|
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
|
<a-input placeholder="请输入备注" v-decorator="['remark']" />
|
|
|
|
@ -60,6 +86,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { commondbYardlist } from '@/api/modular/main/CommondbYardlist'
|
|
|
|
|
import { CommondbAddorupdatevessel, commondbVessellist } from '@/api/modular/main/CommondbVessellist'
|
|
|
|
|
import { commondbModules } from '@/api/modular/main/ShippingCompanyMapping'
|
|
|
|
|
export default {
|
|
|
|
@ -88,17 +115,27 @@ export default {
|
|
|
|
|
form: this.$form.createForm(this),
|
|
|
|
|
data: {},
|
|
|
|
|
CodeData: [],
|
|
|
|
|
ModulesData: []
|
|
|
|
|
ModulesData: [],
|
|
|
|
|
YardCodeData: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
filterOption(input, option) {
|
|
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
handleSearch(data) {
|
|
|
|
|
commondbVessellist({ KeyWord: data }).then(res => {
|
|
|
|
|
this.CodeData = res.data
|
|
|
|
|
console.log(this.CodeData)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
YardCodeSearch(data) {
|
|
|
|
|
commondbYardlist({ KeyWord: data }).then(res => {
|
|
|
|
|
this.CodeData = res.data
|
|
|
|
|
console.log(this.CodeData)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 初始化方法
|
|
|
|
|
edit(record) {
|
|
|
|
|
this.data = record
|
|
|
|
@ -106,6 +143,9 @@ export default {
|
|
|
|
|
this.visible = true
|
|
|
|
|
const typeOption = this.$options
|
|
|
|
|
this.typeData = typeOption.filters['dictData']('edi_type')
|
|
|
|
|
commondbYardlist().then(res => {
|
|
|
|
|
this.YardCodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
commondbVessellist().then(res => {
|
|
|
|
|
this.CodeData = res.data
|
|
|
|
|
})
|
|
|
|
@ -116,7 +156,9 @@ export default {
|
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
|
name: record.name,
|
|
|
|
|
module: record.module,
|
|
|
|
|
yardCode: record.yardCode,
|
|
|
|
|
mapName: record.mapName,
|
|
|
|
|
mapCode: record.mapCode,
|
|
|
|
|
remark: record.remark
|
|
|
|
|
})
|
|
|
|
|
console.log(this.form.getFieldsValue())
|
|
|
|
|