Browse Source

palletweigh提示调整

shim 8 năm trước cách đây
mục cha
commit
f7775511a7

+ 14 - 16
UAS-MES/FunctionCode/Make/Make_PalletWeigh.Designer.cs

@@ -58,7 +58,6 @@
             this.weightedNum = new UAS_MES.CustomControl.TextBoxWithIcon.NumOnlyTextBox();
             this.PA_PACKAGEQTY = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_salecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
-            this.pr_detailspec = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
@@ -66,6 +65,7 @@
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.Printer = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.palletcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pr_detailspec = new System.Windows.Forms.Label();
             this.panel4.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -76,7 +76,7 @@
             this.panel4.Controls.Add(this.label22);
             this.panel4.Controls.Add(this.weight);
             this.panel4.Location = new System.Drawing.Point(46, 92);
-            this.panel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel4.Margin = new System.Windows.Forms.Padding(4);
             this.panel4.Name = "panel4";
             this.panel4.Size = new System.Drawing.Size(552, 186);
             this.panel4.TabIndex = 92;
@@ -160,7 +160,7 @@
             this.PrintLabel.Font = new System.Drawing.Font("宋体", 9F);
             this.PrintLabel.FormattingEnabled = true;
             this.PrintLabel.Location = new System.Drawing.Point(1125, 100);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(196, 26);
             this.PrintLabel.TabIndex = 162;
@@ -400,17 +400,6 @@
             this.pa_salecode.Size = new System.Drawing.Size(0, 39);
             this.pa_salecode.TabIndex = 183;
             // 
-            // pr_detailspec
-            // 
-            this.pr_detailspec.AutoSize = true;
-            this.pr_detailspec.CutLength = null;
-            this.pr_detailspec.Font = new System.Drawing.Font("微软雅黑", 15F);
-            this.pr_detailspec.Location = new System.Drawing.Point(176, 513);
-            this.pr_detailspec.MaximumSize = new System.Drawing.Size(200, 0);
-            this.pr_detailspec.Name = "pr_detailspec";
-            this.pr_detailspec.Size = new System.Drawing.Size(0, 39);
-            this.pr_detailspec.TabIndex = 182;
-            // 
             // pa_prodcode
             // 
             this.pa_prodcode.AutoSize = true;
@@ -497,11 +486,21 @@
             this.palletcode.TabIndex = 94;
             this.palletcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.palletcode_KeyDown);
             // 
+            // pr_detailspec
+            // 
+            this.pr_detailspec.AutoSize = true;
+            this.pr_detailspec.Font = new System.Drawing.Font("微软雅黑", 15F);
+            this.pr_detailspec.Location = new System.Drawing.Point(176, 513);
+            this.pr_detailspec.Name = "pr_detailspec";
+            this.pr_detailspec.Size = new System.Drawing.Size(0, 39);
+            this.pr_detailspec.TabIndex = 192;
+            // 
             // Make_PalletWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1402, 902);
+            this.Controls.Add(this.pr_detailspec);
             this.Controls.Add(this.ComList);
             this.Controls.Add(this.showResult);
             this.Controls.Add(this.BaudRate);
@@ -510,7 +509,6 @@
             this.Controls.Add(this.weightedNum);
             this.Controls.Add(this.PA_PACKAGEQTY);
             this.Controls.Add(this.pa_salecode);
-            this.Controls.Add(this.pr_detailspec);
             this.Controls.Add(this.pa_prodcode);
             this.Controls.Add(this.pa_totalqty);
             this.Controls.Add(this.pa_makecode);
@@ -572,7 +570,6 @@
         private CustomControl.ValueLabel.ValueLabel pa_makecode;
         private CustomControl.ValueLabel.ValueLabel pa_totalqty;
         private CustomControl.ValueLabel.ValueLabel pa_prodcode;
-        private CustomControl.ValueLabel.ValueLabel pr_detailspec;
         private CustomControl.ValueLabel.ValueLabel pa_salecode;
         private CustomControl.ValueLabel.ValueLabel PA_PACKAGEQTY;
         private CustomControl.TextBoxWithIcon.NumOnlyTextBox weightedNum;
@@ -585,5 +582,6 @@
         private System.Windows.Forms.ColumnHeader columnHeader3;
         private System.Windows.Forms.ColumnHeader columnHeader4;
         private CustomControl.ValueLabel.ValueLabel ComList;
+        private System.Windows.Forms.Label pr_detailspec;
     }
 }

+ 6 - 0
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -122,6 +122,7 @@ namespace UAS_MES.Make
                             {
                                 if (PrintLabel.SelectedValue.ToString()=="") {
                                     OperateResult.AppendText(">>产品:" + pa_prodcode.Text + "未维护栈板标签模板\n", Color.Red);
+                                    palletcode.Text = "";
                                     return;
                                 }
                                 Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
@@ -143,6 +144,11 @@ namespace UAS_MES.Make
                             //刷新称重计数+1
                             weightedNum.Text = int.Parse(weightedNum.Text) + 1 + "";
                             //刷新grid的历史称重信息;
+                            if (int.Parse(weight.Text)==0) {
+                                OperateResult.AppendText("<<重量不能等于0\n", Color.Red);
+                                palletcode.Text = "";
+                                return;
+                            }
                             recordResult(palletcode.Text,weight.Text, System.DateTime.Now.ToString());
                             //清空输入框中的值,扫描框置空定焦
                             palletcode.Text = "";