Bladeren bron

修改上料界面,不良品上料采集

callm 1 maand geleden
bovenliggende
commit
bbb96d6c49

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_Decompose.cs

@@ -140,7 +140,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("select cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,cm_maid,cm_soncode,cm_materialtype,");
             sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial where(cm_sncode  in (select '" + sncode_1 + "' from dual union select firstsn from makesnrelation where sn ");
             sql.Append(" ='" + sncode_1 + "'union  select sn from makesnrelation where firstsn = '" + sncode_1 + "')");
-            sql.Append(") group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
+            sql.Append(") and cm_status=0 group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_DecomposeCJ.cs

@@ -140,7 +140,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("select cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,cm_maid,cm_soncode,cm_materialtype,");
             sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial where(cm_sncode  in (select '" + sncode_1 + "' from dual union select firstsn from makesnrelation where sn ");
             sql.Append(" ='" + sncode_1 + "'union  select sn from makesnrelation where firstsn = '" + sncode_1 + "')");
-            sql.Append(") group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
+            sql.Append(")and cm_status=0 group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
             {

+ 15 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -81,6 +81,7 @@
             this.serialPortCombox1 = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.SerialPortCombox();
             this.label1 = new System.Windows.Forms.Label();
             this.OpenPort = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_bomversion = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
@@ -751,11 +752,23 @@
             this.OpenPort.UseVisualStyleBackColor = true;
             this.OpenPort.Click += new System.EventHandler(this.OpenPort_Click);
             // 
+            // ms_bomversion
+            // 
+            this.ms_bomversion.AutoSize = true;
+            this.ms_bomversion.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_bomversion.Location = new System.Drawing.Point(898, 467);
+            this.ms_bomversion.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_bomversion.Name = "ms_bomversion";
+            this.ms_bomversion.Size = new System.Drawing.Size(0, 41);
+            this.ms_bomversion.TabIndex = 197;
+            this.ms_bomversion.Visible = false;
+            // 
             // Make_FeedingCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1796, 974);
+            this.Controls.Add(this.ms_bomversion);
             this.Controls.Add(this.OpenPort);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.serialPortCombox1);
@@ -805,7 +818,7 @@
             this.SizeChanged += new System.EventHandler(this.Make_FeedingCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -863,5 +876,6 @@
         private CustomControl.ComBoxWithFocus.SerialPortCombox serialPortCombox1;
         private System.Windows.Forms.Label label1;
         private CustomControl.ButtonUtil.NormalButton OpenPort;
+        private System.Windows.Forms.Label ms_bomversion;
     }
 }

+ 2 - 2
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollection.cs

@@ -298,7 +298,7 @@ namespace UAS_MES_NEW.Make
                 //将录入框的值给序列号
                 sn_code.Text = code.Text;
                 sql.Clear();
-                sql.Append("select ma_prodcode,ma_ecncode,ms_sncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
+                sql.Append("select ma_prodcode,ms_bomversion,ma_ecncode,ms_sncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
                 sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname  from makeserial left join make on ma_code=ms_makecode ");
                 sql.Append("left join product on ms_prodcode=pr_code where ms_sncode='" + code.Text + "' order by ms_id desc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -402,7 +402,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("sp_fsoncode,max(sp_barcoderule)sp_barcoderule,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
             sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
             sql.Append("sp_regex,max(pr_detail)pr_detail,max(substr(pr_spec,0,20))pr_spec from stepproduct left join product on pr_code=sp_fsoncode where ");
-            sql.Append("sp_bomversion='" + ma_bomversion.Text + "' and sp_craftcode='" + ms_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' ");
+            sql.Append("sp_bomversion='" + ms_bomversion.Text + "' and sp_craftcode='" + ms_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' ");
             sql.Append("And sp_mothercode ='" + ma_prodcode.Text + "' and sp_tracekind=1 and not exists(select 1 from craftmaterial where ");
             sql.Append("cm_sncode in (select '" + ms_firstsn + "' from dual union select sn from makesnrelation where firstsn='" + ms_firstsn + "') and cm_makecode='" + ma_code.Text + "' and cm_fsoncode=");
             sql.Append("sp_fsoncode and cm_status=0 and cm_stepcode=sp_stepcode) group by sp_fsoncode,sp_id order by SP_DETNO asc");

+ 3 - 3
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollection.resx

@@ -195,7 +195,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDwAACw8BkvkDpQAACdNJREFUeF7t3dtOW4cW
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAACdNJREFUeF7t3dtOW4cW
         heFe9VUibakv1/eoVGk/TFedps2hnCGAjTnYnAlgbGNzJpUqza2xgL2zmSlL4oqV8V98Fx2q190/YxwC
         30XEdwA8pQGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMNAHykAYCPNADwkQYAPtIAwEcaAPhIAwAfaQDg
         Iw0AfKQBgI80APCRBgA+0gDARxoA+EgDAB9pAOAjDQB8pAGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMN
@@ -326,7 +326,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDwAACw8BkvkDpQAACdNJREFUeF7t3dtOW4cW
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAACdNJREFUeF7t3dtOW4cW
         heFe9VUibakv1/eoVGk/TFedps2hnCGAjTnYnAlgbGNzJpUqza2xgL2zmSlL4oqV8V98Fx2q190/YxwC
         30XEdwA8pQGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMNAHykAYCPNADwkQYAPtIAwEcaAPhIAwAfaQDg
         Iw0AfKQBgI80APCRBgA+0gDARxoA+EgDAB9pAOAjDQB8pAGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMN
@@ -457,7 +457,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDgAACw4BQL7hQQAACdNJREFUeF7t3dtOW4cW
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAACdNJREFUeF7t3dtOW4cW
         heFe9VUibakv1/eoVGk/TFedps2hnCGAjTnYnAlgbGNzJpUqza2xgL2zmSlL4oqV8V98Fx2q190/YxwC
         30XEdwA8pQGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMNAHykAYCPNADwkQYAPtIAwEcaAPhIAwAfaQDg
         Iw0AfKQBgI80APCRBgA+0gDARxoA+EgDAB9pAOAjDQB8pAGAjzQA8JEGAD7SAMBHGgD4SAMAH2kA4CMN

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollectionBadOnly.cs

@@ -549,7 +549,7 @@ namespace UAS_MES_NEW.Make
                 sql.Clear();
                 sql.Append("insert into Craftmaterial (cm_id ,cm_prodtype,cm_makecode,cm_maid,cm_maprodcode, cm_soncode, cm_mscode, cm_sncode, cm_stepcode, cm_stepname,cm_fsoncode,");
                 sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid,cm_status,cm_materialtype,cm_firstsn)");
-                sql.Append("select Craftmaterial_seq.nextval,sp_prodcode, ma_code, ma_id, ma_prodcode,:soncode,ms_code,ms_sncode,sp_stepcode,");
+                sql.Append("select Craftmaterial_seq.nextval,sp_prodtype, ma_code, ma_id, ma_prodcode,:soncode,ms_code,ms_sncode,sp_stepcode,");
                 sql.Append("ms_stepname,sp_fsoncode,ms_craftcode,ms_craftname,:barcode,1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "',ma_wccode,");
                 sql.Append("'" + User.UserSourceCode + "',:sp_id,0,1,ms_firstsn from make left join stepproduct on instr('"+ms_paststep+"',sp_stepcode)>0 ");
                 sql.Append(" and sp_mothercode = ma_prodcode left join makeserial on ms_makecode=ma_code and sp_craftcode=ms_craftcode ");

+ 24 - 24
UAS_MES_YDCY/FunctionCode/Make/Make_Repair.cs

@@ -367,7 +367,7 @@ namespace UAS_MES_NEW.Make
                                 }
                             }
                             cd_stepcode.Text = cdstepcode;
-                            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and instr('"+ ms_paststep + "',cd_stepcode)>0 order by cd_stepno";
+                            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and instr('" + ms_paststep + "',cd_stepcode)>0 order by cd_stepno";
                             //if (dh.getFieldDataByCondition("craftdetail left JOIN craft on cr_id = cd_crid", "nvl(cd_ifinput,0)cd_ifinput", "cr_code=  '" + cr_code.Text + "' and cr_prodcode = '" + ms_prodcode.Text + "' and cd_stepcode = '" + cd_stepcode.Text + "'").ToString() == "-1")
                             //    cd_stepcode.Enabled = false;
                             //else
@@ -578,29 +578,29 @@ namespace UAS_MES_NEW.Make
             ////如果含有序列号物料有被拆解过
             if (dt.Rows.Count > 0)
             {
-                string soncode = "";
-                for (int i = 0; i < dt.Rows.Count; i++)
-                {
-                    soncode += "'" + dt.Rows[i][0].ToString() + "',";
-                }
-                //查询对应的上料记录
-                sql.Clear();
-                sql.Append("select cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union  select sn from ");
-                sql.Append(" makesnrelation where firstsn='" + firstsn + "')and nvl(cm_prodtype,' ')<>'包装物料' and  cm_status=0 and cm_soncode in (" + soncode.Substring(0, soncode.Length - 1) + ")");
-                DataTable LoadSoncode = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                //查询的结果不相等表示未完成上料
-                if (dt.Rows.Count != LoadSoncode.Rows.Count)
-                {
-                    for (int i = 0; i < LoadSoncode.Rows.Count; i++)
-                    {
-                        if (soncode.Contains(LoadSoncode.Rows[i][0].ToString()))
-                        {
-                            soncode = soncode.Replace(LoadSoncode.Rows[i][0].ToString(), "");
-                        }
-                    }
-                    OperatResult.AppendText(">>" + soncode.Replace("'", "") + "物料尚未备料,不允许回流\n", Color.Red);
-                    return;
-                }
+                //string soncode = "";
+                //for (int i = 0; i < dt.Rows.Count; i++)
+                //{
+                //    soncode += "'" + dt.Rows[i][0].ToString() + "',";
+                //}
+                ////查询对应的上料记录
+                //sql.Clear();
+                //sql.Append("select cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union  select sn from ");
+                //sql.Append(" makesnrelation where firstsn='" + firstsn + "')and nvl(cm_prodtype,' ')<>'包装物料' and  cm_status=0 and cm_soncode in (" + soncode.Substring(0, soncode.Length - 1) + ")");
+                //DataTable LoadSoncode = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                ////查询的结果不相等表示未完成上料
+                //if (dt.Rows.Count != LoadSoncode.Rows.Count)
+                //{
+                //    for (int i = 0; i < LoadSoncode.Rows.Count; i++)
+                //    {
+                //        if (soncode.Contains(LoadSoncode.Rows[i][0].ToString()))
+                //        {
+                //            soncode = soncode.Replace(LoadSoncode.Rows[i][0].ToString(), "");
+                //        }
+                //    }
+                //    OperatResult.AppendText(">>" + soncode.Replace("'", "") + "物料尚未备料,不允许回流\n", Color.Red);
+                //    return;
+                //}
             }
             dt = (DataTable)dh.ExecuteSql("select cr_id from craft where cr_statuscode='AUDITED' and cr_code='" + cr_code.Text + "'", "select");
             if (dt.Rows.Count == 0)

+ 1159 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_Repair67F.Designer.cs

@@ -0,0 +1,1159 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_Repair67F
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_Repair));
+            this.label14 = new System.Windows.Forms.Label();
+            this.bc_name_label = new System.Windows.Forms.Label();
+            this.bg_name_label = new System.Windows.Forms.Label();
+            this.mbr_brgcode_label = new System.Windows.Forms.Label();
+            this.nr_name_label = new System.Windows.Forms.Label();
+            this.mbr_dutycode_label = new System.Windows.Forms.Label();
+            this.mbc_component_label = new System.Windows.Forms.Label();
+            this.mbr_solution_label = new System.Windows.Forms.Label();
+            this.mbl_loc_label = new System.Windows.Forms.Label();
+            this.mbp_part_label = new System.Windows.Forms.Label();
+            this.GetSNCode_Label = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.BadCodeTree = new System.Windows.Forms.TreeView();
+            this.LocationSource = new System.Windows.Forms.BindingSource(this.components);
+            this.ComponentSource = new System.Windows.Forms.BindingSource(this.components);
+            this.bc_code = new System.Windows.Forms.Label();
+            this.bg_code = new System.Windows.Forms.Label();
+            this.nrg_code = new System.Windows.Forms.Label();
+            this.so_code = new System.Windows.Forms.Label();
+            this.mbr_dutycode = new System.Windows.Forms.Label();
+            this.mbc_component = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.mbr_dutyname = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
+            this.so_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
+            this.nr_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
+            this.nrg_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
+            this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.cd_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.ms_reworkcheckno = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.ms_sncode_label = new System.Windows.Forms.Label();
+            this.ms_checkno = new System.Windows.Forms.Label();
+            this.RepairComplete = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.ms_sncode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.Scrap = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.nr_code = new System.Windows.Forms.Label();
+            this.st_rstepcode_label = new System.Windows.Forms.Label();
+            this.ma_craftcode_label = new System.Windows.Forms.Label();
+            this.cr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.ms_prodcode_label = new System.Windows.Forms.Label();
+            this.pr_detail = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ms_makecode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mb_badremark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithTextArea();
+            this.bd_soncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.mbp_partdgv = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
+            this.mbp_part1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeleteCom = new System.Windows.Forms.DataGridViewImageColumn();
+            this.mbp_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbl_locdgv = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
+            this.mbl_loc1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.DeletePos = new System.Windows.Forms.DataGridViewImageColumn();
+            this.mbl_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RefreshTreeView = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.GetSNCode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.NewRepairInf = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SaveRepairInf = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.DeleteRepairInf = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.mbl_loc = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.bc_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.bg_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.NewBadCode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SaveBadLocation = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).BeginInit();
+            this.groupBoxWithBorder1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // label14
+            // 
+            this.label14.AutoSize = true;
+            this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label14.Location = new System.Drawing.Point(1308, 288);
+            this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label14.Name = "label14";
+            this.label14.Size = new System.Drawing.Size(146, 41);
+            this.label14.TabIndex = 46;
+            this.label14.Text = "不良备注";
+            // 
+            // bc_name_label
+            // 
+            this.bc_name_label.AutoSize = true;
+            this.bc_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_name_label.ForeColor = System.Drawing.Color.Black;
+            this.bc_name_label.Location = new System.Drawing.Point(812, 284);
+            this.bc_name_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_name_label.Name = "bc_name_label";
+            this.bc_name_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_name_label.TabIndex = 44;
+            this.bc_name_label.Text = "不良代码";
+            // 
+            // bg_name_label
+            // 
+            this.bg_name_label.AutoSize = true;
+            this.bg_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bg_name_label.Location = new System.Drawing.Point(326, 284);
+            this.bg_name_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bg_name_label.Name = "bg_name_label";
+            this.bg_name_label.Size = new System.Drawing.Size(178, 41);
+            this.bg_name_label.TabIndex = 40;
+            this.bg_name_label.Text = "不良代码组";
+            // 
+            // mbr_brgcode_label
+            // 
+            this.mbr_brgcode_label.AutoSize = true;
+            this.mbr_brgcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbr_brgcode_label.ForeColor = System.Drawing.Color.Black;
+            this.mbr_brgcode_label.Location = new System.Drawing.Point(326, 374);
+            this.mbr_brgcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mbr_brgcode_label.Name = "mbr_brgcode_label";
+            this.mbr_brgcode_label.Size = new System.Drawing.Size(178, 41);
+            this.mbr_brgcode_label.TabIndex = 93;
+            this.mbr_brgcode_label.Text = "不良原因组";
+            // 
+            // nr_name_label
+            // 
+            this.nr_name_label.AutoSize = true;
+            this.nr_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.nr_name_label.ForeColor = System.Drawing.Color.Black;
+            this.nr_name_label.Location = new System.Drawing.Point(812, 374);
+            this.nr_name_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.nr_name_label.Name = "nr_name_label";
+            this.nr_name_label.Size = new System.Drawing.Size(146, 41);
+            this.nr_name_label.TabIndex = 95;
+            this.nr_name_label.Text = "不良原因";
+            // 
+            // mbr_dutycode_label
+            // 
+            this.mbr_dutycode_label.AutoSize = true;
+            this.mbr_dutycode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbr_dutycode_label.ForeColor = System.Drawing.Color.Black;
+            this.mbr_dutycode_label.Location = new System.Drawing.Point(1308, 374);
+            this.mbr_dutycode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mbr_dutycode_label.Name = "mbr_dutycode_label";
+            this.mbr_dutycode_label.Size = new System.Drawing.Size(114, 41);
+            this.mbr_dutycode_label.TabIndex = 97;
+            this.mbr_dutycode_label.Text = "责任别";
+            // 
+            // mbc_component_label
+            // 
+            this.mbc_component_label.AutoSize = true;
+            this.mbc_component_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbc_component_label.ForeColor = System.Drawing.Color.Black;
+            this.mbc_component_label.Location = new System.Drawing.Point(326, 458);
+            this.mbc_component_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mbc_component_label.Name = "mbc_component_label";
+            this.mbc_component_label.Size = new System.Drawing.Size(146, 41);
+            this.mbc_component_label.TabIndex = 99;
+            this.mbc_component_label.Text = "不良组件";
+            // 
+            // mbr_solution_label
+            // 
+            this.mbr_solution_label.AutoSize = true;
+            this.mbr_solution_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbr_solution_label.ForeColor = System.Drawing.Color.Black;
+            this.mbr_solution_label.Location = new System.Drawing.Point(812, 456);
+            this.mbr_solution_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mbr_solution_label.Name = "mbr_solution_label";
+            this.mbr_solution_label.Size = new System.Drawing.Size(146, 41);
+            this.mbr_solution_label.TabIndex = 101;
+            this.mbr_solution_label.Text = "解决方案";
+            // 
+            // mbl_loc_label
+            // 
+            this.mbl_loc_label.AutoSize = true;
+            this.mbl_loc_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbl_loc_label.ForeColor = System.Drawing.Color.Black;
+            this.mbl_loc_label.Location = new System.Drawing.Point(326, 574);
+            this.mbl_loc_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mbl_loc_label.Name = "mbl_loc_label";
+            this.mbl_loc_label.Size = new System.Drawing.Size(146, 41);
+            this.mbl_loc_label.TabIndex = 103;
+            this.mbl_loc_label.Text = "不良位置";
+            // 
+            // mbp_part_label
+            // 
+            this.mbp_part_label.AutoSize = true;
+            this.mbp_part_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbp_part_label.ForeColor = System.Drawing.Color.Black;
+            this.mbp_part_label.Location = new System.Drawing.Point(908, 574);
+            this.mbp_part_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mbp_part_label.Name = "mbp_part_label";
+            this.mbp_part_label.Size = new System.Drawing.Size(146, 41);
+            this.mbp_part_label.TabIndex = 105;
+            this.mbp_part_label.Text = "不良零件";
+            // 
+            // GetSNCode_Label
+            // 
+            this.GetSNCode_Label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.GetSNCode_Label.AutoSize = true;
+            this.GetSNCode_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.GetSNCode_Label.Location = new System.Drawing.Point(326, 1066);
+            this.GetSNCode_Label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.GetSNCode_Label.Name = "GetSNCode_Label";
+            this.GetSNCode_Label.Size = new System.Drawing.Size(114, 41);
+            this.GetSNCode_Label.TabIndex = 113;
+            this.GetSNCode_Label.Text = "序列号";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.ForeColor = System.Drawing.Color.Black;
+            this.label2.Location = new System.Drawing.Point(16, 236);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 42);
+            this.label2.TabIndex = 117;
+            this.label2.Text = "不良信息";
+            // 
+            // BadCodeTree
+            // 
+            this.BadCodeTree.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.BadCodeTree.Location = new System.Drawing.Point(22, 288);
+            this.BadCodeTree.Margin = new System.Windows.Forms.Padding(4);
+            this.BadCodeTree.Name = "BadCodeTree";
+            this.BadCodeTree.Size = new System.Drawing.Size(284, 848);
+            this.BadCodeTree.TabIndex = 118;
+            this.BadCodeTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.BadCodeTree_AfterSelect);
+            this.BadCodeTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.BadCodeTree_NodeMouseClick);
+            // 
+            // bc_code
+            // 
+            this.bc_code.AutoSize = true;
+            this.bc_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_code.ForeColor = System.Drawing.Color.Black;
+            this.bc_code.Location = new System.Drawing.Point(1724, 450);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_code.Name = "bc_code";
+            this.bc_code.Size = new System.Drawing.Size(0, 41);
+            this.bc_code.TabIndex = 122;
+            this.bc_code.Visible = false;
+            // 
+            // bg_code
+            // 
+            this.bg_code.AutoSize = true;
+            this.bg_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bg_code.ForeColor = System.Drawing.Color.Black;
+            this.bg_code.Location = new System.Drawing.Point(1654, 450);
+            this.bg_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bg_code.Name = "bg_code";
+            this.bg_code.Size = new System.Drawing.Size(0, 41);
+            this.bg_code.TabIndex = 123;
+            this.bg_code.Visible = false;
+            // 
+            // nrg_code
+            // 
+            this.nrg_code.AutoSize = true;
+            this.nrg_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.nrg_code.ForeColor = System.Drawing.Color.Black;
+            this.nrg_code.Location = new System.Drawing.Point(1598, 520);
+            this.nrg_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.nrg_code.Name = "nrg_code";
+            this.nrg_code.Size = new System.Drawing.Size(0, 41);
+            this.nrg_code.TabIndex = 136;
+            this.nrg_code.Visible = false;
+            // 
+            // so_code
+            // 
+            this.so_code.AutoSize = true;
+            this.so_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.so_code.ForeColor = System.Drawing.Color.Black;
+            this.so_code.Location = new System.Drawing.Point(1640, 526);
+            this.so_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.so_code.Name = "so_code";
+            this.so_code.Size = new System.Drawing.Size(0, 41);
+            this.so_code.TabIndex = 137;
+            this.so_code.Visible = false;
+            // 
+            // mbr_dutycode
+            // 
+            this.mbr_dutycode.AutoSize = true;
+            this.mbr_dutycode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbr_dutycode.ForeColor = System.Drawing.Color.Black;
+            this.mbr_dutycode.Location = new System.Drawing.Point(1556, 526);
+            this.mbr_dutycode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mbr_dutycode.Name = "mbr_dutycode";
+            this.mbr_dutycode.Size = new System.Drawing.Size(0, 41);
+            this.mbr_dutycode.TabIndex = 138;
+            this.mbr_dutycode.Visible = false;
+            // 
+            // mbc_component
+            // 
+            this.mbc_component.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.mbc_component.FormattingEnabled = true;
+            this.mbc_component.Items.AddRange(new object[] {
+            "",
+            "主板",
+            "液晶屏",
+            "喇叭",
+            "摄像头",
+            "MIC板",
+            "底壳",
+            "电池",
+            "面壳",
+            "天线/喇叭支架",
+            "A壳组件",
+            "B壳组件",
+            "C壳组件",
+            "D壳组件",
+            "通讯小板",
+            "接口小板",
+            "其他"});
+            this.mbc_component.Location = new System.Drawing.Point(524, 458);
+            this.mbc_component.Margin = new System.Windows.Forms.Padding(6);
+            this.mbc_component.Name = "mbc_component";
+            this.mbc_component.Size = new System.Drawing.Size(238, 32);
+            this.mbc_component.TabIndex = 139;
+            // 
+            // mbr_dutyname
+            // 
+            this.mbr_dutyname.Condition = null;
+            this.mbr_dutyname.Field = null;
+            this.mbr_dutyname.Location = new System.Drawing.Point(1466, 378);
+            this.mbr_dutyname.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.mbr_dutyname.Name = "mbr_dutyname";
+            this.mbr_dutyname.Size = new System.Drawing.Size(242, 35);
+            this.mbr_dutyname.TabIndex = 135;
+            this.mbr_dutyname.TableName = null;
+            this.mbr_dutyname.Value = null;
+            this.mbr_dutyname.ValueField = null;
+            this.mbr_dutyname.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch.OnTextChange(this.mbr_dutyname_UserControlTextChanged);
+            // 
+            // so_name
+            // 
+            this.so_name.Condition = null;
+            this.so_name.Field = null;
+            this.so_name.Location = new System.Drawing.Point(1004, 458);
+            this.so_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.so_name.Name = "so_name";
+            this.so_name.Size = new System.Drawing.Size(242, 35);
+            this.so_name.TabIndex = 133;
+            this.so_name.TableName = null;
+            this.so_name.Value = null;
+            this.so_name.ValueField = null;
+            this.so_name.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch.OnTextChange(this.so_name_UserControlTextChanged);
+            // 
+            // nr_name
+            // 
+            this.nr_name.Condition = null;
+            this.nr_name.Field = null;
+            this.nr_name.Location = new System.Drawing.Point(1004, 378);
+            this.nr_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.nr_name.Name = "nr_name";
+            this.nr_name.Size = new System.Drawing.Size(242, 35);
+            this.nr_name.TabIndex = 132;
+            this.nr_name.TableName = null;
+            this.nr_name.Value = null;
+            this.nr_name.ValueField = null;
+            this.nr_name.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch.OnTextChange(this.nr_name_UserControlTextChanged);
+            // 
+            // nrg_name
+            // 
+            this.nrg_name.Condition = null;
+            this.nrg_name.Field = null;
+            this.nrg_name.Location = new System.Drawing.Point(524, 378);
+            this.nrg_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.nrg_name.Name = "nrg_name";
+            this.nrg_name.Size = new System.Drawing.Size(242, 35);
+            this.nrg_name.TabIndex = 131;
+            this.nrg_name.TableName = null;
+            this.nrg_name.Value = null;
+            this.nrg_name.ValueField = null;
+            this.nrg_name.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch.OnTextChange(this.nrg_name_UserControlTextChanged);
+            // 
+            // groupBoxWithBorder1
+            // 
+            this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.cd_stepcode);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_reworkcheckno);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_makecode_label);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_sncode_label);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_checkno);
+            this.groupBoxWithBorder1.Controls.Add(this.RepairComplete);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_sncode);
+            this.groupBoxWithBorder1.Controls.Add(this.Scrap);
+            this.groupBoxWithBorder1.Controls.Add(this.nr_code);
+            this.groupBoxWithBorder1.Controls.Add(this.st_rstepcode_label);
+            this.groupBoxWithBorder1.Controls.Add(this.ma_craftcode_label);
+            this.groupBoxWithBorder1.Controls.Add(this.cr_code);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_detail_label);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_prodcode_label);
+            this.groupBoxWithBorder1.Controls.Add(this.pr_detail);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_prodcode);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_makecode);
+            this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(18, 16);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1760, 204);
+            this.groupBoxWithBorder1.TabIndex = 130;
+            this.groupBoxWithBorder1.TabStop = false;
+            this.groupBoxWithBorder1.Text = "工单信息";
+            this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
+            // 
+            // cd_stepcode
+            // 
+            this.cd_stepcode.AllPower = "ifall";
+            this.cd_stepcode.Caller = null;
+            this.cd_stepcode.Condition = null;
+            this.cd_stepcode.DBTitle = "回流工序";
+            this.cd_stepcode.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cd_stepcode.FormName = null;
+            this.cd_stepcode.Location = new System.Drawing.Point(712, 138);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(6);
+            this.cd_stepcode.Name = "cd_stepcode";
+            this.cd_stepcode.Power = "ifspecial";
+            this.cd_stepcode.ReturnData = null;
+            this.cd_stepcode.SelectField = null;
+            this.cd_stepcode.SetValueField = null;
+            this.cd_stepcode.Size = new System.Drawing.Size(300, 44);
+            this.cd_stepcode.TabIndex = 68;
+            this.cd_stepcode.TableName = null;
+            this.cd_stepcode.Tag = "";
+            this.cd_stepcode.TextBoxEnable = false;
+            // 
+            // ms_reworkcheckno
+            // 
+            this.ms_reworkcheckno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_reworkcheckno.AutoSize = true;
+            this.ms_reworkcheckno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_reworkcheckno.Location = new System.Drawing.Point(1584, 118);
+            this.ms_reworkcheckno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_reworkcheckno.Name = "ms_reworkcheckno";
+            this.ms_reworkcheckno.Size = new System.Drawing.Size(146, 41);
+            this.ms_reworkcheckno.TabIndex = 129;
+            this.ms_reworkcheckno.Text = "返修批号";
+            this.ms_reworkcheckno.Visible = false;
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(406, 54);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(114, 41);
+            this.ms_makecode_label.TabIndex = 37;
+            this.ms_makecode_label.Text = "工单号";
+            // 
+            // ms_sncode_label
+            // 
+            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_sncode_label.AutoSize = true;
+            this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sncode_label.Location = new System.Drawing.Point(30, 52);
+            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_sncode_label.Name = "ms_sncode_label";
+            this.ms_sncode_label.Size = new System.Drawing.Size(114, 41);
+            this.ms_sncode_label.TabIndex = 38;
+            this.ms_sncode_label.Text = "序列号";
+            // 
+            // ms_checkno
+            // 
+            this.ms_checkno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_checkno.AutoSize = true;
+            this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_checkno.Location = new System.Drawing.Point(1580, 54);
+            this.ms_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_checkno.Name = "ms_checkno";
+            this.ms_checkno.Size = new System.Drawing.Size(146, 41);
+            this.ms_checkno.TabIndex = 128;
+            this.ms_checkno.Text = "送检批号";
+            this.ms_checkno.Visible = false;
+            // 
+            // RepairComplete
+            // 
+            this.RepairComplete.AllPower = "ifall";
+            this.RepairComplete.BackColor = System.Drawing.Color.Transparent;
+            this.RepairComplete.DownImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.DownImage")));
+            this.RepairComplete.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.RepairComplete.Image = null;
+            this.RepairComplete.IsShowBorder = true;
+            this.RepairComplete.Location = new System.Drawing.Point(1072, 132);
+            this.RepairComplete.Margin = new System.Windows.Forms.Padding(6);
+            this.RepairComplete.MoveImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.MoveImage")));
+            this.RepairComplete.Name = "RepairComplete";
+            this.RepairComplete.NormalImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.NormalImage")));
+            this.RepairComplete.Power = null;
+            this.RepairComplete.Size = new System.Drawing.Size(136, 48);
+            this.RepairComplete.TabIndex = 55;
+            this.RepairComplete.Tag = "IfRead";
+            this.RepairComplete.Text = "完成维修";
+            this.RepairComplete.UseVisualStyleBackColor = true;
+            this.RepairComplete.Click += new System.EventHandler(this.RepairComplete_Click);
+            // 
+            // ms_sncode
+            // 
+            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(180, 54);
+            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, 41);
+            this.ms_sncode.TabIndex = 126;
+            // 
+            // Scrap
+            // 
+            this.Scrap.AllPower = "ifall";
+            this.Scrap.BackColor = System.Drawing.Color.Transparent;
+            this.Scrap.DownImage = ((System.Drawing.Image)(resources.GetObject("Scrap.DownImage")));
+            this.Scrap.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.Scrap.Image = null;
+            this.Scrap.IsShowBorder = true;
+            this.Scrap.Location = new System.Drawing.Point(1262, 132);
+            this.Scrap.Margin = new System.Windows.Forms.Padding(6);
+            this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
+            this.Scrap.Name = "Scrap";
+            this.Scrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("Scrap.NormalImage")));
+            this.Scrap.Power = null;
+            this.Scrap.Size = new System.Drawing.Size(136, 48);
+            this.Scrap.TabIndex = 56;
+            this.Scrap.Tag = "IfRead";
+            this.Scrap.Text = "报废";
+            this.Scrap.UseVisualStyleBackColor = true;
+            this.Scrap.Click += new System.EventHandler(this.Scrap_Click);
+            // 
+            // nr_code
+            // 
+            this.nr_code.AutoSize = true;
+            this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.nr_code.ForeColor = System.Drawing.Color.Black;
+            this.nr_code.Location = new System.Drawing.Point(1680, 444);
+            this.nr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.nr_code.Name = "nr_code";
+            this.nr_code.Size = new System.Drawing.Size(0, 41);
+            this.nr_code.TabIndex = 125;
+            // 
+            // st_rstepcode_label
+            // 
+            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.st_rstepcode_label.AutoSize = true;
+            this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.st_rstepcode_label.Location = new System.Drawing.Point(530, 130);
+            this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.st_rstepcode_label.Name = "st_rstepcode_label";
+            this.st_rstepcode_label.Size = new System.Drawing.Size(146, 41);
+            this.st_rstepcode_label.TabIndex = 65;
+            this.st_rstepcode_label.Text = "回流工序";
+            // 
+            // ma_craftcode_label
+            // 
+            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ma_craftcode_label.AutoSize = true;
+            this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_craftcode_label.Location = new System.Drawing.Point(30, 130);
+            this.ma_craftcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_craftcode_label.Name = "ma_craftcode_label";
+            this.ma_craftcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_craftcode_label.TabIndex = 66;
+            this.ma_craftcode_label.Text = "回流途程";
+            // 
+            // cr_code
+            // 
+            this.cr_code.AllPower = "ifall";
+            this.cr_code.Caller = null;
+            this.cr_code.Condition = null;
+            this.cr_code.DBTitle = "回流途程";
+            this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.cr_code.FormName = null;
+            this.cr_code.Location = new System.Drawing.Point(182, 138);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(6);
+            this.cr_code.Name = "cr_code";
+            this.cr_code.Power = "ifspecial";
+            this.cr_code.ReturnData = null;
+            this.cr_code.SelectField = null;
+            this.cr_code.SetValueField = null;
+            this.cr_code.Size = new System.Drawing.Size(300, 46);
+            this.cr_code.TabIndex = 67;
+            this.cr_code.TableName = null;
+            this.cr_code.Tag = "ma_craftcode";
+            this.cr_code.TextBoxEnable = false;
+            this.cr_code.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.cr_code_UserControlTextChanged);
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(1274, 54);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.TabIndex = 61;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // ms_prodcode_label
+            // 
+            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.ms_prodcode_label.AutoSize = true;
+            this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_prodcode_label.Location = new System.Drawing.Point(816, 54);
+            this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_prodcode_label.Name = "ms_prodcode_label";
+            this.ms_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ms_prodcode_label.TabIndex = 62;
+            this.ms_prodcode_label.Text = "产品编号";
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.CutLength = null;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(1466, 54);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 82;
+            // 
+            // ms_prodcode
+            // 
+            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(1008, 54);
+            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, 41);
+            this.ms_prodcode.TabIndex = 20;
+            this.ms_prodcode.TextChanged += new System.EventHandler(this.ms_prodcode_TextChanged);
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            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(566, 54);
+            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, 41);
+            this.ms_makecode.TabIndex = 85;
+            // 
+            // mb_badremark
+            // 
+            this.mb_badremark.Location = new System.Drawing.Point(1466, 286);
+            this.mb_badremark.Margin = new System.Windows.Forms.Padding(8);
+            this.mb_badremark.Name = "mb_badremark";
+            this.mb_badremark.Size = new System.Drawing.Size(280, 42);
+            this.mb_badremark.TabIndex = 127;
+            this.mb_badremark.TextAreaEnable = true;
+            this.mb_badremark.TextBoxEnable = true;
+            // 
+            // bd_soncode
+            // 
+            this.bd_soncode.AllPower = null;
+            this.bd_soncode.Caller = null;
+            this.bd_soncode.Condition = null;
+            this.bd_soncode.DBTitle = null;
+            this.bd_soncode.FormName = null;
+            this.bd_soncode.Location = new System.Drawing.Point(1056, 576);
+            this.bd_soncode.Margin = new System.Windows.Forms.Padding(4);
+            this.bd_soncode.Name = "bd_soncode";
+            this.bd_soncode.Power = null;
+            this.bd_soncode.ReturnData = null;
+            this.bd_soncode.SelectField = null;
+            this.bd_soncode.SetValueField = null;
+            this.bd_soncode.Size = new System.Drawing.Size(274, 42);
+            this.bd_soncode.TabIndex = 124;
+            this.bd_soncode.TableName = null;
+            this.bd_soncode.Tag = "bd_soncode";
+            this.bd_soncode.TextBoxEnable = true;
+            // 
+            // mbp_partdgv
+            // 
+            this.mbp_partdgv.AllowUserToAddRows = false;
+            this.mbp_partdgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.mbp_partdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.mbp_part1,
+            this.DeleteCom,
+            this.mbp_id});
+            this.mbp_partdgv.Location = new System.Drawing.Point(916, 650);
+            this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(4);
+            this.mbp_partdgv.Name = "mbp_partdgv";
+            this.mbp_partdgv.RowTemplate.Height = 27;
+            this.mbp_partdgv.Size = new System.Drawing.Size(524, 304);
+            this.mbp_partdgv.TabIndex = 121;
+            this.mbp_partdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbp_partdgv_CellContentClick);
+            // 
+            // mbp_part1
+            // 
+            this.mbp_part1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.mbp_part1.DataPropertyName = "mbp_part";
+            this.mbp_part1.HeaderText = "已选择不良零件";
+            this.mbp_part1.Name = "mbp_part1";
+            this.mbp_part1.ReadOnly = true;
+            // 
+            // DeleteCom
+            // 
+            this.DeleteCom.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeleteCom.HeaderText = "删除";
+            this.DeleteCom.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteCom.Name = "DeleteCom";
+            this.DeleteCom.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.DeleteCom.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.DeleteCom.Width = 80;
+            // 
+            // mbp_id
+            // 
+            this.mbp_id.DataPropertyName = "mbp_id";
+            this.mbp_id.HeaderText = "mbp_id";
+            this.mbp_id.Name = "mbp_id";
+            this.mbp_id.Visible = false;
+            // 
+            // mbl_locdgv
+            // 
+            this.mbl_locdgv.AllowUserToAddRows = false;
+            this.mbl_locdgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.mbl_locdgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.mbl_loc1,
+            this.DeletePos,
+            this.mbl_id});
+            this.mbl_locdgv.Location = new System.Drawing.Point(332, 650);
+            this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(4);
+            this.mbl_locdgv.Name = "mbl_locdgv";
+            this.mbl_locdgv.RowTemplate.Height = 27;
+            this.mbl_locdgv.Size = new System.Drawing.Size(524, 304);
+            this.mbl_locdgv.TabIndex = 120;
+            this.mbl_locdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbl_locdgv_CellContentClick);
+            // 
+            // mbl_loc1
+            // 
+            this.mbl_loc1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.mbl_loc1.DataPropertyName = "mbl_loc";
+            this.mbl_loc1.HeaderText = "已选择不良位置";
+            this.mbl_loc1.Name = "mbl_loc1";
+            this.mbl_loc1.ReadOnly = true;
+            // 
+            // DeletePos
+            // 
+            this.DeletePos.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.DeletePos.HeaderText = "删除";
+            this.DeletePos.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeletePos.Name = "DeletePos";
+            this.DeletePos.Width = 80;
+            // 
+            // mbl_id
+            // 
+            this.mbl_id.DataPropertyName = "mbl_id";
+            this.mbl_id.HeaderText = "mbl_id";
+            this.mbl_id.Name = "mbl_id";
+            this.mbl_id.Visible = false;
+            // 
+            // RefreshTreeView
+            // 
+            this.RefreshTreeView.AllPower = null;
+            this.RefreshTreeView.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.RefreshTreeView.Image = global::UAS_MES_NEW.Properties.Resources.refresh;
+            this.RefreshTreeView.Location = new System.Drawing.Point(170, 236);
+            this.RefreshTreeView.Margin = new System.Windows.Forms.Padding(4);
+            this.RefreshTreeView.Name = "RefreshTreeView";
+            this.RefreshTreeView.Power = null;
+            this.RefreshTreeView.Size = new System.Drawing.Size(40, 40);
+            this.RefreshTreeView.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+            this.RefreshTreeView.TabIndex = 119;
+            this.RefreshTreeView.TabStop = false;
+            this.RefreshTreeView.Click += new System.EventHandler(this.RefreshTreeView_Click);
+            // 
+            // GetSNCode
+            // 
+            this.GetSNCode.AllPower = null;
+            this.GetSNCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.GetSNCode.BackColor = System.Drawing.Color.White;
+            this.GetSNCode.ID = null;
+            this.GetSNCode.Location = new System.Drawing.Point(488, 1068);
+            this.GetSNCode.Margin = new System.Windows.Forms.Padding(6);
+            this.GetSNCode.Name = "GetSNCode";
+            this.GetSNCode.Power = null;
+            this.GetSNCode.Size = new System.Drawing.Size(372, 35);
+            this.GetSNCode.Str = null;
+            this.GetSNCode.Str1 = null;
+            this.GetSNCode.Str2 = null;
+            this.GetSNCode.TabIndex = 114;
+            this.GetSNCode.Tag = "Read";
+            this.GetSNCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GetSNCode_KeyDown);
+            // 
+            // NewRepairInf
+            // 
+            this.NewRepairInf.AllPower = "ifall";
+            this.NewRepairInf.BackColor = System.Drawing.Color.Transparent;
+            this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
+            this.NewRepairInf.Image = null;
+            this.NewRepairInf.IsShowBorder = true;
+            this.NewRepairInf.Location = new System.Drawing.Point(584, 986);
+            this.NewRepairInf.Margin = new System.Windows.Forms.Padding(6);
+            this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
+            this.NewRepairInf.Name = "NewRepairInf";
+            this.NewRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.NormalImage")));
+            this.NewRepairInf.Power = null;
+            this.NewRepairInf.Size = new System.Drawing.Size(172, 48);
+            this.NewRepairInf.TabIndex = 112;
+            this.NewRepairInf.Tag = "IfRead";
+            this.NewRepairInf.Text = "新增维修信息";
+            this.NewRepairInf.UseVisualStyleBackColor = true;
+            this.NewRepairInf.Click += new System.EventHandler(this.NewRepairInf_Click);
+            // 
+            // SaveRepairInf
+            // 
+            this.SaveRepairInf.AllPower = "ifall";
+            this.SaveRepairInf.BackColor = System.Drawing.Color.Transparent;
+            this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
+            this.SaveRepairInf.Image = null;
+            this.SaveRepairInf.IsShowBorder = true;
+            this.SaveRepairInf.Location = new System.Drawing.Point(1312, 454);
+            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(6);
+            this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
+            this.SaveRepairInf.Name = "SaveRepairInf";
+            this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
+            this.SaveRepairInf.Power = null;
+            this.SaveRepairInf.Size = new System.Drawing.Size(172, 48);
+            this.SaveRepairInf.TabIndex = 111;
+            this.SaveRepairInf.Tag = "IfRead";
+            this.SaveRepairInf.Text = "保存维修信息";
+            this.SaveRepairInf.UseVisualStyleBackColor = true;
+            this.SaveRepairInf.Click += new System.EventHandler(this.SaveRepairInf_Click);
+            // 
+            // DeleteRepairInf
+            // 
+            this.DeleteRepairInf.AllPower = "ifall";
+            this.DeleteRepairInf.BackColor = System.Drawing.Color.Transparent;
+            this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
+            this.DeleteRepairInf.Image = null;
+            this.DeleteRepairInf.IsShowBorder = true;
+            this.DeleteRepairInf.Location = new System.Drawing.Point(842, 986);
+            this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(6);
+            this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
+            this.DeleteRepairInf.Name = "DeleteRepairInf";
+            this.DeleteRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.NormalImage")));
+            this.DeleteRepairInf.Power = null;
+            this.DeleteRepairInf.Size = new System.Drawing.Size(114, 48);
+            this.DeleteRepairInf.TabIndex = 110;
+            this.DeleteRepairInf.Tag = "IfRead";
+            this.DeleteRepairInf.Text = "删除";
+            this.DeleteRepairInf.UseVisualStyleBackColor = true;
+            this.DeleteRepairInf.Click += new System.EventHandler(this.DeleteRepairInf_Click);
+            // 
+            // mbl_loc
+            // 
+            this.mbl_loc.AllPower = null;
+            this.mbl_loc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.mbl_loc.BackColor = System.Drawing.Color.White;
+            this.mbl_loc.ID = null;
+            this.mbl_loc.Location = new System.Drawing.Point(524, 578);
+            this.mbl_loc.Margin = new System.Windows.Forms.Padding(6);
+            this.mbl_loc.Name = "mbl_loc";
+            this.mbl_loc.Power = null;
+            this.mbl_loc.Size = new System.Drawing.Size(240, 35);
+            this.mbl_loc.Str = null;
+            this.mbl_loc.Str1 = null;
+            this.mbl_loc.Str2 = null;
+            this.mbl_loc.TabIndex = 104;
+            this.mbl_loc.Tag = "Read";
+            this.mbl_loc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mbl_loc_KeyDown);
+            // 
+            // bc_name
+            // 
+            this.bc_name.AllPower = null;
+            this.bc_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.bc_name.BackColor = System.Drawing.Color.White;
+            this.bc_name.Enabled = false;
+            this.bc_name.ID = null;
+            this.bc_name.Location = new System.Drawing.Point(1004, 286);
+            this.bc_name.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_name.Name = "bc_name";
+            this.bc_name.Power = null;
+            this.bc_name.Size = new System.Drawing.Size(238, 35);
+            this.bc_name.Str = null;
+            this.bc_name.Str1 = null;
+            this.bc_name.Str2 = null;
+            this.bc_name.TabIndex = 92;
+            this.bc_name.Tag = "Read";
+            // 
+            // bg_name
+            // 
+            this.bg_name.AllPower = null;
+            this.bg_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.bg_name.BackColor = System.Drawing.Color.White;
+            this.bg_name.Enabled = false;
+            this.bg_name.ForeColor = System.Drawing.Color.Red;
+            this.bg_name.ID = null;
+            this.bg_name.Location = new System.Drawing.Point(524, 288);
+            this.bg_name.Margin = new System.Windows.Forms.Padding(6);
+            this.bg_name.Name = "bg_name";
+            this.bg_name.Power = null;
+            this.bg_name.Size = new System.Drawing.Size(238, 35);
+            this.bg_name.Str = null;
+            this.bg_name.Str1 = null;
+            this.bg_name.Str2 = null;
+            this.bg_name.TabIndex = 91;
+            this.bg_name.Tag = "Read";
+            // 
+            // OperatResult
+            // 
+            this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperatResult.Location = new System.Drawing.Point(1466, 574);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(310, 496);
+            this.OperatResult.TabIndex = 87;
+            this.OperatResult.Text = "";
+            // 
+            // Clean
+            // 
+            this.Clean.AllPower = null;
+            this.Clean.BackColor = System.Drawing.Color.Transparent;
+            this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
+            this.Clean.Image = null;
+            this.Clean.IsShowBorder = true;
+            this.Clean.Location = new System.Drawing.Point(1564, 1084);
+            this.Clean.Margin = new System.Windows.Forms.Padding(6);
+            this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
+            this.Clean.Name = "Clean";
+            this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
+            this.Clean.Power = null;
+            this.Clean.Size = new System.Drawing.Size(120, 48);
+            this.Clean.TabIndex = 81;
+            this.Clean.Tag = "IfRead";
+            this.Clean.Text = "清除";
+            this.Clean.UseVisualStyleBackColor = true;
+            this.Clean.Click += new System.EventHandler(this.Clean_Click);
+            // 
+            // NewBadCode
+            // 
+            this.NewBadCode.AllPower = "ifall";
+            this.NewBadCode.BackColor = System.Drawing.Color.Transparent;
+            this.NewBadCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.DownImage")));
+            this.NewBadCode.Image = null;
+            this.NewBadCode.IsShowBorder = true;
+            this.NewBadCode.Location = new System.Drawing.Point(328, 986);
+            this.NewBadCode.Margin = new System.Windows.Forms.Padding(6);
+            this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
+            this.NewBadCode.Name = "NewBadCode";
+            this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
+            this.NewBadCode.Power = null;
+            this.NewBadCode.Size = new System.Drawing.Size(172, 48);
+            this.NewBadCode.TabIndex = 60;
+            this.NewBadCode.Tag = "IfRead";
+            this.NewBadCode.Text = "新增不良代码";
+            this.NewBadCode.UseVisualStyleBackColor = true;
+            this.NewBadCode.Click += new System.EventHandler(this.NewBadCode_Click);
+            // 
+            // SaveBadLocation
+            // 
+            this.SaveBadLocation.AllPower = "ifall";
+            this.SaveBadLocation.BackColor = System.Drawing.Color.Transparent;
+            this.SaveBadLocation.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.DownImage")));
+            this.SaveBadLocation.Enabled = false;
+            this.SaveBadLocation.Image = null;
+            this.SaveBadLocation.IsShowBorder = true;
+            this.SaveBadLocation.Location = new System.Drawing.Point(770, 574);
+            this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(6);
+            this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
+            this.SaveBadLocation.Name = "SaveBadLocation";
+            this.SaveBadLocation.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.NormalImage")));
+            this.SaveBadLocation.Power = null;
+            this.SaveBadLocation.Size = new System.Drawing.Size(92, 48);
+            this.SaveBadLocation.TabIndex = 59;
+            this.SaveBadLocation.Tag = "IfRead";
+            this.SaveBadLocation.Text = "保存";
+            this.SaveBadLocation.UseVisualStyleBackColor = true;
+            this.SaveBadLocation.Click += new System.EventHandler(this.SaveBadLocation_Click);
+            // 
+            // Make_Repair
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1800, 1158);
+            this.Controls.Add(this.mbc_component);
+            this.Controls.Add(this.mbr_dutycode);
+            this.Controls.Add(this.so_code);
+            this.Controls.Add(this.nrg_code);
+            this.Controls.Add(this.mbr_dutyname);
+            this.Controls.Add(this.so_name);
+            this.Controls.Add(this.nr_name);
+            this.Controls.Add(this.nrg_name);
+            this.Controls.Add(this.groupBoxWithBorder1);
+            this.Controls.Add(this.mb_badremark);
+            this.Controls.Add(this.bd_soncode);
+            this.Controls.Add(this.bg_code);
+            this.Controls.Add(this.bc_code);
+            this.Controls.Add(this.mbp_partdgv);
+            this.Controls.Add(this.mbl_locdgv);
+            this.Controls.Add(this.RefreshTreeView);
+            this.Controls.Add(this.BadCodeTree);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.GetSNCode);
+            this.Controls.Add(this.GetSNCode_Label);
+            this.Controls.Add(this.NewRepairInf);
+            this.Controls.Add(this.SaveRepairInf);
+            this.Controls.Add(this.DeleteRepairInf);
+            this.Controls.Add(this.mbp_part_label);
+            this.Controls.Add(this.mbl_loc);
+            this.Controls.Add(this.mbl_loc_label);
+            this.Controls.Add(this.mbr_solution_label);
+            this.Controls.Add(this.mbc_component_label);
+            this.Controls.Add(this.mbr_dutycode_label);
+            this.Controls.Add(this.nr_name_label);
+            this.Controls.Add(this.mbr_brgcode_label);
+            this.Controls.Add(this.bc_name);
+            this.Controls.Add(this.bg_name);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.Clean);
+            this.Controls.Add(this.NewBadCode);
+            this.Controls.Add(this.SaveBadLocation);
+            this.Controls.Add(this.label14);
+            this.Controls.Add(this.bc_name_label);
+            this.Controls.Add(this.bg_name_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Make_Repair";
+            this.Tag = "Make!Repair";
+            this.Text = "维修作业";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_Repair_FormClosing);
+            this.Load += new System.EventHandler(this.Make_Repair_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_Repair_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).EndInit();
+            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private CustomControl.ButtonUtil.NormalButton RepairComplete;
+        private CustomControl.ButtonUtil.NormalButton Scrap;
+        private CustomControl.ButtonUtil.NormalButton SaveBadLocation;
+        private CustomControl.ButtonUtil.NormalButton NewBadCode;
+        private CustomControl.TextBoxWithIcon.SearchTextBox cr_code;
+        private CustomControl.TextBoxWithIcon.SearchTextBox cd_stepcode;
+        private System.Windows.Forms.Label ma_craftcode_label;
+        private System.Windows.Forms.Label st_rstepcode_label;
+        private System.Windows.Forms.Label ms_prodcode_label;
+        private System.Windows.Forms.Label label14;
+        private System.Windows.Forms.Label bc_name_label;
+        private System.Windows.Forms.Label bg_name_label;
+        private System.Windows.Forms.Label ms_sncode_label;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private CustomControl.ButtonUtil.NormalButton Clean;
+        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private CustomControl.ValueLabel.ValueLabel ms_prodcode;
+        private CustomControl.ValueLabel.ValueLabel ms_makecode;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bg_name;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_name;
+        private System.Windows.Forms.Label mbr_brgcode_label;
+        private System.Windows.Forms.Label nr_name_label;
+        private System.Windows.Forms.Label mbr_dutycode_label;
+        private System.Windows.Forms.Label mbc_component_label;
+        private System.Windows.Forms.Label mbr_solution_label;
+        private System.Windows.Forms.Label mbl_loc_label;
+        private System.Windows.Forms.Label mbp_part_label;
+        private CustomControl.ButtonUtil.NormalButton DeleteRepairInf;
+        private CustomControl.ButtonUtil.NormalButton SaveRepairInf;
+        private CustomControl.ButtonUtil.NormalButton NewRepairInf;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox GetSNCode;
+        private System.Windows.Forms.Label GetSNCode_Label;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TreeView BadCodeTree;
+        private CustomControl.ClickPicBox.ClickPicBox RefreshTreeView;
+        private CustomControl.TextBoxWithIcon.EnterTextBox mbl_loc;
+        private CustomControl.DataGrid_View.DataGridViewWithCheckBox mbl_locdgv;
+        private CustomControl.DataGrid_View.DataGridViewWithCheckBox mbp_partdgv;
+        private System.Windows.Forms.BindingSource LocationSource;
+        private System.Windows.Forms.BindingSource ComponentSource;
+        private System.Windows.Forms.Label bc_code;
+        private System.Windows.Forms.Label bg_code;
+        private CustomControl.TextBoxWithIcon.SearchTextBox bd_soncode;
+        private System.Windows.Forms.Label nr_code;
+        private CustomControl.ValueLabel.ValueLabel ms_sncode;
+        private CustomControl.TextBoxWithIcon.TextBoxWithTextArea mb_badremark;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbp_part1;
+        private System.Windows.Forms.DataGridViewImageColumn DeleteCom;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbp_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbl_loc1;
+        private System.Windows.Forms.DataGridViewImageColumn DeletePos;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbl_id;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label ms_checkno;
+        private System.Windows.Forms.Label ms_reworkcheckno;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
+        private CustomControl.TextBoxWithIcon.BlurSearch nrg_name;
+        private CustomControl.TextBoxWithIcon.BlurSearch nr_name;
+        private CustomControl.TextBoxWithIcon.BlurSearch so_name;
+        private CustomControl.TextBoxWithIcon.BlurSearch mbr_dutyname;
+        private System.Windows.Forms.Label nrg_code;
+        private System.Windows.Forms.Label so_code;
+        private System.Windows.Forms.Label mbr_dutycode;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus mbc_component;
+    }
+}

+ 1060 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_Repair67F.cs

@@ -0,0 +1,1060 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.CustomControl.DataGrid_View;
+using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_Repair67F : Form
+    {
+        string mb_id = "";
+        string mbr_id = "";
+        /// <summary>
+        /// 存放父节点信息
+        /// </summary>
+        Dictionary<string, Dictionary<string, string>> BadInf_1 = new Dictionary<string, Dictionary<string, string>>();
+        /// <summary>
+        /// 存放子节点信息
+        /// </summary>
+        Dictionary<string, Dictionary<string, string>> BadInf_2 = new Dictionary<string, Dictionary<string, string>>();
+
+        DataHelper dh = null;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        List<string> sqls = new List<string>();
+
+        DataTable dt = null;
+
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        string macode;
+
+        string msid = "";
+
+        string ifrework = "";
+
+        string reworkstatus = "";
+
+        string firstsn = "";
+
+        string ms_stepcode = "";
+
+        DataTable Dbfind;
+
+        public Make_Repair67F()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_Repair_Load(object sender, EventArgs e)
+        {
+            //为DBFind配置Call和Form的名称
+            cr_code.FormName = Name;
+            cr_code.TableName = "craft";
+            cr_code.SelectField = "cr_name # 工艺名称,cr_code # 工艺编号,cr_prodcode # 物料编号";
+            cr_code.SetValueField = new string[] { "cr_code" };
+            cr_code.DBTitle = "回流工艺";
+            cr_code.DbChange += Cr_code_DbChange;
+
+            cd_stepcode.FormName = Name;
+            cd_stepcode.TableName = "craftdetail left join step on st_code=cd_stepcode left join craft on cd_crid=cr_id";
+            cd_stepcode.SetValueField = new string[] { "cd_stepcode" };
+            cd_stepcode.SelectField = "cd_stepname # 工序名称 ,cd_stepcode # 工序编号,cd_stepno # 执行顺序";
+            cd_stepcode.DBTitle = "回流工序";
+            cd_stepcode.DbChange += Cd_stepcode_DbChange;
+
+            bd_soncode.FormName = Name;
+            bd_soncode.TableName = "bom left join bomdetail on bd_bomid=bo_id left join product on bd_soncode=pr_code";
+            bd_soncode.SetValueField = new string[] { "bd_soncode" };
+            bd_soncode.SelectField = "bd_soncode # 子件编号,pr_detail # 物料名称,pr_spec # 物料规格,bd_location # 位号";
+            bd_soncode.DBTitle = "不良零件";
+            bd_soncode.DbChange += Prodcode_DbChange;
+
+            //nrg_name.BringToFront();
+            nrg_name.TableName = "(select nrg_name,nrg_code from QUA_NGREASONGROUP left join DATAINPUTRECORD ON NRG_NAME = DIR_COMMENT AND DIR_GROUP = '不良原因组' and DIR_SOURCECODE = '" + User.UserSourceCode + "' ORDER BY NVL(DIR_NUMBER,0) DESC)";
+            nrg_name.Field = "nrg_name";
+            nrg_name.ValueField = "nrg_code";
+            nrg_name.Condition = " 1=1 ORDER BY ROWNUM asc";
+
+            nr_name.TableName = "QUA_NGREASONGROUPDET left join QUA_NGREASONGROUP on nrgd_nrgid=nrg_id left join QUA_NGReason on nrgd_nrcode=nr_code left join DATAINPUTRECORD ON nr_name = DIR_COMMENT AND DIR_GROUP = '不良原因' and  DIR_SOURCECODE = '" + User.UserSourceCode + "' ";
+            nr_name.Field = "nr_name";
+            nr_name.ValueField = "nr_code";
+
+            mbr_dutyname.TableName = "(select nd_name,nd_code from  ngduty left join DATAINPUTRECORD ON nd_name = DIR_COMMENT  AND DIR_GROUP = '责任别' and DIR_SOURCECODE = '" + User.UserSourceCode + "' ORDER BY NVL(DIR_NUMBER,0) DESC) ";
+            mbr_dutyname.Field = "nd_name";
+            mbr_dutyname.ValueField = "nd_code";
+            mbr_dutyname.Condition = " 1=1 ORDER BY ROWNUM asc";
+
+            so_name.TableName = "(select so_name,so_code from solution left join DATAINPUTRECORD ON so_name = DIR_COMMENT AND DIR_GROUP = '解决方案' and DIR_SOURCECODE = '" + User.UserSourceCode + "' ORDER BY NVL(DIR_NUMBER,0) DESC)";
+            so_name.Field = "so_name";
+            so_name.ValueField = "so_code";
+            so_name.Condition = " 1=1 ORDER BY ROWNUM asc";
+
+            asc.controllInitializeSize(this);
+            mbc_component.SendToBack();
+            so_name.SendToBack();
+            mbl_loc.SendToBack();
+            bd_soncode.SendToBack();
+            mbp_partdgv.SendToBack();
+            mbp_part_label.SendToBack();
+            dh = SystemInf.dh;
+            GetSNCode.Focus();
+        }
+
+        private void Prodcode_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = bd_soncode.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            if (bd_soncode.Text != "")
+            {
+                if (mbr_id != "")
+                {
+                    if (!dh.CheckExist("makebadrspart", "mbp_sncode='" + GetSNCode.Text + "' and mbp_part='" + bd_soncode.Text + "' and mbp_badcode='" + bc_code.Text + "'"))
+                    {
+                        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 + ",'" + bd_soncode.Text + "',");
+                        sql.Append("'" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
+                        sql.Append("sysdate,'" + User.UserCode + "' from dual");
+                        dh.ExecuteSql(sql.GetString(), "insert");
+                        DataTable 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);
+        }
+
+        private void Cd_stepcode_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = cd_stepcode.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void Cr_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = cr_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+        }
+
+        private void GetSNCode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (GetSNCode.Text == "")
+                {
+                    OperatResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                    BaseUtil.CleanForm(this);
+                    BadCodeTree.Nodes.Clear();
+                    return;
+                }
+                dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei1='" + GetSNCode.Text + "' order by ms_id desc", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    GetSNCode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                }
+                else
+                {
+                    dt = (DataTable)dh.ExecuteSql("select ms_sncode from makeserial where ms_imei2='" + GetSNCode.Text + "' order by ms_id desc", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        GetSNCode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    }
+                    else
+                    {
+                        dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei1='" + GetSNCode.Text + "' order by mil_id desc", "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            GetSNCode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                        }
+                        else
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select mil_sncode from makeimeilist where mil_imei2='" + GetSNCode.Text + "' order by mil_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                GetSNCode.Text = dt.Rows[0]["mil_sncode"].ToString();
+                            }
+                        }
+                    }
+                }
+                sql.Clear();
+                sql.Append("select ms_sncode,ms_status,ms_outboxcode,ms_paststep,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework from makeserial left join make ");
+                sql.Append("on ms_makecode=ma_code where ms_sncode = '" + GetSNCode.Text + "' or ms_firstsn='" + GetSNCode.Text + "' order by ms_id desc");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                string ms_paststep = "";
+                if (dt.Rows.Count > 0)
+                {
+                    GetSNCode.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    string ms_status = dt.Rows[0]["ms_status"].ToString();
+                    ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
+                    ifrework = dt.Rows[0]["ms_ifrework"].ToString();
+                    reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
+                    if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
+                    {
+                        OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已装箱,请先进行拆箱\n", Color.Red);
+                        BaseUtil.CleanForm(this);
+                        BadCodeTree.Nodes.Clear();
+                        return;
+                    }
+                    //如果不是返修序列号执行原来的步骤
+                    if (ifrework == "0")
+                    {
+                        if (ms_status == "4")
+                        {
+                            OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已处于报废状态\n", Color.Red);
+                            BaseUtil.CleanForm(this);
+                            BadCodeTree.Nodes.Clear();
+                            return;
+                        }
+                        if (ms_status != "3")
+                        {
+                            OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "不处于维修状态\n", Color.Red);
+                            BaseUtil.CleanForm(this);
+                            BadCodeTree.Nodes.Clear();
+                            return;
+                        }
+                    }
+                    else
+                    {
+                        if (reworkstatus == "4")
+                        {
+                            OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已处于报废状态\n", Color.Red);
+                            BaseUtil.CleanForm(this);
+                            BadCodeTree.Nodes.Clear();
+                            return;
+                        }
+                        if (reworkstatus != "0" && reworkstatus != "3")
+                        {
+                            OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "不处于维修状态\n", Color.Red);
+                            BaseUtil.CleanForm(this);
+                            BadCodeTree.Nodes.Clear();
+                            return;
+                        }
+                    }
+                }
+                else
+                {
+                    OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "不存在\n", Color.Red);
+                    BaseUtil.CleanForm(this);
+                    BadCodeTree.Nodes.Clear();
+                    return;
+                }
+                //dt = (DataTable)dh.ExecuteSql("select mb_stepcode from makebad where mb_sncode='" + GetSNCode.Text + "' and mb_status=0 order by mb_id desc", "select");
+                ////打不良的资源和当前资源相等可以快速维修,无须登录维修资源
+                //bool QuickRepair = false;
+                //if (dt.Rows.Count > 0)
+                //{
+                //    if (dt.Rows[0]["mb_stepcode"].ToString() == User.CurrentStepCode)
+                //    {
+                //        QuickRepair = true;
+                //    }
+                //}
+                string ErrorMessage = "";
+                //验证工序是否正确
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                {
+                    BadInf_1.Clear();
+                    string oStatus = "";
+                    if (LogicHandler.GetMakeInfo(GetSNCode.Text, out macode, out oStatus, out ErrorMessage))
+                    {
+                        //验证makeserial或者ms_firstsn表序列号是否存在
+                        sql.Clear();
+                        sql.Append("select max(ms_id) ms_id,ms_makecode,ma_craftcode,ms_stepcode,ms_firstsn,ms_prodcode,ms_sncode,ma_bomversion,pr_detail,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno ");
+                        sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on pr_code=ms_prodcode where ms_makecode ='" + macode + "' and ms_sncode in(");
+                        sql.Append("select '" + GetSNCode.Text + "' from dual union select firstsn from makesnrelation where ");
+                        sql.Append("sn='" + GetSNCode.Text + "') group by ms_makecode,ms_stepcode,ms_prodcode,ma_craftcode,ms_sncode,ma_bomversion,pr_detail,ms_firstsn,ms_craftcode,ms_checkno,ms_ifrework,ms_reworkcheckno");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count > 0)
+                        {
+                            msid = dt.Rows[0]["ms_id"].ToString();
+                            ms_stepcode = dt.Rows[0]["ms_stepcode"].ToString();
+                            BaseUtil.SetFormValue(this.Controls, dt);
+                            //判断是否当前工单途程的上料记录
+                            firstsn = dt.Rows[0]["ms_firstsn"].ToString();
+                            string ma_bomversion = dt.Rows[0]["ma_bomversion"].ToString();
+                            string cdstepcode = "";
+                            //sql.Clear();
+                            //sql.Append("select cm_craftcode,cm_stepcode,cm_soncode,min(cm_indate)cm_indate,sum(case when cm_status=-1 ");
+                            //sql.Append("then 0 else 1 end)qty from craftmaterial left join product on pr_code=cm_soncode where(cm_sncode ");
+                            //sql.Append("in (select sn from makesnrelation where firstsn='" + firstsn + "' union select '" + firstsn + "' from dual)) ");
+                            //sql.Append("and cm_craftcode='" + cr_code.Text + "'and nvl(cm_lastdeco,0)<>0 group by cm_craftcode,cm_stepcode,cm_soncode having ");
+                            //sql.Append("sum(case when cm_status=-1 then 0 else 1 end)=0 order by cm_indate");
+                            sql.Clear();
+                            sql.Append("select sp_stepcode cm_stepcode,sp_craftcode cm_craftcode from stepproduct left join product on pr_code=sp_fsoncode where sp_bomversion='" + ma_bomversion + "' and ");
+                            sql.Append("sp_craftcode='" + cr_code.Text + "' And sp_mothercode ='" + ms_prodcode.Text + "' and sp_tracekind=1 ");
+                            //sql.Append("sp_craftcode=v_v_mscraftcode and sp_stepcode='' And sp_mothercode ='"+ms_prodcode.Text+"' and sp_tracekind=1");
+                            sql.Append("and not exists(select 1 from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union ");
+                            sql.Append("select sn from makesnrelation where firstsn='" + firstsn + "') and cm_makecode='" + macode + "' and ");
+                            sql.Append("cm_fsoncode=sp_fsoncode and cm_status=0) and instr((select ms_paststep from makeserial where ms_firstsn='" + firstsn + "' and ms_makecode='" + macode + "'),sp_stepcode)>0 order by SP_DETNO asc");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                //cdstepcode = dt.Rows[0]["cm_stepcode"].ToString();
+                                //如果本工序包含老化则默认选择本工序,否则选择上料的后一道工序
+                                //if (dh.getFieldDataByCondition("craft left join craftdetail on cr_id=cd_crid", "nvl(cd_ifburnin,0)", "cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_stepcode='" + dt.Rows[0]["cm_stepcode"].ToString() + "'").ToString() != "0")
+                                //    cdstepcode = dt.Rows[0]["cm_stepcode"].ToString();
+                                //else
+                                //{
+                                //string nextstep = LogicHandler.GetNextStep(dt.Rows[0]["cm_craftcode"].ToString(), dt.Rows[0]["cm_stepcode"].ToString(), ms_prodcode.Text);
+                                //    if (ms_paststep.Contains(nextstep))
+                                //    {
+                                //        cdstepcode = nextstep;
+                                //    }
+                                //    else
+                                //    {
+                                //        cdstepcode = dt.Rows[0]["cm_stepcode"].ToString();
+                                //    }
+                                //}
+                            }
+                            else
+                            {
+                                sql.Clear();
+                                sql.Append("select cm_craftcode,cm_stepcode,cm_soncode,min(cm_indate)cm_indate,sum(case when cm_status=-1 ");
+                                sql.Append("then 0 else 1 end)qty from craftmaterial left join product on pr_code=cm_soncode where(cm_sncode ");
+                                sql.Append("in (select sn from makesnrelation where firstsn='" + firstsn + "'  union select '" + firstsn + "' from dual)) ");
+                                sql.Append("and cm_craftcode='" + cr_code.Text + "' group by cm_craftcode,cm_stepcode,cm_soncode having ");
+                                sql.Append("sum(case when cm_status=-1 then 0 else 1 end)=0 order by cm_indate");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    cdstepcode = dt.Rows[0]["cm_stepcode"].ToString();
+                                }
+                            }
+                            if (cdstepcode == "")
+                            {
+                                //序号小于等于当前不良的序号
+                                string currentdetno = dh.getFieldDataByCondition("craft left join craftdetail on cr_id=cd_crid", "cd_detno", "cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and cd_stepcode='" + ms_stepcode + "'").ToString();
+                                sql.Clear();
+                                sql.Append("select cd_stepcode from craft left join craftdetail on cr_id =cd_crid where ");
+                                sql.Append("cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and  ");
+                                sql.Append("nvl(cd_ifspc,0)<>0 and cd_detno <='" + currentdetno + "' order by cd_detno desc");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    cdstepcode = dt.Rows[0][0].ToString();
+                                }
+                            }
+                            //如果ms_stepcode和扣料工序均没有查到返修的工序
+                            if (cdstepcode == "")
+                            {
+                                string flowback = dh.getFieldDataByCondition("craftdetail left JOIN craft on cr_id = cd_crid", "cd_stepcode", "cr_code=  '" + cr_code.Text + "' and cr_prodcode = '" + ms_prodcode.Text + "' and nvl(cd_ifflowback,0)=-1").ToString();
+                                if (flowback != "")
+                                {
+                                    cdstepcode = flowback;
+                                }
+                                else
+                                {
+                                    cdstepcode = ms_stepcode;
+                                }
+                            }
+                            dt = (DataTable)dh.ExecuteSql("select MB_RETURNSTEP from makebad where mb_sncode='" + GetSNCode.Text + "' and mb_status=0 order by mb_id desc", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                if (dt.Rows[0]["MB_RETURNSTEP"].ToString() != "")
+                                {
+                                    cdstepcode = dt.Rows[0]["MB_RETURNSTEP"].ToString();
+                                }
+                            }
+                            cd_stepcode.Text = cdstepcode;
+                            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' and instr('"+ ms_paststep + "',cd_stepcode)>0 order by cd_stepno";
+                            //if (dh.getFieldDataByCondition("craftdetail left JOIN craft on cr_id = cd_crid", "nvl(cd_ifinput,0)cd_ifinput", "cr_code=  '" + cr_code.Text + "' and cr_prodcode = '" + ms_prodcode.Text + "' and cd_stepcode = '" + cd_stepcode.Text + "'").ToString() == "-1")
+                            //    cd_stepcode.Enabled = false;
+                            //else
+                            //    cd_stepcode.Enabled = true;
+                            LoadBadInfTree(sender, e);
+                        }
+                        else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                    }
+                    else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                }
+                else OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+            }
+        }
+
+        private void Make_Repair_SizeChanged(object sender, EventArgs e)
+        {
+            mbc_component.BringToFront();
+            so_name.BringToFront();
+            mbl_loc.BringToFront();
+            bd_soncode.BringToFront();
+            mbp_partdgv.BringToFront();
+            mbp_part_label.BringToFront();
+            asc.controlAutoSize(this);
+            mbc_component.SendToBack();
+            so_name.SendToBack();
+            mbl_loc.SendToBack();
+            bd_soncode.SendToBack();
+            mbp_partdgv.SendToBack();
+            mbp_part_label.SendToBack();
+        }
+
+        private void BadCodeTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
+        {
+            if (e.Node.Level == 0)
+            {
+                mb_id = e.Node.Tag.ToString();
+                BaseUtil.CleanControlsText(bc_name, bc_code, bg_name, bg_code, mb_badremark, nrg_name, nrg_code, nr_name, nr_code, so_name, so_code, mbr_dutyname, mbr_dutycode, mbc_component);
+                mbl_locdgv.DataSource = null;
+                mbp_partdgv.DataSource = null;
+                bc_name.Text = BadInf_1[mb_id]["bc_name"];
+                bc_code.Text = BadInf_1[mb_id]["mb_badcode"];
+                bg_name.Text = BadInf_1[mb_id]["bg_name"];
+                bg_code.Text = BadInf_1[mb_id]["mb_bgcode"];
+                mb_badremark.Text = BadInf_1[mb_id]["mb_badremark"];
+                mbr_id = "";
+                SaveRepairInf.Enabled = true;
+            }
+            if (e.Node.Level == 1)
+            {
+                //展示父节点信息
+                mb_id = e.Node.Parent.Tag.ToString();
+                bc_code.Text = BadInf_1[mb_id]["mb_badcode"];
+                bc_name.Text = BadInf_1[mb_id]["bc_name"];
+                bg_code.Text = BadInf_1[mb_id]["mb_bgcode"];
+                bg_name.Text = BadInf_1[mb_id]["bg_name"];
+                //展示子节点信息
+                mbr_id = e.Node.Tag.ToString();
+                nrg_code.Text = BadInf_2[mbr_id]["nrg_code"];
+                nrg_name.Text = BadInf_2[mbr_id]["nrg_name"];
+                nr_code.Text = BadInf_2[mbr_id]["nr_code"];
+                nr_name.Text = BadInf_2[mbr_id]["nr_name"];
+                so_code.Text = BadInf_2[mbr_id]["so_code"];
+                so_name.Text = BadInf_2[mbr_id]["so_name"];
+                mbr_dutycode.Text = BadInf_2[mbr_id]["mbr_dutycode"];
+                mbr_dutyname.Text = BadInf_2[mbr_id]["mbr_dutyname"];
+                mbc_component.Text = dh.getFieldDataByCondition("makebadrscom", "mbc_component", "mbc_mbrid=" + mbr_id).ToString();
+                //加载两个Grid的数据源
+                DataTable dt = (DataTable)dh.ExecuteSql("select mbp_id,mbp_part from makebadrspart where mbp_mbrid=" + mbr_id, "select");
+                BaseUtil.FillDgvWithDataTable(mbp_partdgv, dt);
+                dt = (DataTable)dh.ExecuteSql("select mbl_id,mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
+                BaseUtil.FillDgvWithDataTable(mbl_locdgv, dt);
+                SaveRepairInf.Enabled = false;
+            }
+        }
+
+        private void LoadBadInfTree(object sender, EventArgs e)
+        {
+            BadCodeTree.Nodes.Clear();
+            sql.Clear();
+            //不是返工工单时的取当前工单
+            sql.Append("select mb_id,mb_sncode,mb_badcode,mb_bgcode,nvl(bc_name,mb_badcode) bc_name,nvl(bg_name,mb_bgcode) bg_name,");
+            sql.Append("mb_badremark from makebad left join badcode on bc_code=mb_badcode left join badgroup ");
+            sql.Append("on bg_code=mb_bgcode where (mb_sncode='" + (GetSNCode.Text == "" ? ms_sncode.Text : GetSNCode.Text) + "' or mb_mscode='" + (GetSNCode.Text == "" ? ms_sncode.Text : GetSNCode.Text) + "' ) and mb_makecode='" + macode + "' and mb_status=0");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count == 0)
+            {
+                sql.Clear();
+                sql.Append("select mb_id,mb_sncode,mb_badcode,mb_bgcode,nvl(bc_name,mb_badcode) bc_name,nvl(bg_name,mb_bgcode) bg_name, ");
+                sql.Append("mb_badremark from makebad left join badcode on bc_code=mb_badcode left join badgroup on bg_code=mb_bgcode  ");
+                sql.Append("left join make on ma_code=mb_makecode where mb_sncode='" + (GetSNCode.Text == "" ? ms_sncode.Text : GetSNCode.Text) + "' and mb_makecode<>'" + macode + "' and mb_status=0");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            }
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                //添加根节点
+                TreeNode tnode_0 = new TreeNode();
+                string bg_name = dt.Rows[i]["bg_name"].ToString();
+                string bc_name = dt.Rows[i]["bc_name"].ToString();
+                string mb_badcode = dt.Rows[i]["mb_badcode"].ToString();
+                string mb_bgcode = dt.Rows[i]["mb_bgcode"].ToString();
+                tnode_0.Text = (bg_name == "" ? mb_bgcode : bg_name) + ":" + (bc_name == "" ? mb_bgcode : bc_name);
+                tnode_0.Name = dt.Rows[i]["mb_bgcode"].ToString();
+                //作为Dictionary的主标识
+                string mb_id = dt.Rows[i]["mb_id"].ToString();
+                tnode_0.Tag = mb_id;
+                Dictionary<string, string> dic = new Dictionary<string, string>();
+                dic.Add("mb_id", mb_id);
+                dic.Add("mb_sncode", dt.Rows[i]["mb_sncode"].ToString());
+                dic.Add("mb_badcode", dt.Rows[i]["mb_badcode"].ToString());
+                dic.Add("mb_bgcode", dt.Rows[i]["mb_bgcode"].ToString());
+                dic.Add("bc_name", dt.Rows[i]["bc_name"].ToString());
+                dic.Add("bg_name", dt.Rows[i]["bg_name"].ToString());
+                dic.Add("mb_badremark", dt.Rows[i]["mb_badremark"].ToString());
+                if (!BadInf_1.ContainsKey(tnode_0.Tag.ToString()))
+                    BadInf_1.Add(tnode_0.Tag.ToString(), dic);
+                BadCodeTree.Nodes.Add(tnode_0);
+                BadCodeTree.SelectedNode = BadCodeTree.Nodes[0];
+
+                //添加子节点
+                sql.Clear();
+                sql.Append("select mbr_id,mbr_brcode,mbr_brgcode,mbr_solutioncode,so_code,so_name,mbr_dutycode,mbr_dutyname,nd_name,nrg_name");
+                sql.Append(",nr_name,nr_code,nrg_code from makebadreason left join QUA_NGReason on nr_code=mbr_brcode left join ");
+                sql.Append("QUA_NGREASONGROUPdet on nrgd_nrcode=nr_code left join QUA_NGREASONGROUP on nrg_id=nrgd_nrgid and ");
+                sql.Append("mbr_brgcode=nrg_code left join solution on so_code=mbr_solutioncode left join ngduty on nd_code=mbr_dutycode ");
+                sql.Append("where mbr_mbid=" + mb_id);
+                DataTable dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                for (int j = 0; j < dt1.Rows.Count; j++)
+                {
+                    TreeNode tnode_1 = new TreeNode();
+                    //存放子节点的信息
+                    Dictionary<string, string> dic1 = new Dictionary<string, string>();
+                    string mbr_id = dt1.Rows[j]["mbr_id"].ToString();
+                    tnode_1.Tag = mbr_id;
+                    dic1.Add("mbr_id", mbr_id);
+                    dic1.Add("mbr_brcode", dt1.Rows[j]["mbr_id"].ToString());
+                    dic1.Add("mbr_brgcode", dt1.Rows[j]["mbr_brcode"].ToString());
+                    dic1.Add("mbr_solutioncode", dt1.Rows[j]["mbr_solutioncode"].ToString());
+                    dic1.Add("mbr_dutycode", dt1.Rows[j]["mbr_dutycode"].ToString());
+                    dic1.Add("mbr_dutyname", dt1.Rows[j]["mbr_dutyname"].ToString());
+                    dic1.Add("nd_name", dt1.Rows[j]["nd_name"].ToString());
+                    dic1.Add("so_name", dt1.Rows[j]["so_name"].ToString());
+                    dic1.Add("so_code", dt1.Rows[j]["so_code"].ToString());
+                    dic1.Add("nrg_name", dt1.Rows[j]["nrg_name"].ToString());
+                    dic1.Add("nrg_code", dt1.Rows[j]["nrg_code"].ToString());
+                    dic1.Add("nr_name", dt1.Rows[j]["nr_name"].ToString());
+                    dic1.Add("nr_code", dt1.Rows[j]["nr_code"].ToString());
+                    tnode_1.Text = dt1.Rows[j]["nr_name"].ToString();
+                    if (!BadInf_2.ContainsKey(mbr_id))
+                        BadInf_2.Add(mbr_id, dic1);
+                    tnode_0.Nodes.Add(tnode_1);
+                }
+            }
+            try
+            {
+                if (bg_code.Text != "")
+                    BadCodeTree.Nodes[bg_code.Text].Expand();
+            }
+            catch (Exception) { }
+        }
+
+        private void RefreshTreeView_Click(object sender, EventArgs e)
+        {
+            LoadBadInfTree(sender, e);
+        }
+
+        private void RepairComplete_Click(object sender, EventArgs e)
+        {
+            if (ms_sncode.Text == "")
+            {
+                OperatResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                return;
+            }
+            if (ifrework != "0" && reworkstatus == "0")
+            {
+                if (dh.getRowCount("Makebad", "mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "' and mb_status=0") == 0)
+                {
+                    OperatResult.AppendText(">>维修必须维护不良代码\n", Color.Red);
+                    return;
+                }
+            }
+            //判断是否所有的不良信息都有维护不良原因
+            DataTable dt = (DataTable)dh.ExecuteSql("select mb_id,bc_name,mbr_mbid from makebad left join makebadreason on mbr_mbid=mb_id left join badcode on mb_badcode=bc_code where mb_sncode='" + ms_sncode.Text + "'  and mb_makecode='" + ms_makecode.Text + "' and mb_status=0", "select");
+            string ErrorMessage = "";
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (dt.Rows[i]["mb_id"].ToString() != dt.Rows[i]["mbr_mbid"].ToString())
+                    ErrorMessage += "【" + dt.Rows[i]["bc_name"].ToString() + "】";
+            }
+            if (ErrorMessage != "")
+            {
+                OperatResult.AppendText(">>" + ErrorMessage + "未维护不良原因\n", Color.Red);
+                return;
+            }
+            //如果岗位资源对应工序的版面不为空的时候
+            if (dh.getFieldDataByCondition("makeserial left join step on ms_stepcode=st_code", "st_table", "ms_id='" + msid + "'").ToString() != "")
+            {
+                if (!dh.CheckExist("makebadrsloc", "mbl_mbrid='" + mbr_id + "' and mbl_makecode='" + ms_makecode.Text + "' and mbl_sncode='" + GetSNCode.Text + "' "))
+                {
+                    OperatResult.AppendText(">>工序存在版面必须维护不良位置\n", Color.Red);
+                    return;
+                }
+            }
+            //查询拆解的物料
+            sql.Clear();
+            sql.Append("select distinct cm_soncode from craftmaterial left join product on pr_code=cm_fsoncode where cm_sncode in (select '" + firstsn + "' from dual union ");
+            sql.Append("select sn from makesnrelation where firstsn='" + firstsn + "') and nvl(pr_prodtype,' ')<>'包装物料' and cm_craftcode='" + cr_code.Text + "' and cm_makecode='" + ms_makecode.Text + "' and cm_status=-1 ");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            ////如果含有序列号物料有被拆解过
+            if (dt.Rows.Count > 0)
+            {
+                string soncode = "";
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    soncode += "'" + dt.Rows[i][0].ToString() + "',";
+                }
+                //查询对应的上料记录
+                sql.Clear();
+                sql.Append("select cm_soncode from craftmaterial left join product on pr_code=cm_fsoncode where cm_sncode in (select '" + firstsn + "' from dual union  select sn from ");
+                sql.Append(" makesnrelation where firstsn='" + firstsn + "')and nvl(pr_prodtype,' ')<>'包装物料' and  cm_status=0 and cm_soncode in (" + soncode.Substring(0, soncode.Length - 1) + ")");
+                DataTable LoadSoncode = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                //查询的结果不相等表示未完成上料
+                if (dt.Rows.Count != LoadSoncode.Rows.Count)
+                {
+                    for (int i = 0; i < LoadSoncode.Rows.Count; i++)
+                    {
+                        if (soncode.Contains(LoadSoncode.Rows[i][0].ToString()))
+                        {
+                            soncode = soncode.Replace(LoadSoncode.Rows[i][0].ToString(), "");
+                        }
+                    }
+                    OperatResult.AppendText(">>" + soncode.Replace("'", "") + "物料尚未备料,不允许回流\n", Color.Red);
+                    return;
+                }
+            }
+            dt = (DataTable)dh.ExecuteSql("select cr_id from craft where cr_statuscode='AUDITED' and cr_code='" + cr_code.Text + "'", "select");
+            if (dt.Rows.Count == 0)
+                OperatResult.AppendText(">>回流工序不存在\n", Color.Red);
+            else
+            {
+                string cr_id = dt.Rows[0]["cr_id"].ToString();
+                dt = (DataTable)dh.ExecuteSql("select cd_ifinput from craftdetail left join step on st_code=cd_stepcode where cd_crid='" + cr_id + "' and cd_stepcode='" + cd_stepcode.Text + "' and st_statuscode='AUDITED'", "select");
+                if (dt.Rows.Count == 0)
+                    OperatResult.AppendText(">>回流工序不在回流工艺中\n", Color.Red);
+                else
+                {
+                    dt = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0) ms_ifrework", "ms_paststep" }, "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'");
+                    List<string> SQLS = new List<string>();
+                    if (dt.Rows.Count > 0)
+                    {
+                        string ms_ifrework = dt.Rows[0]["ms_ifrework"].ToString();
+                        string ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
+                        //如果回流的执行过的工序为空
+                        if (!ms_paststep.Contains(cd_stepcode.Text) && ms_paststep != "")
+                        {
+                            OperatResult.AppendText(">>不允许回流到未执行的工序\n", Color.Red);
+                            return;
+                        }
+                        if (ms_ifrework == "0")
+                            SQLS.Add("update makeserial set ms_checkno='',ms_paststep = ms_paststep || case when instr(','||ms_paststep||',','" + User.CurrentStepCode + "')=0 then ','||'" + User.CurrentStepCode + "' end , ms_nextstepcode ='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_status=1,ms_qccheck=-1 where ms_id='" + msid + "'");
+                        else
+                            SQLS.Add("update makeserial set ms_checkno='',ms_paststep = ms_paststep || case when instr(','||ms_paststep||',','" + User.CurrentStepCode + "')=0 then ','||'" + User.CurrentStepCode + "' end , ms_nextstepcode ='" + cd_stepcode.Text + "',ms_craftcode='" + cr_code.Text + "',ms_stepcode='" + User.CurrentStepCode + "',ms_reworkstatus=1,ms_qccheck=-1 where ms_id='" + msid + "'");
+                    }
+                    SQLS.Add("update makebad set mb_status=-1 where (mb_sncode='" + ms_sncode.Text + "' or mb_mscode='" + ms_sncode.Text + "') and mb_makecode='" + ms_makecode.Text + "'");
+                    //取消最近拆解部件
+                    SQLS.Add("update craftmaterial set cm_lastdeco=0 where cm_sncode='" + ms_sncode.Text + "' and cm_makecode='" + ms_makecode.Text + "' and nvl(cm_lastdeco,0)<>0");
+                    // SQLS.Add("update MakeBadCount set mbc_status=-1 where mbc_sncode='" + ms_sncode.Text + "'");
+                    dh.ExecuteSQLTran(SQLS.ToArray());
+                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "回流工序", "完成维修回流", User.UserCode);
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "回流工序", "完成维修回流", ms_sncode.Text, ms_checkno.Text);
+                    OperatResult.AppendText(">>序列号" + ms_sncode.Text + "回流成功\n", Color.Green);
+                    cd_stepcode.Enabled = true;
+                    BaseUtil.CleanForm(this);
+                    BadCodeTree.Nodes.Clear();
+                    GetSNCode.Clear();
+                    GetSNCode.Focus();
+                }
+            }
+        }
+
+        private void Scrap_Click(object sender, EventArgs e)
+        {
+            if (ms_sncode.Text != "")
+            {
+                //判断是否有无法维修的记录
+                int ScrapNum = int.Parse(dh.getFieldDataByCondition("makebadreason left join makebad on mb_id=mbr_mbid", "count(0) cn", "mb_sncode='" + ms_sncode.Text + "' and mb_status=0").ToString());
+                if (ScrapNum == 0)
+                    OperatResult.AppendText(">>" + ms_sncode.Text + "报废必须维护不良原因\n", Color.Red);
+                else
+                {
+                    string confirm = MessageBox.Show(this.ParentForm, "此操作不可撤销,是否确认报废", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk).ToString();
+                    if (confirm == "Yes")
+                    {
+                        DataTable dt = dh.getFieldsDataByCondition("makeserial", new string[] { "nvl(ms_ifrework,0)ms_ifrework", "ms_reworkcode" }, "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'");
+                        if (dt.Rows.Count > 0)
+                        {
+                            string ms_ifrework = dt.Rows[0]["ms_ifrework"].ToString();
+                            string reworkcode = dt.Rows[0]["ms_reworkcode"].ToString();
+                            if (ms_ifrework == "0")
+                            {
+                                dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + User.CurrentStepCode + "',ms_status=4,ms_nextstepcode='',ms_stepcode='" + User.CurrentStepCode + "'", "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'");
+                            }
+                            else
+                            {
+                                sqls.Clear();
+                                sqls.Add("update makeserial set ms_paststep = ms_paststep ||'," + User.CurrentStepCode + "',ms_status=4,ms_reworkstatus= 4,ms_nextstepcode='',ms_stepcode='" + User.CurrentStepCode + "' where ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'");
+                                sqls.Add("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-1 where ob_checkno='" + ms_reworkcheckno.Text + "'");
+                                sqls.Add("delete from oqcbatchdetail where obd_sncode='" + ms_sncode.Text + "' and obd_checkno='" + ms_reworkcheckno.Text + "'");
+                                sqls.Add("update ReworkDetail set rd_rwstatus='报废' where rd_reid=(select re_id from rework where re_code='" + reworkcode + "') and rd_sncode='" + reworkcode + "'");
+                                dh.ExecuteSQLTran(sqls.ToArray());
+                            }
+                        }
+                        dh.UpdateByCondition("makecraftdetail", "mcd_inqty=mcd_inqty-1,mcd_outqty=mcd_outqty-1", "mcd_macode='" + ms_makecode.Text + "' and mcd_stepcode='" + ms_stepcode + "'");
+                        dh.UpdateByCondition("make", "MA_NGMADEQTY=nvl(MA_NGMADEQTY,0)+1", "ma_code='" + macode + "'");
+                        LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "报废", "序列号报废", User.UserCode);
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "报废", "序列号报废", ms_sncode.Text, ms_checkno.Text);
+                        OperatResult.AppendText(">>报废成功\n", Color.Green);
+                        GetSNCode.Clear();
+                        BaseUtil.CleanForm(this);
+                        BadCodeTree.Nodes.Clear();
+                    }
+                }
+            }
+            else OperatResult.AppendText(">>序列号不允许为空\n", Color.Red);
+        }
+
+        private void NewBadCode_Click(object sender, EventArgs e)
+        {
+            if (GetSNCode.Text == "" || macode == null || macode == "")
+            {
+                OperatResult.AppendText(">>序列号和工单号不允许为空\n", Color.Red);
+            }
+            else
+            {
+                Make_NewBadCode badcode = new Make_NewBadCode(GetSNCode.Text, macode);
+                badcode.FormClosed += LoadBadInfTree;
+                BaseUtil.SetFormCenter(badcode);
+                badcode.ShowDialog();
+            }
+        }
+
+        private void NewRepairInf_Click(object sender, EventArgs e)
+        {
+            if (bg_name.Text == "" && bc_name.Text == "")
+            {
+                OperatResult.AppendText(">>不良代码组和不良代码不能为空\n", Color.Red);
+            }
+            else
+            {
+                Make_NewMatainInf mataininf = new Make_NewMatainInf(bg_name.Text, bg_code.Text, bc_name.Text, bc_code.Text, GetSNCode.Text, msid, mb_id);
+                mataininf.FormClosed += LoadBadInfTree;
+                BaseUtil.SetFormCenter(mataininf);
+                mataininf.ShowDialog();
+            }
+        }
+
+        private void SaveRepairInf_Click(object sender, EventArgs e)
+        {
+            string ErrorMessage = "";
+            if (bg_name.Text == "" || bc_name.Text == "")
+            {
+                OperatResult.AppendText(">>不良代码组和不良代码不能为空\n", Color.Red);
+                return;
+            }
+            if (nrg_name.Text == "")
+                ErrorMessage += " 不良原因组 ";
+            if (nr_name.Text == "")
+                ErrorMessage += " 不良原因 ";
+            if (mbr_dutyname.Text == "")
+                ErrorMessage += " 责任别 ";
+            if (mbr_dutyname.Text == "物料问题" && mbc_component.Text == "")
+                ErrorMessage += "责任别为物料问题时必须选择不良零件";
+            if (ErrorMessage != "")
+            {
+                ErrorMessage += "不能为空";
+                OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                return;
+            }
+            string mbr_id = dh.GetSEQ("makebadreason_seq");
+            //存在不良组件进行提示
+            if (dh.CheckExist("makebadreason left join makebad on mbr_mbid=mb_id and mbr_sncode=mb_sncode", "mbr_badcode='" + bc_code.Text + "' and mbr_sncode='" + ms_sncode.Text + "' and mbr_brcode='" + nr_code.Text + "' and mb_status=0"))
+            {
+                OperatResult.AppendText(">>不良代码【" + bc_name.Text + "】已存在不良原因【" + nr_name.Text + "】\n", Color.Red);
+                return;
+            }
+            if (!dh.CheckExist("QUA_NGREASONGROUP", "nrg_name='" + nrg_name.Text + "'"))
+            {
+                OperatResult.AppendText(">>不良原因组不存在\n", Color.Red);
+                return;
+            }
+            if (!dh.CheckExist("QUA_NGReason", "nr_name='" + nr_name.Text + "'"))
+            {
+                OperatResult.AppendText(">>不良原因不存在\n", Color.Red);
+                return;
+            }
+            if (!dh.CheckExist("ngduty", "nd_name='" + mbr_dutyname.Text + "'"))
+            {
+                OperatResult.AppendText(">>责任别不存在\n", Color.Red);
+                return;
+            }
+            if (!dh.CheckExist("solution", "so_name='" + so_name.Text + "'"))
+            {
+                OperatResult.AppendText(">>解决方案不存在\n", Color.Red);
+                return;
+            }
+
+            //保存选择记录至后台,根据岗位资源代码记录
+
+            dh.ExecuteSql("merge into DATAINPUTRECORD using (select NRG_NAME  from QUA_NGREASONGROUP where NRG_NAME = '" + nrg_name.Text + "') ON (NRG_NAME = DIR_COMMENT AND DIR_GROUP = '不良原因组' and DIR_SOURCECODE = '" + User.UserSourceCode + "') when matched then update set DIR_NUMBER = DIR_NUMBER +1 when not matched then insert (DIR_COMMENT,DIR_NUMBER,DIR_SOURCECODE,DIR_GROUP) VALUES (NRG_NAME,1,'" + User.UserSourceCode + "','不良原因组')", "select");
+            dh.ExecuteSql("merge into DATAINPUTRECORD using (select nr_name  from QUA_NGReason left join QUA_NGREASONGROUPDET on nrgd_nrcode=nr_code left join QUA_NGREASONGROUP on nrgd_nrgid=nrg_id where nr_name = '" + nr_name.Text + "' and NRG_NAME = '" + nrg_name.Text + "') ON (nr_name = DIR_COMMENT AND DIR_GROUP = '不良原因' and DIR_SOURCECODE = '" + User.UserSourceCode + "') when matched then update set DIR_NUMBER = DIR_NUMBER +1 when not matched then insert (DIR_COMMENT,DIR_NUMBER,DIR_SOURCECODE,DIR_GROUP) VALUES (nr_name,1,'" + User.UserSourceCode + "','不良原因')", "select");
+            dh.ExecuteSql("merge into DATAINPUTRECORD using (select nd_name  from ngduty where nd_name = '" + mbr_dutyname.Text + "') ON (nd_name = DIR_COMMENT AND DIR_GROUP = '责任别' and DIR_SOURCECODE = '" + User.UserSourceCode + "') when matched then update set DIR_NUMBER = DIR_NUMBER +1 when not matched then insert (DIR_COMMENT,DIR_NUMBER,DIR_SOURCECODE,DIR_GROUP) VALUES (nd_name,1,'" + User.UserSourceCode + "','责任别')", "select");
+            dh.ExecuteSql("merge into DATAINPUTRECORD using (select so_name  from solution where so_name = '" + so_name.Text + "') ON (so_name = DIR_COMMENT AND DIR_GROUP = '解决方案' and DIR_SOURCECODE = '" + User.UserSourceCode + "') when matched then update set DIR_NUMBER = DIR_NUMBER +1 when not matched then insert (DIR_COMMENT,DIR_NUMBER,DIR_SOURCECODE,DIR_GROUP) VALUES (so_name,1,'" + User.UserSourceCode + "','解决方案')", "select");
+
+
+            //保存不良原因
+            sql.Clear();
+            sql.Append("insert into makebadreason (mbr_mbid,mbr_id,mbr_brcode,mbr_solutioncode,");
+            sql.Append("mbr_dutycode,mbr_brgcode,mbr_badcode,mbr_sncode,mbr_makecode,mbr_indate,");
+            sql.Append("mbr_inman,mbr_brname,mbr_solutionname,mbr_badname,mbr_brgname,mbr_dutyname,mbr_remark) select '" + mb_id + "','" + mbr_id + "','" + nr_code.Text + "',");
+            sql.Append("'" + so_code.Text + "','" + mbr_dutyname.Text + "','" + nrg_code.Text + "','" + bc_code.Text + "',");
+            sql.Append("'" + ms_sncode.Text + "','" + ms_makecode.Text + "',sysdate,'" + User.UserCode + "','" + nr_name.Text + "','" + so_name.Text + "','" + bc_name.Text + "','" + nrg_name.Text + "','" + mbr_dutyname.Text + "','" + mb_badremark.Text + "' from dual");
+            dh.ExecuteSql(sql.GetString(), "insert");
+            if (mbc_component.Text != "")
+            {
+                sql.Clear();
+                sql.Append("insert into makebadrscom (mbc_id,mbc_mbrid,mbc_component,mbc_badcode,");
+                sql.Append("mbc_brcode,mbc_sncode,mbc_makecode,mbc_indate,mbc_inman ) values ");
+                sql.Append("(makebadrscom_seq.nextval,'" + mbr_id + "' ,'" + mbc_component.Text + "',");
+                sql.Append("'" + bc_code.Text + "','" + nr_code.Text + "','" + ms_sncode.Text + "','" + ms_makecode.Text + "',sysdate,'" + User.UserCode + "')");
+                dh.ExecuteSql(sql.GetString(), "insert");
+            }
+            OperatResult.AppendText(">>不良原因保存成功\n", Color.Green);
+            SaveRepairInf.Enabled = false;
+            LoadBadInfTree(sender, e);
+        }
+
+        private void DeleteRepairInf_Click(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
+            if (dt.Rows.Count > 0)
+            {
+                if (mbr_id != "")
+                {
+                    string delete1 = "delete from makebadrsloc where mbl_mbrid='" + mbr_id + "'";
+                    string delete2 = "delete from makebadrspart where mbp_mbrid='" + mbr_id + "'";
+                    string delete3 = "delete from makebadrscom where mbc_mbrid='" + mbr_id + "'";
+                    string delete4 = "delete from makebadreason where mbr_id='" + mbr_id + "'";
+                    dh.ExecuteSQLTran(delete1, delete2, delete3, delete4);
+                    OperatResult.AppendText(">>删除成功\n", Color.Green);
+                    BaseUtil.CleanControlsText(bc_name, bc_code, bg_name, bg_code, mb_badremark, nrg_name, nrg_code, nr_name, nr_code, so_name, so_code, mbr_dutyname, mbr_dutycode, mbc_component);
+                    mbp_partdgv.DataSource = null;
+                    mbl_locdgv.DataSource = null;
+                    mbr_id = "";
+                    //删除后重新加载Tree的信息
+                    LoadBadInfTree(sender, e);
+                }
+                else OperatResult.AppendText(">>必须选择不良原因\n", Color.Red);
+            }
+            else OperatResult.AppendText(">>" + GetSNCode.Text + "序列号错误,不存在或者不处于维修状态\n", Color.Red);
+        }
+
+        private void SaveBadLocation_Click(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
+            if (dt.Rows.Count > 0)
+            {
+                if (mbl_loc.Text != "")
+                {
+                    if (mbr_id != "")
+                    {
+                        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("with temp1 as (select bd_soncode,bd_location from bomdetail,bom where bo_id=bd_bomid ");
+                            sql.Append(" start with bo_mothercode='" + ms_prodcode.Text + "' connect by bo_mothercode= prior bd_soncode) ");
+                            sql.Append("select bd_soncode from temp1 where instr(','||bd_location||',','," + mbl_loc.Text.ToUpper() + ",')>0");
+                            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);
+                                mbl_loc.Clear();
+                            }
+                        }
+                        else OperatResult.AppendText(">>已存在该不良位置\n", Color.Red);
+                    }
+                    else OperatResult.AppendText(">>请先选择不良原因\n", Color.Red);
+                }
+                else OperatResult.AppendText(">>不良位置不能为空\n", Color.Red);
+            }
+            else OperatResult.AppendText(">>" + GetSNCode.Text + "序列号错误,不存在或者不处于维修状态\n", Color.Red);
+        }
+
+        private void nr_name_TextChanged(object sender, EventArgs e)
+        {
+            if (nr_name.Text == "")
+                SaveBadLocation.Enabled = false;
+            else
+                SaveBadLocation.Enabled = true;
+        }
+
+        private void mbl_loc_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+                SaveBadLocation_Click(sender, e);
+        }
+
+        private void prodcode_TextKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (bd_soncode.Text != "")
+                {
+                    if (mbr_id != "")
+                    {
+                        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 + ",'" + bd_soncode.Text + "',");
+                        sql.Append("'" + bc_code.Text + "','" + nr_code.Text + "','" + GetSNCode.Text + "','" + macode + "',");
+                        sql.Append("sysdate,'" + User.UserCode + "' from dual");
+                        dh.ExecuteSql(sql.GetString(), "insert");
+                        DataTable 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);
+            }
+        }
+
+        private void cr_code_UserControlTextChanged(object sender, EventArgs e)
+        {
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+        }
+
+        private void Clean_Click(object sender, EventArgs e)
+        {
+            OperatResult.Clear();
+        }
+
+        private void mbl_locdgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.RowIndex >= 0)
+            {
+                if (mbl_locdgv.Columns[e.ColumnIndex].Name == "DeletePos")
+                {
+                    dh.ExecuteSql("delete from makebadrsloc where mbl_id='" + mbl_locdgv.Rows[e.RowIndex].Cells["mbl_id"].Value.ToString() + "'", "insert");
+                    dt = (DataTable)dh.ExecuteSql("select mbl_id,mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
+                    BaseUtil.FillDgvWithDataTable(mbl_locdgv, dt);
+                }
+            }
+        }
+
+        private void mbp_partdgv_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.RowIndex >= 0)
+            {
+                if (mbp_partdgv.Columns[e.ColumnIndex].Name == "DeleteCom")
+                {
+                    dh.ExecuteSql("delete from makebadrspart where mbp_id='" + mbp_partdgv.Rows[e.RowIndex].Cells["mbp_id"].Value.ToString() + "'", "insert");
+                    DataTable dt = (DataTable)dh.ExecuteSql("select mbp_id,mbp_part from makebadrspart where mbp_mbrid=" + mbr_id, "select");
+                    BaseUtil.FillDgvWithDataTable(mbp_partdgv, dt);
+                }
+            }
+        }
+
+        private void Make_Repair_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            dh.Dispose();
+        }
+
+        private void ms_prodcode_TextChanged(object sender, EventArgs e)
+        {
+            if (ms_prodcode.Text != "")
+                cr_code.Condition = "cr_prodcode='" + ms_prodcode.Text + "'";
+            else
+                cr_code.Condition = "";
+            bd_soncode.Condition = "bd_mothercode='" + ms_prodcode.Text + "' and NVL(bd_usestatus,' ')<>'DISABLE'";
+            //设置工序的条件
+            cd_stepcode.Condition = "ST_STATUSCODE='AUDITED' and cr_code='" + cr_code.Text + "' and cr_prodcode='" + ms_prodcode.Text + "' order by cd_stepno";
+        }
+
+        public void RefreshData()
+        {
+            GetSNCode_KeyDown(new object(), new KeyEventArgs(Keys.Enter));
+        }
+
+        private void nr_name_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (nr_name.Text != "")
+            {
+                SaveBadLocation.Enabled = true;
+                if (nrg_name.Text == "")
+                {
+                    OperatResult.AppendText(">>请先填写不良代码组\n", Color.Red);
+                    nr_name.Text = "";
+                }
+                else
+                {
+                    if (nr_code.Text == "" || (nr_code.Text != "" && nr_code.Text != nr_name.Value))
+                        nr_code.Text = nr_name.Value;
+                }
+            }
+            else SaveBadLocation.Enabled = false;
+        }
+
+        private void nrg_name_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (nrg_code.Text == "" || (nrg_code.Text != "" && nrg_code.Text != nrg_name.Value))
+                nrg_code.Text = nrg_name.Value;
+            nr_name.Condition = "nrg_code in('" + (nrg_code.Text == "" ? "''" : nrg_code.Text) + "')";
+        }
+
+        private void mbr_dutyname_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (mbr_dutycode.Text == "" || (mbr_dutycode.Text != "" && mbr_dutycode.Text != mbr_dutyname.Value))
+                mbr_dutycode.Text = mbr_dutyname.Value;
+        }
+
+        private void mbc_component_UserControlTextChanged(object sender, EventArgs e)
+        {
+
+        }
+
+        private void so_name_UserControlTextChanged(object sender, EventArgs e)
+        {
+            if (so_code.Text == "" || (so_code.Text != "" && so_code.Text != so_name.Value))
+                so_code.Text = so_name.Value;
+        }
+
+        private void BadCodeTree_AfterSelect(object sender, TreeViewEventArgs e)
+        {
+            if (e.Node.Level == 0)
+            {
+                mb_id = e.Node.Tag.ToString();
+                BaseUtil.CleanControlsText(bc_name, bc_code, bg_name, bg_code, mb_badremark, nrg_name, nrg_code, nr_name, nr_code, so_name, so_code, mbr_dutyname, mbr_dutycode, mbc_component);
+                mbl_locdgv.DataSource = null;
+                mbp_partdgv.DataSource = null;
+                bc_name.Text = BadInf_1[mb_id]["bc_name"];
+                bc_code.Text = BadInf_1[mb_id]["mb_badcode"];
+                bg_name.Text = BadInf_1[mb_id]["bg_name"];
+                bg_code.Text = BadInf_1[mb_id]["mb_bgcode"];
+                mb_badremark.Text = BadInf_1[mb_id]["mb_badremark"];
+                mbr_id = "";
+                SaveRepairInf.Enabled = true;
+            }
+            if (e.Node.Level == 1)
+            {
+                //展示父节点信息
+                mb_id = e.Node.Parent.Tag.ToString();
+                bc_code.Text = BadInf_1[mb_id]["mb_badcode"];
+                bc_name.Text = BadInf_1[mb_id]["bc_name"];
+                bg_code.Text = BadInf_1[mb_id]["mb_bgcode"];
+                bg_name.Text = BadInf_1[mb_id]["bg_name"];
+                //展示子节点信息
+                mbr_id = e.Node.Tag.ToString();
+                nrg_code.Text = BadInf_2[mbr_id]["nrg_code"];
+                nrg_name.Text = BadInf_2[mbr_id]["nrg_name"];
+                nr_code.Text = BadInf_2[mbr_id]["nr_code"];
+                nr_name.Text = BadInf_2[mbr_id]["nr_name"];
+                so_code.Text = BadInf_2[mbr_id]["so_code"];
+                so_name.Text = BadInf_2[mbr_id]["so_name"];
+                mbr_dutycode.Text = BadInf_2[mbr_id]["mbr_dutycode"];
+                mbr_dutyname.Text = BadInf_2[mbr_id]["mbr_dutyname"];
+                mbc_component.Text = dh.getFieldDataByCondition("makebadrscom", "mbc_component", "mbc_mbrid=" + mbr_id).ToString();
+                //加载两个Grid的数据源
+                DataTable dt = (DataTable)dh.ExecuteSql("select mbp_id,mbp_part from makebadrspart where mbp_mbrid=" + mbr_id, "select");
+                BaseUtil.FillDgvWithDataTable(mbp_partdgv, dt);
+                dt = (DataTable)dh.ExecuteSql("select mbl_id,mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
+                BaseUtil.FillDgvWithDataTable(mbl_locdgv, dt);
+                SaveRepairInf.Enabled = false;
+            }
+        }
+    }
+}

+ 446 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_Repair67F.resx

@@ -0,0 +1,446 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="LocationSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="ComponentSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>190, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="RepairComplete.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="RepairComplete.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="RepairComplete.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Scrap.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Scrap.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Scrap.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DeletePos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="NewRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="NewRepairInf.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="NewRepairInf.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="SaveRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="SaveRepairInf.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="SaveRepairInf.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteRepairInf.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="DeleteRepairInf.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Clean.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Clean.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="NewBadCode.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="NewBadCode.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="NewBadCode.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="SaveBadLocation.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="SaveBadLocation.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="SaveBadLocation.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>42</value>
+  </metadata>
+</root>

+ 9 - 0
UAS_MES_YDCY/UAS_MES_YDCY.csproj

@@ -598,6 +598,12 @@
     <Compile Include="FunctionCode\Make\Make_FuselageLabelPrintNext.Designer.cs">
       <DependentUpon>Make_FuselageLabelPrintNext.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_Repair67F.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_Repair67F.Designer.cs">
+      <DependentUpon>Make_Repair67F.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_SNLabelCheckFuge.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1704,6 +1710,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_FuselageLabelPrintNext.resx">
       <DependentUpon>Make_FuselageLabelPrintNext.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_Repair67F.resx">
+      <DependentUpon>Make_Repair67F.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SNLabelCheckFuge.resx">
       <DependentUpon>Make_SNLabelCheckFuge.cs</DependentUpon>
     </EmbeddedResource>