huangxiaoqiang
2025-12-18 f2e6ec111338c31639259891e3b6e825a9852dd6
Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
已修改6个文件
274 ■■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundQueryService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/outbound/outPicking.vue
@@ -1,6 +1,7 @@
<template>
    <div class="picking-container" v-loading="globalLoading" element-loading-text="处理中..."
        element-loading-background="rgba(255, 255, 255, 0.8)">
        element-loading-background="rgba(255, 255, 255, 0.8)" element-loading-spinner="el-icon-loading"
        element-loading-custom-class="custom-loading">
        <!-- é¡¶éƒ¨è®¢å•信息 -->
        <el-card class="order-info-card" shadow="never">
            <div class="order-header">
@@ -9,8 +10,11 @@
                    <span class="order-label">订单号:</span>
                    <span class="order-value">{{ orderNo }}</span>
                </div>
                <div class="order-status" v-if="orderInfo">
                    <el-tag :type="getStatusType(orderInfo.status)" size="medium">
                <div class="order-status">
                    <!-- æµ‹è¯•按钮 -->
                    <el-tag v-if="orderInfo" :type="getStatusType(orderInfo.orderStatus)" size="medium"
                        style="margin-left: 10px;">
                        {{ orderInfo.statusName || '进行中' }}
                    </el-tag>
                </div>
@@ -36,8 +40,8 @@
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item label="托盘码" prop="palletCode">
                                <el-input ref="palletInput" v-model="scanForm.palletCode" placeholder="请扫描托盘码" size="large"
                                    clearable @keyup.enter="handlePalletScan">
                                <el-input ref="palletInput" v-model="scanForm.palletCode" placeholder="请扫描托盘码"
                                    size="large" clearable @keyup.enter="handlePalletScan">
                                    <template #prefix>
                                        <i class="el-icon-box"></i>
                                    </template>
@@ -307,8 +311,8 @@
        </el-dialog>
        <!-- æ•´å‡ºç¡®è®¤å¯¹è¯æ¡† -->
        <el-dialog v-model="wholeOutDialogVisible" title="整出操作确认" width="500px" :before-close="handleWholeOutDialogClose"
            custom-class="whole-out-dialog" style="margin-right: 0px;">
        <el-dialog v-model="wholeOutDialogVisible" title="整出操作确认" width="500px"
            :before-close="handleWholeOutDialogClose" custom-class="whole-out-dialog" style="margin-right: 0px;">
            <div class="whole-out-content" v-if="wholeOutInfo">
                <!-- è­¦å‘Šæç¤º -->
                <el-alert title="该托盘包含需要整出的物料" type="warning" :closable="false" show-icon class="whole-out-alert">
@@ -357,7 +361,7 @@
                        <div class="info-item">
                            <label>整出数量:</label>
                            <span class="info-value highlight">{{ wholeOutInfo.assignQuantity }} {{ wholeOutInfo.unit
                            }}</span>
                                }}</span>
                        </div>
                        <div class="info-item">
                            <label>当前库存:</label>
@@ -390,6 +394,8 @@
import printView from "@/extension/outbound/extend/printView.vue"
import { stationManager, STATION_STORAGE_KEY } from "@/../src/uitils/stationManager";
import { ElLoading } from 'element-plus'
export default {
    components: { printView },
    name: 'OutPicking',
@@ -425,7 +431,8 @@
            matMixed: true,
            wholeOutDialogVisible: false,
            wholeOutInfo: null,
            globalLoading: false
            globalLoading: false,
            loadingInstance: null
        }
    },
    computed: {
@@ -445,12 +452,31 @@
                this.$router.back()
                return
            }
            // åŠ è½½è®¢å•ä¿¡æ¯
            this.loadOrderInfo()
            // è‡ªåŠ¨èšç„¦åˆ°æ‰˜ç›˜ç è¾“å…¥æ¡†
            this.$nextTick(() => {
                if (this.$refs.palletInput) {
                    this.$refs.palletInput.focus()
                }
            })
        },
        async loadOrderInfo() {
            try {
                this.showFullScreenLoading()
                const response = await this.http.get(`/api/Outbound/GetOrderInfo?orderNo=${this.orderNo}`)
                if (response.status) {
                    this.orderInfo = response.data
                } else {
                }
            }
            catch (error) {
            } finally {
                this.hideFullScreenLoading()
            }
        },
        async loadPalletData() {
@@ -460,17 +486,16 @@
            }
            try {
                this.globalLoading = true
                this.showFullScreenLoading()
                await Promise.all([
                    this.loadUnpickedData(),
                    this.loadPickedData()
                ]);
            } catch (error) {
                console.error('加载托盘数据失败:', error)
                this.unpickedData = []
            } finally {
                this.globalLoading = false
                this.hideFullScreenLoading()
            }
        },
        loadUnpickedData() {
@@ -494,7 +519,9 @@
                                }
                            })
                        } else {
                            this.$message.warning('该托盘无未拣选任务')
                            if (flag) {
                                this.$message.warning('该托盘无未拣选任务')
                            }
                            this.unpickedData = []
                        }
                        resolve()
@@ -504,7 +531,6 @@
                        reject(response.message || '获取托盘数据失败')
                    }
                }).catch(error => {
                    console.error('加载未拣选数据失败:', error)
                    reject(error)
                })
            })
@@ -527,7 +553,6 @@
                        reject(response.message || '获取托盘数据失败')
                    }
                }).catch(error => {
                    console.error('加载已拣选数据失败:', error)
                    reject(error)
                })
            })
@@ -564,10 +589,11 @@
            this.pickedTotal = this.pickedCount
        },
        handlePalletScan() {
        handlePalletScan(flag = true) {
            if (this.scanForm.palletCode) {
                // this.$message.success(`托盘码: ${this.scanForm.palletCode}`)
                this.loadPalletData()
                this.loadPalletData(flag)
            } else {
            }
        },
@@ -587,41 +613,39 @@
            this.handleConfirmPick()
        },
        handleConfirmPick() {
        async handleConfirmPick() {
            if (!this.scanForm.palletCode || !this.scanForm.materialBarcode) {
                this.$message.warning('请先扫描托盘码和物料条码')
                return
            }
            this.confirmLoading = true
            this.globalLoading = true
            this.showFullScreenLoading()
            try {
                this.http.post('/api/Outbound/CompleteOutboundWithBarcode', {
                const response = await this.http.post('/api/Outbound/CompleteOutboundWithBarcode', {
                    orderNo: this.orderNo,
                    palletCode: this.scanForm.palletCode,
                    barcode: this.scanForm.materialBarcode,
                    operator: this.getUserName()
                }).then(response => {
                    if (response.status) {
                        if (response.data.scannedDetail.isUnpacked && response.data.scannedDetail.materialCodes.length > 0) {
                            this.$refs.printView.open(response.data.scannedDetail.materialCodes);
                        }
                        this.$message.success('拣选确认成功')
                        this.resetMaterialBarcode()
                        // this.loadUnpickedData()
                        // this.loadPickedData()
                        this.loadPalletData()
                    } else {
                        this.$message.error(response.message || '拣选确认失败')
                    }
                })
                if (response.status) {
                    if (response.data.scannedDetail.isUnpacked && response.data.scannedDetail.materialCodes.length > 0) {
                        this.$refs.printView.open(response.data.scannedDetail.materialCodes);
                    }
                    this.$message.success('拣选确认成功')
                    this.resetMaterialBarcode()
                    // this.loadUnpickedData()
                    // this.loadPickedData()
                    await this.loadPalletData(false)
                } else {
                    this.$message.error(response.message || '拣选确认失败')
                }
            } catch (error) {
                console.error('拣选确认失败:', error)
                this.$message.error('拣选确认失败')
            } finally {
                this.confirmLoading = false
                this.globalLoading = false
                this.hideFullScreenLoading()
            }
        },
@@ -647,9 +671,9 @@
            this.confirmDialogVisible = true
        },
        executeConfirm() {
        async executeConfirm() {
            this.executeLoading = true
            this.globalLoading = true
            this.showFullScreenLoading()
            try {
                let apiUrl = ''
@@ -658,31 +682,28 @@
                    palletCode: this.scanForm.palletCode,
                    station: stationManager.getStation()
                }
                console.log(params);
                if (this.currentAction === 'emptyBox') {
                    apiUrl = '/api/Outbound/EmptyBox'
                } else if (this.currentAction === 'returnToWarehouse') {
                    apiUrl = '/api/Outbound/ReturnToWarehouse'
                }
                this.http.post(apiUrl, params).then(response => {
                const response = await this.http.post(apiUrl, params)
                    if (response.status) {
                        this.$message.success('操作成功')
                        this.confirmDialogVisible = false
                        this.resetForm()
                        // this.loadUnpickedData()
                        // this.loadPickedData()
                    } else {
                        this.$message.error(response.message || '操作失败')
                    }
                })
                if (response.status) {
                    this.$message.success('操作成功')
                    this.confirmDialogVisible = false
                    this.resetForm()
                    // this.loadUnpickedData()
                    // this.loadPickedData()
                } else {
                    this.$message.error(response.message || '操作失败')
                }
            } catch (error) {
                console.error('操作失败:', error)
                this.$message.error('操作失败')
            } finally {
                this.executeLoading = false
                this.globalLoading = false
                this.hideFullScreenLoading()
            }
        },
@@ -696,7 +717,6 @@
        showWholeOutConfirm() {
            // èŽ·å–éœ€è¦æ•´å‡ºçš„ç‰©æ–™ä¿¡æ¯
            const wholeOutItem = this.unpickedData.find(item => item.assignQuantity === item.originalQuantity);
            console.log('wholeOutItem:', wholeOutItem);
            if (wholeOutItem) {
                this.wholeOutInfo = {
                    palletCode: this.scanForm.palletCode,
@@ -720,37 +740,35 @@
            }
        },
        executeWholeOut() {
        async executeWholeOut() {
            if (!this.wholeOutInfo) {
                this.$message.error('整出信息无效');
                return;
            }
            this.executeLoading = true;
            this.globalLoading = true;
            this.showFullScreenLoading();
            try {
                // è°ƒç”¨æ•´å‡ºæŽ¥å£ï¼Œè¿™é‡Œä½¿ç”¨ç‰©æ–™ç¼–码作为条码
                this.http.post('/api/Outbound/CompleteOutboundWithPallet', {
                const response = await this.http.post('/api/Outbound/CompleteOutboundWithPallet', {
                    orderNo: this.orderNo,
                    palletCode: this.scanForm.palletCode,
                    operator: this.getUserName()
                }).then(response => {
                    if (response.status) {
                        this.$message.success('整出操作成功');
                        this.wholeOutDialogVisible = false;
                        this.wholeOutInfo = null;
                        this.loadPalletData();
                    } else {
                        this.$message.error(response.message || '整出操作失败');
                    }
                });
                if (response.status) {
                    this.$message.success('整出操作成功');
                    this.wholeOutDialogVisible = false;
                    this.wholeOutInfo = null;
                    await this.loadPalletData();
                } else {
                    this.$message.error(response.message || '整出操作失败');
                }
            } catch (error) {
                console.error('整出操作失败:', error);
                this.$message.error('整出操作失败');
            } finally {
                this.executeLoading = false;
                this.globalLoading = false;
                this.hideFullScreenLoading();
            }
        },
@@ -778,7 +796,6 @@
                })
            } catch (error) {
                if (error !== 'cancel') {
                    console.error('撤销失败:', error)
                    this.$message.error('撤销失败')
                }
            }
@@ -835,7 +852,6 @@
                    return user.userName || user.username || '未登录用户'
                }
            } catch (error) {
                console.error('获取用户信息失败:', error)
            }
            return '未登录用户'
@@ -866,7 +882,6 @@
        // æ£€æŸ¥æ˜¯å¦åŒ…含整出
        hasWholeOut() {
            console.log('检查整出状态:', this.unpickedData.some(item => item.assignQuantity === item.originalQuantity));
            return this.unpickedData.some(item => item.assignQuantity === item.originalQuantity) && !this.matMixed;
        },
@@ -910,12 +925,46 @@
        getStatusType(status) {
            const statusMap = {
                0: 'info',    // å¾…处理
                10: 'warning', // è¿›è¡Œä¸­
                1: 'warning', // è¿›è¡Œä¸­
                20: 'primary', // æ‹£é€‰ä¸­
                30: 'success', // å·²å®Œæˆ
                40: 'danger'   // å¼‚常
            }
            return statusMap[status] || 'info'
        },
        // æ˜¾ç¤ºå…¨å±é®ç½©å±‚
        showFullScreenLoading() {
            if (this.loadingInstance) {
                this.loadingInstance.close()
            }
            this.loadingInstance = ElLoading.service({
                lock: true,
                text: '处理中...',
                background: 'rgba(0, 0, 0, 0.7)',
                customClass: 'custom-full-loading'
            })
        },
        // éšè—å…¨å±é®ç½©å±‚
        hideFullScreenLoading() {
            if (this.loadingInstance) {
                this.loadingInstance.close()
                this.loadingInstance = null
            } else {
            }
        },
        // æµ‹è¯•遮罩层显示
        testLoading() {
            // æµ‹è¯•两种方式
            this.globalLoading = true
            // åŒæ—¶ä¹Ÿæµ‹è¯•全屏loading
            this.showFullScreenLoading()
            setTimeout(() => {
                this.globalLoading = false
                this.hideFullScreenLoading()
            }, 3000)
        }
    }
}
@@ -1378,29 +1427,66 @@
}
/* Element Plus Loading é®ç½©å±‚样式修复 */
::v-deep .el-loading-mask {
    background-color: rgba(255, 255, 255, 0.8) !important;
::v-deep .custom-loading {
    background-color: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
::v-deep .custom-loading .el-loading-mask {
    background-color: rgba(0, 0, 0, 0.7) !important;
}
::v-deep .custom-loading .el-loading-spinner {
    z-index: 10000 !important;
}
::v-deep .custom-loading .el-loading-text {
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 16px !important;
}
/* å…¨å±€ Loading æ ·å¼ */
::v-deep .el-loading-mask {
    background-color: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999 !important;
}
::v-deep .el-loading-spinner {
    z-index: 10000 !important;
    margin-top: -21px !important;
}
::v-deep .el-loading-text {
    color: #409EFF !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 16px !important;
    margin-top: 15px !important;
}
/* å…¨å±Loading自定义样式 */
::v-deep .custom-full-loading {
    z-index: 999999 !important;
}
::v-deep .custom-full-loading .el-loading-mask {
    z-index: 999999 !important;
}
::v-deep .custom-full-loading .el-loading-spinner {
    z-index: 1000000 !important;
}
::v-deep .custom-full-loading .el-loading-text {
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 18px !important;
}
/* ç¡®ä¿å¯¹è¯æ¡†ä¸ä¼šé®ç›–loading */
::v-deep .el-dialog {
    z-index: 2000 !important;
}
::v-deep .el-dialog__wrapper {
    z-index: 2000 !important;
}
/* ç¡®ä¿å®¹å™¨ç›¸å¯¹å®šä½ */
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db
Binary files differ
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db
Binary files differ
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs
@@ -36,6 +36,8 @@
        WebResponseContent QueryPickedList(string orderNo, string palletCode);
        WebResponseContent GetOrderInfo(string orderNo);
        /// <summary>
        /// å–空箱
        /// </summary>
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundQueryService.cs
@@ -13,6 +13,18 @@
{
    public partial class OutboundService
    {
        public WebResponseContent GetOrderInfo(string orderNo)
        {
            try
            {
                Dt_OutboundOrder outboundOrder = _outboundRepository.Db.Queryable<Dt_OutboundOrder>().First(x => x.OrderNo == orderNo);
                return WebResponseContent.Instance.OK(data: outboundOrder);
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public WebResponseContent QueryPickingTasks(string palletCode, string orderNo)
        {
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs
@@ -85,6 +85,12 @@
            }
        }
        [HttpPost,HttpGet, Route("GetOrderInfo"), AllowAnonymous]
        public WebResponseContent GetOrderInfo(string orderNo)
        {
            return _outboundService.GetOrderInfo(orderNo);
        }
        [HttpPost, Route("QueryPickingTasks"), AllowAnonymous]
        public WebResponseContent QueryPickingTasks(string palletCode, string orderNo)
        {