1
huangxiaoqiang
2025-12-24 218173fcd46883aab427b2e8f0b507ad874093e1
1
已修改7个文件
69 ■■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/views/inbound/allocateinboundOrder.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/allocateinboundOrder.vue
@@ -1,25 +1,12 @@
<template>
  <view-grid
    ref="grid"
    @openPalletDialog="handleOpenPalletDialog"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  <view-grid ref="grid" @openPalletDialog="handleOpenPalletDialog" :columns="columns" :detail="detail"
    :editFormFields="editFormFields" :editFormOptions="editFormOptions" :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
  </view-grid>
      <!-- 2. ç»„盘弹窗:确保props和事件绑定正确 -->
    <PalletDialog
      v-model:visible="palletVisible"
      :docNo="currentPalletDocNo"
      @back-success="handlePalletBackSuccess"
    ></PalletDialog>
  <PalletDialog v-model:visible="palletVisible" :docNo="currentPalletDocNo" @back-success="handlePalletBackSuccess">
  </PalletDialog>
</template>
    <script>
import extend from "@/extension/inbound/allocateinboundOrder.js";
@@ -262,12 +249,12 @@
          required: true,
        },
        {
          field: "materielCode",
          field: "materielName",
          title: "物料名称",
          type: "string",
          width: 100,
          align: "left",
          bind: { key: "MaterielNames", data: [] },
          bind: { key: "materielInfo", data: [] },
        },
        {
          field: "batchNo",
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
@@ -239,12 +239,12 @@
          required: true,
        },
        {
          field: "materielCode",
          field: "materielName",
          title: "物料名称",
          type: "string",
          width: 120,
          width: 150,
          align: "left",
          bind: { key: "MaterielNames", data: [] },
          bind: { key: "materielInfo", data: [] },
        },
        {
          field: "batchNo",
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue
@@ -108,6 +108,7 @@
        type: "string",
        width: 150,
        align: "left",
        bind: { key: "materielInfo", data: [] },
      },
      {
        field: "orderNo",
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue
@@ -96,6 +96,7 @@
        type: "string",
        width: 150,
        align: "left",
        bind: { key: "materielInfo", data: [] },
      },
      {
        field: "batchNo",
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs
@@ -27,6 +27,7 @@
        public readonly IRepository<Dt_AllocateOrder> _allocateOrderRepository;
        public readonly IRepository<Dt_AllocateOrderDetail> _allocateOrderDetailRepository;
        private readonly IMaterielInfoService _materielInfoService;
        private readonly IRepository<Dt_MaterielInfo> _materielInforepository;
        public readonly IRepository<Dt_InboundOrderDetail> _inboundOrderDetailRepository;
        private readonly ILogger<AllocateService> _logger;
@@ -38,7 +39,8 @@
            IRepository<Dt_AllocateOrderDetail> allocateOrderDetailRepository,
            IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository,
            ILogger<AllocateService> logger,
            IMaterielInfoService materielInfoService) : base(BaseDal)
            IMaterielInfoService materielInfoService,
            IRepository<Dt_MaterielInfo> materielInforepository) : base(BaseDal)
        {
            _unitOfWorkManage = unitOfWorkManage;
            _inboundService = inboundService;
@@ -48,6 +50,7 @@
            _logger = logger;
            _inboundOrderDetailRepository = inboundOrderDetailRepository;
            _materielInfoService = materielInfoService;
            _materielInforepository = materielInforepository;
        }
        public IRepository<Dt_AllocateOrder> Repository => BaseDal;
@@ -299,6 +302,15 @@
                .Select(g => g.First())
                .ToList();
            // èŽ·å–æ‰€æœ‰ç‰©æ–™ä»£ç 
            var materielCodes = distinctDetails.Select(d => d.MaterielCode).Distinct().ToList();
            // ä»Žæ•°æ®åº“查询物料信息(假设使用 DbContext)
            var materielInfos = _materielInforepository.Db.Queryable<Dt_MaterielInfo>()
                .Where(m => materielCodes.Contains(m.MaterielCode))
                .Select(m => new { m.MaterielCode, m.MaterielName })
                .ToDictionary(m => m.MaterielCode, m => m.MaterielName);
            return new List<Dt_InboundOrder>()
            {
                new Dt_InboundOrder(){
@@ -315,9 +327,10 @@
                   Remark=allocateOrder.Remark,
                   Details=distinctDetails.Select(detail=>new Dt_InboundOrderDetail
                   {
                       OrderId= 0,
                       MaterielCode=detail.MaterielCode,
                       MaterielName="",
                       MaterielName=detail.MaterielName,
                       BatchNo=detail.BatchNo,
                       OrderQuantity=detail.OrderQuantity,
                       ReceiptQuantity=detail.ReceiptQuantity,
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs
@@ -8,6 +8,7 @@
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.BaseRepository;
using WIDESEA_DTO.Allocate;
using WIDESEA_IAllocateService;
using WIDESEA_IInboundService;
@@ -26,9 +27,11 @@
    public class AllocateOrderController : ApiBaseController<IAllocateService, Dt_AllocateOrder>
    {
        private readonly ILogger<AllocateOrderController> _logger;
        public AllocateOrderController(IAllocateService service, ILogger<AllocateOrderController> logger) : base(service)
        private readonly IRepository<Dt_MaterielInfo> _materialInfoRepository;
        public AllocateOrderController(IAllocateService service, ILogger<AllocateOrderController> logger,IRepository<Dt_MaterielInfo> materialInfoRepository) : base(service)
        {
            _logger = logger;
            _materialInfoRepository = materialInfoRepository;
        }
        [HttpPost, Route("ReceiveAllocateOrder"), MethodParamsValidate, AllowAnonymous]
@@ -68,6 +71,7 @@
                {
                    return WebResponseContent.Instance.Error($"条码不能为空");
                }
                var materialName = _materialInfoRepository.QueryFirst(x => x.MaterielCode == detailDto.materialCode).MaterielName;
                if (detailDto.Barcodes != null && detailDto.Barcodes.Any())
                {
                    foreach (var barcodeDto in detailDto.Barcodes)
@@ -76,6 +80,7 @@
                        {
                            WarehouseCode = detailDto.WarehouseCode,
                            MaterielCode = detailDto.MaterialCode,
                            MaterielName = materialName,
                            LineNo = detailDto.LineNo,
                            OrderQuantity = detailDto.Qty,
                            SupplyCode = barcodeDto.SupplyCode,
@@ -101,7 +106,7 @@
                        Unit = detailDto.Unit,
                        BarcodeUnit =detailDto.Unit,
                        BarcodeQty=detailDto.Qty,
                        MaterielName = materialName
                    };
                    allocateOrder.Details.Add(orderDetail);
                }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs
@@ -43,12 +43,13 @@
        private readonly ILocationInfoService _locationInfoService;
        private readonly IDailySequenceService _dailySequenceService;
        private readonly IMaterialUnitService _materialUnitService;
        private readonly IRepository<Dt_MaterielInfo> _materialInfoRepository;
        private readonly IOutStockLockInfoService _outStockLockInfoService;
        private readonly IOutboundOrderDetailService _outboundOrderDetailService;
        private readonly IRepository<Dt_Task> _taskRepository;
        private readonly ITask_HtyService _task_HtyService;
        private readonly ILogger<InboundOrderController> _logger;
        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService, IRepository<Dt_Task> taskRepository, ITask_HtyService task_HtyService) : base(service)
        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService, IRepository<Dt_Task> taskRepository, ITask_HtyService task_HtyService, IRepository<Dt_MaterielInfo> materialInfoRepository) : base(service)
        {
            this.erpApiService = erpApiService;
            _invokeMESService = invokeMESService;
@@ -62,6 +63,7 @@
            _outboundOrderDetailService = outboundOrderDetailService;
            _taskRepository = taskRepository;
            _task_HtyService = task_HtyService;
            _materialInfoRepository = materialInfoRepository;
        }
        [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate]
@@ -147,7 +149,7 @@
                Dt_InboundOrder dt_InboundOrder = new Dt_InboundOrder() { Details = new List<Dt_InboundOrderDetail>() };
                foreach (var detailitem in item.details)
                {
                    var materialName = _materialInfoRepository.QueryFirst(x => x.MaterielCode == detailitem.materialCode).MaterielName;
                    if (detailitem.barcodes != null && detailitem.barcodes.Any())
                    {
                        foreach (var barcode in detailitem.barcodes)
@@ -156,6 +158,7 @@
                            {
                                lineNo = detailitem.lineNo,
                                MaterielCode = detailitem.materialCode,
                                MaterielName = materialName,
                                SupplyCode = detailitem.supplyCode,
                                BatchNo = detailitem.batchNo,
                                Unit = detailitem.unit,
@@ -184,6 +187,7 @@
                            OrderQuantity = detailitem.qty,
                            BarcodeUnit = detailitem.unit,
                            BarcodeQty = detailitem.qty,
                            MaterielName = materialName
                        };
                        dt_InboundOrder.Details.Add(inboundOrderDetail);
                    }