From e16696ff9e95854455805a705e5ed9e6503ba46b Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Tue, 17 Nov 2026 15:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=BA=93=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/production-inbound/inboundRegister.vue | 11 +---------- src/views/modules/recv/recv.vue | 12 +----------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/views/modules/production-inbound/inboundRegister.vue b/src/views/modules/production-inbound/inboundRegister.vue index 9ad6db2..b2c26be 100644 --- a/src/views/modules/production-inbound/inboundRegister.vue +++ b/src/views/modules/production-inbound/inboundRegister.vue @@ -86,8 +86,6 @@ :trigger-on-focus="true" clearable style="width: 100%;" - @select="handleLocationSelect" - @blur="handleLocationBlur" /> @@ -550,14 +548,6 @@ export default { : historyOptions; cb(result); }, - handleLocationSelect(selectedItem) { - // 选中历史值后立即置顶,保证高频库位下次优先展示。 - this.saveLocationHistory(selectedItem && selectedItem.value); - }, - handleLocationBlur() { - // 失焦即缓存,覆盖“手输后直接切换焦点”的场景。 - this.saveLocationHistory(this.inboundItem.locationNo); - }, saveLocationHistory(locationNo) { const normalizedLocation = (locationNo || '').trim(); if (!normalizedLocation) return; @@ -754,6 +744,7 @@ export default { submitShopOrderInbound(submitData).then(({ data }) => { if (data.code === 0) { this.$message.success("入库成功"); + // 只在入库成功后写入库位历史,避免未提交或校验失败的库位进入下次建议。 this.saveLocationHistory(item.locationNo); this.clearAllHandlingUnitCache(); diff --git a/src/views/modules/recv/recv.vue b/src/views/modules/recv/recv.vue index 3505e20..2aa940a 100644 --- a/src/views/modules/recv/recv.vue +++ b/src/views/modules/recv/recv.vue @@ -118,8 +118,6 @@ :trigger-on-focus="true" clearable style="width: 100%;" - @select="handleLocationSelect" - @blur="handleLocationBlur" /> @@ -589,14 +587,6 @@ export default { : historyOptions; cb(result); }, - handleLocationSelect(selectedItem) { - // 选中历史值后立即置顶,保证高频库位下次优先展示。 - this.saveLocationHistory(selectedItem && selectedItem.value); - }, - handleLocationBlur() { - // 失焦即缓存,覆盖“手输后直接切换焦点”的场景。 - this.saveLocationHistory(this.recvItem.locationNo); - }, saveLocationHistory(locationNo) { const normalizedLocation = (locationNo || '').trim(); if (!normalizedLocation) return; @@ -736,7 +726,7 @@ export default { receivePo(receiveData).then(({ data }) => { if (data.code === 0) { this.$message.success("操作成功"); - // 提交成功后再记一次,避免只填了默认库位、未失焦就保存时漏记。 + // 只在接收成功后写入库位历史,避免未提交或校验失败的库位进入下次建议。 this.saveLocationHistory(item.locationNo); this.clearAllHandlingUnitCache(); let printLabelType;