Quellcode durchsuchen

获取上一阶层

callm vor 3 Wochen
Ursprung
Commit
801c30933f

+ 141 - 128
UAS_MES_JC/FunctionCode/Query/Query_ExeProgress.Designer.cs

@@ -42,16 +42,6 @@
             this.cm_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cm_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.CraftInfDgv = new UAS_MES_NEW.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.groupBoxWithBorder1 = new UAS_MES_NEW.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();
-            this.pictureBox3 = new System.Windows.Forms.PictureBox();
-            this.label2 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.mp_sncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.MP_RESULT = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -66,6 +56,17 @@
             this.sc_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mp_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.groupBoxWithBorder1 = new UAS_MES_NEW.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();
+            this.pictureBox3 = new System.Windows.Forms.PictureBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.sn_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.GetUpper = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.CraftMaterial)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CraftInfDgv)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -104,7 +105,7 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(514, 11);
+            this.ma_code_label.Location = new System.Drawing.Point(687, 11);
             this.ma_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_code_label.Name = "ma_code_label";
             this.ma_code_label.Size = new System.Drawing.Size(114, 41);
@@ -115,7 +116,7 @@
             // 
             this.ma_code.AutoSize = true;
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code.Location = new System.Drawing.Point(664, 13);
+            this.ma_code.Location = new System.Drawing.Point(837, 13);
             this.ma_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_code.Name = "ma_code";
             this.ma_code.Size = new System.Drawing.Size(0, 41);
@@ -125,7 +126,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(944, 13);
+            this.label5.Location = new System.Drawing.Point(1117, 13);
             this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(146, 41);
@@ -136,7 +137,7 @@
             // 
             this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_checkno.Location = new System.Drawing.Point(1124, 13);
+            this.ms_checkno.Location = new System.Drawing.Point(1297, 13);
             this.ms_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_checkno.Name = "ms_checkno";
             this.ms_checkno.Size = new System.Drawing.Size(0, 41);
@@ -243,6 +244,118 @@
             this.CraftInfDgv.TabIndex = 193;
             this.CraftInfDgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.CraftInfDgv_CellContentClick);
             // 
+            // mp_sncode
+            // 
+            this.mp_sncode.DataPropertyName = "mp_sncode";
+            this.mp_sncode.HeaderText = "序列号";
+            this.mp_sncode.MinimumWidth = 10;
+            this.mp_sncode.Name = "mp_sncode";
+            this.mp_sncode.Width = 120;
+            // 
+            // MP_RESULT
+            // 
+            this.MP_RESULT.DataPropertyName = "MP_RESULT";
+            this.MP_RESULT.HeaderText = "操作内容";
+            this.MP_RESULT.MinimumWidth = 10;
+            this.MP_RESULT.Name = "MP_RESULT";
+            this.MP_RESULT.Width = 110;
+            // 
+            // mp_makecode
+            // 
+            this.mp_makecode.DataPropertyName = "mp_makecode";
+            this.mp_makecode.HeaderText = "工单代码";
+            this.mp_makecode.MinimumWidth = 10;
+            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.MinimumWidth = 10;
+            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.MinimumWidth = 10;
+            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.MinimumWidth = 10;
+            this.mp_indate.Name = "mp_indate";
+            this.mp_indate.Width = 120;
+            // 
+            // STD_CLASS
+            // 
+            this.STD_CLASS.DataPropertyName = "STD_CLASS";
+            this.STD_CLASS.HeaderText = "测试文件";
+            this.STD_CLASS.MinimumWidth = 10;
+            this.STD_CLASS.Name = "STD_CLASS";
+            this.STD_CLASS.Width = 200;
+            // 
+            // mb_badcode
+            // 
+            this.mb_badcode.DataPropertyName = "mb_badcode";
+            this.mb_badcode.HeaderText = "不良信息";
+            this.mb_badcode.MinimumWidth = 10;
+            this.mb_badcode.Name = "mb_badcode";
+            this.mb_badcode.Width = 200;
+            // 
+            // MBR_BRNAME
+            // 
+            this.MBR_BRNAME.DataPropertyName = "MBR_BRNAME";
+            this.MBR_BRNAME.HeaderText = "维修信息";
+            this.MBR_BRNAME.MinimumWidth = 10;
+            this.MBR_BRNAME.Name = "MBR_BRNAME";
+            this.MBR_BRNAME.Width = 200;
+            // 
+            // ma_craftcode
+            // 
+            this.ma_craftcode.DataPropertyName = "ma_craftcode";
+            this.ma_craftcode.HeaderText = "途程代码";
+            this.ma_craftcode.MinimumWidth = 10;
+            this.ma_craftcode.Name = "ma_craftcode";
+            this.ma_craftcode.Width = 120;
+            // 
+            // MP_SNCHECKNO
+            // 
+            this.MP_SNCHECKNO.DataPropertyName = "MP_SNCHECKNO";
+            this.MP_SNCHECKNO.HeaderText = "抽检批次";
+            this.MP_SNCHECKNO.MinimumWidth = 10;
+            this.MP_SNCHECKNO.Name = "MP_SNCHECKNO";
+            this.MP_SNCHECKNO.Width = 200;
+            // 
+            // sc_linecode
+            // 
+            this.sc_linecode.DataPropertyName = "sc_linecode";
+            this.sc_linecode.HeaderText = "产线";
+            this.sc_linecode.MinimumWidth = 10;
+            this.sc_linecode.Name = "sc_linecode";
+            this.sc_linecode.Width = 120;
+            // 
+            // mp_inman
+            // 
+            this.mp_inman.DataPropertyName = "mp_inman";
+            this.mp_inman.HeaderText = "人员工号";
+            this.mp_inman.MinimumWidth = 10;
+            this.mp_inman.Name = "mp_inman";
+            this.mp_inman.Width = 200;
+            // 
+            // em_name
+            // 
+            this.em_name.DataPropertyName = "em_name";
+            this.em_name.HeaderText = "人员姓名";
+            this.em_name.MinimumWidth = 10;
+            this.em_name.Name = "em_name";
+            this.em_name.Width = 200;
+            // 
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
@@ -271,7 +384,7 @@
             // 
             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(1699, 25);
+            this.label1.Location = new System.Drawing.Point(1702, 26);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
@@ -302,7 +415,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(1322, 25);
+            this.label4.Location = new System.Drawing.Point(1325, 26);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(114, 41);
@@ -333,7 +446,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(344, 24);
+            this.label2.Location = new System.Drawing.Point(347, 25);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(242, 41);
@@ -344,7 +457,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(829, 25);
+            this.label3.Location = new System.Drawing.Point(832, 26);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(210, 41);
@@ -368,123 +481,22 @@
             this.sn_code.Tag = "NoAuto";
             this.sn_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sn_code_KeyDown);
             // 
-            // mp_sncode
+            // GetUpper
             // 
-            this.mp_sncode.DataPropertyName = "mp_sncode";
-            this.mp_sncode.HeaderText = "序列号";
-            this.mp_sncode.MinimumWidth = 10;
-            this.mp_sncode.Name = "mp_sncode";
-            this.mp_sncode.Width = 120;
-            // 
-            // MP_RESULT
-            // 
-            this.MP_RESULT.DataPropertyName = "MP_RESULT";
-            this.MP_RESULT.HeaderText = "操作内容";
-            this.MP_RESULT.MinimumWidth = 10;
-            this.MP_RESULT.Name = "MP_RESULT";
-            this.MP_RESULT.Width = 110;
-            // 
-            // mp_makecode
-            // 
-            this.mp_makecode.DataPropertyName = "mp_makecode";
-            this.mp_makecode.HeaderText = "工单代码";
-            this.mp_makecode.MinimumWidth = 10;
-            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.MinimumWidth = 10;
-            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.MinimumWidth = 10;
-            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.MinimumWidth = 10;
-            this.mp_indate.Name = "mp_indate";
-            this.mp_indate.Width = 120;
-            // 
-            // STD_CLASS
-            // 
-            this.STD_CLASS.DataPropertyName = "STD_CLASS";
-            this.STD_CLASS.HeaderText = "测试文件";
-            this.STD_CLASS.MinimumWidth = 10;
-            this.STD_CLASS.Name = "STD_CLASS";
-            this.STD_CLASS.Width = 200;
-            // 
-            // mb_badcode
-            // 
-            this.mb_badcode.DataPropertyName = "mb_badcode";
-            this.mb_badcode.HeaderText = "不良信息";
-            this.mb_badcode.MinimumWidth = 10;
-            this.mb_badcode.Name = "mb_badcode";
-            this.mb_badcode.Width = 200;
-            // 
-            // MBR_BRNAME
-            // 
-            this.MBR_BRNAME.DataPropertyName = "MBR_BRNAME";
-            this.MBR_BRNAME.HeaderText = "维修信息";
-            this.MBR_BRNAME.MinimumWidth = 10;
-            this.MBR_BRNAME.Name = "MBR_BRNAME";
-            this.MBR_BRNAME.Width = 200;
-            // 
-            // ma_craftcode
-            // 
-            this.ma_craftcode.DataPropertyName = "ma_craftcode";
-            this.ma_craftcode.HeaderText = "途程代码";
-            this.ma_craftcode.MinimumWidth = 10;
-            this.ma_craftcode.Name = "ma_craftcode";
-            this.ma_craftcode.Width = 120;
-            // 
-            // MP_SNCHECKNO
-            // 
-            this.MP_SNCHECKNO.DataPropertyName = "MP_SNCHECKNO";
-            this.MP_SNCHECKNO.HeaderText = "抽检批次";
-            this.MP_SNCHECKNO.MinimumWidth = 10;
-            this.MP_SNCHECKNO.Name = "MP_SNCHECKNO";
-            this.MP_SNCHECKNO.Width = 200;
-            // 
-            // sc_linecode
-            // 
-            this.sc_linecode.DataPropertyName = "sc_linecode";
-            this.sc_linecode.HeaderText = "产线";
-            this.sc_linecode.MinimumWidth = 10;
-            this.sc_linecode.Name = "sc_linecode";
-            this.sc_linecode.Width = 120;
-            // 
-            // mp_inman
-            // 
-            this.mp_inman.DataPropertyName = "mp_inman";
-            this.mp_inman.HeaderText = "人员工号";
-            this.mp_inman.MinimumWidth = 10;
-            this.mp_inman.Name = "mp_inman";
-            this.mp_inman.Width = 200;
-            // 
-            // em_name
-            // 
-            this.em_name.DataPropertyName = "em_name";
-            this.em_name.HeaderText = "人员姓名";
-            this.em_name.MinimumWidth = 10;
-            this.em_name.Name = "em_name";
-            this.em_name.Width = 200;
+            this.GetUpper.AutoSize = true;
+            this.GetUpper.Location = new System.Drawing.Point(489, 22);
+            this.GetUpper.Name = "GetUpper";
+            this.GetUpper.Size = new System.Drawing.Size(138, 28);
+            this.GetUpper.TabIndex = 203;
+            this.GetUpper.Text = "查询上阶";
+            this.GetUpper.UseVisualStyleBackColor = true;
             // 
             // Query_ExeProgress
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1950, 1156);
+            this.Controls.Add(this.GetUpper);
             this.Controls.Add(this.CraftMaterial);
             this.Controls.Add(this.ms_checkno);
             this.Controls.Add(this.label5);
@@ -554,5 +566,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn sc_linecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn mp_inman;
         private System.Windows.Forms.DataGridViewTextBoxColumn em_name;
+        private System.Windows.Forms.CheckBox GetUpper;
     }
 }

+ 9 - 5
UAS_MES_JC/FunctionCode/Query/Query_ExeProgress.cs

@@ -68,11 +68,15 @@ namespace UAS_MES_NEW.Query
             if (e.KeyCode == Keys.Enter)
             {
                 string sncode = sn_code.Text;
-                //dt = (DataTable)dh.ExecuteSql("select cm_sncode from craftmaterial where cm_barcode='" + sn_code.Text + "' and nvl(cm_status,0)=0", "select");
-                //if (dt.Rows.Count > 0)
-                //{
-                //    sn_code.Text = dt.Rows[0]["cm_sncode"].ToString();
-                //}
+                if (GetUpper.Checked)
+                {
+                    dt = (DataTable)dh.ExecuteSql("select cm_sncode from craftmaterial where cm_barcode='" + sn_code.Text + "' and nvl(cm_status,0)=0", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        sn_code.Text = dt.Rows[0]["cm_sncode"].ToString();
+                    }
+                }
+
                 ms_id = (DataTable)dh.ExecuteSql("select beforesn,sn from makesnrelation where beforesn='" + sn_code.Text + "' or sn='" + sn_code.Text + "'", "select");
                 if (ms_id.Rows.Count > 0)
                 {