客户参数存档船司

master
sunzehua 5 months ago
parent 05d76e9f82
commit c459aa8566

@ -2391,6 +2391,9 @@ export default {
this.orderDetails[type] = res['ediCode'] || '' this.orderDetails[type] = res['ediCode'] || ''
this.orderDetails[type.replace('id', '')] = res['enName'] || '' this.orderDetails[type.replace('id', '')] = res['enName'] || ''
this.orderDetails.forwarder = '' this.orderDetails.forwarder = ''
if(type==='portloadid'){
console.log(res)
}
} }
console.log('== 模糊搜索后的预定舱 ==', this.orderDetails) console.log('== 模糊搜索后的预定舱 ==', this.orderDetails)
}, },

@ -27,9 +27,9 @@
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="船公司"> <a-form-item label="船公司">
<a-select v-model="queryParam.carrierCode" show-search :filter-option="filterOption"> <a-select v-model="queryParam.carrierCode" show-search :filter-option="filterOption">
<a-select-option v-for="(item, index) in carrierList" :key="index" :value="item.code">{{ item.cnName <a-select-option v-for="(item, index) in carrierList" :key="index" :value="item.code">{{ item.cnName
}}/ {{ item.enName}}</a-select-option> }}/ {{ item.enName }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -56,7 +56,14 @@
</div> </div>
</template> </template>
</vxe-toolbar> </vxe-toolbar>
<vxe-table :data="loadData" stripe resizable round :loading="loading" height="546" empty-text=""> <vxe-table
:data="loadData"
stripe
resizable
round
:loading="loading"
height="546"
empty-text="没有更多数据了!">
<vxe-column type="seq" width="40" fixed="left"></vxe-column> <vxe-column type="seq" width="40" fixed="left"></vxe-column>
<vxe-column <vxe-column
v-for="item in columns" v-for="item in columns"

@ -94,7 +94,7 @@
<vxe-column title="操作" fixed="right" width="80" align="center"> <vxe-column title="操作" fixed="right" width="80" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<a-icon type="form" :style="{ color: '#13c2c2' }" /> <a-icon @click="TabsEdit(row)" type="form" :style="{ color: '#13c2c2' }" />
<a-popconfirm <a-popconfirm
title="请确认删除?" title="请确认删除?"
ok-text="是" ok-text="是"

@ -48,13 +48,28 @@
v-if="ItemData.length == 0" /> v-if="ItemData.length == 0" />
<a-select <a-select
placeholder="请选择客户参数名称" placeholder="请选择客户参数名称"
show-search
:filter-option="filterOption"
v-decorator="['itemCode', { rules: [{ required: true, message: '请选择客户参数名称!' }] }]" v-decorator="['itemCode', { rules: [{ required: true, message: '请选择客户参数名称!' }] }]"
:disabled="ItemCodeDisabled" :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"> <a-select-option v-for="item in ItemData" :key="item.id" :value="item.itemCode">
{{ item.itemName }} {{ item.itemName }}
</a-select-option> </a-select-option>
</a-select> </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 <a-select
placeholder="请选择客户参数名称" placeholder="请选择客户参数名称"
mode="multiple" mode="multiple"
@ -93,6 +108,7 @@ import {
ParamItemList, ParamItemList,
saveParamValue saveParamValue
} from '@/api/modular/main/DJYTenantParam' } from '@/api/modular/main/DJYTenantParam'
import { mapGetters } from 'vuex'
import { DjyCustomerSuggest } from '@/api/modular/main/BookingLedger' import { DjyCustomerSuggest } from '@/api/modular/main/BookingLedger'
export default { export default {
data() { data() {
@ -117,6 +133,7 @@ export default {
}, },
typeData: [], typeData: [],
visible: false, visible: false,
showSelect: true,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this),
TenantData: [], TenantData: [],
@ -129,8 +146,12 @@ export default {
mounted() { mounted() {
}, },
computed: {
...mapGetters([
'carrierList','lineList'
])
},
methods: { methods: {
FnTypeD(data) { FnTypeD(data) {
let Rdata = '' let Rdata = ''
this.YWData.forEach(item => { this.YWData.forEach(item => {
@ -141,8 +162,9 @@ export default {
return Rdata return Rdata
}, },
FnChangeTypeCode(e) { FnChangeTypeCode(e) {
if (e) { if (e !== 'CarrierProp' && e !== 'LaneProp') {
this.ItemCodeDisabled = false this.ItemCodeDisabled = false
this.showSelect = true
this.WTypeData.forEach(item => { this.WTypeData.forEach(item => {
if (item.paraCode === e) { if (item.paraCode === e) {
this.multiSelect = item.multiSelect this.multiSelect = item.multiSelect
@ -157,6 +179,26 @@ export default {
this.ItemData = res.data this.ItemData = res.data
}) })
} }
if (e === 'CarrierProp') {
const arr = JSON.parse(JSON.stringify(this.carrierList))
this.showSelect = false
this.multiSelect = true
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.multiSelect = true
arr.forEach(item => {
item.itemName = item.name
item.itemCode = item.name
})
this.ItemData = arr
}
}, },
tenantIdSearch(value) { tenantIdSearch(value) {
if (value) { if (value) {
@ -165,6 +207,11 @@ export default {
}) })
} }
}, },
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
handleChange(val) { handleChange(val) {
console.log(val) console.log(val)
}, },
@ -210,15 +257,26 @@ export default {
values.paramType = item.type values.paramType = item.type
} }
}) })
const arr = [] if (!this.multiSelect) {
this.ItemData.forEach(item => { const arr = []
if (item.itemCode == values.itemCode) { this.ItemData.forEach(item => {
values.itemName = item.itemName if (item.itemCode == values.itemCode) {
arr.push(1) values.itemName = item.itemName
arr.push(1)
}
})
if (arr.length === 0) {
values.itemName = values.itemCode
} }
}) } else {
if (arr.length === 0) { values.itemName = []
values.itemName = values.itemCode this.ItemData.forEach(item => {
values.itemCode.forEach(ite => {
if (ite === item.itemCode) {
values.itemName.push(item.itemName)
}
})
})
} }
if (Array.isArray(values.itemCode)) { if (Array.isArray(values.itemCode)) {
values.itemCode = values.itemCode.join(',') values.itemCode = values.itemCode.join(',')

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

Loading…
Cancel
Save