Browse Source

修改内容提交,亿道,欧度利方,品网

callm 3 years ago
parent
commit
8f043f6ff1

+ 66 - 69
UAS_MES_ODLF/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -50,6 +50,12 @@
             this.sir_remark_label = new System.Windows.Forms.CheckBox();
             this.NoteForChange = new System.Windows.Forms.CheckBox();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
+            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.CheckFirstSN = new System.Windows.Forms.CheckBox();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -57,12 +63,6 @@
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.sir_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
@@ -343,9 +343,69 @@
             this.LabelDataGridView.Size = new System.Drawing.Size(1282, 454);
             this.LabelDataGridView.TabIndex = 193;
             // 
+            // 序号
+            // 
+            this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.序号.DataPropertyName = "sp_detno";
+            this.序号.HeaderText = "序号";
+            this.序号.Name = "序号";
+            this.序号.ReadOnly = true;
+            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.序号.Width = 70;
+            // 
+            // cm_makecode
+            // 
+            this.cm_makecode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
+            this.cm_makecode.DataPropertyName = "sp_fsoncode";
+            this.cm_makecode.HeaderText = "上料料号";
+            this.cm_makecode.Name = "cm_makecode";
+            this.cm_makecode.ReadOnly = true;
+            this.cm_makecode.Width = 5;
+            // 
+            // pr_detail_
+            // 
+            this.pr_detail_.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.pr_detail_.DataPropertyName = "pr_spec";
+            this.pr_detail_.HeaderText = "上料名称";
+            this.pr_detail_.Name = "pr_detail_";
+            this.pr_detail_.ReadOnly = true;
+            this.pr_detail_.Width = 5;
+            // 
+            // cm_soncode
+            // 
+            this.cm_soncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.cm_soncode.DataPropertyName = "sp_prefix";
+            this.cm_soncode.HeaderText = "前缀";
+            this.cm_soncode.Name = "cm_soncode";
+            this.cm_soncode.ReadOnly = true;
+            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_soncode.Width = 5;
+            // 
+            // cm_barcode
+            // 
+            this.cm_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
+            this.cm_barcode.DataPropertyName = "sp_length";
+            this.cm_barcode.HeaderText = "长度";
+            this.cm_barcode.Name = "cm_barcode";
+            this.cm_barcode.ReadOnly = true;
+            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.cm_barcode.Width = 64;
+            // 
+            // BarCode
+            // 
+            this.BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
+            this.BarCode.HeaderText = "条码号";
+            this.BarCode.MinimumWidth = 300;
+            this.BarCode.Name = "BarCode";
+            this.BarCode.ReadOnly = true;
+            this.BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.BarCode.Width = 300;
+            // 
             // CheckFirstSN
             // 
             this.CheckFirstSN.AutoSize = true;
+            this.CheckFirstSN.Checked = true;
+            this.CheckFirstSN.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CheckFirstSN.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CheckFirstSN.Location = new System.Drawing.Point(354, 720);
             this.CheckFirstSN.Margin = new System.Windows.Forms.Padding(6);
@@ -372,7 +432,6 @@
             this.dataGridViewTextBoxColumn2.HeaderText = "上料名称";
             this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
             this.dataGridViewTextBoxColumn2.ReadOnly = true;
-            this.dataGridViewTextBoxColumn2.Width = 5;
             // 
             // dataGridViewTextBoxColumn3
             // 
@@ -382,7 +441,6 @@
             this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
             this.dataGridViewTextBoxColumn3.ReadOnly = true;
             this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn3.Width = 5;
             // 
             // dataGridViewTextBoxColumn4
             // 
@@ -392,7 +450,6 @@
             this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
             this.dataGridViewTextBoxColumn4.ReadOnly = true;
             this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn4.Width = 5;
             // 
             // dataGridViewTextBoxColumn5
             // 
@@ -403,7 +460,6 @@
             this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
             this.dataGridViewTextBoxColumn5.ReadOnly = true;
             this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn5.Width = 64;
             // 
             // dataGridViewTextBoxColumn6
             // 
@@ -413,65 +469,6 @@
             this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
             this.dataGridViewTextBoxColumn6.ReadOnly = true;
             this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.dataGridViewTextBoxColumn6.Width = 300;
-            // 
-            // 序号
-            // 
-            this.序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.序号.DataPropertyName = "sp_detno";
-            this.序号.HeaderText = "序号";
-            this.序号.Name = "序号";
-            this.序号.ReadOnly = true;
-            this.序号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.序号.Width = 70;
-            // 
-            // cm_makecode
-            // 
-            this.cm_makecode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
-            this.cm_makecode.DataPropertyName = "sp_fsoncode";
-            this.cm_makecode.HeaderText = "上料料号";
-            this.cm_makecode.Name = "cm_makecode";
-            this.cm_makecode.ReadOnly = true;
-            this.cm_makecode.Width = 5;
-            // 
-            // pr_detail_
-            // 
-            this.pr_detail_.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.pr_detail_.DataPropertyName = "pr_spec";
-            this.pr_detail_.HeaderText = "上料名称";
-            this.pr_detail_.Name = "pr_detail_";
-            this.pr_detail_.ReadOnly = true;
-            this.pr_detail_.Width = 5;
-            // 
-            // cm_soncode
-            // 
-            this.cm_soncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.cm_soncode.DataPropertyName = "sp_prefix";
-            this.cm_soncode.HeaderText = "前缀";
-            this.cm_soncode.Name = "cm_soncode";
-            this.cm_soncode.ReadOnly = true;
-            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.cm_soncode.Width = 5;
-            // 
-            // cm_barcode
-            // 
-            this.cm_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
-            this.cm_barcode.DataPropertyName = "sp_length";
-            this.cm_barcode.HeaderText = "长度";
-            this.cm_barcode.Name = "cm_barcode";
-            this.cm_barcode.ReadOnly = true;
-            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.cm_barcode.Width = 64;
-            // 
-            // BarCode
-            // 
-            this.BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
-            this.BarCode.HeaderText = "条码号";
-            this.BarCode.MinimumWidth = 300;
-            this.BarCode.Name = "BarCode";
-            this.BarCode.ReadOnly = true;
-            this.BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.BarCode.Width = 300;
             // 
             // sir_remark
             // 

+ 0 - 18
UAS_MES_ODLF/FunctionCode/Make/Make_FeedingCollection.resx

@@ -135,24 +135,6 @@
   <metadata name="BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail_.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="BarCode.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" />
   <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 1 - 1
UAS_MES_ODLF/FunctionCode/Make/Make_RePrintLabel.cs

@@ -175,7 +175,7 @@ namespace UAS_MES_NEW.Make
             else
                 type = "卡通箱标";
 
-            getlabel = @"select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,'C:\打印标签\机身标.lab' la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault";
+            getlabel = @"select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault";
 
             listA = (DataTable)dh.ExecuteSql(getlabel, "select");
             if (listA.Rows.Count == 0)

+ 41 - 3
UAS_MES_ODLF/FunctionCode/Query/Query_DateRate.Designer.cs

@@ -39,13 +39,15 @@
             this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.Miss_Test = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
+            this.label2 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // BeginDate
             // 
             this.BeginDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
             this.BeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
-            this.BeginDate.Location = new System.Drawing.Point(325, 216);
+            this.BeginDate.Location = new System.Drawing.Point(325, 276);
             this.BeginDate.Name = "BeginDate";
             this.BeginDate.Size = new System.Drawing.Size(353, 35);
             this.BeginDate.TabIndex = 13;
@@ -55,7 +57,7 @@
             // 
             this.EndDate.CustomFormat = "yyyy-MM-dd HH:mm:ss";
             this.EndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
-            this.EndDate.Location = new System.Drawing.Point(684, 216);
+            this.EndDate.Location = new System.Drawing.Point(684, 276);
             this.EndDate.Name = "EndDate";
             this.EndDate.Size = new System.Drawing.Size(353, 35);
             this.EndDate.TabIndex = 14;
@@ -64,7 +66,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(139, 211);
+            this.label3.Location = new System.Drawing.Point(139, 271);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(82, 41);
@@ -173,11 +175,45 @@
             this.Miss_Test.UseVisualStyleBackColor = false;
             this.Miss_Test.Click += new System.EventHandler(this.Miss_Test_Click);
             // 
+            // li_code
+            // 
+            this.li_code.AllPower = "IFALL";
+            this.li_code.Caller = null;
+            this.li_code.Condition = null;
+            this.li_code.DBTitle = "";
+            this.li_code.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.li_code.FormName = null;
+            this.li_code.Location = new System.Drawing.Point(324, 210);
+            this.li_code.Margin = new System.Windows.Forms.Padding(6);
+            this.li_code.Name = "li_code";
+            this.li_code.Power = "";
+            this.li_code.ReturnData = null;
+            this.li_code.SelectField = null;
+            this.li_code.SetValueField = null;
+            this.li_code.Size = new System.Drawing.Size(282, 46);
+            this.li_code.TabIndex = 218;
+            this.li_code.TableName = null;
+            this.li_code.Tag = "makecode";
+            this.li_code.TextBoxEnable = true;
+            // 
+            // 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.Location = new System.Drawing.Point(139, 210);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 217;
+            this.label2.Text = "线别编号";
+            // 
             // Query_DateRate
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1494, 1075);
+            this.Controls.Add(this.li_code);
+            this.Controls.Add(this.label2);
             this.Controls.Add(this.Miss_Test);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.label1);
@@ -210,5 +246,7 @@
         private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
         private System.Windows.Forms.Label label1;
         private CustomControl.ButtonUtil.NormalButton Miss_Test;
+        private CustomControl.TextBoxWithIcon.SearchTextBox li_code;
+        private System.Windows.Forms.Label label2;
     }
 }

+ 15 - 0
UAS_MES_ODLF/FunctionCode/Query/Query_DateRate.cs

@@ -57,6 +57,10 @@ namespace UAS_MES_NEW.Query
                 {
                     condition += " and sp_makecode = '" + ma_code.Text + "'";
                 }
+                if (li_code.Text != "")
+                {
+                    condition += " and sp_linecode = '" + li_code.Text + "'";
+                }
                 LogicHandler.GetQuerySql(condition, out v_sql, out v_sql1);
 
                 DataTable dt = (DataTable)dh.ExecuteSql(v_sql + v_sql1, "select");
@@ -88,6 +92,13 @@ namespace UAS_MES_NEW.Query
             ma_code.SetValueField = new string[] { "ma_code" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += pr_code_DbChange;
+
+            li_code.TableName = " line ";
+            li_code.SelectField = "li_code # 线别编号,li_name # 线别名称";
+            li_code.FormName = Name;
+            li_code.SetValueField = new string[] { "li_code" };
+            li_code.Condition = "li_code is not null";
+            li_code.DbChange += pr_code_DbChange;
         }
 
         private void pr_code_DbChange(object sender, EventArgs e)
@@ -113,6 +124,10 @@ namespace UAS_MES_NEW.Query
                 {
                     condition += " and sp_makecode = '" + ma_code.Text + "'";
                 }
+                if (li_code.Text != "")
+                {
+                    condition += " and sp_linecode = '" + li_code.Text + "'";
+                }
                 LogicHandler.GetMissItemQuerySql(condition, out v_sql, out v_sql1);
                 DataTable dt = (DataTable)dh.ExecuteSql(v_sql, "select");
                 LogicHandler.GetMissFiveQuerySql(condition, out v_sql, out v_sql1);

+ 143 - 113
UAS_MES_PW/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -61,18 +61,22 @@ namespace UAS_MES_NEW.Make
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mc_restqty_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.mcd_totalng = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label9 = new System.Windows.Forms.Label();
+            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label8 = new System.Windows.Forms.Label();
             this.mcd_ngqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.label1 = new System.Windows.Forms.Label();
-            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label7 = new System.Windows.Forms.Label();
             this.ob_checkno = new System.Windows.Forms.Label();
             this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label7 = new System.Windows.Forms.Label();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
             this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
             this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
@@ -100,10 +104,8 @@ namespace UAS_MES_NEW.Make
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.WriteSoftWare = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
             this.SoftWarePath = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label8 = new System.Windows.Forms.Label();
-            this.mcd_totalng = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label9 = new System.Windows.Forms.Label();
+            this.ms_badtimes = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label10 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             this.SuspendLayout();
@@ -390,6 +392,8 @@ namespace UAS_MES_NEW.Make
             // panel1
             // 
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.ms_badtimes);
+            this.panel1.Controls.Add(this.label10);
             this.panel1.Controls.Add(this.mcd_totalng);
             this.panel1.Controls.Add(this.label9);
             this.panel1.Controls.Add(this.mcd_okqty);
@@ -397,7 +401,6 @@ namespace UAS_MES_NEW.Make
             this.panel1.Controls.Add(this.mcd_ngqty);
             this.panel1.Controls.Add(this.label1);
             this.panel1.Controls.Add(this.ob_checkno);
-            this.panel1.Controls.Add(this.SendCheck);
             this.panel1.Controls.Add(this.ob_batchqty);
             this.panel1.Controls.Add(this.mcd_remainqty);
             this.panel1.Controls.Add(this.mc_restqty_label);
@@ -409,6 +412,54 @@ namespace UAS_MES_NEW.Make
             this.panel1.Size = new System.Drawing.Size(628, 252);
             this.panel1.TabIndex = 71;
             // 
+            // mcd_totalng
+            // 
+            this.mcd_totalng.AutoSize = true;
+            this.mcd_totalng.CutLength = null;
+            this.mcd_totalng.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_totalng.Location = new System.Drawing.Point(228, 182);
+            this.mcd_totalng.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_totalng.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_totalng.Name = "mcd_totalng";
+            this.mcd_totalng.Size = new System.Drawing.Size(0, 41);
+            this.mcd_totalng.TabIndex = 84;
+            this.mcd_totalng.Tag = "mcd_inqty";
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(32, 182);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(178, 41);
+            this.label9.TabIndex = 83;
+            this.label9.Text = "累计不良数";
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.CutLength = null;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty.Location = new System.Drawing.Point(499, 99);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_okqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_okqty.TabIndex = 82;
+            this.mcd_okqty.Tag = "mcd_inqty";
+            // 
+            // 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(318, 99);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(114, 41);
+            this.label8.TabIndex = 81;
+            this.label8.Text = "良品数";
+            // 
             // mcd_ngqty
             // 
             this.mcd_ngqty.AutoSize = true;
@@ -433,34 +484,6 @@ namespace UAS_MES_NEW.Make
             this.label1.TabIndex = 79;
             this.label1.Text = "当前不良数";
             // 
-            // ob_sendqty
-            // 
-            this.ob_sendqty.AutoSize = true;
-            this.ob_sendqty.CutLength = null;
-            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_sendqty.Location = new System.Drawing.Point(860, 241);
-            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 41);
-            this.ob_sendqty.TabIndex = 78;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            this.ob_sendqty.Visible = false;
-            // 
-            // label7
-            // 
-            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(674, 241);
-            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(146, 41);
-            this.label7.TabIndex = 77;
-            this.label7.Text = "已送检数";
-            this.label7.Visible = false;
-            // 
             // ob_checkno
             // 
             this.ob_checkno.AutoSize = true;
@@ -483,7 +506,7 @@ namespace UAS_MES_NEW.Make
             this.SendCheck.Enabled = false;
             this.SendCheck.Image = null;
             this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(458, 180);
+            this.SendCheck.Location = new System.Drawing.Point(1114, 302);
             this.SendCheck.Margin = new System.Windows.Forms.Padding(4);
             this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
             this.SendCheck.Name = "SendCheck";
@@ -509,6 +532,60 @@ namespace UAS_MES_NEW.Make
             this.ob_batchqty.TabIndex = 75;
             this.ob_batchqty.Tag = "ob_batchqty";
             // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
+            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(229, 24);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            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(496, 24);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(860, 241);
+            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 41);
+            this.ob_sendqty.TabIndex = 78;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            this.ob_sendqty.Visible = false;
+            // 
+            // label7
+            // 
+            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(674, 241);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 77;
+            this.label7.Text = "已送检数";
+            this.label7.Visible = false;
+            // 
             // ob_batchqty_label
             // 
             this.ob_batchqty_label.AutoSize = true;
@@ -550,32 +627,6 @@ namespace UAS_MES_NEW.Make
             this.ob_nowcheckqty_label.Text = "当前批数";
             this.ob_nowcheckqty_label.Visible = false;
             // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.CutLength = null;
-            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(229, 24);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 41);
-            this.mcd_remainqty.TabIndex = 57;
-            this.mcd_remainqty.Tag = "mcd_remainqty";
-            // 
-            // mcd_inqty
-            // 
-            this.mcd_inqty.AutoSize = true;
-            this.mcd_inqty.CutLength = null;
-            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(496, 24);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
-            this.mcd_inqty.TabIndex = 54;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -910,53 +961,29 @@ namespace UAS_MES_NEW.Make
             this.SoftWarePath.Str2 = null;
             this.SoftWarePath.TabIndex = 196;
             // 
-            // mcd_okqty
-            // 
-            this.mcd_okqty.AutoSize = true;
-            this.mcd_okqty.CutLength = null;
-            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty.Location = new System.Drawing.Point(499, 99);
-            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_okqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(0, 41);
-            this.mcd_okqty.TabIndex = 82;
-            this.mcd_okqty.Tag = "mcd_inqty";
-            // 
-            // 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(318, 99);
-            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(114, 41);
-            this.label8.TabIndex = 81;
-            this.label8.Text = "良品数";
-            // 
-            // mcd_totalng
-            // 
-            this.mcd_totalng.AutoSize = true;
-            this.mcd_totalng.CutLength = null;
-            this.mcd_totalng.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_totalng.Location = new System.Drawing.Point(228, 182);
-            this.mcd_totalng.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_totalng.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_totalng.Name = "mcd_totalng";
-            this.mcd_totalng.Size = new System.Drawing.Size(0, 41);
-            this.mcd_totalng.TabIndex = 84;
-            this.mcd_totalng.Tag = "mcd_inqty";
-            // 
-            // label9
-            // 
-            this.label9.AutoSize = true;
-            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(32, 182);
-            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(178, 41);
-            this.label9.TabIndex = 83;
-            this.label9.Text = "累计不良数";
+            // ms_badtimes
+            // 
+            this.ms_badtimes.AutoSize = true;
+            this.ms_badtimes.CutLength = null;
+            this.ms_badtimes.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_badtimes.Location = new System.Drawing.Point(517, 182);
+            this.ms_badtimes.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_badtimes.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ms_badtimes.Name = "ms_badtimes";
+            this.ms_badtimes.Size = new System.Drawing.Size(0, 41);
+            this.ms_badtimes.TabIndex = 86;
+            this.ms_badtimes.Tag = "ms_badtimes";
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(321, 182);
+            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(146, 41);
+            this.label10.TabIndex = 85;
+            this.label10.Text = "维修次数";
             // 
             // Make_TestCollection
             // 
@@ -971,6 +998,7 @@ namespace UAS_MES_NEW.Make
             this.Controls.Add(this.label7);
             this.Controls.Add(this.pr_sendchecktype);
             this.Controls.Add(this.ma_salecode);
+            this.Controls.Add(this.SendCheck);
             this.Controls.Add(this.Lock_label);
             this.Controls.Add(this.Filter);
             this.Controls.Add(this.ob_batchqty_label);
@@ -1021,10 +1049,10 @@ namespace UAS_MES_NEW.Make
             this.Load += new System.EventHandler(this.TestCollection_Load);
             this.SizeChanged += new System.EventHandler(this.测试采集_SizeChanged);
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Make_TestCollection_KeyDown);
-            this.panel1.ResumeLayout(true);
+            this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1102,5 +1130,7 @@ namespace UAS_MES_NEW.Make
         private System.Windows.Forms.Label label9;
         private CustomControl.ValueLabel.ValueLabel mcd_okqty;
         private System.Windows.Forms.Label label8;
+        private CustomControl.ValueLabel.ValueLabel ms_badtimes;
+        private System.Windows.Forms.Label label10;
     }
 }

+ 2 - 1
UAS_MES_PW/FunctionCode/Make/Make_TestCollection.cs

@@ -206,12 +206,13 @@ namespace UAS_MES_NEW.Make
                                 LockMakeCode.Checked = true;
                             }
                         }
-                        dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
+                        dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_badtimes,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
                         string status = dt.Rows[0]["ms_status"].ToString();
                         reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
                         string stepcode = dt.Rows[0]["ms_stepcode"].ToString();
                         string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
                         string sncode = dt.Rows[0]["ms_sncode"].ToString();
+                        ms_badtimes.Text = dt.Rows[0]["ms_badtimes"].ToString();
                         if (sncode != ms_sncode.Text)
                         {
                             OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);

+ 6 - 6
UAS_MES_PW/FunctionCode/Make/Make_TestCollection.resx

@@ -117,6 +117,12 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>172, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="SendCheck.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -156,12 +162,6 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <metadata name="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <metadata name="ControlLockTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>172, 17</value>
-  </metadata>
   <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 20 - 20
UAS_MES_PW/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -1048,26 +1048,26 @@ namespace UAS_MES_NEW.Packing
             {
                 if (ms_salecode_text != "")
                 {
-                    DataTable dt = (DataTable)dh.ExecuteSql(" select pn_number,pn_id,pn_caller,pn_numberlength,pn_leadcode  from PACKAGENUMBER where pn_caller='" + pr_code.Text + "'", "select");
-                    if (dt.Rows.Count > 0)
-                    {
-                        string pn_leadcode = dt.Rows[0]["pn_leadcode"].ToString();
-                        int pn_numberlength = int.Parse(dt.Rows[0]["pn_numberlength"].ToString());
-                        if (OutBoxLength.Text != (pn_leadcode.Length + pn_numberlength).ToString())
-                        {
-                            OutBoxLength.Text = (pn_leadcode.Length + pn_numberlength).ToString();
-                            BaseUtil.SetCacheData("OutBoxLength", OutBoxLength.Text);
-                        }
-                        if (PreFix.Text != pn_leadcode)
-                        {
-                            PreFix.Text = pn_leadcode;
-                            BaseUtil.SetCacheData("PreFix", PreFix.Text);
-                        }
-                    }
-                    else
-                    {
-                        OperateResult.AppendText(">>产品" + pr_code.Text + "未维护箱号规则\n", Color.Black);
-                    }
+                    //DataTable dt = (DataTable)dh.ExecuteSql(" select pn_number,pn_id,pn_caller,pn_numberlength,pn_leadcode  from PACKAGENUMBER where pn_caller='" + pr_code.Text + "'", "select");
+                    //if (dt.Rows.Count > 0)
+                    //{
+                    //    string pn_leadcode = dt.Rows[0]["pn_leadcode"].ToString();
+                    //    int pn_numberlength = int.Parse(dt.Rows[0]["pn_numberlength"].ToString());
+                    //    if (OutBoxLength.Text != (pn_leadcode.Length + pn_numberlength).ToString())
+                    //    {
+                    //        OutBoxLength.Text = (pn_leadcode.Length + pn_numberlength).ToString();
+                    //        BaseUtil.SetCacheData("OutBoxLength", OutBoxLength.Text);
+                    //    }
+                    //    if (PreFix.Text != pn_leadcode)
+                    //    {
+                    //        PreFix.Text = pn_leadcode;
+                    //        BaseUtil.SetCacheData("PreFix", PreFix.Text);
+                    //    }
+                    //}
+                    //else
+                    //{
+                    //    OperateResult.AppendText(">>产品" + pr_code.Text + "未维护箱号规则\n", Color.Black);
+                    //}
                 }
                 return true;
             }

+ 1 - 1
UAS_MES_YD/FunctionCode/Make/Make_Repair.cs

@@ -594,7 +594,7 @@ namespace UAS_MES_NEW.Make
                     SQLS.Add("update makebad set mb_status=-1 where (mb_sncode='" + ms_sncode.Text + "' or mb_mscode='" + ms_sncode.Text + "') and mb_makecode='" + ms_makecode.Text + "'");
                     //取消最近拆解部件
                     SQLS.Add("update craftmaterial set cm_lastdeco=0 where cm_sncode='" + ms_sncode.Text + "' and cm_makecode='" + ms_makecode.Text + "' and nvl(cm_lastdeco,0)<>0");
-                   // SQLS.Add("update MakeBadCount set mbc_status=-1 where mbc_sncode='" + ms_sncode.Text + "'");
+                    // SQLS.Add("update MakeBadCount set mbc_status=-1 where mbc_sncode='" + ms_sncode.Text + "'");
                     dh.ExecuteSQLTran(SQLS.ToArray());
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "回流工序", "完成维修回流", User.UserCode);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "回流工序", "完成维修回流", ms_sncode.Text, ms_checkno.Text);

+ 1159 - 0
UAS_MES_YD/FunctionCode/Make/Make_Repair_AfterSale.Designer.cs

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

+ 1021 - 0
UAS_MES_YD/FunctionCode/Make/Make_Repair_AfterSale.cs

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

+ 446 - 0
UAS_MES_YD/FunctionCode/Make/Make_Repair_AfterSale.resx

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

+ 8 - 10
UAS_MES_YD/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -153,17 +153,15 @@ namespace UAS_MES_NEW.Packing
             {
                 if (dh.getFieldDataByCondition("package", "pa_status", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "1")
                 {
-                    dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
-                    for (int i = 0; i < _dt.Rows.Count; i++)
+                    dh.ExecuteSql("update package set pa_printcount=pa_printcount+1,pa_remark='" + PrintLabel.Text + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+
+                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
                     {
-                        if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
-                        {
-                            OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
-                        }
-                        else
-                        {
-                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
-                        }
+                        OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
                     }
                     if (!AutoGenBoxCode.Checked)
                     {

+ 130 - 95
UAS_MES_YD/FunctionCode/Packing/Packing_PalletCollection.Designer.cs

@@ -83,9 +83,10 @@
             // 
             this.pa_outboxcode_label.AutoSize = true;
             this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(4, 42);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(8, 84);
+            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(58, 21);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(114, 41);
             this.pa_outboxcode_label.TabIndex = 102;
             this.pa_outboxcode_label.Text = "栈板号";
             // 
@@ -93,9 +94,10 @@
             // 
             this.pa_totalqty_label.AutoSize = true;
             this.pa_totalqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty_label.Location = new System.Drawing.Point(290, 83);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(580, 166);
+            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_totalqty_label.Name = "pa_totalqty_label";
-            this.pa_totalqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_totalqty_label.Size = new System.Drawing.Size(146, 41);
             this.pa_totalqty_label.TabIndex = 104;
             this.pa_totalqty_label.Text = "已装数量";
             // 
@@ -103,9 +105,10 @@
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(290, 42);
+            this.pa_makecode_label.Location = new System.Drawing.Point(580, 84);
+            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_makecode_label.Size = new System.Drawing.Size(146, 41);
             this.pa_makecode_label.TabIndex = 108;
             this.pa_makecode_label.Text = "制造单号";
             // 
@@ -113,9 +116,10 @@
             // 
             this.pa_restqty_label.AutoSize = true;
             this.pa_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_restqty_label.Location = new System.Drawing.Point(753, 127);
+            this.pa_restqty_label.Location = new System.Drawing.Point(1506, 254);
+            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_restqty_label.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_restqty_label.Size = new System.Drawing.Size(146, 41);
             this.pa_restqty_label.TabIndex = 154;
             this.pa_restqty_label.Text = "打印张数";
             // 
@@ -123,9 +127,10 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(753, 42);
+            this.pa_salecode_label.Location = new System.Drawing.Point(1506, 84);
+            this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_salecode_label.Name = "pa_salecode_label";
-            this.pa_salecode_label.Size = new System.Drawing.Size(42, 21);
+            this.pa_salecode_label.Size = new System.Drawing.Size(82, 41);
             this.pa_salecode_label.TabIndex = 157;
             this.pa_salecode_label.Text = "合同";
             // 
@@ -133,9 +138,10 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(713, 261);
+            this.outboxcode_label.Location = new System.Drawing.Point(1426, 522);
+            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(42, 21);
+            this.outboxcode_label.Size = new System.Drawing.Size(82, 41);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "箱号";
             // 
@@ -143,9 +149,10 @@
             // 
             this.pa_prodcode_label.AutoSize = true;
             this.pa_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode_label.Location = new System.Drawing.Point(482, 42);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(964, 84);
+            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_prodcode_label.Name = "pa_prodcode_label";
-            this.pa_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_prodcode_label.Size = new System.Drawing.Size(146, 41);
             this.pa_prodcode_label.TabIndex = 169;
             this.pa_prodcode_label.Text = "产品编号";
             // 
@@ -153,10 +160,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(845, 83);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(1690, 166);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(119, 20);
+            this.PrintLabel.Size = new System.Drawing.Size(234, 32);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -164,9 +171,10 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(753, 83);
+            this.PrintLabel_label.Location = new System.Drawing.Point(1506, 166);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(74, 21);
+            this.PrintLabel_label.Size = new System.Drawing.Size(146, 41);
             this.PrintLabel_label.TabIndex = 174;
             this.PrintLabel_label.Text = "标签文件";
             // 
@@ -174,9 +182,10 @@
             // 
             this.PrinterList_label.AutoSize = true;
             this.PrinterList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrinterList_label.Location = new System.Drawing.Point(482, 83);
+            this.PrinterList_label.Location = new System.Drawing.Point(964, 166);
+            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrinterList_label.Name = "PrinterList_label";
-            this.PrinterList_label.Size = new System.Drawing.Size(90, 21);
+            this.PrinterList_label.Size = new System.Drawing.Size(178, 41);
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
@@ -184,9 +193,10 @@
             // 
             this.pa_packageqty_label.AutoSize = true;
             this.pa_packageqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_packageqty_label.Location = new System.Drawing.Point(4, 83);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(8, 166);
+            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(146, 41);
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "栈板容量";
             // 
@@ -194,9 +204,10 @@
             // 
             this.AutoOutBoxCode.AutoSize = true;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(8, 16);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(16, 32);
+            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(84, 24);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(155, 39);
             this.AutoOutBoxCode.TabIndex = 180;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -205,9 +216,10 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(868, 174);
+            this.pa_status.Location = new System.Drawing.Point(1736, 348);
+            this.pa_status.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 21);
+            this.pa_status.Size = new System.Drawing.Size(0, 41);
             this.pa_status.TabIndex = 181;
             this.pa_status.Visible = false;
             // 
@@ -215,9 +227,10 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.Cancel.Location = new System.Drawing.Point(912, 259);
+            this.Cancel.Location = new System.Drawing.Point(1824, 518);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(84, 24);
+            this.Cancel.Size = new System.Drawing.Size(155, 39);
             this.Cancel.TabIndex = 185;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
@@ -225,9 +238,10 @@
             // pr_packrule
             // 
             this.pr_packrule.AutoSize = true;
-            this.pr_packrule.Location = new System.Drawing.Point(749, 521);
+            this.pr_packrule.Location = new System.Drawing.Point(1498, 1042);
+            this.pr_packrule.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_packrule.Name = "pr_packrule";
-            this.pr_packrule.Size = new System.Drawing.Size(0, 12);
+            this.pr_packrule.Size = new System.Drawing.Size(0, 24);
             this.pr_packrule.TabIndex = 186;
             this.pr_packrule.Visible = false;
             // 
@@ -235,35 +249,39 @@
             // 
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode.Location = new System.Drawing.Point(844, 42);
+            this.pa_salecode.Location = new System.Drawing.Point(1688, 84);
+            this.pa_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_salecode.Size = new System.Drawing.Size(0, 41);
             this.pa_salecode.TabIndex = 187;
             // 
             // pd_makecode
             // 
             this.pd_makecode.AutoSize = true;
-            this.pd_makecode.Location = new System.Drawing.Point(798, 300);
+            this.pd_makecode.Location = new System.Drawing.Point(1596, 600);
+            this.pd_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pd_makecode.Name = "pd_makecode";
-            this.pd_makecode.Size = new System.Drawing.Size(0, 12);
+            this.pd_makecode.Size = new System.Drawing.Size(0, 24);
             this.pd_makecode.TabIndex = 188;
             this.pd_makecode.Visible = false;
             // 
             // pd_prodcode
             // 
             this.pd_prodcode.AutoSize = true;
-            this.pd_prodcode.Location = new System.Drawing.Point(749, 299);
+            this.pd_prodcode.Location = new System.Drawing.Point(1498, 598);
+            this.pd_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.Size = new System.Drawing.Size(0, 12);
+            this.pd_prodcode.Size = new System.Drawing.Size(0, 24);
             this.pd_prodcode.TabIndex = 189;
             this.pd_prodcode.Visible = false;
             // 
             // pd_salecode
             // 
             this.pd_salecode.AutoSize = true;
-            this.pd_salecode.Location = new System.Drawing.Point(916, 298);
+            this.pd_salecode.Location = new System.Drawing.Point(1832, 596);
+            this.pd_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pd_salecode.Name = "pd_salecode";
-            this.pd_salecode.Size = new System.Drawing.Size(0, 12);
+            this.pd_salecode.Size = new System.Drawing.Size(0, 24);
             this.pd_salecode.TabIndex = 190;
             this.pd_salecode.Visible = false;
             // 
@@ -272,11 +290,11 @@
             this.pa_standardqty.AllPower = null;
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.ID = null;
-            this.pa_standardqty.Location = new System.Drawing.Point(85, 84);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.pa_standardqty.Location = new System.Drawing.Point(170, 168);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Power = null;
-            this.pa_standardqty.Size = new System.Drawing.Size(114, 21);
+            this.pa_standardqty.Size = new System.Drawing.Size(224, 35);
             this.pa_standardqty.Str = null;
             this.pa_standardqty.Str1 = null;
             this.pa_standardqty.Str2 = null;
@@ -289,10 +307,11 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(845, 129);
+            this.PrintNum.Location = new System.Drawing.Point(1690, 258);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(119, 21);
+            this.PrintNum.Size = new System.Drawing.Size(234, 35);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -305,12 +324,13 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(902, 213);
+            this.Packing.Location = new System.Drawing.Point(1804, 426);
+            this.Packing.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
             this.Packing.Power = null;
-            this.Packing.Size = new System.Drawing.Size(56, 24);
+            this.Packing.Size = new System.Drawing.Size(112, 48);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封栈板";
             this.Packing.UseVisualStyleBackColor = true;
@@ -318,10 +338,10 @@
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(592, 83);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrinterList.Location = new System.Drawing.Point(1184, 166);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(132, 20);
+            this.PrinterList.Size = new System.Drawing.Size(264, 40);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -329,10 +349,11 @@
             this.pa_prodcode.AutoSize = true;
             this.pa_prodcode.CutLength = null;
             this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode.Location = new System.Drawing.Point(588, 42);
-            this.pa_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_prodcode.Location = new System.Drawing.Point(1176, 84);
+            this.pa_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_prodcode.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 41);
             this.pa_prodcode.TabIndex = 170;
             this.pa_prodcode.Tag = "1";
             this.pa_prodcode.TextChanged += new System.EventHandler(this.pa_prodcode_TextChanged);
@@ -344,12 +365,13 @@
             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(829, 510);
+            this.Clean.Location = new System.Drawing.Point(1658, 1020);
+            this.Clean.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(60, 24);
+            this.Clean.Size = new System.Drawing.Size(120, 48);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -358,9 +380,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(715, 300);
+            this.OperateResult.Location = new System.Drawing.Point(1430, 600);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(277, 204);
+            this.OperateResult.Size = new System.Drawing.Size(550, 404);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -369,10 +392,11 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(764, 261);
+            this.outboxcode.Location = new System.Drawing.Point(1528, 522);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(132, 21);
+            this.outboxcode.Size = new System.Drawing.Size(260, 35);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -385,10 +409,11 @@
             this.pa_outboxcode.AllPower = "ifall";
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(85, 44);
+            this.pa_outboxcode.Location = new System.Drawing.Point(170, 88);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(173, 21);
+            this.pa_outboxcode.Size = new System.Drawing.Size(342, 35);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -403,12 +428,13 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(826, 213);
+            this.Printlab.Location = new System.Drawing.Point(1652, 426);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
             this.Printlab.Power = null;
-            this.Printlab.Size = new System.Drawing.Size(45, 24);
+            this.Printlab.Size = new System.Drawing.Size(90, 48);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -421,12 +447,13 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(740, 213);
+            this.ReleasePallet.Location = new System.Drawing.Point(1480, 426);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
             this.ReleasePallet.Power = null;
-            this.ReleasePallet.Size = new System.Drawing.Size(56, 24);
+            this.ReleasePallet.Size = new System.Drawing.Size(112, 48);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除栈板";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -439,12 +466,13 @@
             this.NewPalletCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.DownImage")));
             this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
             this.NewPalletCode.IsShowBorder = true;
-            this.NewPalletCode.Location = new System.Drawing.Point(916, 16);
+            this.NewPalletCode.Location = new System.Drawing.Point(1832, 32);
+            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
             this.NewPalletCode.Name = "NewPalletCode";
             this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
             this.NewPalletCode.Power = "ifread";
-            this.NewPalletCode.Size = new System.Drawing.Size(60, 24);
+            this.NewPalletCode.Size = new System.Drawing.Size(120, 48);
             this.NewPalletCode.TabIndex = 159;
             this.NewPalletCode.Text = "新增栈板";
             this.NewPalletCode.UseVisualStyleBackColor = true;
@@ -456,10 +484,11 @@
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
             this.pa_custcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode.Location = new System.Drawing.Point(724, 174);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_custcode.Location = new System.Drawing.Point(1448, 348);
+            this.pa_custcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 41);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -474,10 +503,11 @@
             this.Column4,
             this.Column5});
             this.PackageInf.EnableContentClick = true;
-            this.PackageInf.Location = new System.Drawing.Point(3, 129);
+            this.PackageInf.Location = new System.Drawing.Point(6, 258);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(706, 415);
+            this.PackageInf.Size = new System.Drawing.Size(1412, 830);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
@@ -530,10 +560,11 @@
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.CutLength = null;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode.Location = new System.Drawing.Point(374, 42);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(748, 84);
+            this.pa_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 41);
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
@@ -542,29 +573,31 @@
             this.pa_totalqty.AutoSize = true;
             this.pa_totalqty.CutLength = null;
             this.pa_totalqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty.Location = new System.Drawing.Point(374, 83);
-            this.pa_totalqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_totalqty.Location = new System.Drawing.Point(748, 166);
+            this.pa_totalqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pa_totalqty.MaximumSize = new System.Drawing.Size(300, 0);
             this.pa_totalqty.Name = "pa_totalqty";
-            this.pa_totalqty.Size = new System.Drawing.Size(0, 21);
+            this.pa_totalqty.Size = new System.Drawing.Size(0, 41);
             this.pa_totalqty.TabIndex = 105;
             this.pa_totalqty.Tag = "1";
             // 
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(757, 174);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.AutoPrint.Location = new System.Drawing.Point(1514, 348);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(84, 22);
+            this.AutoPrint.Size = new System.Drawing.Size(168, 44);
             this.AutoPrint.TabIndex = 191;
             // 
             // OutBoxLength_label
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(92, 17);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(184, 34);
+            this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
-            this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
+            this.OutBoxLength_label.Size = new System.Drawing.Size(71, 36);
             this.OutBoxLength_label.TabIndex = 193;
             this.OutBoxLength_label.Text = "长度";
             // 
@@ -574,11 +607,11 @@
             this.OutBoxLength.BackColor = System.Drawing.Color.White;
             this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.OutBoxLength.ID = null;
-            this.OutBoxLength.Location = new System.Drawing.Point(134, 16);
-            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
+            this.OutBoxLength.Location = new System.Drawing.Point(268, 32);
+            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
             this.OutBoxLength.Name = "OutBoxLength";
             this.OutBoxLength.Power = null;
-            this.OutBoxLength.Size = new System.Drawing.Size(38, 23);
+            this.OutBoxLength.Size = new System.Drawing.Size(72, 39);
             this.OutBoxLength.Str = null;
             this.OutBoxLength.Str1 = null;
             this.OutBoxLength.Str2 = null;
@@ -588,10 +621,10 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(482, 11);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Location = new System.Drawing.Point(964, 22);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(88, 22);
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 194;
@@ -600,9 +633,10 @@
             // 
             this.PalletPreFix_label.AutoSize = true;
             this.PalletPreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PalletPreFix_label.Location = new System.Drawing.Point(182, 17);
+            this.PalletPreFix_label.Location = new System.Drawing.Point(364, 34);
+            this.PalletPreFix_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PalletPreFix_label.Name = "PalletPreFix_label";
-            this.PalletPreFix_label.Size = new System.Drawing.Size(37, 20);
+            this.PalletPreFix_label.Size = new System.Drawing.Size(71, 36);
             this.PalletPreFix_label.TabIndex = 196;
             this.PalletPreFix_label.Text = "前缀";
             // 
@@ -612,11 +646,11 @@
             this.PalletPreFix.BackColor = System.Drawing.Color.White;
             this.PalletPreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PalletPreFix.ID = null;
-            this.PalletPreFix.Location = new System.Drawing.Point(220, 16);
-            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
+            this.PalletPreFix.Location = new System.Drawing.Point(440, 32);
+            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(12, 14, 12, 14);
             this.PalletPreFix.Name = "PalletPreFix";
             this.PalletPreFix.Power = null;
-            this.PalletPreFix.Size = new System.Drawing.Size(38, 23);
+            this.PalletPreFix.Size = new System.Drawing.Size(72, 39);
             this.PalletPreFix.Str = null;
             this.PalletPreFix.Str1 = null;
             this.PalletPreFix.Str2 = null;
@@ -625,9 +659,9 @@
             // 
             // Packing_PalletCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(997, 552);
+            this.ClientSize = new System.Drawing.Size(1994, 1104);
             this.Controls.Add(this.PalletPreFix_label);
             this.Controls.Add(this.PalletPreFix);
             this.Controls.Add(this.StepCount);
@@ -670,6 +704,7 @@
             this.Controls.Add(this.pa_totalqty_label);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "Packing_PalletCollection";
             this.Tag = "Packing!BigBoxCollection";
             this.Text = " ";

+ 8 - 7
UAS_MES_YD/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -1,4 +1,5 @@
 using LabelManager2;
+using Seagull.BarTender.Print;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -33,7 +34,8 @@ namespace UAS_MES_NEW.Packing
         //Package表的主键
         string pa_id;
 
-        ApplicationClass lbl;
+
+        Engine engine;
 
         Document doc;
 
@@ -51,8 +53,7 @@ namespace UAS_MES_NEW.Packing
         {
             try
             {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
+                engine = new Engine(true);
             }
             catch
             {
@@ -206,12 +207,12 @@ namespace UAS_MES_NEW.Packing
                             }
                             else
                             {
-                                pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
+                                pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pd_prodcode.Text, User.UserCode);
                             }
                         }
                         else if (pa_outboxcode.Text != "" && pa_status.Text == "1" && AutoOutBoxCode.Checked)
                         {
-                            pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
+                            pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pd_prodcode.Text, User.UserCode);
                         }
                         else if (pa_outboxcode.Text == "")
                         {
@@ -423,7 +424,7 @@ namespace UAS_MES_NEW.Packing
                         outboxcode.SelectAll();
                     }
                     //doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+                    if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
                     {
                         OperateResult.AppendText(">>打印栈板" + pa_outboxcode.Text + "\n", Color.Black);
                     }
@@ -482,7 +483,7 @@ namespace UAS_MES_NEW.Packing
 
         private void Make_PalletCollection_FormClosing(object sender, FormClosingEventArgs e)
         {
-            BaseUtil.ClosePrint(lbl);
+            //BaseUtil.ClosePrint(lbl);
         }
 
         private void Packing_Click(object sender, EventArgs e)

+ 37 - 42
UAS_MES_YD/FunctionCode/Special/Special_AfterSaleIn.Designer.cs

@@ -33,6 +33,9 @@
             this.pr_code_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.Info = new System.Windows.Forms.DataGridView();
+            this.ms_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_prodcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ms_custname = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cu_name = new System.Windows.Forms.Label();
             this.pr_spec = new System.Windows.Forms.Label();
             this.label4 = new System.Windows.Forms.Label();
@@ -44,14 +47,11 @@
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.barcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.cu_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.Confirm = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_prodcode1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ms_custname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cu_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.Info)).BeginInit();
             this.SuspendLayout();
             // 
@@ -102,6 +102,24 @@
             this.Info.Size = new System.Drawing.Size(1072, 569);
             this.Info.TabIndex = 218;
             // 
+            // ms_sncode
+            // 
+            this.ms_sncode.DataPropertyName = "ms_sncode";
+            this.ms_sncode.HeaderText = "条码号";
+            this.ms_sncode.Name = "ms_sncode";
+            // 
+            // ms_prodcode1
+            // 
+            this.ms_prodcode1.DataPropertyName = "ms_prodcode1";
+            this.ms_prodcode1.HeaderText = "物料编号";
+            this.ms_prodcode1.Name = "ms_prodcode1";
+            // 
+            // ms_custname
+            // 
+            this.ms_custname.DataPropertyName = "ms_custname";
+            this.ms_custname.HeaderText = "客户名称";
+            this.ms_custname.Name = "ms_custname";
+            // 
             // cu_name
             // 
             this.cu_name.AutoSize = true;
@@ -217,26 +235,6 @@
             this.pr_code.TextBoxEnable = false;
             this.pr_code.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.pr_code_UserControlTextChanged);
             // 
-            // cu_code
-            // 
-            this.cu_code.AllPower = null;
-            this.cu_code.Caller = null;
-            this.cu_code.Condition = null;
-            this.cu_code.DBTitle = null;
-            this.cu_code.FormName = null;
-            this.cu_code.Location = new System.Drawing.Point(190, 16);
-            this.cu_code.Margin = new System.Windows.Forms.Padding(4);
-            this.cu_code.Name = "cu_code";
-            this.cu_code.Power = null;
-            this.cu_code.ReturnData = null;
-            this.cu_code.SelectField = null;
-            this.cu_code.SetValueField = null;
-            this.cu_code.Size = new System.Drawing.Size(235, 40);
-            this.cu_code.TabIndex = 212;
-            this.cu_code.TableName = null;
-            this.cu_code.TextBoxEnable = false;
-            this.cu_code.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.cu_code_UserControlTextChanged);
-            // 
             // Clean
             // 
             this.Clean.AllPower = null;
@@ -291,29 +289,27 @@
             this.dataGridViewTextBoxColumn4.HeaderText = "入库数量";
             this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
             // 
-            // ms_sncode
-            // 
-            this.ms_sncode.DataPropertyName = "ms_sncode";
-            this.ms_sncode.HeaderText = "条码号";
-            this.ms_sncode.Name = "ms_sncode";
-            // 
-            // ms_prodcode1
-            // 
-            this.ms_prodcode1.DataPropertyName = "ms_prodcode1";
-            this.ms_prodcode1.HeaderText = "物料编号";
-            this.ms_prodcode1.Name = "ms_prodcode1";
-            // 
-            // ms_custname
+            // cu_code
             // 
-            this.ms_custname.DataPropertyName = "ms_custname";
-            this.ms_custname.HeaderText = "客户名称";
-            this.ms_custname.Name = "ms_custname";
+            this.cu_code.AllPower = null;
+            this.cu_code.BackColor = System.Drawing.Color.White;
+            this.cu_code.ID = null;
+            this.cu_code.Location = new System.Drawing.Point(188, 18);
+            this.cu_code.Margin = new System.Windows.Forms.Padding(4);
+            this.cu_code.Name = "cu_code";
+            this.cu_code.Power = null;
+            this.cu_code.Size = new System.Drawing.Size(246, 35);
+            this.cu_code.Str = null;
+            this.cu_code.Str1 = null;
+            this.cu_code.Str2 = null;
+            this.cu_code.TabIndex = 226;
             // 
             // Special_AfterSaleIn
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1566, 802);
+            this.Controls.Add(this.cu_code);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.InDate);
             this.Controls.Add(this.label5);
@@ -326,7 +322,6 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.pr_code);
             this.Controls.Add(this.cu_code_label);
-            this.Controls.Add(this.cu_code);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.Confirm);
@@ -348,7 +343,6 @@
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.ButtonUtil.NormalButton Clean;
         private System.Windows.Forms.Label cu_code_label;
-        private CustomControl.TextBoxWithIcon.SearchTextBox cu_code;
         private System.Windows.Forms.Label pr_code_label;
         private CustomControl.TextBoxWithIcon.SearchTextBox pr_code;
         private CustomControl.TextBoxWithIcon.EnterTextBox barcode;
@@ -367,5 +361,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_sncode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_prodcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn ms_custname;
+        private CustomControl.TextBoxWithIcon.EnterTextBox cu_code;
     }
 }

+ 5 - 5
UAS_MES_YD/FunctionCode/Special/Special_AfterSaleIn.cs

@@ -24,11 +24,11 @@ namespace UAS_MES_NEW.Special
 
         private void Special_CancelProdinout_Load(object sender, EventArgs e)
         {
-            cu_code.TableName = "customer";
-            cu_code.DBTitle = "出货单查询";
-            cu_code.SelectField = "cu_id # ID,cu_code  # 客户编号,cu_name # 客户名城";
-            cu_code.SetValueField = new string[] { "cu_code", "cu_name" };
-            cu_code.FormName = Name;
+            //cu_code.TableName = "customer";
+            //cu_code.DBTitle = "出货单查询";
+            //cu_code.SelectField = "cu_id # ID,cu_code  # 客户编号,cu_name # 客户名城";
+            //cu_code.SetValueField = new string[] { "cu_code", "cu_name" };
+            //cu_code.FormName = Name;
 
             pr_code.TableName = "product";
             pr_code.DBTitle = "出货单查询";

+ 9 - 0
UAS_MES_YD/FunctionCode/Special/Special_AfterSaleIn.resx

@@ -126,6 +126,15 @@
   <metadata name="ms_custname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="ms_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_prodcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ms_custname.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" />
   <data name="Clean.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 4 - 3
UAS_MES_YD/PublicMethod/LogicHandler.cs

@@ -53,7 +53,7 @@ namespace UAS_MES_NEW.PublicMethod
                 ErrorMessage = "工单号" + iMaCode + "不存在";
                 return false;
             }
-            if (ma_statuscode == "STARTED")
+            if (ma_statuscode == "STARTED" || ma_statuscode == "FINISH")
                 return true;
             else
             {
@@ -116,7 +116,7 @@ namespace UAS_MES_NEW.PublicMethod
             dt = (DataTable)dh.ExecuteSql(SQL, "select", iUserCode, iUserCode);
             if (dt.Rows.Count > 0)
             {
-                iUserCode= dt.Rows[0]["em_code"].ToString();
+                iUserCode = dt.Rows[0]["em_code"].ToString();
                 string em_type = dt.Rows[0]["em_type"].ToString();
                 if (iSourceCode == "")
                 {
@@ -186,7 +186,8 @@ namespace UAS_MES_NEW.PublicMethod
             }
             else
             {
-                if (User.CurrentStepCode != "B_WEIGH") {
+                if (User.CurrentStepCode != "B_WEIGH")
+                {
                     SetCheck set = new SetCheck("NG", Color.Red);
                     BaseUtil.SetFormCenter(set);
                     set.ShowDialog();

+ 9 - 0
UAS_MES_YD/UAS_MES_YD.csproj

@@ -596,6 +596,12 @@
     <Compile Include="FunctionCode\Make\Make_PreFeedingCollection.Designer.cs">
       <DependentUpon>Make_PreFeedingCollection.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_Repair_AfterSale.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_Repair_AfterSale.Designer.cs">
+      <DependentUpon>Make_Repair_AfterSale.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_SeqTransformPrint.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1382,6 +1388,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_PreFeedingCollection.resx">
       <DependentUpon>Make_PreFeedingCollection.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_Repair_AfterSale.resx">
+      <DependentUpon>Make_Repair_AfterSale.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SeqTransformPrint.resx">
       <DependentUpon>Make_SeqTransformPrint.cs</DependentUpon>
     </EmbeddedResource>