From 7dabeddde444262a38fe11db830a3b0d368d7849 Mon Sep 17 00:00:00 2001 From: Tyrone CT Date: Fri, 15 May 2026 17:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=A6=81=E6=B1=82=E7=9A=84?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FATrace.App/frmMain.Designer.cs | 58 ++++++------- FATrace.App/frmMain.cs | 25 ++++++ FATrace.Com/NVRCom.cs | 87 +++++++++++++++++++ FATrace.Model/FileModel/FactoryInbound.cs | 10 ++- FATrace.Model/FileModel/FactoryOutbound.cs | 9 +- FATrace.Model/FileModel/OEMInbound.cs | 9 +- FATrace.Model/FileModel/OEMOutbound.cs | 9 +- FATrace.Model/FileModel/OEMRawUsageInfo.cs | 9 +- FATrace.Model/RawCtrInfo.cs | 5 ++ FATrace.OEMApp/MainApp.cs | 9 +- FATrace.WPLApp/FATrace.WPLApp.csproj | 6 +- FATrace.WPLApp/Services/DataServices.cs | 4 +- FATrace.WPLApp/Services/ReadFileServices.cs | 20 ++--- .../ViewModels/FactoryInboundViewModel.cs | 12 +-- .../ViewModels/FactoryOutboundViewModel.cs | 10 +-- .../ViewModels/OEMInboundViewModel.cs | 10 +-- .../ViewModels/OEMOutboundViewModel.cs | 10 +-- .../ViewModels/OEMRawUsageInfoViewModel.cs | 10 +-- FATrace.WPLApp/Views/FactoryInboundView.xaml | 6 +- FATrace.WPLApp/Views/FactoryOutboundView.xaml | 8 +- FATrace.WPLApp/Views/OEMInboundView.xaml | 8 +- FATrace.WPLApp/Views/OEMOutboundView.xaml | 8 +- FATrace.WPLApp/Views/OEMRawUsageInfoView.xaml | 8 +- 23 files changed, 248 insertions(+), 102 deletions(-) diff --git a/FATrace.App/frmMain.Designer.cs b/FATrace.App/frmMain.Designer.cs index 0c97780..e55e0fc 100644 --- a/FATrace.App/frmMain.Designer.cs +++ b/FATrace.App/frmMain.Designer.cs @@ -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); diff --git a/FATrace.App/frmMain.cs b/FATrace.App/frmMain.cs index 3e00724..7047dd6 100644 --- a/FATrace.App/frmMain.cs +++ b/FATrace.App/frmMain.cs @@ -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}"; } diff --git a/FATrace.Com/NVRCom.cs b/FATrace.Com/NVRCom.cs index 0e3f3be..c22e190 100644 --- a/FATrace.Com/NVRCom.cs +++ b/FATrace.Com/NVRCom.cs @@ -207,5 +207,92 @@ namespace FATrace.Com return result; } + + /// + /// 兼容解析条码(用于 OEMApp 这类流程后段应用:现场可能存在历史 6 段条码)。 + /// 新条码(7段):RawCode,Batch,SolidBeveBatch,Weight,ShelfLife,Region,DayCount + /// 旧条码(6段):RawCode,Batch,Weight,ShelfLife,Region,DayCount(不包含 SolidBeveBatch) + /// + 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; + } } } diff --git a/FATrace.Model/FileModel/FactoryInbound.cs b/FATrace.Model/FileModel/FactoryInbound.cs index 00fd0b6..806dc6d 100644 --- a/FATrace.Model/FileModel/FactoryInbound.cs +++ b/FATrace.Model/FileModel/FactoryInbound.cs @@ -34,10 +34,16 @@ namespace FATrace.Model /// public string? Origin { get; set; } + ///// + ///// 原料代码 + ///// + //public string? RawCode { get; set; } + /// - /// 原料代码 + /// 固体饮料批次 /// - public string? RawCode { get; set; } + public string? SolidBeveBatch { get; set; } + /// /// 原料名称 diff --git a/FATrace.Model/FileModel/FactoryOutbound.cs b/FATrace.Model/FileModel/FactoryOutbound.cs index 61c465b..7b65ffe 100644 --- a/FATrace.Model/FileModel/FactoryOutbound.cs +++ b/FATrace.Model/FileModel/FactoryOutbound.cs @@ -35,9 +35,14 @@ namespace FATrace.Model public string? Origin { get; set; } /// - /// 原料代码 + /// 固体饮料批次 /// - public string? RawCode { get; set; } + public string? SolidBeveBatch { get; set; } + + ///// + ///// 原料代码 + ///// + //public string? RawCode { get; set; } /// /// 原料名称 diff --git a/FATrace.Model/FileModel/OEMInbound.cs b/FATrace.Model/FileModel/OEMInbound.cs index 56412f5..2e1ff09 100644 --- a/FATrace.Model/FileModel/OEMInbound.cs +++ b/FATrace.Model/FileModel/OEMInbound.cs @@ -35,9 +35,14 @@ namespace FATrace.Model public string? Origin { get; set; } /// - /// 原料代码 + /// 固体饮料批次 /// - public string? RawCode { get; set; } + public string? SolidBeveBatch { get; set; } + + ///// + ///// 原料代码 + ///// + //public string? RawCode { get; set; } /// /// 原料名称 diff --git a/FATrace.Model/FileModel/OEMOutbound.cs b/FATrace.Model/FileModel/OEMOutbound.cs index c7f3b06..f167543 100644 --- a/FATrace.Model/FileModel/OEMOutbound.cs +++ b/FATrace.Model/FileModel/OEMOutbound.cs @@ -35,9 +35,14 @@ namespace FATrace.Model public string? Origin { get; set; } /// - /// 原料代码 + /// 固体饮料批次 /// - public string? RawCode { get; set; } + public string? SolidBeveBatch { get; set; } + + ///// + ///// 原料代码 + ///// + //public string? RawCode { get; set; } /// /// 原料名称 diff --git a/FATrace.Model/FileModel/OEMRawUsageInfo.cs b/FATrace.Model/FileModel/OEMRawUsageInfo.cs index 1d456ee..8d1b504 100644 --- a/FATrace.Model/FileModel/OEMRawUsageInfo.cs +++ b/FATrace.Model/FileModel/OEMRawUsageInfo.cs @@ -34,10 +34,15 @@ namespace FATrace.Model /// public string? RawName { get; set; } + ///// + ///// 原料代码 + ///// + //public string? RawCode { get; set; } + /// - /// 原料代码 + /// 固体饮料批次 /// - public string? RawCode { get; set; } + public string? SolidBeveBatch { get; set; } } } diff --git a/FATrace.Model/RawCtrInfo.cs b/FATrace.Model/RawCtrInfo.cs index c37d223..d525b3b 100644 --- a/FATrace.Model/RawCtrInfo.cs +++ b/FATrace.Model/RawCtrInfo.cs @@ -16,6 +16,11 @@ namespace FATrace.Model /// public string? RawName { get; set; } + /// + /// 原料名称拓展英文编码 + /// + public string? RawExdEnName { get; set; } + /// /// 原料编码 /// diff --git a/FATrace.OEMApp/MainApp.cs b/FATrace.OEMApp/MainApp.cs index 2afcdd0..e7c1f26 100644 --- a/FATrace.OEMApp/MainApp.cs +++ b/FATrace.OEMApp/MainApp.cs @@ -281,8 +281,10 @@ namespace FATrace.OEMApp /// 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(() => { diff --git a/FATrace.WPLApp/FATrace.WPLApp.csproj b/FATrace.WPLApp/FATrace.WPLApp.csproj index 5712747..653b9ea 100644 --- a/FATrace.WPLApp/FATrace.WPLApp.csproj +++ b/FATrace.WPLApp/FATrace.WPLApp.csproj @@ -68,9 +68,9 @@ - - PreserveNewest - + + Always + diff --git a/FATrace.WPLApp/Services/DataServices.cs b/FATrace.WPLApp/Services/DataServices.cs index 2f2765b..4c1e479 100644 --- a/FATrace.WPLApp/Services/DataServices.cs +++ b/FATrace.WPLApp/Services/DataServices.cs @@ -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(); diff --git a/FATrace.WPLApp/Services/ReadFileServices.cs b/FATrace.WPLApp/Services/ReadFileServices.cs index 2dcafae..96d5d84 100644 --- a/FATrace.WPLApp/Services/ReadFileServices.cs +++ b/FATrace.WPLApp/Services/ReadFileServices.cs @@ -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); diff --git a/FATrace.WPLApp/ViewModels/FactoryInboundViewModel.cs b/FATrace.WPLApp/ViewModels/FactoryInboundViewModel.cs index 534f4a8..6b3ca85 100644 --- a/FATrace.WPLApp/ViewModels/FactoryInboundViewModel.cs +++ b/FATrace.WPLApp/ViewModels/FactoryInboundViewModel.cs @@ -54,11 +54,11 @@ namespace FATrace.WPLApp.ViewModels /// public string? Origin { get => _origin; set { _origin = value; RaisePropertyChanged(); } } - private string? _rawCode; + private string? _solidBeveBatch; /// - /// 原料代码模糊匹配 + /// 固体饮料批次 模糊匹配 /// - public string? RawCode { get => _rawCode; set { _rawCode = value; RaisePropertyChanged(); } } + public string? SolidBeveBatch { get => _solidBeveBatch; set { _solidBeveBatch = value; RaisePropertyChanged(); } } private string? _rawName; /// @@ -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)); diff --git a/FATrace.WPLApp/ViewModels/FactoryOutboundViewModel.cs b/FATrace.WPLApp/ViewModels/FactoryOutboundViewModel.cs index e387062..3e0192f 100644 --- a/FATrace.WPLApp/ViewModels/FactoryOutboundViewModel.cs +++ b/FATrace.WPLApp/ViewModels/FactoryOutboundViewModel.cs @@ -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)) diff --git a/FATrace.WPLApp/ViewModels/OEMInboundViewModel.cs b/FATrace.WPLApp/ViewModels/OEMInboundViewModel.cs index 2e57256..e4fc15c 100644 --- a/FATrace.WPLApp/ViewModels/OEMInboundViewModel.cs +++ b/FATrace.WPLApp/ViewModels/OEMInboundViewModel.cs @@ -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)) diff --git a/FATrace.WPLApp/ViewModels/OEMOutboundViewModel.cs b/FATrace.WPLApp/ViewModels/OEMOutboundViewModel.cs index 45be9e9..85316b8 100644 --- a/FATrace.WPLApp/ViewModels/OEMOutboundViewModel.cs +++ b/FATrace.WPLApp/ViewModels/OEMOutboundViewModel.cs @@ -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)) diff --git a/FATrace.WPLApp/ViewModels/OEMRawUsageInfoViewModel.cs b/FATrace.WPLApp/ViewModels/OEMRawUsageInfoViewModel.cs index c43fb5a..27aa960 100644 --- a/FATrace.WPLApp/ViewModels/OEMRawUsageInfoViewModel.cs +++ b/FATrace.WPLApp/ViewModels/OEMRawUsageInfoViewModel.cs @@ -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)); diff --git a/FATrace.WPLApp/Views/FactoryInboundView.xaml b/FATrace.WPLApp/Views/FactoryInboundView.xaml index 85e287f..c4e91a0 100644 --- a/FATrace.WPLApp/Views/FactoryInboundView.xaml +++ b/FATrace.WPLApp/Views/FactoryInboundView.xaml @@ -62,8 +62,8 @@ Grid.Column="1" Margin="0,0,10,8" Orientation="Horizontal"> - - + + - + diff --git a/FATrace.WPLApp/Views/FactoryOutboundView.xaml b/FATrace.WPLApp/Views/FactoryOutboundView.xaml index 3f2b9d6..c315aca 100644 --- a/FATrace.WPLApp/Views/FactoryOutboundView.xaml +++ b/FATrace.WPLApp/Views/FactoryOutboundView.xaml @@ -62,8 +62,8 @@ Grid.Column="1" Margin="0,0,10,8" Orientation="Horizontal"> - - + + + Binding="{Binding SolidBeveBatch}" + Header="固体饮料批次" /> - - + + + Binding="{Binding SolidBeveBatch}" + Header="固体饮料批次" /> - - + + + Binding="{Binding SolidBeveBatch}" + Header="固体饮料批次" /> - - + + + Binding="{Binding SolidBeveBatch}" + Header="固体饮料批次" />