|
|
|
@ -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 |
|
|
|
}) |
|
|
|
|