1
647556386
2026-01-06 cc9a586e2f5c01b606bfc6d541c5e1dbd6de6700
1
已修改2个文件
26 ■■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue
@@ -333,9 +333,10 @@
    const purchaseOrderNo = await getPurchaseOrderByBarcode(barcode);
    if (purchaseOrderNo) {
      orderForm.purchaseOrderNo = purchaseOrderNo;
      ElMessage.success(`成功查询到采购单:${purchaseOrderNo}`);
    } else {
      ElMessage.info("未查询到该条码对应的采购单号,继续验证条码有效性");
      formData.barcode = ""; // æ–°å¢žï¼šéªŒè¯å¤±è´¥æ—¶æ¸…空输入框
      nextTick(() => barcodeInputRef.value?.focus()); // æ–°å¢žï¼šèšç„¦æ¡ç è¾“入框
    }
    // æ­¥éª¤2:验证条码并获取物料信息
@@ -348,6 +349,8 @@
    if (validateRes.status === true) {
      if (!Array.isArray(validateRes.data) || validateRes.data.length === 0) {
        ElMessage.warning("该条码验证成功,但未返回物料信息");
        formData.barcode = ""; // æ–°å¢žï¼šæ— ç‰©æ–™ä¿¡æ¯æ—¶ä¹Ÿæ¸…空输入框
        nextTick(() => barcodeInputRef.value?.focus()); // æ–°å¢žï¼šèšç„¦æ¡ç æ¡†
      } else {
        const newItems = validateRes.data.map(item => ({
          barcode: item.barcode || '',
@@ -360,14 +363,18 @@
        }));
        scannedBarcodes.value.push(...newItems);
        ElMessage.success(`扫描成功,新增 ${newItems.length} æ¡ç‰©æ–™ä¿¡æ¯ï¼Œç´¯è®¡ ${scannedBarcodes.value.length} æ¡`);
      }
      formData.barcode = "";
      }
    } else {
      ElMessage.error("扫描失败:" + (validateRes.message || '条码验证失败'));
      formData.barcode = ""; // æ–°å¢žï¼šéªŒè¯å¤±è´¥æ—¶æ¸…空输入框
      nextTick(() => barcodeInputRef.value?.focus()); // æ–°å¢žï¼šèšç„¦æ¡ç è¾“入框
    }
  } catch (error) {
    ElMessage.error(error.message);
    formData.barcode = "";
    formData.barcode = ""; // ä¿ç•™ï¼šæŽ¥å£å¼‚常时清空
    // æ–°å¢žï¼šå¼‚常时也强制聚焦条码框
    nextTick(() => barcodeInputRef.value?.focus());
  } finally {
    loading.value = false;
    // æ‰«æå®ŒæˆåŽå§‹ç»ˆèšç„¦æ¡ç è¾“入框(方便连续扫描)
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs
@@ -2390,7 +2390,7 @@
                    if (matchedCode == null)
                    {
                        return WebResponseContent.Instance.Error($"在出库单的物料编码中未找到与采购单中的{item.MaterielCode} å¯¹åº”的物料。");
                        return WebResponseContent.Instance.Error($"在出库单的物料编码中未找到与采购单中的{item.MaterielCode} å¯¹åº”的物料。或物料{item.MaterielCode}可出数量溢出{(matchedCode.LockQuantity + matchedCode.MoveQty + matchedCode.NoStockOutQty)-matchedCode.OrderQuantity }");
                    }
                    if (!matchedCode.BatchNo.IsNullOrEmpty() && matchedCode.BatchNo != "")
                    {
@@ -2683,6 +2683,7 @@
                {
                    item.LockQuantity = item.NoStockOutQty;
                    item.OverOutQuantity = item.NoStockOutQty;
                    item.CurrentDeliveryQty = item.OverOutQuantity;
                    //添加回传MES参数
                    List<Barcodes> barcodesList = new List<Barcodes>();
                    List<Barcodes> documentsNOList = new List<Barcodes>();
@@ -2774,7 +2775,7 @@
                        BusinessType = "3",
                        FactoryArea = inboundOrder.FactoryArea,
                        OperationType = 1,
                        Operator = inboundOrder.Operator,
                        Operator = App.User.UserName,
                        OrderNo = inboundOrder.UpperOrderNo,
                        fromWarehouse = allocate?.FromWarehouse ?? "",
                        toWarehouse = allocate?.ToWarehouse ?? "",
@@ -2790,11 +2791,13 @@
                    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(); ;
                    }
                    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(); ;
                        return content.Error("回传MES失败");
                    }
                }
@@ -2807,7 +2810,7 @@
                        business_type = inboundOrder.BusinessType,
                        factoryArea = inboundOrder.FactoryArea,
                        operationType = 1,
                        Operator = inboundOrder.Operator,
                        Operator = App.User.UserName,
                        orderNo = inboundOrder.UpperOrderNo,
                        status = inboundOrder.OrderStatus,
                        details = NoStockOutFeedbackInboundDetailsModelDto(detail)