From 68389acdc272b78f1cc4d80180d4650e6254edcf Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期三, 17 十二月 2025 17:04:59 +0800
Subject: [PATCH] 1

---
 项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue |  277 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 273 insertions(+), 4 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 8a0384f..16b62c5 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"
@@ -21,7 +21,13 @@
             <div class="scan-section">
                 <el-alert title="璇蜂娇鐢ㄦ壂鐮佹灙鎵弿锛屾敮鎸佸洖杞﹁嚜鍔ㄧ‘璁�" type="info" :closable="false" show-icon class="scan-alert">
                     <template #default>
-                        <span>1. 璇峰厛鎵弿鎵樼洏鐮� 鈫� 2. 鍐嶆壂鎻忕墿鏂欐潯鐮�</span>
+                        <div>
+                            <div>1. 璇峰厛鎵弿鎵樼洏鐮� 鈫� 2. 鍐嶆壂鎻忕墿鏂欐爣绛剧爜</div>
+                            <div style="margin-top: 8px; font-size: 13px; color: #666;">
+                                <i class="el-icon-info" style="color: #409EFF;"></i>
+                                鏀寔鎵墭鐩樼爜鏁寸鍑哄簱锛氭壂鎻忔墭鐩樼爜鍚庡彲鐩存帴杩涜鏁寸鐗╂枡鎷i�夛紝鏃犻渶鍐嶆壂鎻忕墿鏂欐爣绛剧爜銆�
+                            </div>
+                        </div>
                     </template>
                 </el-alert>
 
@@ -71,6 +77,41 @@
                         </el-col>
                     </el-row>
                 </el-form>
+
+                <!-- 鍒嗘嫞缁熻淇℃伅 -->
+                <div class="picking-stats" v-if="scanForm.palletCode && unpickedData.length > 0">
+                    <el-divider content-position="left">
+                        <span style="color: #409EFF; font-size: 14px;">
+                            <i class="el-icon-data-analysis"></i> 鎵樼洏鍒嗘嫞缁熻
+                        </span>
+                    </el-divider>
+                    <div class="stats-container">
+                        <div class="stat-item">
+                            <el-tag type="primary" size="medium" effect="dark">
+                                <i class="el-icon-s-order"></i>
+                                鍒嗘嫞鎬绘暟锛�<b>{{ calculateTotalAssignQuantity() }}</b>
+                            </el-tag>
+                        </div>
+                        <div class="stat-item">
+                            <el-tag type="success" size="medium" effect="dark">
+                                <i class="el-icon-circle-check"></i>
+                                宸插垎鎷o細<b>{{ calculateTotalSortedQuantity() }}</b>
+                            </el-tag>
+                        </div>
+                        <div class="stat-item">
+                            <el-tag type="warning" size="medium" effect="dark">
+                                <i class="el-icon-time"></i>
+                                鏈垎鎷o細<b>{{ calculateTotalUnsortedQuantity() }}</b>
+                            </el-tag>
+                        </div>
+                        <div class="stat-item">
+                            <el-tag type="success" size="medium" effect="dark">
+                                <i class="el-icon-box"></i>
+                                鏄惁鏁村嚭锛歿{ hasWholeOut() ? '鏄�' : '鍚�' }}
+                            </el-tag>
+                        </div>
+                    </div>
+                </div>
             </div>
         </el-card>
 
@@ -198,6 +239,53 @@
                     </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>
@@ -253,7 +341,8 @@
             confirmDialogVisible: false,
             confirmMessage: '',
             currentAction: null,
-            executeLoading: false
+            executeLoading: false,
+            matMixed: true
         }
     },
     computed: {
@@ -300,8 +389,9 @@
             try {
                 this.http.post(`/api/Outbound/QueryPickingTasks?orderNo=${this.orderNo}&palletCode=${this.scanForm.palletCode}`, {}).then(response => {
                     if (response.status) {
-                        if (response.data.length > 0) {
-                            this.unpickedData = response.data
+                        if (response.data.outStockLockInfos.length > 0) {
+                            this.unpickedData = response.data.outStockLockInfos;
+                            this.matMixed = response.data.isMatMixed;
                             this.calculateUnpickedStats()
 
                             // 鑷姩鑱氱劍鍒扮墿鏂欐潯鐮佽緭鍏ユ
@@ -589,6 +679,71 @@
             return '鏈櫥褰曠敤鎴�'
         },
 
+        // 璁$畻鍒嗘嫞鎬绘暟
+        calculateTotalAssignQuantity() {
+            return this.unpickedData.reduce((sum, item) => {
+                return sum + (item.assignQuantity || 0)
+            }, 0)
+        },
+
+        // 璁$畻宸插垎鎷f�绘暟
+        calculateTotalSortedQuantity() {
+            return this.unpickedData.reduce((sum, item) => {
+                return sum + (item.sortedQuantity || 0)
+            }, 0)
+        },
+
+        // 璁$畻鏈垎鎷f�绘暟
+        calculateTotalUnsortedQuantity() {
+            return this.unpickedData.reduce((sum, item) => {
+                const assignQty = item.assignQuantity || 0
+                const sortedQty = item.sortedQuantity || 0
+                return sum + Math.max(0, assignQty - sortedQty)
+            }, 0)
+        },
+
+        // 妫�鏌ユ槸鍚﹀寘鍚暣鍑�
+        hasWholeOut() {
+            return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && this.matMixed;
+        },
+
+        // 璁$畻鍓╀綑搴撳瓨
+        calculateRemainingStock(row) {
+            const currentStock = row.currentStock || 0
+            const assignQty = row.assignQuantity || 0
+            return Math.max(0, currentStock - assignQty)
+        },
+
+        // 鑾峰彇搴撳瓨鐘舵�佺被鍨�
+        getStockStatusType(row) {
+            const currentStock = row.currentStock || 0
+            const assignQty = row.assignQuantity || 0
+            const sortedQty = row.sortedQuantity || 0
+
+            if (sortedQty >= assignQty) {
+                return 'success' // 宸插畬鎴�
+            } else if (currentStock < assignQty) {
+                return 'danger' // 搴撳瓨涓嶈冻
+            } else {
+                return 'warning' // 杩涜涓�
+            }
+        },
+
+        // 鑾峰彇搴撳瓨鐘舵�佹枃鏈�
+        getStockStatusText(row) {
+            const currentStock = row.currentStock || 0
+            const assignQty = row.assignQuantity || 0
+            const sortedQty = row.sortedQuantity || 0
+
+            if (sortedQty >= assignQty) {
+                return '宸插畬鎴�'
+            } else if (currentStock < assignQty) {
+                return '搴撳瓨涓嶈冻'
+            } else {
+                return '鍒嗘嫞涓�'
+            }
+        },
+
         getStatusType(status) {
             const statusMap = {
                 0: 'info',    // 寰呭鐞�
@@ -802,4 +957,118 @@
 ::v-deep .el-descriptions__content {
     color: #606266;
 }
+
+/* 琛ㄦ牸澧炲己鏍峰紡 */
+::v-deep .el-table th {
+    background-color: #fafafa;
+    font-weight: 600;
+    color: #303133;
+}
+
+::v-deep .el-table .el-text {
+    font-weight: 500;
+}
+
+/* 鏍囩鏍峰紡澧炲己 */
+::v-deep .el-tag--small {
+    font-weight: 500;
+}
+
+/* 鎻愮ず淇℃伅鏍峰紡澧炲己 */
+.scan-alert ::v-deep .el-alert__content {
+    width: 100%;
+}
+
+.scan-alert ::v-deep .el-alert__description {
+    margin-top: 8px;
+}
+
+/* 鍒嗘嫞缁熻淇℃伅鏍峰紡 */
+.picking-stats {
+    margin-top: 20px;
+    padding: 0 10px;
+}
+
+.stats-container {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 12px;
+    align-items: center;
+}
+
+.stat-item {
+    display: inline-flex;
+    align-items: center;
+}
+
+.stat-item .el-tag {
+    display: flex;
+    align-items: center;
+    padding: 6px 12px;
+    font-size: 13px;
+    border-radius: 20px;
+}
+
+.stat-item .el-tag i {
+    margin-right: 6px;
+    font-size: 14px;
+}
+
+.stat-item b {
+    margin-left: 4px;
+    font-size: 14px;
+}
+
+/* 鍒嗗壊绾挎牱寮� */
+::v-deep .el-divider__text {
+    background-color: #f5f5f5;
+    padding: 0 20px;
+}
+
+/* 鎵樼洏搴撳瓨淇℃伅鏍峰紡 */
+.pallet-inventory {
+    margin-top: 20px;
+    padding: 0 10px;
+}
+
+.inventory-container {
+    margin-top: 10px;
+}
+
+.inventory-table {
+    width: 100%;
+}
+
+.inventory-table ::v-deep .el-table__header {
+    background-color: #f0f9ff;
+}
+
+.inventory-table ::v-deep .el-table__header th {
+    background-color: #e1f3ff;
+    color: #1f2937;
+    font-weight: 600;
+    font-size: 12px;
+    padding: 8px 0;
+}
+
+.inventory-table ::v-deep .el-table__body td {
+    padding: 6px 0;
+    font-size: 12px;
+}
+
+.inventory-table ::v-deep .el-table__row {
+    cursor: pointer;
+}
+
+.inventory-table ::v-deep .el-table__row:hover {
+    background-color: #f0f9ff;
+}
+
+/* 搴撳瓨琛ㄦ牸涓殑鏍囩鏍峰紡 */
+.inventory-table ::v-deep .el-tag--mini {
+    font-size: 11px;
+    padding: 1px 6px;
+    height: 18px;
+    line-height: 16px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3