增加固体饮料批号初版
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user