客户要求的更改

This commit is contained in:
2026-05-15 17:17:08 +08:00
parent add4308b91
commit 7dabeddde4
23 changed files with 248 additions and 102 deletions

View File

@@ -67,6 +67,8 @@ namespace FATrace.App
label8 = new Label();
label10 = new Label();
panel2 = new Panel();
txtSolidBeveBatch = new TextBox();
label33 = new Label();
pictureBox3 = new PictureBox();
lblRawUseStateTip = new Label();
btnClearRaw = new Button();
@@ -114,8 +116,6 @@ namespace FATrace.App
dtpSearchStartTime = new DateTimePicker();
dataGridView1 = new DataGridView();
label22 = new Label();
txtSolidBeveBatch = new TextBox();
label33 = new Label();
statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit();
splitContainer1.Panel1.SuspendLayout();
@@ -501,12 +501,12 @@ namespace FATrace.App
//
// txtCode
//
txtCode.Font = new Font("Microsoft YaHei UI", 15F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtCode.Font = new Font("Microsoft YaHei UI", 12F);
txtCode.ForeColor = Color.Blue;
txtCode.Location = new Point(129, 96);
txtCode.Location = new Point(129, 99);
txtCode.Name = "txtCode";
txtCode.ReadOnly = true;
txtCode.Size = new Size(410, 33);
txtCode.Size = new Size(535, 28);
txtCode.TabIndex = 16;
//
// label13
@@ -588,6 +588,25 @@ namespace FATrace.App
panel2.Size = new Size(878, 192);
panel2.TabIndex = 2;
//
// txtSolidBeveBatch
//
txtSolidBeveBatch.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtSolidBeveBatch.Location = new Point(314, 102);
txtSolidBeveBatch.Name = "txtSolidBeveBatch";
txtSolidBeveBatch.Size = new Size(184, 32);
txtSolidBeveBatch.TabIndex = 16;
//
// label33
//
label33.AutoSize = true;
label33.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
label33.ForeColor = SystemColors.WindowFrame;
label33.Location = new Point(180, 105);
label33.Name = "label33";
label33.Size = new Size(145, 26);
label33.TabIndex = 15;
label33.Text = "固体饮料批次:";
//
// pictureBox3
//
pictureBox3.BackgroundImageLayout = ImageLayout.None;
@@ -801,9 +820,9 @@ namespace FATrace.App
//
btnRawName3.Enabled = false;
btnRawName3.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Bold, GraphicsUnit.Point, 134);
btnRawName3.Location = new Point(321, 53);
btnRawName3.Location = new Point(392, 53);
btnRawName3.Name = "btnRawName3";
btnRawName3.Size = new Size(266, 48);
btnRawName3.Size = new Size(324, 48);
btnRawName3.TabIndex = 3;
btnRawName3.Text = "YG03031004 抗性糊精";
btnRawName3.UseVisualStyleBackColor = true;
@@ -815,7 +834,7 @@ namespace FATrace.App
btnRawName2.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Bold, GraphicsUnit.Point, 134);
btnRawName2.Location = new Point(24, 107);
btnRawName2.Name = "btnRawName2";
btnRawName2.Size = new Size(266, 48);
btnRawName2.Size = new Size(324, 48);
btnRawName2.TabIndex = 2;
btnRawName2.Text = "YG03010001 白砂糖";
btnRawName2.UseVisualStyleBackColor = true;
@@ -826,9 +845,9 @@ namespace FATrace.App
btnRawName1.Font = new Font("Microsoft YaHei UI", 10.5F, FontStyle.Bold, GraphicsUnit.Point, 134);
btnRawName1.Location = new Point(24, 53);
btnRawName1.Name = "btnRawName1";
btnRawName1.Size = new Size(266, 48);
btnRawName1.Size = new Size(324, 48);
btnRawName1.TabIndex = 1;
btnRawName1.Text = "1121000265 瑞士乳杆菌(固体饮料)";
btnRawName1.Text = "1121000265 瑞士乳杆菌(固体饮料)GLC1815";
btnRawName1.UseVisualStyleBackColor = true;
btnRawName1.Click += btnRawName1_Click;
//
@@ -1100,25 +1119,6 @@ namespace FATrace.App
label22.Text = "历史数据";
label22.TextAlign = ContentAlignment.MiddleCenter;
//
// txtSolidBeveBatch
//
txtSolidBeveBatch.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Regular, GraphicsUnit.Point, 134);
txtSolidBeveBatch.Location = new Point(314, 102);
txtSolidBeveBatch.Name = "txtSolidBeveBatch";
txtSolidBeveBatch.Size = new Size(184, 32);
txtSolidBeveBatch.TabIndex = 16;
//
// label33
//
label33.AutoSize = true;
label33.Font = new Font("Microsoft YaHei UI", 14.25F, FontStyle.Bold, GraphicsUnit.Point, 134);
label33.ForeColor = SystemColors.WindowFrame;
label33.Location = new Point(180, 105);
label33.Name = "label33";
label33.Size = new Size(145, 26);
label33.TabIndex = 15;
label33.Text = "固体饮料批次:";
//
// frmMain
//
AutoScaleDimensions = new SizeF(7F, 17F);

View File

@@ -258,17 +258,20 @@ namespace FATrace.App
RawName="瑞士乳杆菌(固体饮料)",
RawCode="1121000265",
BtnControlName="btnRawName1",
RawExdEnName="GLC1815",
RawSource=RawSource.Japan
},
new RawCtrInfo(){
RawName="抗性糊精",
RawCode="YG03031004",
RawExdEnName="",
BtnControlName="btnRawName3",
RawSource=RawSource.China
},
new RawCtrInfo(){
RawName="白砂糖",
RawCode="YG03010001",
RawExdEnName="",
BtnControlName="btnRawName2",
RawSource=RawSource.China
},
@@ -880,6 +883,28 @@ namespace FATrace.App
var rawCode = parts[0].Trim();
var batch = parts[1].Trim();
var seq = parts[6].Trim();
// rawCode 打印时需要替换为“原料名称拓展英文编码”(RawExdEnName)
// 说明:二维码第一段仍然是 RawCode这里仅用于打印内容的映射未配置则回退 RawCode
try
{
if (ListRawCtrInfo != null && ListRawCtrInfo.Count > 0)
{
var info = ListRawCtrInfo.FirstOrDefault(x =>
!string.IsNullOrWhiteSpace(x.RawCode)
&& string.Equals(x.RawCode!.Trim(), rawCode, StringComparison.OrdinalIgnoreCase));
if (info != null && !string.IsNullOrWhiteSpace(info.RawExdEnName))
{
rawCode = info.RawExdEnName!.Trim();
}
}
}
catch
{
// 映射失败时不影响打印主流程
}
return $"{rawCode},{batch},{seq}";
}

View File

@@ -207,5 +207,92 @@ namespace FATrace.Com
return result;
}
/// <summary>
/// 兼容解析条码(用于 OEMApp 这类流程后段应用:现场可能存在历史 6 段条码)。
/// 新条码7段RawCode,Batch,SolidBeveBatch,Weight,ShelfLife,Region,DayCount
/// 旧条码6段RawCode,Batch,Weight,ShelfLife,Region,DayCount不包含 SolidBeveBatch
/// </summary>
public static ParsedCodeInfo ParseCodeFullCompat(string code)
{
var result = new ParsedCodeInfo();
if (string.IsNullOrWhiteSpace(code)) return result;
result.Code = code;
try
{
var parts = SplitCodeParts(code);
if (parts.Length != 7 && parts.Length != 6)
{
return result;
}
result.RawCode = parts.Length > 0 ? parts[0] : string.Empty;
if (parts.Length > 1)
{
var digits = new string(parts[1].Where(char.IsDigit).ToArray());
result.Batch = digits.Length >= 8 ? digits.Substring(0, 8) : digits;
}
var isNew7 = parts.Length == 7;
if (isNew7)
{
// 新条码7段第3段为固体饮料批次
result.SolidBeveBatch = parts[2];
}
else
{
// 旧条码6段不包含固体饮料批次
result.SolidBeveBatch = string.Empty;
}
var weightIndex = isNew7 ? 3 : 2;
if (parts.Length > weightIndex)
{
var digits = new string(parts[weightIndex].Where(char.IsDigit).ToArray());
string weightStr = string.Empty;
if (digits.Length >= 2)
{
weightStr = string.Concat(digits.AsSpan(0, digits.Length - 1), ".", digits.AsSpan(digits.Length - 1));
}
else if (digits.Length == 1)
{
weightStr = "0." + digits;
}
if (!string.IsNullOrWhiteSpace(weightStr))
{
if (decimal.TryParse(weightStr, NumberStyles.Any, CultureInfo.InvariantCulture, out var w))
result.Weight = w;
}
}
var shelfLifeIndex = isNew7 ? 4 : 3;
if (parts.Length > shelfLifeIndex)
{
var digits = new string(parts[shelfLifeIndex].Where(char.IsDigit).ToArray());
if (int.TryParse(digits, out var m)) result.ShelfLifeMonths = m;
}
var regionIndex = isNew7 ? 5 : 4;
if (parts.Length > regionIndex)
{
var digits = new string(parts[regionIndex].Where(char.IsDigit).ToArray());
result.RegionCode = digits;
result.RegionName = digits == "01" ? "国内" : (digits == "02" ? "日本" : "未知");
}
var countIndex = isNew7 ? 6 : 5;
if (parts.Length > countIndex)
{
var digits = new string(parts[countIndex].Where(char.IsDigit).ToArray());
if (int.TryParse(digits, out var c)) result.Count = c;
}
}
catch { }
return result;
}
}
}

View File

@@ -34,10 +34,16 @@ namespace FATrace.Model
/// </summary>
public string? Origin { get; set; }
///// <summary>
///// 原料代码
///// </summary>
//public string? RawCode { get; set; }
/// <summary>
/// 原料代码
/// 固体饮料批次
/// </summary>
public string? RawCode { get; set; }
public string? SolidBeveBatch { get; set; }
/// <summary>
/// 原料名称

View File

@@ -35,9 +35,14 @@ namespace FATrace.Model
public string? Origin { get; set; }
/// <summary>
/// 原料代码
/// 固体饮料批次
/// </summary>
public string? RawCode { get; set; }
public string? SolidBeveBatch { get; set; }
///// <summary>
///// 原料代码
///// </summary>
//public string? RawCode { get; set; }
/// <summary>
/// 原料名称

View File

@@ -35,9 +35,14 @@ namespace FATrace.Model
public string? Origin { get; set; }
/// <summary>
/// 原料代码
/// 固体饮料批次
/// </summary>
public string? RawCode { get; set; }
public string? SolidBeveBatch { get; set; }
///// <summary>
///// 原料代码
///// </summary>
//public string? RawCode { get; set; }
/// <summary>
/// 原料名称

View File

@@ -35,9 +35,14 @@ namespace FATrace.Model
public string? Origin { get; set; }
/// <summary>
/// 原料代码
/// 固体饮料批次
/// </summary>
public string? RawCode { get; set; }
public string? SolidBeveBatch { get; set; }
///// <summary>
///// 原料代码
///// </summary>
//public string? RawCode { get; set; }
/// <summary>
/// 原料名称

View File

@@ -34,10 +34,15 @@ namespace FATrace.Model
/// </summary>
public string? RawName { get; set; }
///// <summary>
///// 原料代码
///// </summary>
//public string? RawCode { get; set; }
/// <summary>
/// 原料代码
/// 固体饮料批次
/// </summary>
public string? RawCode { get; set; }
public string? SolidBeveBatch { get; set; }
}
}

View File

@@ -16,6 +16,11 @@ namespace FATrace.Model
/// </summary>
public string? RawName { get; set; }
/// <summary>
/// 原料名称拓展英文编码
/// </summary>
public string? RawExdEnName { get; set; }
/// <summary>
/// 原料编码
/// </summary>

View File

@@ -281,8 +281,10 @@ namespace FATrace.OEMApp
/// <param name="Code"></param>
private void PLCDataService_ScanCodeEventHandler(object? sender, string Code)
{
//解析Code条码数据内包条码数据
CurParsedCodeInfo = NVRCom.ParseCodeFull(Code);
// 解析条码数据OEMApp 属于流程后段,现场可能存在历史 6 段条码,因此这里必须兼容 6/7 段格式)
// 新(7段)RawCode,Batch,SolidBeveBatch,Weight,ShelfLife,Region,DayCount
// 旧(6段)RawCode,Batch,Weight,ShelfLife,Region,DayCount
CurParsedCodeInfo = NVRCom.ParseCodeFullCompat(Code);
BeginInvoke(new Action(() =>
{
@@ -1213,7 +1215,8 @@ namespace FATrace.OEMApp
if (!string.IsNullOrWhiteSpace(e.Data))
{
//解析Code条码数据内包条码数据
CurParsedCodeInfo = NVRCom.ParseCodeFull(e.Data!.Trim());
// OEMApp 属于流程后段:兼容历史 6 段条码(详见 PLCDataService_ScanCodeEventHandler 注释)
CurParsedCodeInfo = NVRCom.ParseCodeFullCompat(e.Data!.Trim());
BeginInvoke(new Action(() =>
{

View File

@@ -68,9 +68,9 @@
</ItemGroup>
<ItemGroup>
<None Include="NLog.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>

View File

@@ -593,7 +593,7 @@ namespace FATrace.WPLApp.Services
}
//内包扫码
OperateResultWeightScanCode = KeyencePlcMcNet!.ReadString("D1050", 20);
OperateResultWeightScanCode = KeyencePlcMcNet!.ReadString("D1050", 30);
if (OperateResultWeightScanCode.IsSuccess)
{
WeightScanCode = RevData(OperateResultWeightScanCode.Content).Replace("\r", "").Replace("\n", "").Trim();
@@ -612,7 +612,7 @@ namespace FATrace.WPLApp.Services
}
//外箱扫码
OperateResultBoxScanCode = KeyencePlcMcNet!.ReadString("D1250", 20);
OperateResultBoxScanCode = KeyencePlcMcNet!.ReadString("D1250", 30);
if (OperateResultBoxScanCode.IsSuccess)
{
BoxScanCode = RevData(OperateResultBoxScanCode.Content).Replace("\r", "").Replace("\n", "").Trim();

View File

@@ -473,13 +473,13 @@ namespace FATrace.WPLApp.Services
Weight = GetCellString(row, 1, formatter),
ShelfLife = GetCellString(row, 2, formatter),
Origin = GetCellString(row, 3, formatter),
RawCode = GetCellString(row, 4, formatter),
SolidBeveBatch = GetCellString(row, 4, formatter),
RawName = GetCellString(row, 5, formatter),
SequenceNo = GetCellString(row, 6, formatter),
LoginDateTime = GetCellString(row, 7, formatter)
};
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.RawCode, entity.RawName, entity.SequenceNo, entity.LoginDateTime))
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.SolidBeveBatch, entity.RawName, entity.SequenceNo, entity.LoginDateTime))
continue;
list.Add(entity);
@@ -509,13 +509,13 @@ namespace FATrace.WPLApp.Services
Weight = GetCellString(row, 1, formatter),
ShelfLife = GetCellString(row, 2, formatter),
Origin = GetCellString(row, 3, formatter),
RawCode = GetCellString(row, 4, formatter),
SolidBeveBatch = GetCellString(row, 4, formatter),
RawName = GetCellString(row, 5, formatter),
SequenceNo = GetCellString(row, 6, formatter),
LoginDateTime = GetCellString(row, 7, formatter)
};
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.RawCode, entity.RawName,
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.SolidBeveBatch, entity.RawName,
entity.SequenceNo, entity.LoginDateTime))
continue;
@@ -583,13 +583,13 @@ namespace FATrace.WPLApp.Services
Weight = GetCellString(row, 1, formatter),
ShelfLife = GetCellString(row, 2, formatter),
Origin = GetCellString(row, 3, formatter),
RawCode = GetCellString(row, 4, formatter),
SolidBeveBatch = GetCellString(row, 4, formatter),
RawName = GetCellString(row, 5, formatter),
SequenceNo = GetCellString(row, 6, formatter),
LoginDateTime = GetCellString(row, 7, formatter)
};
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.RawCode, entity.RawName,
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.SolidBeveBatch, entity.RawName,
entity.SequenceNo, entity.LoginDateTime))
continue;
@@ -620,13 +620,13 @@ namespace FATrace.WPLApp.Services
Weight = GetCellString(row, 1, formatter),
ShelfLife = GetCellString(row, 2, formatter),
Origin = GetCellString(row, 3, formatter),
RawCode = GetCellString(row, 4, formatter),
SolidBeveBatch = GetCellString(row, 4, formatter),
RawName = GetCellString(row, 5, formatter),
SequenceNo = GetCellString(row, 6, formatter),
LoginDateTime = GetCellString(row, 7, formatter)
};
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.RawCode, entity.RawName,
if (IsAllEmpty(entity.Batch, entity.Weight, entity.ShelfLife, entity.Origin, entity.SolidBeveBatch, entity.RawName,
entity.SequenceNo, entity.LoginDateTime))
continue;
@@ -695,10 +695,10 @@ namespace FATrace.WPLApp.Services
InBagCode = GetCellString(row, 1, formatter),
Origin = GetCellString(row, 2, formatter),
RawName = GetCellString(row, 3, formatter),
RawCode = GetCellString(row, 4, formatter)
SolidBeveBatch = GetCellString(row, 4, formatter)
};
if (IsAllEmpty(entity.RawUseTime, entity.InBagCode, entity.Origin, entity.RawName, entity.RawCode))
if (IsAllEmpty(entity.RawUseTime, entity.InBagCode, entity.Origin, entity.RawName, entity.SolidBeveBatch))
continue;
list.Add(entity);

View File

@@ -54,11 +54,11 @@ namespace FATrace.WPLApp.ViewModels
/// </summary>
public string? Origin { get => _origin; set { _origin = value; RaisePropertyChanged(); } }
private string? _rawCode;
private string? _solidBeveBatch;
/// <summary>
/// 原料代码模糊匹配
/// 固体饮料批次 模糊匹配
/// </summary>
public string? RawCode { get => _rawCode; set { _rawCode = value; RaisePropertyChanged(); } }
public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } }
private string? _rawName;
/// <summary>
@@ -135,7 +135,7 @@ namespace FATrace.WPLApp.ViewModels
private void ClearFilters()
{
Origin = RawCode = RawName = string.Empty;
Origin = SolidBeveBatch = RawName = string.Empty;
StartDate = null;
EndDate = null;
}
@@ -154,8 +154,8 @@ namespace FATrace.WPLApp.ViewModels
if (!string.IsNullOrWhiteSpace(Origin))
q = q.Where(a => a.Origin != null && a.Origin.Contains(Origin));
if (!string.IsNullOrWhiteSpace(RawCode))
q = q.Where(a => a.RawCode != null && a.RawCode.Contains(RawCode));
if (!string.IsNullOrWhiteSpace(SolidBeveBatch))
q = q.Where(a => a.SolidBeveBatch != null && a.SolidBeveBatch.Contains(SolidBeveBatch));
if (!string.IsNullOrWhiteSpace(RawName))
q = q.Where(a => a.RawName != null && a.RawName.Contains(RawName));

View File

@@ -50,8 +50,8 @@ namespace FATrace.WPLApp.ViewModels
private string? _origin;
public string? Origin { get => _origin; set { _origin = value; RaisePropertyChanged(); } }
private string? _rawCode;
public string? RawCode { get => _rawCode; set { _rawCode = value; RaisePropertyChanged(); } }
private string? _solidBeveBatch;
public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } }
private string? _rawName;
public string? RawName { get => _rawName; set { _rawName = value; RaisePropertyChanged(); } }
@@ -110,7 +110,7 @@ namespace FATrace.WPLApp.ViewModels
private void ClearFilters()
{
Origin = RawCode = RawName = Batch = string.Empty;
Origin = SolidBeveBatch = RawName = Batch = string.Empty;
StartDate = null;
EndDate = null;
}
@@ -129,8 +129,8 @@ namespace FATrace.WPLApp.ViewModels
if (!string.IsNullOrWhiteSpace(Origin))
q = q.Where(a => a.Origin != null && a.Origin.Contains(Origin));
if (!string.IsNullOrWhiteSpace(RawCode))
q = q.Where(a => a.RawCode != null && a.RawCode.Contains(RawCode));
if (!string.IsNullOrWhiteSpace(SolidBeveBatch))
q = q.Where(a => a.SolidBeveBatch != null && a.SolidBeveBatch.Contains(SolidBeveBatch));
if (!string.IsNullOrWhiteSpace(RawName))
q = q.Where(a => a.RawName != null && a.RawName.Contains(RawName));
if (!string.IsNullOrWhiteSpace(Batch))

View File

@@ -50,8 +50,8 @@ namespace FATrace.WPLApp.ViewModels
private string? _origin;
public string? Origin { get => _origin; set { _origin = value; RaisePropertyChanged(); } }
private string? _rawCode;
public string? RawCode { get => _rawCode; set { _rawCode = value; RaisePropertyChanged(); } }
private string? _solidBeveBatch;
public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } }
private string? _rawName;
public string? RawName { get => _rawName; set { _rawName = value; RaisePropertyChanged(); } }
@@ -110,7 +110,7 @@ namespace FATrace.WPLApp.ViewModels
private void ClearFilters()
{
Origin = RawCode = RawName = Batch = string.Empty;
Origin = SolidBeveBatch = RawName = Batch = string.Empty;
StartDate = null;
EndDate = null;
}
@@ -129,8 +129,8 @@ namespace FATrace.WPLApp.ViewModels
if (!string.IsNullOrWhiteSpace(Origin))
q = q.Where(a => a.Origin != null && a.Origin.Contains(Origin));
if (!string.IsNullOrWhiteSpace(RawCode))
q = q.Where(a => a.RawCode != null && a.RawCode.Contains(RawCode));
if (!string.IsNullOrWhiteSpace(SolidBeveBatch))
q = q.Where(a => a.SolidBeveBatch != null && a.SolidBeveBatch.Contains(SolidBeveBatch));
if (!string.IsNullOrWhiteSpace(RawName))
q = q.Where(a => a.RawName != null && a.RawName.Contains(RawName));
if (!string.IsNullOrWhiteSpace(Batch))

View File

@@ -50,8 +50,8 @@ namespace FATrace.WPLApp.ViewModels
private string? _origin;
public string? Origin { get => _origin; set { _origin = value; RaisePropertyChanged(); } }
private string? _rawCode;
public string? RawCode { get => _rawCode; set { _rawCode = value; RaisePropertyChanged(); } }
private string? _solidBeveBatch;
public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } }
private string? _rawName;
public string? RawName { get => _rawName; set { _rawName = value; RaisePropertyChanged(); } }
@@ -110,7 +110,7 @@ namespace FATrace.WPLApp.ViewModels
private void ClearFilters()
{
Origin = RawCode = RawName = Batch = string.Empty;
Origin = SolidBeveBatch = RawName = Batch = string.Empty;
StartDate = null;
EndDate = null;
}
@@ -129,8 +129,8 @@ namespace FATrace.WPLApp.ViewModels
if (!string.IsNullOrWhiteSpace(Origin))
q = q.Where(a => a.Origin != null && a.Origin.Contains(Origin));
if (!string.IsNullOrWhiteSpace(RawCode))
q = q.Where(a => a.RawCode != null && a.RawCode.Contains(RawCode));
if (!string.IsNullOrWhiteSpace(SolidBeveBatch))
q = q.Where(a => a.SolidBeveBatch != null && a.SolidBeveBatch.Contains(SolidBeveBatch));
if (!string.IsNullOrWhiteSpace(RawName))
q = q.Where(a => a.RawName != null && a.RawName.Contains(RawName));
if (!string.IsNullOrWhiteSpace(Batch))

View File

@@ -53,8 +53,8 @@ namespace FATrace.WPLApp.ViewModels
private string? _origin;
public string? Origin { get => _origin; set { _origin = value; RaisePropertyChanged(); } }
private string? _rawCode;
public string? RawCode { get => _rawCode; set { _rawCode = value; RaisePropertyChanged(); } }
private string? _solidBeveBatch;
public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } }
private string? _rawName;
public string? RawName { get => _rawName; set { _rawName = value; RaisePropertyChanged(); } }
@@ -110,7 +110,7 @@ namespace FATrace.WPLApp.ViewModels
private void ClearFilters()
{
InBagCode = Origin = RawCode = RawName = string.Empty;
InBagCode = Origin = SolidBeveBatch = RawName = string.Empty;
StartDate = null;
EndDate = null;
}
@@ -131,8 +131,8 @@ namespace FATrace.WPLApp.ViewModels
q = q.Where(a => a.InBagCode != null && a.InBagCode.Contains(InBagCode));
if (!string.IsNullOrWhiteSpace(Origin))
q = q.Where(a => a.Origin != null && a.Origin.Contains(Origin));
if (!string.IsNullOrWhiteSpace(RawCode))
q = q.Where(a => a.RawCode != null && a.RawCode.Contains(RawCode));
if (!string.IsNullOrWhiteSpace(SolidBeveBatch))
q = q.Where(a => a.SolidBeveBatch != null && a.SolidBeveBatch.Contains(SolidBeveBatch));
if (!string.IsNullOrWhiteSpace(RawName))
q = q.Where(a => a.RawName != null && a.RawName.Contains(RawName));

View File

@@ -62,8 +62,8 @@
Grid.Column="1"
Margin="0,0,10,8"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="原料代码" />
<TextBox Width="160" Text="{Binding RawCode, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock VerticalAlignment="Center" Text="固体饮料批次" />
<TextBox Width="160" Text="{Binding SolidBeveBatch, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel
Grid.Row="0"
@@ -151,7 +151,7 @@
<DataGridTextColumn Width="120" Binding="{Binding Weight}" Header="重量(G)" />
<DataGridTextColumn Width="120" Binding="{Binding ShelfLife}" Header="保质期" />
<DataGridTextColumn Width="120" Binding="{Binding Origin}" Header="产地" />
<DataGridTextColumn Width="160" Binding="{Binding RawCode}" Header="原料代码" />
<DataGridTextColumn Width="160" Binding="{Binding SolidBeveBatch}" Header="固体饮料批次" />
<DataGridTextColumn Width="200" Binding="{Binding RawName}" Header="原料名称" />
<DataGridTextColumn Width="120" Binding="{Binding SequenceNo}" Header="序号" />
<DataGridTextColumn Width="180" Binding="{Binding LoginDateTime}" Header="登录日期时间" />

View File

@@ -62,8 +62,8 @@
Grid.Column="1"
Margin="0,0,10,8"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="原料代码" />
<TextBox Width="160" Text="{Binding RawCode, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock VerticalAlignment="Center" Text="固体饮料批次" />
<TextBox Width="160" Text="{Binding SolidBeveBatch, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel
Grid.Row="0"
@@ -173,8 +173,8 @@
Header="产地" />
<DataGridTextColumn
Width="140"
Binding="{Binding RawCode}"
Header="原料代码" />
Binding="{Binding SolidBeveBatch}"
Header="固体饮料批次" />
<DataGridTextColumn
Width="180"
Binding="{Binding RawName}"

View File

@@ -62,8 +62,8 @@
Grid.Column="1"
Margin="0,0,10,8"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="原料代码" />
<TextBox Width="160" Text="{Binding RawCode, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock VerticalAlignment="Center" Text="固体饮料批次" />
<TextBox Width="160" Text="{Binding SolidBeveBatch, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel
Grid.Row="0"
@@ -173,8 +173,8 @@
Header="产地" />
<DataGridTextColumn
Width="140"
Binding="{Binding RawCode}"
Header="原料代码" />
Binding="{Binding SolidBeveBatch}"
Header="固体饮料批次" />
<DataGridTextColumn
Width="180"
Binding="{Binding RawName}"

View File

@@ -62,8 +62,8 @@
Grid.Column="1"
Margin="0,0,10,8"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="原料代码" />
<TextBox Width="160" Text="{Binding RawCode, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock VerticalAlignment="Center" Text="固体饮料批次" />
<TextBox Width="160" Text="{Binding SolidBeveBatch, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel
Grid.Row="0"
@@ -173,8 +173,8 @@
Header="产地" />
<DataGridTextColumn
Width="140"
Binding="{Binding RawCode}"
Header="原料代码" />
Binding="{Binding SolidBeveBatch}"
Header="固体饮料批次" />
<DataGridTextColumn
Width="180"
Binding="{Binding RawName}"

View File

@@ -62,8 +62,8 @@
Grid.Column="1"
Margin="0,0,10,8"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="原料代码" />
<TextBox Width="160" Text="{Binding RawCode, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock VerticalAlignment="Center" Text="固体饮料批次" />
<TextBox Width="160" Text="{Binding SolidBeveBatch, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel
Grid.Row="0"
@@ -173,8 +173,8 @@
Header="原料名称" />
<DataGridTextColumn
Width="140"
Binding="{Binding RawCode}"
Header="原料代码" />
Binding="{Binding SolidBeveBatch}"
Header="固体饮料批次" />
<!--<DataGridTextColumn Header="视频链接" Binding="{Binding VideoUrl}" Width="200" />-->
</DataGrid.Columns>
</DataGrid>