From bc8846977cb68b9c28e92b050338ebdfd7f521bf Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 03 二月 2026 17:22:48 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215

---
 项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue |  247 +++++++++++++++++++++++++++----------------------
 1 files changed, 135 insertions(+), 112 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 3ad4a98..8150bc5 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"
@@ -11,8 +11,6 @@
                     <span class="order-value">{{ orderNo }}</span>
                 </div>
                 <div class="order-status">
-                    <!-- 娴嬭瘯鎸夐挳 -->
-
                     <el-tag v-if="orderInfo" :type="getStatusType(orderInfo.orderStatus)" size="medium"
                         style="margin-left: 10px;">
                         {{ orderInfo.statusName || '杩涜涓�' }}
@@ -157,14 +155,6 @@
                             </el-table-column>
                             <el-table-column prop="unit" label="鍗曚綅" width="60" />
                             <el-table-column prop="locationCode" label="搴撲綅" />
-                            <!-- <el-table-column label="鎿嶄綔" width="80" align="center">
-                                <template #default="scope">
-                                    <el-button type="text" size="small" @click="quickPick(scope.row)"
-                                        :disabled="!scanForm.palletCode">
-                                        鎷i��
-                                    </el-button>
-                                </template>
-                            </el-table-column> -->
                         </el-table>
 
                         <div class="table-footer">
@@ -222,13 +212,6 @@
                             <el-table-column prop="createDate" label="鎷i�夋椂闂�" width="160" />
                             <el-table-column prop="originalBarcode" label="鍘熺墿鏂欑爜" width="160" />
                             <el-table-column prop="newBarcode" label="鏂扮墿鏂欑爜" width="160" />
-                            <!-- <el-table-column label="鎿嶄綔" width="80" align="center">
-                                <template #default="scope">
-                                    <el-button type="text" size="small" @click="undoPick(scope.row)">
-                                        鎾ら攢
-                                    </el-button>
-                                </template>
-                            </el-table-column> -->
                         </el-table>
 
                         <div class="table-footer">
@@ -244,53 +227,6 @@
                     </el-card>
                 </el-col>
             </el-row>
-
-            <!-- 鎵樼洏鐗╂枡搴撳瓨淇℃伅 -->
-            <!-- <div class="pallet-inventory" v-if="scanForm.palletCode && unpickedData.length > 0">
-                <el-divider content-position="left">
-                    <span style="color: #67C23A; font-size: 14px;">
-                        <i class="el-icon-goods"></i> 鎵樼洏鐗╂枡搴撳瓨淇℃伅
-                    </span>
-                </el-divider>
-                <div class="inventory-container">
-                    <el-table :data="unpickedData" size="small" :show-header="true" :border="true" stripe
-                        highlight-current-row max-height="200" class="inventory-table">
-                        <el-table-column type="index" label="搴忓彿" width="50" align="center" />
-                        <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" width="100" show-overflow-tooltip />
-                        <el-table-column prop="materielName" label="鐗╂枡鍚嶇О" width="120" show-overflow-tooltip />
-                        <el-table-column prop="batchNo" label="鎵规鍙�" width="90" />
-                        <el-table-column label="褰撳墠搴撳瓨" width="80" align="right">
-                            <template #default="scope">
-                                <el-text type="primary" tag="b">{{ scope.row.currentStock || 0 }}</el-text>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="鍒嗘嫞鏁伴噺" width="80" align="right">
-                            <template #default="scope">
-                                <el-text type="warning">{{ scope.row.assignQuantity }}</el-text>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="宸插垎鎷�" width="70" align="right">
-                            <template #default="scope">
-                                <el-text type="success">{{ scope.row.sortedQuantity || 0 }}</el-text>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="鍓╀綑搴撳瓨" width="80" align="right">
-                            <template #default="scope">
-                                <el-text type="info">{{ calculateRemainingStock(scope.row) }}</el-text>
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="unit" label="鍗曚綅" width="100" align="center" />
-                        <el-table-column prop="locationCode" label="搴撲綅" width="150" />
-                        <el-table-column label="鐘舵��" width="80" align="center">
-                            <template #default="scope">
-                                <el-tag :type="getStockStatusType(scope.row)" size="mini">
-                                    {{ getStockStatusText(scope.row) }}
-                                </el-tag>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </div>
-            </div> -->
         </div>
 
         <print-view ref="printView" @parentcall="parentcall"></print-view>
@@ -391,10 +327,13 @@
 </template>
 
 <script>
-
 import printView from "@/extension/outbound/extend/printView.vue"
 import { stationManager, STATION_STORAGE_KEY } from "@/../src/uitils/stationManager";
 import { ElLoading } from 'element-plus'
+
+// 瀵煎叆闊抽鏂囦欢锛堥�傞厤src/assets鐩綍锛寃ebpack鑷姩澶勭悊锛�
+const successAudioSrc = require('@/assets/audio/success.mp3');
+const errorAudioSrc = require('@/assets/audio/error.mp3');
 
 export default {
     components: { printView },
@@ -432,7 +371,10 @@
             wholeOutDialogVisible: false,
             wholeOutInfo: null,
             globalLoading: false,
-            loadingInstance: null
+            loadingInstance: null,
+            // 闊抽瀹炰緥锛堢紦瀛橈紝閬垮厤閲嶅鍒涘缓锛�
+            successAudio: null,
+            errorAudio: null
         }
     },
     computed: {
@@ -442,8 +384,54 @@
     },
     mounted() {
         this.initPage()
+        // 鍒濆鍖栭煶棰戝疄渚嬶紙鎳掑姞杞斤紝浠呭垱寤轰竴娆★級
+        this.initAudioInstance()
+    },
+    beforeDestroy() {
+        // 閿�姣侀煶棰戝疄渚嬶紝閲婃斁璧勬簮
+        this.successAudio = null
+        this.errorAudio = null
     },
     methods: {
+        // 鍒濆鍖栭煶棰戝疄渚嬶紙鏍稿績锛氶�傞厤src/assets璺緞锛岀紦瀛樺疄渚嬶級
+        initAudioInstance() {
+            // 鎴愬姛闊抽瀹炰緥
+            if (!this.successAudio) {
+                this.successAudio = new Audio(successAudioSrc)
+                this.successAudio.onerror = (err) => {
+                    console.error('銆愭垚鍔熼煶棰戙�戝姞杞藉け璐�', err)
+                }
+            }
+            if (!this.errorAudio) {
+                this.errorAudio = new Audio(errorAudioSrc)
+                this.errorAudio.onerror = (err) => {
+                    console.error('銆愰敊璇煶棰戙�戝姞杞藉け璐�', err)
+                }
+            }
+        },
+        // 鎾斁鎴愬姛闊抽
+        playSuccessAudio() {
+            try {
+                // 閲嶇疆鎾斁杩涘害锛堥伩鍏嶉噸澶嶆挱鏀炬椂闊抽鏈粨鏉燂級
+                this.successAudio.currentTime = 0
+                // 鎾斁锛堝吋瀹规祻瑙堝櫒鑷姩鎾斁绛栫暐闄愬埗锛�
+                this.successAudio.play().catch((err) => {
+                    console.warn('鎴愬姛闊抽鎾斁澶辫触锛堟祻瑙堝櫒鑷姩鎾斁绛栫暐闄愬埗锛�', err)
+                })
+            } catch (err) {
+                console.error('鎾斁鎴愬姛闊抽寮傚父', err)
+            }
+        },
+        playErrorAudio() {
+            try {
+                this.errorAudio.currentTime = 0
+                this.errorAudio.play().catch((err) => {
+                    console.warn('閿欒闊抽鎾斁澶辫触锛堟祻瑙堝櫒鑷姩鎾斁绛栫暐闄愬埗锛�', err)
+                })
+            } catch (err) {
+                console.error('鎾斁閿欒闊抽寮傚父', err)
+            }
+        },
         initPage() {
             // 浠庤矾鐢卞弬鏁拌幏鍙栬鍗曞彿
             this.orderNo = this.$route.query.orderNo || ''
@@ -499,42 +487,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.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) => {
@@ -545,8 +572,10 @@
                             this.calculatePickedStats()
                         } else {
                             this.pickedData = []
+                            
                         }
                         resolve()
+                        
                     } else {
                         this.$message.error(response.message || '鑾峰彇鎵樼洏鏁版嵁澶辫触')
                         this.pickedData = []
@@ -591,7 +620,6 @@
 
         handlePalletScan(flag = true) {
             if (this.scanForm.palletCode) {
-                // this.$message.success(`鎵樼洏鐮�: ${this.scanForm.palletCode}`)
                 this.loadPalletData(flag)
             } else {
             }
@@ -634,15 +662,17 @@
                         this.$refs.printView.open(response.data.scannedDetail.materialCodes);
                     }
                     this.$message.success('鎷i�夌‘璁ゆ垚鍔�')
+                    // 鎺ュ彛鎴愬姛锛氭挱鏀炬垚鍔熼煶棰�
+                    this.playSuccessAudio()
                     this.resetMaterialBarcode()
-                    // this.loadUnpickedData()
-                    // this.loadPickedData()
                     await this.loadPalletData(false)
                 } else {
                     this.$message.error(response.message || '鎷i�夌‘璁ゅけ璐�')
+                    this.playErrorAudio()
                 }
             } catch (error) {
                 this.$message.error('鎷i�夌‘璁ゅけ璐�')
+                this.playErrorAudio()
             } finally {
                 this.confirmLoading = false
                 this.hideFullScreenLoading()
@@ -694,8 +724,6 @@
                     this.$message.success('鎿嶄綔鎴愬姛')
                     this.confirmDialogVisible = false
                     this.resetForm()
-                    // this.loadUnpickedData()
-                    // this.loadPickedData()
                 } else {
                     this.$message.error(response.message || '鎿嶄綔澶辫触')
                 }
@@ -801,11 +829,6 @@
             }
         },
 
-        // handleUnpickedRowClick(row) {
-        //     // 鐐瑰嚮鏈嫞閫夎鏃惰嚜鍔ㄥ~鍏呯墿鏂欐潯鐮�
-        //     this.scanForm.materialBarcode = row.materielCode
-        // },
-
         refreshUnpickedTable() {
             if (this.scanForm.palletCode) {
                 this.loadPalletData()
@@ -882,7 +905,7 @@
 
         // 妫�鏌ユ槸鍚﹀寘鍚暣鍑�
         hasWholeOut() {
-            return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && !this.matMixed
+            return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && !this.matMixed && !this.orderOver
         },
 
         // 璁$畻鍓╀綑搴撳瓨

--
Gitblit v1.9.3