Browse Source

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

Hcsy 8 years ago
parent
commit
3afe837641

+ 0 - 8
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -178,14 +178,6 @@ namespace UAS_MES.Make
             sql.Append("mb_badremark from makebad left join badcode on bc_code=mb_badcode left join badgroup ");
             sql.Append("on bg_code=mb_bgcode where mb_sncode='" + (GetSNCode.Text == "" ? ms_sncode.Text : GetSNCode.Text) + "' and mb_makecode='" + macode + "' and mb_status=0");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            if (dt.Rows.Count == 0 && ms_checkno.Text != "")
-            {
-                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 oqcngreason left join makebad on mb_badcode=or_badcode and mb_bgcode=or_bgcode left join badcode on bc_code=mb_badcode left join badgroup ");
-                sql.Append("on bg_code=mb_bgcode where or_sncode='" + (GetSNCode.Text == "" ? ms_sncode.Text : GetSNCode.Text) + "' and or_makecode='" + macode + "'");
-                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            }
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 //添加根节点

+ 116 - 113
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -55,10 +55,6 @@
             this.ob_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ob_makecode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ChoosedDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewExpand();
-            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.WaitChooseDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
             this.ChooseAll = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.bg_code = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -67,6 +63,15 @@
             this.ob_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.CheckTypeDGV = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithCheckBox();
+            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ci_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_checkqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.oi_ng = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.oi_leveldefect = new System.Windows.Forms.DataGridViewComboBoxColumn();
+            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ChooseedReject = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
             this.WaitReject = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
             this.oi_checkqty1 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
@@ -86,15 +91,10 @@
             this.ob_makecode_dgv = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.obd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.BadGroupCode = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
-            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.oi_itemcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ci_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_sampleqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_checkqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.oi_ng = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.oi_leveldefect = new System.Windows.Forms.DataGridViewComboBoxColumn();
-            this.ois_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ois_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.or_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bg_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.bc_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -446,37 +446,6 @@
             this.ChoosedDGV.Size = new System.Drawing.Size(325, 321);
             this.ChoosedDGV.TabIndex = 205;
             // 
-            // or_id
-            // 
-            this.or_id.DataPropertyName = "or_id";
-            this.or_id.HeaderText = "or_id";
-            this.or_id.Name = "or_id";
-            this.or_id.Visible = false;
-            // 
-            // bg_code1
-            // 
-            this.bg_code1.DataPropertyName = "bg_code";
-            this.bg_code1.HeaderText = "不良组别编号";
-            this.bg_code1.Name = "bg_code1";
-            this.bg_code1.Visible = false;
-            // 
-            // bc_code1
-            // 
-            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.bc_code1.DataPropertyName = "bc_code";
-            this.bc_code1.HeaderText = "不良代码";
-            this.bc_code1.Name = "bc_code1";
-            this.bc_code1.ReadOnly = true;
-            this.bc_code1.Width = 130;
-            // 
-            // bc_name1
-            // 
-            this.bc_name1.DataPropertyName = "bc_name";
-            this.bc_name1.HeaderText = "不良名称 ";
-            this.bc_name1.Name = "bc_name1";
-            this.bc_name1.ReadOnly = true;
-            this.bc_name1.Width = 151;
-            // 
             // WaitChooseDGV
             // 
             this.WaitChooseDGV.AllowUserToAddRows = false;
@@ -586,6 +555,82 @@
             this.CheckTypeDGV.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.CheckTypeDGV_CellValueChanged);
             this.CheckTypeDGV.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.CheckTypeDGV_DataError);
             // 
+            // choose
+            // 
+            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.choose.DataPropertyName = "choose";
+            this.choose.HeaderText = "勾选";
+            this.choose.Name = "choose";
+            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+            this.choose.Width = 60;
+            // 
+            // oi_itemcode
+            // 
+            this.oi_itemcode.DataPropertyName = "oi_itemcode";
+            this.oi_itemcode.HeaderText = "项目编号";
+            this.oi_itemcode.Name = "oi_itemcode";
+            this.oi_itemcode.Visible = false;
+            // 
+            // ci_name
+            // 
+            this.ci_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.ci_name.DataPropertyName = "ci_name";
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.ci_name.DefaultCellStyle = dataGridViewCellStyle1;
+            this.ci_name.HeaderText = "项目名称";
+            this.ci_name.Name = "ci_name";
+            this.ci_name.ReadOnly = true;
+            // 
+            // oi_sampleqty
+            // 
+            this.oi_sampleqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_sampleqty.DataPropertyName = "oi_sampleqty";
+            this.oi_sampleqty.HeaderText = "样本数";
+            this.oi_sampleqty.Name = "oi_sampleqty";
+            this.oi_sampleqty.ReadOnly = true;
+            this.oi_sampleqty.Width = 96;
+            // 
+            // oi_checkqty
+            // 
+            this.oi_checkqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
+            this.oi_checkqty.DataPropertyName = "oi_checkqty";
+            this.oi_checkqty.HeaderText = "已检数";
+            this.oi_checkqty.Name = "oi_checkqty";
+            this.oi_checkqty.ReadOnly = true;
+            this.oi_checkqty.Width = 81;
+            // 
+            // oi_ng
+            // 
+            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_ng.DataPropertyName = "oi_ng";
+            this.oi_ng.HeaderText = "是否NG";
+            this.oi_ng.Name = "oi_ng";
+            this.oi_ng.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.oi_ng.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // oi_leveldefect
+            // 
+            this.oi_leveldefect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_leveldefect.DataPropertyName = "oi_leveldefect";
+            this.oi_leveldefect.HeaderText = "缺陷等级";
+            this.oi_leveldefect.Name = "oi_leveldefect";
+            this.oi_leveldefect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.oi_leveldefect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // ois_remark
+            // 
+            this.ois_remark.DataPropertyName = "ois_remark";
+            this.ois_remark.HeaderText = "备注";
+            this.ois_remark.Name = "ois_remark";
+            this.ois_remark.Visible = false;
+            // 
+            // ois_status
+            // 
+            this.ois_status.DataPropertyName = "ois_status";
+            this.ois_status.HeaderText = "是否检验";
+            this.ois_status.Name = "ois_status";
+            this.ois_status.Visible = false;
+            // 
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
@@ -850,78 +895,36 @@
             this.BadGroupCode.TabIndex = 219;
             this.BadGroupCode.SelectedIndexChanged += new System.EventHandler(this.BadGroupCode_SelectedIndexChanged);
             // 
-            // choose
-            // 
-            this.choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.choose.DataPropertyName = "choose";
-            this.choose.HeaderText = "勾选";
-            this.choose.Name = "choose";
-            this.choose.Resizable = System.Windows.Forms.DataGridViewTriState.False;
-            this.choose.Width = 60;
-            // 
-            // oi_itemcode
-            // 
-            this.oi_itemcode.DataPropertyName = "oi_itemcode";
-            this.oi_itemcode.HeaderText = "项目编号";
-            this.oi_itemcode.Name = "oi_itemcode";
-            this.oi_itemcode.Visible = false;
-            // 
-            // ci_name
-            // 
-            this.ci_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.ci_name.DataPropertyName = "ci_name";
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            this.ci_name.DefaultCellStyle = dataGridViewCellStyle1;
-            this.ci_name.HeaderText = "项目名称";
-            this.ci_name.Name = "ci_name";
-            // 
-            // oi_sampleqty
-            // 
-            this.oi_sampleqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_sampleqty.DataPropertyName = "oi_sampleqty";
-            this.oi_sampleqty.HeaderText = "样本数";
-            this.oi_sampleqty.Name = "oi_sampleqty";
-            this.oi_sampleqty.Width = 96;
-            // 
-            // oi_checkqty
-            // 
-            this.oi_checkqty.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
-            this.oi_checkqty.DataPropertyName = "oi_checkqty";
-            this.oi_checkqty.HeaderText = "已检数";
-            this.oi_checkqty.Name = "oi_checkqty";
-            this.oi_checkqty.Width = 81;
-            // 
-            // oi_ng
+            // or_id
             // 
-            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_ng.DataPropertyName = "oi_ng";
-            this.oi_ng.HeaderText = "是否NG";
-            this.oi_ng.Name = "oi_ng";
-            this.oi_ng.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.oi_ng.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.or_id.DataPropertyName = "or_id";
+            this.or_id.HeaderText = "or_id";
+            this.or_id.Name = "or_id";
+            this.or_id.Visible = false;
             // 
-            // oi_leveldefect
+            // bg_code1
             // 
-            this.oi_leveldefect.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_leveldefect.DataPropertyName = "oi_leveldefect";
-            this.oi_leveldefect.HeaderText = "缺陷等级";
-            this.oi_leveldefect.Name = "oi_leveldefect";
-            this.oi_leveldefect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.oi_leveldefect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            this.bg_code1.DataPropertyName = "bg_code";
+            this.bg_code1.HeaderText = "不良组别编号";
+            this.bg_code1.Name = "bg_code1";
+            this.bg_code1.Visible = false;
             // 
-            // ois_remark
+            // bc_code1
             // 
-            this.ois_remark.DataPropertyName = "ois_remark";
-            this.ois_remark.HeaderText = "备注";
-            this.ois_remark.Name = "ois_remark";
-            this.ois_remark.Visible = false;
+            this.bc_code1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.bc_code1.DataPropertyName = "bc_code";
+            this.bc_code1.HeaderText = "不良代码";
+            this.bc_code1.Name = "bc_code1";
+            this.bc_code1.ReadOnly = true;
+            this.bc_code1.Width = 140;
             // 
-            // ois_status
+            // bc_name1
             // 
-            this.ois_status.DataPropertyName = "ois_status";
-            this.ois_status.HeaderText = "是否检验";
-            this.ois_status.Name = "ois_status";
-            this.ois_status.Visible = false;
+            this.bc_name1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.bc_name1.DataPropertyName = "bc_name";
+            this.bc_name1.HeaderText = "不良名称 ";
+            this.bc_name1.Name = "bc_name1";
+            this.bc_name1.ReadOnly = true;
             // 
             // OQC_SamplingDataCollection
             // 
@@ -1040,10 +1043,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn bg_code;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_code;
         private System.Windows.Forms.DataGridViewTextBoxColumn bc_name;
-        private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bg_code1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;
         private System.Windows.Forms.DataGridViewCheckBoxColumn choose;
         private System.Windows.Forms.DataGridViewTextBoxColumn oi_itemcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn ci_name;
@@ -1053,5 +1052,9 @@
         private System.Windows.Forms.DataGridViewComboBoxColumn oi_leveldefect;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_remark;
         private System.Windows.Forms.DataGridViewTextBoxColumn ois_status;
+        private System.Windows.Forms.DataGridViewTextBoxColumn or_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bg_code1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_code1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn bc_name1;
     }
 }

+ 8 - 0
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -276,6 +276,14 @@ namespace UAS_MES.OQC
                             sql.Append("insert into OQCNGReason(or_id, or_checkno, or_makecode, or_sncode, or_badcode, or_description, or_remark,or_bgcode)");
                             sql.Append("values (OQCNGReason_seq.nextval,'" + ob_checkno.Text + "','" + ob_makecode.Text + "','" + sncode.Text + "',:a,:b,'" + ob_remark.Text + "',:c)");
                             dh.BatchInsert(sql.GetString(), new string[] { "a", "b", "c" }, bc_code.ToArray(), bc_name.ToArray(), bg_code.ToArray());
+                            //插入MakeBad表
+                            sql.Clear();
+                            sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
+                            sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_status)");
+                            sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
+                            sql.Append("sp_soncode,'0' from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
+                            sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + sncode.Text + "'");
+                            dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "bg_code" }, bc_code.ToArray(), bg_code.ToArray());
                         }
                         //更新项目编号中的抽检数、不合格数,根据采样项目记录
                         sql.Clear();

+ 57 - 57
UAS-MES/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -39,6 +39,8 @@
             this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ma_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.groupBoxWithBorder1 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.label1 = new System.Windows.Forms.Label();
+            this.pictureBox4 = new System.Windows.Forms.PictureBox();
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.label4 = new System.Windows.Forms.Label();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
@@ -46,24 +48,22 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.label1 = new System.Windows.Forms.Label();
-            this.pictureBox4 = new System.Windows.Forms.PictureBox();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
             this.SuspendLayout();
             // 
             // sn_code_label
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(13, 14);
+            this.sn_code_label.Location = new System.Drawing.Point(15, 17);
             this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(72, 27);
+            this.sn_code_label.Size = new System.Drawing.Size(86, 31);
             this.sn_code_label.TabIndex = 183;
             this.sn_code_label.Text = "序列号";
             // 
@@ -72,10 +72,10 @@
             this.SerialPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.SerialPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.SerialPanel.Location = new System.Drawing.Point(19, 134);
+            this.SerialPanel.Location = new System.Drawing.Point(21, 161);
             this.SerialPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.SerialPanel.Name = "SerialPanel";
-            this.SerialPanel.Size = new System.Drawing.Size(1265, 316);
+            this.SerialPanel.Size = new System.Drawing.Size(1423, 378);
             this.SerialPanel.TabIndex = 194;
             this.SerialPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.SerialPanel_Paint);
             // 
@@ -92,11 +92,11 @@
             this.mp_indate,
             this.ma_craftcode,
             this.ma_linecode});
-            this.CraftInfDgv.Location = new System.Drawing.Point(0, 485);
+            this.CraftInfDgv.Location = new System.Drawing.Point(0, 582);
             this.CraftInfDgv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.CraftInfDgv.Name = "CraftInfDgv";
             this.CraftInfDgv.RowTemplate.Height = 27;
-            this.CraftInfDgv.Size = new System.Drawing.Size(1300, 238);
+            this.CraftInfDgv.Size = new System.Drawing.Size(1462, 286);
             this.CraftInfDgv.TabIndex = 193;
             // 
             // mp_sncode
@@ -162,23 +162,44 @@
             this.groupBoxWithBorder1.Controls.Add(this.label2);
             this.groupBoxWithBorder1.Controls.Add(this.label3);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(16, 50);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(18, 60);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1271, 50);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(1430, 60);
             this.groupBoxWithBorder1.TabIndex = 192;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "颜色说明";
             this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
             // 
+            // 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(1269, 19);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(110, 31);
+            this.label1.TabIndex = 193;
+            this.label1.Text = "尚未执行";
+            // 
+            // pictureBox4
+            // 
+            this.pictureBox4.BackColor = System.Drawing.Color.White;
+            this.pictureBox4.Location = new System.Drawing.Point(1163, 18);
+            this.pictureBox4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.pictureBox4.Name = "pictureBox4";
+            this.pictureBox4.Size = new System.Drawing.Size(90, 30);
+            this.pictureBox4.TabIndex = 192;
+            this.pictureBox4.TabStop = false;
+            // 
             // pictureBox2
             // 
             this.pictureBox2.BackColor = System.Drawing.Color.Green;
-            this.pictureBox2.Location = new System.Drawing.Point(132, 15);
-            this.pictureBox2.Margin = new System.Windows.Forms.Padding(4);
+            this.pictureBox2.Location = new System.Drawing.Point(148, 18);
+            this.pictureBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox2.Size = new System.Drawing.Size(90, 30);
             this.pictureBox2.TabIndex = 187;
             this.pictureBox2.TabStop = false;
             // 
@@ -186,30 +207,30 @@
             // 
             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(868, 15);
+            this.label4.Location = new System.Drawing.Point(978, 19);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(92, 27);
+            this.label4.Size = new System.Drawing.Size(86, 31);
             this.label4.TabIndex = 191;
-            this.label4.Text = "尚未执行";
+            this.label4.Text = "已报废";
             // 
             // pictureBox1
             // 
             this.pictureBox1.BackColor = System.Drawing.Color.Red;
-            this.pictureBox1.Location = new System.Drawing.Point(451, 15);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
+            this.pictureBox1.Location = new System.Drawing.Point(507, 18);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox1.Size = new System.Drawing.Size(90, 30);
             this.pictureBox1.TabIndex = 186;
             this.pictureBox1.TabStop = false;
             // 
             // pictureBox3
             // 
             this.pictureBox3.BackColor = System.Drawing.Color.Black;
-            this.pictureBox3.Location = new System.Drawing.Point(775, 15);
-            this.pictureBox3.Margin = new System.Windows.Forms.Padding(4);
+            this.pictureBox3.Location = new System.Drawing.Point(872, 18);
+            this.pictureBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.pictureBox3.Name = "pictureBox3";
-            this.pictureBox3.Size = new System.Drawing.Size(80, 25);
+            this.pictureBox3.Size = new System.Drawing.Size(90, 30);
             this.pictureBox3.TabIndex = 190;
             this.pictureBox3.TabStop = false;
             // 
@@ -217,10 +238,10 @@
             // 
             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(225, 15);
+            this.label2.Location = new System.Drawing.Point(254, 19);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(152, 27);
+            this.label2.Size = new System.Drawing.Size(182, 31);
             this.label2.TabIndex = 188;
             this.label2.Text = "已执行且为良品";
             // 
@@ -228,10 +249,10 @@
             // 
             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(544, 15);
+            this.label3.Location = new System.Drawing.Point(613, 19);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(172, 27);
+            this.label3.Size = new System.Drawing.Size(206, 31);
             this.label3.TabIndex = 189;
             this.label3.Text = "已执行且为不良品";
             // 
@@ -240,11 +261,11 @@
             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(123, 16);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4);
+            this.sn_code.Location = new System.Drawing.Point(138, 19);
+            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(192, 25);
+            this.sn_code.Size = new System.Drawing.Size(216, 28);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -252,39 +273,18 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
-            // 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(1127, 15);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
-            this.label1.TabIndex = 193;
-            this.label1.Text = "尚未执行";
-            // 
-            // pictureBox4
-            // 
-            this.pictureBox4.BackColor = System.Drawing.Color.White;
-            this.pictureBox4.Location = new System.Drawing.Point(1034, 15);
-            this.pictureBox4.Margin = new System.Windows.Forms.Padding(4);
-            this.pictureBox4.Name = "pictureBox4";
-            this.pictureBox4.Size = new System.Drawing.Size(80, 25);
-            this.pictureBox4.TabIndex = 192;
-            this.pictureBox4.TabStop = false;
-            // 
             // Query_ExeProgress
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1300, 722);
+            this.ClientSize = new System.Drawing.Size(1462, 866);
             this.Controls.Add(this.SerialPanel);
             this.Controls.Add(this.CraftInfDgv);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.Controls.Add(this.sn_code);
             this.Controls.Add(this.sn_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Name = "Query_ExeProgress";
             this.Tag = "Query!ExeProgress";
             this.Text = "工单执行进度";
@@ -293,10 +293,10 @@
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).EndInit();
             this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
             this.ResumeLayout(true);
             this.PerformLayout();
 

+ 10 - 0
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -107,7 +107,17 @@ namespace UAS_MES.Query
                                 if (!PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString() + "," + RejectStep) || RejectStep == "")
                                     PaintColor.Add(Brushes.Green);
                                 else
+                                {
+                                    //判断之前有没有添加过黑色
+                                    if (PaintColor.Contains(Brushes.Black))
+                                    {
+                                        //移除之前的,
+                                        int index = PaintColor.IndexOf(Brushes.Black);
+                                        PaintColor.RemoveAt(PaintColor.IndexOf(Brushes.Black));
+                                        PaintColor.Insert(index, Brushes.Green);
+                                    }
                                     PaintColor.Add(Brushes.Black);
+                                }
                             }
                         }
                         //不包含说明是线外工序

+ 0 - 21
UAS-MES/FunctionCode/Query/Query_ExeProgress.resx

@@ -138,25 +138,4 @@
   <metadata name="ma_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mp_sncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ma_prodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_sourcecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mp_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ma_craftcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="ma_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>