Sfoglia il codice sorgente

修改页面打开标识,保证某些页面只能打开一次,使用相同窗体的不同功能模块不受影响

章政 8 anni fa
parent
commit
c62a7af6c4

+ 4 - 4
UAS-MES/CustomControl/AccordionMenu/AccordionMenu.cs

@@ -283,16 +283,16 @@ namespace UAS_MES.CustomControl.AccordionMenu
             //用Tag保存Caller
             //用Tag保存Caller
             OpenForm.Tag = item.ToolTipText;
             OpenForm.Tag = item.ToolTipText;
             TabControl tc = (TabControl)this.Parent.Parent.Controls["MainTabControl"];
             TabControl tc = (TabControl)this.Parent.Parent.Controls["MainTabControl"];
-            //如果窗体不存在进行打开
-            if (!OpenedFormName.ContainsKey("UAS_MES." + item.Text))
+            //如果窗体不存在进行打开,item.ToolTip是Caller
+            if (!OpenedFormName.ContainsKey(item.ToolTipText))
             {
             {
-                TabPage tb = new TabPage { Name = "UAS_MES." + item.Tag, Text = OpenForm.Text };
+                TabPage tb = new TabPage { Name = "UAS_MES." + item.Tag, Tag= item.ToolTipText, Text = OpenForm.Text };
                 OpenForm.TopLevel = false;
                 OpenForm.TopLevel = false;
                 tc.TabPages.Add(tb);
                 tc.TabPages.Add(tb);
                 //直接选中新打开的界面
                 //直接选中新打开的界面
                 tc.SelectedTab = tb;
                 tc.SelectedTab = tb;
                 tb.Controls.Add(OpenForm);
                 tb.Controls.Add(OpenForm);
-                OpenedFormName.Add("UAS_MES." + item.Text, WinIndex);
+                OpenedFormName.Add(item.ToolTipText, WinIndex);
                 tc.TabIndex = WinIndex;
                 tc.TabIndex = WinIndex;
                 WinIndex++;
                 WinIndex++;
                 OpenForm.WindowState = FormWindowState.Maximized;
                 OpenForm.WindowState = FormWindowState.Maximized;

+ 10 - 1
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -209,6 +209,10 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             }
             }
         }
         }
         #endregion
         #endregion
+        //DBFind赋值后触发的委托
+        public delegate void AfterDBFind(object sender, EventArgs e);
+        //事件
+        public event AfterDBFind AfterDbFind;
 
 
         #region 自定义事件
         #region 自定义事件
         public delegate void OnTextChange(object sender, EventArgs e);
         public delegate void OnTextChange(object sender, EventArgs e);
@@ -235,7 +239,6 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             UserControlTextChanged?.Invoke(sender, new EventArgs());
             UserControlTextChanged?.Invoke(sender, new EventArgs());
         }
         }
 
 
-
         //Key先发起失去焦点事件,在执行用户自定义的事件
         //Key先发起失去焦点事件,在执行用户自定义的事件
         private void TextBox_KeyDown(object sender, KeyEventArgs e)
         private void TextBox_KeyDown(object sender, KeyEventArgs e)
         {
         {
@@ -245,6 +248,11 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             }
             }
         }
         }
 
 
+        public void AfterDBFindSetValue(object sender, EventArgs e)
+        {
+            AfterDbFind?.Invoke(sender, new EventArgs());
+        }
+
         public void SetLockCheckBox(CheckBox ctl)
         public void SetLockCheckBox(CheckBox ctl)
         {
         {
             LockCheckBox = ctl;
             LockCheckBox = ctl;
@@ -291,6 +299,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
                     LeaveFindData = false;
                     LeaveFindData = false;
                 //不允许工单号为空的情况
                 //不允许工单号为空的情况
                 LockCheckBox.Checked = true;
                 LockCheckBox.Checked = true;
+                AfterDBFindSetValue(new object(),new EventArgs());
             }
             }
         }
         }
 
 

+ 17 - 2
UAS-MES/DbFind.cs

@@ -33,6 +33,8 @@ namespace UAS_MES
 
 
         string Condition = "";
         string Condition = "";
 
 
+        Control MainControl;
+
         public bool SuccessReturnData = false;
         public bool SuccessReturnData = false;
 
 
         int ScrollNewValue = 0;
         int ScrollNewValue = 0;
@@ -194,11 +196,19 @@ namespace UAS_MES
                         {
                         {
                             Control ctl = fmCollection[FormName].Controls[SetValueField[j]];
                             Control ctl = fmCollection[FormName].Controls[SetValueField[j]];
                             if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ctl != null && ctl.Tag != null && ctl.Tag.ToString() == dt.Columns[i].Caption))
                             if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ctl != null && ctl.Tag != null && ctl.Tag.ToString() == dt.Columns[i].Caption))
-                                fmCollection[FormName].Controls[SetValueField[j]].Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
+                                ctl.Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
                         }
                         }
                     }
                     }
                 }
                 }
-                fmCollection[FormName].Controls[MainField].Focus();
+                //发起DBFind的控件
+                MainControl = fmCollection[FormName].Controls[MainField];
+                MainControl.Focus();
+                if (MainControl is MaCodeSearchTextBox)
+                {
+                    MaCodeSearchTextBox ctl = (MainControl as MaCodeSearchTextBox);
+                    ctl.AfterDbFind += DbFind_AfterDbFind;
+                    ctl.AfterDBFindSetValue(new object(), new EventArgs());
+                }
             }
             }
             catch (Exception exa)
             catch (Exception exa)
             {
             {
@@ -208,6 +218,11 @@ namespace UAS_MES
             Close();
             Close();
         }
         }
 
 
+        private void DbFind_AfterDbFind(object sender, EventArgs e)
+        {
+            MainControl.Text = "";
+        }
+
         //按下Esc键的时候关闭当前的界面,用于DbFind
         //按下Esc键的时候关闭当前的界面,用于DbFind
         private void DbFindGridView_KeyPress(object sender, KeyPressEventArgs e)
         private void DbFindGridView_KeyPress(object sender, KeyPressEventArgs e)
         {
         {

+ 8 - 8
UAS-MES/FunctionCode/Employee/Employee_Group.cs

@@ -98,12 +98,13 @@ namespace UAS_MES.Employee
         {
         {
             if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
             if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
             {
             {
-                if (UserGroupDGV.Columns[e.ColumnIndex].Name == "UserSetting")
+                string CallerUser = "Employee!Data";
+                string CallerPower = "Employee!Power";
+                if (UserGroupDGV.Columns[e.ColumnIndex].Name == "UserSetting" && !AccordionMenu.OpenedFormName.ContainsKey(CallerUser))
                 {
                 {
+                    AccordionMenu.OpenedFormName.Add(CallerUser, 101);
                     TabControl tc = (TabControl)this.Parent.Parent;
                     TabControl tc = (TabControl)this.Parent.Parent;
-                    //如果窗体不存在进行打开
-                    string WinPath = "UAS_MES.人员管理.人员选择";
-                    TabPage tb = new TabPage { Name = WinPath, Text = "人员查看" };
+                    TabPage tb = new TabPage { Name = CallerUser, Text = "人员查看" };
                     tc.TabPages.Add(tb);
                     tc.TabPages.Add(tb);
                     string ug_code = UserGroupDGV.Rows[e.RowIndex].Cells["ug_code"].Value.ToString();
                     string ug_code = UserGroupDGV.Rows[e.RowIndex].Cells["ug_code"].Value.ToString();
                     string ug_name = UserGroupDGV.Rows[e.RowIndex].Cells["ug_name"].Value.ToString();
                     string ug_name = UserGroupDGV.Rows[e.RowIndex].Cells["ug_name"].Value.ToString();
@@ -114,12 +115,12 @@ namespace UAS_MES.Employee
                     NewUser.WindowState = FormWindowState.Maximized;
                     NewUser.WindowState = FormWindowState.Maximized;
                     NewUser.Show();
                     NewUser.Show();
                 }
                 }
-                else if (UserGroupDGV.Columns[e.ColumnIndex].Name == "PowerSetting")
+                else if (UserGroupDGV.Columns[e.ColumnIndex].Name == "PowerSetting" && !AccordionMenu.OpenedFormName.ContainsKey(CallerPower))
                 {
                 {
+                    AccordionMenu.OpenedFormName.Add(CallerPower, 101);
                     TabControl tc = (TabControl)this.Parent.Parent;
                     TabControl tc = (TabControl)this.Parent.Parent;
                     //如果窗体不存在进行打开
                     //如果窗体不存在进行打开
-                    string WinPath = "UAS_MES.人员管理.权限控制";
-                    TabPage tb = new TabPage { Name = WinPath, Text = "权限控制" };
+                    TabPage tb = new TabPage { Name = CallerPower, Text = "权限控制" };
                     tc.TabPages.Add(tb);
                     tc.TabPages.Add(tb);
                     string ug_code = UserGroupDGV.Rows[e.RowIndex].Cells["ug_code"].Value.ToString();
                     string ug_code = UserGroupDGV.Rows[e.RowIndex].Cells["ug_code"].Value.ToString();
                     string ug_name = UserGroupDGV.Rows[e.RowIndex].Cells["ug_name"].Value.ToString();
                     string ug_name = UserGroupDGV.Rows[e.RowIndex].Cells["ug_name"].Value.ToString();
@@ -129,7 +130,6 @@ namespace UAS_MES.Employee
                     tb.Controls.Add(NewPower);
                     tb.Controls.Add(NewPower);
                     NewPower.WindowState = FormWindowState.Maximized;
                     NewPower.WindowState = FormWindowState.Maximized;
                     NewPower.Show();
                     NewPower.Show();
-                    AccordionMenu.OpenedFormName.Add(WinPath, 101);
                 }
                 }
             }
             }
         }
         }

+ 381 - 359
UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         /// </summary>
         private void InitializeComponent()
         private void InitializeComponent()
         {
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_Repair));
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_Repair));
             this.panel2 = new System.Windows.Forms.Panel();
             this.panel2 = new System.Windows.Forms.Panel();
             this.label1 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
@@ -36,41 +37,44 @@
             this.ma_prodcode_label = new System.Windows.Forms.Label();
             this.ma_prodcode_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.label14 = new System.Windows.Forms.Label();
             this.label14 = new System.Windows.Forms.Label();
-            this.label12 = new System.Windows.Forms.Label();
-            this.label8 = new System.Windows.Forms.Label();
+            this.bc_name_label = new System.Windows.Forms.Label();
+            this.bg_name_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.mbr_brgcode_label = new System.Windows.Forms.Label();
             this.mbr_brgcode_label = new System.Windows.Forms.Label();
-            this.mbc_brcode_label = new System.Windows.Forms.Label();
-            this.nd_code_label = new System.Windows.Forms.Label();
-            this.label6 = new System.Windows.Forms.Label();
-            this.mbr_solutioncode_label = new System.Windows.Forms.Label();
-            this.mb_badlocation_label = new System.Windows.Forms.Label();
-            this.mb_soncode_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.panel1 = new System.Windows.Forms.Panel();
             this.panel1 = new System.Windows.Forms.Panel();
             this.GetSNCode_Label = new System.Windows.Forms.Label();
             this.GetSNCode_Label = new System.Windows.Forms.Label();
-            this.listView1 = new System.Windows.Forms.ListView();
-            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.listView2 = new System.Windows.Forms.ListView();
-            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.label2 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.panel3 = new System.Windows.Forms.Panel();
             this.panel3 = new System.Windows.Forms.Panel();
             this.BadCodeTree = new System.Windows.Forms.TreeView();
             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.mbp_partdgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
+            this.mbp_part1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mbl_locdgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
+            this.mbl_loc1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RefreshTreeView = new UAS_MES.CustomControl.ClickPicBox.ClickPicBox();
             this.GetSNCode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.GetSNCode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.NewRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.NewRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.SaveRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.SaveRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.DeleteRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.DeleteRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ChooseBadPart = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ChooseBadPart = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.mb_soncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.mb_badlocation = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.mbp_part = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.mbl_loc = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.mbr_solutioncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.mbr_solutioncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.enterTextBox6 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.nd_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.mbc_brcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.mbr_brgcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.enterTextBox2 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.enterTextBox1 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.bc_remark = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithTextArea();
+            this.mbc_component = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.mbr_dutycode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.nr_name = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.nrg_name = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.bc_name = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.bg_name = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.mb_badremark = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithTextArea();
             this.OperatResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.OperatResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ms_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ma_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
@@ -83,8 +87,11 @@
             this.SaveBadLocation = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.SaveBadLocation = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.RepairComplete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.RepairComplete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.RefreshTreeView = new UAS_MES.CustomControl.ClickPicBox.ClickPicBox();
             this.panel2.SuspendLayout();
             this.panel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
@@ -96,7 +103,7 @@
             this.panel2.Location = new System.Drawing.Point(0, 0);
             this.panel2.Location = new System.Drawing.Point(0, 0);
             this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1320, 36);
+            this.panel2.Size = new System.Drawing.Size(1353, 36);
             this.panel2.TabIndex = 32;
             this.panel2.TabIndex = 32;
             // 
             // 
             // label1
             // label1
@@ -109,7 +116,7 @@
             this.label1.Name = "label1";
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 0;
             this.label1.TabIndex = 0;
-            this.label1.Text = "维修作业";
+            this.label1.Text = "工单信息";
             // 
             // 
             // ma_craftcode_label
             // ma_craftcode_label
             // 
             // 
@@ -167,35 +174,35 @@
             // 
             // 
             this.label14.AutoSize = true;
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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(963, 190);
+            this.label14.Location = new System.Drawing.Point(988, 192);
             this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label14.Name = "label14";
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(92, 27);
             this.label14.Size = new System.Drawing.Size(92, 27);
             this.label14.TabIndex = 46;
             this.label14.TabIndex = 46;
             this.label14.Text = "不良备注";
             this.label14.Text = "不良备注";
             // 
             // 
-            // label12
-            // 
-            this.label12.AutoSize = true;
-            this.label12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label12.ForeColor = System.Drawing.Color.Black;
-            this.label12.Location = new System.Drawing.Point(613, 190);
-            this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(132, 27);
-            this.label12.TabIndex = 44;
-            this.label12.Text = "不良代码名称";
-            // 
-            // label8
-            // 
-            this.label8.AutoSize = true;
-            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(247, 190);
-            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(152, 27);
-            this.label8.TabIndex = 40;
-            this.label8.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(611, 192);
+            this.bc_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bc_name_label.Name = "bc_name_label";
+            this.bc_name_label.Size = new System.Drawing.Size(92, 27);
+            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(234, 190);
+            this.bg_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.bg_name_label.Name = "bg_name_label";
+            this.bg_name_label.Size = new System.Drawing.Size(112, 27);
+            this.bg_name_label.TabIndex = 40;
+            this.bg_name_label.Text = "不良代码组";
             // 
             // 
             // ms_sncode_label
             // ms_sncode_label
             // 
             // 
@@ -228,91 +235,91 @@
             this.mbr_brgcode_label.AutoSize = true;
             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.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.ForeColor = System.Drawing.Color.Black;
-            this.mbr_brgcode_label.Location = new System.Drawing.Point(247, 246);
+            this.mbr_brgcode_label.Location = new System.Drawing.Point(234, 246);
             this.mbr_brgcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbr_brgcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mbr_brgcode_label.Name = "mbr_brgcode_label";
             this.mbr_brgcode_label.Name = "mbr_brgcode_label";
             this.mbr_brgcode_label.Size = new System.Drawing.Size(112, 27);
             this.mbr_brgcode_label.Size = new System.Drawing.Size(112, 27);
             this.mbr_brgcode_label.TabIndex = 93;
             this.mbr_brgcode_label.TabIndex = 93;
             this.mbr_brgcode_label.Text = "不良原因组";
             this.mbr_brgcode_label.Text = "不良原因组";
             // 
             // 
-            // mbc_brcode_label
-            // 
-            this.mbc_brcode_label.AutoSize = true;
-            this.mbc_brcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mbc_brcode_label.ForeColor = System.Drawing.Color.Black;
-            this.mbc_brcode_label.Location = new System.Drawing.Point(613, 243);
-            this.mbc_brcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mbc_brcode_label.Name = "mbc_brcode_label";
-            this.mbc_brcode_label.Size = new System.Drawing.Size(92, 27);
-            this.mbc_brcode_label.TabIndex = 95;
-            this.mbc_brcode_label.Text = "不良原因";
-            // 
-            // nd_code_label
-            // 
-            this.nd_code_label.AutoSize = true;
-            this.nd_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.nd_code_label.ForeColor = System.Drawing.Color.Black;
-            this.nd_code_label.Location = new System.Drawing.Point(963, 241);
-            this.nd_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.nd_code_label.Name = "nd_code_label";
-            this.nd_code_label.Size = new System.Drawing.Size(72, 27);
-            this.nd_code_label.TabIndex = 97;
-            this.nd_code_label.Text = "责任别";
-            // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.ForeColor = System.Drawing.Color.Black;
-            this.label6.Location = new System.Drawing.Point(247, 297);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(92, 27);
-            this.label6.TabIndex = 99;
-            this.label6.Text = "不良组件";
-            // 
-            // mbr_solutioncode_label
-            // 
-            this.mbr_solutioncode_label.AutoSize = true;
-            this.mbr_solutioncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mbr_solutioncode_label.ForeColor = System.Drawing.Color.Black;
-            this.mbr_solutioncode_label.Location = new System.Drawing.Point(613, 297);
-            this.mbr_solutioncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mbr_solutioncode_label.Name = "mbr_solutioncode_label";
-            this.mbr_solutioncode_label.Size = new System.Drawing.Size(92, 27);
-            this.mbr_solutioncode_label.TabIndex = 101;
-            this.mbr_solutioncode_label.Text = "解决方案";
-            // 
-            // mb_badlocation_label
-            // 
-            this.mb_badlocation_label.AutoSize = true;
-            this.mb_badlocation_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mb_badlocation_label.ForeColor = System.Drawing.Color.Black;
-            this.mb_badlocation_label.Location = new System.Drawing.Point(247, 372);
-            this.mb_badlocation_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mb_badlocation_label.Name = "mb_badlocation_label";
-            this.mb_badlocation_label.Size = new System.Drawing.Size(92, 27);
-            this.mb_badlocation_label.TabIndex = 103;
-            this.mb_badlocation_label.Text = "不良位置";
-            // 
-            // mb_soncode_label
-            // 
-            this.mb_soncode_label.AutoSize = true;
-            this.mb_soncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mb_soncode_label.ForeColor = System.Drawing.Color.Black;
-            this.mb_soncode_label.Location = new System.Drawing.Point(653, 373);
-            this.mb_soncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mb_soncode_label.Name = "mb_soncode_label";
-            this.mb_soncode_label.Size = new System.Drawing.Size(92, 27);
-            this.mb_soncode_label.TabIndex = 105;
-            this.mb_soncode_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(611, 245);
+            this.nr_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.nr_name_label.Name = "nr_name_label";
+            this.nr_name_label.Size = new System.Drawing.Size(92, 27);
+            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(988, 243);
+            this.mbr_dutycode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbr_dutycode_label.Name = "mbr_dutycode_label";
+            this.mbr_dutycode_label.Size = new System.Drawing.Size(72, 27);
+            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(234, 297);
+            this.mbc_component_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbc_component_label.Name = "mbc_component_label";
+            this.mbc_component_label.Size = new System.Drawing.Size(92, 27);
+            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(611, 299);
+            this.mbr_solution_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbr_solution_label.Name = "mbr_solution_label";
+            this.mbr_solution_label.Size = new System.Drawing.Size(92, 27);
+            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(234, 369);
+            this.mbl_loc_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbl_loc_label.Name = "mbl_loc_label";
+            this.mbl_loc_label.Size = new System.Drawing.Size(92, 27);
+            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(642, 372);
+            this.mbp_part_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mbp_part_label.Name = "mbp_part_label";
+            this.mbp_part_label.Size = new System.Drawing.Size(92, 27);
+            this.mbp_part_label.TabIndex = 105;
+            this.mbp_part_label.Text = "不良零件";
             // 
             // 
             // panel1
             // panel1
             // 
             // 
             this.panel1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.panel1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.panel1.Location = new System.Drawing.Point(220, 348);
+            this.panel1.Location = new System.Drawing.Point(217, 350);
             this.panel1.Name = "panel1";
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1098, 2);
+            this.panel1.Size = new System.Drawing.Size(1105, 2);
             this.panel1.TabIndex = 108;
             this.panel1.TabIndex = 108;
             // 
             // 
             // GetSNCode_Label
             // GetSNCode_Label
@@ -328,38 +335,6 @@
             this.GetSNCode_Label.TabIndex = 113;
             this.GetSNCode_Label.TabIndex = 113;
             this.GetSNCode_Label.Text = "序列号";
             this.GetSNCode_Label.Text = "序列号";
             // 
             // 
-            // listView1
-            // 
-            this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader1});
-            this.listView1.Location = new System.Drawing.Point(252, 420);
-            this.listView1.Name = "listView1";
-            this.listView1.Size = new System.Drawing.Size(351, 176);
-            this.listView1.TabIndex = 115;
-            this.listView1.UseCompatibleStateImageBehavior = false;
-            this.listView1.View = System.Windows.Forms.View.Details;
-            // 
-            // columnHeader1
-            // 
-            this.columnHeader1.Text = "已选不良位置";
-            this.columnHeader1.Width = 346;
-            // 
-            // listView2
-            // 
-            this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader2});
-            this.listView2.Location = new System.Drawing.Point(658, 420);
-            this.listView2.Name = "listView2";
-            this.listView2.Size = new System.Drawing.Size(351, 176);
-            this.listView2.TabIndex = 116;
-            this.listView2.UseCompatibleStateImageBehavior = false;
-            this.listView2.View = System.Windows.Forms.View.Details;
-            // 
-            // columnHeader2
-            // 
-            this.columnHeader2.Text = "已选不良零件";
-            this.columnHeader2.Width = 346;
-            // 
             // label2
             // label2
             // 
             // 
             this.label2.AutoSize = true;
             this.label2.AutoSize = true;
@@ -382,13 +357,63 @@
             // 
             // 
             // BadCodeTree
             // BadCodeTree
             // 
             // 
-            this.BadCodeTree.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            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(21, 192);
             this.BadCodeTree.Location = new System.Drawing.Point(21, 192);
             this.BadCodeTree.Name = "BadCodeTree";
             this.BadCodeTree.Name = "BadCodeTree";
-            this.BadCodeTree.Size = new System.Drawing.Size(193, 512);
+            this.BadCodeTree.Size = new System.Drawing.Size(193, 531);
             this.BadCodeTree.TabIndex = 118;
             this.BadCodeTree.TabIndex = 118;
             this.BadCodeTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.BadCodeTree_NodeMouseClick);
             this.BadCodeTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.BadCodeTree_NodeMouseClick);
             // 
             // 
+            // 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.mbp_partdgv.Location = new System.Drawing.Point(647, 419);
+            this.mbp_partdgv.Name = "mbp_partdgv";
+            this.mbp_partdgv.RowTemplate.Height = 27;
+            this.mbp_partdgv.Size = new System.Drawing.Size(360, 190);
+            this.mbp_partdgv.TabIndex = 121;
+            // 
+            // 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";
+            // 
+            // 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.mbl_locdgv.Location = new System.Drawing.Point(248, 419);
+            this.mbl_locdgv.Name = "mbl_locdgv";
+            this.mbl_locdgv.RowTemplate.Height = 27;
+            this.mbl_locdgv.Size = new System.Drawing.Size(360, 190);
+            this.mbl_locdgv.TabIndex = 120;
+            // 
+            // 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";
+            // 
+            // RefreshTreeView
+            // 
+            this.RefreshTreeView.AllPower = null;
+            this.RefreshTreeView.Image = global::UAS_MES.Properties.Resources.refresh;
+            this.RefreshTreeView.Location = new System.Drawing.Point(112, 158);
+            this.RefreshTreeView.Name = "RefreshTreeView";
+            this.RefreshTreeView.Power = null;
+            this.RefreshTreeView.Size = new System.Drawing.Size(27, 27);
+            this.RefreshTreeView.TabIndex = 119;
+            this.RefreshTreeView.TabStop = false;
+            this.RefreshTreeView.Click += new System.EventHandler(this.RefreshTreeView_Click);
+            // 
             // GetSNCode
             // GetSNCode
             // 
             // 
             this.GetSNCode.AllPower = null;
             this.GetSNCode.AllPower = null;
@@ -415,7 +440,7 @@
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.Image")));
             this.NewRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.Image")));
             this.NewRepairInf.IsShowBorder = true;
             this.NewRepairInf.IsShowBorder = true;
-            this.NewRepairInf.Location = new System.Drawing.Point(390, 619);
+            this.NewRepairInf.Location = new System.Drawing.Point(390, 631);
             this.NewRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.NewRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
             this.NewRepairInf.Name = "NewRepairInf";
@@ -435,7 +460,7 @@
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.Image")));
             this.SaveRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.Image")));
             this.SaveRepairInf.IsShowBorder = true;
             this.SaveRepairInf.IsShowBorder = true;
-            this.SaveRepairInf.Location = new System.Drawing.Point(530, 619);
+            this.SaveRepairInf.Location = new System.Drawing.Point(530, 631);
             this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
             this.SaveRepairInf.Name = "SaveRepairInf";
@@ -455,7 +480,7 @@
             this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
             this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
             this.DeleteRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.Image")));
             this.DeleteRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.Image")));
             this.DeleteRepairInf.IsShowBorder = true;
             this.DeleteRepairInf.IsShowBorder = true;
-            this.DeleteRepairInf.Location = new System.Drawing.Point(676, 619);
+            this.DeleteRepairInf.Location = new System.Drawing.Point(676, 631);
             this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
             this.DeleteRepairInf.Name = "DeleteRepairInf";
@@ -475,7 +500,7 @@
             this.ChooseBadPart.DownImage = ((System.Drawing.Image)(resources.GetObject("ChooseBadPart.DownImage")));
             this.ChooseBadPart.DownImage = ((System.Drawing.Image)(resources.GetObject("ChooseBadPart.DownImage")));
             this.ChooseBadPart.Image = ((System.Drawing.Image)(resources.GetObject("ChooseBadPart.Image")));
             this.ChooseBadPart.Image = ((System.Drawing.Image)(resources.GetObject("ChooseBadPart.Image")));
             this.ChooseBadPart.IsShowBorder = true;
             this.ChooseBadPart.IsShowBorder = true;
-            this.ChooseBadPart.Location = new System.Drawing.Point(948, 373);
+            this.ChooseBadPart.Location = new System.Drawing.Point(946, 372);
             this.ChooseBadPart.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseBadPart.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseBadPart.MoveImage = ((System.Drawing.Image)(resources.GetObject("ChooseBadPart.MoveImage")));
             this.ChooseBadPart.MoveImage = ((System.Drawing.Image)(resources.GetObject("ChooseBadPart.MoveImage")));
             this.ChooseBadPart.Name = "ChooseBadPart";
             this.ChooseBadPart.Name = "ChooseBadPart";
@@ -487,41 +512,41 @@
             this.ChooseBadPart.Text = "选择";
             this.ChooseBadPart.Text = "选择";
             this.ChooseBadPart.UseVisualStyleBackColor = true;
             this.ChooseBadPart.UseVisualStyleBackColor = true;
             // 
             // 
-            // mb_soncode
+            // mbp_part
             // 
             // 
-            this.mb_soncode.AllPower = null;
-            this.mb_soncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.mbp_part.AllPower = null;
+            this.mbp_part.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.mb_soncode.BackColor = System.Drawing.Color.White;
-            this.mb_soncode.ID = null;
-            this.mb_soncode.Location = new System.Drawing.Point(768, 375);
-            this.mb_soncode.Margin = new System.Windows.Forms.Padding(4);
-            this.mb_soncode.Name = "mb_soncode";
-            this.mb_soncode.Power = null;
-            this.mb_soncode.Size = new System.Drawing.Size(156, 25);
-            this.mb_soncode.Str = null;
-            this.mb_soncode.Str1 = null;
-            this.mb_soncode.Str2 = null;
-            this.mb_soncode.TabIndex = 106;
-            this.mb_soncode.Tag = "Read";
-            // 
-            // mb_badlocation
-            // 
-            this.mb_badlocation.AllPower = null;
-            this.mb_badlocation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.mbp_part.BackColor = System.Drawing.Color.White;
+            this.mbp_part.ID = null;
+            this.mbp_part.Location = new System.Drawing.Point(747, 374);
+            this.mbp_part.Margin = new System.Windows.Forms.Padding(4);
+            this.mbp_part.Name = "mbp_part";
+            this.mbp_part.Power = null;
+            this.mbp_part.Size = new System.Drawing.Size(187, 25);
+            this.mbp_part.Str = null;
+            this.mbp_part.Str1 = null;
+            this.mbp_part.Str2 = null;
+            this.mbp_part.TabIndex = 106;
+            this.mbp_part.Tag = "Read";
+            // 
+            // 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)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.mb_badlocation.BackColor = System.Drawing.Color.White;
-            this.mb_badlocation.ID = null;
-            this.mb_badlocation.Location = new System.Drawing.Point(367, 373);
-            this.mb_badlocation.Margin = new System.Windows.Forms.Padding(4);
-            this.mb_badlocation.Name = "mb_badlocation";
-            this.mb_badlocation.Power = null;
-            this.mb_badlocation.Size = new System.Drawing.Size(156, 25);
-            this.mb_badlocation.Str = null;
-            this.mb_badlocation.Str1 = null;
-            this.mb_badlocation.Str2 = null;
-            this.mb_badlocation.TabIndex = 104;
-            this.mb_badlocation.Tag = "Read";
+            this.mbl_loc.BackColor = System.Drawing.Color.White;
+            this.mbl_loc.ID = null;
+            this.mbl_loc.Location = new System.Drawing.Point(354, 374);
+            this.mbl_loc.Margin = new System.Windows.Forms.Padding(4);
+            this.mbl_loc.Name = "mbl_loc";
+            this.mbl_loc.Power = null;
+            this.mbl_loc.Size = new System.Drawing.Size(187, 25);
+            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";
             // 
             // 
             // mbr_solutioncode
             // mbr_solutioncode
             // 
             // 
@@ -530,7 +555,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbr_solutioncode.BackColor = System.Drawing.Color.White;
             this.mbr_solutioncode.BackColor = System.Drawing.Color.White;
             this.mbr_solutioncode.ID = null;
             this.mbr_solutioncode.ID = null;
-            this.mbr_solutioncode.Location = new System.Drawing.Point(736, 299);
+            this.mbr_solutioncode.Location = new System.Drawing.Point(747, 299);
             this.mbr_solutioncode.Margin = new System.Windows.Forms.Padding(4);
             this.mbr_solutioncode.Margin = new System.Windows.Forms.Padding(4);
             this.mbr_solutioncode.Name = "mbr_solutioncode";
             this.mbr_solutioncode.Name = "mbr_solutioncode";
             this.mbr_solutioncode.Power = null;
             this.mbr_solutioncode.Power = null;
@@ -541,129 +566,132 @@
             this.mbr_solutioncode.TabIndex = 102;
             this.mbr_solutioncode.TabIndex = 102;
             this.mbr_solutioncode.Tag = "Read";
             this.mbr_solutioncode.Tag = "Read";
             // 
             // 
-            // enterTextBox6
+            // mbc_component
             // 
             // 
-            this.enterTextBox6.AllPower = null;
-            this.enterTextBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.mbc_component.AllPower = null;
+            this.mbc_component.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.enterTextBox6.BackColor = System.Drawing.Color.White;
-            this.enterTextBox6.ID = null;
-            this.enterTextBox6.Location = new System.Drawing.Point(383, 299);
-            this.enterTextBox6.Margin = new System.Windows.Forms.Padding(4);
-            this.enterTextBox6.Name = "enterTextBox6";
-            this.enterTextBox6.Power = null;
-            this.enterTextBox6.Size = new System.Drawing.Size(187, 25);
-            this.enterTextBox6.Str = null;
-            this.enterTextBox6.Str1 = null;
-            this.enterTextBox6.Str2 = null;
-            this.enterTextBox6.TabIndex = 100;
-            this.enterTextBox6.Tag = "Read";
-            // 
-            // nd_code
-            // 
-            this.nd_code.AllPower = null;
-            this.nd_code.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.mbc_component.BackColor = System.Drawing.Color.White;
+            this.mbc_component.ID = null;
+            this.mbc_component.Location = new System.Drawing.Point(354, 299);
+            this.mbc_component.Margin = new System.Windows.Forms.Padding(4);
+            this.mbc_component.Name = "mbc_component";
+            this.mbc_component.Power = null;
+            this.mbc_component.Size = new System.Drawing.Size(187, 25);
+            this.mbc_component.Str = null;
+            this.mbc_component.Str1 = null;
+            this.mbc_component.Str2 = null;
+            this.mbc_component.TabIndex = 100;
+            this.mbc_component.Tag = "Read";
+            // 
+            // mbr_dutycode
+            // 
+            this.mbr_dutycode.AllPower = null;
+            this.mbr_dutycode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.nd_code.BackColor = System.Drawing.Color.White;
-            this.nd_code.ID = null;
-            this.nd_code.Location = new System.Drawing.Point(1069, 246);
-            this.nd_code.Margin = new System.Windows.Forms.Padding(4);
-            this.nd_code.Name = "nd_code";
-            this.nd_code.Power = null;
-            this.nd_code.Size = new System.Drawing.Size(187, 25);
-            this.nd_code.Str = null;
-            this.nd_code.Str1 = null;
-            this.nd_code.Str2 = null;
-            this.nd_code.TabIndex = 98;
-            this.nd_code.Tag = "Read";
-            // 
-            // mbc_brcode
-            // 
-            this.mbc_brcode.AllPower = null;
-            this.mbc_brcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.mbr_dutycode.BackColor = System.Drawing.Color.White;
+            this.mbr_dutycode.ID = null;
+            this.mbr_dutycode.Location = new System.Drawing.Point(1094, 248);
+            this.mbr_dutycode.Margin = new System.Windows.Forms.Padding(4);
+            this.mbr_dutycode.Name = "mbr_dutycode";
+            this.mbr_dutycode.Power = null;
+            this.mbr_dutycode.Size = new System.Drawing.Size(187, 25);
+            this.mbr_dutycode.Str = null;
+            this.mbr_dutycode.Str1 = null;
+            this.mbr_dutycode.Str2 = null;
+            this.mbr_dutycode.TabIndex = 98;
+            this.mbr_dutycode.Tag = "Read";
+            // 
+            // nr_name
+            // 
+            this.nr_name.AllPower = null;
+            this.nr_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.mbc_brcode.BackColor = System.Drawing.Color.White;
-            this.mbc_brcode.ID = null;
-            this.mbc_brcode.Location = new System.Drawing.Point(736, 245);
-            this.mbc_brcode.Margin = new System.Windows.Forms.Padding(4);
-            this.mbc_brcode.Name = "mbc_brcode";
-            this.mbc_brcode.Power = null;
-            this.mbc_brcode.Size = new System.Drawing.Size(187, 25);
-            this.mbc_brcode.Str = null;
-            this.mbc_brcode.Str1 = null;
-            this.mbc_brcode.Str2 = null;
-            this.mbc_brcode.TabIndex = 96;
-            this.mbc_brcode.Tag = "Read";
-            // 
-            // mbr_brgcode
-            // 
-            this.mbr_brgcode.AllPower = null;
-            this.mbr_brgcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.nr_name.BackColor = System.Drawing.Color.White;
+            this.nr_name.ID = null;
+            this.nr_name.Location = new System.Drawing.Point(747, 245);
+            this.nr_name.Margin = new System.Windows.Forms.Padding(4);
+            this.nr_name.Name = "nr_name";
+            this.nr_name.Power = null;
+            this.nr_name.Size = new System.Drawing.Size(187, 25);
+            this.nr_name.Str = null;
+            this.nr_name.Str1 = null;
+            this.nr_name.Str2 = null;
+            this.nr_name.TabIndex = 96;
+            this.nr_name.Tag = "Read";
+            // 
+            // nrg_name
+            // 
+            this.nrg_name.AllPower = null;
+            this.nrg_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.mbr_brgcode.BackColor = System.Drawing.Color.White;
-            this.mbr_brgcode.ID = null;
-            this.mbr_brgcode.Location = new System.Drawing.Point(383, 248);
-            this.mbr_brgcode.Margin = new System.Windows.Forms.Padding(4);
-            this.mbr_brgcode.Name = "mbr_brgcode";
-            this.mbr_brgcode.Power = null;
-            this.mbr_brgcode.Size = new System.Drawing.Size(187, 25);
-            this.mbr_brgcode.Str = null;
-            this.mbr_brgcode.Str1 = null;
-            this.mbr_brgcode.Str2 = null;
-            this.mbr_brgcode.TabIndex = 94;
-            this.mbr_brgcode.Tag = "Read";
-            // 
-            // enterTextBox2
-            // 
-            this.enterTextBox2.AllPower = null;
-            this.enterTextBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.nrg_name.BackColor = System.Drawing.Color.White;
+            this.nrg_name.ID = null;
+            this.nrg_name.Location = new System.Drawing.Point(354, 248);
+            this.nrg_name.Margin = new System.Windows.Forms.Padding(4);
+            this.nrg_name.Name = "nrg_name";
+            this.nrg_name.Power = null;
+            this.nrg_name.Size = new System.Drawing.Size(187, 25);
+            this.nrg_name.Str = null;
+            this.nrg_name.Str1 = null;
+            this.nrg_name.Str2 = null;
+            this.nrg_name.TabIndex = 94;
+            this.nrg_name.Tag = "Read";
+            // 
+            // 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)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.enterTextBox2.BackColor = System.Drawing.Color.White;
-            this.enterTextBox2.ID = null;
-            this.enterTextBox2.Location = new System.Drawing.Point(773, 192);
-            this.enterTextBox2.Margin = new System.Windows.Forms.Padding(4);
-            this.enterTextBox2.Name = "enterTextBox2";
-            this.enterTextBox2.Power = null;
-            this.enterTextBox2.Size = new System.Drawing.Size(150, 25);
-            this.enterTextBox2.Str = null;
-            this.enterTextBox2.Str1 = null;
-            this.enterTextBox2.Str2 = null;
-            this.enterTextBox2.TabIndex = 92;
-            this.enterTextBox2.Tag = "Read";
-            // 
-            // enterTextBox1
-            // 
-            this.enterTextBox1.AllPower = null;
-            this.enterTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            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(747, 192);
+            this.bc_name.Margin = new System.Windows.Forms.Padding(4);
+            this.bc_name.Name = "bc_name";
+            this.bc_name.Power = null;
+            this.bc_name.Size = new System.Drawing.Size(187, 25);
+            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)));
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.enterTextBox1.BackColor = System.Drawing.Color.White;
-            this.enterTextBox1.ID = null;
-            this.enterTextBox1.Location = new System.Drawing.Point(420, 192);
-            this.enterTextBox1.Margin = new System.Windows.Forms.Padding(4);
-            this.enterTextBox1.Name = "enterTextBox1";
-            this.enterTextBox1.Power = null;
-            this.enterTextBox1.Size = new System.Drawing.Size(150, 25);
-            this.enterTextBox1.Str = null;
-            this.enterTextBox1.Str1 = null;
-            this.enterTextBox1.Str2 = null;
-            this.enterTextBox1.TabIndex = 91;
-            this.enterTextBox1.Tag = "Read";
-            // 
-            // bc_remark
-            // 
-            this.bc_remark.Location = new System.Drawing.Point(1069, 192);
-            this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
-            this.bc_remark.Name = "bc_remark";
-            this.bc_remark.Size = new System.Drawing.Size(187, 25);
-            this.bc_remark.TabIndex = 90;
+            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(354, 192);
+            this.bg_name.Margin = new System.Windows.Forms.Padding(4);
+            this.bg_name.Name = "bg_name";
+            this.bg_name.Power = null;
+            this.bg_name.Size = new System.Drawing.Size(187, 25);
+            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";
+            // 
+            // mb_badremark
+            // 
+            this.mb_badremark.Location = new System.Drawing.Point(1094, 194);
+            this.mb_badremark.Margin = new System.Windows.Forms.Padding(4);
+            this.mb_badremark.Name = "mb_badremark";
+            this.mb_badremark.Size = new System.Drawing.Size(187, 25);
+            this.mb_badremark.TabIndex = 90;
             // 
             // 
             // OperatResult
             // OperatResult
             // 
             // 
             this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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(1031, 372);
+            this.OperatResult.Location = new System.Drawing.Point(1060, 372);
             this.OperatResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperatResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperatResult.Name = "OperatResult";
             this.OperatResult.Name = "OperatResult";
-            this.OperatResult.Size = new System.Drawing.Size(276, 318);
+            this.OperatResult.Size = new System.Drawing.Size(247, 318);
             this.OperatResult.TabIndex = 87;
             this.OperatResult.TabIndex = 87;
             this.OperatResult.Text = "";
             this.OperatResult.Text = "";
             // 
             // 
@@ -710,7 +738,7 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1130, 700);
+            this.Clean.Location = new System.Drawing.Point(1130, 697);
             this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.Name = "Clean";
@@ -770,7 +798,7 @@
             this.cr_code.Condition = null;
             this.cr_code.Condition = null;
             this.cr_code.DBTitle = "回流工艺";
             this.cr_code.DBTitle = "回流工艺";
             this.cr_code.FormName = null;
             this.cr_code.FormName = null;
-            this.cr_code.Location = new System.Drawing.Point(123, 99);
+            this.cr_code.Location = new System.Drawing.Point(123, 95);
             this.cr_code.Margin = new System.Windows.Forms.Padding(4);
             this.cr_code.Margin = new System.Windows.Forms.Padding(4);
             this.cr_code.Name = "cr_code";
             this.cr_code.Name = "cr_code";
             this.cr_code.Power = null;
             this.cr_code.Power = null;
@@ -789,7 +817,7 @@
             this.NewBadCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.DownImage")));
             this.NewBadCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.DownImage")));
             this.NewBadCode.Image = ((System.Drawing.Image)(resources.GetObject("NewBadCode.Image")));
             this.NewBadCode.Image = ((System.Drawing.Image)(resources.GetObject("NewBadCode.Image")));
             this.NewBadCode.IsShowBorder = true;
             this.NewBadCode.IsShowBorder = true;
-            this.NewBadCode.Location = new System.Drawing.Point(248, 619);
+            this.NewBadCode.Location = new System.Drawing.Point(248, 631);
             this.NewBadCode.Margin = new System.Windows.Forms.Padding(4);
             this.NewBadCode.Margin = new System.Windows.Forms.Padding(4);
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.Name = "NewBadCode";
             this.NewBadCode.Name = "NewBadCode";
@@ -809,7 +837,7 @@
             this.SaveBadLocation.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.DownImage")));
             this.SaveBadLocation.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.DownImage")));
             this.SaveBadLocation.Image = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.Image")));
             this.SaveBadLocation.Image = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.Image")));
             this.SaveBadLocation.IsShowBorder = true;
             this.SaveBadLocation.IsShowBorder = true;
-            this.SaveBadLocation.Location = new System.Drawing.Point(547, 372);
+            this.SaveBadLocation.Location = new System.Drawing.Point(549, 372);
             this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(4);
             this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(4);
             this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
             this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
             this.SaveBadLocation.Name = "SaveBadLocation";
             this.SaveBadLocation.Name = "SaveBadLocation";
@@ -863,29 +891,17 @@
             this.RepairComplete.UseVisualStyleBackColor = true;
             this.RepairComplete.UseVisualStyleBackColor = true;
             this.RepairComplete.Click += new System.EventHandler(this.RepairComplete_Click);
             this.RepairComplete.Click += new System.EventHandler(this.RepairComplete_Click);
             // 
             // 
-            // RefreshTreeView
-            // 
-            this.RefreshTreeView.AllPower = null;
-            this.RefreshTreeView.Image = global::UAS_MES.Properties.Resources.refresh;
-            this.RefreshTreeView.Location = new System.Drawing.Point(110, 158);
-            this.RefreshTreeView.Name = "RefreshTreeView";
-            this.RefreshTreeView.Power = null;
-            this.RefreshTreeView.Size = new System.Drawing.Size(27, 27);
-            this.RefreshTreeView.TabIndex = 119;
-            this.RefreshTreeView.TabStop = false;
-            this.RefreshTreeView.Click += new System.EventHandler(this.RefreshTreeView_Click);
-            // 
             // Make_Repair
             // Make_Repair
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1320, 740);
+            this.ClientSize = new System.Drawing.Size(1353, 735);
+            this.Controls.Add(this.mbp_partdgv);
+            this.Controls.Add(this.mbl_locdgv);
             this.Controls.Add(this.RefreshTreeView);
             this.Controls.Add(this.RefreshTreeView);
             this.Controls.Add(this.BadCodeTree);
             this.Controls.Add(this.BadCodeTree);
             this.Controls.Add(this.panel3);
             this.Controls.Add(this.panel3);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.listView2);
-            this.Controls.Add(this.listView1);
             this.Controls.Add(this.GetSNCode);
             this.Controls.Add(this.GetSNCode);
             this.Controls.Add(this.GetSNCode_Label);
             this.Controls.Add(this.GetSNCode_Label);
             this.Controls.Add(this.NewRepairInf);
             this.Controls.Add(this.NewRepairInf);
@@ -893,23 +909,23 @@
             this.Controls.Add(this.DeleteRepairInf);
             this.Controls.Add(this.DeleteRepairInf);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.ChooseBadPart);
             this.Controls.Add(this.ChooseBadPart);
-            this.Controls.Add(this.mb_soncode);
-            this.Controls.Add(this.mb_soncode_label);
-            this.Controls.Add(this.mb_badlocation);
-            this.Controls.Add(this.mb_badlocation_label);
+            this.Controls.Add(this.mbp_part);
+            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_solutioncode);
             this.Controls.Add(this.mbr_solutioncode);
-            this.Controls.Add(this.mbr_solutioncode_label);
-            this.Controls.Add(this.enterTextBox6);
-            this.Controls.Add(this.label6);
-            this.Controls.Add(this.nd_code);
-            this.Controls.Add(this.nd_code_label);
-            this.Controls.Add(this.mbc_brcode);
-            this.Controls.Add(this.mbc_brcode_label);
-            this.Controls.Add(this.mbr_brgcode);
+            this.Controls.Add(this.mbr_solution_label);
+            this.Controls.Add(this.mbc_component);
+            this.Controls.Add(this.mbc_component_label);
+            this.Controls.Add(this.mbr_dutycode);
+            this.Controls.Add(this.mbr_dutycode_label);
+            this.Controls.Add(this.nr_name);
+            this.Controls.Add(this.nr_name_label);
+            this.Controls.Add(this.nrg_name);
             this.Controls.Add(this.mbr_brgcode_label);
             this.Controls.Add(this.mbr_brgcode_label);
-            this.Controls.Add(this.enterTextBox2);
-            this.Controls.Add(this.enterTextBox1);
-            this.Controls.Add(this.bc_remark);
+            this.Controls.Add(this.bc_name);
+            this.Controls.Add(this.bg_name);
+            this.Controls.Add(this.mb_badremark);
             this.Controls.Add(this.OperatResult);
             this.Controls.Add(this.OperatResult);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.ms_makecode);
             this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.ma_prodcode);
@@ -927,8 +943,8 @@
             this.Controls.Add(this.Scrap);
             this.Controls.Add(this.Scrap);
             this.Controls.Add(this.RepairComplete);
             this.Controls.Add(this.RepairComplete);
             this.Controls.Add(this.label14);
             this.Controls.Add(this.label14);
-            this.Controls.Add(this.label12);
-            this.Controls.Add(this.label8);
+            this.Controls.Add(this.bc_name_label);
+            this.Controls.Add(this.bg_name_label);
             this.Controls.Add(this.ms_sncode_label);
             this.Controls.Add(this.ms_sncode_label);
             this.Controls.Add(this.ms_makecode_label);
             this.Controls.Add(this.ms_makecode_label);
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.panel2);
@@ -941,6 +957,10 @@
             this.SizeChanged += new System.EventHandler(this.Make_Repair_SizeChanged);
             this.SizeChanged += new System.EventHandler(this.Make_Repair_SizeChanged);
             this.panel2.ResumeLayout(false);
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
             this.panel2.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
@@ -961,8 +981,8 @@
         private System.Windows.Forms.Label ma_prodcode_label;
         private System.Windows.Forms.Label ma_prodcode_label;
         private System.Windows.Forms.Label pr_detail_label;
         private System.Windows.Forms.Label pr_detail_label;
         private System.Windows.Forms.Label label14;
         private System.Windows.Forms.Label label14;
-        private System.Windows.Forms.Label label12;
-        private System.Windows.Forms.Label label8;
+        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_sncode_label;
         private System.Windows.Forms.Label ms_makecode_label;
         private System.Windows.Forms.Label ms_makecode_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox ms_sncode;
         private CustomControl.TextBoxWithIcon.EnterTextBox ms_sncode;
@@ -971,23 +991,22 @@
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private CustomControl.ValueLabel.ValueLabel ma_prodcode;
         private CustomControl.ValueLabel.ValueLabel ms_makecode;
         private CustomControl.ValueLabel.ValueLabel ms_makecode;
         private CustomControl.RichText.RichTextAutoBottom OperatResult;
         private CustomControl.RichText.RichTextAutoBottom OperatResult;
-        private CustomControl.TextBoxWithIcon.TextBoxWithTextArea bc_remark;
-        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox1;
-        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox2;
-        private CustomControl.TextBoxWithIcon.EnterTextBox mbr_brgcode;
+        private CustomControl.TextBoxWithIcon.TextBoxWithTextArea mb_badremark;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bg_name;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_name;
+        private CustomControl.TextBoxWithIcon.EnterTextBox nrg_name;
         private System.Windows.Forms.Label mbr_brgcode_label;
         private System.Windows.Forms.Label mbr_brgcode_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox mbc_brcode;
-        private System.Windows.Forms.Label mbc_brcode_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox nd_code;
-        private System.Windows.Forms.Label nd_code_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox6;
-        private System.Windows.Forms.Label label6;
+        private CustomControl.TextBoxWithIcon.EnterTextBox nr_name;
+        private System.Windows.Forms.Label nr_name_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox mbr_dutycode;
+        private System.Windows.Forms.Label mbr_dutycode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox mbc_component;
+        private System.Windows.Forms.Label mbc_component_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox mbr_solutioncode;
         private CustomControl.TextBoxWithIcon.EnterTextBox mbr_solutioncode;
-        private System.Windows.Forms.Label mbr_solutioncode_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox mb_badlocation;
-        private System.Windows.Forms.Label mb_badlocation_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox mb_soncode;
-        private System.Windows.Forms.Label mb_soncode_label;
+        private System.Windows.Forms.Label mbr_solution_label;
+        private System.Windows.Forms.Label mbl_loc_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox mbp_part;
+        private System.Windows.Forms.Label mbp_part_label;
         private CustomControl.ButtonUtil.NormalButton ChooseBadPart;
         private CustomControl.ButtonUtil.NormalButton ChooseBadPart;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Panel panel1;
         private CustomControl.ButtonUtil.NormalButton DeleteRepairInf;
         private CustomControl.ButtonUtil.NormalButton DeleteRepairInf;
@@ -995,13 +1014,16 @@
         private CustomControl.ButtonUtil.NormalButton NewRepairInf;
         private CustomControl.ButtonUtil.NormalButton NewRepairInf;
         private CustomControl.TextBoxWithIcon.EnterTextBox GetSNCode;
         private CustomControl.TextBoxWithIcon.EnterTextBox GetSNCode;
         private System.Windows.Forms.Label GetSNCode_Label;
         private System.Windows.Forms.Label GetSNCode_Label;
-        private System.Windows.Forms.ListView listView1;
-        private System.Windows.Forms.ListView listView2;
-        private System.Windows.Forms.ColumnHeader columnHeader1;
-        private System.Windows.Forms.ColumnHeader columnHeader2;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Panel panel3;
         private System.Windows.Forms.Panel panel3;
         private System.Windows.Forms.TreeView BadCodeTree;
         private System.Windows.Forms.TreeView BadCodeTree;
         private CustomControl.ClickPicBox.ClickPicBox RefreshTreeView;
         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.DataGridViewTextBoxColumn mbp_part1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn mbl_loc1;
     }
     }
 }
 }

+ 111 - 14
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -29,8 +29,14 @@ namespace UAS_MES.Make
         string insert_makeprocess = "insert into makeprocess(mp_id,mp_makecode,mp_maid, mp_mscode,mp_sncode,mp_stepcode,mp_stepname,mp_craftcode,mp_craftname,mp_kind,mp_result,mp_indate,mp_inman,mp_wccode,mp_linecode,mp_sourcecode) select MakeProcess_seq.nextval, ma_code,ma_id,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,ma_craftcode,'','维修作业','#',sysdate,'" + User.UserName + "',ma_wccode,ma_linecode,'' from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code where ms_sncode=:ms_sncode and ma_code=:ma_code";
         string insert_makeprocess = "insert into makeprocess(mp_id,mp_makecode,mp_maid, mp_mscode,mp_sncode,mp_stepcode,mp_stepname,mp_craftcode,mp_craftname,mp_kind,mp_result,mp_indate,mp_inman,mp_wccode,mp_linecode,mp_sourcecode) select MakeProcess_seq.nextval, ma_code,ma_id,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,ma_craftcode,'','维修作业','#',sysdate,'" + User.UserName + "',ma_wccode,ma_linecode,'' from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code where ms_sncode=:ms_sncode and ma_code=:ma_code";
         //是否获取过下拉框数据
         //是否获取过下拉框数据
         bool GetSelectData = false;
         bool GetSelectData = false;
-
-        List<DataGridViewRow> dgvr = new List<DataGridViewRow>();
+        /// <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;
         DataHelper dh = null;
 
 
@@ -42,6 +48,8 @@ namespace UAS_MES.Make
 
 
         AutoSizeFormClass asc = new AutoSizeFormClass();
         AutoSizeFormClass asc = new AutoSizeFormClass();
 
 
+        string macode;
+
         public Make_Repair()
         public Make_Repair()
         {
         {
             InitializeComponent();
             InitializeComponent();
@@ -69,14 +77,35 @@ namespace UAS_MES.Make
         {
         {
             if (e.KeyCode == Keys.Enter)
             if (e.KeyCode == Keys.Enter)
             {
             {
-                dt = (DataTable)dh.ExecuteSql("select mb_bgcode||':'||mb_badcode mb_bgcode from makebad where  mb_sncode='" + GetSNCode.Text + "'" /*+ "' and mb_makecode='" + ms_makecode.Text + "'*/ /*"*/, "select");
-                for (int i = 0; i < dt.Rows.Count; i++)
+                if (GetSNCode.Text == "")
+                {
+                    MessageBox.Show("序列号不允许为空!");
+                    return;
+                }
+                string ErrorMessage = "";
+                //验证工序是否正确
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
                 {
-                    //添加根节点
-                    TreeNode tnode = new TreeNode();
-                    tnode.Text = dt.Rows[i]["mb_bgcode"].ToString();
-                    BadCodeTree.Nodes.Add(tnode);
+                    string macode = "";
+                    BadInf_1.Clear();
+                    if (LogicHandler.GetMakeInfo(GetSNCode.Text, out macode, out ErrorMessage))
+                    {
+                        //验证makeserial或者ms_firstsn表序列号是否存在
+                        sql.Clear();
+                        sql.Append("select max(ms_id) from makeserial where ms_makecode ='" + macode + "' and(ms_sncode");
+                        sql.Append("='" + GetSNCode.Text + "' or ms_firstsn in (select firstsn from makesnrelation ");
+                        sql.Append("where sn='" + GetSNCode.Text + "'))");
+                        dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        if (dt.Rows.Count > 0)
+                            LoadBadInfTree();
+                        else
+                            OperatResult.AppendText(">>序列号" + GetSNCode.Text + "不存在\n", Color.Red);
+                    }
+                    else
+                        OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 }
                 }
+                else
+                    OperatResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             }
             }
         }
         }
 
 
@@ -87,14 +116,82 @@ namespace UAS_MES.Make
 
 
         private void BadCodeTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
         private void BadCodeTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
         {
         {
-            e.Node.Nodes.Clear();
-            if (!e.Node.Text.Contains("DefaultValue"))
+            if (e.Node.Level == 0)
+            {
+                string mb_id = e.Node.Tag.ToString();
+                bc_name.Text = BadInf_1[mb_id]["bc_name"];
+                bg_name.Text = BadInf_1[mb_id]["bg_name"];
+                mb_badremark.Text = BadInf_1[mb_id]["mb_badremark"];
+            }
+            if (e.Node.Level == 1)
+            {
+                string mbr_id = e.Node.Tag.ToString();
+                nrg_name.Text = BadInf_2[mbr_id]["nrg_name"];
+                nr_name.Text = BadInf_2[mbr_id]["nr_name"];
+                mbr_solutioncode.Text = BadInf_2[mbr_id]["mbr_solutioncode"];
+                mbr_dutycode.Text = BadInf_2[mbr_id]["mbr_dutycode"];
+                mbc_component.Text = dh.getFieldDataByCondition("makebadrscom", "mbc_component", "mbc_mbrid=" + mbr_id).ToString();
+                //加载两个Grid的数据源
+                ComponentSource.DataSource = (DataTable)dh.ExecuteSql("select mbp_part from makebadrspart where mbp_mbrid=" + mbr_id, "select");
+                LocationSource.DataSource = (DataTable)dh.ExecuteSql("select mbl_loc from makebadrsloc where mbl_mbrid=" + mbr_id, "select");
+                mbl_locdgv.DataSource = LocationSource;
+                mbp_partdgv.DataSource = ComponentSource;
+            }
+        }
+
+        private void LoadBadInfTree()
+        {
+
+            BadCodeTree.Nodes.Clear();
+            sql.Clear();
+            sql.Append("select mb_id,mb_sncode,mb_badcode,mb_bgcode,bc_name,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 + "' and mb_makecode='" + macode + "'");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            for (int i = 0; i < dt.Rows.Count; i++)
             {
             {
-                dt = (DataTable)dh.ExecuteSql("select mbr_brgcode||':'||mbr_code from makebadreason", "select");
-                for (int i = 0; i < dt.Rows.Count; i++)
+                //添加根节点
+                TreeNode tnode_0 = new TreeNode();
+                tnode_0.Text = 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());
+                BadInf_1.Add(tnode_0.Tag.ToString(), dic);
+                BadCodeTree.Nodes.Add(tnode_0);
+                //添加子节点
+                sql.Clear();
+                sql.Append("select mbr_id,mbr_brcode,mbr_brgcode,mbr_solutioncode,so_name,mbr_dutycode,nd_name,");
+                sql.Append("nrg_name,nr_name from makebadreason left join QUA_NGReason left join QUA_NGREASONGROUP on ");
+                sql.Append("nrg_code=nr_group on nr_code=mbr_brcode left join solution ");
+                sql.Append("on so_code=mbr_solutioncode left join ngduty on nd_code=mbr_dutycode where mbr_mbid=" + mb_id);
+                DataTable dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                for (int j = 0; j < dt1.Rows.Count; j++)
                 {
                 {
-                    TreeNode tnode = new TreeNode();
-                    e.Node.Nodes.Add(tnode);
+                    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("nd_name", dt1.Rows[j]["nd_name"].ToString());
+                    dic1.Add("so_name", dt1.Rows[j]["so_name"].ToString());
+                    dic1.Add("nrg_name", dt1.Rows[j]["nrg_name"].ToString());
+                    dic1.Add("nr_name", dt1.Rows[j]["nr_name"].ToString());
+                    tnode_1.Text = dt1.Rows[j]["mbr_brgcode"].ToString();
+                    BadInf_2.Add(mbr_id, dic1);
+                    tnode_0.Nodes.Add(tnode_1);
                 }
                 }
             }
             }
         }
         }

+ 21 - 0
UAS-MES/FunctionCode/Make/Make_Repair.resx

@@ -117,6 +117,24 @@
   <resheader name="writer">
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   </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>
+  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mbp_part1.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="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="NewRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   <data name="NewRepairInf.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
     <value>
@@ -1297,4 +1315,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
 </value>
   </data>
   </data>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>42</value>
+  </metadata>
 </root>
 </root>

+ 23 - 23
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -40,6 +40,7 @@
             this.Reject = new System.Windows.Forms.RadioButton();
             this.Reject = new System.Windows.Forms.RadioButton();
             this.WaitRejectList = new System.Windows.Forms.ListView();
             this.WaitRejectList = new System.Windows.Forms.ListView();
             this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.label4 = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
@@ -51,7 +52,6 @@
             this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.AutoBadCode = new System.Windows.Forms.CheckBox();
             this.AutoBadCode = new System.Windows.Forms.CheckBox();
-            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.ma_qty_label = new System.Windows.Forms.Label();
             this.ma_qty_label = new System.Windows.Forms.Label();
             this.ma_prodcode_label = new System.Windows.Forms.Label();
             this.ma_prodcode_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
@@ -205,6 +205,12 @@
             this.columnHeader5.Text = " ";
             this.columnHeader5.Text = " ";
             this.columnHeader5.Width = 20;
             this.columnHeader5.Width = 20;
             // 
             // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "不良代码组";
+            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader4.Width = 100;
+            // 
             // columnHeader1
             // columnHeader1
             // 
             // 
             this.columnHeader1.Text = "不良代码";
             this.columnHeader1.Text = "不良代码";
@@ -243,7 +249,7 @@
             // 
             // 
             this.label6.AutoSize = true;
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(946, 215);
+            this.label6.Location = new System.Drawing.Point(946, 180);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(92, 27);
             this.label6.Size = new System.Drawing.Size(92, 27);
@@ -300,12 +306,6 @@
             this.AutoBadCode.Text = "自动产生不良代码";
             this.AutoBadCode.Text = "自动产生不良代码";
             this.AutoBadCode.UseVisualStyleBackColor = true;
             this.AutoBadCode.UseVisualStyleBackColor = true;
             // 
             // 
-            // columnHeader4
-            // 
-            this.columnHeader4.Text = "不良代码组";
-            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader4.Width = 100;
-            // 
             // ma_qty_label
             // ma_qty_label
             // 
             // 
             this.ma_qty_label.AutoSize = true;
             this.ma_qty_label.AutoSize = true;
@@ -321,7 +321,7 @@
             // 
             // 
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.AutoSize = true;
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(454, 59);
+            this.ma_prodcode_label.Location = new System.Drawing.Point(438, 59);
             this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode_label.Name = "ma_prodcode_label";
             this.ma_prodcode_label.Name = "ma_prodcode_label";
             this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
             this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
@@ -332,7 +332,7 @@
             // 
             // 
             this.pr_detail_label.AutoSize = true;
             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.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(785, 59);
+            this.pr_detail_label.Location = new System.Drawing.Point(792, 59);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
             this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
@@ -354,7 +354,7 @@
             // 
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(451, 109);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(435, 109);
             this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
             this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
@@ -365,7 +365,7 @@
             // 
             // 
             this.mc_restqty_label.AutoSize = true;
             this.mc_restqty_label.AutoSize = true;
             this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mc_restqty_label.Location = new System.Drawing.Point(785, 109);
+            this.mc_restqty_label.Location = new System.Drawing.Point(792, 109);
             this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mc_restqty_label.Name = "mc_restqty_label";
             this.mc_restqty_label.Name = "mc_restqty_label";
             this.mc_restqty_label.Size = new System.Drawing.Size(92, 27);
             this.mc_restqty_label.Size = new System.Drawing.Size(92, 27);
@@ -384,7 +384,7 @@
             this.bc_code.Str = null;
             this.bc_code.Str = null;
             this.bc_code.Str1 = null;
             this.bc_code.Str1 = null;
             this.bc_code.Str2 = null;
             this.bc_code.Str2 = null;
-            this.bc_code.TabIndex = 68;
+            this.bc_code.TabIndex = 100;
             this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
             this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
             // 
             // 
             // ma_code
             // ma_code
@@ -394,7 +394,7 @@
             this.ma_code.Condition = null;
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(159, 59);
+            this.ma_code.Location = new System.Drawing.Point(142, 59);
             this.ma_code.Name = "ma_code";
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.Power = null;
             this.ma_code.SelectField = null;
             this.ma_code.SelectField = null;
@@ -409,7 +409,7 @@
             // 
             // 
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LockMakeCode.Location = new System.Drawing.Point(378, 62);
+            this.LockMakeCode.Location = new System.Drawing.Point(361, 62);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Size = new System.Drawing.Size(61, 24);
             this.LockMakeCode.Size = new System.Drawing.Size(61, 24);
             this.LockMakeCode.TabIndex = 66;
             this.LockMakeCode.TabIndex = 66;
@@ -439,7 +439,7 @@
             // 
             // 
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.AutoSize = true;
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(920, 109);
+            this.mcd_remainqty.Location = new System.Drawing.Point(914, 109);
             this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
             this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
@@ -450,7 +450,7 @@
             // 
             // 
             this.pr_detail.AutoSize = true;
             this.pr_detail.AutoSize = true;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             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(920, 59);
+            this.pr_detail.Location = new System.Drawing.Point(914, 59);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 27);
             this.pr_detail.Size = new System.Drawing.Size(0, 27);
@@ -460,7 +460,7 @@
             // 
             // 
             this.ma_qty.AutoSize = true;
             this.ma_qty.AutoSize = true;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty.Location = new System.Drawing.Point(159, 109);
+            this.ma_qty.Location = new System.Drawing.Point(142, 109);
             this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty.Name = "ma_qty";
             this.ma_qty.Name = "ma_qty";
             this.ma_qty.Size = new System.Drawing.Size(0, 27);
             this.ma_qty.Size = new System.Drawing.Size(0, 27);
@@ -470,7 +470,7 @@
             // 
             // 
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(594, 109);
+            this.mcd_inqty.Location = new System.Drawing.Point(562, 109);
             this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
             this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
@@ -481,7 +481,7 @@
             // 
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(594, 59);
+            this.ma_prodcode.Location = new System.Drawing.Point(562, 59);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
             this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
@@ -490,10 +490,10 @@
             // OperateResult
             // OperateResult
             // 
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(951, 259);
+            this.OperateResult.Location = new System.Drawing.Point(951, 211);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(275, 382);
+            this.OperateResult.Size = new System.Drawing.Size(275, 430);
             this.OperateResult.TabIndex = 52;
             this.OperateResult.TabIndex = 52;
             this.OperateResult.Text = "";
             this.OperateResult.Text = "";
             // 
             // 
@@ -579,7 +579,7 @@
             this.ms_sncode.Str = null;
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
             this.ms_sncode.Str2 = null;
-            this.ms_sncode.TabIndex = 19;
+            this.ms_sncode.TabIndex = 68;
             this.ms_sncode.Tag = "IfWrite";
             this.ms_sncode.Tag = "IfWrite";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
             // 

+ 3 - 3
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -231,7 +231,7 @@ namespace UAS_MES.Make
                 else
                 else
                 {
                 {
                     //良品信息采集
                     //良品信息采集
-                    if (LogicHandler.UpdateMakeMessage(ms_sncode.Text, ma_code.Text, User.UserSourceCode, User.UserName, "检测合格", out ErrorMessage))
+                    if (LogicHandler.UpdateMakeMessage(ms_sncode.Text, ma_code.Text, User.UserSourceCode, User.UserCode, "检测合格", out ErrorMessage))
                         OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为良品\n", Color.Green);
                         OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为良品\n", Color.Green);
                     else
                     else
                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
@@ -256,8 +256,8 @@ namespace UAS_MES.Make
             string ErrorMessage = "";
             string ErrorMessage = "";
             if (AutoBadCode.Checked)
             if (AutoBadCode.Checked)
             {
             {
-                bccode = new string[] { "DefalutValue" };
-                bcremark = new string[] { "DefalutValue" };
+                bccode = new string[] { "DefaultValue" };
+                bcremark = new string[] { "DefaultValue" };
                 bgcode = new string[] { "DefaultValue" };
                 bgcode = new string[] { "DefaultValue" };
             }
             }
             else
             else

+ 2 - 2
UAS-MES/Main.cs

@@ -78,7 +78,7 @@ namespace UAS_MES
         //窗体加载的时候将headBar的事件委托给指定的函数
         //窗体加载的时候将headBar的事件委托给指定的函数
         private void Main_Load(object sender, EventArgs e)
         private void Main_Load(object sender, EventArgs e)
         {
         {
-            thread = new Thread(DeleteLog); 
+            thread = new Thread(DeleteLog);
             thread.Start();
             thread.Start();
             RefreshDBConnect.Interval = 600 * 1000;
             RefreshDBConnect.Interval = 600 * 1000;
             RefreshDBConnect.Tick += RefreshDB;
             RefreshDBConnect.Tick += RefreshDB;
@@ -221,7 +221,7 @@ namespace UAS_MES
         {
         {
             //移除已打开的Form中的Form
             //移除已打开的Form中的Form
             TabPage tb = e.Control as TabPage;
             TabPage tb = e.Control as TabPage;
-            AccordionMenu.OpenedFormName.Remove("UAS_MES." + tb.Text);
+            AccordionMenu.OpenedFormName.Remove(tb.Name);
             (tb.Controls[0] as Form).Close();
             (tb.Controls[0] as Form).Close();
             //掉用了串口的程序需要在这个步骤关闭串口
             //掉用了串口的程序需要在这个步骤关闭串口
             try
             try

+ 4 - 7
UAS-MES/PublicMethod/LogicHandler.cs

@@ -1071,15 +1071,13 @@ namespace UAS_MES.PublicMethod
         /// <param name="iBadRemark"></param>
         /// <param name="iBadRemark"></param>
         /// <param name="oErrorMessage"></param>
         /// <param name="oErrorMessage"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public static bool SetTestNGDetail(string iSnCode, string iMakeCode, string iUserName, string iSourceCode, string iResult,string[] iBadGroupCode, string[] iBadCode, string[] iBadRemark, out string oErrorMessage)
+        public static bool SetTestNGDetail(string iSnCode, string iMakeCode, string iUserName, string iSourceCode, string iResult, string[] iBadGroupCode, string[] iBadCode, string[] iBadRemark, out string oErrorMessage)
         {
         {
             oErrorMessage = "";
             oErrorMessage = "";
             string StepCode = "";
             string StepCode = "";
             string StepName = "";
             string StepName = "";
             if (iResult == "" || iResult == null)
             if (iResult == "" || iResult == null)
-            {
                 iResult = "检查未通过";
                 iResult = "检查未通过";
-            }
             GetStepCodeAndNameBySource(iSourceCode, ref StepCode, ref StepName);
             GetStepCodeAndNameBySource(iSourceCode, ref StepCode, ref StepName);
             sql.Clear();
             sql.Clear();
             sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,");
             sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,");
@@ -1087,7 +1085,7 @@ namespace UAS_MES.PublicMethod
             sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserName + "',sysdate,'" + StepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
             sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserName + "',sysdate,'" + StepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
             sql.Append("sp_soncode,'0',:bc_remark from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
             sql.Append("sp_soncode,'0',:bc_remark from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + iSnCode + "'");
             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + iSnCode + "'");
-            dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bc_remark", "bg_code" }, iBadCode, iBadRemark, iBadGroupCode);
+            dh.BatchInsert(sql.ToString(), new string[] { "bg_code", "bc_code", "bc_remark" }, iBadGroupCode, iBadCode, iBadRemark);
             //更新序列号状态,待维修,返修工序
             //更新序列号状态,待维修,返修工序
             string st_rstepcode = dh.getFieldDataByCondition("step", "st_rstepcode", "st_code='" + StepCode + "'").ToString();
             string st_rstepcode = dh.getFieldDataByCondition("step", "st_rstepcode", "st_code='" + StepCode + "'").ToString();
             sql.Clear();
             sql.Clear();
@@ -1101,7 +1099,7 @@ namespace UAS_MES.PublicMethod
             //记录操作日志
             //记录操作日志
             InsertMakeProcess(iSnCode, iMakeCode, iResult, iUserName);
             InsertMakeProcess(iSnCode, iMakeCode, iResult, iUserName);
             //判断当前采集点是否为扣料工序cd_ifreduce =-1 则为扣料工序
             //判断当前采集点是否为扣料工序cd_ifreduce =-1 则为扣料工序
-            SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName,out oErrorMessage);
+            SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
             //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
             //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
             return true;
             return true;
         }
         }
@@ -1301,7 +1299,7 @@ namespace UAS_MES.PublicMethod
         /// <returns></returns>
         /// <returns></returns>
         public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iSourceCode, string iUserName, string iResult, out string oErrorMessage)
         public static bool UpdateMakeMessage(string iSnCode, string iMakeCode, string iSourceCode, string iUserName, string iResult, out string oErrorMessage)
         {
         {
-            SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
+            return SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
             //oErrorMessage = "";
             //oErrorMessage = "";
             //string StepCode = "";
             //string StepCode = "";
             //string StepName = "";
             //string StepName = "";
@@ -1430,7 +1428,6 @@ namespace UAS_MES.PublicMethod
             //    CheckNextStepIfQC(iSnCode, iMakeCode, nextstepcode.ToString(), cr_code, iUserName, out oErrorMessage);
             //    CheckNextStepIfQC(iSnCode, iMakeCode, nextstepcode.ToString(), cr_code, iUserName, out oErrorMessage);
             //// 将数据插入craftmaterial表
             //// 将数据插入craftmaterial表
             //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
             //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
-            return true;
         }
         }
 
 
         /// <summary>
         /// <summary>

+ 1 - 2
UAS-MES/UAS-MES.csproj

@@ -41,7 +41,7 @@
     <MinimumRequiredVersion>1.0.0.1</MinimumRequiredVersion>
     <MinimumRequiredVersion>1.0.0.1</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>193</ApplicationRevision>
+    <ApplicationRevision>196</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -1012,7 +1012,6 @@
       <DependentUpon>Settings.settings</DependentUpon>
       <DependentUpon>Settings.settings</DependentUpon>
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
     </Compile>
     </Compile>
-    <None Include="UAS-MES_TemporaryKey.pfx" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="App.config">
     <None Include="App.config">