浏览代码

取消拆解更换拆入不良代码

callm 5 年之前
父节点
当前提交
5c9ed8318f
共有 2 个文件被更改,包括 110 次插入87 次删除
  1. 73 50
      UAS_MES_ODLF/FunctionCode/Make/Make_Decompose.Designer.cs
  2. 37 37
      UAS_MES_ODLF/FunctionCode/Make/Make_Decompose.cs

+ 73 - 50
UAS_MES_ODLF/FunctionCode/Make/Make_Decompose.Designer.cs

@@ -107,9 +107,10 @@
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(33, 529);
+            this.pa_makecode_label.Location = new System.Drawing.Point(66, 1058);
+            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(72, 27);
+            this.pa_makecode_label.Size = new System.Drawing.Size(143, 52);
             this.pa_makecode_label.TabIndex = 173;
             this.pa_makecode_label.Text = "序列号";
             // 
@@ -117,9 +118,10 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(33, 18);
+            this.label1.Location = new System.Drawing.Point(66, 36);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.Size = new System.Drawing.Size(114, 41);
             this.label1.TabIndex = 177;
             this.label1.Text = "序列号";
             // 
@@ -127,9 +129,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(33, 66);
+            this.label2.Location = new System.Drawing.Point(66, 132);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(74, 21);
+            this.label2.Size = new System.Drawing.Size(146, 41);
             this.label2.TabIndex = 178;
             this.label2.Text = "产品编号";
             // 
@@ -137,9 +140,10 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(315, 66);
+            this.label3.Location = new System.Drawing.Point(630, 132);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(74, 21);
+            this.label3.Size = new System.Drawing.Size(146, 41);
             this.label3.TabIndex = 179;
             this.label3.Text = "产品名称";
             // 
@@ -147,9 +151,10 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(315, 18);
+            this.label4.Location = new System.Drawing.Point(630, 36);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(58, 21);
+            this.label4.Size = new System.Drawing.Size(114, 41);
             this.label4.TabIndex = 180;
             this.label4.Text = "工单号";
             // 
@@ -157,9 +162,10 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(727, 18);
+            this.label5.Location = new System.Drawing.Point(1454, 36);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(74, 21);
+            this.label5.Size = new System.Drawing.Size(146, 41);
             this.label5.TabIndex = 181;
             this.label5.Text = "已采集数";
             // 
@@ -194,11 +200,12 @@
             this.cm_materialtype,
             this.cm_maprodcode,
             this.cm_sncode});
-            this.LabelDataGridView.Location = new System.Drawing.Point(12, 102);
+            this.LabelDataGridView.Location = new System.Drawing.Point(24, 204);
+            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(889, 233);
+            this.LabelDataGridView.Size = new System.Drawing.Size(1778, 466);
             this.LabelDataGridView.TabIndex = 188;
             this.LabelDataGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelDataGridView_CellContentClick);
             this.LabelDataGridView.Sorted += new System.EventHandler(this.LabelDataGridView_Sorted);
@@ -206,9 +213,10 @@
             // change
             // 
             this.change.AutoSize = true;
-            this.change.Location = new System.Drawing.Point(731, 80);
+            this.change.Location = new System.Drawing.Point(1462, 160);
+            this.change.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.change.Name = "change";
-            this.change.Size = new System.Drawing.Size(71, 16);
+            this.change.Size = new System.Drawing.Size(137, 28);
             this.change.TabIndex = 193;
             this.change.TabStop = true;
             this.change.Text = "拆解更换";
@@ -217,9 +225,10 @@
             // nochange
             // 
             this.nochange.AutoSize = true;
-            this.nochange.Location = new System.Drawing.Point(731, 57);
+            this.nochange.Location = new System.Drawing.Point(1462, 114);
+            this.nochange.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.nochange.Name = "nochange";
-            this.nochange.Size = new System.Drawing.Size(47, 16);
+            this.nochange.Size = new System.Drawing.Size(89, 28);
             this.nochange.TabIndex = 194;
             this.nochange.TabStop = true;
             this.nochange.Text = "拆解";
@@ -478,10 +487,11 @@
             this.pr_name.AutoSize = true;
             this.pr_name.CutLength = null;
             this.pr_name.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_name.Location = new System.Drawing.Point(413, 66);
-            this.pr_name.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_name.Location = new System.Drawing.Point(826, 132);
+            this.pr_name.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_name.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_name.Name = "pr_name";
-            this.pr_name.Size = new System.Drawing.Size(0, 21);
+            this.pr_name.Size = new System.Drawing.Size(0, 41);
             this.pr_name.TabIndex = 195;
             this.pr_name.Tag = "1";
             // 
@@ -489,10 +499,11 @@
             // 
             this.ms_wccode.AutoSize = true;
             this.ms_wccode.CutLength = null;
-            this.ms_wccode.Location = new System.Drawing.Point(916, 73);
-            this.ms_wccode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_wccode.Location = new System.Drawing.Point(1832, 146);
+            this.ms_wccode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_wccode.MaximumSize = new System.Drawing.Size(400, 0);
             this.ms_wccode.Name = "ms_wccode";
-            this.ms_wccode.Size = new System.Drawing.Size(0, 12);
+            this.ms_wccode.Size = new System.Drawing.Size(0, 24);
             this.ms_wccode.TabIndex = 191;
             this.ms_wccode.Visible = false;
             // 
@@ -500,10 +511,11 @@
             // 
             this.ms_craftname.AutoSize = true;
             this.ms_craftname.CutLength = null;
-            this.ms_craftname.Location = new System.Drawing.Point(856, 87);
-            this.ms_craftname.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_craftname.Location = new System.Drawing.Point(1712, 174);
+            this.ms_craftname.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_craftname.MaximumSize = new System.Drawing.Size(400, 0);
             this.ms_craftname.Name = "ms_craftname";
-            this.ms_craftname.Size = new System.Drawing.Size(0, 12);
+            this.ms_craftname.Size = new System.Drawing.Size(0, 24);
             this.ms_craftname.TabIndex = 190;
             this.ms_craftname.Visible = false;
             // 
@@ -511,10 +523,11 @@
             // 
             this.ms_craftcode.AutoSize = true;
             this.ms_craftcode.CutLength = null;
-            this.ms_craftcode.Location = new System.Drawing.Point(720, 87);
-            this.ms_craftcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_craftcode.Location = new System.Drawing.Point(1440, 174);
+            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_craftcode.MaximumSize = new System.Drawing.Size(400, 0);
             this.ms_craftcode.Name = "ms_craftcode";
-            this.ms_craftcode.Size = new System.Drawing.Size(0, 12);
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 24);
             this.ms_craftcode.TabIndex = 189;
             this.ms_craftcode.Visible = false;
             // 
@@ -523,10 +536,11 @@
             this.deccount.AutoSize = true;
             this.deccount.CutLength = null;
             this.deccount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.deccount.Location = new System.Drawing.Point(825, 18);
-            this.deccount.MaximumSize = new System.Drawing.Size(150, 0);
+            this.deccount.Location = new System.Drawing.Point(1650, 36);
+            this.deccount.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.deccount.MaximumSize = new System.Drawing.Size(300, 0);
             this.deccount.Name = "deccount";
-            this.deccount.Size = new System.Drawing.Size(0, 21);
+            this.deccount.Size = new System.Drawing.Size(0, 41);
             this.deccount.TabIndex = 187;
             this.deccount.Tag = "1";
             // 
@@ -535,10 +549,11 @@
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             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(413, 18);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(826, 36);
+            this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 41);
             this.ms_makecode.TabIndex = 186;
             this.ms_makecode.Tag = "1";
             // 
@@ -547,10 +562,11 @@
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.CutLength = null;
             this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode.Location = new System.Drawing.Point(125, 66);
-            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_prodcode.Location = new System.Drawing.Point(250, 132);
+            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_prodcode.Name = "ms_prodcode";
-            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 41);
             this.ms_prodcode.TabIndex = 184;
             this.ms_prodcode.Tag = "1";
             // 
@@ -559,10 +575,11 @@
             this.ms_sncode.AutoSize = true;
             this.ms_sncode.CutLength = null;
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode.Location = new System.Drawing.Point(125, 18);
-            this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ms_sncode.Location = new System.Drawing.Point(250, 36);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_sncode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
+            this.ms_sncode.Size = new System.Drawing.Size(0, 41);
             this.ms_sncode.TabIndex = 183;
             this.ms_sncode.Tag = "1";
             // 
@@ -573,12 +590,13 @@
             this.Decompose.DownImage = ((System.Drawing.Image)(resources.GetObject("Decompose.DownImage")));
             this.Decompose.Image = ((System.Drawing.Image)(resources.GetObject("Decompose.Image")));
             this.Decompose.IsShowBorder = true;
-            this.Decompose.Location = new System.Drawing.Point(533, 533);
+            this.Decompose.Location = new System.Drawing.Point(1066, 1066);
+            this.Decompose.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Decompose.MoveImage = ((System.Drawing.Image)(resources.GetObject("Decompose.MoveImage")));
             this.Decompose.Name = "Decompose";
             this.Decompose.NormalImage = ((System.Drawing.Image)(resources.GetObject("Decompose.NormalImage")));
             this.Decompose.Power = null;
-            this.Decompose.Size = new System.Drawing.Size(76, 27);
+            this.Decompose.Size = new System.Drawing.Size(152, 54);
             this.Decompose.TabIndex = 175;
             this.Decompose.Text = "确定拆解";
             this.Decompose.UseVisualStyleBackColor = true;
@@ -589,10 +607,11 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(147, 535);
+            this.sn_code.Location = new System.Drawing.Point(294, 1070);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(196, 21);
+            this.sn_code.Size = new System.Drawing.Size(388, 35);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -602,9 +621,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(12, 355);
+            this.OperateResult.Location = new System.Drawing.Point(24, 710);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(889, 152);
+            this.OperateResult.Size = new System.Drawing.Size(1774, 300);
             this.OperateResult.TabIndex = 172;
             this.OperateResult.Text = "";
             // 
@@ -720,6 +740,7 @@
             this.mb_badcode.Name = "mb_badcode";
             this.mb_badcode.ReadOnly = true;
             this.mb_badcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.mb_badcode.Visible = false;
             this.mb_badcode.Width = 80;
             // 
             // AddBad
@@ -730,6 +751,7 @@
             this.AddBad.Name = "AddBad";
             this.AddBad.Resizable = System.Windows.Forms.DataGridViewTriState.True;
             this.AddBad.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.AddBad.Visible = false;
             this.AddBad.Width = 20;
             // 
             // cm_makecode
@@ -803,9 +825,9 @@
             // 
             // Make_Decompose
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(928, 573);
+            this.ClientSize = new System.Drawing.Size(1856, 1146);
             this.Controls.Add(this.pr_name);
             this.Controls.Add(this.nochange);
             this.Controls.Add(this.change);
@@ -827,6 +849,7 @@
             this.Controls.Add(this.pa_makecode_label);
             this.Controls.Add(this.OperateResult);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "Make_Decompose";
             this.Tag = "Make!Decompose";
             this.Text = "拆解处理";

+ 37 - 37
UAS_MES_ODLF/FunctionCode/Make/Make_Decompose.cs

@@ -211,21 +211,21 @@ namespace UAS_MES_NEW.Make
             {
                 if (LabelDataGridView.Rows[i].Cells["Choose"].Value != null)
                 {
-                    if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && change.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null || LabelDataGridView.Rows[i].Cells["New_BarCode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
-                    {
-                        OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码或新批号\n", Color.Red);
-                        return;
-                    }
+                    //if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && change.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null || LabelDataGridView.Rows[i].Cells["New_BarCode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
+                    //{
+                    //    OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码或新批号\n", Color.Red);
+                    //    return;
+                    //}
                     if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && change.Checked && LabelDataGridView.Rows[i].Cells["New_BarCode"].Value == null && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() == "-1")
                     {
                         OperateResult.AppendText("第" + (i + 1) + "行没有采集新批号\n", Color.Red);
                         return;
                     }
-                    if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && nochange.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
-                    {
-                        OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码\n", Color.Red);
-                        return;
-                    }
+                    //if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true && nochange.Checked && (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value == null) && LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() != "-1")
+                    //{
+                    //    OperateResult.AppendText("第" + (i + 1) + "行没有采集不良代码\n", Color.Red);
+                    //    return;
+                    //}
                 }
             }
 
@@ -235,17 +235,17 @@ namespace UAS_MES_NEW.Make
                 {
                     if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true)
                     {
-                        if (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value != null)
-                        {
-                            String[] badcodetol = LabelDataGridView.Rows[i].Cells["mb_badcode"].Value.ToString().Split('|');
-                            bgcode = new string[badcodetol.Length - 1];
-                            bccode = new string[badcodetol.Length - 1];
-                            for (int h = 0; h < badcodetol.Length - 1; h++)
-                            {
-                                bgcode[h] = badcodetol[h].Split(':')[0].Trim();
-                                bccode[h] = badcodetol[h].Split(':')[1].Trim();
-                            }
-                        }
+                        //if (LabelDataGridView.Rows[i].Cells["mb_badcode"].Value != null)
+                        //{
+                        //    String[] badcodetol = LabelDataGridView.Rows[i].Cells["mb_badcode"].Value.ToString().Split('|');
+                        //    bgcode = new string[badcodetol.Length - 1];
+                        //    bccode = new string[badcodetol.Length - 1];
+                        //    for (int h = 0; h < badcodetol.Length - 1; h++)
+                        //    {
+                        //        bgcode[h] = badcodetol[h].Split(':')[0].Trim();
+                        //        bccode[h] = badcodetol[h].Split(':')[1].Trim();
+                        //    }
+                        //}
                         if (change.Checked)
                         {
                             dt1 = new DataTable();
@@ -270,7 +270,7 @@ namespace UAS_MES_NEW.Make
                             dtbar = BaseUtil.ToDataTable(dtrows);
                             if (dtbar.Rows.Count > 0)
                             {
-                                String ErrorMessage;
+                                string ErrorMessage;
                                 string sp_tracekind = dtbar.Rows[0]["sp_tracekind"].ToString();
                                 string sp_soncode = dtbar.Rows[0]["sp_soncode"].ToString();
                                 string sp_prefix = dtbar.Rows[0]["sp_prefix"].ToString();
@@ -354,12 +354,12 @@ namespace UAS_MES_NEW.Make
                                 {
                                     string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
                                     string mss_id = dt.Rows[0]["ms_id"].ToString();
-                                    ////MakeBad表插入物料批号不良信息
-                                    sql.Clear();
-                                    sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
-                                    sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
-                                    sql.Append(":bc_code,'" + makecode + "')");
-                                    dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
+                                    //////MakeBad表插入物料批号不良信息
+                                    //sql.Clear();
+                                    //sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
+                                    //sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
+                                    //sql.Append(":bc_code,'" + makecode + "')");
+                                    //dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
                                     //更新子件序列号为待维修                               
                                     sql.Clear();
                                     sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");
@@ -368,10 +368,10 @@ namespace UAS_MES_NEW.Make
                                 //没有生产信息,判定为采购件,则将不良信息插入不良零件表中MAKEBADRSPART
                                 else
                                 {
-                                    sql.Clear();
-                                    sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
-                                    sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
-                                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
+                                    //sql.Clear();
+                                    //sql.Append("insert into  MAKEBADRSPART(mbp_id,mbp_indate,mbp_inman,mbp_sncode, mbp_badcode, mbp_part, mbp_makecode, mbp_sccode,mbp_barcode)values");
+                                    //sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '" + User.UserCode + "','" + ms_sncode.Text + "',:bc_code,'" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','" + ms_makecode.Text + "','" + User.UserSourceCode + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "')");
+                                    //dh.BatchInsert(sql.GetString(), new string[] { "bc_code" }, bccode);
                                 }
                             }
 
@@ -414,11 +414,11 @@ namespace UAS_MES_NEW.Make
                                     string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
                                     string mss_id = dt.Rows[0]["ms_id"].ToString();
                                     ////MakeBad表插入物料批号不良信息
-                                    sql.Clear();
-                                    sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
-                                    sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
-                                    sql.Append(":bc_code,'" + makecode + "')");
-                                    dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
+                                    //sql.Clear();
+                                    //sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
+                                    //sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
+                                    //sql.Append(":bc_code,'" + makecode + "')");
+                                    //dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
                                     //更新子件序列号为待维修                               
                                     sql.Clear();
                                     sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1,ms_nextmacode = '' where ms_id='" + mss_id + "' ");