客户要求的更改
This commit is contained in:
58
FATrace.App/frmMain.Designer.cs
generated
58
FATrace.App/frmMain.Designer.cs
generated
@@ -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);
|
||||
|
||||
@@ -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}";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user