pan
2025-11-21 4e474afdd5fec0c08deb41bfedbf326d16ec6170
提交
已修改3个文件
55 ■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js
@@ -416,6 +416,7 @@
      searchBefore(param) {
        //界面查询前,可以给param.wheres添加查询参数
        //返回false,则不会执行查询
       this.searchFormFields.orderType=[0]
        return true;
      },
      searchAfter(result) {
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
@@ -93,7 +93,7 @@
          field: "orderType",
          type: "select",
          dataKey: "inOrderType",
          data: [],
          data: [0],
        },
        {
          title: "单据状态",
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs
@@ -283,28 +283,60 @@
            {
                _unitOfWorkManage.BeginTran();
                // 1. æŸ¥æ‰¾å‡ºåº“锁定信息
                var lockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
                    .Where(it => it.OrderNo == orderNo &&
                               it.Status == (int)OutLockStockStatusEnum.出库中 &&
                               it.PalletCode == palletCode &&
                               it.CurrentBarcode == barcode)
                    .FirstAsync();
           .Where(it => it.OrderNo == orderNo &&
                      it.Status == (int)OutLockStockStatusEnum.出库中 &&
                      it.PalletCode == palletCode &&
                      it.CurrentBarcode == barcode &&
                      it.AssignQuantity > it.PickedQty) // å¢žåŠ ï¼šåªæœ‰æœªå®Œæˆåˆ†æ‹£çš„æ‰èƒ½ç»§ç»­
           .FirstAsync();
                if (lockInfo == null)
                {
                    lockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
    .Where(it => it.CurrentBarcode == barcode &&
               it.Status == (int)OutLockStockStatusEnum.出库中)
    .FirstAsync();
                        .Where(it => it.CurrentBarcode == barcode &&
                                   it.Status == (int)OutLockStockStatusEnum.出库中 &&
                                   it.AssignQuantity > it.PickedQty) // å¢žåŠ ï¼šæ£€æŸ¥åˆ†æ‹£è¿›åº¦
                        .FirstAsync();
                    if (lockInfo == null)
                        throw new Exception($"条码{barcode}不属于托盘{palletCode}或不存在待分拣记录");
                    {
                        // æ£€æŸ¥æ˜¯å¦å·²ç»å®Œæˆåˆ†æ‹£
                        var completedLockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
                            .Where(it => it.CurrentBarcode == barcode &&
                                       (it.Status == (int)OutLockStockStatusEnum.拣选完成 ||
                                        it.PickedQty >= it.AssignQuantity))
                            .FirstAsync();
                        if (completedLockInfo != null)
                            throw new Exception($"条码{barcode}已经完成分拣,不能重复分拣");
                        else
                            throw new Exception($"条码{barcode}不属于托盘{palletCode}或不存在待分拣记录");
                    }
                }
                if (lockInfo.PalletCode != palletCode)
                    throw new Exception($"条码{barcode}不属于托盘{palletCode}");
                if (lockInfo.PickedQty >= lockInfo.AssignQuantity)
                {
                    throw new Exception($"条码{barcode}已经完成分拣,不能重复分拣");
                }
                //  æ£€æŸ¥æ‹£é€‰åŽ†å²ï¼Œé˜²æ­¢é‡å¤åˆ†æ‹£
                var existingPicking = await Db.Queryable<Dt_PickingRecord>()
                    .Where(x => x.Barcode == barcode &&
                               x.OrderNo == orderNo &&
                               x.PalletCode == palletCode &&
                               x.OutStockLockId == lockInfo.Id)
                    .FirstAsync();
                if (existingPicking != null)
                {
                    throw new Exception($"条码{barcode}已经分拣过,不能重复分拣");
                }
                var outorderdetail = _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>().First(x => x.Id == lockInfo.OrderDetailId);
                if (outorderdetail != null && lockInfo.AssignQuantity > outorderdetail.OrderQuantity)
                {