1
647556386
2026-01-06 a9eeae8b5b9441aa5f214789f0238a2e2c097651
1
已修改4个文件
116 ■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js
@@ -31,7 +31,7 @@
        name: "撤销组盘",
        type: "primary",
        value: "撤销组盘",
        onClick: function() {
        onClick: function () {
          console.log("撤销组盘按钮被点击");
          const mountNode = document.createElement("div");
          document.body.appendChild(mountNode);
@@ -57,9 +57,9 @@
            try {
              const response = await http.post(
                "/api/InboundOrder/UndoPalletGroup?palletCode=" +
                  formData.palletCode.trim() +
                  "&barcode=" +
                  formData.barcode.trim()
                formData.palletCode.trim() +
                "&barcode=" +
                formData.barcode.trim()
              );
              const { status, message, data } = response;
              if (status) {
@@ -292,7 +292,7 @@
          if (rows.length > 1) {
            return this.$Message.error("请选择一条数据");
          }
          this.http.post(`api/Inbound/BatchInOrderFeedbackToMes?id=${rows[0].id}`,{},"数据处理中...")
          this.http.post(`api/Inbound/BatchInOrderFeedbackToMes?id=${rows[0].id}`, {}, "数据处理中...")
            .then((x) => {
              if (x.status) {
                this.$Message.success(x.message);
@@ -349,18 +349,28 @@
          column.formatter = (row) => {
            // æ ¡éªŒdetails是否存在且有数据
            if (row.details && row.details.length > 0) {
              //按materielCode分组统计orderQuantity总和
              // æŒ‰materielCode分组,同时保存对应的materielName和统计orderQuantity总和
              const materielSumMap = row.details.reduce((acc, item) => {
                const materielName = item.materielName || "未知名称";
                const materielCode = item.materielCode || "未知物料";
                const quantity = Number(item.orderQuantity) || 0;
                acc[materielCode] = (acc[materielCode] || 0) + quantity;
                // æ ¸å¿ƒä¿®æ”¹ï¼šä¸å†åªå­˜æ•°é‡ï¼Œè€Œæ˜¯å­˜åŒ…含名称和数量的对象
                if (!acc[materielCode]) {
                  acc[materielCode] = {
                    name: materielName, // å­˜å‚¨ç‰©æ–™åç§°
                    total: 0 // å­˜å‚¨æ•°é‡æ€»å’Œ
                  };
                }
                acc[materielCode].total += quantity;
                return acc;
              }, {});
              //每个物料项生成独立div,跨行显示
              // æ¯ä¸ªç‰©æ–™é¡¹ç”Ÿæˆç‹¬ç«‹div,显示编码+名称+数量
              const displayItems = Object.entries(materielSumMap).map(
                ([code, total]) => {
                  return `<div style="line-height: 1.5; white-space: normal;">${code}:${total}个</div>`;
                ([code, data]) => {
                  // æ˜¾ç¤ºæ ¼å¼ï¼šç‰©æ–™ç¼–码(物料名称):数量个
                  return `<div style="line-height: 1.5; white-space: normal;">${code}(${data.name}):${data.total}个</div>`;
                }
              );
              const displayContent = displayItems.join("");
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue
@@ -8,6 +8,14 @@
      title="虚拟出入库"
      class="custom-vol-box"
    >
      <!-- æäº¤é®ç½©å±‚:覆盖整个弹窗内容区域 -->
      <div class="submit-mask" v-show="submitLoading">
        <div class="mask-content">
          <el-loading-spinner class="loading-icon" />
          <span class="loading-text">正在提交出库,请稍候...</span>
        </div>
      </div>
      <div>
        <!-- å•据输入区域(支持扫码) -->
        <el-form 
@@ -25,7 +33,7 @@
              @input="handleOutboundInput"
              @keyup.enter="validateOutboundOrder"
              ref="outboundInputRef"
              :disabled="loading"
              :disabled="loading || submitLoading"
            ></el-input>
          </el-form-item>
          <el-form-item label="采购单据:" name="purchaseOrderNo">
@@ -37,6 +45,7 @@
              @input="handlePurchaseInput"
              readonly
              ref="purchaseInputRef"
              :disabled="submitLoading"
            ></el-input>
          </el-form-item>
        </el-form>
@@ -62,7 +71,7 @@
              @keydown.enter="debouncedHandleScan" 
              autofocus
              class="custom-input"
              :disabled="!orderForm.outboundOrderNo || loading"
              :disabled="!orderForm.outboundOrderNo || loading || submitLoading"
            ></el-input>
          </el-form-item>
          <el-form-item>
@@ -71,7 +80,7 @@
              size="small" 
              @click="handleScan" 
              class="custom-button"
              :disabled="!orderForm.outboundOrderNo || loading"
              :disabled="!orderForm.outboundOrderNo || loading || submitLoading"
            >
              <Search /> ç¡®è®¤æ‰«æ
            </el-button>
@@ -123,7 +132,7 @@
                      @click="removeItem(index, item.barcode)"
                      icon="Delete"
                      circle
                      :disabled="loading"
                      :disabled="loading || submitLoading"
                    ></el-button>
                  </div>
                </transition-group>
@@ -142,7 +151,7 @@
            type="primary" 
            size="small" 
            @click="submit" 
            :disabled="scannedBarcodes.length === 0 || !orderForm.outboundOrderNo || loading"
            :disabled="scannedBarcodes.length === 0 || !orderForm.outboundOrderNo || loading || submitLoading"
            class="submit-btn"
          >
            <Check /> æäº¤å‡ºåº“
@@ -156,7 +165,7 @@
              showDetailBox = false;
            }" 
            class="cancel-btn" 
            :disabled="loading"
            :disabled="loading || submitLoading"
          >
            å–消
          </el-button>
@@ -185,6 +194,8 @@
});
const scannedBarcodes = ref([]);
const loading = ref(false);
// æ–°å¢žï¼šæäº¤ä¸“属loading状态,控制遮罩层显示
const submitLoading = ref(false);
// æ¨¡æ¿å¼•用
const formRef = ref(null);
@@ -217,6 +228,7 @@
  formData.barcode = "";
  orderForm.outboundOrderNo = "";
  orderForm.purchaseOrderNo = "";
  submitLoading.value = false; // æ‰“开弹窗时重置提交loading
  nextTick(() => {
    outboundInputRef.value?.focus(); // æ‰“开弹窗仍聚焦出库单输入框
  });
@@ -435,7 +447,8 @@
  const purchaseOrderNos = [...new Set(scannedBarcodes.value.map(item => item.purchaseOrderNo).filter(Boolean))];
  try {
    loading.value = true;
    // å¼€å¯æäº¤loading,显示遮罩层
    submitLoading.value = true;
    const res = await http.post("/api/OutboundPicking/NoStockOutSubmit", {
      OutOderSubmit: orderForm.outboundOrderNo,
      InOderSubmit: purchaseOrderNos.join(',') || '',
@@ -455,6 +468,8 @@
    ElMessage.error("出库提交异常:" + error.message);
    nextTick(() => barcodeInputRef.value?.focus()); // å¼‚常聚焦条码框
  } finally {
    // å…³é—­æäº¤loading,隐藏遮罩层
    submitLoading.value = false;
    loading.value = false;
  }
};
@@ -483,6 +498,33 @@
  transition: transform 1s ease;
}
/* æ–°å¢žï¼šæäº¤é®ç½©å±‚样式 */
.submit-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: inherit;
}
.mask-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #409eff;
  font-size: 15px;
}
.loading-icon {
  font-size: 24px;
  animation: el-loading-circle 1.5s linear infinite;
}
.scan-list {
  width: 100%;
}
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
@@ -147,7 +147,7 @@
        field: "orderStatistics",
        title: "单据物料统计",
        type: "string",
        width: 230,
        width: 300,
        align: "left",
      },
      {
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs
@@ -2365,7 +2365,7 @@
                        foreach (var detail in inboundOrder.Details)
                        {
                            if (detail.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt() &&
                                !string.IsNullOrEmpty(detail.Barcode))
                                !string.IsNullOrEmpty(detail.Barcode)&& detail.OutBoxbarcodes == noStockOut.barCode)
                            {
                                detailLists.Add(detail);
                            }
@@ -2386,11 +2386,18 @@
                {
                    item.NoStockOutQty = 0;
                    var matchedCode = outboundOrder.Details.FirstOrDefault(detail => detail.MaterielCode == item.MaterielCode && detail.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt() && (detail.OrderQuantity-detail.LockQuantity-detail.MoveQty-detail.NoStockOutQty)>0);
                    var matchedCode = outboundOrder.Details.FirstOrDefault(detail => detail.MaterielCode == item.MaterielCode && detail.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt()&& detail.OrderQuantity - detail.LockQuantity - detail.MoveQty - detail.NoStockOutQty > 0);
                    if (matchedCode == null)
                    if (matchedCode != null)
                    {
                        return WebResponseContent.Instance.Error($"在出库单的物料编码中未找到与采购单中的{item.MaterielCode} å¯¹åº”的物料。或物料{item.MaterielCode}可出数量溢出{(matchedCode.LockQuantity + matchedCode.MoveQty + matchedCode.NoStockOutQty)-matchedCode.OrderQuantity }");
                        if(matchedCode.OrderQuantity - matchedCode.LockQuantity - matchedCode.MoveQty - matchedCode.NoStockOutQty < 0)
                        {
                            return WebResponseContent.Instance.Error($"物料{item.MaterielCode}可出数量溢出{(matchedCode.LockQuantity + matchedCode.MoveQty + matchedCode.NoStockOutQty) - matchedCode.OrderQuantity}");
                        }
                    }
                    else
                    {
                        return WebResponseContent.Instance.Error($"在出库单的物料编码中未找到与采购单中的{item.MaterielCode} å¯¹åº”的物料");
                    }
                    if (!matchedCode.BatchNo.IsNullOrEmpty() && matchedCode.BatchNo != "")
                    {
@@ -2792,12 +2799,12 @@
                    if (response != null && response.IsSuccess)
                    {
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
                            .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); ;
                            .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand();
                    }
                    else
                    {
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 })
                            .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); ;
                            .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand();
                        return content.Error("回传MES失败");
                    }
                }
@@ -2824,11 +2831,16 @@
                    if (response != null && response.IsSuccess)
                    {
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 });
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
                            .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand();
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 })
                            .Where(it => it.Id == inboundOrder.Id).ExecuteCommand();
                    }
                    else
                    {
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 });
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 }).Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand();
                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 2 })
                            .Where(it => it.Id == inboundOrder.Id).ExecuteCommand();
                        return content.Error("回传MES失败");
                    }
                }