647556386
2026-01-27 1378fc4cd7abc24ed3a982e09437c2c8a74e9f2f
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue
@@ -22,10 +22,9 @@
        <!-- æ‰«ç æ“ä½œåŒºåŸŸ -->
        <el-card class="scan-section-card" shadow="never">
            <div class="scan-section">
                <el-alert title="请先扫描托盘码,再扫描物料条码进行拣选" type="info" :closable="false" show-icon class="scan-alert">
                <el-alert title="扫描托盘码可进行回库,扫描物料条码进行拣选" type="info" :closable="false" show-icon class="scan-alert">
                    <template #default>
                        <div>
                            <div>1. æ‰«ææ‰˜ç›˜ç  â†’ 2. æ‰«æç‰©æ–™æ¡ç è‡ªåŠ¨æ‹£é€‰</div>
                            <div style="margin-top: 8px; font-size: 13px; color: #666;">
                                <i class="el-icon-info" style="color: #409EFF;"></i>
                                æ‰«ææ¡ç åŽä¼šè‡ªåŠ¨è¯·æ±‚æ‹£é€‰æŽ¥å£ï¼Œæ— éœ€æ‰‹åŠ¨ç‚¹å‡»ç¡®è®¤
@@ -195,7 +194,9 @@
            globalLoading: false,
            loadingInstance: null,
            pickLoading: false,
            returnLoading: false
            returnLoading: false,
            // æ‰˜ç›˜ç æ­£åˆ™è¡¨è¾¾å¼
            palletCodeRegex: /^[A-Z]\d{9}$/
        }
    },
    computed: {
@@ -255,11 +256,30 @@
        },
        async handlePalletScan() {
            if (this.scanForm.palletCode) {
                this.scanForm.materialBarcode = ''
            } else {
            if (!this.scanForm.palletCode) {
                this.$message.warning('请输入托盘码')
                return
            }
            // éªŒè¯æ‰˜ç›˜ç æ ¼å¼
            if (!this.palletCodeRegex.test(this.scanForm.palletCode)) {
                this.$message.error('托盘码格式错误!正确格式应为:大写字母开头 + 9位数字(如A123456789)')
                // éªŒè¯å¤±è´¥ï¼šæ¸…空托盘码输入框并保持聚焦,方便连续扫描
                this.scanForm.palletCode = ''
                this.$nextTick(() => {
                    this.$refs.palletInput.focus()
                })
                return
            }
            // éªŒè¯é€šè¿‡ï¼šæ¸…空物料条码并聚焦到物料条码输入框
            this.scanForm.materialBarcode = ''
            this.$nextTick(() => {
                if (this.$refs.materialInput) {
                    this.$refs.materialInput.focus()
                }
            })
            this.$message.success('托盘码验证通过,请扫描物料条码')
        },
        async handleMaterialScan() {
@@ -363,6 +383,16 @@
                return
            }
            // é¢å¤–验证:回库操作前也验证托盘码格式
            if (!this.palletCodeRegex.test(this.scanForm.palletCode)) {
                this.$message.error('托盘码格式错误!正确格式应为:大写字母开头 + 9位数字(如A123456789)')
                this.scanForm.palletCode = ''
                this.$nextTick(() => {
                    this.$refs.palletInput.focus()
                })
                return
            }
            this.confirmMessage = `确定要将托盘 ${this.scanForm.palletCode} å›žåº“吗?`
            this.currentAction = 'returnToWarehouse'
            this.confirmDialogVisible = true