增加固体饮料批号初版

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

@@ -129,6 +129,12 @@ namespace FATrace.WPLApp.ViewModels
/// </summary>
public string? Batch { get => _batch; set { _batch = value; RaisePropertyChanged(); } }
private string? _solidBeveBatch;
/// <summary>
/// 固体饮料批次模糊匹配
/// </summary>
public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } }
private string? _opUser;
/// <summary>
/// 操作者模糊匹配
@@ -228,7 +234,7 @@ namespace FATrace.WPLApp.ViewModels
/// </summary>
private void ClearFilters()
{
RawCode = RawName = InBagCode = BoxCode = Batch = OpUser = CheckUser = string.Empty;
RawCode = RawName = InBagCode = BoxCode = Batch = SolidBeveBatch = OpUser = CheckUser = string.Empty;
StartTime = DateTime.Today;
EndTime = DateTime.Today.AddDays(1).AddSeconds(-1);
}
@@ -277,6 +283,8 @@ namespace FATrace.WPLApp.ViewModels
q = q.Where(a => a.BoxCode.Contains(BoxCode));
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 (!string.IsNullOrWhiteSpace(OpUser))
q = q.Where(a => a.OpUser.Contains(OpUser));
if (!string.IsNullOrWhiteSpace(CheckUser))
@@ -298,6 +306,7 @@ namespace FATrace.WPLApp.ViewModels
InBagCode = a.InBagCode,
BoxCode = a.BoxCode,
Batch = a.Batch,
SolidBeveBatch = a.SolidBeveBatch,
ShelfLife = a.ShelfLife,
Weight = a.Weight,
RemainWeight = a.RemainWeight,
@@ -322,6 +331,7 @@ namespace FATrace.WPLApp.ViewModels
InBagCode = a.InBagCode,
BoxCode = a.BoxCode,
Batch = a.Batch,
SolidBeveBatch = a.SolidBeveBatch,
ShelfLife = a.ShelfLife,
Weight = a.Weight,
RemainWeight = a.RemainWeight,
@@ -447,7 +457,7 @@ namespace FATrace.WPLApp.ViewModels
var header = sheet.CreateRow(0);
string[] headers = new[]
{
"Id","原料编号","原料名称","内袋二维码","外箱二维码","批号","保质期(年)",
"Id","原料编号","原料名称","内袋二维码","外箱二维码","批号","固体饮料批次","保质期(年)",
"称重重量(g)","剩余重量(g)","入库总重量(g)","称重时间","操作者","确认者","出库时间","创建时间"
};
// 表头样式:加粗与更大字号
@@ -484,6 +494,7 @@ namespace FATrace.WPLApp.ViewModels
row.CreateCell(c++).SetCellValue(it.InBagCode ?? string.Empty);
row.CreateCell(c++).SetCellValue(it.BoxCode ?? string.Empty);
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.Weight);
row.CreateCell(c++).SetCellValue(it.RemainWeight);