diff --git a/src/views/main/BookingLedger/detail/modules/cargoInfo.vue b/src/views/main/BookingLedger/detail/modules/cargoInfo.vue index e50f7e2..b13754a 100644 --- a/src/views/main/BookingLedger/detail/modules/cargoInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/cargoInfo.vue @@ -52,7 +52,7 @@ :defaultVal="details.goodsname" searchApi="getGoodsname" :searchQuery="{ queryItem: '', top: 50 }" - :showLabel="['goodsCode', 'goodsNameEN']" + :showLabel="['goodsNameEN', 'goodsCode']" :openSearch="true" @change="getSelectViewRes" style="width: 75%;max-width:210px;" diff --git a/src/views/main/BookingLedger/detail/modules/goodsTable.vue b/src/views/main/BookingLedger/detail/modules/goodsTable.vue index 28540b2..2a0f4b2 100644 --- a/src/views/main/BookingLedger/detail/modules/goodsTable.vue +++ b/src/views/main/BookingLedger/detail/modules/goodsTable.vue @@ -293,6 +293,7 @@ export default { edit: false, width: 130, renderBodyCell: ({ row, column, rowIndex }, h) => { + this.openEdit = true return ( { - // const activeDom = document.getElementsByClassName('ve-table-cell-selection')[0].firstChild - // if (this.isDOM(activeDom)) { - // const isCtnall = activeDom.classList.contains('ctnallView') - // const isKindpkgs = activeDom.classList.contains('kindpkgsView') - // if (isCtnall) { - // console.log('== 点击到箱型按钮,设置当前table禁止编辑 ==') - // activeDom.click() - // // this.cellSelectionOption.enable = false - // // setTimeout(() => { - // // this.cellAutofillOption = false - // // this.rowKeyName = false - // // this.tableData.map((item, index) => { - // // delete item.rowKey - // // }) - // // }, 300) - // } - // if (isKindpkgs) { - // activeDom.click() - // // this.cellSelectionOption.enable = false - // // setTimeout(() => { - // // this.cellAutofillOption = false - // // this.rowKeyName = false - // // this.tableData.map((item, index) => { - // // delete item.rowKey - // // }) - // // }, 300) - // } - // } - // }, 600) - // } + const arr = [] + if (document.getElementsByClassName('ant-select-dropdown').length > 0) { + document.getElementsByClassName('ant-select-dropdown').forEach((item) => { + const style = item.style + if (style.display !== 'none') { + arr.push(1) + } + }) + } + if (arr.length === 0) { + this.cellSelectionOption.enable = true + if ([37, 38, 39, 40, 9].includes(event.keyCode)) { + if (arr.length === 0) { + // this.openKeyDown = true + + setTimeout(() => { + const activeDom = document.getElementsByClassName('ve-table-cell-selection')[0].firstChild + if (this.isDOM(activeDom)) { + activeDom.click() + } + }, 200) + } + } + } else { + this.cellSelectionOption.enable = false + } } }) } diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 8f6cfa7..229ba35 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -1,5 +1,5 @@