Bläddra i källkod

优化上传逻辑

callm 5 dagar sedan
förälder
incheckning
b15a24a87b

+ 8 - 0
UAS_MES_YDCY/.workbuddy/memory/2026-11-04.md

@@ -0,0 +1,8 @@
+# 2026-11-04
+
+## Special_Reset / Special_ResetKeyFreeze / Special_ResetKeyRelease:备注必填
+- 三个界面 `Split_Click`(站点重置按钮)在弹出「是否确认重置站点?」之前加必填校验:
+  `if (Remark.Text.Trim() == "") { OperatResult.AppendText(">>备注不能为空,请填写备注后再重置站点\n", Color.Red); Remark.Focus(); return; }`
+- 位置:Special_Reset 在「采集数与回流工位不能为空」之后;两个 Key 界面在「请选择客户」之后。
+- 备注仍沿用原有 `ResultWithRemark()` 拼到 commandlog 结果字段(无值时不再可能发生,但方法保留)。
+- 未改 Designer(Remark_label 是 AutoSize=true + 固定 Size,改文字会与 1037 处的 Remark 框重叠)。

+ 59 - 53
UAS_MES_YDCY/FunctionCode/Make/Make_MakeMaterialCheck.Designer.cs

@@ -29,9 +29,6 @@
         private void InitializeComponent()
         {
             this.MakeMaterialDGV = new System.Windows.Forms.DataGridView();
-            this.mm_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ma_label = new System.Windows.Forms.Label();
             this.input_label = new System.Windows.Forms.Label();
             this.input = new System.Windows.Forms.TextBox();
@@ -40,8 +37,11 @@
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.mm_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             ((System.ComponentModel.ISupportInitialize)(this.MakeMaterialDGV)).BeginInit();
             this.SuspendLayout();
             // 
@@ -65,36 +65,6 @@
             this.MakeMaterialDGV.Size = new System.Drawing.Size(2000, 592);
             this.MakeMaterialDGV.TabIndex = 7;
             // 
-            // mm_prodcode
-            // 
-            this.mm_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.mm_prodcode.DataPropertyName = "mm_prodcode";
-            this.mm_prodcode.HeaderText = "物料编号";
-            this.mm_prodcode.MinimumWidth = 10;
-            this.mm_prodcode.Name = "mm_prodcode";
-            this.mm_prodcode.ReadOnly = true;
-            this.mm_prodcode.Width = 10;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.pr_detail.DataPropertyName = "pr_detail";
-            this.pr_detail.HeaderText = "物料名称";
-            this.pr_detail.MinimumWidth = 10;
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.ReadOnly = true;
-            this.pr_detail.Width = 10;
-            // 
-            // pr_spec
-            // 
-            this.pr_spec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.pr_spec.DataPropertyName = "pr_spec";
-            this.pr_spec.HeaderText = "物料规格";
-            this.pr_spec.MinimumWidth = 10;
-            this.pr_spec.Name = "pr_spec";
-            this.pr_spec.ReadOnly = true;
-            this.pr_spec.Width = 10;
-            // 
             // ma_label
             // 
             this.ma_label.AutoSize = true;
@@ -110,7 +80,7 @@
             // 
             this.input_label.AutoSize = true;
             this.input_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.input_label.Location = new System.Drawing.Point(656, 39);
+            this.input_label.Location = new System.Drawing.Point(656, 34);
             this.input_label.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
             this.input_label.Name = "input_label";
             this.input_label.Size = new System.Drawing.Size(146, 41);
@@ -119,11 +89,11 @@
             // 
             // input
             // 
-            this.input.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.input.Location = new System.Drawing.Point(815, 36);
+            this.input.Font = new System.Drawing.Font("微软雅黑", 11F);
+            this.input.Location = new System.Drawing.Point(815, 31);
             this.input.Margin = new System.Windows.Forms.Padding(5);
             this.input.Name = "input";
-            this.input.Size = new System.Drawing.Size(372, 50);
+            this.input.Size = new System.Drawing.Size(372, 46);
             this.input.TabIndex = 4;
             this.input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.input_KeyDown);
             // 
@@ -151,37 +121,33 @@
             // 
             // dataGridViewTextBoxColumn1
             // 
+            this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
             this.dataGridViewTextBoxColumn1.DataPropertyName = "mm_prodcode";
             this.dataGridViewTextBoxColumn1.HeaderText = "物料编号";
             this.dataGridViewTextBoxColumn1.MinimumWidth = 10;
             this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
-            this.dataGridViewTextBoxColumn1.Width = 260;
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            this.dataGridViewTextBoxColumn1.Width = 10;
             // 
             // dataGridViewTextBoxColumn2
             // 
+            this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
             this.dataGridViewTextBoxColumn2.DataPropertyName = "pr_detail";
             this.dataGridViewTextBoxColumn2.HeaderText = "物料名称";
             this.dataGridViewTextBoxColumn2.MinimumWidth = 10;
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
-            this.dataGridViewTextBoxColumn2.Width = 360;
+            this.dataGridViewTextBoxColumn2.ReadOnly = true;
+            this.dataGridViewTextBoxColumn2.Width = 10;
             // 
             // dataGridViewTextBoxColumn3
             // 
+            this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
             this.dataGridViewTextBoxColumn3.DataPropertyName = "pr_spec";
             this.dataGridViewTextBoxColumn3.HeaderText = "物料规格";
             this.dataGridViewTextBoxColumn3.MinimumWidth = 10;
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
-            this.dataGridViewTextBoxColumn3.Width = 360;
-            // 
-            // OperateResult
-            // 
-            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(40, 707);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7);
-            this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1999, 173);
-            this.OperateResult.TabIndex = 8;
-            this.OperateResult.Text = "";
+            this.dataGridViewTextBoxColumn3.ReadOnly = true;
+            this.dataGridViewTextBoxColumn3.Width = 10;
             // 
             // ma_code
             // 
@@ -191,19 +157,59 @@
             this.ma_code.DBTitle = "";
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(200, 29);
+            this.ma_code.Location = new System.Drawing.Point(200, 18);
             this.ma_code.Margin = new System.Windows.Forms.Padding(6);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = "";
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(409, 63);
+            this.ma_code.Size = new System.Drawing.Size(409, 53);
             this.ma_code.TabIndex = 234;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "makecode";
             this.ma_code.TextBoxEnable = true;
             // 
+            // mm_prodcode
+            // 
+            this.mm_prodcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.mm_prodcode.DataPropertyName = "mm_prodcode";
+            this.mm_prodcode.HeaderText = "物料编号";
+            this.mm_prodcode.MinimumWidth = 10;
+            this.mm_prodcode.Name = "mm_prodcode";
+            this.mm_prodcode.ReadOnly = true;
+            this.mm_prodcode.Width = 10;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "物料名称";
+            this.pr_detail.MinimumWidth = 10;
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.ReadOnly = true;
+            this.pr_detail.Width = 10;
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.pr_spec.DataPropertyName = "pr_spec";
+            this.pr_spec.HeaderText = "物料规格";
+            this.pr_spec.MinimumWidth = 10;
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.ReadOnly = true;
+            this.pr_spec.Width = 10;
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(40, 707);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(1999, 173);
+            this.OperateResult.TabIndex = 8;
+            this.OperateResult.Text = "";
+            // 
             // Make_MakeMaterialCheck
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

+ 6 - 0
UAS_MES_YDCY/FunctionCode/Special/Special_Reset.cs

@@ -104,6 +104,12 @@ namespace UAS_MES_NEW.Special
                 OperatResult.AppendText(">>采集数与回流工位不能为空\n", Color.Red);
                 return;
             }
+            if (Remark.Text.Trim() == "")
+            {
+                OperatResult.AppendText(">>备注不能为空,请填写备注后再重置站点\n", Color.Red);
+                Remark.Focus();
+                return;
+            }
             string Delete = MessageBox.Show(this.ParentForm, "是否确认重置站点?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
             if (Delete == "Yes")
             {

+ 6 - 0
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyFreeze.cs

@@ -139,6 +139,12 @@ namespace UAS_MES_NEW.Special
                 OperatResult.AppendText(">>请选择客户\n", Color.Red);
                 return;
             }
+            if (Remark.Text.Trim() == "")
+            {
+                OperatResult.AppendText(">>备注不能为空,请填写备注后再重置站点\n", Color.Red);
+                Remark.Focus();
+                return;
+            }
             string Delete = MessageBox.Show(this.ParentForm, "是否确认重置站点?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
             if (Delete == "Yes")
             {

+ 6 - 0
UAS_MES_YDCY/FunctionCode/Special/Special_ResetKeyRelease.cs

@@ -139,6 +139,12 @@ namespace UAS_MES_NEW.Special
                 OperatResult.AppendText(">>请选择客户\n", Color.Red);
                 return;
             }
+            if (Remark.Text.Trim() == "")
+            {
+                OperatResult.AppendText(">>备注不能为空,请填写备注后再重置站点\n", Color.Red);
+                Remark.Focus();
+                return;
+            }
             string Delete = MessageBox.Show(this.ParentForm, "是否确认重置站点?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
             if (Delete == "Yes")
             {