diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 6310136..ffbfcd2 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -790,11 +790,8 @@ export default { }) } } else if (field[0] === 'edi') { - // type 1 首字母大写转小写 const typeArr1 = ['WeiTuoFang', 'SendCode', 'ReceiveCode', 'NotifyCdoe', 'SalerCode', 'MasterBolIndicator', 'EmanifestHbl', 'ConsigneeEdiCode', 'ShipperEdiCode', 'OpEName', 'OpTel', 'OpEmail', 'GoodsName', 'MasterBolIndicatorName', 'SalerCodeName', 'OrderRemark', 'ExRemark1', 'ExRemark2', 'ExRemark3', 'ExRemark4', 'KingTareweight'] - // type2 第一个单词大写 + 驼峰 const typeArr2 = ['EDIAttn', 'EDIAttnTel', 'EDIAttnMail', 'AMSConsignee', 'AMSNotifyParty'] - // type 3 全大写转全小写 const typeArr3 = ['ACIHBL', 'CKHI', 'CNCM', 'WNCM'] const typeArr4 = ['S0CC0C'] if (typeArr1.includes(field[1])) { @@ -946,8 +943,8 @@ export default { }) }, - setDeatilsFun(res) { - if (this.$route.query.isCopy) { + setDeatilsFun(res, overSet = false) { + if (this.$route.query.isCopy && !overSet) { res.data.mblno = '' delete res.data.id this.isAdd = true @@ -958,7 +955,6 @@ export default { if (!res.data.bookingEDIExt) { res.data.bookingEDIExt = bookingEDIExt } - // 初始化箱型 累加 称重总重 if (res.data.ctnInputs.length > 0) { res.data.ctnInputs.map((item, index) => { if (item.weightype === '累加') { @@ -1011,6 +1007,9 @@ export default { } else { this.$refs.sedOrder.init([]) } + if (this.bookingDetails.ctnInputs.length > 0) { + this.$refs.goodsTable.init() + } }, 1200) this.$forceUpdate() }, @@ -1169,14 +1168,14 @@ export default { mblno: res.data.mblno } }) - this.setDeatilsFun(res) + this.setDeatilsFun(res, true) setTimeout(() => { this.inAddSave = false }, 2000) } else if (that.$route.query.mblno === that.bookingDetails.mblno) { that.isCopy = false that.isAdd = false - this.setDeatilsFun(res) + this.setDeatilsFun(res, true) that.checkSaveFun({ type: 'hbList', hasChange: false }) that.checkSaveFun({ type: 'details', hasChange: false }) const newBookingList = JSON.parse(JSON.stringify(this.bookingList)) @@ -1194,7 +1193,7 @@ export default { that.isAdd = false this.inAddSave = true this.id = res.data.id - this.setDeatilsFun(res) + this.setDeatilsFun(res, true) const newBookingList = JSON.parse(JSON.stringify(this.bookingList)) const newBookingGridOptions = JSON.parse(JSON.stringify(this.bookingGridOptions)) this.$set(newBookingList, res.data.id, res.data) diff --git a/src/views/main/BookingLedger/detail/modules/goodsTable.vue b/src/views/main/BookingLedger/detail/modules/goodsTable.vue index 03ef12d..cabdb0c 100644 --- a/src/views/main/BookingLedger/detail/modules/goodsTable.vue +++ b/src/views/main/BookingLedger/detail/modules/goodsTable.vue @@ -990,7 +990,7 @@ export default { watch: { details: { handler(nval, oval) { - // console.log('=== 修改table内容 ===', nval.ctnInputs, this.pType, this.inTableLoad) + console.log('=== 修改table内容 ===', nval.ctnInputs, this.pType, this.inTableLoad) if (!this.inSave && !this.inTableLoad) { this.$emit('changeDetail', { detail: nval, @@ -1135,6 +1135,7 @@ export default { this.$refs['tableRef'].setCellSelection({ rowKey, colKey }); }, init() { + console.log('== 箱信息 - init ==') this.inTableLoad = true if (Object.keys(this.details).length > 0) { const arr = [] diff --git a/src/views/main/BookingLedger/list/components/selectView.vue b/src/views/main/BookingLedger/list/components/selectView.vue index 1df04a1..805eab1 100644 --- a/src/views/main/BookingLedger/list/components/selectView.vue +++ b/src/views/main/BookingLedger/list/components/selectView.vue @@ -74,7 +74,6 @@ let timer Vue.directive('clickDown', { inserted(el, binding, vnode) { let clickTimer = null - // 单击 el.addEventListener('click', () => { if (clickTimer) { window.clearTimeout(clickTimer); @@ -84,7 +83,6 @@ Vue.directive('clickDown', { binding.value.clickFun() }, 300); }) - // 双击 el.addEventListener('dblclick', () => { if (clickTimer) { window.clearTimeout(clickTimer); @@ -365,7 +363,7 @@ export default { } }, filterOption(input, option) { - if (this.openSearch) { // 实时搜索 去掉过滤 + if (this.openSearch) { return true } else { return option.componentOptions.children[1].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 @@ -409,7 +407,6 @@ export default { } }, getSelectFirst (e, canClick = true) { - // console.log('获取焦点', e, this.value) if (canClick) { this.$refs.selectView.$refs.vcSelect.$refs.arrow.click() } else { @@ -429,13 +426,11 @@ export default { return false } if (!e) { - console.log('首次搜索内容', e, this.type, this.bookingInitData) if (!['vessel', 'lineName'].includes(this.type) && this.bookingInitData[`${this.type}InitList`].length > 0) { console.log(this.bookingInitData[`${this.type}InitList`]) this.selectList = this.bookingInitData[`${this.type}InitList`] return false } - // 模糊搜索 - 已有数据不进行搜索 if (this.openSearch && this.value && this.selectList.length > 0) { return false } else if (this.openSearch && this.value && this.selectList.length === 0) { @@ -495,7 +490,6 @@ export default { }, openSelect(open) { - console.log('== 测试鼠标滑过 ==') if (!this.open) { this.getSelectFirst('', false) } else { diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 34437a1..2da967c 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -97,17 +97,13 @@