Browse Source

修改维修不良根据位置带出不良零件

章政 8 years ago
parent
commit
3d3d37d2a0

+ 12 - 12
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -31,7 +31,7 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_PackageCollection));
             this.pr_code_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
-            this.ms_makecode = new System.Windows.Forms.Label();
+            this.pa_makecode = new System.Windows.Forms.Label();
             this.pa_currentqty_label = new System.Windows.Forms.Label();
             this.pr_outboxinnerqty_label = new System.Windows.Forms.Label();
             this.label13 = new System.Windows.Forms.Label();
@@ -105,16 +105,16 @@
             this.pr_detail_label.TabIndex = 80;
             this.pr_detail_label.Text = "产品名称";
             // 
-            // ms_makecode
+            // pa_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(1108, 534);
-            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 = 76;
-            this.ms_makecode.Visible = false;
+            this.pa_makecode.AutoSize = true;
+            this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_makecode.Location = new System.Drawing.Point(1108, 534);
+            this.pa_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode.Name = "pa_makecode";
+            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_makecode.TabIndex = 76;
+            this.pa_makecode.Visible = false;
             // 
             // pa_currentqty_label
             // 
@@ -695,7 +695,7 @@
             this.Controls.Add(this.PackageDetail);
             this.Controls.Add(this.Cancel);
             this.Controls.Add(this.label13);
-            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.pa_makecode);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PackageCollection";
@@ -720,7 +720,7 @@
         #endregion
         private System.Windows.Forms.Label pr_code_label;
         private System.Windows.Forms.Label pr_detail_label;
-        private System.Windows.Forms.Label ms_makecode;
+        private System.Windows.Forms.Label pa_makecode;
         private System.Windows.Forms.Label pa_currentqty_label;
         private System.Windows.Forms.Label pr_outboxinnerqty_label;
         private System.Windows.Forms.Label label13;

+ 6 - 36
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -80,14 +80,14 @@ namespace UAS_MES.Make
             if (pa_outboxcode.Text != "")
             {
                 sql.Clear();
-                sql.Append("select pr_code,pa_outboxcode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,pr_detail,pa_packageqty,nvl(0,pr_outboxinnerqty)pr_outboxinnerqty,pa_standardqty,pa_currentqty from package left join product on pa_prodcode=");
+                sql.Append("select pr_code,pa_outboxcode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,pr_detail,pa_packageqty,nvl(pa_standardqty,pr_outboxinnerqty)pr_outboxinnerqty,pa_currentqty from package left join product on pa_prodcode=");
                 sql.Append("pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
                 Err = "箱号";
             }
             else
             {
                 sql.Clear();
-                sql.Append("select ms_makecode,pr_code,pa_status,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,nvl(pa_standardqty,pr_outboxinnerqty) pr_outboxinnerqty,pa_packageqty,pa_currentqty,");
+                sql.Append("select ms_makecode,pr_code,pa_makecode,pa_status,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,nvl(pa_standardqty,pr_outboxinnerqty) pr_outboxinnerqty,pa_packageqty,pa_currentqty,");
                 sql.Append("pa_outboxcode from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");
                 sql.Append("on pd_barcode=ms_sncode left join package on pa_id =pd_paid where ms_id='" + oMsID + "'");
                 Err = "序列号";
@@ -110,37 +110,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))
-                {
-                    sql.Clear();
-                    sql.Append("insert into packagedetail(pd_id,pd_paid,pd_outboxcode,pd_innerqty,pd_barcode) ");
-                    sql.Append("select packagedetail_seq.nextval,pa_id,pa_outboxcode,pa_totalqty,'" + sn_code.Text + "' from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
-                    dh.ExecuteSql(sql.GetString(), "insert");
-                    dh.UpdateByCondition("Package", "pa_packageqty=pa_packageqty+1,pa_currentqty=pa_currentqty+1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                    dh.UpdateByCondition("makeserial", "ms_outboxcode='" + pa_outboxcode.Text + "'", "ms_id='" + oMsID + "'");
-                    if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
-                    {
-                        OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
-                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
-                        //满箱更新状态为1
-                        if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) + 1 == int.Parse(pr_outboxinnerqty.Text))
-                        {
-                            dh.UpdateByCondition("package", "pa_status=1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
-                            if (AutoPrint.Checked)
-                                Print_Click(new object(), new EventArgs());
-                        }
-                        LoadGridData();
-                        sn_code.Clear();
-                    }
-                }
-                else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已采集满\n", Color.Red);
-            }
-            else OperateResult.AppendText(">>序列号" + sn_code.Text + "不存在\n", Color.Red, sn_code);
-        }
 
         private void Print_Click(object sender, EventArgs e)
         {
@@ -197,7 +166,7 @@ namespace UAS_MES.Make
                         switch (pr_packrule.Text.ToUpper())
                         {
                             case "MAKE":
-                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != ms_makecode.Text)
+                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != pa_makecode.Text)
                                 {
                                     OperateResult.AppendText(">>序列号" + sn_code.Text + "所属工单和当前箱号工单不相等\n", Color.Red, sn_code);
                                     return;
@@ -259,7 +228,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(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
+                                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                                     {
                                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
                                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
@@ -270,6 +239,7 @@ namespace UAS_MES.Make
                                             if (AutoPrint.Checked)
                                                 Print_Click(new object(), new EventArgs());
                                         }
+                                        LoadData();
                                         LoadGridData();
                                         sn_code.Clear();
                                     }
@@ -303,7 +273,7 @@ namespace UAS_MES.Make
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
             LoadCheckQTY();
-            pa_outboxcode.MakeCode = ms_makecode.Text;
+            pa_outboxcode.MakeCode = pa_makecode.Text;
             pa_outboxcode.ProdCode = pr_code.Text;
             pa_outboxcode.Caller = "PACKAGE";
             dt = (DataTable)dh.ExecuteSql("select pl_labelcode||':'||pl_labelname pl_laname,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_prodcode='" + pr_code.Text + "' order by pl_isdefault desc ", "select");

+ 12 - 12
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_PackageCollectionWeigh));
-            this.ms_makecode = new System.Windows.Forms.Label();
+            this.pa_makecode = new System.Windows.Forms.Label();
             this.label13 = new System.Windows.Forms.Label();
             this.pa_code_label = new System.Windows.Forms.Label();
             this.PrintList_label = new System.Windows.Forms.Label();
@@ -93,16 +93,16 @@
             this.groupBoxWithBorder3.SuspendLayout();
             this.SuspendLayout();
             // 
-            // ms_makecode
+            // pa_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(1108, 536);
-            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 = 76;
-            this.ms_makecode.Visible = false;
+            this.pa_makecode.AutoSize = true;
+            this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pa_makecode.Location = new System.Drawing.Point(1108, 536);
+            this.pa_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode.Name = "pa_makecode";
+            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_makecode.TabIndex = 76;
+            this.pa_makecode.Visible = false;
             // 
             // label13
             // 
@@ -813,7 +813,7 @@
             this.Controls.Add(this.PackageDetail);
             this.Controls.Add(this.Cancel);
             this.Controls.Add(this.label13);
-            this.Controls.Add(this.ms_makecode);
+            this.Controls.Add(this.pa_makecode);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PackageCollectionWeigh";
@@ -838,7 +838,7 @@
         }
 
         #endregion
-        private System.Windows.Forms.Label ms_makecode;
+        private System.Windows.Forms.Label pa_makecode;
         private System.Windows.Forms.Label label13;
         private System.Windows.Forms.Label pa_code_label;
         private System.Windows.Forms.Label PrintList_label;

+ 9 - 11
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -146,15 +146,15 @@ namespace UAS_MES.Make
             if (pa_outboxcode.Text != "")
             {
                 sql.Clear();
-                sql.Append("select pr_cartonmaxw,pr_cartonunit,pr_cartonminw,pr_cartongw,pa_outboxcode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,");
-                sql.Append("pa_status,pr_packrule,pr_detail,pa_packageqty,pr_outboxinnerqty,pa_standardqty,pa_currentqty from package left join ");
+                sql.Append("select pr_cartonmaxw,pa_makecode,pr_cartonunit,pr_cartonminw,pr_cartongw,pa_outboxcode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,");
+                sql.Append("pa_status,pr_packrule,pr_detail,pa_packageqty,nvl(pa_standardqty,pr_outboxinnerqty)pr_outboxinnerqty,pa_currentqty from package left join ");
                 sql.Append("product on pa_prodcode=pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
                 Err = "箱号";
             }
             else
             {
                 sql.Clear();
-                sql.Append("select pr_cartonmaxw,pr_cartonunit,pr_cartonminw,pr_cartongw,ms_makecode,pa_status,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,");
+                sql.Append("select pr_cartonmaxw,pa_makecode,pr_cartonunit,pr_cartonminw,pr_cartongw,ms_makecode,pa_status,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,");
                 sql.Append("pa_checkno,pr_packrule,pr_code,pr_detail,nvl(pa_standardqty,pr_outboxinnerqty) pr_outboxinnerqty,pa_packageqty,pa_currentqty,");
                 sql.Append("pa_outboxcode from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");
                 sql.Append("on pd_barcode=ms_sncode left join package on pa_id =pd_paid where ms_id='" + oMsID + "'");
@@ -163,9 +163,6 @@ namespace UAS_MES.Make
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {
-                pa_outboxcode.MakeCode = ms_makecode.Text;
-                pa_outboxcode.ProdCode = pr_code.Text;
-                pa_outboxcode.Caller = "PACKAGE";
                 //重量的临时变量
                 string _weight = dt.Rows[0]["pr_cartongw"].ToString();
                 string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
@@ -199,7 +196,7 @@ namespace UAS_MES.Make
             {
                 if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) < int.Parse(pr_outboxinnerqty.Text))
                 {
-                    if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
+                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                     {
                         LoadCheckQTY();
                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
@@ -266,7 +263,7 @@ namespace UAS_MES.Make
                                 LoadGridData();
                             else
                             {
-                                pa_outboxcode.MakeCode = ms_makecode.Text;
+                                pa_outboxcode.MakeCode = pa_makecode.Text;
                                 pa_outboxcode.ProdCode = pr_code.Text;
                                 pa_outboxcode.Caller = "PACKAGE";
                                 if (AutoGenBoxCode.Checked)
@@ -282,7 +279,7 @@ namespace UAS_MES.Make
                         switch (pr_packrule.Text.ToUpper())
                         {
                             case "MAKE":
-                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != ms_makecode.Text)
+                                if (dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_id='" + oMsID + "'").ToString() != pa_makecode.Text)
                                 {
                                     OperateResult.AppendText(">>序列号" + sn_code.Text + "所属工单和当前箱号工单不相等\n", Color.Red, sn_code);
                                     return;
@@ -340,7 +337,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(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
+                                    if (LogicHandler.SetStepResult(pa_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                                     {
                                         LoadCheckQTY();
                                         OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
@@ -356,6 +353,7 @@ namespace UAS_MES.Make
                                             }
                                             else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
                                         }
+                                        LoadData();
                                         LoadGridData();
                                         sn_code.Clear();
                                     }
@@ -389,7 +387,7 @@ namespace UAS_MES.Make
         private void pr_code_TextChanged(object sender, EventArgs e)
         {
             LoadCheckQTY();
-            pa_outboxcode.MakeCode = ms_makecode.Text;
+            pa_outboxcode.MakeCode = pa_makecode.Text;
             pa_outboxcode.ProdCode = pr_code.Text;
             pa_outboxcode.Caller = "PACKAGE";
             dt = (DataTable)dh.ExecuteSql("select pl_labelcode||':'||pl_labelname pl_laname,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_prodcode='" + pr_code.Text + "' order by pl_isdefault desc ", "select");

+ 29 - 8
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -552,14 +552,35 @@ namespace UAS_MES.Make
                 {
                     if (mbr_id != "")
                     {
-                        sql.Clear();
-                        sql.Append("insert into makebadrsloc(mbl_id,mbl_mbrid,mbl_loc,mbl_badcode,mbl_brcode,");
-                        sql.Append("mbl_sncode,mbl_makecode,mbl_indate ,mbl_inman) select makebadrsloc_seq.nextval," + mbr_id);
-                        sql.Append(",'" + mbl_loc.Text.ToUpper() + "','" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
-                        sql.Append("sysdate,'" + User.UserCode + "' from dual");
-                        dh.ExecuteSql(sql.GetString(), "insert");
-                        dt = (DataTable)dh.ExecuteSql("select mbl_id,mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
-                        BaseUtil.FillDgvWithDataTable(mbl_locdgv, dt);
+                        if (!dh.CheckExist("makebadrsloc", "mbl_mbrid='" + mbr_id + "' and mbl_sncode='" + GetSNCode.Text + "' and mbl_loc='" + mbl_loc.Text.ToUpper() + "'"))
+                        {
+                            sql.Clear();
+                            sql.Append("insert into makebadrsloc(mbl_id,mbl_mbrid,mbl_loc,mbl_badcode,mbl_brcode,");
+                            sql.Append("mbl_sncode,mbl_makecode,mbl_indate ,mbl_inman) select makebadrsloc_seq.nextval," + mbr_id);
+                            sql.Append(",'" + mbl_loc.Text.ToUpper() + "','" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
+                            sql.Append("sysdate,'" + User.UserCode + "' from dual");
+                            dh.ExecuteSql(sql.GetString(), "insert");
+                            dt = (DataTable)dh.ExecuteSql("select mbl_id,mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
+                            BaseUtil.FillDgvWithDataTable(mbl_locdgv, dt);
+                            sql.Clear();
+                            sql.Append("select bd_soncode from bom inner join bomdetail on bo_id = bd_bomid ");
+                            sql.Append("where bo_mothercode='" + ms_prodcode.Text + "' and bd_location<>' 'and  ");
+                            sql.Append(" instr(','||bd_location||',','," + mbl_loc.Text.ToUpper() + ",')>0  order by bd_detno desc ");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                sql.Clear();
+                                sql.Append("insert into makebadrspart(mbp_id,mbp_mbrid,mbp_part,mbp_badcode,");
+                                sql.Append("mbp_brcode,mbp_sncode,mbp_makecode,mbp_indate,mbp_inman)");
+                                sql.Append("select makebadrspart_seq.nextval," + mbr_id + ",'" + dt.Rows[0][0].ToString() + "',");
+                                sql.Append("'" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
+                                sql.Append("sysdate,'" + User.UserCode + "' from dual");
+                                dh.ExecuteSql(sql.GetString(), "insert");
+                                dt = (DataTable)dh.ExecuteSql("select mbp_id,mbp_part from makebadrspart where mbp_mbrid=" + mbr_id, "select");
+                                BaseUtil.FillDgvWithDataTable(mbp_partdgv, dt);
+                            }
+                        }
+                        else OperatResult.AppendText(">>已存在该不良位置\n", Color.Red);
                     }
                     else OperatResult.AppendText(">>请先选择不良原因\n", Color.Red);
                 }

+ 2 - 3
UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -152,7 +152,7 @@ namespace UAS_MES.Make
             else
             {
                 sql.Clear();
-                sql.Append("select pr_cartonmaxw,pr_cartonunit,pr_cartonminw,pr_cartongw,ms_makecode,pa_status,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,");
+                sql.Append("select pr_cartonmaxw,pr_cartonunit,pr_cartonminw,pr_cartongw,ms_makecode,pa_sccode,pa_status,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,");
                 sql.Append("pa_checkno,pr_packrule,pr_code,pr_detail,nvl(pa_standardqty,pr_outboxinnerqty) pr_outboxinnerqty,pa_packageqty,pa_currentqty,");
                 sql.Append("pa_outboxcode from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");
                 sql.Append("on pd_barcode=ms_sncode left join package on pa_id =pd_paid where ms_id='" + oMsID + "'");
@@ -184,8 +184,6 @@ namespace UAS_MES.Make
             //加载Grid数据
             dt = (DataTable)dh.ExecuteSql("select pa_outboxcode,pa_prodcode,pd_barcode,pd_innerqty,pa_indate from packageDetail left join package on pa_id=pd_paid where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
             BaseUtil.FillDgvWithDataTable(PackageDetail, dt);
-            //更新界面的采集数量
-            pa_currentqty.Text = dh.getFieldDataByCondition("package", "pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
         }
 
         private void Print_Click(object sender, EventArgs e)
@@ -275,6 +273,7 @@ namespace UAS_MES.Make
                                             if (AutoPrint.Checked)
                                                 Print_Click(new object(), new EventArgs());
                                         }
+                                        LoadData();
                                         LoadGridData();
                                         sn_code.Clear();
                                     }

+ 1 - 12
UAS-MES/PublicMethod/LogicHandler.cs

@@ -933,18 +933,7 @@ namespace UAS_MES.PublicMethod
 
         public static bool SetStepResult(string iMakeCode, string iSourceCode, string iSN, string iMPKind, string iResult, string iUserCode, out string oErrorMessage)
         {
-            oErrorMessage = "";
-            string StepCode = dh.getFieldDataByCondition("Makeserial", "ms_stepcode", "ms_sncode='" + iSN + "'").ToString();
-            string CurrentStep = GetStepCodeBySource(iSourceCode);
-            if (StepCode == CurrentStep)
-            {
-                InsertMakeProcess(iSN, iMakeCode, iSourceCode, iMPKind, iResult, iUserCode);
-                return true;
-            }
-            else
-            {
-                return CS_SetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
-            }
+            return CS_SetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
         }
 
         public static bool CS_SetResult(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)