增加固体饮料批号初版

This commit is contained in:
2026-04-29 09:52:08 +08:00
parent 7f7eb32ca3
commit add4308b91
17 changed files with 354 additions and 90 deletions

View File

@@ -68,6 +68,9 @@ namespace FATrace.WPLApp.ViewModels
public string? Batch { get => _batch; set { _batch = value; RaisePropertyChanged(); } }
private string? _batch;
public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } }
private string? _solidBeveBatch;
/// <summary>
/// 原料来源(可空)
/// </summary>
@@ -144,7 +147,7 @@ namespace FATrace.WPLApp.ViewModels
/// </summary>
private void ClearFilters()
{
RawCode = RawName = Batch = string.Empty;
RawCode = RawName = Batch = SolidBeveBatch = string.Empty;
SelectedRawSource = null;
SelectedRawState = null;
StartTime = DateTime.Today;
@@ -188,6 +191,7 @@ namespace FATrace.WPLApp.ViewModels
if (!string.IsNullOrWhiteSpace(RawCode)) q = q.Where(a => a.RawCode.Contains(RawCode));
if (!string.IsNullOrWhiteSpace(RawName)) q = q.Where(a => a.RawName.Contains(RawName));
if (!string.IsNullOrWhiteSpace(Batch)) q = q.Where(a => a.Batch.Contains(Batch));
if (!string.IsNullOrWhiteSpace(SolidBeveBatch)) q = q.Where(a => a.SolidBeveBatch.Contains(SolidBeveBatch));
if (SelectedRawSource.HasValue) q = q.Where(a => a.RawSource == SelectedRawSource.Value);
if (SelectedRawState.HasValue) q = q.Where(a => a.RawState == SelectedRawState.Value);
@@ -206,6 +210,7 @@ namespace FATrace.WPLApp.ViewModels
RawName = a.RawName,
Weight = a.Weight,
Batch = a.Batch,
SolidBeveBatch = a.SolidBeveBatch,
ShelfLife = a.ShelfLife,
RawSource = a.RawSource.ToString(),
RemainWeight = a.RemainWeight,
@@ -224,6 +229,7 @@ namespace FATrace.WPLApp.ViewModels
RawName = a.RawName,
Weight = a.Weight,
Batch = a.Batch,
SolidBeveBatch = a.SolidBeveBatch,
ShelfLife = a.ShelfLife,
RawSource = a.RawSource.ToString(),
RemainWeight = a.RemainWeight,
@@ -287,7 +293,7 @@ namespace FATrace.WPLApp.ViewModels
var header = sheet.CreateRow(0);
string[] headers = new[]
{
"Id","原料编号","原料名称","入库重量(kg)","批号","保质期(年)","原料来源","剩余重量(kg)","分拆状态","创建时间"
"Id","原料编号","原料名称","入库重量(kg)","批号","固体饮料批次","保质期(年)","原料来源","剩余重量(kg)","分拆状态","创建时间"
};
var headerFont = workbook.CreateFont();
headerFont.IsBold = true;
@@ -321,6 +327,7 @@ namespace FATrace.WPLApp.ViewModels
row.CreateCell(c++).SetCellValue(it.RawName ?? string.Empty);
row.CreateCell(c++).SetCellValue(it.Weight);
row.CreateCell(c++).SetCellValue(it.Batch ?? string.Empty);
row.CreateCell(c++).SetCellValue(it.SolidBeveBatch ?? string.Empty);
row.CreateCell(c++).SetCellValue(it.ShelfLife);
row.CreateCell(c++).SetCellValue(it.RawSource);
row.CreateCell(c++).SetCellValue(it.RemainWeight);