From 677f246e2afb2c46624e62a1ab16da6bcf199798 Mon Sep 17 00:00:00 2001 From: lilu Date: Tue, 11 Apr 2023 16:01:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E9=83=A8=E8=88=AA=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/BookingLedger/detail/index.vue | 61 ---------------- .../detail/modules/basicInfo.vue | 72 ++++++------------- src/views/main/BookingLedger/list/index.vue | 29 +++++++- 3 files changed, 47 insertions(+), 115 deletions(-) diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 3476872..3944f78 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -38,7 +38,6 @@
- - - - - - { const defaultData = JSON.parse(res.data.configJson) this.defaultData = defaultData - console.log('==== 获取默认值设置 ====', defaultData) defaultData.map((item, index) => { const field = item.field.split('.') let label = field[1].toLowerCase() @@ -777,7 +741,6 @@ export default { if (['EPCODE', 'DZREMARK', 'CZREMARK', 'Warehouse'].includes(field[1])) { label = this.emnuDefaultLabel(field[1]) } - console.log('initData ----', label) if (Object.keys(initDetail).includes(label)) { initDetail[label] = item.code this.bookingDetails[label] = this.bookingDetails[label] && this.bookingDetails[label] !== '' ? this.bookingDetails[label] : item.code @@ -801,7 +764,6 @@ export default { } else if (typeArr2.includes(field[1]) || typeArr4.includes(field[1])) { label = this.emnuDefaultLabel(field[1]) } - console.log('edi --- ', label) initDetail.bookingEDIExt[label] = item.code bookingEDIExt[label] = item.code this.bookingDetails.bookingEDIExt[label] = this.bookingDetails.bookingEDIExt[label] && this.bookingDetails.bookingEDIExt[label] !== '' ? this.bookingDetails.bookingEDIExt[label] : item.code @@ -923,7 +885,6 @@ export default { }, getDetail() { - // this.inPageLoading = false if (this.inPageLoading) { return false } @@ -993,7 +954,6 @@ export default { this.inPageLoading = false this.getDefaultVal() setTimeout(() => { - // console.log('== 5. 设置主单保存数据 - false ==') this.checkSaveFun({ type: 'details', hasChange: false }) this.detailsLoadOver = true this.inChildLoading = false @@ -1037,7 +997,6 @@ export default { changeDetailFun(data) { const { detail, type } = data if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) { - // console.log('== 6. 设置主单有保存数据 - true ==') this.checkSaveFun({ type: 'details', hasChange: true }) } this.bookingDetails = detail @@ -1094,7 +1053,6 @@ export default { return false } } else { - // edi 初始数据验证 Object.keys(this.ediRules).map((item, index) => { if (this.checkFrom.includes(item) && !this.bookingDetails[item.split('.')[0]][item.split('.')[1]]) { this.hasEdiRules = true @@ -1107,7 +1065,6 @@ export default { } } - // 箱信息验证 if (this.hasTableRules && this.bookingDetails.shippingMethod !== '拼箱') { if (this.bookingDetails.ctnInputs.length === 0) { this.$message.error('保存失败,箱信息未填写') @@ -1293,7 +1250,6 @@ export default { } else { FnOk() } - // 自定义必填项验证 - end }, spliceMorefun(str) { @@ -1304,7 +1260,6 @@ export default { this.mainOrderActiveKey = e }, - // 操作按钮 refreshPage() { this.init() this.$refs.rightContent.init() @@ -1355,7 +1310,6 @@ export default { name: 'BookingDetail', query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno, noOpenTab: true } }) - // this.$route.query.id = 1123 } else { if (index === arr.length - 1) { this.$message.error('当前已经是最后一票') @@ -1381,8 +1335,6 @@ export default { query: { id: this.id, isCopy: true, type: this.bookingDetails.carrierid } }) }, - // 分单部分 - // 切换 changeTab(e) { console.log('== 切换顶部标签 ==', this.detailsLoadOver, this.inChildLoading) const _this = this @@ -1391,13 +1343,11 @@ export default { _this.$refs.sedOrder.init(_this.bookingDetails.hbList) }, 100) }, - // 新增 addSedList() { if (this.isAdd) { this.$message.error('请先保存主单') return false } - // this.$message.loading('加载中...') const data = JSON.parse(JSON.stringify(this.bookingDetails)) data.isNoSave = true data.hblno = '' @@ -1417,7 +1367,6 @@ export default { this.$refs.sedOrder.init(this.bookingDetails.hbList) }, 200) }, - // 修改 changeHBFun(data) { const arr = [] data.map((item, index) => { @@ -1426,16 +1375,11 @@ export default { if (arr.includes(true)) { this.$set(this.bookingDetails, 'hbList', data) this.checkSaveFun({ type: 'hbList', hasChange: true }) - // console.log('== 分单有修改 ==') } else { this.checkSaveFun({ type: 'hbList', hasChange: false }) - // console.log('== 分单无修改 ==') } }, checkSaveFun(data) { - // if (this.inPageLoading) { - // return false - // } if (this.inGoodsSave) { return false } const key = this.$route.fullPath const lastPages = this.needSavePages @@ -1448,7 +1392,6 @@ export default { } else if (data.type === 'hbList') { this.$set($data, 'hbList', data.hasChange) } - // console.log('== 设置主单保存数据 ==', this.detailsLoadOver, this.inPageLoading, this.inChildLoading) this.$set(lastPages, key, $data) this.setNeedSavePages(lastPages) }, @@ -1456,7 +1399,6 @@ export default { this.inGoodsSave = data }, - // 箱信息计算 calc(num1, num2, calcStr) { var str1 // 转换为字符串的数字 var str2 @@ -1566,16 +1508,13 @@ export default { } }, 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' } }, changeCtnInfoFun ({ type, val }) { - console.log('获取数据') if (type === 'kindpkgs') { this.bookingDetails.kindpkgs = val } diff --git a/src/views/main/BookingLedger/detail/modules/basicInfo.vue b/src/views/main/BookingLedger/detail/modules/basicInfo.vue index e87a325..ddf488b 100644 --- a/src/views/main/BookingLedger/detail/modules/basicInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/basicInfo.vue @@ -166,16 +166,6 @@ :showLabel="['contractNo']" @select="getAutoViewRes" > -