Browse Source

拆解处理不良代码修改

Hcsy 8 năm trước cách đây
mục cha
commit
08a5f08d37

+ 231 - 253
UAS-MES/FunctionCode/Make/Make_Decompose.Designer.cs

@@ -36,27 +36,6 @@
             this.label4 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.LabelDataGridView = new System.Windows.Forms.DataGridView();
-            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.cm_firstsn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_fsoncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_craftname = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mb_bgcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mb_badcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.AddBad = new System.Windows.Forms.DataGridViewImageColumn();
-            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.New_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_maid = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_materialtype = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_maprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.change = new System.Windows.Forms.RadioButton();
             this.nochange = new System.Windows.Forms.RadioButton();
             this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
@@ -92,6 +71,27 @@
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.pr_name = new UAS_MES.CustomControl.TextBoxWithIcon.TextBoxWithTextArea();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.cm_firstsn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_fsoncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_stepcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_stepname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_craftname = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_detail = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_bgcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mb_badcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.AddBad = new System.Windows.Forms.DataGridViewImageColumn();
+            this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.New_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_maid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_materialtype = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_maprodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
@@ -99,10 +99,9 @@
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(44, 661);
-            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode_label.Location = new System.Drawing.Point(33, 529);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(90, 32);
+            this.pa_makecode_label.Size = new System.Drawing.Size(72, 27);
             this.pa_makecode_label.TabIndex = 173;
             this.pa_makecode_label.Text = "序列号";
             // 
@@ -110,10 +109,9 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(44, 22);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(33, 18);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(72, 27);
+            this.label1.Size = new System.Drawing.Size(58, 21);
             this.label1.TabIndex = 177;
             this.label1.Text = "序列号";
             // 
@@ -121,10 +119,9 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(44, 82);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(33, 66);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 178;
             this.label2.Text = "产品编号";
             // 
@@ -132,10 +129,9 @@
             // 
             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(420, 82);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(315, 66);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(92, 27);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 179;
             this.label3.Text = "名称规格";
             // 
@@ -143,10 +139,9 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(420, 22);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(315, 18);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(72, 27);
+            this.label4.Size = new System.Drawing.Size(58, 21);
             this.label4.TabIndex = 180;
             this.label4.Text = "工单号";
             // 
@@ -154,10 +149,9 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(969, 22);
-            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Location = new System.Drawing.Point(727, 18);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(92, 27);
+            this.label5.Size = new System.Drawing.Size(74, 21);
             this.label5.TabIndex = 181;
             this.label5.Text = "已采集数";
             // 
@@ -188,183 +182,21 @@
             this.cm_maprodcode,
             this.cm_sncode,
             this.cm_makecode});
-            this.LabelDataGridView.Location = new System.Drawing.Point(16, 128);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4);
+            this.LabelDataGridView.Location = new System.Drawing.Point(12, 102);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowHeadersVisible = false;
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(1185, 291);
+            this.LabelDataGridView.Size = new System.Drawing.Size(889, 233);
             this.LabelDataGridView.TabIndex = 188;
             this.LabelDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelDataGridView_CellContentClick);
             this.LabelDataGridView.Sorted += new System.EventHandler(this.LabelDataGridView_Sorted);
             // 
-            // Choose
-            // 
-            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.Choose.HeaderText = "勾选";
-            this.Choose.MinimumWidth = 80;
-            this.Choose.Name = "Choose";
-            this.Choose.Width = 80;
-            // 
-            // cm_firstsn
-            // 
-            this.cm_firstsn.DataPropertyName = "cm_firstsn";
-            this.cm_firstsn.HeaderText = "";
-            this.cm_firstsn.Name = "cm_firstsn";
-            this.cm_firstsn.Visible = false;
-            // 
-            // cm_fsoncode
-            // 
-            this.cm_fsoncode.DataPropertyName = "cm_fsoncode";
-            this.cm_fsoncode.HeaderText = "";
-            this.cm_fsoncode.Name = "cm_fsoncode";
-            this.cm_fsoncode.Visible = false;
-            // 
-            // cm_stepcode
-            // 
-            this.cm_stepcode.DataPropertyName = "cm_stepcode";
-            this.cm_stepcode.HeaderText = "";
-            this.cm_stepcode.Name = "cm_stepcode";
-            this.cm_stepcode.Visible = false;
-            // 
-            // cm_stepname
-            // 
-            this.cm_stepname.DataPropertyName = "cm_stepname";
-            this.cm_stepname.HeaderText = "";
-            this.cm_stepname.Name = "cm_stepname";
-            this.cm_stepname.Visible = false;
-            // 
-            // cm_craftname
-            // 
-            this.cm_craftname.DataPropertyName = "cm_craftname";
-            this.cm_craftname.HeaderText = "";
-            this.cm_craftname.Name = "cm_craftname";
-            this.cm_craftname.Visible = false;
-            // 
-            // cm_craftcode
-            // 
-            this.cm_craftcode.DataPropertyName = "cm_craftcode";
-            this.cm_craftcode.HeaderText = "";
-            this.cm_craftcode.Name = "cm_craftcode";
-            this.cm_craftcode.Visible = false;
-            // 
-            // cm_id
-            // 
-            this.cm_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.cm_id.DataPropertyName = "cm_id";
-            this.cm_id.HeaderText = "cm_id";
-            this.cm_id.MinimumWidth = 40;
-            this.cm_id.Name = "cm_id";
-            this.cm_id.Visible = false;
-            this.cm_id.Width = 40;
-            // 
-            // pr_detail
-            // 
-            this.pr_detail.DataPropertyName = "pr_detail";
-            this.pr_detail.HeaderText = "pr_detail";
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Visible = false;
-            this.pr_detail.Width = 80;
-            // 
-            // mb_bgcode
-            // 
-            this.mb_bgcode.HeaderText = "不良代码组编号";
-            this.mb_bgcode.Name = "mb_bgcode";
-            this.mb_bgcode.ReadOnly = true;
-            this.mb_bgcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.mb_bgcode.Visible = false;
-            this.mb_bgcode.Width = 80;
-            // 
-            // mb_badcode
-            // 
-            this.mb_badcode.HeaderText = "不良代码";
-            this.mb_badcode.Name = "mb_badcode";
-            this.mb_badcode.ReadOnly = true;
-            this.mb_badcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.mb_badcode.Width = 80;
-            // 
-            // AddBad
-            // 
-            this.AddBad.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.AddBad.HeaderText = "";
-            this.AddBad.Image = global::UAS_MES.Properties.Resources.plus;
-            this.AddBad.Name = "AddBad";
-            this.AddBad.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.AddBad.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.AddBad.Width = 20;
-            // 
-            // cm_soncode
-            // 
-            this.cm_soncode.DataPropertyName = "cm_soncode";
-            this.cm_soncode.HeaderText = "子件编号";
-            this.cm_soncode.Name = "cm_soncode";
-            this.cm_soncode.ReadOnly = true;
-            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // cm_barcode
-            // 
-            this.cm_barcode.DataPropertyName = "cm_barcode";
-            this.cm_barcode.HeaderText = "物料批号";
-            this.cm_barcode.Name = "cm_barcode";
-            this.cm_barcode.ReadOnly = true;
-            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            // 
-            // New_BarCode
-            // 
-            this.New_BarCode.HeaderText = "新批号";
-            this.New_BarCode.MinimumWidth = 300;
-            this.New_BarCode.Name = "New_BarCode";
-            this.New_BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
-            this.New_BarCode.Width = 300;
-            // 
-            // cm_status
-            // 
-            this.cm_status.DataPropertyName = "cm_status";
-            this.cm_status.HeaderText = "上线状态";
-            this.cm_status.Name = "cm_status";
-            // 
-            // cm_maid
-            // 
-            this.cm_maid.DataPropertyName = "cm_maid";
-            this.cm_maid.HeaderText = "";
-            this.cm_maid.Name = "cm_maid";
-            this.cm_maid.Visible = false;
-            // 
-            // cm_materialtype
-            // 
-            this.cm_materialtype.DataPropertyName = "cm_materialtype";
-            this.cm_materialtype.HeaderText = "";
-            this.cm_materialtype.Name = "cm_materialtype";
-            this.cm_materialtype.Visible = false;
-            // 
-            // cm_maprodcode
-            // 
-            this.cm_maprodcode.DataPropertyName = "cm_maprodcode";
-            this.cm_maprodcode.HeaderText = "";
-            this.cm_maprodcode.Name = "cm_maprodcode";
-            this.cm_maprodcode.Visible = false;
-            // 
-            // cm_sncode
-            // 
-            this.cm_sncode.DataPropertyName = "cm_sncode";
-            this.cm_sncode.HeaderText = "";
-            this.cm_sncode.Name = "cm_sncode";
-            this.cm_sncode.Visible = false;
-            // 
-            // cm_makecode
-            // 
-            this.cm_makecode.DataPropertyName = "cm_makecode";
-            this.cm_makecode.HeaderText = "";
-            this.cm_makecode.Name = "cm_makecode";
-            this.cm_makecode.Visible = false;
-            // 
             // change
             // 
             this.change.AutoSize = true;
-            this.change.Location = new System.Drawing.Point(975, 100);
-            this.change.Margin = new System.Windows.Forms.Padding(4);
+            this.change.Location = new System.Drawing.Point(731, 80);
             this.change.Name = "change";
-            this.change.Size = new System.Drawing.Size(88, 19);
+            this.change.Size = new System.Drawing.Size(71, 16);
             this.change.TabIndex = 193;
             this.change.TabStop = true;
             this.change.Text = "拆解更换";
@@ -373,10 +205,9 @@
             // nochange
             // 
             this.nochange.AutoSize = true;
-            this.nochange.Location = new System.Drawing.Point(975, 71);
-            this.nochange.Margin = new System.Windows.Forms.Padding(4);
+            this.nochange.Location = new System.Drawing.Point(731, 57);
             this.nochange.Name = "nochange";
-            this.nochange.Size = new System.Drawing.Size(58, 19);
+            this.nochange.Size = new System.Drawing.Size(47, 16);
             this.nochange.TabIndex = 194;
             this.nochange.TabStop = true;
             this.nochange.Text = "拆解";
@@ -589,11 +420,10 @@
             // 
             this.ms_wccode.AutoSize = true;
             this.ms_wccode.CutLength = null;
-            this.ms_wccode.Location = new System.Drawing.Point(1221, 91);
-            this.ms_wccode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_wccode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.ms_wccode.Location = new System.Drawing.Point(916, 73);
+            this.ms_wccode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ms_wccode.Name = "ms_wccode";
-            this.ms_wccode.Size = new System.Drawing.Size(0, 15);
+            this.ms_wccode.Size = new System.Drawing.Size(0, 12);
             this.ms_wccode.TabIndex = 191;
             this.ms_wccode.Visible = false;
             // 
@@ -601,11 +431,10 @@
             // 
             this.ms_craftname.AutoSize = true;
             this.ms_craftname.CutLength = null;
-            this.ms_craftname.Location = new System.Drawing.Point(1141, 109);
-            this.ms_craftname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_craftname.MaximumSize = new System.Drawing.Size(267, 0);
+            this.ms_craftname.Location = new System.Drawing.Point(856, 87);
+            this.ms_craftname.MaximumSize = new System.Drawing.Size(200, 0);
             this.ms_craftname.Name = "ms_craftname";
-            this.ms_craftname.Size = new System.Drawing.Size(0, 15);
+            this.ms_craftname.Size = new System.Drawing.Size(0, 12);
             this.ms_craftname.TabIndex = 190;
             this.ms_craftname.Visible = false;
             // 
@@ -613,11 +442,10 @@
             // 
             this.ms_craftcode.AutoSize = true;
             this.ms_craftcode.CutLength = null;
-            this.ms_craftcode.Location = new System.Drawing.Point(960, 109);
-            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_craftcode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.ms_craftcode.Location = new System.Drawing.Point(720, 87);
+            this.ms_craftcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ms_craftcode.Name = "ms_craftcode";
-            this.ms_craftcode.Size = new System.Drawing.Size(0, 15);
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 12);
             this.ms_craftcode.TabIndex = 189;
             this.ms_craftcode.Visible = false;
             // 
@@ -626,11 +454,10 @@
             this.deccount.AutoSize = true;
             this.deccount.CutLength = null;
             this.deccount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.deccount.Location = new System.Drawing.Point(1100, 22);
-            this.deccount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.deccount.MaximumSize = new System.Drawing.Size(200, 0);
+            this.deccount.Location = new System.Drawing.Point(825, 18);
+            this.deccount.MaximumSize = new System.Drawing.Size(150, 0);
             this.deccount.Name = "deccount";
-            this.deccount.Size = new System.Drawing.Size(0, 27);
+            this.deccount.Size = new System.Drawing.Size(0, 21);
             this.deccount.TabIndex = 187;
             this.deccount.Tag = "1";
             // 
@@ -639,11 +466,10 @@
             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(551, 22);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_makecode.Location = new System.Drawing.Point(413, 18);
+            this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
             this.ms_makecode.TabIndex = 186;
             this.ms_makecode.Tag = "1";
             // 
@@ -652,11 +478,10 @@
             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(167, 82);
-            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_prodcode.Location = new System.Drawing.Point(125, 66);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_prodcode.Name = "ms_prodcode";
-            this.ms_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ms_prodcode.TabIndex = 184;
             this.ms_prodcode.Tag = "1";
             // 
@@ -665,11 +490,10 @@
             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(167, 22);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_sncode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.ms_sncode.Location = new System.Drawing.Point(125, 18);
+            this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Size = new System.Drawing.Size(0, 27);
+            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
             this.ms_sncode.TabIndex = 183;
             this.ms_sncode.Tag = "1";
             // 
@@ -680,13 +504,12 @@
             this.Decompose.DownImage = ((System.Drawing.Image)(resources.GetObject("Decompose.DownImage")));
             this.Decompose.Image = ((System.Drawing.Image)(resources.GetObject("Decompose.Image")));
             this.Decompose.IsShowBorder = true;
-            this.Decompose.Location = new System.Drawing.Point(711, 666);
-            this.Decompose.Margin = new System.Windows.Forms.Padding(4);
+            this.Decompose.Location = new System.Drawing.Point(533, 533);
             this.Decompose.MoveImage = ((System.Drawing.Image)(resources.GetObject("Decompose.MoveImage")));
             this.Decompose.Name = "Decompose";
             this.Decompose.NormalImage = ((System.Drawing.Image)(resources.GetObject("Decompose.NormalImage")));
             this.Decompose.Power = null;
-            this.Decompose.Size = new System.Drawing.Size(101, 34);
+            this.Decompose.Size = new System.Drawing.Size(76, 27);
             this.Decompose.TabIndex = 175;
             this.Decompose.Text = "确定拆解";
             this.Decompose.UseVisualStyleBackColor = true;
@@ -697,11 +520,10 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(196, 669);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4);
+            this.sn_code.Location = new System.Drawing.Point(147, 535);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(260, 25);
+            this.sn_code.Size = new System.Drawing.Size(196, 21);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -711,10 +533,9 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(16, 444);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(12, 355);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1184, 189);
+            this.OperateResult.Size = new System.Drawing.Size(889, 152);
             this.OperateResult.TabIndex = 172;
             this.OperateResult.Text = "";
             // 
@@ -729,19 +550,177 @@
             // pr_name
             // 
             this.pr_name.Font = new System.Drawing.Font("微软雅黑", 10.5F);
-            this.pr_name.Location = new System.Drawing.Point(534, 83);
-            this.pr_name.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_name.Location = new System.Drawing.Point(400, 66);
             this.pr_name.Name = "pr_name";
-            this.pr_name.Size = new System.Drawing.Size(215, 31);
+            this.pr_name.Size = new System.Drawing.Size(161, 25);
             this.pr_name.TabIndex = 195;
             this.pr_name.TextAreaEnable = false;
             this.pr_name.TextBoxEnable = false;
             // 
+            // Choose
+            // 
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.MinimumWidth = 80;
+            this.Choose.Name = "Choose";
+            this.Choose.Width = 80;
+            // 
+            // cm_firstsn
+            // 
+            this.cm_firstsn.DataPropertyName = "cm_firstsn";
+            this.cm_firstsn.HeaderText = "";
+            this.cm_firstsn.Name = "cm_firstsn";
+            this.cm_firstsn.Visible = false;
+            // 
+            // cm_fsoncode
+            // 
+            this.cm_fsoncode.DataPropertyName = "cm_fsoncode";
+            this.cm_fsoncode.HeaderText = "";
+            this.cm_fsoncode.Name = "cm_fsoncode";
+            this.cm_fsoncode.Visible = false;
+            // 
+            // cm_stepcode
+            // 
+            this.cm_stepcode.DataPropertyName = "cm_stepcode";
+            this.cm_stepcode.HeaderText = "";
+            this.cm_stepcode.Name = "cm_stepcode";
+            this.cm_stepcode.Visible = false;
+            // 
+            // cm_stepname
+            // 
+            this.cm_stepname.DataPropertyName = "cm_stepname";
+            this.cm_stepname.HeaderText = "";
+            this.cm_stepname.Name = "cm_stepname";
+            this.cm_stepname.Visible = false;
+            // 
+            // cm_craftname
+            // 
+            this.cm_craftname.DataPropertyName = "cm_craftname";
+            this.cm_craftname.HeaderText = "";
+            this.cm_craftname.Name = "cm_craftname";
+            this.cm_craftname.Visible = false;
+            // 
+            // cm_craftcode
+            // 
+            this.cm_craftcode.DataPropertyName = "cm_craftcode";
+            this.cm_craftcode.HeaderText = "";
+            this.cm_craftcode.Name = "cm_craftcode";
+            this.cm_craftcode.Visible = false;
+            // 
+            // cm_id
+            // 
+            this.cm_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.cm_id.DataPropertyName = "cm_id";
+            this.cm_id.HeaderText = "cm_id";
+            this.cm_id.MinimumWidth = 40;
+            this.cm_id.Name = "cm_id";
+            this.cm_id.Visible = false;
+            this.cm_id.Width = 40;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.DataPropertyName = "pr_detail";
+            this.pr_detail.HeaderText = "pr_detail";
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Visible = false;
+            this.pr_detail.Width = 80;
+            // 
+            // mb_bgcode
+            // 
+            this.mb_bgcode.HeaderText = "不良代码组编号";
+            this.mb_bgcode.Name = "mb_bgcode";
+            this.mb_bgcode.ReadOnly = true;
+            this.mb_bgcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.mb_bgcode.Visible = false;
+            this.mb_bgcode.Width = 80;
+            // 
+            // mb_badcode
+            // 
+            this.mb_badcode.HeaderText = "不良代码";
+            this.mb_badcode.Name = "mb_badcode";
+            this.mb_badcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.mb_badcode.Width = 80;
+            // 
+            // AddBad
+            // 
+            this.AddBad.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.AddBad.HeaderText = "";
+            this.AddBad.Image = global::UAS_MES.Properties.Resources.plus;
+            this.AddBad.Name = "AddBad";
+            this.AddBad.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.AddBad.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.AddBad.Width = 20;
+            // 
+            // cm_soncode
+            // 
+            this.cm_soncode.DataPropertyName = "cm_soncode";
+            this.cm_soncode.HeaderText = "子件编号";
+            this.cm_soncode.Name = "cm_soncode";
+            this.cm_soncode.ReadOnly = true;
+            this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // cm_barcode
+            // 
+            this.cm_barcode.DataPropertyName = "cm_barcode";
+            this.cm_barcode.HeaderText = "物料批号";
+            this.cm_barcode.Name = "cm_barcode";
+            this.cm_barcode.ReadOnly = true;
+            this.cm_barcode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            // 
+            // New_BarCode
+            // 
+            this.New_BarCode.HeaderText = "新批号";
+            this.New_BarCode.MinimumWidth = 300;
+            this.New_BarCode.Name = "New_BarCode";
+            this.New_BarCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.New_BarCode.Width = 300;
+            // 
+            // cm_status
+            // 
+            this.cm_status.DataPropertyName = "cm_status";
+            this.cm_status.HeaderText = "上线状态";
+            this.cm_status.Name = "cm_status";
+            // 
+            // cm_maid
+            // 
+            this.cm_maid.DataPropertyName = "cm_maid";
+            this.cm_maid.HeaderText = "";
+            this.cm_maid.Name = "cm_maid";
+            this.cm_maid.Visible = false;
+            // 
+            // cm_materialtype
+            // 
+            this.cm_materialtype.DataPropertyName = "cm_materialtype";
+            this.cm_materialtype.HeaderText = "";
+            this.cm_materialtype.Name = "cm_materialtype";
+            this.cm_materialtype.Visible = false;
+            // 
+            // cm_maprodcode
+            // 
+            this.cm_maprodcode.DataPropertyName = "cm_maprodcode";
+            this.cm_maprodcode.HeaderText = "";
+            this.cm_maprodcode.Name = "cm_maprodcode";
+            this.cm_maprodcode.Visible = false;
+            // 
+            // cm_sncode
+            // 
+            this.cm_sncode.DataPropertyName = "cm_sncode";
+            this.cm_sncode.HeaderText = "";
+            this.cm_sncode.Name = "cm_sncode";
+            this.cm_sncode.Visible = false;
+            // 
+            // cm_makecode
+            // 
+            this.cm_makecode.DataPropertyName = "cm_makecode";
+            this.cm_makecode.HeaderText = "";
+            this.cm_makecode.Name = "cm_makecode";
+            this.cm_makecode.Visible = false;
+            // 
             // Make_Decompose
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1237, 716);
+            this.ClientSize = new System.Drawing.Size(928, 573);
             this.Controls.Add(this.pr_name);
             this.Controls.Add(this.nochange);
             this.Controls.Add(this.change);
@@ -763,7 +742,6 @@
             this.Controls.Add(this.pa_makecode_label);
             this.Controls.Add(this.OperateResult);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_Decompose";
             this.Tag = "Make!Decompose";
             this.Text = "拆解处理";
@@ -817,6 +795,8 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn16;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn17;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn19;
+        private CustomControl.TextBoxWithIcon.TextBoxWithTextArea pr_name;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_firstsn;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_fsoncode;
@@ -838,7 +818,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_maprodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_sncode;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_makecode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn19;
-        private CustomControl.TextBoxWithIcon.TextBoxWithTextArea pr_name;
     }
 }

+ 23 - 28
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -37,6 +37,8 @@ namespace UAS_MES.Make
 
         int rowindex;
 
+        Make_NewBadCode_DE badcode;
+
         //记录当前输入框的值
         string sncode_1;
         string sncode_2;
@@ -107,7 +109,7 @@ namespace UAS_MES.Make
             sql.Clear();
             sql.Append("select cm_craftcode,cm_craftname,cm_firstsn,cm_makecode,cm_sncode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_maid,cm_soncode,pr_detail,cm_materialtype,");
             sql.Append("max(cm_status) cm_status,max(cm_id) cm_id from craftmaterial left join product on pr_code=cm_soncode where(cm_sncode  in (select sn from makesnrelation ");
-            sql.Append("where firstsn='"+ sncode_1 + "')  or cm_sncode in ( select firstsn from makesnrelation where sn = '" + sncode_1 + "')");
+            sql.Append("where firstsn='" + sncode_1 + "')  or cm_sncode in ( select firstsn from makesnrelation where sn = '" + sncode_1 + "')");
             sql.Append("or cm_sncode = '" + sncode_1 + "') group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_makecode,cm_sncode,cm_maprodcode,cm_maid,cm_soncode,pr_detail,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dt.Rows.Count > 0)
@@ -115,14 +117,13 @@ namespace UAS_MES.Make
                 BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt);
                 for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
                 {
-                    LabelDataGridView.Rows[i].Cells["cm_barcode"].Value = dh.getFieldDataByCondition("CRAFTMATERIAL", "CM_BARCODE", "cm_id = '"+ LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
+                    LabelDataGridView.Rows[i].Cells["cm_barcode"].Value = dh.getFieldDataByCondition("CRAFTMATERIAL", "CM_BARCODE", "cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
                 }
             }
             else
             {
                 OperateResult.AppendText(">>序列号" + ms_sncode.Text + "无上料数据\n", Color.Red);
             }
-            LoadBadcode(sender, e);
         }
 
 
@@ -143,9 +144,10 @@ namespace UAS_MES.Make
                     }
                     else
                     {
-                        Make_NewBadCode badcode = new Make_NewBadCode(ms_sncode.Text, ms_makecode.Text);
+                        rowindex = e.RowIndex;
+                        badcode = new Make_NewBadCode_DE(ms_sncode.Text, ms_makecode.Text);
+                        badcode.Controls["Save"].Click += LoadBadcode;
                         BaseUtil.SetFormCenter(badcode);
-                        badcode.FormClosed += LoadBadcode;
                         badcode.ShowDialog();
                     }
                 }
@@ -155,26 +157,12 @@ namespace UAS_MES.Make
         private void LoadBadcode(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("select mb_id,mb_sncode,mb_badcode,mb_bgcode,nvl(bc_name,mb_badcode) bc_name,nvl(bg_name,mb_bgcode) bg_name,");
-            sql.Append("mb_badremark from makebad left join badcode on bc_code=mb_badcode left join badgroup ");
-            sql.Append("on bg_code=mb_bgcode where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ms_makecode.Text + "' and mb_status=0");
-            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            if (dt.Rows.Count > 0)
+            for (int i = 0; i < badcode.bccode.Length; i++)
             {
-                sql.Clear();
-                bccode = new string[dt.Rows.Count];
-                bgcode = new string[dt.Rows.Count];
-                for (int i = 0; i < dt.Rows.Count; i++)
-                {
-                    sql.Append(dt.Rows[i]["mb_bgcode"].ToString() + " : " + dt.Rows[i]["mb_badcode"].ToString() + "  ");
-                    bgcode[i] = dt.Rows[i]["mb_bgcode"].ToString();
-                    bccode[i] = dt.Rows[i]["mb_badcode"].ToString();
-                }
-                for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
-                {
-                    LabelDataGridView.Rows[i].Cells["mb_badcode"].Value = sql.GetString();
-                }
+                sql.Append(badcode.bgcode[i] + " : " + badcode.bccode[i] + " |");
             }
+            LabelDataGridView.Rows[rowindex].Cells["mb_badcode"].Value = sql.GetString();
+            badcode.Close();
         }
 
         private void Decompose_Click(object sender, EventArgs e)
@@ -198,6 +186,14 @@ namespace UAS_MES.Make
                 {
                     if ((Boolean)LabelDataGridView.Rows[i].Cells["Choose"].Value == true)
                     {
+                        String[] badcodetol = LabelDataGridView.Rows[i].Cells["mb_badcode"].Value.ToString().Split('|');
+                        bgcode = new string[badcodetol.Length - 1];
+                        bccode = new string[badcodetol.Length - 1];
+                        for (int h = 0; h < badcodetol.Length - 1; h++)
+                        {
+                            bgcode[h] = badcodetol[h].Split(':')[0].Trim();
+                            bccode[h] = badcodetol[h].Split(':')[1].Trim();
+                        }
                         if (change.Checked)
                         {
                             dt1 = new DataTable();
@@ -266,7 +262,7 @@ namespace UAS_MES.Make
                             {
                                 OperateResult.AppendText(">>序列号" + ms_sncode.Text + "途程未维护工序BOM\n", Color.Red);
                                 return;
-                            }    
+                            }
                             //判断生产信息
                             sql.Clear();
                             sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + ms_makecode.Text + "'");
@@ -312,7 +308,7 @@ namespace UAS_MES.Make
                             sql.Append("values(Craftmaterial_seq.nextval,'" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maid"].Value + "','" + ms_prodcode.Text + "','" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
                             sql.Append(",'" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepname"].Value + "',");
                             sql.Append("'" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_craftname"].Value + "','" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "',1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "','" + ms_wccode.Text + "',");
-                            sql.Append("'" + User.UserSourceCode + "','" + sp_id + "','" + LabelDataGridView.Rows[i].Cells["cm_materialtype"].Value + "','0','"+ LabelDataGridView.Rows[i].Cells["cm_fsoncode"].Value + "','"+ LabelDataGridView.Rows[i].Cells["cm_firstsn"].Value + "')");
+                            sql.Append("'" + User.UserSourceCode + "','" + sp_id + "','" + LabelDataGridView.Rows[i].Cells["cm_materialtype"].Value + "','0','" + LabelDataGridView.Rows[i].Cells["cm_fsoncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_firstsn"].Value + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");
                             dh.ExecuteSql("update makeserial set ms_nextmacode='" + ms_makecode.Text + "' where ms_id=(select max(ms_id) from makeserial where ms_sncode='" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "' and ms_makecode<>'" + ms_makecode.Text + "')", "update");
                             OperateResult.AppendText("物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "拆解换料成功\n", Color.Green);
@@ -321,7 +317,7 @@ namespace UAS_MES.Make
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "物料" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "拆解换料上料", "拆解换料上料成功", ms_sncode.Text, "");
                         }
                         else if (nochange.Checked)
-                        { 
+                        {
                             //判断生产信息
                             sql.Clear();
                             sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + ms_makecode.Text + "'");
@@ -378,7 +374,7 @@ namespace UAS_MES.Make
             {
                 count++;
                 deccount.Text = count + "";
-                LoadData(sncode_1,sender, new KeyEventArgs(Keys.Enter));
+                LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));
             }
             else
             {
@@ -388,7 +384,6 @@ namespace UAS_MES.Make
 
         private void LabelDataGridView_Sorted(object sender, EventArgs e)
         {
-            LoadBadcode(sender, e);
         }
     }
 }

+ 0 - 60
UAS-MES/FunctionCode/Make/Make_Decompose.resx

@@ -177,66 +177,6 @@
   <metadata name="cm_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="cm_firstsn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_fsoncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_craftname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_craftcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pr_detail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mb_bgcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mb_badcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="AddBad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="New_BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_maid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_materialtype.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_maprodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="Decompose.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 409 - 0
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.Designer.cs

@@ -0,0 +1,409 @@
+namespace UAS_MES.Make
+{
+    partial class Make_NewBadCode_DE
+    {
+        /// <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()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_NewBadCode));
+            this.ChoosedRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_code = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.WaitRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_code1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_name1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_code1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_name1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_name_label = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.headBar1 = new UAS_MES.CustomControl.HeadBar();
+            this.badgroup = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.groupBoxWithBorder1 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.ms_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ms_sncode_label = new System.Windows.Forms.Label();
+            this.Cancel = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.ChooseedReject = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
+            this.WaitReject = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
+            this.groupBoxWithBorder1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // ChoosedRejectList
+            // 
+            this.ChoosedRejectList.CheckBoxes = true;
+            this.ChoosedRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader6,
+            this.bg_code,
+            this.bg_name,
+            this.bc_code,
+            this.bc_name});
+            this.ChoosedRejectList.Location = new System.Drawing.Point(314, 195);
+            this.ChoosedRejectList.Name = "ChoosedRejectList";
+            this.ChoosedRejectList.Size = new System.Drawing.Size(226, 242);
+            this.ChoosedRejectList.TabIndex = 54;
+            this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
+            this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader6
+            // 
+            this.columnHeader6.Text = " ";
+            this.columnHeader6.Width = 20;
+            // 
+            // bg_code
+            // 
+            this.bg_code.Text = "不良代码编号";
+            this.bg_code.Width = 0;
+            // 
+            // bg_name
+            // 
+            this.bg_name.Text = "不良代码组";
+            this.bg_name.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.bg_name.Width = 115;
+            // 
+            // bc_code
+            // 
+            this.bc_code.Text = "不良代码编号";
+            this.bc_code.Width = 0;
+            // 
+            // bc_name
+            // 
+            this.bc_name.Text = "不良名称";
+            this.bc_name.Width = 103;
+            // 
+            // WaitRejectList
+            // 
+            this.WaitRejectList.CheckBoxes = true;
+            this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader5,
+            this.bg_code1,
+            this.bg_name1,
+            this.bc_code1,
+            this.bc_name1});
+            this.WaitRejectList.Location = new System.Drawing.Point(14, 194);
+            this.WaitRejectList.Name = "WaitRejectList";
+            this.WaitRejectList.Size = new System.Drawing.Size(226, 244);
+            this.WaitRejectList.TabIndex = 51;
+            this.WaitRejectList.UseCompatibleStateImageBehavior = false;
+            this.WaitRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader5
+            // 
+            this.columnHeader5.Text = " ";
+            this.columnHeader5.Width = 20;
+            // 
+            // bg_code1
+            // 
+            this.bg_code1.Text = "不良代码组编号";
+            this.bg_code1.Width = 0;
+            // 
+            // bg_name1
+            // 
+            this.bg_name1.Text = "不良代码组";
+            this.bg_name1.Width = 88;
+            // 
+            // bc_code1
+            // 
+            this.bc_code1.Text = "不良代码编号";
+            this.bc_code1.Width = 0;
+            // 
+            // bc_name1
+            // 
+            this.bc_name1.Text = "不良名称";
+            this.bc_name1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.bc_name1.Width = 103;
+            // 
+            // bg_name_label
+            // 
+            this.bg_name_label.AutoSize = true;
+            this.bg_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.bg_name_label.Location = new System.Drawing.Point(10, 133);
+            this.bg_name_label.Name = "bg_name_label";
+            this.bg_name_label.Size = new System.Drawing.Size(90, 21);
+            this.bg_name_label.TabIndex = 92;
+            this.bg_name_label.Text = "不良代码组";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(10, 170);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.TabIndex = 96;
+            this.label1.Text = "待选不良";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(309, 170);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(74, 21);
+            this.label2.TabIndex = 97;
+            this.label2.Text = "已选不良";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.ForeColor = System.Drawing.SystemColors.ControlLightLight;
+            this.label3.Location = new System.Drawing.Point(6, 5);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(106, 21);
+            this.label3.TabIndex = 99;
+            this.label3.Text = "新增不良代码";
+            // 
+            // headBar1
+            // 
+            this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.headBar1.Location = new System.Drawing.Point(0, 0);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.headBar1.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(548, 32);
+            this.headBar1.TabIndex = 98;
+            this.headBar1.Title = null;
+            this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
+            // 
+            // badgroup
+            // 
+            this.badgroup.FormattingEnabled = true;
+            this.badgroup.Location = new System.Drawing.Point(123, 134);
+            this.badgroup.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.badgroup.Name = "badgroup";
+            this.badgroup.Size = new System.Drawing.Size(153, 20);
+            this.badgroup.TabIndex = 95;
+            this.badgroup.SelectedIndexChanged += new System.EventHandler(this.badgroup_SelectedIndexChanged);
+            // 
+            // groupBoxWithBorder1
+            // 
+            this.groupBoxWithBorder1.BackColor = System.Drawing.SystemColors.HighlightText;
+            this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.ms_makecode);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_makecode_label);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_sncode);
+            this.groupBoxWithBorder1.Controls.Add(this.ms_sncode_label);
+            this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(0, 35);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(548, 80);
+            this.groupBoxWithBorder1.TabIndex = 94;
+            this.groupBoxWithBorder1.TabStop = false;
+            this.groupBoxWithBorder1.Text = "产品信息";
+            this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
+            // 
+            // ms_makecode
+            // 
+            this.ms_makecode.AllPower = null;
+            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.BackColor = System.Drawing.Color.White;
+            this.ms_makecode.Enabled = false;
+            this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode.ForeColor = System.Drawing.Color.Black;
+            this.ms_makecode.ID = null;
+            this.ms_makecode.Location = new System.Drawing.Point(313, 35);
+            this.ms_makecode.Name = "ms_makecode";
+            this.ms_makecode.Power = null;
+            this.ms_makecode.Size = new System.Drawing.Size(141, 23);
+            this.ms_makecode.Str = null;
+            this.ms_makecode.Str1 = null;
+            this.ms_makecode.Str2 = null;
+            this.ms_makecode.TabIndex = 98;
+            this.ms_makecode.Tag = "Read";
+            // 
+            // 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(240, 35);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_makecode_label.TabIndex = 97;
+            this.ms_makecode_label.Text = "工单号";
+            // 
+            // ms_sncode
+            // 
+            this.ms_sncode.AllPower = null;
+            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.BackColor = System.Drawing.Color.White;
+            this.ms_sncode.Enabled = false;
+            this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_sncode.ForeColor = System.Drawing.Color.Black;
+            this.ms_sncode.ID = null;
+            this.ms_sncode.Location = new System.Drawing.Point(82, 35);
+            this.ms_sncode.Name = "ms_sncode";
+            this.ms_sncode.Power = null;
+            this.ms_sncode.Size = new System.Drawing.Size(141, 23);
+            this.ms_sncode.Str = null;
+            this.ms_sncode.Str1 = null;
+            this.ms_sncode.Str2 = null;
+            this.ms_sncode.TabIndex = 96;
+            this.ms_sncode.Tag = "Read";
+            // 
+            // ms_sncode_label
+            // 
+            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(10, 35);
+            this.ms_sncode_label.Name = "ms_sncode_label";
+            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_sncode_label.TabIndex = 95;
+            this.ms_sncode_label.Text = "序列号";
+            // 
+            // Cancel
+            // 
+            this.Cancel.AllPower = null;
+            this.Cancel.BackColor = System.Drawing.Color.Transparent;
+            this.Cancel.DownImage = ((System.Drawing.Image)(resources.GetObject("Cancel.DownImage")));
+            this.Cancel.Image = null;
+            this.Cancel.IsShowBorder = true;
+            this.Cancel.Location = new System.Drawing.Point(289, 449);
+            this.Cancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Cancel.MoveImage = ((System.Drawing.Image)(resources.GetObject("Cancel.MoveImage")));
+            this.Cancel.Name = "Cancel";
+            this.Cancel.NormalImage = ((System.Drawing.Image)(resources.GetObject("Cancel.NormalImage")));
+            this.Cancel.Power = null;
+            this.Cancel.Size = new System.Drawing.Size(60, 28);
+            this.Cancel.TabIndex = 56;
+            this.Cancel.Text = "取消";
+            this.Cancel.UseVisualStyleBackColor = false;
+            this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
+            // 
+            // Save
+            // 
+            this.Save.AllPower = "ifall";
+            this.Save.BackColor = System.Drawing.Color.Transparent;
+            this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
+            this.Save.Image = null;
+            this.Save.IsShowBorder = true;
+            this.Save.Location = new System.Drawing.Point(200, 449);
+            this.Save.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
+            this.Save.Name = "Save";
+            this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
+            this.Save.Power = null;
+            this.Save.Size = new System.Drawing.Size(60, 28);
+            this.Save.TabIndex = 55;
+            this.Save.Text = "保存";
+            this.Save.UseVisualStyleBackColor = false;
+            this.Save.Click += new System.EventHandler(this.Save_Click);
+            // 
+            // ChooseedReject
+            // 
+            this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
+            this.ChooseedReject.Location = new System.Drawing.Point(252, 278);
+            this.ChooseedReject.Name = "ChooseedReject";
+            this.ChooseedReject.Size = new System.Drawing.Size(50, 23);
+            this.ChooseedReject.TabIndex = 53;
+            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(252, 336);
+            this.WaitReject.Name = "WaitReject";
+            this.WaitReject.Size = new System.Drawing.Size(50, 23);
+            this.WaitReject.TabIndex = 52;
+            this.WaitReject.UseVisualStyleBackColor = true;
+            this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
+            // 
+            // Make_NewBadCode
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.SystemColors.HighlightText;
+            this.ClientSize = new System.Drawing.Size(548, 486);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.headBar1);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.badgroup);
+            this.Controls.Add(this.groupBoxWithBorder1);
+            this.Controls.Add(this.bg_name_label);
+            this.Controls.Add(this.Cancel);
+            this.Controls.Add(this.Save);
+            this.Controls.Add(this.ChoosedRejectList);
+            this.Controls.Add(this.ChooseedReject);
+            this.Controls.Add(this.WaitReject);
+            this.Controls.Add(this.WaitRejectList);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Name = "Make_NewBadCode";
+            this.Tag = "ShowDialogWindow";
+            this.Text = "新增不良代码";
+            this.Load += new System.EventHandler(this.Make_NewBadCode_Load);
+            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ListView ChoosedRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader6;
+        private System.Windows.Forms.ColumnHeader bg_name;
+        private CustomControl.ButtonUtil.ArrowRightButton ChooseedReject;
+        private CustomControl.ButtonUtil.ArrowLeftButton WaitReject;
+        private System.Windows.Forms.ListView WaitRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader5;
+        private System.Windows.Forms.ColumnHeader bc_name1;
+        private CustomControl.ButtonUtil.NormalButton Save;
+        private CustomControl.ButtonUtil.NormalButton Cancel;
+        private System.Windows.Forms.Label bg_name_label;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder groupBoxWithBorder1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ms_makecode;
+        private System.Windows.Forms.Label ms_makecode_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ms_sncode;
+        private System.Windows.Forms.Label ms_sncode_label;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus badgroup;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.HeadBar headBar1;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ColumnHeader bg_code1;
+        private System.Windows.Forms.ColumnHeader bg_code;
+        private System.Windows.Forms.ColumnHeader bc_code;
+        private System.Windows.Forms.ColumnHeader bg_name1;
+        private System.Windows.Forms.ColumnHeader bc_code1;
+        private System.Windows.Forms.ColumnHeader bc_name;
+    }
+}

+ 233 - 0
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.cs

@@ -0,0 +1,233 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES.DataOperate;
+using UAS_MES.Entity;
+using UAS_MES.PublicMethod;
+
+namespace UAS_MES.Make
+{
+    public partial class Make_NewBadCode_DE : Form
+    {
+        //所有用到了headBar的部分都需要这段代码
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+
+        [DllImport("user32.dll", EntryPoint = "GetWindowLong", CharSet = CharSet.Auto)]
+        public static extern int GetWindowLong(HandleRef hWnd, int nIndex);
+
+        [DllImport("user32.dll", EntryPoint = "SetWindowLong", CharSet = CharSet.Auto)]
+        public static extern IntPtr SetWindowLong(HandleRef hWnd, int nIndex, int dwNewLong);
+
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+        /// <summary>
+        /// 序列号
+        /// </summary>
+        string sncode = "";
+        /// <summary>
+        /// 工单号
+        /// </summary>
+        string macode = "";
+
+        DataHelper dh;
+
+        DataTable dt;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        public string[] bccode;
+
+        public string[] bgcode;
+
+        public Make_NewBadCode_DE(string iSnCode, string iMakeCode)
+        {
+            InitializeComponent();
+            sncode = iSnCode;
+            macode = iMakeCode;
+        }
+
+        private void Make_NewBadCode_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            ms_makecode.Text = macode;
+            ms_sncode.Text = sncode;
+            string pr_code = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_sncode='" + sncode + "' and ms_makecode='" + macode + "'").ToString();
+            sql.Clear();
+            sql.Append("select bg_code,bg_name from product left join productkind  on pr_kind =pk_name ");
+            sql.Append("left join productbadgroup on pb_kindcode= pk_code left join badgroup on ");
+            sql.Append("bg_code=pb_badgroup  where pr_code='" + pr_code + "' and nvl(pb_kindcode,'')<>''");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            //如果未查询到数据则获取全部的不良组别
+            if (dt.Rows.Count == 0)
+            {
+                sql.Clear();
+                sql.Append("select bg_code,bg_name from badgroup where bg_statuscode='AUDITED'");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                badgroup.DataSource = dt;
+                badgroup.DisplayMember = "bg_name";
+                badgroup.ValueMember = "bg_code";
+                LoadBadCodeListView();
+            }
+            else
+            {
+                badgroup.DataSource = dt;
+                badgroup.DisplayMember = "bg_name";
+                badgroup.ValueMember = "bg_code";
+                LoadBadCodeListView();
+            }
+        }
+
+        private void ChooseedReject_Click(object sender, EventArgs e)
+        {
+            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[3].Text == WaitRejectList.Items[i].SubItems[3].Text))
+                        {
+                            AddToReject = true;
+                            break;
+                        }
+                    }
+                    if (!AddToReject)
+                    {
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
+                }
+            }
+            if (CheckedNum == 0)
+            {
+                for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
+                {
+                    AddToReject = false;
+                    for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                    {
+                        if ((ChoosedRejectList.Items[j].SubItems[3].Text == WaitRejectList.Items[i].SubItems[3].Text))
+                        {
+                            AddToReject = true;
+                            break;
+                        }
+                    }
+                    if (!AddToReject)
+                    {
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
+                }
+            }
+        }
+
+        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)
+                {
+                    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 Cancel_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+
+        private void Save_Click(object sender, EventArgs e)
+        {
+            if (ms_sncode.Text == "" || ms_makecode.Text == "")
+            {
+                MessageBox.Show("序列号和工单号不允许为空");
+                return;
+            }
+            int RejectCount = ChoosedRejectList.Items.Count;
+            bccode = new string[RejectCount];
+            bgcode = new string[RejectCount];
+            string[] id = new string[RejectCount];
+            string ErrorMessage = "";
+            if (ChoosedRejectList.Items.Count == 0)
+            {
+                MessageBox.Show("不良品必须选择不良原因和不良代码!");
+                return;
+            }
+            else
+            {
+                //用户未填写不良代码一切按照正常逻辑,填写了从index=1开始执行
+                for (int i = 0; i < RejectCount; i++)
+                {
+                    bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text;
+                    //获取所有的不良代码
+                    bccode[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                }
+            }
+        }
+
+        private void badgroup_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            LoadBadCodeListView();
+        }
+
+        /// <summary>
+        /// 加载不良代码的ListView的信息
+        /// </summary>
+        private void LoadBadCodeListView()
+        {
+            string bg_id = badgroup.SelectedValue.ToString();
+            sql.Clear();
+            sql.Append("select bg_code,bg_name,bc_code,bc_name,bc_note from badgroupdetail left join badgroup on bgd_bgid=bg_id ");
+            sql.Append("left join badcode on bgd_badcode=bc_code where bg_code='" + ((bg_id != "" && bg_id != "System.Data.DataRowView") ? bg_id.ToString() : "") + "' and bg_code is not null ");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            //往listview中添加数据
+            WaitRejectList.Items.Clear();
+            WaitRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                ListViewItem lvi = new ListViewItem();
+                //第一列是勾选列,设置列头文本为空
+                lvi.Text = "";
+                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 headBar1_MouseDown(object sender, MouseEventArgs e)
+        {
+            ReleaseCapture();
+            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+        }
+    }
+}

+ 235 - 0
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.resx

@@ -0,0 +1,235 @@
+<?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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Cancel.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="Cancel.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="Cancel.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Save.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="Save.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="Save.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="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>
+</root>

+ 78 - 9
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

@@ -189,7 +189,8 @@ namespace UAS_MES.Warehouse
                             //更新箱号对应的出货单号
                             dh.UpdateByCondition("package", "pa_outno = '" + pi_inoutno.Text + "'", "pa_outboxcode = '" + input.Text + "'");
                         }
-                        else if (serBtn.Checked) {
+                        else if (serBtn.Checked)
+                        {
                             string ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id)ms_id", "ms_sncode='" + input.Text + "'").ToString();
                             if (ms_id == "")
                             {
@@ -199,7 +200,7 @@ namespace UAS_MES.Warehouse
                             else
                             {
                                 sql.Clear();
-                                sql.Append("select ms_status,nvl(ms_downstatus,0)ms_downstatus,ms_outboxcode,nvl(ms_iostatus,0)ms_iostatus,ms_prodcode,ms_salecode from makeserial  where ms_id='" + ms_id + "'");
+                                sql.Append("select ms_status,nvl(ms_downstatus,0)ms_downstatus,ms_outboxcode,nvl(ms_iostatus,1)ms_iostatus,ms_prodcode,ms_salecode from makeserial  where ms_id='" + ms_id + "'");
                                 dtms = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 if (dtms.Rows[0]["ms_status"].ToString() != "2")
                                 {
@@ -216,9 +217,8 @@ namespace UAS_MES.Warehouse
                                     OperateResult.AppendText("序列号" + input.Text + "处于下地状态,不允许出货\n", Color.Red, input);
                                     return;
                                 }
-                                if (dtms.Rows[0]["ms_iostatus"].ToString() != "0")
+                                if (dtms.Rows[0]["ms_iostatus"].ToString() != "1")
                                 {
-
                                     OperateResult.AppendText("序列号" + input.Text + "已经被出货单:" + dh.getFieldDataByCondition("makeserial left JOIN prodiomac  on pim_mac=ms_sncode", "pim_inoutno", "ms_id='" + ms_id + "' order by pim_indate desc").ToString() + "出货\n", Color.Red, input);
                                     return;
                                 }
@@ -254,17 +254,86 @@ namespace UAS_MES.Warehouse
                             {
                                 dh.UpdateByCondition("prodinout", "pi_pdastatus='备货中'", "pi_inoutno='" + pi_inoutno.Text + "'");
                             }
-                            else {
+                            else
+                            {
                                 dh.UpdateByCondition("prodinout", "pi_pdastatus='已备货'", "pi_inoutno='" + pi_inoutno.Text + "'");
-                                OperateResult.AppendText("出货单"+ pi_inoutno.Text + "已完成备货\n", Color.Black);
+                                OperateResult.AppendText("出货单" + pi_inoutno.Text + "已完成备货\n", Color.Black);
                                 return;
-                            }   
+                            }
                         }
                         else if (dta.Rows[0]["pi_type"].ToString() == "自由出货")
                         {
                             dh.UpdateByCondition("prodinout", "pi_pdastatus='备货中'", "pi_inoutno='" + pi_inoutno.Text + "'");
                         }
                     }
+                    else
+                    {
+                        if (dta.Rows[0]["pi_pdastatus"].ToString() == "已出库")
+                        {
+                            OperateResult.AppendText("出货单" + pi_inoutno.Text + "已经出库不允许取消备货\n", Color.Red);
+                            return;
+                        }
+                        else if (dta.Rows[0]["pi_pdastatus"].ToString() == "未备货")
+                        {
+                            OperateResult.AppendText("出货单" + pi_inoutno.Text + "尚未备货,无法取消\n", Color.Red);
+                            return;
+                        }
+                        if (palletBtn.Checked)
+                        {
+                            sql.Clear();
+                            sql.Append("select * from prodiomac where pim_inoutno='"+ pi_inoutno.Text + "' and pim_outboxcode='"+input.Text+"' and pim_type='PALLET'");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                dh.ExecuteSql("delete from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_outboxcode='" + input.Text + "' and pim_type='PALLET'", "delete");
+                                dh.UpdateByCondition("package", "pa_outno=''", "pa_outboxcode='"+input.Text+ "'");
+                            }
+                            else {
+                                OperateResult.AppendText("栈板号" + input.Text + "不在备货数据中\n", Color.Red,input);
+                                return;
+                            }
+                        }
+                        else if (bigboxBtn.Checked)
+                        {
+                            sql.Clear();
+                            sql.Append("select * from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_outboxcode='" + input.Text + "' and pim_type='BOX'");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                dh.ExecuteSql("delete from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_outboxcode='" + input.Text + "' and pim_type='BOX'", "delete");
+                                dh.UpdateByCondition("package", "pa_outno=''", "pa_outboxcode='" + input.Text + "'");
+                            }
+                            else
+                            {
+                                OperateResult.AppendText("箱号" + input.Text + "不在备货数据中\n", Color.Red, input);
+                                return;
+                            }
+                        }
+                        else if (serBtn.Checked)
+                        {
+                            sql.Clear();
+                            sql.Append("select pim_type,pim_outboxcode,pim_prodcode from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_mac='" + input.Text + "'");
+                            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                if (dt.Rows[0]["pim_type"].ToString() != "" && dt.Rows[0]["pim_outboxcode"].ToString() != "")
+                                {
+                                    OperateResult.AppendText("序列号" + input.Text + "已通过箱号或栈板号" + dt.Rows[0]["pim_outboxcode"].ToString() + "备货,无法单独取消\n", Color.Red, input);
+                                    return;
+                                }
+                                else
+                                {
+                                    dh.ExecuteSql("delete from prodiomac where pim_inoutno='" + pi_inoutno.Text + "' and pim_mac='" + input.Text + "'", "delete");
+                                    dh.UpdateByCondition("makeserial", "ms_iostatus=1", "ms_sncode='"+input.Text+"' and ms_prodcode='"+ dt.Rows[0]["pim_prodcode"].ToString() + "' and ms_iostatus=2");
+                                }
+                            }
+                            else
+                            {
+                                OperateResult.AppendText("序列号" + input.Text + "不在备货数据中\n", Color.Red, input);
+                                return;
+                            }
+                        }
+                    }
                 }
                 else
                 {
@@ -278,8 +347,8 @@ namespace UAS_MES.Warehouse
         {
             //更新操作
             sql.Clear();
-            sql.Append("insert into prodiomac(pim_id,pim_inoutno,pim_piid,pim_prodcode,pim_mac,pim_indate,pim_inman,pib_type)");
-            sql.Append("values(prodiomac_seq.nextval,'" + pi_inoutno.Text + "','" + pi_id.Text + "','" + dtms.Rows[0]["ms_prodcode"].ToString() + "','" + input.Text + "',sysdate,'" + User.UserCode + "','')");
+            sql.Append("insert into prodiomac(pim_id,pim_inoutno,pim_piid,pim_prodcode,pim_mac,pim_indate,pim_inman)");
+            sql.Append("values(prodiomac_seq.nextval,'" + pi_inoutno.Text + "','" + pi_id.Text + "','" + dtms.Rows[0]["ms_prodcode"].ToString() + "','" + input.Text + "',sysdate,'" + User.UserCode + "')");
             dh.ExecuteSql(sql.GetString(), "insert");
             dh.UpdateByCondition("makeserial", "ms_iostatus=2", " ms_id='" + ms_id + "'");
         }