Browse Source

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

Hcsy 8 years ago
parent
commit
3745feb8ce

+ 83 - 83
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OQC_SamplingDataCollection));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
             this.ob_checkno_label = new System.Windows.Forms.Label();
             this.obd_outboxcode_label = new System.Windows.Forms.Label();
             this.ms_sncode_label = new System.Windows.Forms.Label();
@@ -65,6 +65,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();
@@ -84,15 +93,6 @@
             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();
             ((System.ComponentModel.ISupportInitialize)(this.ChoosedDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.WaitChooseDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CheckTypeDGV)).BeginInit();
@@ -568,6 +568,79 @@
             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";
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            this.ci_name.DefaultCellStyle = dataGridViewCellStyle2;
+            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
+            // 
+            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.oi_ng.DataPropertyName = "oi_ng";
+            this.oi_ng.HeaderText = "是否通过";
+            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")));
@@ -832,79 +905,6 @@
             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
-            // 
-            this.oi_ng.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.oi_ng.DataPropertyName = "oi_ng";
-            this.oi_ng.HeaderText = "是否通过";
-            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;
-            // 
             // OQC_SamplingDataCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);

+ 36 - 0
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.resx

@@ -267,6 +267,42 @@
   <metadata name="bc_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="ChooseAll.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bc_code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bc_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_itemcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ci_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_sampleqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_checkqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_ng.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="oi_leveldefect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ois_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="ois_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

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

@@ -31,6 +31,13 @@
             this.sn_code_label = new System.Windows.Forms.Label();
             this.SerialPanel = new System.Windows.Forms.Panel();
             this.CraftInfDgv = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.ma_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            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.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.label4 = new System.Windows.Forms.Label();
@@ -39,13 +46,6 @@
             this.label2 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.sn_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ma_prodcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mp_sourcecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.mp_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ma_craftcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.ma_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
@@ -96,6 +96,55 @@
             this.CraftInfDgv.Size = new System.Drawing.Size(1300, 238);
             this.CraftInfDgv.TabIndex = 193;
             // 
+            // mp_sncode
+            // 
+            this.mp_sncode.DataPropertyName = "mp_sncode";
+            this.mp_sncode.HeaderText = "序列号";
+            this.mp_sncode.Name = "mp_sncode";
+            this.mp_sncode.Width = 120;
+            // 
+            // mp_makecode
+            // 
+            this.mp_makecode.DataPropertyName = "mp_makecode";
+            this.mp_makecode.HeaderText = "工单代码";
+            this.mp_makecode.Name = "mp_makecode";
+            this.mp_makecode.Width = 120;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.DataPropertyName = "ma_prodcode";
+            this.ma_prodcode.HeaderText = "产品代码";
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Width = 120;
+            // 
+            // mp_sourcecode
+            // 
+            this.mp_sourcecode.DataPropertyName = "mp_sourcecode";
+            this.mp_sourcecode.HeaderText = "资源编号";
+            this.mp_sourcecode.Name = "mp_sourcecode";
+            this.mp_sourcecode.Width = 120;
+            // 
+            // mp_indate
+            // 
+            this.mp_indate.DataPropertyName = "mp_indate";
+            this.mp_indate.HeaderText = "过站时间";
+            this.mp_indate.Name = "mp_indate";
+            this.mp_indate.Width = 120;
+            // 
+            // ma_craftcode
+            // 
+            this.ma_craftcode.DataPropertyName = "ma_craftcode";
+            this.ma_craftcode.HeaderText = "途程代码";
+            this.ma_craftcode.Name = "ma_craftcode";
+            this.ma_craftcode.Width = 120;
+            // 
+            // ma_linecode
+            // 
+            this.ma_linecode.DataPropertyName = "ma_linecode";
+            this.ma_linecode.HeaderText = "产线";
+            this.ma_linecode.Name = "ma_linecode";
+            this.ma_linecode.Width = 120;
+            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
@@ -132,7 +181,7 @@
             // 
             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(864, 12);
+            this.label4.Location = new System.Drawing.Point(867, 15);
             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);
@@ -163,7 +212,7 @@
             // 
             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(221, 12);
+            this.label2.Location = new System.Drawing.Point(224, 15);
             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);
@@ -174,7 +223,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(540, 12);
+            this.label3.Location = new System.Drawing.Point(543, 15);
             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);
@@ -198,55 +247,6 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
-            // mp_sncode
-            // 
-            this.mp_sncode.DataPropertyName = "mp_sncode";
-            this.mp_sncode.HeaderText = "序列号";
-            this.mp_sncode.Name = "mp_sncode";
-            this.mp_sncode.Width = 120;
-            // 
-            // mp_makecode
-            // 
-            this.mp_makecode.DataPropertyName = "mp_makecode";
-            this.mp_makecode.HeaderText = "工单代码";
-            this.mp_makecode.Name = "mp_makecode";
-            this.mp_makecode.Width = 120;
-            // 
-            // ma_prodcode
-            // 
-            this.ma_prodcode.DataPropertyName = "ma_prodcode";
-            this.ma_prodcode.HeaderText = "产品代码";
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Width = 120;
-            // 
-            // mp_sourcecode
-            // 
-            this.mp_sourcecode.DataPropertyName = "mp_sourcecode";
-            this.mp_sourcecode.HeaderText = "资源编号";
-            this.mp_sourcecode.Name = "mp_sourcecode";
-            this.mp_sourcecode.Width = 120;
-            // 
-            // mp_indate
-            // 
-            this.mp_indate.DataPropertyName = "mp_indate";
-            this.mp_indate.HeaderText = "过站时间";
-            this.mp_indate.Name = "mp_indate";
-            this.mp_indate.Width = 120;
-            // 
-            // ma_craftcode
-            // 
-            this.ma_craftcode.DataPropertyName = "ma_craftcode";
-            this.ma_craftcode.HeaderText = "途程代码";
-            this.ma_craftcode.Name = "ma_craftcode";
-            this.ma_craftcode.Width = 120;
-            // 
-            // ma_linecode
-            // 
-            this.ma_linecode.DataPropertyName = "ma_linecode";
-            this.ma_linecode.HeaderText = "产线";
-            this.ma_linecode.Name = "ma_linecode";
-            this.ma_linecode.Width = 120;
-            // 
             // Query_ExeProgress
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);

+ 67 - 53
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -21,6 +21,7 @@ namespace UAS_MES.Query
         string PastStep = "";
         //拆分后的经过的步骤
         Dictionary<int, string> Step;
+        List<Brush> PaintColor = new List<Brush>();
         //屏幕高度
         int ScreenWidth;
         //屏幕宽度
@@ -52,35 +53,71 @@ namespace UAS_MES.Query
         {
             if (e.KeyCode == Keys.Enter)
             {
-                if (Step != null && Step.Count > 0)
+                dt = (DataTable)dh.ExecuteSql("select ms_status,ms_paststep,ms_stepcode from makeserial where ms_sncode='" + sn_code.Text + "'", "select");
+                if (dt.Rows.Count > 0)
                 {
-                    for (int i = 0; i < Step.Count; i++)
+                    if (Step != null && Step.Count > 0)
                     {
-                        Controls.Remove(Controls[i + Step[i] + "_label"]);
+                        Step.Clear();
+                        SerialPanel.Controls.Clear();
+                        PaintColor.Clear();
                     }
-                }
-                //查询执行过的步骤
-                sql.Clear();
-                sql.Append("select CD_DETNO,CD_STEPCODE from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
-                sql.Append("on ms_craftcode=cr_code and ms_prodcode=cr_prodcode where ms_sncode='"+sn_code.Text+"' order by cd_detno");
-                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                Step = new Dictionary<int, string>();
-                PastStep = dh.getFieldDataByCondition("makeserial", "ms_paststep", "ms_sncode='" + sn_code.Text + "'").ToString();
-                for (int i = 0; i < dt.Rows.Count + 2; i++)
-                {
-                    if (i == 0)
-                        Step.Add(i, "开始");
-                    else if (i == dt.Rows.Count + 1)
-                        Step.Add(i, "结束");
+                    //执行过的步骤
+                    PastStep = dt.Rows[0]["ms_paststep"].ToString();
+                    //如果为不良的时候
+                    string BadStep = "";
+                    if (dt.Rows[0]["ms_status"].ToString() == "3")
+                    {
+                        BadStep = dt.Rows[0]["ms_stepcode"].ToString();
+                    }
+                    //查询执行过的步骤
+                    sql.Clear();
+                    sql.Append("select CD_DETNO,CD_STEPCODE from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
+                    sql.Append("on ms_craftcode=cr_code and ms_prodcode=cr_prodcode where ms_sncode='" + sn_code.Text + "' order by cd_detno");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    Step = new Dictionary<int, string>();
+                    for (int i = 0; i < dt.Rows.Count + 2; i++)
+                    {
+                        if (i == 0)
+                            Step.Add(i, "开始");
+                        else if (i == dt.Rows.Count + 1)
+                            Step.Add(i, "结束");
+                        else
+                            Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
+                    }
+                    //添加开始节点绿色
+                    PaintColor.Add(Brushes.Green);
+                    //添加中间节点
+                    for (int i = 0; i < dt.Rows.Count; i++)
+                    {
+                        if (PastStep.Contains(dt.Rows[i]["CD_STEPCODE"].ToString()))
+                        {
+                            if (BadStep != dt.Rows[i]["CD_STEPCODE"].ToString())
+                            {
+                                PaintColor.Add(Brushes.Green);
+                            }
+                            else
+                            {
+                                PaintColor.Add(Brushes.Red);
+                            }
+                        }
+                        else
+                            PaintColor.Add(Brushes.White);
+                    }
+                    //完工添加绿色,未完工添加红色
+                    if (dh.CheckExist("Makeserial", "ms_sncode='" + sn_code.Text + "' and ms_status=2"))
+                        PaintColor.Add(Brushes.Green);
                     else
-                        Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
+                        PaintColor.Add(Brushes.White);
+                    Refresh();
+                    SerialPanel.Refresh();
+                    sql.Clear();
+                    sql.Append("select mp_makecode,ma_prodcode,ma_linecode,ma_craftcode,mp_sourcecode,mp_sncode,mp_indate ");
+                    sql.Append("from makeprocess left join make on mp_makecode=ma_code where mp_sncode='" + sn_code.Text + "'");
+                    dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                    BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
                 }
-                Refresh();
-                sql.Clear();
-                sql.Append("select mp_makecode,ma_prodcode,ma_linecode,ma_craftcode,mp_sourcecode,mp_sncode,mp_indate ");
-                sql.Append("from makeprocess left join make on mp_makecode=ma_code where mp_sncode='"+sn_code.Text+"'");
-                dt = (DataTable)dh.ExecuteSql(sql.GetString(),"select");
-                BaseUtil.FillDgvWithDataTable(CraftInfDgv, dt);
+                else MessageBox.Show("序列号" + sn_code.Text + "不存在");
             }
         }
 
@@ -105,7 +142,9 @@ namespace UAS_MES.Query
                         //途程节点的矩形 
                         Rectangle r;
                         if (Step[j].Contains("开始") || Step[j].Contains("结束"))
+                        {
                             r = new Rectangle(0, 0, 40, 40);
+                        }
                         else
                             r = new Rectangle();
                         r.Width = SerialPanel.Width / 10;
@@ -126,19 +165,9 @@ namespace UAS_MES.Query
                         if (i % 2 != 0)
                         {
                             r.Location = new Point(x, y);
-                            if (PastStep.Contains(Step[j]))
-                            {
-                                g.FillRectangle(Brushes.Green, r);
-                            }
-                            else
-                            {
-                                if (Step[j].Contains("开始"))
-                                    g.FillEllipse(Brushes.Green, r);
-                                else
-                                    g.FillRectangle(Brushes.White, r);
-                            }
+                            g.FillRectangle(PaintColor[j], r);
                             //填充方块内的信息
-                            if (Controls[Param.Name] == null)
+                            if (SerialPanel.Controls[Param.Name] == null)
                                 SerialPanel.Controls.Add(Param);
                             if (j + 1 == Step.Count)
                                 break;
@@ -160,26 +189,11 @@ namespace UAS_MES.Query
                         //如果在偶数行
                         else
                         {
-
                             r.Location = new Point(x, y);
-                            if (PastStep.Contains(Step[j]))
-                            {
-                                g.FillRectangle(Brushes.Green, r);
-                            }
-                            else
-                            {
-                                if (Step[j].Contains("开始"))
-                                {
-                                    g.FillEllipse(Brushes.Green, r);
-                                }
-                                else
-                                {
-                                    g.FillRectangle(Brushes.White, r);
-                                }
-                            }
+                            g.FillRectangle(PaintColor[j], r);
                             //填充文字信息
                             //存在这个名称的则不进行添加
-                            if (Controls[Param.Name] == null)
+                            if (SerialPanel.Controls[Param.Name] == null)
                             {
                                 SerialPanel.Controls.Add(Param);
                             }

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

@@ -622,7 +622,7 @@ namespace UAS_MES.PublicMethod
         /// <param name="dgv"></param>
         /// <param name="dt"></param>
         /// <param name="CheckBox"></param>
-        public static void FillExpandDgvWithDataTable(DataGridViewExpand dgv, DataTable dt, bool CheckBox,bool CheckBoxTrue)
+        public static void FillExpandDgvWithDataTable(DataGridViewExpand dgv, DataTable dt, bool CheckBox, bool CheckBoxTrue)
         {
             CleanDGVData(dgv);
             if (CheckBox)