1
heshaofeng
2026-03-31 192c527f98d80315315d1e231b3ab812fa9a0065
1
已修改3个文件
92 ■■■■ 文件已修改
项目代码/WIDESEA_WMSClient/src/views/stock/stockView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/stock/stockView.vue
@@ -51,7 +51,7 @@
        { title: "供应商编号", field: "supplyCode",type: "like"},
        { title: "所含单据编号", field: "orderNo",type: "like"},
        { title: "库存创建时间", field: "createDate",type: "datetime"},
        { title: "厂区", field: "factoryArea",type: "like"},
      ],
    ]);
    const columns = ref([
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs
@@ -70,6 +70,7 @@
        public readonly IRepository<Dt_InboundOrder> _inboundOrderRepository;
        public readonly IRepository<Dt_WarehouseArea> _warehouseAreaRepository;
        public readonly IRepository<Dt_LocationType> _locationTypeRepository;
        public readonly IRepository<Dt_OutboundOrderDetail> _outboundOrderDetailRepository;
        private Dictionary<string, string> stations = new Dictionary<string, string>
        {
@@ -83,7 +84,7 @@
            {"3-1","3-5" },
        };
        public OutboundService(IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> detailRepository, IRepository<Dt_OutboundOrder> outboundRepository, IRepository<Dt_OutStockLockInfo> outboundLockInfoRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_StockQuantityChangeRecord> stockChangeRepository, IRepository<Dt_StockInfoDetail_Hty> stockDetailHistoryRepository, IBasicService basicService, IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IFeedbackMesService feedbackMesService, IRepository<Dt_Task> taskRepository, ILocationInfoService locationInfoService, IESSApiService eSSApiService, IRepository<Dt_AllocateOrder> allocateOrderRepository, IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository)
        public OutboundService(IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> detailRepository, IRepository<Dt_OutboundOrder> outboundRepository, IRepository<Dt_OutStockLockInfo> outboundLockInfoRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_StockQuantityChangeRecord> stockChangeRepository, IRepository<Dt_StockInfoDetail_Hty> stockDetailHistoryRepository, IBasicService basicService, IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IFeedbackMesService feedbackMesService, IRepository<Dt_Task> taskRepository, ILocationInfoService locationInfoService, IESSApiService eSSApiService, IRepository<Dt_AllocateOrder> allocateOrderRepository, IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_LocationType> locationTypeRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository)
        {
            _mapper = mapper;
            _unitOfWorkManage = unitOfWorkManage;
@@ -110,6 +111,7 @@
            _inboundOrderRepository = inboundOrderRepository;
            _locationTypeRepository = locationTypeRepository;
            _warehouseAreaRepository = warehouseAreaRepository;
            _outboundOrderDetailRepository = outboundOrderDetailRepository;
        }
        public WebResponseContent PrintFromData (string barcode)
@@ -2514,7 +2516,6 @@
                Dt_StockInfoDetail_Hty historyDetail = _stockDetailHistoryRepository.QueryFirst(x =>
                    x.Barcode == request.Barcode &&
                    (x.OperateType == "出库完成" || x.OperateType == "拆包-原始记录"));
                if(historyDetail != null)
@@ -2540,6 +2541,41 @@
                {
                    return WebResponseContent.Instance.Error("该托盘已全部拣选完,不允许撤销");
                }
               var details = _outboundOrderDetailRepository.QueryData(x => x.OrderId == outboundOrder.Id);
                var outboundDetails = details
                    .Where(x =>
                        x.MaterielCode == historyDetail.MaterielCode
                        &&
                        !string.IsNullOrEmpty(lockInfo.OrderDetailIds)
                        &&
                        lockInfo.OrderDetailIds.Split(",")
                            .Any(idStr => idStr.Trim() == x.Id.ToString())
                    ).ToList();
                var detail = outboundDetails.FirstOrDefault();
                if (detail != null && !string.IsNullOrEmpty(detail.ReturnJsonData))
                {
                    try
                    {
                        string deleteBarcode = request.Barcode;
                        var list = JsonConvert.DeserializeObject<List<BarcodeItem>>(detail.ReturnJsonData);
                        if (list != null)
                        {
                            var filteredList = list.Where(x => x.barcode != deleteBarcode).ToList();
                            detail.ReturnJsonData = JsonConvert.SerializeObject(filteredList);
                            _outboundOrderDetailRepository.UpdateData(detail);
                        }
                    }
                    catch
                    {
                    }
                }
                _unitOfWorkManage.BeginTran();
                try
                {
@@ -2552,21 +2588,11 @@
                    {
                        ReverseFullOutboundOperation(historyDetail, stockInfo, request);
                    }
                    RollbackOutboundOrderDetails(historyDetail.MaterielCode, request.OrderNo, historyDetail.StockQuantity, stockInfo.Id);
                    if (lockInfo != null)
                    {
                        lockInfo.SortedQuantity = Math.Max(0, (decimal)(lockInfo.SortedQuantity - historyDetail.StockQuantity));
                        if (lockInfo.SortedQuantity == 0)
                        {
                            _outboundLockInfoRepository.UpdateData(lockInfo);
                        }
                        else
                        {
                            _outboundLockInfoRepository.UpdateData(lockInfo);
                        }
                    }
                    _stockDetailHistoryRepository.DeleteData(historyDetail);
@@ -2779,4 +2805,35 @@
       
    }
    /// <summary>
    /// æ¡ç æ˜Žç»†å®žä½“
    /// </summary>
    public class BarcodeItem
    {
        /// <summary>
        /// æ¡ç 
        /// </summary>
        public string barcode { get; set; }
        /// <summary>
        /// æ•°é‡
        /// </summary>
        public decimal qty { get; set; }
        /// <summary>
        /// ä¾›åº”商编码
        /// </summary>
        public string supplyCode { get; set; }
        /// <summary>
        /// æ‰¹æ¬¡å·
        /// </summary>
        public string batchNo { get; set; }
        /// <summary>
        /// å•位
        /// </summary>
        public string unit { get; set; }
    }
}
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs
@@ -57,6 +57,13 @@
                                                .Where(x => x.Details.Any(v => v.BatchNo.Contains(param.Value.ToString())));
                                        }
                                        break;
                                    case var name when name == nameof(Dt_StockInfoDetail.FactoryArea).FirstLetterToLower():
                                        if (!string.IsNullOrEmpty(param.Value?.ToString()))
                                        {
                                            sugarQueryable1 = sugarQueryable1
                                                .Where(x => x.Details.Any(v => v.FactoryArea.Contains(param.Value.ToString())));
                                        }
                                        break;
                                    case var name when name == nameof(Dt_StockInfoDetail.SupplyCode).FirstLetterToLower():
                                        if (!string.IsNullOrEmpty(param.Value?.ToString()))
                                        {