|
|
|
@ -29,7 +29,11 @@
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="客户参数类别" :labelCol="{ sm: { span: 8 } }" :wrapperCol="{ sm: { span: 15 } }" has-feedback>
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="客户参数类别"
|
|
|
|
|
:labelCol="{ sm: { span: 8 } }"
|
|
|
|
|
:wrapperCol="{ sm: { span: 15 } }"
|
|
|
|
|
has-feedback>
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择客户参数类别"
|
|
|
|
|
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择客户参数类别!' }] }]"
|
|
|
|
@ -50,13 +54,28 @@
|
|
|
|
|
v-if="ItemData.length == 0" />
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择客户参数名称"
|
|
|
|
|
show-search
|
|
|
|
|
:filter-option="filterOption"
|
|
|
|
|
v-decorator="['itemCode', { rules: [{ required: true, message: '请选择客户参数名称!' }] }]"
|
|
|
|
|
:disabled="ItemCodeDisabled"
|
|
|
|
|
v-if="ItemData.length > 0 && !multiSelect">
|
|
|
|
|
v-if="ItemData.length > 0 && !multiSelect && showSelect">
|
|
|
|
|
<a-select-option v-for="item in ItemData" :key="item.id" :value="item.itemCode">
|
|
|
|
|
{{ item.itemName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择客户参数名称"
|
|
|
|
|
show-search
|
|
|
|
|
:filter-option="filterOption"
|
|
|
|
|
v-decorator="['itemCode', { rules: [{ required: true, message: '请选择客户参数名称!' }] }]"
|
|
|
|
|
:disabled="ItemCodeDisabled"
|
|
|
|
|
v-if="ItemData.length > 0 && !multiSelect && !showSelect">
|
|
|
|
|
<a-select-option v-for="item in ItemData" :key="item.id" :value="item.itemCode">
|
|
|
|
|
{{ item.itemName }} / {{ item.itemCode }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择客户参数名称"
|
|
|
|
|
mode="multiple"
|
|
|
|
@ -98,6 +117,7 @@ import {
|
|
|
|
|
ParamItemList,
|
|
|
|
|
saveParamValue
|
|
|
|
|
} from '@/api/modular/main/DJYTenantParam'
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
import { DjyCustomerSuggest } from '@/api/modular/main/BookingLedger'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -122,6 +142,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
typeData: [],
|
|
|
|
|
showSelect: true,
|
|
|
|
|
visible: false,
|
|
|
|
|
ItemCodeLoad: false,
|
|
|
|
|
confirmLoading: false,
|
|
|
|
@ -136,6 +157,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapGetters([
|
|
|
|
|
'carrierList', 'lineList'
|
|
|
|
|
])
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
FnTypeD(data) {
|
|
|
|
@ -148,7 +174,7 @@ export default {
|
|
|
|
|
return Rdata
|
|
|
|
|
},
|
|
|
|
|
FnChangeTypeCode(e) {
|
|
|
|
|
if (e) {
|
|
|
|
|
if (e !== 'CarrierProp' && e !== 'LaneProp') {
|
|
|
|
|
this.ItemCodeDisabled = false
|
|
|
|
|
this.WTypeData.forEach(item => {
|
|
|
|
|
if (item.paraCode === e) {
|
|
|
|
@ -164,6 +190,28 @@ export default {
|
|
|
|
|
this.ItemData = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (e === 'CarrierProp') {
|
|
|
|
|
const arr = JSON.parse(JSON.stringify(this.carrierList))
|
|
|
|
|
this.showSelect = false
|
|
|
|
|
this.ItemCodeDisabled = false
|
|
|
|
|
this.multiSelect = false
|
|
|
|
|
arr.forEach(item => {
|
|
|
|
|
item.itemName = item.cnName
|
|
|
|
|
item.itemCode = item.enName
|
|
|
|
|
})
|
|
|
|
|
this.ItemData = arr
|
|
|
|
|
}
|
|
|
|
|
if (e === 'LaneProp') {
|
|
|
|
|
const arr = JSON.parse(JSON.stringify(this.lineList))
|
|
|
|
|
this.showSelect = true
|
|
|
|
|
this.ItemCodeDisabled = false
|
|
|
|
|
this.multiSelect = false
|
|
|
|
|
arr.forEach(item => {
|
|
|
|
|
item.itemName = item.name
|
|
|
|
|
item.itemCode = item.name
|
|
|
|
|
})
|
|
|
|
|
this.ItemData = arr
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
tenantIdSearch(value) {
|
|
|
|
|
if (value) {
|
|
|
|
@ -209,6 +257,11 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
filterOption(input, option) {
|
|
|
|
|
return (
|
|
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
handleSubmit() {
|
|
|
|
|
const {
|
|
|
|
|
form: { validateFields }
|
|
|
|
@ -233,6 +286,7 @@ export default {
|
|
|
|
|
values.paramType = item.type
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (!this.multiSelect) {
|
|
|
|
|
const arr = []
|
|
|
|
|
this.ItemData.forEach(item => {
|
|
|
|
|
if (item.itemCode == values.itemCode) {
|
|
|
|
@ -243,6 +297,16 @@ export default {
|
|
|
|
|
if (arr.length === 0) {
|
|
|
|
|
values.itemName = values.itemCode
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
values.itemName = []
|
|
|
|
|
this.ItemData.forEach(item => {
|
|
|
|
|
values.itemCode.forEach(ite => {
|
|
|
|
|
if (ite === item.itemCode) {
|
|
|
|
|
values.itemName.push(item.itemName)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (Array.isArray(values.itemCode)) {
|
|
|
|
|
values.itemCode = values.itemCode.join(',')
|
|
|
|
|
}
|
|
|
|
|