From deb12fd2b06ccc821104aa475a8fb784c39dfb2c Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期一, 02 二月 2026 19:01:00 +0800
Subject: [PATCH] 添加音频播放和优化调拨明细查询方法

---
 项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue |  112 ++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 76 insertions(+), 36 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
index f5a29ec..6a629dc 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
@@ -499,43 +499,81 @@
             }
         },
         loadUnpickedData() {
-            return new Promise((resolve, reject) => {
-                this.http.post(`/api/Outbound/QueryPickingTasks?orderNo=${this.orderNo}&palletCode=${this.scanForm.palletCode}`, {}).then(response => {
-                    if (response.status) {
-                        if (response.data.outStockLockInfos.length > 0) {
-                            this.unpickedData = response.data.outStockLockInfos;
-                            this.matMixed = response.data.isMatMixed;
-                            this.orderOver = response.data.orderOver;
-                            this.calculateUnpickedStats()
-                            // 妫�鏌ユ槸鍚﹂渶瑕佹暣鍑虹‘璁�
-                            this.$nextTick(() => {
-                                if (this.hasWholeOut()) {
-                                    this.showWholeOutConfirm()
-                                }
-                            })
-                            // 鑷姩鑱氱劍鍒扮墿鏂欐潯鐮佽緭鍏ユ
-                            this.$nextTick(() => {
-                                if (this.$refs.materialInput) {
-                                    this.$refs.materialInput.focus()
-                                }
-                            })
-                        } else {
-                            if (flag) {
-                                this.$message.warning('璇ユ墭鐩樻棤鏈嫞閫変换鍔�')
-                            }
-                            this.unpickedData = []
+    return new Promise((resolve, reject) => {
+        // 鍏堟竻绌轰箣鍓嶇殑鎻愮ず锛岄伩鍏嶉噸澶嶆彁绀�
+        this.$message.closeAll();
+        
+        this.http.post(`/api/Outbound/QueryPickingTasks?orderNo=${this.orderNo}&palletCode=${this.scanForm.palletCode}`, {}).then(response => {
+            if (response.status) {
+                // 鎯呭喌1锛氭湁鏈嫞閫夋暟鎹�
+                if (response.data.outStockLockInfos && response.data.outStockLockInfos.length > 0) {
+                    this.unpickedData = response.data.outStockLockInfos;
+                    this.matMixed = response.data.isMatMixed;
+                    this.orderOver = response.data.orderOver;
+                    this.calculateUnpickedStats()
+                    
+                    // 妫�鏌ユ暣鍑虹‘璁�
+                    this.$nextTick(() => {
+                        if (this.hasWholeOut()) {
+                            this.showWholeOutConfirm()
                         }
-                        resolve()
-                    } else {
-                        this.$message.error(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
-                        this.unpickedData = []
-                        reject(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
-                    }
-                }).catch(error => {
-                    reject(error)
-                })
-            })
-        },
+                    })
+                    
+                    // 鑱氱劍鐗╂枡鏉$爜杈撳叆妗�
+                    this.$nextTick(() => {
+                        if (this.$refs.materialInput) {
+                            this.$refs.materialInput.focus()
+                        }
+                    })
+                } 
+                // 鎯呭喌2锛氭棤鏈嫞閫夋暟鎹�
+                else {
+                    this.unpickedData = [];
+                    this.calculateUnpickedStats(); // 閲嶇疆缁熻鏁版嵁
+                    
+                    // 鍙嬪ソ鎻愮ず + 浜や簰浼樺寲
+                    this.$message.success({
+                        message: `鎵樼洏銆�${this.scanForm.palletCode}銆戝凡鎷i�夊畬鎴愶紝鏆傛棤鎷i�夎褰昤,
+                        duration: 3000, // 鎻愮ず鏄剧ず3绉�
+                        showClose: true // 鍏佽鎵嬪姩鍏抽棴
+                    });
+                    
+                    // 娓呯┖鐗╂枡鏉$爜骞惰仛鐒﹀洖鎵樼洏鐮佽緭鍏ユ
+                    this.scanForm.materialBarcode = '';
+                    this.$nextTick(() => {
+                        if (this.$refs.palletInput) {
+                            this.$refs.palletInput.focus();
+                        }
+                    });
+                }
+                resolve();
+            } 
+            // 鎯呭喌3锛氭帴鍙h繑鍥炲け璐�
+            else {
+                this.unpickedData = [];
+                this.calculateUnpickedStats();
+                
+                this.$message.error({
+                    message: response.message || `鑾峰彇鎵樼洏銆�${this.scanForm.palletCode}銆戞嫞閫夋暟鎹け璐,
+                    duration: 5000,
+                    showClose: true
+                });
+                reject(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触');
+            }
+        }).catch(error => {
+            // 鎯呭喌4锛氱綉缁�/璇锋眰寮傚父
+            this.unpickedData = [];
+            this.calculateUnpickedStats();
+            
+            this.$message.error({
+                message: `鑾峰彇鎵樼洏銆�${this.scanForm.palletCode}銆戞嫞閫夋暟鎹紓甯革細${error.message || '缃戠粶閿欒锛岃閲嶈瘯'}`,
+                duration: 5000,
+                showClose: true
+            });
+            reject(error);
+        })
+    })
+},
 
         loadPickedData() {
             return new Promise((resolve, reject) => {
@@ -546,8 +584,10 @@
                             this.calculatePickedStats()
                         } else {
                             this.pickedData = []
+                            
                         }
                         resolve()
+                        
                     } else {
                         this.$message.error(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
                         this.pickedData = []

--
Gitblit v1.9.3