From 76ee237f02360c4524cd3f9bbd4dd0166ee3fe7d Mon Sep 17 00:00:00 2001 From: lilu Date: Fri, 24 Mar 2023 18:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=8D=95=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/BookingLedger/detail/index.vue | 114 +++++++++--------- .../detail/modules/sedOperationArea.vue | 16 ++- .../BookingLedger/detail/modules/sedOrder.vue | 75 +++++++++++- .../BookingLedger/detail/style/sedOrder.less | 18 ++- 4 files changed, 158 insertions(+), 65 deletions(-) diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 07d3676..b616079 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -133,6 +133,7 @@ :checkFrom="checkFrom" :scrollTop="scrollTop" @changeHB="changeHBFun" + @sedOrderRemove="sedOrderRemoveFun" > @@ -327,39 +328,39 @@ const initDetail = { } const bookingEDIExt = { weiTuoFang: '', - ediAttn: '', - ediAttnTel: '', - ediAttnMail: '', - sendCode: '', - receiveCode: '', - amsConsignee: '', - amsNotifyParty: '', - opEName: '', - opTel: '', - opEmail: '', - goodsName: '', - orderRemark: '', - kingTareweight: '', - exRemark1: '', - exRemark2: '', - exRemark3: '', - exRemark4: '', - // == 以下为太平 == - consigneeEdiCode: '', - shipperEdiCode: '', - notifyCdoe: '', - salerCode: '', - emanifestHbl: '', - masterBolIndicator: '', - s0CC0C: '', - ckhi: '', - cncm: '', - wncm: '', - acihbl: '' + ediAttn: '', + ediAttnTel: '', + ediAttnMail: '', + sendCode: '', + receiveCode: '', + amsConsignee: '', + amsNotifyParty: '', + opEName: '', + opTel: '', + opEmail: '', + goodsName: '', + orderRemark: '', + kingTareweight: '', + exRemark1: '', + exRemark2: '', + exRemark3: '', + exRemark4: '', + // == 以下为太平 == + consigneeEdiCode: '', + shipperEdiCode: '', + notifyCdoe: '', + salerCode: '', + emanifestHbl: '', + masterBolIndicator: '', + s0CC0C: '', + ckhi: '', + cncm: '', + wncm: '', + acihbl: '' } export default { name: 'BookingDetail', - activated: function() {}, // 当页面被激活时触发 仅限首次加载 + activated: function() { }, // 当页面被激活时触发 仅限首次加载 inject: ['reload'], components: { operationArea, @@ -413,18 +414,7 @@ export default { } }, computed: { - ...mapGetters([ - 'bookingList', - 'needSavePages', - 'hasbookingDetail', - 'bookingList', - 'bookingGridOptions', - 'carrierList', - 'yardList', - 'packageList', - 'issuetypeList', - 'blfrtList' - ]) + ...mapGetters(['bookingList', 'needSavePages', 'hasbookingDetail', 'bookingList', 'bookingGridOptions', 'carrierList', 'yardList', 'packageList', 'issuetypeList', 'blfrtList']) }, created() { this.init() @@ -871,23 +861,23 @@ export default { this.$forceUpdate() }, - getRightAll() { + getRightAll () { GetAllData({ bookingId: this.id }) - .then(res => { - if (res.success) { - this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data }) - } else { - console.log(res.message) - } - }) - .catch(err => { - console.log(err) - }) + .then(res => { + if (res.success) { + this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data }) + } else { + console.log(res.message) + } + }) + .catch(err => { + console.log(err) + }) }, - upDateRightFun() { + upDateRightFun () { this.getRightAll() }, @@ -1388,6 +1378,15 @@ export default { if (type) { this.$refs.mailingInfo.$data.userHasLine = !!this.bookingDetails.lineName } + }, + sedOrderRemoveFun(sedData) { + console.log('== 父组件收到子单删除数据 ==', sedData, this.bookingDetails.hbList) + this.$set(this.bookingDetails, 'hbList', sedData) + if (sedData.length === 0) { + console.log('== 子单删除完毕 ==') + this.Showtabs = false + this.tabActiveKey = '1' + } } } } @@ -1395,8 +1394,9 @@ export default { diff --git a/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue b/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue index 678f0ef..4abedc1 100644 --- a/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue +++ b/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue @@ -8,7 +8,15 @@ - + + + @@ -140,6 +148,12 @@ export default { .catch(err => { console.log(err) }) + }, + removeOrder () { + this.$emit('remove') + }, + cancelRemove () { + console.log('= 取消删除 =') } } } diff --git a/src/views/main/BookingLedger/detail/modules/sedOrder.vue b/src/views/main/BookingLedger/detail/modules/sedOrder.vue index 059e16d..c1e93fe 100644 --- a/src/views/main/BookingLedger/detail/modules/sedOrder.vue +++ b/src/views/main/BookingLedger/detail/modules/sedOrder.vue @@ -14,12 +14,20 @@ v-for="(sedDetail, sindex) in sedOrderList" :key="sindex" :class="{ active: editIndex === sindex }" - @click="changeOrder(sindex)" > - - 分单{{ sindex + 1 }}: {{ sedDetail.hblno || '请填写分单号' }} +
+ 分单{{ sindex + 1 }}: {{ sedDetail.hblno || '请填写分单号' }} +
(未保存) - + + +
添加分单
@@ -36,6 +44,7 @@ :class="scrollTop < 100 ? 'normal-nav' : 'fixed-nav'" @save="saveFun" @copy="copyFun" + @remove="removeFun" >