浏览代码

单板测试修改

callm 1 年之前
父节点
当前提交
dfc7bd6b82

+ 4 - 2
UAS_MES_JC/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -113,8 +113,6 @@ namespace UAS_MES_NEW.Make
         {
             DBFind = ma_code.ReturnData;
             BaseUtil.SetFormValue(this.Controls, DBFind);
-            code.Text = LogicHandler.GetOutBoxCode("SN", "", ma_prodcode.Text, "");
-            code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
         }
 
         private void Make_FeedingCollection_SizeChanged(object sender, EventArgs e)
@@ -146,6 +144,10 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText(">>采集数据不可为空\n", Color.Red);
                             return;
                         }
+                        if (sn_code.Text == "")
+                        {
+                            code.Text = LogicHandler.GetSN(ma_code.Text);
+                        }
                         //如果录入框和工单号均有输入
                         if (code.Text != "" && ma_code.Text != "" && sn_code.Text == "")
                         {

+ 43 - 115
UAS_MES_JC/FunctionCode/Make/Make_Repair_AfterSale.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_Repair));
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_Repair_AfterSale));
             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();
@@ -56,7 +56,6 @@
             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();
@@ -65,9 +64,6 @@
             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();
@@ -223,7 +219,7 @@
             // 
             // GetSNCode_Label
             // 
-            this.GetSNCode_Label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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)));
@@ -404,7 +400,6 @@
             // 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);
@@ -413,9 +408,6 @@
             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);
@@ -432,34 +424,13 @@
             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)
+            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.Location = new System.Drawing.Point(1585, 119);
             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);
@@ -469,11 +440,11 @@
             // 
             // ms_makecode_label
             // 
-            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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.Location = new System.Drawing.Point(407, 55);
             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);
@@ -482,11 +453,11 @@
             // 
             // ms_sncode_label
             // 
-            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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.Location = new System.Drawing.Point(31, 53);
             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);
@@ -495,11 +466,11 @@
             // 
             // ms_checkno
             // 
-            this.ms_checkno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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.Location = new System.Drawing.Point(1581, 55);
             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);
@@ -515,7 +486,7 @@
             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.Location = new System.Drawing.Point(1110, 132);
             this.RepairComplete.Margin = new System.Windows.Forms.Padding(6);
             this.RepairComplete.MoveImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.MoveImage")));
             this.RepairComplete.Name = "RepairComplete";
@@ -530,12 +501,12 @@
             // 
             // ms_sncode
             // 
-            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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.Location = new System.Drawing.Point(181, 55);
             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";
@@ -550,7 +521,7 @@
             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.Location = new System.Drawing.Point(1300, 132);
             this.Scrap.Margin = new System.Windows.Forms.Padding(6);
             this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
             this.Scrap.Name = "Scrap";
@@ -568,67 +539,19 @@
             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.Location = new System.Drawing.Point(1681, 445);
             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)
+            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.Location = new System.Drawing.Point(1275, 55);
             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);
@@ -637,11 +560,11 @@
             // 
             // ms_prodcode_label
             // 
-            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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.Location = new System.Drawing.Point(817, 55);
             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);
@@ -650,12 +573,12 @@
             // 
             // pr_detail
             // 
-            this.pr_detail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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.Location = new System.Drawing.Point(1467, 55);
             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";
@@ -664,27 +587,26 @@
             // 
             // ms_prodcode
             // 
-            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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.Location = new System.Drawing.Point(1009, 55);
             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)
+            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.Location = new System.Drawing.Point(567, 55);
             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";
@@ -732,6 +654,7 @@
             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.RowHeadersWidth = 82;
             this.mbp_partdgv.RowTemplate.Height = 27;
             this.mbp_partdgv.Size = new System.Drawing.Size(524, 304);
             this.mbp_partdgv.TabIndex = 121;
@@ -742,6 +665,7 @@
             this.mbp_part1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.mbp_part1.DataPropertyName = "mbp_part";
             this.mbp_part1.HeaderText = "已选择不良零件";
+            this.mbp_part1.MinimumWidth = 10;
             this.mbp_part1.Name = "mbp_part1";
             this.mbp_part1.ReadOnly = true;
             // 
@@ -750,6 +674,7 @@
             this.DeleteCom.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.DeleteCom.HeaderText = "删除";
             this.DeleteCom.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeleteCom.MinimumWidth = 10;
             this.DeleteCom.Name = "DeleteCom";
             this.DeleteCom.Resizable = System.Windows.Forms.DataGridViewTriState.True;
             this.DeleteCom.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
@@ -759,8 +684,10 @@
             // 
             this.mbp_id.DataPropertyName = "mbp_id";
             this.mbp_id.HeaderText = "mbp_id";
+            this.mbp_id.MinimumWidth = 10;
             this.mbp_id.Name = "mbp_id";
             this.mbp_id.Visible = false;
+            this.mbp_id.Width = 200;
             // 
             // mbl_locdgv
             // 
@@ -773,6 +700,7 @@
             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.RowHeadersWidth = 82;
             this.mbl_locdgv.RowTemplate.Height = 27;
             this.mbl_locdgv.Size = new System.Drawing.Size(524, 304);
             this.mbl_locdgv.TabIndex = 120;
@@ -783,6 +711,7 @@
             this.mbl_loc1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
             this.mbl_loc1.DataPropertyName = "mbl_loc";
             this.mbl_loc1.HeaderText = "已选择不良位置";
+            this.mbl_loc1.MinimumWidth = 10;
             this.mbl_loc1.Name = "mbl_loc1";
             this.mbl_loc1.ReadOnly = true;
             // 
@@ -791,6 +720,7 @@
             this.DeletePos.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.DeletePos.HeaderText = "删除";
             this.DeletePos.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.DeletePos.MinimumWidth = 10;
             this.DeletePos.Name = "DeletePos";
             this.DeletePos.Width = 80;
             // 
@@ -798,8 +728,10 @@
             // 
             this.mbl_id.DataPropertyName = "mbl_id";
             this.mbl_id.HeaderText = "mbl_id";
+            this.mbl_id.MinimumWidth = 10;
             this.mbl_id.Name = "mbl_id";
             this.mbl_id.Visible = false;
+            this.mbl_id.Width = 200;
             // 
             // RefreshTreeView
             // 
@@ -819,7 +751,7 @@
             // GetSNCode
             // 
             this.GetSNCode.AllPower = null;
-            this.GetSNCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            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;
@@ -898,7 +830,7 @@
             // 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)
+            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;
@@ -917,7 +849,7 @@
             // 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)
+            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;
@@ -936,7 +868,7 @@
             // 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)
+            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;
@@ -1024,7 +956,7 @@
             this.SaveBadLocation.UseVisualStyleBackColor = true;
             this.SaveBadLocation.Click += new System.EventHandler(this.SaveBadLocation_Click);
             // 
-            // Make_Repair
+            // Make_Repair_AfterSale
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -1071,7 +1003,7 @@
             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.Name = "Make_Repair_AfterSale";
             this.Tag = "Make!Repair";
             this.Text = "维修作业";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_Repair_FormClosing);
@@ -1079,12 +1011,12 @@
             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.ResumeLayout(false);
             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.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1094,10 +1026,6 @@
         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;

+ 1 - 297
UAS_MES_JC/FunctionCode/Make/Make_Repair_AfterSale.cs

@@ -58,20 +58,6 @@ namespace UAS_MES_NEW.Make
         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" };
@@ -138,13 +124,11 @@ namespace UAS_MES_NEW.Make
 
         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);
         }
 
@@ -177,41 +161,6 @@ namespace UAS_MES_NEW.Make
                         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
                 {
@@ -220,126 +169,6 @@ namespace UAS_MES_NEW.Make
                     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);
             }
         }
 
@@ -496,116 +325,7 @@ namespace UAS_MES_NEW.Make
 
         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)
@@ -874,11 +594,6 @@ namespace UAS_MES_NEW.Make
             }
         }
 
-        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();
@@ -915,17 +630,6 @@ namespace UAS_MES_NEW.Make
             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));

+ 592 - 0
UAS_MES_JC/FunctionCode/Make/Make_SingleBoard.Designer.cs

@@ -0,0 +1,592 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_SingleBoard
+    {
+        /// <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_SingleBoard));
+            this.SN_label = new System.Windows.Forms.Label();
+            this.OK = new System.Windows.Forms.RadioButton();
+            this.NG = new System.Windows.Forms.RadioButton();
+            this.pr_sendchecktype = new System.Windows.Forms.Label();
+            this.ma_salecode = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.ChoosedRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.WaitRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.columnHeader9 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.label3 = new System.Windows.Forms.Label();
+            this.bc_remark_label = new System.Windows.Forms.Label();
+            this.bc_groupcode_label = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.ma_prodcode_label = new System.Windows.Forms.Label();
+            this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
+            this.pr_spec = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ma_prodcode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.bc_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ChooseedReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowRightButton();
+            this.WaitReject = new UAS_MES_NEW.CustomControl.ButtonUtil.ArrowLeftButton();
+            this.bc_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.bc_groupcode = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.SaveRepairInf = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SN = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // SN_label
+            // 
+            this.SN_label.AutoSize = true;
+            this.SN_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SN_label.Location = new System.Drawing.Point(60, 116);
+            this.SN_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.SN_label.Name = "SN_label";
+            this.SN_label.Size = new System.Drawing.Size(62, 41);
+            this.SN_label.TabIndex = 1;
+            this.SN_label.Text = "SN";
+            // 
+            // OK
+            // 
+            this.OK.AutoSize = true;
+            this.OK.Checked = true;
+            this.OK.Location = new System.Drawing.Point(67, 212);
+            this.OK.Name = "OK";
+            this.OK.Size = new System.Drawing.Size(89, 28);
+            this.OK.TabIndex = 151;
+            this.OK.TabStop = true;
+            this.OK.Text = "良品";
+            this.OK.UseVisualStyleBackColor = true;
+            // 
+            // NG
+            // 
+            this.NG.AutoSize = true;
+            this.NG.Location = new System.Drawing.Point(224, 212);
+            this.NG.Name = "NG";
+            this.NG.Size = new System.Drawing.Size(113, 28);
+            this.NG.TabIndex = 152;
+            this.NG.Text = "不良品";
+            this.NG.UseVisualStyleBackColor = true;
+            // 
+            // pr_sendchecktype
+            // 
+            this.pr_sendchecktype.AutoSize = true;
+            this.pr_sendchecktype.Location = new System.Drawing.Point(992, 278);
+            this.pr_sendchecktype.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_sendchecktype.Name = "pr_sendchecktype";
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 24);
+            this.pr_sendchecktype.TabIndex = 218;
+            this.pr_sendchecktype.Visible = false;
+            // 
+            // ma_salecode
+            // 
+            this.ma_salecode.AutoSize = true;
+            this.ma_salecode.Location = new System.Drawing.Point(992, 270);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_salecode.Name = "ma_salecode";
+            this.ma_salecode.Size = new System.Drawing.Size(0, 24);
+            this.ma_salecode.TabIndex = 217;
+            this.ma_salecode.Visible = false;
+            // 
+            // 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.Blue;
+            this.label2.Location = new System.Drawing.Point(44, 270);
+            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 = 201;
+            this.label2.Text = "采集信息";
+            // 
+            // ChoosedRejectList
+            // 
+            this.ChoosedRejectList.CheckBoxes = true;
+            this.ChoosedRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader6,
+            this.columnHeader3,
+            this.columnHeader7,
+            this.columnHeader8,
+            this.columnHeader10});
+            this.ChoosedRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChoosedRejectList.HideSelection = false;
+            this.ChoosedRejectList.Location = new System.Drawing.Point(774, 532);
+            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.ChoosedRejectList.Name = "ChoosedRejectList";
+            this.ChoosedRejectList.Size = new System.Drawing.Size(528, 408);
+            this.ChoosedRejectList.TabIndex = 213;
+            this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
+            this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader6
+            // 
+            this.columnHeader6.Text = " ";
+            this.columnHeader6.Width = 20;
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Text = "不良代码组";
+            this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader3.Width = 150;
+            // 
+            // columnHeader7
+            // 
+            this.columnHeader7.Text = "不良代码";
+            this.columnHeader7.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader7.Width = 168;
+            // 
+            // columnHeader8
+            // 
+            this.columnHeader8.Text = "不良名称";
+            this.columnHeader8.Width = 99;
+            // 
+            // columnHeader10
+            // 
+            this.columnHeader10.Text = "备注";
+            this.columnHeader10.Width = 3;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.ForeColor = System.Drawing.Color.Black;
+            this.label5.Location = new System.Drawing.Point(770, 482);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 42);
+            this.label5.TabIndex = 208;
+            this.label5.Text = "已选不良";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.ForeColor = System.Drawing.Color.Black;
+            this.label4.Location = new System.Drawing.Point(44, 482);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 42);
+            this.label4.TabIndex = 207;
+            this.label4.Text = "待选不良";
+            // 
+            // WaitRejectList
+            // 
+            this.WaitRejectList.CheckBoxes = true;
+            this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader5,
+            this.columnHeader4,
+            this.columnHeader1,
+            this.columnHeader2,
+            this.columnHeader9});
+            this.WaitRejectList.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.WaitRejectList.FullRowSelect = true;
+            this.WaitRejectList.HideSelection = false;
+            this.WaitRejectList.Location = new System.Drawing.Point(46, 532);
+            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitRejectList.Name = "WaitRejectList";
+            this.WaitRejectList.Size = new System.Drawing.Size(528, 408);
+            this.WaitRejectList.TabIndex = 206;
+            this.WaitRejectList.UseCompatibleStateImageBehavior = false;
+            this.WaitRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader5
+            // 
+            this.columnHeader5.Text = " ";
+            this.columnHeader5.Width = 0;
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Text = "不良代码组";
+            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader4.Width = 0;
+            // 
+            // columnHeader1
+            // 
+            this.columnHeader1.Text = "不良代码";
+            this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.columnHeader1.Width = 134;
+            // 
+            // columnHeader2
+            // 
+            this.columnHeader2.Text = "不良名称";
+            this.columnHeader2.Width = 392;
+            // 
+            // columnHeader9
+            // 
+            this.columnHeader9.Text = "备注";
+            this.columnHeader9.Width = 0;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(44, 410);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.TabIndex = 205;
+            this.label3.Text = "不良代码";
+            // 
+            // bc_remark_label
+            // 
+            this.bc_remark_label.AutoSize = true;
+            this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_remark_label.Location = new System.Drawing.Point(612, 330);
+            this.bc_remark_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_remark_label.Name = "bc_remark_label";
+            this.bc_remark_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_remark_label.TabIndex = 204;
+            this.bc_remark_label.Text = "不良备注";
+            // 
+            // bc_groupcode_label
+            // 
+            this.bc_groupcode_label.AutoSize = true;
+            this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode_label.Location = new System.Drawing.Point(44, 330);
+            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.bc_groupcode_label.Name = "bc_groupcode_label";
+            this.bc_groupcode_label.Size = new System.Drawing.Size(146, 41);
+            this.bc_groupcode_label.TabIndex = 203;
+            this.bc_groupcode_label.Text = "不良组别";
+            // 
+            // pr_detail_label
+            // 
+            this.pr_detail_label.AutoSize = true;
+            this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail_label.Location = new System.Drawing.Point(1169, 39);
+            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 = 219;
+            this.pr_detail_label.Text = "产品规格";
+            // 
+            // ma_prodcode_label
+            // 
+            this.ma_prodcode_label.AutoSize = true;
+            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode_label.Location = new System.Drawing.Point(672, 38);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Name = "ma_prodcode_label";
+            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.TabIndex = 220;
+            this.ma_prodcode_label.Text = "产品编号";
+            // 
+            // pr_spec
+            // 
+            this.pr_spec.AutoSize = true;
+            this.pr_spec.CutLength = "qweqwe";
+            this.pr_spec.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_spec.Location = new System.Drawing.Point(1343, 39);
+            this.pr_spec.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_spec.MaximumSize = new System.Drawing.Size(360, 0);
+            this.pr_spec.Name = "pr_spec";
+            this.pr_spec.Size = new System.Drawing.Size(0, 41);
+            this.pr_spec.TabIndex = 222;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.CutLength = null;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode.Location = new System.Drawing.Point(854, 38);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.TabIndex = 221;
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
+            // 
+            // Filter
+            // 
+            this.Filter.BackColor = System.Drawing.Color.Transparent;
+            this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
+            this.Filter.Location = new System.Drawing.Point(224, 482);
+            this.Filter.Margin = new System.Windows.Forms.Padding(4);
+            this.Filter.Name = "Filter";
+            this.Filter.PlaceHolder = "不良名称搜索";
+            this.Filter.Size = new System.Drawing.Size(352, 44);
+            this.Filter.TabIndex = 215;
+            // 
+            // bc_code
+            // 
+            this.bc_code.AllPower = null;
+            this.bc_code.BackColor = System.Drawing.Color.White;
+            this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_code.ID = null;
+            this.bc_code.Location = new System.Drawing.Point(226, 410);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_code.Name = "bc_code";
+            this.bc_code.Power = null;
+            this.bc_code.Size = new System.Drawing.Size(348, 40);
+            this.bc_code.Str = null;
+            this.bc_code.Str1 = null;
+            this.bc_code.Str2 = null;
+            this.bc_code.TabIndex = 214;
+            // 
+            // ChooseedReject
+            // 
+            this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
+            this.ChooseedReject.Location = new System.Drawing.Point(622, 662);
+            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(6);
+            this.ChooseedReject.Name = "ChooseedReject";
+            this.ChooseedReject.Size = new System.Drawing.Size(100, 46);
+            this.ChooseedReject.TabIndex = 211;
+            this.ChooseedReject.UseVisualStyleBackColor = true;
+            this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
+            // 
+            // WaitReject
+            // 
+            this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
+            this.WaitReject.Location = new System.Drawing.Point(622, 788);
+            this.WaitReject.Margin = new System.Windows.Forms.Padding(6);
+            this.WaitReject.Name = "WaitReject";
+            this.WaitReject.Size = new System.Drawing.Size(100, 46);
+            this.WaitReject.TabIndex = 210;
+            this.WaitReject.UseVisualStyleBackColor = true;
+            this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
+            // 
+            // bc_remark
+            // 
+            this.bc_remark.AllPower = null;
+            this.bc_remark.BackColor = System.Drawing.Color.White;
+            this.bc_remark.ID = null;
+            this.bc_remark.Location = new System.Drawing.Point(778, 332);
+            this.bc_remark.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_remark.Multiline = true;
+            this.bc_remark.Name = "bc_remark";
+            this.bc_remark.Power = null;
+            this.bc_remark.Size = new System.Drawing.Size(524, 120);
+            this.bc_remark.Str = null;
+            this.bc_remark.Str1 = null;
+            this.bc_remark.Str2 = null;
+            this.bc_remark.TabIndex = 209;
+            // 
+            // bc_groupcode
+            // 
+            this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bc_groupcode.FormattingEnabled = true;
+            this.bc_groupcode.Location = new System.Drawing.Point(226, 332);
+            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(6);
+            this.bc_groupcode.Name = "bc_groupcode";
+            this.bc_groupcode.Size = new System.Drawing.Size(348, 37);
+            this.bc_groupcode.TabIndex = 202;
+            this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(1343, 328);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(8);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(460, 614);
+            this.OperateResult.TabIndex = 150;
+            this.OperateResult.Text = "";
+            // 
+            // 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(774, 957);
+            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 = 145;
+            this.SaveRepairInf.Tag = "IfRead";
+            this.SaveRepairInf.Text = "确认";
+            this.SaveRepairInf.UseVisualStyleBackColor = true;
+            this.SaveRepairInf.Click += new System.EventHandler(this.SaveRepairInf_Click);
+            // 
+            // SN
+            // 
+            this.SN.AllPower = null;
+            this.SN.BackColor = System.Drawing.Color.White;
+            this.SN.ID = null;
+            this.SN.Location = new System.Drawing.Point(224, 122);
+            this.SN.Margin = new System.Windows.Forms.Padding(4);
+            this.SN.Name = "SN";
+            this.SN.Power = null;
+            this.SN.Size = new System.Drawing.Size(318, 35);
+            this.SN.Str = null;
+            this.SN.Str1 = null;
+            this.SN.Str2 = null;
+            this.SN.TabIndex = 2;
+            this.SN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN_KeyDown);
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.Caller = null;
+            this.ma_code.Condition = null;
+            this.ma_code.DBTitle = null;
+            this.ma_code.FormName = null;
+            this.ma_code.Location = new System.Drawing.Point(218, 40);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.ReturnData = null;
+            this.ma_code.SelectField = null;
+            this.ma_code.SetValueField = null;
+            this.ma_code.Size = new System.Drawing.Size(296, 42);
+            this.ma_code.TabIndex = 225;
+            this.ma_code.TableName = null;
+            this.ma_code.Tag = "ma_code";
+            this.ma_code.TextBoxEnable = true;
+            // 
+            // LockMakeCode
+            // 
+            this.LockMakeCode.AutoSize = true;
+            this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LockMakeCode.LeaveEvent = false;
+            this.LockMakeCode.Location = new System.Drawing.Point(522, 44);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Name = "LockMakeCode";
+            this.LockMakeCode.Size = new System.Drawing.Size(94, 35);
+            this.LockMakeCode.TabIndex = 224;
+            this.LockMakeCode.Text = "锁定";
+            this.LockMakeCode.UseVisualStyleBackColor = true;
+            // 
+            // ms_makecode_label
+            // 
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(44, 38);
+            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(146, 41);
+            this.ms_makecode_label.TabIndex = 223;
+            this.ms_makecode_label.Text = "归属工单";
+            // 
+            // Make_SingleBoard
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1833, 1020);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.LockMakeCode);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.pr_spec);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.ma_prodcode_label);
+            this.Controls.Add(this.pr_sendchecktype);
+            this.Controls.Add(this.ma_salecode);
+            this.Controls.Add(this.Filter);
+            this.Controls.Add(this.bc_code);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.ChoosedRejectList);
+            this.Controls.Add(this.ChooseedReject);
+            this.Controls.Add(this.WaitReject);
+            this.Controls.Add(this.bc_remark);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.WaitRejectList);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.bc_groupcode);
+            this.Controls.Add(this.bc_remark_label);
+            this.Controls.Add(this.bc_groupcode_label);
+            this.Controls.Add(this.NG);
+            this.Controls.Add(this.OK);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.SaveRepairInf);
+            this.Controls.Add(this.SN);
+            this.Controls.Add(this.SN_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Make_SingleBoard";
+            this.Tag = "Special!CancelOQC";
+            this.Text = "拆箱处理";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label SN_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox SN;
+        private CustomControl.ButtonUtil.NormalButton SaveRepairInf;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.RadioButton OK;
+        private System.Windows.Forms.RadioButton NG;
+        private System.Windows.Forms.Label pr_sendchecktype;
+        private System.Windows.Forms.Label ma_salecode;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_code;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.ListView ChoosedRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader6;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.ColumnHeader columnHeader7;
+        private System.Windows.Forms.ColumnHeader columnHeader8;
+        private System.Windows.Forms.ColumnHeader columnHeader10;
+        private CustomControl.ButtonUtil.ArrowRightButton ChooseedReject;
+        private CustomControl.ButtonUtil.ArrowLeftButton WaitReject;
+        private CustomControl.TextBoxWithIcon.EnterTextBox bc_remark;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.ListView WaitRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader5;
+        private System.Windows.Forms.ColumnHeader columnHeader4;
+        private System.Windows.Forms.ColumnHeader columnHeader1;
+        private System.Windows.Forms.ColumnHeader columnHeader2;
+        private System.Windows.Forms.ColumnHeader columnHeader9;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus bc_groupcode;
+        private System.Windows.Forms.Label bc_remark_label;
+        private System.Windows.Forms.Label bc_groupcode_label;
+        private CustomControl.ValueLabel.ValueLabel pr_spec;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label ma_prodcode_label;
+        private System.Windows.Forms.BindingSource BadInfSource;
+        private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
+        private System.Windows.Forms.Label ms_makecode_label;
+    }
+}

+ 320 - 0
UAS_MES_JC/FunctionCode/Make/Make_SingleBoard.cs

@@ -0,0 +1,320 @@
+using DevExpress.Entity.ProjectModel;
+using DevExpress.Utils;
+using LabelManager2;
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_SingleBoard : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        DataTable Dbfind;
+
+        /// <summary>
+        /// 已选的不良
+        /// </summary>
+        List<string> ChoosedList = new List<string>();
+        /// <summary>
+        /// 待选的不良
+        /// </summary>
+        List<string> WaitList = new List<string>();
+
+        public Make_SingleBoard()
+        {
+            InitializeComponent();
+        }
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            ma_code.TableName = "make left join product on ma_prodcode=pr_code";
+            ma_code.SelectField = "ma_code # 工单号,ma_pocode # 内部订单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_spec # 产品规格,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
+            ma_code.FormName = Name;
+            ma_code.SetValueField = new string[] { "ma_code", "ma_pocode", "ma_prodcode", "ma_qty", "substr(pr_spec,0,50)pr_spec", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
+            ma_code.Condition = "ma_statuscode='STARTED'";
+            ma_code.DbChange += Ma_code_DbChange;
+            dh = SystemInf.dh;
+
+            LockMakeCode.GetMakeCodeCtl(ma_code);
+            ma_code.SetLockCheckBox(LockMakeCode);
+        }
+
+        private void Ma_code_DbChange(object sender, EventArgs e)
+        {
+            Dbfind = ma_code.ReturnData;
+            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            LoadBadGroupData();
+        }
+
+        private void LoadBadGroupData()
+        {
+            //如果ms_makecode的值修改过再去查询
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_name,bg_code from badgroup left join (select pb_badgroup,pr_kind ");
+            sql.Append("from product left join productkind on pk_name=pr_kind ");
+            sql.Append("left join productbadgroup on pk_code=PB_KINDCODE where pr_code='" + ma_prodcode.Text + "')");
+            sql.Append("on pb_badgroup=bg_code where bg_statuscode='AUDITED' order by case when bg_code='" + User.DefaultBadGroup + "' then 0 else 1 end");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            bc_groupcode.DisplayMember = "bg_name";
+            bc_groupcode.ValueMember = "bg_code";
+            bc_groupcode.DataSource = dt;
+        }
+
+        private void LoadBadCodeListView()
+        {
+            object bg_code = bc_groupcode.SelectedValue;
+            sql.Clear();
+            sql.Append("select bg_code||':'||bg_name bg_code,bc_code,bc_name,'' bc_remark from badgroupdetail ");
+            sql.Append("left join badgroup on  bg_id=bgd_bgid left join badcode on bgd_badcode=bc_code where ");
+            sql.Append("bg_code='" + (bg_code != null ? bg_code.ToString() : "") + "' and bg_code is not null order by bgd_detno");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BadInfSource.DataSource = dt;
+            //往listview中添加数据
+            WaitRejectList.Items.Clear();
+            WaitRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (!ChoosedList.Contains(dt.Rows[i]["bc_code"].ToString()))
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+                    WaitList.Add(dt.Rows[i]["bc_code"].ToString());
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    WaitRejectList.Items.Add(lvi);
+                }
+            }
+            WaitRejectList.EndUpdate();
+        }
+
+        private void SN_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (User.CurrentStepCode == "单板测试")
+                {
+                    if (dh.CheckExist("singleboard", "sb_sncode='" + SN.Text + "'"))
+                    {
+                        OperateResult.AppendText(">>" + SN.Text + "已执行单板测试\n", Color.Red);
+                        return;
+                    }
+                    else
+                    {
+                        dh.ExecuteSql("insert into singleboard(SB_ID, SB_MAKECODE, SB_SNCODE, SB_INDATE, SB_NEXTSTEPCODE, SB_BADTIMS, SB_STATUS)" +
+                            "values(singleboard_seq.nextval,'" + ma_code.Text + "','" + SN.Text + "',sysdate,'刷三防漆',0,'1')", "insert");
+                    }
+                }
+                if (User.CurrentStepCode == "刷三防漆")
+                {
+                    DataTable dt = (DataTable)dh.ExecuteSql("select SB_NEXTSTEPCODE,sb_status from singleboard where sb_sncode='" + SN.Text + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        string SB_NEXTSTEPCODE = dt.Rows[0]["SB_NEXTSTEPCODE"].ToString();
+                        string sb_status = dt.Rows[0]["sb_status"].ToString();
+                        if (sb_status == "3")
+                        {
+                            OperateResult.AppendText(">>" + SN.Text + "测试不良不允许采集,请先进行维修\n", Color.Red);
+                            return;
+                        }
+                        if (SB_NEXTSTEPCODE == User.CurrentStepCode)
+                        {
+                            dh.ExecuteSql("update singleboard set sb_status=2,sb_nextstepcode='' where sb_sncode='" + SN.Text + "'", "update"); ;
+                        }
+                    }
+                }
+                if (OK.Checked)
+                {
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ma_code.Text, User.UserLineCode, User.UserSourceCode, User.CurrentStepCode, User.CurrentStepCode + "结果为良品", SN.Text, "");
+                }
+                else
+                {
+                    int CheckedNum = 0;
+                    //是否已经添加到不良
+                    bool AddToReject = false;
+                    for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+                    {
+                        if (WaitRejectList.Items[i].Checked)
+                        {
+                            AddToReject = false;
+                            for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                            {
+                                if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                                {
+                                    AddToReject = true;
+                                    OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                                    break;
+                                }
+                            }
+                            //未添加则进行添加
+                            if (!AddToReject)
+                            {
+                                WaitRejectList.Items[i].Checked = false;
+                                ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                                WaitRejectList.Items[i].Remove();
+                                CheckedNum++;
+                            }
+                        }
+                    }
+                    if (CheckedNum == 0)
+                    {
+                        OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+                        return;
+                    }
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ma_code.Text, User.UserLineCode, User.UserSourceCode, User.CurrentStepCode, User.CurrentStepCode + "结果为良品", SN.Text, "");
+                }
+                OperateResult.AppendText("序列号" + SN.Text + User.CurrentStepCode + "采集成功\n", System.Drawing.Color.Green);
+            }
+        }
+
+        private void ChooseedReject_Click(object sender, EventArgs e)
+        {
+            if (SN.Text == "")
+            {
+                OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
+                SN.Focus();
+                return;
+            }
+            int CheckedNum = 0;
+            //是否已经添加到不良
+            bool AddToReject = false;
+            for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (WaitRejectList.Items[i].Checked)
+                {
+                    AddToReject = false;
+                    for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                    {
+                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        {
+                            AddToReject = true;
+                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
+                            break;
+                        }
+                    }
+                    //未添加则进行添加
+                    if (!AddToReject)
+                    {
+                        WaitRejectList.Items[i].Checked = false;
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
+            }
+        }
+
+        private void WaitReject_Click(object sender, EventArgs e)
+        {
+            int CheckedNum = 0;
+            //已存在在ListView中的Item是不能添加到其他ListView中的,需要调用其克隆的方法
+            for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+            {
+                if (ChoosedRejectList.Items[i].Checked)
+                {
+                    ChoosedRejectList.Items[i].Checked = false;
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                    CheckedNum++;
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                for (int i = ChoosedRejectList.Items.Count - 1; i >= 0; i--)
+                {
+                    WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
+                    ChoosedRejectList.Items[i].Remove();
+                }
+            }
+        }
+
+        private void bc_groupcode_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            LoadBadCodeListView();
+        }
+
+        private void ma_prodcode_TextChanged(object sender, EventArgs e)
+        {
+            LoadBadGroupData();
+        }
+
+        private void SaveRepairInf_Click(object sender, EventArgs e)
+        {
+            if (User.CurrentStepCode == "单板测试")
+            {
+                if (dh.CheckExist("singleboard", "sb_sncode='" + SN.Text + "'"))
+                {
+                    if (OK.Checked)
+                    {
+                        OperateResult.AppendText(">>" + SN.Text + "已执行单板测试\n", Color.Red);
+                        return;
+                    }
+                }
+                else
+                {
+                    dh.ExecuteSql("insert into singleboard(SB_ID, SB_MAKECODE, SB_SNCODE, SB_INDATE, SB_NEXTSTEPCODE, SB_BADTIMS, SB_STATUS)" +
+                        "values(singleboard_seq.nextval,'" + ma_code.Text + "','" + SN.Text + "',sysdate,'刷三防漆',0,'1')", "insert");
+                }
+            }
+            if (NG.Checked)
+            {
+                int RejectCount = ChoosedRejectList.Items.Count;
+                string[] bccode = new string[RejectCount];
+                string[] bcremark = new string[RejectCount];
+                string[] bgcode = new string[RejectCount];
+                string[] bgname = new string[RejectCount];
+                string[] bcname = new string[RejectCount];
+
+                if (ChoosedRejectList.Items.Count == 0)
+                {
+                    OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                    return;
+                }
+                else
+                {
+                    for (int i = 0; i < RejectCount; i++)
+                    {
+                        //获取不良代码组
+                        bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[0];
+                        //获取不良代码组名称
+                        bgname[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[1];
+                        //获取所有的不良代码
+                        bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
+                        //获取不良名称
+                        bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                        //获取所有的不良备注
+                        bcremark[i] = bc_remark.Text;
+                    }
+                }
+
+                sql.Clear();
+                sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
+                sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status,mb_badremark,mb_bgname,mb_badname,mb_type)");
+                sql.Append("select makebad_seq.nextval,ma_code,sb_sncode,sb_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bc_code,:bg_code,'',");
+                sql.Append("'0',:bc_remark,:bg_name,:bc_name,'Client' from make left join singleboard on sb_makecode=ma_code  ");
+                sql.Append(" where sb_sncode='" + SN.Text + "' and sb_makecode='" + ma_code.Text + "'");
+                if (bgcode.Length > 0)
+                {
+                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code", "bc_remark", "bg_name", "bc_name" }, bccode, bgcode, bcremark, bgname, bcname);
+                }
+                dh.ExecuteSql("update singleboard set sb_status=3,sb_nextstepcode='' where sb_sncode='" + SN.Text + "'", "update");
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserName, ma_code.Text, User.UserLineCode, User.UserSourceCode, User.CurrentStepCode, User.CurrentStepCode + "结果不良品", SN.Text, "");
+                OperateResult.AppendText("序列号" + SN.Text + "采集不良成功\n", System.Drawing.Color.Green);
+            }
+        }
+    }
+}

+ 200 - 0
UAS_MES_JC/FunctionCode/Make/Make_SingleBoard.resx

@@ -0,0 +1,200 @@
+<?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="BadInfSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="ChooseedReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAslJREFU
+        SEuN1kuojVEYxvHtco77JUUpURQliQxcE+0BMlIkBpJQJmJwBqRMKAZKykSMkJEwUaIwcElIKQzccz2i
+        3HP3f77Wu8679n6d7a3f4Fuf5znZ+9trfbV6vb4bD7vxBPvQF/r3tcZJ65NwFY8R9TzCTcyCZVJDw3Bj
+        LM7jTze+YiPCsrTWEx34iajDXMRoNPXkSTcn4w6iEvMWS2CZ1JA7RJ/mAUR57xiGoOjJYzewEK8RlZgH
+        mI6cs3FrI9Hqk/+NXWhD0VONLSbr8BlRkdFzo68854KeabiPKG/0SGxAzhXjbvTGTvxCVGSOYxiKMrtO
+        luE9orzpxGLkXDHuxiAcRlTi7UUfFGV2jR7YhlYP/j1MRc7m8YsYhQuISsw3bEbO2bi1gTiCKO/pF6m/
+        WfRUY4vJFNxFVGLeYSlyzsatjcEVRHnvKPQtpQY3WnQWodUvUpviTORc0DMbTxHljZ5jPc9tVUHjcMNb
+        j4+Iisw1jEeVsbHrZBU+IMqbT+hI8ebhphmAs4hKvO2oMn5sDf1xBlHW60zRcrjhrUGr/+ENTECVsbHr
+        ZAVabRFfsCXFu4ZFbz5eICowzzEPORf0aDPVaRDlvT1orwpsWPD0jOhUj8JGz8Bq5JyNWxuBc4jy3ilU
+        G3IxWkh08ySisNGvZQd6ocrZ2DXaodeeKO/dQtPX74t0SOpjjMKeTvrBKIrsOtFZqjMuypuX0ORcVKRD
+        slXRZWhT7Cph7DqZg2eI8kYP9lrkXFS0AP+zWc5Aztm4NR0ZlxDljV5f9Narl4CixxdNxG1EBUY/6eXI
+        ORu31g+HEOU9vWkMRdFTTVocjtOIwuYHtkKnf1Fk18kmfEfUYa5jHHKuGBa0Y+9HFPYOQrtyU4mtQW+v
+        bxDljc7Auci5pmFxJbSx6VegjbLRK+j1Nr/si5+0pm3kBPTiFvWIHvx/v21WU6v9BRMV4fPlTpe/AAAA
+        AElFTkSuQmCC
+</value>
+  </data>
+  <data name="WaitReject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAACUAAAAXCAYAAACMLIalAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH3wYWEw4tELKVawAAAs1JREFU
+        SEuN10uoTVEcx3HvV3nkEUPlFVKUDBDliGImiZQkiYkBGSgZGEiiyIASRgp5JVIGhlLkmTJC5K2833l8
+        f9v6rbP2PX+d+6/PYP3X/f3v7Zy91963S1SNRqM0EVfwCA8CD3EbM1FlynIP3bEN/5sj2jucovViwwbj
+        DP60sQu9UOVcXidL8Q5R3u5gSoo3i6b1xG5E4dIFDEGVc3mdTIc+hShvzzEXaUIqNQpr8RXRALuPSagy
+        ZbmHkbiKKG9fsAb1OW4k8/AS0QDTV7EIOecqegNxHFHefmMn9M0053iRTMBdRAPsF7aiK5qDKK/RA9uh
+        XxrNsFMYhNqcctBQ6BqJwqUTGIDaIK+TVfiMKG/XMQo513FQb+xDFC7dwhjUBpVrzMEzRHl7glnIuVxF
+        cz2+IxpgrzEfLYOK3jjcRJS3T1iBljlVpeZCvEE0wH5gA1oGFT0dDecQ5U3Xow5RHaa1ObloTsM9RANK
+        h9AXLYNST3t7EWVLR9Ef8R+kYuMkonBJx8Nk+A9I6X+VerPxAVHeXmEqwjm52NApqudONMT0ke9By6NE
+        lXq6G48gypuOh/0IP/FcaXMx3iIaZN+wDs6kCXmGjMAlRHn7ic3ohtqcXGlDh+BG6GKOBtkLVM8nK2aY
+        3ir0YI3y9h7LkXO1KjY6e07pdh+L2sByDZ1TTxHlTeeUrsOcy1U2oVv6LKIhpdNoeTR4negc+ogobzeg
+        cy3ncpVNjMY1RENMF+wO6PlWG+Y1dM1sga6haIbpsTYMOZurbGIG2r3/6Lm2EjnnKnr9cBBRvnQA8R3p
+        ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
+        zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
+        fgAAAABJRU5ErkJggg==
+</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>
+</root>

+ 1 - 1
UAS_MES_JC/FunctionCode/Special/Special_OQC.Designer.cs

@@ -1,6 +1,6 @@
 namespace UAS_MES_NEW.Special
 {
-    partial class Special_OQC
+    partial class Make_SingleBoard
     {
         /// <summary>
         /// Required designer variable.

+ 2 - 2
UAS_MES_JC/FunctionCode/Special/Special_OQC.cs

@@ -14,7 +14,7 @@ using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Special
 {
-    public partial class Special_OQC : Form
+    public partial class Make_SingleBoard : Form
     {
         DataHelper dh;
 
@@ -32,7 +32,7 @@ namespace UAS_MES_NEW.Special
         List<string> WaitList = new List<string>();
 
 
-        public Special_OQC()
+        public Make_SingleBoard()
         {
             InitializeComponent();
         }

+ 1 - 1
UAS_MES_JC/Login.cs

@@ -93,7 +93,7 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Address + ")(PORT=11702)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11702)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 10 - 2
UAS_MES_JC/PublicMethod/LogicHandler.cs

@@ -1073,10 +1073,18 @@ namespace UAS_MES_NEW.PublicMethod
         {
             string BoxCode = "";
             string[] param = new string[] { Caller, iMakeCode, iProdCode, iUserCode, BoxCode };
-            dh.CallProcedure("SP_GETPACKORPALLETCODE_TEST", ref param);
+            dh.CallProcedure("SP_GETPACKORPALLETCODE", ref param);
             return param[4];
         }
 
+        public static string GetSN(string iMakeCode)
+        {
+            string SN = "";
+            string[] param = new string[] { iMakeCode, SN };
+            dh.CallProcedure("SP_SN", ref param);
+            return param[1];
+        }
+
         public static bool CheckSNBeforeLoad(string iMakeCode, string iSN, string iFSonCode, string iSonCode, string iRule, string iPrefix, string iLength, string iIfRepeat, string iChecksalecode, out string ErrMessage)
         {
             DataTable dt;
@@ -1177,7 +1185,7 @@ namespace UAS_MES_NEW.PublicMethod
                                 if (iSN.Length > index1)
                                 {
                                     //先截取长度
-                                    if (pres[i] == "" ? true : iSN.Substring(index1-1).StartsWith(str))
+                                    if (pres[i] == "" ? true : iSN.Substring(index1 - 1).StartsWith(str))
                                     {
                                         //满足其中一条即可
                                         f = true;

+ 9 - 0
UAS_MES_JC/UAS_MES_JC.csproj

@@ -652,6 +652,12 @@
     <Compile Include="FunctionCode\Make\Make_TestCollection_DCW.Designer.cs">
       <DependentUpon>Make_TestCollection_DCW.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_SingleBoard.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_SingleBoard.Designer.cs">
+      <DependentUpon>Make_SingleBoard.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Packing\Packing_BigBoxCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1527,6 +1533,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_TestCollection_DCW.resx">
       <DependentUpon>Make_TestCollection_DCW.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_SingleBoard.resx">
+      <DependentUpon>Make_SingleBoard.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Packing\Packing_BigBoxCollection.resx">
       <DependentUpon>Packing_BigBoxCollection.cs</DependentUpon>
     </EmbeddedResource>