Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 8 years ago
parent
commit
b5a4b2a68d

+ 297 - 302
UAS-MES/FunctionCode/Make/Make_Decompose.Designer.cs

@@ -36,31 +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_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_spid = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_firstsn = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.cm_wccode = 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.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            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_1 = 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();
@@ -76,8 +51,8 @@
             this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
             this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
             this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -87,6 +62,8 @@
             this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pr_name = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ms_wccode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ms_craftname = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ms_craftcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
@@ -98,7 +75,31 @@
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
             this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.pr_name = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.cm_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_spid = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_firstsn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.cm_wccode = 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.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            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_1 = 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();
             // 
@@ -106,10 +107,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(50, 794);
-            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(107, 39);
+            this.pa_makecode_label.Size = new System.Drawing.Size(72, 27);
             this.pa_makecode_label.TabIndex = 173;
             this.pa_makecode_label.Text = "序列号";
             // 
@@ -117,10 +117,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(50, 27);
-            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(86, 31);
+            this.label1.Size = new System.Drawing.Size(58, 21);
             this.label1.TabIndex = 177;
             this.label1.Text = "序列号";
             // 
@@ -128,10 +127,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(50, 99);
-            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(110, 31);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 178;
             this.label2.Text = "产品编号";
             // 
@@ -139,10 +137,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(472, 99);
-            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(110, 31);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 179;
             this.label3.Text = "产品名称";
             // 
@@ -150,10 +147,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(472, 27);
-            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(86, 31);
+            this.label4.Size = new System.Drawing.Size(58, 21);
             this.label4.TabIndex = 180;
             this.label4.Text = "工单号";
             // 
@@ -161,10 +157,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(1090, 27);
-            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(110, 31);
+            this.label5.Size = new System.Drawing.Size(74, 21);
             this.label5.TabIndex = 181;
             this.label5.Text = "已采集数";
             // 
@@ -199,208 +194,21 @@
             this.cm_maprodcode,
             this.cm_sncode,
             this.cm_makecode});
-            this.LabelDataGridView.Location = new System.Drawing.Point(18, 153);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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(1334, 350);
+            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.CellClick += 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_status
-            // 
-            this.cm_status.DataPropertyName = "cm_status";
-            this.cm_status.HeaderText = "";
-            this.cm_status.Name = "cm_status";
-            this.cm_status.Visible = false;
-            // 
-            // cm_spid
-            // 
-            this.cm_spid.DataPropertyName = "cm_spid";
-            this.cm_spid.HeaderText = "";
-            this.cm_spid.Name = "cm_spid";
-            this.cm_spid.Visible = false;
-            // 
-            // cm_firstsn
-            // 
-            this.cm_firstsn.DataPropertyName = "cm_firstsn";
-            this.cm_firstsn.HeaderText = "";
-            this.cm_firstsn.Name = "cm_firstsn";
-            this.cm_firstsn.Visible = false;
-            // 
-            // cm_wccode
-            // 
-            this.cm_wccode.DataPropertyName = "cm_wccode";
-            this.cm_wccode.HeaderText = "";
-            this.cm_wccode.Name = "cm_wccode";
-            this.cm_wccode.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;
-            // 
-            // pr_detail_
-            // 
-            this.pr_detail_.HeaderText = "子件名称";
-            this.pr_detail_.Name = "pr_detail_";
-            // 
-            // 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_1
-            // 
-            this.cm_status_1.HeaderText = "上线状态";
-            this.cm_status_1.Name = "cm_status_1";
-            // 
-            // 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(1096, 120);
-            this.change.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.change.Location = new System.Drawing.Point(731, 80);
             this.change.Name = "change";
-            this.change.Size = new System.Drawing.Size(105, 22);
+            this.change.Size = new System.Drawing.Size(71, 16);
             this.change.TabIndex = 193;
             this.change.TabStop = true;
             this.change.Text = "拆解更换";
@@ -409,10 +217,9 @@
             // nochange
             // 
             this.nochange.AutoSize = true;
-            this.nochange.Location = new System.Drawing.Point(1096, 86);
-            this.nochange.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.nochange.Location = new System.Drawing.Point(731, 57);
             this.nochange.Name = "nochange";
-            this.nochange.Size = new System.Drawing.Size(69, 22);
+            this.nochange.Size = new System.Drawing.Size(47, 16);
             this.nochange.TabIndex = 194;
             this.nochange.TabStop = true;
             this.nochange.Text = "拆解";
@@ -530,8 +337,10 @@
             // 
             // dataGridViewTextBoxColumn10
             // 
+            this.dataGridViewTextBoxColumn10.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
             this.dataGridViewTextBoxColumn10.DataPropertyName = "cm_materialtype";
             this.dataGridViewTextBoxColumn10.HeaderText = "";
+            this.dataGridViewTextBoxColumn10.MinimumWidth = 40;
             this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
             this.dataGridViewTextBoxColumn10.ReadOnly = true;
             this.dataGridViewTextBoxColumn10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
@@ -560,16 +369,6 @@
             this.dataGridViewTextBoxColumn12.Visible = false;
             this.dataGridViewTextBoxColumn12.Width = 300;
             // 
-            // dataGridViewImageColumn1
-            // 
-            this.dataGridViewImageColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.dataGridViewImageColumn1.HeaderText = "";
-            this.dataGridViewImageColumn1.Image = global::UAS_MES.Properties.Resources.plus;
-            this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
-            this.dataGridViewImageColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.dataGridViewImageColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            this.dataGridViewImageColumn1.Width = 20;
-            // 
             // dataGridViewTextBoxColumn13
             // 
             this.dataGridViewTextBoxColumn13.DataPropertyName = "cm_makecode";
@@ -581,6 +380,16 @@
             this.dataGridViewTextBoxColumn13.Visible = false;
             this.dataGridViewTextBoxColumn13.Width = 300;
             // 
+            // dataGridViewImageColumn1
+            // 
+            this.dataGridViewImageColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.dataGridViewImageColumn1.HeaderText = "";
+            this.dataGridViewImageColumn1.Image = global::UAS_MES.Properties.Resources.plus;
+            this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
+            this.dataGridViewImageColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.dataGridViewImageColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.dataGridViewImageColumn1.Width = 20;
+            // 
             // dataGridViewTextBoxColumn14
             // 
             this.dataGridViewTextBoxColumn14.DataPropertyName = "cm_makecode";
@@ -607,6 +416,7 @@
             this.dataGridViewTextBoxColumn16.HeaderText = "";
             this.dataGridViewTextBoxColumn16.MinimumWidth = 300;
             this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16";
+            this.dataGridViewTextBoxColumn16.ReadOnly = true;
             this.dataGridViewTextBoxColumn16.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn16.Visible = false;
             this.dataGridViewTextBoxColumn16.Width = 300;
@@ -615,8 +425,11 @@
             // 
             this.dataGridViewTextBoxColumn17.DataPropertyName = "cm_makecode";
             this.dataGridViewTextBoxColumn17.HeaderText = "";
+            this.dataGridViewTextBoxColumn17.MinimumWidth = 300;
             this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
+            this.dataGridViewTextBoxColumn17.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.dataGridViewTextBoxColumn17.Visible = false;
+            this.dataGridViewTextBoxColumn17.Width = 300;
             // 
             // dataGridViewTextBoxColumn18
             // 
@@ -653,15 +466,33 @@
             this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22";
             this.dataGridViewTextBoxColumn22.Visible = false;
             // 
+            // dataGridViewTextBoxColumn23
+            // 
+            this.dataGridViewTextBoxColumn23.DataPropertyName = "cm_makecode";
+            this.dataGridViewTextBoxColumn23.HeaderText = "";
+            this.dataGridViewTextBoxColumn23.Name = "dataGridViewTextBoxColumn23";
+            this.dataGridViewTextBoxColumn23.Visible = false;
+            // 
+            // pr_name
+            // 
+            this.pr_name.AutoSize = true;
+            this.pr_name.CutLength = null;
+            this.pr_name.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_name.Location = new System.Drawing.Point(413, 66);
+            this.pr_name.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_name.Name = "pr_name";
+            this.pr_name.Size = new System.Drawing.Size(0, 21);
+            this.pr_name.TabIndex = 195;
+            this.pr_name.Tag = "1";
+            // 
             // ms_wccode
             // 
             this.ms_wccode.AutoSize = true;
             this.ms_wccode.CutLength = null;
-            this.ms_wccode.Location = new System.Drawing.Point(1374, 110);
-            this.ms_wccode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_wccode.MaximumSize = new System.Drawing.Size(300, 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, 18);
+            this.ms_wccode.Size = new System.Drawing.Size(0, 12);
             this.ms_wccode.TabIndex = 191;
             this.ms_wccode.Visible = false;
             // 
@@ -669,11 +500,10 @@
             // 
             this.ms_craftname.AutoSize = true;
             this.ms_craftname.CutLength = null;
-            this.ms_craftname.Location = new System.Drawing.Point(1284, 130);
-            this.ms_craftname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_craftname.MaximumSize = new System.Drawing.Size(300, 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, 18);
+            this.ms_craftname.Size = new System.Drawing.Size(0, 12);
             this.ms_craftname.TabIndex = 190;
             this.ms_craftname.Visible = false;
             // 
@@ -681,11 +511,10 @@
             // 
             this.ms_craftcode.AutoSize = true;
             this.ms_craftcode.CutLength = null;
-            this.ms_craftcode.Location = new System.Drawing.Point(1080, 130);
-            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_craftcode.MaximumSize = new System.Drawing.Size(300, 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, 18);
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 12);
             this.ms_craftcode.TabIndex = 189;
             this.ms_craftcode.Visible = false;
             // 
@@ -694,11 +523,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(1238, 27);
-            this.deccount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.deccount.MaximumSize = new System.Drawing.Size(225, 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, 31);
+            this.deccount.Size = new System.Drawing.Size(0, 21);
             this.deccount.TabIndex = 187;
             this.deccount.Tag = "1";
             // 
@@ -707,11 +535,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(620, 27);
-            this.ms_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode.MaximumSize = new System.Drawing.Size(225, 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, 31);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
             this.ms_makecode.TabIndex = 186;
             this.ms_makecode.Tag = "1";
             // 
@@ -720,11 +547,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(188, 99);
-            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_prodcode.MaximumSize = new System.Drawing.Size(225, 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, 31);
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ms_prodcode.TabIndex = 184;
             this.ms_prodcode.Tag = "1";
             // 
@@ -733,11 +559,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(188, 27);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_sncode.MaximumSize = new System.Drawing.Size(225, 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, 31);
+            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
             this.ms_sncode.TabIndex = 183;
             this.ms_sncode.Tag = "1";
             // 
@@ -748,13 +573,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(800, 800);
-            this.Decompose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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(114, 40);
+            this.Decompose.Size = new System.Drawing.Size(76, 27);
             this.Decompose.TabIndex = 175;
             this.Decompose.Text = "确定拆解";
             this.Decompose.UseVisualStyleBackColor = true;
@@ -765,11 +589,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(220, 802);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 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(292, 28);
+            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;
@@ -779,10 +602,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(18, 532);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Location = new System.Drawing.Point(12, 355);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1332, 226);
+            this.OperateResult.Size = new System.Drawing.Size(889, 152);
             this.OperateResult.TabIndex = 172;
             this.OperateResult.Text = "";
             // 
@@ -794,24 +616,197 @@
             this.dataGridViewCheckBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
             this.dataGridViewCheckBoxColumn2.Width = 40;
             // 
-            // pr_name
+            // Choose
             // 
-            this.pr_name.AutoSize = true;
-            this.pr_name.CutLength = null;
-            this.pr_name.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_name.Location = new System.Drawing.Point(620, 99);
-            this.pr_name.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_name.MaximumSize = new System.Drawing.Size(225, 0);
-            this.pr_name.Name = "pr_name";
-            this.pr_name.Size = new System.Drawing.Size(0, 31);
-            this.pr_name.TabIndex = 195;
-            this.pr_name.Tag = "1";
+            this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.Choose.HeaderText = "勾选";
+            this.Choose.MinimumWidth = 80;
+            this.Choose.Name = "Choose";
+            this.Choose.Width = 80;
+            // 
+            // cm_status
+            // 
+            this.cm_status.DataPropertyName = "cm_status";
+            this.cm_status.HeaderText = "";
+            this.cm_status.Name = "cm_status";
+            this.cm_status.Visible = false;
+            // 
+            // cm_spid
+            // 
+            this.cm_spid.DataPropertyName = "cm_spid";
+            this.cm_spid.HeaderText = "";
+            this.cm_spid.Name = "cm_spid";
+            this.cm_spid.Visible = false;
+            // 
+            // cm_firstsn
+            // 
+            this.cm_firstsn.DataPropertyName = "cm_firstsn";
+            this.cm_firstsn.HeaderText = "";
+            this.cm_firstsn.Name = "cm_firstsn";
+            this.cm_firstsn.Visible = false;
+            // 
+            // cm_wccode
+            // 
+            this.cm_wccode.DataPropertyName = "cm_wccode";
+            this.cm_wccode.HeaderText = "";
+            this.cm_wccode.Name = "cm_wccode";
+            this.cm_wccode.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;
+            // 
+            // pr_detail_
+            // 
+            this.pr_detail_.DataPropertyName = "pr_detail";
+            this.pr_detail_.HeaderText = "子件名称";
+            this.pr_detail_.Name = "pr_detail_";
+            // 
+            // 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_1
+            // 
+            this.cm_status_1.HeaderText = "上线状态";
+            this.cm_status_1.Name = "cm_status_1";
+            // 
+            // 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(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1392, 860);
+            this.ClientSize = new System.Drawing.Size(928, 573);
             this.Controls.Add(this.pr_name);
             this.Controls.Add(this.nochange);
             this.Controls.Add(this.change);
@@ -833,7 +828,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, 4, 4, 4);
             this.Name = "Make_Decompose";
             this.Tag = "Make!Decompose";
             this.Text = "拆解处理";
@@ -891,6 +885,8 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn20;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn21;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn22;
+        private CustomControl.ValueLabel.ValueLabel pr_name;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn23;
         private System.Windows.Forms.DataGridViewCheckBoxColumn Choose;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_status;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_spid;
@@ -916,6 +912,5 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_maprodcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_sncode;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_makecode;
-        private CustomControl.ValueLabel.ValueLabel pr_name;
     }
 }

+ 7 - 6
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -108,10 +108,10 @@ namespace UAS_MES.Make
             //cm_wccode
             sncode_1 = sncode;
             sql.Clear();
-            sql.Append("select cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_sncode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,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("or cm_sncode = '" + sncode_1 + "') group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_sncode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,pr_detail,cm_materialtype,cm_craftname,cm_fsoncode ORDER BY cm_status DESC");
+            sql.Append("select cm_craftcode,cm_spid,cm_craftname,cm_firstsn,cm_makecode,cm_stepcode,cm_stepname,cm_maprodcode,cm_fsoncode,cm_wccode,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 firstsn from makesnrelation where sn ");
+            sql.Append(" ='" + sncode_1 + "'union all select sn from makesnrelation where firstsn = '" + sncode_1 + "')");
+            sql.Append("or cm_sncode = '" + sncode_1 + "') group by cm_craftcode,cm_firstsn,cm_stepcode,cm_stepname,cm_spid,cm_makecode,cm_maprodcode,cm_maid,cm_soncode,cm_wccode,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)
             {
@@ -119,7 +119,8 @@ namespace UAS_MES.Make
                 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["pr_detail_"].Value = dh.getFieldDataByCondition("product", "pr_detail", "pr_code = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                    LabelDataGridView.Rows[i].Cells["cm_sncode"].Value = dh.getFieldDataByCondition("CRAFTMATERIAL", "cm_sncode", "cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
+                    // LabelDataGridView.Rows[i].Cells["pr_detail_"].Value = dh.getFieldDataByCondition("product", "pr_detail", "pr_code = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
                     LabelDataGridView.Rows[i].Cells["cm_status_1"].Value = (LabelDataGridView.Rows[i].Cells["cm_status"].Value.ToString() == "-1") ? "已拆解" : "上线";
                 }
             }
@@ -186,7 +187,7 @@ namespace UAS_MES.Make
                     BaseUtil.CleanForm(this);
                     sn_code.Focus();
                     return;
-                }           
+                }
             }
             else
             {

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

@@ -189,78 +189,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_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_spid.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_wccode.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="pr_detail_.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="New_BarCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="cm_status_1.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>

+ 20 - 21
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -53,6 +53,8 @@ namespace UAS_MES.Make
 
         string oMakecode = "";
         string oMsid = "";
+
+        string siid="";//存储TSN对应的sninfo记录id
         bool onlyPass = false;
 
         DataTable macRange;//记录macBT范围
@@ -164,6 +166,8 @@ namespace UAS_MES.Make
                                     return;
                                 }
                             }
+                            //查询TSN对应的sninfo记录id
+                            siid= dh.getFieldDataByCondition("sninfo", "max(si_id) si_id", "si_sn in (select '" + code.Text + "' from dual union select sn from makesnrelation where beforesn = '" + code.Text + "' )").ToString();
                             //获取需要关联采集的信息,以及校验规则
                             ListA = (DataTable)dh.ExecuteSql("select * from productsnrelation where psr_prodcode='" + ma_prodcode.Text + "' order by psr_detno", "select");
                             //没有获取到就提示错误请维护产品对应的关联采集信息
@@ -440,8 +444,8 @@ namespace UAS_MES.Make
                 case "IMEI1":
                 case "IMEI2":
                 case "IMEI3":
-                    if (!ChangeResult.Checked && checkExist("(ms_imei1='" + code.Text + "' or ms_imei2 = '" + code.Text + "' or ms_imei3 = '" + code.Text + "') and  ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' '")
-                        || ChangeResult.Checked && checkExist("ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' ' and  (ms_imei1='" + code.Text + "' or ms_imei2 = '" + code.Text + "' or ms_imei3 = '" + code.Text + "') and ms_id <> '" + oMsid + "'"))
+                    if (!ChangeResult.Checked && checkExist("(ms_imei1='" + code.Text + "' or ms_imei2 = '" + code.Text + "' or ms_imei3 = '" + code.Text + "') and  ms_status in (0,1,2,3)")
+                        || ChangeResult.Checked && checkExist("(ms_imei1='" + code.Text + "' or ms_imei2 = '" + code.Text + "' or ms_imei3 = '" + code.Text + "') and  ms_status in (0,1,2,3)  and ms_id <> '" + oMsid + "'"))
                     {
                         OperateResult.AppendText(">>" + type + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                         OperateResult.AppendText(">>请输入" + type + "\n", Color.Black, code);
@@ -449,7 +453,7 @@ namespace UAS_MES.Make
                     }
                     else
                     {   //校验sninfo中是否已经存在这个
-                        if (dh.CheckExist("sninfo", "si_imei1='" + code.Text + "' or si_imei2 = '" + code.Text + "' or si_imei3 = '" + code.Text + "'"))
+                        if (dh.CheckExist("sninfo", "(si_imei1='" + code.Text + "' or si_imei2 = '" + code.Text + "' or si_imei3 = '" + code.Text + "') and si_id <>'" + siid + "'"))
                         {
                             OperateResult.AppendText(">>" + type + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                             OperateResult.AppendText(">>请输入" + type + "\n", Color.Black, code);
@@ -486,8 +490,8 @@ namespace UAS_MES.Make
                         }
                     }
                     //验证是否已被使用
-                    if (!ChangeResult.Checked && checkExist("MS_" + type + "='" + macOrBt + "' and  ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' '")
-                        || ChangeResult.Checked && checkExist("MS_" + type + "='" + macOrBt + "' and  ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' '  and ms_id <> '" + oMsid + "'"))
+                    if (!ChangeResult.Checked && checkExist("MS_" + type + "='" + macOrBt + "' and  ms_status in (0,1,2,3)")
+                        || ChangeResult.Checked && checkExist("MS_" + type + "='" + macOrBt + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'"))
                     {
                         OperateResult.AppendText(">>" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                         OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
@@ -496,7 +500,7 @@ namespace UAS_MES.Make
                     else
                     {
                         //校验在sninfo表中是否存在
-                        if (dh.CheckExist("sninfo", "si_" + type + "='" + macOrBt + "'"))
+                        if (dh.CheckExist("sninfo", "si_" + type + "='" + macOrBt + "' and si_id <>'" + siid + "'"))
                         {
                             OperateResult.AppendText(">>" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                             OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
@@ -510,8 +514,8 @@ namespace UAS_MES.Make
                     toSi.Append("si_" + type + " = '" + macOrBt + "',");
                     break;
                 case "NETCODE":
-                    if (!ChangeResult.Checked && checkExist("MS_" + type + "='" + code.Text + "' and  ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' '")
-                        || ChangeResult.Checked && checkExist("MS_" + type + "='" + code.Text + "' and  ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' ' and ms_id <> '" + oMsid + "'"))
+                    if (!ChangeResult.Checked && checkExist("MS_" + type + "='" + code.Text + "' and  ms_status in (0,1,2,3)")
+                        || ChangeResult.Checked && checkExist("MS_" + type + "='" + code.Text + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'"))
                     {
                         OperateResult.AppendText(">>" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                         OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
@@ -520,7 +524,7 @@ namespace UAS_MES.Make
                     else
                     {
                         //校验在sninfo表中是否存在
-                        if (dh.CheckExist("sninfo", "si_" + type + "='" + code.Text + "'"))
+                        if (dh.CheckExist("sninfo", "si_" + type + "='" + code.Text + "' and si_id <>'" + siid + "'"))
                         {
                             OperateResult.AppendText(">>" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + code.Text + "错误,不允许重复\n", Color.Red);
                             OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
@@ -554,8 +558,8 @@ namespace UAS_MES.Make
                     //遍历判断已采集的信息是否已存在
                     foreach (DictionaryEntry de in hs)
                     {
-                        if (!ChangeResult.Checked && dh.CheckExist("makeserial", "MS_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "' and  ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' '")
-                            || (ChangeResult.Checked && dh.CheckExist("makeserial", "MS_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "' and  ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' ' and ms_id <> '" + oMsid + "'")))
+                        if (!ChangeResult.Checked && dh.CheckExist("makeserial", "MS_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "' and  ms_status in (0,1,2,3)")
+                            || (ChangeResult.Checked && dh.CheckExist("makeserial", "MS_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'")))
                         {
                             flag = false;
                             OperateResult.AppendText(">>" + de.Key + "已被使用,请重新输入TSN,重新转换\n", Color.Red);
@@ -566,7 +570,7 @@ namespace UAS_MES.Make
                         else
                         {
                             //校验sninfo中是否存在
-                            if (dh.CheckExist("sninfo", "si_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "'"))
+                            if (dh.CheckExist("sninfo", "si_" + (de.Key.ToString() == "WIFI" ? "MAC" : de.Key) + "='" + de.Value + "' and si_id <>'" + siid + "'"))
                             {
                                 flag = false;
                                 OperateResult.AppendText(">>" + de.Key + "已被使用,请重新输入TSN,重新转换\n", Color.Red);
@@ -590,6 +594,8 @@ namespace UAS_MES.Make
                             firstsn = dh.getFieldDataByCondition("makeserial", "ms_firstsn", "ms_id='" + oMsid + "' and  ms_beforesn='" + TSN + "'").ToString();
                             //记录本次修改,存入makesnrelation表中
                             updateSql = "update makeserial set ms_sncode='" + SN + "'," + s1.Remove(s1.Length - 1, 1).ToString() + " where ms_id='" + oMsid + "' and  ms_beforesn='" + TSN + "'";
+                            //删除最近一条转换记录
+                            dh.ExecuteSql("delete from makesnrelation where BEFORESN='" + TSN + "' and makecode='" + ms_macode.Text + "'", "delete");
                         }
                         //未勾选修改转换结果
                         else
@@ -607,12 +613,7 @@ namespace UAS_MES.Make
                         //记录日志
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_macode.Text, User.UserLineCode, User.UserSourceCode, "序列烧录转换", "转换成功", TSN, "");
                         //写入sninfo表
-                        insert2Sninfo(SN,TSN);
-                        if (ChangeResult.Checked)
-                        {
-                            //删除最近一条转换记录
-                            dh.ExecuteSql("delete from makesnrelation where BEFORESN='" + TSN + "' and makecode='" + ms_macode.Text + "' and sn <> '" + SN + "'", "delete");
-                        }
+                        insert2Sninfo(SN);
                         //输出提示用户“>>序列号转换成功”,“>>关联采集成功”
                         //完成该道工序 setFinish
                         if (LogicHandler.SetStepResult(ms_macode.Text, User.UserSourceCode, SN, "序列烧录转换", "序列烧录转换成功", User.UserCode, out errorMessage))
@@ -879,10 +880,8 @@ namespace UAS_MES.Make
                 OperateResult.AppendText("<<请输入TSN号\n", Color.Black);
             }
         }
-        private void insert2Sninfo(string sn,string tsn)
+        private void insert2Sninfo(string sn)
         {
-            //查询是否有记录
-            string siid = dh.getFieldDataByCondition("sninfo", "max(si_id) si_id", "si_sn in (select '"+tsn+"' from dual union select sn from makesnrelation where beforesn = '" + tsn + "' )").ToString();
             //是否为空
             if (siid == "")
             {

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

@@ -92,6 +92,7 @@ namespace UAS_MES.Make
             {
                 if (ChoosedRejectList.Items[i].Checked)
                 {
+                    ChoosedRejectList.Items[i].Checked = false;
                     WaitRejectList.Items.Add((ListViewItem)ChoosedRejectList.Items[i].Clone());
                     ChoosedRejectList.Items[i].Remove();
                     CheckedNum++;
@@ -133,12 +134,14 @@ namespace UAS_MES.Make
                         if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
                         {
                             AddToReject = true;
+                            OperateResult.AppendText(">>已存在"+ChoosedRejectList.Items[j].SubItems[2].Text+"不良\n", Color.Red);
                             break;
                         }
                     }
                     //未添加则进行添加
                     if (!AddToReject)
                     {
+                        WaitRejectList.Items[i].Checked = false;
                         ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
                         WaitRejectList.Items[i].Remove();
                         CheckedNum++;

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.cs

@@ -189,7 +189,7 @@ namespace UAS_MES.Make
                                     return;
                                 }
                                 //验证长度前缀通过,验证数据库
-                                if (dh.CheckExist("makeserial", "ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' ' and  ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + " ='" + inputValue.Text.Replace(":", "").Replace("-", "") + "'"))
+                                if (dh.CheckExist("makeserial", "ms_status in (0,1,2,3) and  ms_" + ((CheckBox)list[step - 1]).Text.Split('/')[0] + " ='" + inputValue.Text.Replace(":", "").Replace("-", "") + "'"))
                                 {
                                     OperateResult.AppendText("<<" + ((CheckBox)list[step - 1]).Text + ":" + inputValue.Text + "错误,已被使用\n", Color.Red, inputValue);
                                     return;
@@ -213,7 +213,7 @@ namespace UAS_MES.Make
                                 return;
                             }
                             //验证长度前缀通过,验证数据库
-                            if (dh.CheckExist("makeserial", "ms_status in (1,2,3) and nvl(ms_nextmacode,' ')=' ' and  ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + " ='" + inputValue.Text + "'"))
+                            if (dh.CheckExist("makeserial", "ms_status in (0,1,2,3) and  ms_" + (((CheckBox)list[step - 1]).Text == "网标" ? "NETCODE" : ((CheckBox)list[step - 1]).Text) + " ='" + inputValue.Text + "'"))
                             {
                                 OperateResult.AppendText("<<" + ((CheckBox)list[step - 1]).Text + ":" + inputValue.Text + "错误,已被使用\n", Color.Red, inputValue);
                                 return;

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

@@ -1242,7 +1242,7 @@ namespace UAS_MES.PublicMethod
                     break;
                 case "BARCODE":
                     //判定条码是否已经上料了
-                    dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode='" + iSN + "' cm_status=0", "select");
+                    dt = (DataTable)dh.ExecuteSql("select cm_barcode from craftmaterial where cm_barcode='" + iSN + "' and cm_status=0", "select");
                     if (dt.Rows.Count > 0)
                     {
                         ErrMessage = "条码" + iSN + "已经上料";