瀏覽代碼

维修作业修改

章政 8 年之前
父節點
當前提交
346e1f19d7

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

@@ -130,7 +130,7 @@ namespace UAS_MES.CustomControl.AccordionMenu
             }
             //根据模块的名称查询出所有的子模块
             sql.Clear();
-            sql.Append("select sn_displayname,sn_classname,sn_module,sn_modulecode,sn_using,sn_caller,sn_detno from CS$SYSNAVATION where sn_using=1 and sn_caller in(" + Callers.Substring(0, Callers.Length - 1) + ") order by sn_modulecode,sn_detno");
+            sql.Append("select sn_id,sn_displayname,sn_classname,sn_module,sn_modulecode,sn_using,sn_caller,sn_detno from CS$SYSNAVATION where sn_using=1 and sn_caller in(" + Callers.Substring(0, Callers.Length - 1) + ") order by sn_modulecode,sn_detno");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             sql.Clear();
             //模块的数量,需要单独控制这个变量的增加

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -81,12 +81,12 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label1.Location = new System.Drawing.Point(16, 4);
+            this.label1.Location = new System.Drawing.Point(16, 5);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 0;
-            this.label1.Text = "上料采集";
+            this.label1.Text = "工单信息";
             // 
             // mcd_restqty_label
             // 

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

@@ -127,7 +127,7 @@
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 0;
-            this.label1.Text = "基础信息";
+            this.label1.Text = "工单信息";
             // 
             // pa_packageqty_label
             // 
@@ -281,14 +281,14 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(27, 235);
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.ForeColor = System.Drawing.Color.Black;
+            this.label2.Location = new System.Drawing.Point(16, 237);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
             this.label2.TabIndex = 162;
-            this.label2.Text = "装箱信息";
+            this.label2.Text = "采集信息";
             // 
             // pa_code
             // 
@@ -509,12 +509,12 @@
             this.pd_innerqty,
             this.pa_indate,
             this.pd_id});
-            this.PackageDetail.Location = new System.Drawing.Point(31, 268);
+            this.PackageDetail.Location = new System.Drawing.Point(21, 268);
             this.PackageDetail.Margin = new System.Windows.Forms.Padding(4);
             this.PackageDetail.Name = "PackageDetail";
             this.PackageDetail.ReadOnly = true;
             this.PackageDetail.RowTemplate.Height = 23;
-            this.PackageDetail.Size = new System.Drawing.Size(985, 430);
+            this.PackageDetail.Size = new System.Drawing.Size(995, 430);
             this.PackageDetail.TabIndex = 134;
             // 
             // pd_barcode

+ 14 - 14
UAS-MES/FunctionCode/Make/Make_PositionStock.Designer.cs

@@ -69,7 +69,7 @@
             this.panel2.Controls.Add(this.label1);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(1439, 36);
             this.panel2.TabIndex = 31;
@@ -84,7 +84,7 @@
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 0;
-            this.label1.Text = "岗位备料";
+            this.label1.Text = "工单信息";
             // 
             // sc_stepcode_label
             // 
@@ -168,14 +168,14 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(13, 165);
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.ForeColor = System.Drawing.Color.Black;
+            this.label2.Location = new System.Drawing.Point(16, 165);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(112, 27);
+            this.label2.Size = new System.Drawing.Size(92, 27);
             this.label2.TabIndex = 181;
-            this.label2.Text = "批物料管控";
+            this.label2.Text = "采集信息";
             // 
             // ma_code
             // 
@@ -205,7 +205,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1237, 654);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -221,7 +221,7 @@
             // 
             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(1120, 198);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(311, 440);
             this.OperateResult.TabIndex = 178;
@@ -235,7 +235,7 @@
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
             this.Confirm.Location = new System.Drawing.Point(461, 655);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
@@ -255,7 +255,7 @@
             this.pr_batchnum.BackColor = System.Drawing.Color.White;
             this.pr_batchnum.ID = null;
             this.pr_batchnum.Location = new System.Drawing.Point(117, 659);
-            this.pr_batchnum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pr_batchnum.Margin = new System.Windows.Forms.Padding(4);
             this.pr_batchnum.Name = "pr_batchnum";
             this.pr_batchnum.Power = null;
             this.pr_batchnum.Size = new System.Drawing.Size(320, 25);
@@ -279,7 +279,7 @@
             this.Column7,
             this.Column8});
             this.BatchProduct.Location = new System.Drawing.Point(0, 198);
-            this.BatchProduct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.BatchProduct.Margin = new System.Windows.Forms.Padding(4);
             this.BatchProduct.Name = "BatchProduct";
             this.BatchProduct.RowTemplate.Height = 23;
             this.BatchProduct.Size = new System.Drawing.Size(1101, 441);
@@ -393,7 +393,7 @@
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
             this.Screen.IsShowBorder = true;
             this.Screen.Location = new System.Drawing.Point(1351, 118);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Screen.Margin = new System.Windows.Forms.Padding(4);
             this.Screen.MoveImage = ((System.Drawing.Image)(resources.GetObject("Screen.MoveImage")));
             this.Screen.Name = "Screen";
             this.Screen.NormalImage = ((System.Drawing.Image)(resources.GetObject("Screen.NormalImage")));
@@ -432,7 +432,7 @@
             this.Controls.Add(this.Screen);
             this.Controls.Add(this.panel2);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PositionStock";
             this.Tag = "Make!PositionStock";
             this.Text = "岗位备料";

+ 24 - 0
UAS-MES/FunctionCode/Make/Make_PositionStock.resx

@@ -404,6 +404,30 @@
   <metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="Screen.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 176 - 157
UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs

@@ -40,11 +40,11 @@
             this.label8 = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.label5 = 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.label7 = 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.panel1 = new System.Windows.Forms.Panel();
@@ -55,6 +55,7 @@
             this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.label2 = new System.Windows.Forms.Label();
             this.panel3 = new System.Windows.Forms.Panel();
+            this.BadCodeTree = new System.Windows.Forms.TreeView();
             this.GetSNCode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.NewRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.SaveRepairInf = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -62,11 +63,11 @@
             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.enterTextBox7 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.mbr_solutioncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.enterTextBox6 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.enterTextBox5 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.enterTextBox4 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.enterTextBox3 = 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();
@@ -82,9 +83,9 @@
             this.SaveBadLocation = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.RepairComplete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.BadCodeGrid = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
+            this.RefreshTreeView = new UAS_MES.CustomControl.ClickPicBox.ClickPicBox();
             this.panel2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.BadCodeGrid)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).BeginInit();
             this.SuspendLayout();
             // 
             // panel2
@@ -222,41 +223,41 @@
             this.ms_makecode_label.TabIndex = 37;
             this.ms_makecode_label.Text = "工单号";
             // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.ForeColor = System.Drawing.Color.Black;
-            this.label3.Location = new System.Drawing.Point(247, 246);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(112, 27);
-            this.label3.TabIndex = 93;
-            this.label3.Text = "不良原因组";
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(613, 243);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(92, 27);
-            this.label4.TabIndex = 95;
-            this.label4.Text = "不良原因";
-            // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(963, 241);
-            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(72, 27);
-            this.label5.TabIndex = 97;
-            this.label5.Text = "责任别";
+            // mbr_brgcode_label
+            // 
+            this.mbr_brgcode_label.AutoSize = true;
+            this.mbr_brgcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mbr_brgcode_label.ForeColor = System.Drawing.Color.Black;
+            this.mbr_brgcode_label.Location = new System.Drawing.Point(247, 246);
+            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.Size = new System.Drawing.Size(112, 27);
+            this.mbr_brgcode_label.TabIndex = 93;
+            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
             // 
@@ -270,17 +271,17 @@
             this.label6.TabIndex = 99;
             this.label6.Text = "不良组件";
             // 
-            // label7
+            // mbr_solutioncode_label
             // 
-            this.label7.AutoSize = true;
-            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.ForeColor = System.Drawing.Color.Black;
-            this.label7.Location = new System.Drawing.Point(613, 297);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(92, 27);
-            this.label7.TabIndex = 101;
-            this.label7.Text = "解决方案";
+            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
             // 
@@ -341,7 +342,7 @@
             // columnHeader1
             // 
             this.columnHeader1.Text = "已选不良位置";
-            this.columnHeader1.Width = 344;
+            this.columnHeader1.Width = 346;
             // 
             // listView2
             // 
@@ -357,14 +358,14 @@
             // columnHeader2
             // 
             this.columnHeader2.Text = "已选不良零件";
-            this.columnHeader2.Width = 343;
+            this.columnHeader2.Width = 346;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(16, 155);
+            this.label2.Location = new System.Drawing.Point(16, 156);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
@@ -379,6 +380,15 @@
             this.panel3.Size = new System.Drawing.Size(1320, 2);
             this.panel3.TabIndex = 109;
             // 
+            // BadCodeTree
+            // 
+            this.BadCodeTree.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.BadCodeTree.Location = new System.Drawing.Point(21, 192);
+            this.BadCodeTree.Name = "BadCodeTree";
+            this.BadCodeTree.Size = new System.Drawing.Size(193, 512);
+            this.BadCodeTree.TabIndex = 118;
+            this.BadCodeTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.BadCodeTree_NodeMouseClick);
+            // 
             // GetSNCode
             // 
             this.GetSNCode.AllPower = null;
@@ -396,6 +406,7 @@
             this.GetSNCode.Str2 = null;
             this.GetSNCode.TabIndex = 114;
             this.GetSNCode.Tag = "Read";
+            this.GetSNCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GetSNCode_KeyDown);
             // 
             // NewRepairInf
             // 
@@ -404,7 +415,7 @@
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.Image")));
             this.NewRepairInf.IsShowBorder = true;
-            this.NewRepairInf.Location = new System.Drawing.Point(390, 618);
+            this.NewRepairInf.Location = new System.Drawing.Point(390, 619);
             this.NewRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
@@ -415,6 +426,7 @@
             this.NewRepairInf.Tag = "IfWrite";
             this.NewRepairInf.Text = "新增维修信息";
             this.NewRepairInf.UseVisualStyleBackColor = true;
+            this.NewRepairInf.Click += new System.EventHandler(this.NewRepairInf_Click);
             // 
             // SaveRepairInf
             // 
@@ -423,7 +435,7 @@
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.Image")));
             this.SaveRepairInf.IsShowBorder = true;
-            this.SaveRepairInf.Location = new System.Drawing.Point(530, 618);
+            this.SaveRepairInf.Location = new System.Drawing.Point(530, 619);
             this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
@@ -434,6 +446,7 @@
             this.SaveRepairInf.Tag = "IfWrite";
             this.SaveRepairInf.Text = "保存维修信息";
             this.SaveRepairInf.UseVisualStyleBackColor = true;
+            this.SaveRepairInf.Click += new System.EventHandler(this.SaveRepairInf_Click);
             // 
             // DeleteRepairInf
             // 
@@ -442,7 +455,7 @@
             this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
             this.DeleteRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.Image")));
             this.DeleteRepairInf.IsShowBorder = true;
-            this.DeleteRepairInf.Location = new System.Drawing.Point(676, 618);
+            this.DeleteRepairInf.Location = new System.Drawing.Point(676, 619);
             this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
@@ -453,6 +466,7 @@
             this.DeleteRepairInf.Tag = "IfWrite";
             this.DeleteRepairInf.Text = "删除";
             this.DeleteRepairInf.UseVisualStyleBackColor = true;
+            this.DeleteRepairInf.Click += new System.EventHandler(this.DeleteRepairInf_Click);
             // 
             // ChooseBadPart
             // 
@@ -509,23 +523,23 @@
             this.mb_badlocation.TabIndex = 104;
             this.mb_badlocation.Tag = "Read";
             // 
-            // enterTextBox7
+            // mbr_solutioncode
             // 
-            this.enterTextBox7.AllPower = null;
-            this.enterTextBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.mbr_solutioncode.AllPower = null;
+            this.mbr_solutioncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.enterTextBox7.BackColor = System.Drawing.Color.White;
-            this.enterTextBox7.ID = null;
-            this.enterTextBox7.Location = new System.Drawing.Point(736, 299);
-            this.enterTextBox7.Margin = new System.Windows.Forms.Padding(4);
-            this.enterTextBox7.Name = "enterTextBox7";
-            this.enterTextBox7.Power = null;
-            this.enterTextBox7.Size = new System.Drawing.Size(187, 25);
-            this.enterTextBox7.Str = null;
-            this.enterTextBox7.Str1 = null;
-            this.enterTextBox7.Str2 = null;
-            this.enterTextBox7.TabIndex = 102;
-            this.enterTextBox7.Tag = "Read";
+            this.mbr_solutioncode.BackColor = System.Drawing.Color.White;
+            this.mbr_solutioncode.ID = null;
+            this.mbr_solutioncode.Location = new System.Drawing.Point(736, 299);
+            this.mbr_solutioncode.Margin = new System.Windows.Forms.Padding(4);
+            this.mbr_solutioncode.Name = "mbr_solutioncode";
+            this.mbr_solutioncode.Power = null;
+            this.mbr_solutioncode.Size = new System.Drawing.Size(187, 25);
+            this.mbr_solutioncode.Str = null;
+            this.mbr_solutioncode.Str1 = null;
+            this.mbr_solutioncode.Str2 = null;
+            this.mbr_solutioncode.TabIndex = 102;
+            this.mbr_solutioncode.Tag = "Read";
             // 
             // enterTextBox6
             // 
@@ -545,59 +559,59 @@
             this.enterTextBox6.TabIndex = 100;
             this.enterTextBox6.Tag = "Read";
             // 
-            // enterTextBox5
+            // nd_code
             // 
-            this.enterTextBox5.AllPower = null;
-            this.enterTextBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.nd_code.AllPower = null;
+            this.nd_code.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.enterTextBox5.BackColor = System.Drawing.Color.White;
-            this.enterTextBox5.ID = null;
-            this.enterTextBox5.Location = new System.Drawing.Point(1069, 246);
-            this.enterTextBox5.Margin = new System.Windows.Forms.Padding(4);
-            this.enterTextBox5.Name = "enterTextBox5";
-            this.enterTextBox5.Power = null;
-            this.enterTextBox5.Size = new System.Drawing.Size(187, 25);
-            this.enterTextBox5.Str = null;
-            this.enterTextBox5.Str1 = null;
-            this.enterTextBox5.Str2 = null;
-            this.enterTextBox5.TabIndex = 98;
-            this.enterTextBox5.Tag = "Read";
-            // 
-            // enterTextBox4
-            // 
-            this.enterTextBox4.AllPower = null;
-            this.enterTextBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            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) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.enterTextBox4.BackColor = System.Drawing.Color.White;
-            this.enterTextBox4.ID = null;
-            this.enterTextBox4.Location = new System.Drawing.Point(736, 245);
-            this.enterTextBox4.Margin = new System.Windows.Forms.Padding(4);
-            this.enterTextBox4.Name = "enterTextBox4";
-            this.enterTextBox4.Power = null;
-            this.enterTextBox4.Size = new System.Drawing.Size(187, 25);
-            this.enterTextBox4.Str = null;
-            this.enterTextBox4.Str1 = null;
-            this.enterTextBox4.Str2 = null;
-            this.enterTextBox4.TabIndex = 96;
-            this.enterTextBox4.Tag = "Read";
-            // 
-            // enterTextBox3
-            // 
-            this.enterTextBox3.AllPower = null;
-            this.enterTextBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            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) 
             | System.Windows.Forms.AnchorStyles.Left)));
-            this.enterTextBox3.BackColor = System.Drawing.Color.White;
-            this.enterTextBox3.ID = null;
-            this.enterTextBox3.Location = new System.Drawing.Point(383, 248);
-            this.enterTextBox3.Margin = new System.Windows.Forms.Padding(4);
-            this.enterTextBox3.Name = "enterTextBox3";
-            this.enterTextBox3.Power = null;
-            this.enterTextBox3.Size = new System.Drawing.Size(187, 25);
-            this.enterTextBox3.Str = null;
-            this.enterTextBox3.Str1 = null;
-            this.enterTextBox3.Str2 = null;
-            this.enterTextBox3.TabIndex = 94;
-            this.enterTextBox3.Tag = "Read";
+            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
             // 
@@ -696,7 +710,7 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1129, 700);
+            this.Clean.Location = new System.Drawing.Point(1130, 700);
             this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
@@ -775,7 +789,7 @@
             this.NewBadCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.DownImage")));
             this.NewBadCode.Image = ((System.Drawing.Image)(resources.GetObject("NewBadCode.Image")));
             this.NewBadCode.IsShowBorder = true;
-            this.NewBadCode.Location = new System.Drawing.Point(248, 618);
+            this.NewBadCode.Location = new System.Drawing.Point(248, 619);
             this.NewBadCode.Margin = new System.Windows.Forms.Padding(4);
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.Name = "NewBadCode";
@@ -786,6 +800,7 @@
             this.NewBadCode.Tag = "IfWrite";
             this.NewBadCode.Text = "新增不良代码";
             this.NewBadCode.UseVisualStyleBackColor = true;
+            this.NewBadCode.Click += new System.EventHandler(this.NewBadCode_Click);
             // 
             // SaveBadLocation
             // 
@@ -825,6 +840,7 @@
             this.Scrap.Tag = "IfWrite";
             this.Scrap.Text = "报废";
             this.Scrap.UseVisualStyleBackColor = true;
+            this.Scrap.Click += new System.EventHandler(this.Scrap_Click);
             // 
             // RepairComplete
             // 
@@ -845,25 +861,27 @@
             this.RepairComplete.Tag = "IfWrite";
             this.RepairComplete.Text = "完成维修";
             this.RepairComplete.UseVisualStyleBackColor = true;
+            this.RepairComplete.Click += new System.EventHandler(this.RepairComplete_Click);
             // 
-            // BadCodeGrid
+            // RefreshTreeView
             // 
-            this.BadCodeGrid.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
-            this.BadCodeGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            this.BadCodeGrid.Location = new System.Drawing.Point(12, 188);
-            this.BadCodeGrid.Name = "BadCodeGrid";
-            this.BadCodeGrid.RowHeadersWidth = 20;
-            this.BadCodeGrid.RowTemplate.Height = 27;
-            this.BadCodeGrid.Size = new System.Drawing.Size(214, 540);
-            this.BadCodeGrid.TabIndex = 118;
-            this.BadCodeGrid.RowHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.BadCodeGrid_RowHeaderMouseClick);
+            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
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1320, 740);
-            this.Controls.Add(this.BadCodeGrid);
+            this.Controls.Add(this.RefreshTreeView);
+            this.Controls.Add(this.BadCodeTree);
             this.Controls.Add(this.panel3);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.listView2);
@@ -879,16 +897,16 @@
             this.Controls.Add(this.mb_soncode_label);
             this.Controls.Add(this.mb_badlocation);
             this.Controls.Add(this.mb_badlocation_label);
-            this.Controls.Add(this.enterTextBox7);
-            this.Controls.Add(this.label7);
+            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.enterTextBox5);
-            this.Controls.Add(this.label5);
-            this.Controls.Add(this.enterTextBox4);
-            this.Controls.Add(this.label4);
-            this.Controls.Add(this.enterTextBox3);
-            this.Controls.Add(this.label3);
+            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_brgcode_label);
             this.Controls.Add(this.enterTextBox2);
             this.Controls.Add(this.enterTextBox1);
             this.Controls.Add(this.bc_remark);
@@ -923,7 +941,7 @@
             this.SizeChanged += new System.EventHandler(this.Make_Repair_SizeChanged);
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.BadCodeGrid)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -956,16 +974,16 @@
         private CustomControl.TextBoxWithIcon.TextBoxWithTextArea bc_remark;
         private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox1;
         private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox2;
-        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox3;
-        private System.Windows.Forms.Label label3;
-        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox4;
-        private System.Windows.Forms.Label label4;
-        private CustomControl.TextBoxWithIcon.EnterTextBox enterTextBox5;
-        private System.Windows.Forms.Label label5;
+        private CustomControl.TextBoxWithIcon.EnterTextBox mbr_brgcode;
+        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 enterTextBox7;
-        private System.Windows.Forms.Label label7;
+        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;
@@ -983,6 +1001,7 @@
         private System.Windows.Forms.ColumnHeader columnHeader2;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Panel panel3;
-        private CustomControl.DataGrid_View.DataGridViewExpand BadCodeGrid;
+        private System.Windows.Forms.TreeView BadCodeTree;
+        private CustomControl.ClickPicBox.ClickPicBox RefreshTreeView;
     }
 }

+ 60 - 3
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -4,6 +4,7 @@ using System.Data;
 using System.Drawing;
 using System.Text;
 using System.Windows.Forms;
+using UAS_MES.CustomControl.DataGrid_View;
 using UAS_MES.DataOperate;
 using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
@@ -29,6 +30,8 @@ namespace UAS_MES.Make
         //是否获取过下拉框数据
         bool GetSelectData = false;
 
+        List<DataGridViewRow> dgvr = new List<DataGridViewRow>();
+
         DataHelper dh = null;
 
         LogStringBuilder sql = new LogStringBuilder();
@@ -57,14 +60,24 @@ namespace UAS_MES.Make
 
         private void 维修作业_Load(object sender, EventArgs e)
         {
-            //添加不良信息的静态数据
+            dh = new DataHelper();
             asc.controllInitializeSize(this);
+            GetSNCode.Focus();
         }
 
         private void GetSNCode_KeyDown(object sender, KeyEventArgs e)
         {
             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++)
+                {
+                    //添加根节点
+                    TreeNode tnode = new TreeNode();
+                    tnode.Text = dt.Rows[i]["mb_bgcode"].ToString();
+                    BadCodeTree.Nodes.Add(tnode);
+                }
+            }
         }
 
         private void Make_Repair_SizeChanged(object sender, EventArgs e)
@@ -72,7 +85,51 @@ namespace UAS_MES.Make
             asc.controlAutoSize(this);
         }
 
-        private void BadCodeGrid_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
+        private void BadCodeTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
+        {
+            e.Node.Nodes.Clear();
+            if (!e.Node.Text.Contains("DefaultValue"))
+            {
+                dt = (DataTable)dh.ExecuteSql("select mbr_brgcode||':'||mbr_code from makebadreason", "select");
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    TreeNode tnode = new TreeNode();
+                    e.Node.Nodes.Add(tnode);
+                }
+            }
+        }
+
+        private void RefreshTreeView_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void RepairComplete_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void Scrap_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void NewBadCode_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void NewRepairInf_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void SaveRepairInf_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void DeleteRepairInf_Click(object sender, EventArgs e)
         {
 
         }

+ 117 - 107
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -34,12 +34,6 @@
             this.bc_remark_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
             this.bc_groupcode_label = new System.Windows.Forms.Label();
-            this.mc_restqty_label = new System.Windows.Forms.Label();
-            this.mcd_inqty_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.pr_detail_label = new System.Windows.Forms.Label();
-            this.ms_makecode_label = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.GoodProduct = new System.Windows.Forms.RadioButton();
@@ -56,6 +50,15 @@
             this.columnHeader3 = ((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.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_prodcode_label = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.mcd_inqty_label = new System.Windows.Forms.Label();
+            this.mc_restqty_label = new System.Windows.Forms.Label();
+            this.bc_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES.CustomControl.CustomCheckBox.LockCheckBox();
             this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -71,8 +74,6 @@
             this.bc_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bc_groupcode = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.bc_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.AutoBadCode = new System.Windows.Forms.CheckBox();
             this.panel2.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -97,7 +98,7 @@
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 0;
-            this.label1.Text = "基本信息";
+            this.label1.Text = "工单信息";
             // 
             // bc_remark_label
             // 
@@ -132,83 +133,17 @@
             this.bc_groupcode_label.TabIndex = 24;
             this.bc_groupcode_label.Text = "不良组别";
             // 
-            // mc_restqty_label
-            // 
-            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.Location = new System.Drawing.Point(785, 109);
-            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.Size = new System.Drawing.Size(92, 27);
-            this.mc_restqty_label.TabIndex = 17;
-            this.mc_restqty_label.Text = "待采集数";
-            // 
-            // mcd_inqty_label
-            // 
-            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.Location = new System.Drawing.Point(451, 109);
-            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.Size = new System.Drawing.Size(92, 27);
-            this.mcd_inqty_label.TabIndex = 14;
-            this.mcd_inqty_label.Text = "已采集数";
-            // 
-            // ma_qty_label
-            // 
-            this.ma_qty_label.AutoSize = true;
-            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(26, 109);
-            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
-            this.ma_qty_label.TabIndex = 11;
-            this.ma_qty_label.Text = "工单数量";
-            // 
-            // ma_prodcode_label
-            // 
-            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.Location = new System.Drawing.Point(454, 59);
-            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.Size = new System.Drawing.Size(92, 27);
-            this.ma_prodcode_label.TabIndex = 7;
-            this.ma_prodcode_label.Text = "产品编号";
-            // 
-            // pr_detail_label
-            // 
-            this.pr_detail_label.AutoSize = true;
-            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(785, 59);
-            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.Size = new System.Drawing.Size(92, 27);
-            this.pr_detail_label.TabIndex = 6;
-            this.pr_detail_label.Text = "产品名称";
-            // 
-            // ms_makecode_label
-            // 
-            this.ms_makecode_label.AutoSize = true;
-            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(26, 59);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
-            this.ms_makecode_label.TabIndex = 2;
-            this.ms_makecode_label.Text = "归属工单";
-            // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(26, 162);
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.ForeColor = System.Drawing.Color.Black;
+            this.label2.Location = new System.Drawing.Point(16, 164);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
             this.label2.TabIndex = 0;
-            this.label2.Text = "信息采集";
+            this.label2.Text = "采集信息";
             // 
             // label3
             // 
@@ -254,6 +189,7 @@
             this.WaitRejectList.CheckBoxes = true;
             this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
             this.columnHeader5,
+            this.columnHeader4,
             this.columnHeader1,
             this.columnHeader2});
             this.WaitRejectList.Location = new System.Drawing.Point(29, 337);
@@ -272,13 +208,14 @@
             // columnHeader1
             // 
             this.columnHeader1.Text = "不良代码";
+            this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             this.columnHeader1.Width = 80;
             // 
             // columnHeader2
             // 
             this.columnHeader2.Text = "备注";
             this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader2.Width = 190;
+            this.columnHeader2.Width = 175;
             // 
             // label4
             // 
@@ -350,7 +287,105 @@
             // 
             this.columnHeader8.Text = "备注";
             this.columnHeader8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            this.columnHeader8.Width = 100;
+            this.columnHeader8.Width = 194;
+            // 
+            // AutoBadCode
+            // 
+            this.AutoBadCode.AutoSize = true;
+            this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AutoBadCode.Location = new System.Drawing.Point(126, 309);
+            this.AutoBadCode.Name = "AutoBadCode";
+            this.AutoBadCode.Size = new System.Drawing.Size(151, 24);
+            this.AutoBadCode.TabIndex = 69;
+            this.AutoBadCode.Text = "自动产生不良代码";
+            this.AutoBadCode.UseVisualStyleBackColor = true;
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "不良代码组";
+            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader4.Width = 100;
+            // 
+            // ma_qty_label
+            // 
+            this.ma_qty_label.AutoSize = true;
+            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty_label.Location = new System.Drawing.Point(26, 109);
+            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_qty_label.Name = "ma_qty_label";
+            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
+            this.ma_qty_label.TabIndex = 11;
+            this.ma_qty_label.Text = "工单数量";
+            // 
+            // ma_prodcode_label
+            // 
+            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.Location = new System.Drawing.Point(454, 59);
+            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.Size = new System.Drawing.Size(92, 27);
+            this.ma_prodcode_label.TabIndex = 7;
+            this.ma_prodcode_label.Text = "产品编号";
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(785, 59);
+            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.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.TabIndex = 6;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(26, 59);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_makecode_label.TabIndex = 2;
+            this.ms_makecode_label.Text = "归属工单";
+            // 
+            // mcd_inqty_label
+            // 
+            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.Location = new System.Drawing.Point(451, 109);
+            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.Size = new System.Drawing.Size(92, 27);
+            this.mcd_inqty_label.TabIndex = 14;
+            this.mcd_inqty_label.Text = "已采集数";
+            // 
+            // mc_restqty_label
+            // 
+            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.Location = new System.Drawing.Point(785, 109);
+            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.Size = new System.Drawing.Size(92, 27);
+            this.mc_restqty_label.TabIndex = 17;
+            this.mc_restqty_label.Text = "待采集数";
+            // 
+            // bc_code
+            // 
+            this.bc_code.AllPower = null;
+            this.bc_code.BackColor = System.Drawing.Color.White;
+            this.bc_code.ID = null;
+            this.bc_code.Location = new System.Drawing.Point(159, 261);
+            this.bc_code.Name = "bc_code";
+            this.bc_code.Power = null;
+            this.bc_code.Size = new System.Drawing.Size(251, 25);
+            this.bc_code.Str = null;
+            this.bc_code.Str1 = null;
+            this.bc_code.Str2 = null;
+            this.bc_code.TabIndex = 68;
+            this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
             // 
             // ma_code
             // 
@@ -548,32 +583,6 @@
             this.ms_sncode.Tag = "IfWrite";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
-            // bc_code
-            // 
-            this.bc_code.AllPower = null;
-            this.bc_code.BackColor = System.Drawing.Color.White;
-            this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(159, 261);
-            this.bc_code.Name = "bc_code";
-            this.bc_code.Power = null;
-            this.bc_code.Size = new System.Drawing.Size(251, 25);
-            this.bc_code.Str = null;
-            this.bc_code.Str1 = null;
-            this.bc_code.Str2 = null;
-            this.bc_code.TabIndex = 68;
-            this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
-            // 
-            // AutoBadCode
-            // 
-            this.AutoBadCode.AutoSize = true;
-            this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(126, 309);
-            this.AutoBadCode.Name = "AutoBadCode";
-            this.AutoBadCode.Size = new System.Drawing.Size(151, 24);
-            this.AutoBadCode.TabIndex = 69;
-            this.AutoBadCode.Text = "自动产生不良代码";
-            this.AutoBadCode.UseVisualStyleBackColor = true;
-            // 
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -676,5 +685,6 @@
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
         private CustomControl.TextBoxWithIcon.EnterTextBox bc_code;
         private System.Windows.Forms.CheckBox AutoBadCode;
+        private System.Windows.Forms.ColumnHeader columnHeader4;
     }
 }

+ 9 - 6
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -183,12 +183,12 @@ namespace UAS_MES.Make
         private void LoadBadCodeListView()
         {
             sql.Clear();
-            sql.Append("select bc_code,bc_name from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + bc_groupcode.Text + "'");
+            sql.Append("select bg_code,bc_name,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + bc_groupcode.Text + "' and bg_code is not null");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             //如果未获取到不良代码则去除限制条件获取全部的
             if (dt.Rows.Count == 0)
             {
-                dt = (DataTable)dh.ExecuteSql("select bc_code,bc_name  from badcode left join badgroup on bc_groupcode=bg_code", "select");
+                dt = (DataTable)dh.ExecuteSql("select bg_code,bc_name,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bg_code is not null", "select");
             }
             //往listview中添加数据
             WaitRejectList.Items.Clear();
@@ -252,11 +252,13 @@ namespace UAS_MES.Make
             int RejectCount = ChoosedRejectList.Items.Count;
             string[] bccode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
             string[] bcremark = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
+            string[] bgcode = new string[bc_code.Text == "" ? RejectCount : RejectCount + 1];
             string ErrorMessage = "";
             if (AutoBadCode.Checked)
             {
                 bccode = new string[] { "DefalutValue" };
                 bcremark = new string[] { "DefalutValue" };
+                bgcode = new string[] { "DefaultValue" };
             }
             else
             {
@@ -271,6 +273,7 @@ namespace UAS_MES.Make
                     //如果长度不相等表示用户自行填写了
                     if (bccode.Length != RejectCount)
                     {
+                        bgcode[0] = bc_groupcode.Text;
                         bccode[0] = bc_code.Text;
                         bcremark[0] = bc_remark.Text;
                     }
@@ -279,17 +282,17 @@ namespace UAS_MES.Make
                     {
                         if (!(bccode[0] == ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text))
                         {
-
+                            bgcode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text;
                             //获取所有的不良代码
-                            bccode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[1].Text;
+                            bccode[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[2].Text;
                             //获取所有的不良备注
-                            bcremark[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[2].Text;
+                            bcremark[i] = ChoosedRejectList.Items[bc_code.Text == "" ? i : i - 1].SubItems[3].Text;
                         }
                     }
                 }
             }
             //不良信息采集
-            if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserName, User.UserSourceCode, "检查未通过", bccode, bcremark, out ErrorMessage))
+            if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserName, User.UserSourceCode, "检查未通过", bgcode, bccode, bcremark, out ErrorMessage))
             {
                 OperateResult.AppendText(">>" + ms_sncode.Text + "已采集为不良\n", Color.Green);
                 //清除不良信息

+ 10 - 0
UAS-MES/Properties/Resources.Designer.cs

@@ -580,6 +580,16 @@ namespace UAS_MES.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap refresh {
+            get {
+                object obj = ResourceManager.GetObject("refresh", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 3 - 0
UAS-MES/Properties/Resources.resx

@@ -313,4 +313,7 @@
   <data name="lock_open_24px" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\lock_open_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

+ 3 - 2
UAS-MES/PublicMethod/BaseUtil.cs

@@ -76,6 +76,9 @@ namespace UAS_MES.PublicMethod
             {
                 for (int i = 0; i < collection.Count; i++)
                 {
+                    //如果含有子控件则进行递归调用
+                    if (collection[i].Controls.Count > 0)
+                        SetFormValue(collection[i].Controls, dt);
                     string controlName = collection[i].Name;
                     string controlsTag = collection[i].Tag == null ? "" : collection[i].Tag.ToString();
                     //默认给TextBox和Label赋值
@@ -121,9 +124,7 @@ namespace UAS_MES.PublicMethod
                                     }
                                 }
                                 else
-                                {
                                     collection[i].Text = dt.Rows[0][j].ToString();
-                                }
                             }
                         }
                     }

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

@@ -1071,7 +1071,7 @@ namespace UAS_MES.PublicMethod
         /// <param name="iBadRemark"></param>
         /// <param name="oErrorMessage"></param>
         /// <returns></returns>
-        public static bool SetTestNGDetail(string iSnCode, string iMakeCode, string iUserName, string iSourceCode, string iResult, 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 = "";
             string StepCode = "";
@@ -1083,11 +1083,11 @@ namespace UAS_MES.PublicMethod
             GetStepCodeAndNameBySource(iSourceCode, ref StepCode, ref StepName);
             sql.Clear();
             sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,");
-            sql.Append("mb_indate,mb_stepcode,mb_sourcecode,mb_badcode,mb_badtable,mb_soncode,mb_status,mb_badremark)");
-            sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserName + "',sysdate,'" + StepCode + "',ms_sourcecode,:bc_code,'',");
+            sql.Append("mb_indate,mb_stepcode,mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_status,mb_badremark)");
+            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_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + iSnCode + "'");
-            dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bc_remark" }, iBadCode, iBadRemark);
+            dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bc_remark", "bg_code" }, iBadCode, iBadRemark, iBadGroupCode);
             //更新序列号状态,待维修,返修工序
             string st_rstepcode = dh.getFieldDataByCondition("step", "st_rstepcode", "st_code='" + StepCode + "'").ToString();
             sql.Clear();

二進制
UAS-MES/Resources/refresh.png


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

@@ -1101,6 +1101,7 @@
     <Content Include="Resources\People_48px_500819_easyicon.net.png" />
     <Content Include="Resources\plus.gif" />
     <Content Include="Resources\preview_16px_25980_easyicon.net.png" />
+    <None Include="Resources\refresh.png" />
     <Content Include="Resources\search_16px_1202802_easyicon.net.png" />
     <Content Include="Resources\Sound\Windows Background.wav" />
     <Content Include="Resources\two_arrow_left.png" />