1
647556386
2026-01-23 a48dec1aaf88e1ba79cb521ae277c3b3d5ff3d84
1
已修改3个文件
85 ■■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue
@@ -424,38 +424,48 @@
      });
    },
    outbound() {
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
      }
    if (this.selection.length === 0) {
      return this.$message.error("请选择单据明细");
    }
      const keys = this.selection.map((item) => item.id);
      const requestParams = {
        detailIds: keys,
        outboundQuantity: 1,
        operator: "",
        orderNo: this.row.orderNo,
        isBatch: this.isBatch,
      };
      console.log(requestParams);
      this.$refs.DirectOutbound.open(requestParams);
    },
    outboundbatch() {
      if (this.selection.length === 0) {
        return this.$message.error("请选择单据明细");
      }
    const keys = this.selection.map((item) => item.id);
    const requestParams = {
      detailIds: keys,
      outboundQuantity: 1,
      operator: "",
      orderNo: this.row.orderNo,
      isBatch: this.isBatch,
    };
    console.log(requestParams);
    this.$refs.DirectOutbound.open(requestParams);
  },
  outboundbatch() {
    if (this.selection.length === 0) {
      return this.$message.error("请选择单据明细");
    }
      const keys = this.selection.map((item) => item.id);
      const requestParams = {
        detailIds: keys,
        outboundQuantity:
          this.selection[0].orderQuantity - this.selection[0].lockQuantity,
        operator: "",
        orderNo: this.row.orderNo,
        isBatch: this.isBatch,
      };
      console.log(requestParams);
      this.$refs.DirectOutbound.open(requestParams);
    },
    const keys = this.selection.map((item) => item.id);
    // è®¡ç®—所有选中明细的可出库数量总和
    let totalOutboundQuantity = 0;
    this.selection.forEach(item => {
      // ç±»åž‹è½¬æ¢+容错,避免非数字值导致计算错误
      const orderQty = Number(item.orderQuantity) || 0;
      const lockQty = Number(item.lockQuantity) || 0;
      totalOutboundQuantity += (orderQty - lockQty);
    });
    const requestParams = {
      detailIds: keys,
      outboundQuantity: totalOutboundQuantity,
      operator: "",
      orderNo: this.row.orderNo,
      isBatch: this.isBatch,
    };
    console.log("分批出库参数:", requestParams);
    this.$refs.DirectOutbound.open(requestParams);
  },
    setCurrent(row) {
      this.$refs.singleTable.setCurrentRow(row);
    },
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs
@@ -209,6 +209,11 @@
                string responseMsg = totalActualAllocate == totalNeedAllocate
                    ? "分拣任务分配成功"
                    : $"分拣任务分配完成(实际分配{totalActualAllocate},需求{totalNeedAllocate},库存不足部分未分配)";
                if(totalActualAllocate == 0)
                {
                    UpdateOutboundOrderStatus(request.OrderNo, (int)OutOrderStatusEnum.未开始);
                    return WebResponseContent.Instance.Error("分配库存数量为0,无法出库");
                }
                response.Success = true;
                response.Message = responseMsg;
                response.Tasks = tasks;
@@ -1113,7 +1118,14 @@
                        {
                            barcodeQuantity = item.LockQuantity - item.OverOutQuantity;
                            allocatedQuantity -= (item.LockQuantity - item.OverOutQuantity);
                            item.CurrentDeliveryQty = item.LockQuantity - item.OverOutQuantity;
                            if(item.ReturnToMESStatus == 0)
                            {
                                item.CurrentDeliveryQty = item.LockQuantity;
                            }
                            else
                            {
                                item.CurrentDeliveryQty = item.LockQuantity - item.OverOutQuantity;
                            }
                            item.OverOutQuantity = item.LockQuantity;
                        }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs
@@ -119,7 +119,6 @@
                    }
                    allocateOrder.Details.Add(orderDetail);
                }
                allocateOrder.Details.AddRange(allocateOrder.Details);
            }
            var content = await Service.ReceiveAllocateOrder(allocateOrder, model.OperationType);