From b5fdcf9a9fb64b0c0be8018ee17bd37786cfe5da Mon Sep 17 00:00:00 2001 From: sunzehua Date: Thu, 7 Sep 2023 12:23:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/BookingLedger/detail/index.vue | 3 ++ src/views/main/BookingLedger/list/index.vue | 44 ++++++--------- .../BookingLedger/list/modules/formLabel.vue | 54 +++++++++++++++++-- .../BookingLedger/list/modules/initData.js | 2 +- src/views/main/vesselinfo/index.vue | 24 +++++++++ 5 files changed, 95 insertions(+), 32 deletions(-) diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 820d5d2..c15ec69 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -1242,6 +1242,9 @@ export default { }) .then(res => { if (res.success) { + if (res.data.statuslog) { + res.data.statuslog = res.data.statuslog.reverse() + } this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data }) setTimeout(() => { this.checkSaveFun({ type: 'details', hasChange: false }) diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 942c479..1d2d219 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -1172,7 +1172,7 @@ export default { } }, computed: { - ...mapGetters(['bookingList', 'bookingGridOptions', 'firstFlag', 'saveNeedNumber', 'deleteId']) + ...mapGetters(['bookingList', 'bookingGridOptions', 'firstFlag', 'saveNeedNumber', 'deleteId', 'statusDIct']) }, beforeRouteLeave(to, from, next) { this.setBookingGridOptions(this.gridOptions) @@ -1261,22 +1261,13 @@ export default { }) } if (item.bsstatusname) { - const arr = JSON.parse(localStorage.getItem('pro__DICT_TYPE_TREE_DATA')) - if (arr) { - 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) { - item.bsstatusnameColor = ite.remark - } - }) - } - } + if (this.statusDIct) { + this.statusDIct.forEach(ite => { + if (ite.name == item.bsstatusname) { + item.bsstatusnameColor = ite.remark + } + }) + } } item.bookstatus = bookstatus item.refshYzitemLoad = false @@ -2152,6 +2143,12 @@ export default { this.formRes[form.label] = value } else if (form.type === 'selectTree') { 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() }, @@ -2272,22 +2269,13 @@ export default { }) } if (item.bsstatusname) { - const arr = JSON.parse(localStorage.getItem('pro__DICT_TYPE_TREE_DATA')) - if (arr) { - let arrColor = '' - arr.value.forEach(ite => { - if (ite.code == 'booking_goods_status') { - arrColor = ite - } - }) - if (arrColor) { - arrColor.children.forEach(ite => { + if (this.statusDIct) { + this.statusDIct.forEach(ite => { if (ite.name == item.bsstatusname) { item.bsstatusnameColor = ite.remark } }) } - } } item.bookstatus = bookstatus item.refshYzitemLoad = false diff --git a/src/views/main/BookingLedger/list/modules/formLabel.vue b/src/views/main/BookingLedger/list/modules/formLabel.vue index b426150..910b971 100644 --- a/src/views/main/BookingLedger/list/modules/formLabel.vue +++ b/src/views/main/BookingLedger/list/modules/formLabel.vue @@ -62,6 +62,33 @@ +