0703
parent
44dbbc5888
commit
79838b71c8
|
@ -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;
|
||||
|
|
|
@ -184,6 +184,8 @@ public class WarehousingStatisticsService : IDynamicApiController, ITransient
|
|||
var warehouseName = warehouse == null ? "" : warehouse.Name;
|
||||
var baseCount = input.CodeDatas.Count;
|
||||
var tempAddList = new List<PrintCodeDetail>();
|
||||
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<AddWarehousingStatisticsInput>();
|
||||
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;
|
||||
|
|
|
@ -196,7 +196,7 @@
|
|||
const readReportDetailTable = (row: any) => {
|
||||
printDetailTableTitle.value = '条码详情';
|
||||
//console.log(row.sourceId);
|
||||
printDetailDialogRef.value.openDialog(row.sourceId);
|
||||
printDetailDialogRef.value.openDialog(row.id);
|
||||
};
|
||||
|
||||
// 删除
|
||||
|
|
Loading…
Reference in New Issue