From 79838b71c868a447f790e1f6e0f587d8a3d5c239 Mon Sep 17 00:00:00 2001 From: liangzongpeng <532365025@qq.com> Date: Wed, 3 Jul 2024 09:47:15 +0800 Subject: [PATCH] 0703 --- .../Service/ReportTable/ReportTableService.cs | 2 -- .../WarehousingStatisticsService.cs | 11 +++++++++++ Web/src/views/productionCenter/reportTable/index.vue | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs index 34748ae..357be0c 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs @@ -28,7 +28,6 @@ public class ReportTableService : IDynamicApiController, ITransient SysUnitService repUnit, SysUnitGroupService repUnitGroup, PrintCodeDetailService codeDetailService, - //ReportDetailTableService reportDetailTable, PrintDataService printDataService, PrintRecordsService printRecordsService, ProductRetrospectService productRetrospectService) @@ -37,7 +36,6 @@ public class ReportTableService : IDynamicApiController, ITransient _repUnit = repUnit; _repUnitGroup = repUnitGroup; _codeDetailService = codeDetailService; - //_reportDetailTable = reportDetailTable; _userManager = userManager; _printDataService = printDataService; _printRecordsService = printRecordsService; diff --git a/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/WarehousingStatisticsService.cs b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/WarehousingStatisticsService.cs index f6a7b57..912b3fa 100644 --- a/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/WarehousingStatisticsService.cs +++ b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/WarehousingStatisticsService.cs @@ -184,6 +184,8 @@ public class WarehousingStatisticsService : IDynamicApiController, ITransient var warehouseName = warehouse == null ? "" : warehouse.Name; var baseCount = input.CodeDatas.Count; var tempAddList = new List(); + string tempBaseUnit = null; + string tempBrand = null; foreach (var item in input.CodeDatas) { var product = await _codeDetailService.GetByProductCode(item); @@ -232,6 +234,12 @@ public class WarehousingStatisticsService : IDynamicApiController, ITransient if (unit == null) unit = units.FirstOrDefault(); baseCount = baseCount * unit.Rate.Value; + if (string.IsNullOrEmpty(reportTable.Unit)) + { + reportTable.Unit = product.Unit; + } + tempBaseUnit = baseUnit; + tempBrand = materials.Brand; if (details != null && details.Any(a => a.MaterialsId == reportTable.MaterialsId && a.Unit == reportTable.Unit)) { var detail = details.Find(a => a.MaterialsId == reportTable.MaterialsId && a.Unit == reportTable.Unit); @@ -297,6 +305,9 @@ public class WarehousingStatisticsService : IDynamicApiController, ITransient var newDetail = reportTable.Adapt(); newDetail.Count = input.CodeDatas.Count; newDetail.BaseCount = baseCount; + newDetail.WarehousingDate = DateTime.Now; + newDetail.BaseUnit = tempBaseUnit; + newDetail.Brand = tempBrand; if (reportTable != null) { newDetail.SourceId = reportTable?.Id; diff --git a/Web/src/views/productionCenter/reportTable/index.vue b/Web/src/views/productionCenter/reportTable/index.vue index 00ccadc..be6ebfc 100644 --- a/Web/src/views/productionCenter/reportTable/index.vue +++ b/Web/src/views/productionCenter/reportTable/index.vue @@ -196,7 +196,7 @@ const readReportDetailTable = (row: any) => { printDetailTableTitle.value = '条码详情'; //console.log(row.sourceId); - printDetailDialogRef.value.openDialog(row.sourceId); + printDetailDialogRef.value.openDialog(row.id); }; // 删除