Эх сурвалжийг харах

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 жил өмнө
parent
commit
9a5e48cce0

+ 14 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -76,6 +76,7 @@
             this.pa_sccode = new System.Windows.Forms.Label();
             this.pa_checkno = new System.Windows.Forms.Label();
             this.pa_downstatus = new System.Windows.Forms.Label();
+            this.ms_makecode = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -675,11 +676,23 @@
             this.pa_downstatus.TabIndex = 178;
             this.pa_downstatus.Visible = false;
             // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(1137, 588);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.TabIndex = 179;
+            this.ms_makecode.Visible = false;
+            // 
             // Make_PackageCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1172, 730);
+            this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pa_downstatus);
             this.Controls.Add(this.pa_checkno);
             this.Controls.Add(this.pa_sccode);
@@ -766,5 +779,6 @@
         private System.Windows.Forms.Label pa_sccode;
         private System.Windows.Forms.Label pa_checkno;
         private System.Windows.Forms.Label pa_downstatus;
+        private System.Windows.Forms.Label ms_makecode;
     }
 }

+ 4 - 2
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -166,7 +166,7 @@ namespace UAS_MES.Make
                         switch (pr_packrule.Text.ToUpper())
                         {
                             case "MAKE":
-                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != pa_makecode.Text)
+                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != pa_makecode.Text && pa_makecode.Text != "")
                                 {
                                     OperateResult.AppendText(">>序列号" + sn_code.Text + "所属工单和当前箱号工单不相等\n", Color.Red, sn_code);
                                     return;
@@ -226,8 +226,9 @@ namespace UAS_MES.Make
                                 ////箱号不存在的情况
                                 if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
-                                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
+                                    if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                                     {
+                                        LoadCheckQTY();
                                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
                                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
                                         //满箱更新状态为1
@@ -241,6 +242,7 @@ namespace UAS_MES.Make
                                         LoadGridData();
                                         sn_code.Clear();
                                     }
+                                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                 }
                                 else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                             }

+ 14 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs

@@ -85,6 +85,7 @@
             this.pa_downstatus = new System.Windows.Forms.Label();
             this.pa_checkno = new System.Windows.Forms.Label();
             this.pa_sccode = new System.Windows.Forms.Label();
+            this.ms_makecode = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PrintNum)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -790,11 +791,23 @@
             this.pa_sccode.TabIndex = 181;
             this.pa_sccode.Visible = false;
             // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AutoSize = true;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.Location = new System.Drawing.Point(1008, 579);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.TabIndex = 182;
+            this.ms_makecode.Visible = false;
+            // 
             // Make_PackageCollectionWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1172, 727);
+            this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.pa_sccode);
             this.Controls.Add(this.pa_checkno);
             this.Controls.Add(this.pa_downstatus);
@@ -895,5 +908,6 @@
         private System.Windows.Forms.Label pr_detail;
         private System.Windows.Forms.Label pr_outboxinnerqty_label;
         private System.Windows.Forms.Label pr_code;
+        private System.Windows.Forms.Label ms_makecode;
     }
 }

+ 1 - 32
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -190,37 +190,6 @@ namespace UAS_MES.Make
             pa_currentqty.Text = dh.getFieldDataByCondition("package", "pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
         }
 
-        private void InsertDetail()
-        {
-            if (dh.getFieldDataByCondition("makeserial", "ms_sncode", "ms_id='" + oMsID + "'").ToString() == sn_code.Text)
-            {
-                if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) < int.Parse(pr_outboxinnerqty.Text))
-                {
-                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
-                    {
-                        LoadCheckQTY();
-                        OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
-                        //满箱更新状态为1
-                        if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) + 1 == int.Parse(pr_outboxinnerqty.Text))
-                        {
-                            //检查重量合格
-                            if (float.Parse(weight.Text) > MinWeight && float.Parse(weight.Text) < MaxWeight)
-                            {
-                                dh.UpdateByCondition("package", "pa_status=1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                                if (AutoPrint.Checked)
-                                    Print_Click(new object(), new EventArgs());
-                            }
-                            else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
-                        }
-                        LoadGridData();
-                        sn_code.Clear();
-                    }
-                }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已采集满\n", Color.Red);
-            }
-            else OperateResult.AppendText("序列号" + sn_code.Text + "不存在", Color.Red, sn_code);
-        }
-
         private void Print_Click(object sender, EventArgs e)
         {
             if (PrintLabel.Items.Count != 0)
@@ -339,7 +308,7 @@ namespace UAS_MES.Make
                                 ////箱号不存在的情况
                                 if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
-                                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
+                                    if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                                     {
                                         LoadCheckQTY();
                                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);