瀏覽代碼

栈板采集添加前缀

章政 8 年之前
父節點
當前提交
f9f9008f75

+ 86 - 52
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -62,17 +62,19 @@
             this.NewPalletCode = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.pa_custcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PackageInf = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.pd_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.AutoPrint = new UAS_MES.CustomControl.CustomCheckBox.AutoPrintCheckBox();
             this.OutBoxLength_label = new System.Windows.Forms.Label();
             this.OutBoxLength = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.StepCount = new UAS_MES.CustomControl.TextBoxWithIcon.SourceStepCount();
-            this.pd_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.PalletPreFix_label = new System.Windows.Forms.Label();
+            this.PalletPreFix = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -201,7 +203,7 @@
             // 
             this.AutoOutBoxCode.AutoSize = true;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(256, 20);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(10, 20);
             this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
             this.AutoOutBoxCode.Size = new System.Drawing.Size(100, 27);
@@ -508,6 +510,50 @@
             this.PackageInf.Size = new System.Drawing.Size(941, 519);
             this.PackageInf.TabIndex = 156;
             // 
+            // pd_outboxcode
+            // 
+            this.pd_outboxcode.DataPropertyName = "code";
+            this.pd_outboxcode.HeaderText = "箱号";
+            this.pd_outboxcode.MinimumWidth = 200;
+            this.pd_outboxcode.Name = "pd_outboxcode";
+            this.pd_outboxcode.ReadOnly = true;
+            this.pd_outboxcode.Width = 200;
+            // 
+            // pd_innerqty
+            // 
+            this.pd_innerqty.DataPropertyName = "pd_innerqty";
+            this.pd_innerqty.HeaderText = "数量";
+            this.pd_innerqty.Name = "pd_innerqty";
+            this.pd_innerqty.ReadOnly = true;
+            this.pd_innerqty.Width = 70;
+            // 
+            // Column3
+            // 
+            this.Column3.DataPropertyName = "pd_prodcode";
+            this.Column3.HeaderText = "产品编号";
+            this.Column3.MinimumWidth = 150;
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            this.Column3.Width = 150;
+            // 
+            // Column4
+            // 
+            this.Column4.DataPropertyName = "pd_makecode";
+            this.Column4.HeaderText = "工单号";
+            this.Column4.MinimumWidth = 150;
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            this.Column4.Width = 150;
+            // 
+            // Column5
+            // 
+            this.Column5.DataPropertyName = "pa_salecode";
+            this.Column5.HeaderText = "合同";
+            this.Column5.MinimumWidth = 150;
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            this.Column5.Width = 150;
+            // 
             // pa_makecode
             // 
             this.pa_makecode.AutoSize = true;
@@ -547,7 +593,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(109, 20);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(122, 21);
             this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(46, 24);
@@ -560,7 +606,7 @@
             this.OutBoxLength.BackColor = System.Drawing.Color.White;
             this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.OutBoxLength.ID = null;
-            this.OutBoxLength.Location = new System.Drawing.Point(167, 20);
+            this.OutBoxLength.Location = new System.Drawing.Point(179, 20);
             this.OutBoxLength.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
             this.OutBoxLength.Name = "OutBoxLength";
             this.OutBoxLength.Power = null;
@@ -582,55 +628,41 @@
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 194;
             // 
-            // pd_outboxcode
-            // 
-            this.pd_outboxcode.DataPropertyName = "code";
-            this.pd_outboxcode.HeaderText = "箱号";
-            this.pd_outboxcode.MinimumWidth = 200;
-            this.pd_outboxcode.Name = "pd_outboxcode";
-            this.pd_outboxcode.ReadOnly = true;
-            this.pd_outboxcode.Width = 200;
-            // 
-            // pd_innerqty
-            // 
-            this.pd_innerqty.DataPropertyName = "pd_innerqty";
-            this.pd_innerqty.HeaderText = "数量";
-            this.pd_innerqty.Name = "pd_innerqty";
-            this.pd_innerqty.ReadOnly = true;
-            this.pd_innerqty.Width = 70;
-            // 
-            // Column3
-            // 
-            this.Column3.DataPropertyName = "pd_prodcode";
-            this.Column3.HeaderText = "产品编号";
-            this.Column3.MinimumWidth = 150;
-            this.Column3.Name = "Column3";
-            this.Column3.ReadOnly = true;
-            this.Column3.Width = 150;
-            // 
-            // Column4
-            // 
-            this.Column4.DataPropertyName = "pd_makecode";
-            this.Column4.HeaderText = "工单号";
-            this.Column4.MinimumWidth = 150;
-            this.Column4.Name = "Column4";
-            this.Column4.ReadOnly = true;
-            this.Column4.Width = 150;
-            // 
-            // Column5
-            // 
-            this.Column5.DataPropertyName = "pa_salecode";
-            this.Column5.HeaderText = "合同";
-            this.Column5.MinimumWidth = 150;
-            this.Column5.Name = "Column5";
-            this.Column5.ReadOnly = true;
-            this.Column5.Width = 150;
+            // PalletPreFix_label
+            // 
+            this.PalletPreFix_label.AutoSize = true;
+            this.PalletPreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PalletPreFix_label.Location = new System.Drawing.Point(242, 21);
+            this.PalletPreFix_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PalletPreFix_label.Name = "PalletPreFix_label";
+            this.PalletPreFix_label.Size = new System.Drawing.Size(46, 24);
+            this.PalletPreFix_label.TabIndex = 196;
+            this.PalletPreFix_label.Text = "前缀";
+            // 
+            // PalletPreFix
+            // 
+            this.PalletPreFix.AllPower = null;
+            this.PalletPreFix.BackColor = System.Drawing.Color.White;
+            this.PalletPreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.PalletPreFix.ID = null;
+            this.PalletPreFix.Location = new System.Drawing.Point(293, 20);
+            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.PalletPreFix.Name = "PalletPreFix";
+            this.PalletPreFix.Power = null;
+            this.PalletPreFix.Size = new System.Drawing.Size(49, 27);
+            this.PalletPreFix.Str = null;
+            this.PalletPreFix.Str1 = null;
+            this.PalletPreFix.Str2 = null;
+            this.PalletPreFix.TabIndex = 195;
+            this.PalletPreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PalletPreFix_KeyDown);
             // 
             // Make_PalletCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1329, 690);
+            this.Controls.Add(this.PalletPreFix_label);
+            this.Controls.Add(this.PalletPreFix);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.OutBoxLength_label);
             this.Controls.Add(this.OutBoxLength);
@@ -679,7 +711,7 @@
             this.Load += new System.EventHandler(this.Make_PalletCollection_Load);
             this.SizeChanged += new System.EventHandler(this.Make_PalletCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -729,5 +761,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private System.Windows.Forms.Label PalletPreFix_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox PalletPreFix;
     }
 }

+ 26 - 0
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -70,6 +70,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             OutBoxLength.Text = BaseUtil.GetCacheData("PalletLength").ToString();
+            PalletPreFix.Text = BaseUtil.GetCacheData("PalletPreFix").ToString();
             dh = new DataHelper();
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
@@ -545,6 +546,22 @@ namespace UAS_MES.Make
                 }
                 else return true;
             }
+            if (PalletPreFix.Text != "")
+            {
+                try
+                {
+                    if (pa_outboxcode.Text.Substring(0, PalletPreFix.Text.Length) != PalletPreFix.Text)
+                    {
+                        OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                        return false;
+                    }
+                }
+                catch (Exception)
+                {
+                    OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                    return false;
+                }
+            }
             return true;
         }
 
@@ -568,5 +585,14 @@ namespace UAS_MES.Make
                 }
             }
         }
+
+        private void PalletPreFix_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                BaseUtil.SetCacheData("PalletPreFix", PalletPreFix.Text);
+                pa_outboxcode.Focus();
+            }
+        }
     }
 }

+ 15 - 0
UAS-MES/FunctionCode/Make/Make_PalletCollection.resx

@@ -788,4 +788,19 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>