From cb192b0bb6468f884e873fa9fbeebbc54e69e5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Thu, 22 Oct 2026 11:56:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E5=88=86=E6=8B=A3=E6=8B=86?= =?UTF-8?q?=E5=88=86=E6=A0=87=E7=AD=BE=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../haianAutoWarehouse/haianPalletSorting.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue b/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue index b97f739..793a992 100644 --- a/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue +++ b/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue @@ -693,6 +693,20 @@ export default { }) } }, + // 扫盘失败:确认框关闭后清空栈板编码并重新聚焦扫描框,后续分拣区随 palletScanned 一并收起 - rqrq + rejectPalletScanAndRefocus(message) { + const closeAlert = () => { + this.palletCode = '' + this.palletScanned = false + this.sortedSourceFlag = false + this.$nextTick(() => { + if (this.$refs.palletInput) { + this.$refs.palletInput.focus() + } + }) + } + this.$alert(message, '错误', { confirmButtonText: '确定' }).then(closeAlert).catch(closeAlert) + }, handlePalletScan() { if (!this.ensureSite()) { return @@ -727,10 +741,11 @@ export default { this.loadPalletInfo() this.refreshTable() } else { - this.$alert((data && data.msg) || '栈板校验失败', '错误', { confirmButtonText: '确定' }) + // 扫盘失败弹确认框,点确定后清空栈板号并回焦点,避免错误条码残留继续作业 - rqrq + this.rejectPalletScanAndRefocus((data && data.msg) || '栈板校验失败') } }).catch((error) => { - this.$alert(error.message || '栈板校验失败', '错误', { confirmButtonText: '确定' }) + this.rejectPalletScanAndRefocus(error.message || '栈板校验失败') }).finally(() => { this.palletScanLoading = false })