修改问题

master
sunzehua 1 year ago
parent 6787324592
commit b5fdcf9a9f

@ -1242,6 +1242,9 @@ export default {
}) })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
if (res.data.statuslog) {
res.data.statuslog = res.data.statuslog.reverse()
}
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data }) this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data })
setTimeout(() => { setTimeout(() => {
this.checkSaveFun({ type: 'details', hasChange: false }) this.checkSaveFun({ type: 'details', hasChange: false })

@ -1172,7 +1172,7 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters(['bookingList', 'bookingGridOptions', 'firstFlag', 'saveNeedNumber', 'deleteId']) ...mapGetters(['bookingList', 'bookingGridOptions', 'firstFlag', 'saveNeedNumber', 'deleteId', 'statusDIct'])
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
this.setBookingGridOptions(this.gridOptions) this.setBookingGridOptions(this.gridOptions)
@ -1261,22 +1261,13 @@ export default {
}) })
} }
if (item.bsstatusname) { if (item.bsstatusname) {
const arr = JSON.parse(localStorage.getItem('pro__DICT_TYPE_TREE_DATA')) if (this.statusDIct) {
if (arr) { this.statusDIct.forEach(ite => {
let arrColor = '' if (ite.name == item.bsstatusname) {
arr.value.forEach(ite => { item.bsstatusnameColor = ite.remark
if (ite.code == 'booking_goods_status') { }
arrColor = ite })
} }
})
if (arrColor) {
arrColor.children.forEach(ite => {
if (ite.name == item.bsstatusname) {
item.bsstatusnameColor = ite.remark
}
})
}
}
} }
item.bookstatus = bookstatus item.bookstatus = bookstatus
item.refshYzitemLoad = false item.refshYzitemLoad = false
@ -2152,6 +2143,12 @@ export default {
this.formRes[form.label] = value this.formRes[form.label] = value
} else if (form.type === 'selectTree') { } else if (form.type === 'selectTree') {
this.formRes[form.label] = value this.formRes[form.label] = value
} else if (form.type === 'multiple') {
if (value.length == 0) {
this.formRes[form.label] = ''
} else {
this.formRes[form.label] = value
}
} }
this.$forceUpdate() this.$forceUpdate()
}, },
@ -2272,22 +2269,13 @@ export default {
}) })
} }
if (item.bsstatusname) { if (item.bsstatusname) {
const arr = JSON.parse(localStorage.getItem('pro__DICT_TYPE_TREE_DATA')) if (this.statusDIct) {
if (arr) { this.statusDIct.forEach(ite => {
let arrColor = ''
arr.value.forEach(ite => {
if (ite.code == 'booking_goods_status') {
arrColor = ite
}
})
if (arrColor) {
arrColor.children.forEach(ite => {
if (ite.name == item.bsstatusname) { if (ite.name == item.bsstatusname) {
item.bsstatusnameColor = ite.remark item.bsstatusnameColor = ite.remark
} }
}) })
} }
}
} }
item.bookstatus = bookstatus item.bookstatus = bookstatus
item.refshYzitemLoad = false item.refshYzitemLoad = false

@ -62,6 +62,33 @@
</template> </template>
</a-select> </a-select>
</template> </template>
<template v-else-if="labelData.type == 'multiple'">
<a-select
size="small"
style="margin-top: 7px"
v-model="valueArr"
show-search
mode="multiple"
:allowClear="true"
:filter-option="filterOption"
:max-tag-text-length="1"
:max-tag-count="1"
:max-tag-placeholder="
() => {
return '...'
}"
@change="
debounce(handleSelectChangeByMu,
300,
$event)"
@focus="getSelectFirst">
<template>
<a-select-option v-for="(sitem, sindex) in dataList" :key="sindex">{{
sitem[labelData.showLabel]
}}</a-select-option>
</template>
</a-select>
</template>
<template v-else-if="labelData.type == 'complete'"> <template v-else-if="labelData.type == 'complete'">
<auto-complete <auto-complete
size="small" size="small"
@ -176,6 +203,7 @@ export default {
return { return {
value: '', value: '',
dateVal: [], dateVal: [],
valueArr: [],
startValue: null, startValue: null,
endValue: null, endValue: null,
endOpen: false, endOpen: false,
@ -277,7 +305,6 @@ export default {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
handleSelectChange(e) { handleSelectChange(e) {
console.log(e)
if (e !== '' && e !== undefined && e !== null) { if (e !== '' && e !== undefined && e !== null) {
if (this.labelData.label === 'bsStatusList') { if (this.labelData.label === 'bsStatusList') {
this.$emit('change', { this.$emit('change', {
@ -304,6 +331,27 @@ export default {
} }
} }
}, },
handleSelectChangeByMu(e) {
if (e !== '' && e !== undefined && e !== null) {
const arr = []
this.dataList.forEach((item, index) => {
e.forEach(ite => {
if (index == ite) {
arr.push(item[this.labelData.showLabel])
}
})
})
this.$emit('change', {
form: this.labelData,
value: arr
})
} else {
this.$emit('change', {
form: this.labelData,
value: ''
})
}
},
handleSelectChangeTree(e) { handleSelectChangeTree(e) {
this.$emit('change', { this.$emit('change', {
form: this.labelData, form: this.labelData,
@ -327,7 +375,7 @@ export default {
'CARGOID', 'CARGOID',
'zhanCangFlag', 'zhanCangFlag',
'status', 'status',
'BSSTATUS', 'BSSTATUSNAME',
'taskCategory', 'taskCategory',
'taskSource', 'taskSource',
'taskType', 'taskType',
@ -379,7 +427,7 @@ export default {
return this.dpTreeList return this.dpTreeList
case 'OrgOp': case 'OrgOp':
return this.dpTreeList return this.dpTreeList
case 'BSSTATUS': case 'BSSTATUSNAME':
const arr = this.statusDIct const arr = this.statusDIct
return arr return arr
} }

@ -541,7 +541,7 @@ export default {
{ title: '报关行', align: 'center', width: 120, label: 'CUSTOMSER', type: 'complete', showLabel: 'shortName' }, { title: '报关行', align: 'center', width: 120, label: 'CUSTOMSER', type: 'complete', showLabel: 'shortName' },
{ title: '订舱编号', align: 'center', width: 120, label: 'CUSTNO', type: 'input' }, { title: '订舱编号', align: 'center', width: 120, label: 'CUSTNO', type: 'input' },
{ title: '业务编号', align: 'center', width: 120, label: 'BOOKINGNO', type: 'input' }, { title: '业务编号', align: 'center', width: 120, label: 'BOOKINGNO', type: 'input' },
{ title: '业务状态', align: 'center', width: 120, label: 'BSSTATUS', type: 'select', showLabel: 'name' }, { title: '业务状态', align: 'center', width: 120, label: 'BSSTATUSNAME', type: 'multiple', showLabel: 'name' },
// { title: '客户合同号', align: 'center', width: 120, label: 'SERVICECONTRACTNO', type: 'input' }, // 暂时去掉 // { title: '客户合同号', align: 'center', width: 120, label: 'SERVICECONTRACTNO', type: 'input' }, // 暂时去掉
// { title: '航线代码', align: 'center', width: 120, label: 'LANECODE', type: 'input' }, // { title: '航线代码', align: 'center', width: 120, label: 'LANECODE', type: 'input' },
{ title: '内部航次', align: 'center', width: 120, label: 'VOYNOINNER', type: 'input' }, { title: '内部航次', align: 'center', width: 120, label: 'VOYNOINNER', type: 'input' },

@ -259,6 +259,30 @@ export default {
align: 'center', align: 'center',
dataIndex: 'yard', dataIndex: 'yard',
width: 150 width: 150
},
{
title: '创建人',
align: 'center',
dataIndex: 'createdUserName',
width: 100
},
{
title: '创建时间',
align: 'center',
dataIndex: 'createdTime',
width: 150
},
{
title: '修改人',
align: 'center',
dataIndex: 'updatedUserName',
width: 100
},
{
title: '修改时间',
align: 'center',
dataIndex: 'updatedTime',
width: 150
} }
], ],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' }, tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },

Loading…
Cancel
Save