From 5dfd83bd540c2e43af2e0449c246c79a22cb1296 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期二, 20 一月 2026 16:22:56 +0800
Subject: [PATCH] 1

---
 项目代码/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue |   42 ++++++++++++++++++++++++++++++++++++------
 1 files changed, 36 insertions(+), 6 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue"
index 609f4a1..4925c23 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/recheckOutPicking.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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. 鎵弿鐗╂枡鏉$爜鑷姩鎷i��</div>
                             <div style="margin-top: 8px; font-size: 13px; color: #666;">
                                 <i class="el-icon-info" style="color: #409EFF;"></i>
                                 鎵弿鏉$爜鍚庝細鑷姩璇锋眰鎷i�夋帴鍙o紝鏃犻渶鎵嬪姩鐐瑰嚮纭
@@ -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('鎵樼洏鐮佹牸寮忛敊璇紒姝g‘鏍煎紡搴斾负锛氬ぇ鍐欏瓧姣嶅紑澶� + 9浣嶆暟瀛楋紙濡侫123456789锛�')
+                // 楠岃瘉澶辫触锛氭竻绌烘墭鐩樼爜杈撳叆妗嗗苟淇濇寔鑱氱劍锛屾柟渚胯繛缁壂鎻�
+                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('鎵樼洏鐮佹牸寮忛敊璇紒姝g‘鏍煎紡搴斾负锛氬ぇ鍐欏瓧姣嶅紑澶� + 9浣嶆暟瀛楋紙濡侫123456789锛�')
+                this.scanForm.palletCode = ''
+                this.$nextTick(() => {
+                    this.$refs.palletInput.focus()
+                })
+                return
+            }
+
             this.confirmMessage = `纭畾瑕佸皢鎵樼洏 ${this.scanForm.palletCode} 鍥炲簱鍚楋紵`
             this.currentAction = 'returnToWarehouse'
             this.confirmDialogVisible = true

--
Gitblit v1.9.3