客户参数存档船司

master
sunzehua 5 months ago
parent 05d76e9f82
commit c459aa8566

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

@ -56,7 +56,14 @@
</div>
</template>
</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
v-for="item in columns"

@ -94,7 +94,7 @@
<vxe-column title="操作" fixed="right" width="80" align="center">
<template #default="{ row }">
<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
title="请确认删除?"
ok-text="是"

@ -48,13 +48,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"
@ -93,6 +108,7 @@ import {
ParamItemList,
saveParamValue
} from '@/api/modular/main/DJYTenantParam'
import { mapGetters } from 'vuex'
import { DjyCustomerSuggest } from '@/api/modular/main/BookingLedger'
export default {
data() {
@ -117,6 +133,7 @@ export default {
},
typeData: [],
visible: false,
showSelect: true,
confirmLoading: false,
form: this.$form.createForm(this),
TenantData: [],
@ -129,8 +146,12 @@ export default {
mounted() {
},
computed: {
...mapGetters([
'carrierList','lineList'
])
},
methods: {
FnTypeD(data) {
let Rdata = ''
this.YWData.forEach(item => {
@ -141,8 +162,9 @@ export default {
return Rdata
},
FnChangeTypeCode(e) {
if (e) {
if (e !== 'CarrierProp' && e !== 'LaneProp') {
this.ItemCodeDisabled = false
this.showSelect = true
this.WTypeData.forEach(item => {
if (item.paraCode === e) {
this.multiSelect = item.multiSelect
@ -157,6 +179,26 @@ export default {
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) {
if (value) {
@ -165,6 +207,11 @@ export default {
})
}
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
handleChange(val) {
console.log(val)
},
@ -210,6 +257,7 @@ export default {
values.paramType = item.type
}
})
if (!this.multiSelect) {
const arr = []
this.ItemData.forEach(item => {
if (item.itemCode == values.itemCode) {
@ -220,6 +268,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(',')
}

@ -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(',')
}

Loading…
Cancel
Save