yhluo 6 jam lalu
induk
melakukan
6e935b07e3

+ 10 - 10
UAS_MES_WEIP/FunctionCode/Make/Make_BakingManage.cs

@@ -88,7 +88,7 @@ namespace UAS_MES_NEW.Make
         {
             if (string.IsNullOrEmpty(EmployeeVal.Text))
             {
-                MessageBox.Show("请输入烘烤操作员账号");
+                MessageBox.Show("请输入烘烤操作员姓名");
                 return;
             }
 
@@ -154,10 +154,10 @@ namespace UAS_MES_NEW.Make
 
             if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
 
-            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_code = '{EmployeeVal.Text.Trim()}'", "select");
+            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
             if (dt.Rows.Count == 0)
             {
-                MessageBox.Show("请输入正确人员账号");
+                MessageBox.Show("请输入正确人员姓名");
                 EmployeeVal.Text = "";
                 EmployeeVal.Focus();
                 EmployeeVal.SelectAll();
@@ -169,10 +169,10 @@ namespace UAS_MES_NEW.Make
         {
             if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
 
-            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_code = '{EmployeeVal.Text.Trim()}'", "select");
+            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
             if (dt.Rows.Count == 0)
             {
-                MessageBox.Show("请输入正确人员账号");
+                MessageBox.Show("请输入正确人员姓名");
                 EmployeeVal.Text = "";
                 EmployeeVal.Focus();
                 EmployeeVal.SelectAll();
@@ -186,10 +186,10 @@ namespace UAS_MES_NEW.Make
 
             if (string.IsNullOrEmpty(EmployeeVal1.Text)) return;
 
-            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_code = '{EmployeeVal1.Text.Trim()}'", "select");
+            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal1.Text.Trim()}'", "select");
             if (dt.Rows.Count == 0)
             {
-                MessageBox.Show("请输入正确人员账号");
+                MessageBox.Show("请输入正确人员姓名");
                 EmployeeVal1.Text = "";
                 EmployeeVal1.Focus();
                 EmployeeVal1.SelectAll();
@@ -201,10 +201,10 @@ namespace UAS_MES_NEW.Make
         {
             if (string.IsNullOrEmpty(EmployeeVal1.Text)) return;
 
-            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_code = '{EmployeeVal1.Text.Trim()}'", "select");
+            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal1.Text.Trim()}'", "select");
             if (dt.Rows.Count == 0)
             {
-                MessageBox.Show("请输入正确人员账号");
+                MessageBox.Show("请输入正确人员姓名");
                 EmployeeVal1.Text = "";
                 EmployeeVal1.Focus();
                 EmployeeVal1.SelectAll();
@@ -216,7 +216,7 @@ namespace UAS_MES_NEW.Make
         {
             if (string.IsNullOrEmpty(EmployeeVal1.Text))
             {
-                MessageBox.Show("请输入烘烤操作员账号");
+                MessageBox.Show("请输入烘烤操作员姓名");
                 return;
             }
             if (string.IsNullOrEmpty(ReelNoVal1.Text))

+ 8 - 6
UAS_MES_WEIP/FunctionCode/Make/Make_EquiConnect.cs

@@ -38,7 +38,7 @@ namespace UAS_MES_NEW.Make
         {
             if (string.IsNullOrEmpty(EmployeeVal.Text))
             {
-                ShowMsg(0, "请输入抽检人员账号");
+                ShowMsg(0, "请输入抽检人员姓名");
                 return;
             }
 
@@ -61,7 +61,7 @@ namespace UAS_MES_NEW.Make
         {
             if (string.IsNullOrEmpty(EmployeeVal.Text))
             {
-                ShowMsg(0, "请输入抽检人员账号");
+                ShowMsg(0, "请输入抽检人员姓名");
                 return;
             }
 
@@ -84,8 +84,10 @@ namespace UAS_MES_NEW.Make
         {
             UpdateSN("L", SNVal.Text.Trim());
 
-            dh.ExecuteSql($@"INSERT INTO steptestdetail (std_id,std_sn,std_makecode,std_class,std_testresult,std_indate,std_rescode) 
-                VALUES (steptestdetail_seq.NEXTVAL, '{SNVal.Text.Trim()}','{workOrder.Text.Trim()}','Xray抽检','{resType}',sysdate, '{User.CurrentStepCode}')", "insert");
+            SQL.Clear();
+            SQL.Append($@"INSERT INTO steptestdetail (std_id,std_sn,std_makecode,std_class,std_testresult,std_indate,STD_SUBCLASS1,STD_SUBCLASS2) 
+                VALUES (steptestdetail_seq.NEXTVAL, '{SNVal.Text.Trim()}','{workOrder.Text.Trim()}','Xray抽检','{resType}',sysdate, '{LineVal.Text}','{EmployeeVal.Text.Trim()}')");
+            dh.ExecuteSql(SQL.ToString(), "insert");
 
             ShowMsg(1, $"已记录 {SNVal.Text.Trim()},测试结果为 {resType}");
 
@@ -149,7 +151,7 @@ namespace UAS_MES_NEW.Make
 
             if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
 
-            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_code = '{EmployeeVal.Text.Trim()}'", "select");
+            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
             if (dt.Rows.Count == 0)
             {
                 MessageBox.Show("请输入正确人员账号");
@@ -164,7 +166,7 @@ namespace UAS_MES_NEW.Make
         {
             if (string.IsNullOrEmpty(EmployeeVal.Text)) return;
 
-            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_code = '{EmployeeVal.Text.Trim()}'", "select");
+            dt = (DataTable)dh.ExecuteSql($"select * from employee where em_name = '{EmployeeVal.Text.Trim()}'", "select");
             if (dt.Rows.Count == 0)
             {
                 MessageBox.Show("请输入正确人员账号");

+ 25 - 19
UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.Designer.cs

@@ -109,12 +109,12 @@
             // 
             this.li_code_label.AutoSize = true;
             this.li_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.li_code_label.Location = new System.Drawing.Point(908, 742);
+            this.li_code_label.Location = new System.Drawing.Point(692, 743);
             this.li_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.li_code_label.Name = "li_code_label";
-            this.li_code_label.Size = new System.Drawing.Size(110, 31);
+            this.li_code_label.Size = new System.Drawing.Size(62, 31);
             this.li_code_label.TabIndex = 73;
-            this.li_code_label.Text = "产线编号";
+            this.li_code_label.Text = "线体";
             // 
             // RadioReceive
             // 
@@ -159,12 +159,12 @@
             // 
             this.st_table_label.AutoSize = true;
             this.st_table_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_table_label.Location = new System.Drawing.Point(399, 742);
+            this.st_table_label.Location = new System.Drawing.Point(413, 742);
             this.st_table_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.st_table_label.Name = "st_table_label";
-            this.st_table_label.Size = new System.Drawing.Size(76, 31);
+            this.st_table_label.Size = new System.Drawing.Size(62, 31);
             this.st_table_label.TabIndex = 83;
-            this.st_table_label.Text = "Table";
+            this.st_table_label.Text = "面别";
             // 
             // SU_DEVCODE1_label
             // 
@@ -214,18 +214,19 @@
             // 
             this.su_singlepringqty1_label.AutoSize = true;
             this.su_singlepringqty1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.su_singlepringqty1_label.Location = new System.Drawing.Point(670, 742);
+            this.su_singlepringqty1_label.Location = new System.Drawing.Point(1170, 745);
             this.su_singlepringqty1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.su_singlepringqty1_label.Name = "su_singlepringqty1_label";
             this.su_singlepringqty1_label.Size = new System.Drawing.Size(110, 31);
             this.su_singlepringqty1_label.TabIndex = 108;
             this.su_singlepringqty1_label.Text = "单片次数";
+            this.su_singlepringqty1_label.Visible = false;
             // 
             // SU_RETURNIFCLEAN
             // 
             this.SU_RETURNIFCLEAN.AutoSize = true;
             this.SU_RETURNIFCLEAN.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SU_RETURNIFCLEAN.Location = new System.Drawing.Point(708, 828);
+            this.SU_RETURNIFCLEAN.Location = new System.Drawing.Point(410, 831);
             this.SU_RETURNIFCLEAN.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.SU_RETURNIFCLEAN.Name = "SU_RETURNIFCLEAN";
             this.SU_RETURNIFCLEAN.Size = new System.Drawing.Size(122, 32);
@@ -237,23 +238,25 @@
             // 
             this.em_code_label.AutoSize = true;
             this.em_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_code_label.Location = new System.Drawing.Point(89, 786);
+            this.em_code_label.Location = new System.Drawing.Point(1056, 781);
             this.em_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.em_code_label.Name = "em_code_label";
             this.em_code_label.Size = new System.Drawing.Size(110, 31);
             this.em_code_label.TabIndex = 111;
             this.em_code_label.Text = "人员编号";
+            this.em_code_label.Visible = false;
             // 
             // em_code1_label
             // 
             this.em_code1_label.AutoSize = true;
             this.em_code1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_code1_label.Location = new System.Drawing.Point(399, 828);
+            this.em_code1_label.Location = new System.Drawing.Point(1055, 819);
             this.em_code1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.em_code1_label.Name = "em_code1_label";
             this.em_code1_label.Size = new System.Drawing.Size(110, 31);
             this.em_code1_label.TabIndex = 113;
             this.em_code1_label.Text = "人员编号";
+            this.em_code1_label.Visible = false;
             // 
             // ST_ENSIONA_label
             // 
@@ -344,7 +347,7 @@
             this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
             this.normalButton1.Image = null;
             this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(838, 820);
+            this.normalButton1.Location = new System.Drawing.Point(540, 823);
             this.normalButton1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
@@ -363,7 +366,7 @@
             this.Scrap.DownImage = ((System.Drawing.Image)(resources.GetObject("Scrap.DownImage")));
             this.Scrap.Image = null;
             this.Scrap.IsShowBorder = true;
-            this.Scrap.Location = new System.Drawing.Point(1166, 823);
+            this.Scrap.Location = new System.Drawing.Point(868, 826);
             this.Scrap.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
             this.Scrap.Name = "Scrap";
@@ -465,7 +468,7 @@
             this.em_code1.AllPower = null;
             this.em_code1.BackColor = System.Drawing.Color.White;
             this.em_code1.ID = null;
-            this.em_code1.Location = new System.Drawing.Point(519, 829);
+            this.em_code1.Location = new System.Drawing.Point(1175, 820);
             this.em_code1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.em_code1.Name = "em_code1";
             this.em_code1.Power = null;
@@ -474,13 +477,14 @@
             this.em_code1.Str1 = null;
             this.em_code1.Str2 = null;
             this.em_code1.TabIndex = 114;
+            this.em_code1.Visible = false;
             // 
             // em_code
             // 
             this.em_code.AllPower = null;
             this.em_code.BackColor = System.Drawing.Color.White;
             this.em_code.ID = null;
-            this.em_code.Location = new System.Drawing.Point(208, 787);
+            this.em_code.Location = new System.Drawing.Point(1175, 782);
             this.em_code.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.em_code.Name = "em_code";
             this.em_code.Power = null;
@@ -489,13 +493,14 @@
             this.em_code.Str1 = null;
             this.em_code.Str2 = null;
             this.em_code.TabIndex = 112;
+            this.em_code.Visible = false;
             // 
             // su_singlepringqty1
             // 
             this.su_singlepringqty1.AllPower = null;
             this.su_singlepringqty1.BackColor = System.Drawing.Color.White;
             this.su_singlepringqty1.ID = null;
-            this.su_singlepringqty1.Location = new System.Drawing.Point(838, 744);
+            this.su_singlepringqty1.Location = new System.Drawing.Point(1288, 747);
             this.su_singlepringqty1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.su_singlepringqty1.Name = "su_singlepringqty1";
             this.su_singlepringqty1.Negative = false;
@@ -506,6 +511,7 @@
             this.su_singlepringqty1.Str2 = null;
             this.su_singlepringqty1.TabIndex = 109;
             this.su_singlepringqty1.Text = "1";
+            this.su_singlepringqty1.Visible = false;
             // 
             // st_table
             // 
@@ -514,7 +520,7 @@
             this.st_table.Items.AddRange(new object[] {
             "BOTTOM",
             "TOP"});
-            this.st_table.Location = new System.Drawing.Point(483, 743);
+            this.st_table.Location = new System.Drawing.Point(479, 743);
             this.st_table.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.st_table.Name = "st_table";
             this.st_table.Size = new System.Drawing.Size(180, 26);
@@ -527,7 +533,7 @@
             this.Receive.DownImage = ((System.Drawing.Image)(resources.GetObject("Receive.DownImage")));
             this.Receive.Image = null;
             this.Receive.IsShowBorder = true;
-            this.Receive.Location = new System.Drawing.Point(1246, 733);
+            this.Receive.Location = new System.Drawing.Point(966, 734);
             this.Receive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Receive.MoveImage = ((System.Drawing.Image)(resources.GetObject("Receive.MoveImage")));
             this.Receive.Name = "Receive";
@@ -546,7 +552,7 @@
             this.Return.DownImage = ((System.Drawing.Image)(resources.GetObject("Return.DownImage")));
             this.Return.Image = null;
             this.Return.IsShowBorder = true;
-            this.Return.Location = new System.Drawing.Point(1027, 820);
+            this.Return.Location = new System.Drawing.Point(729, 823);
             this.Return.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Return.MoveImage = ((System.Drawing.Image)(resources.GetObject("Return.MoveImage")));
             this.Return.Name = "Return";
@@ -720,7 +726,7 @@
             this.li_code.Condition = null;
             this.li_code.DBTitle = null;
             this.li_code.FormName = null;
-            this.li_code.Location = new System.Drawing.Point(1027, 742);
+            this.li_code.Location = new System.Drawing.Point(749, 742);
             this.li_code.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.li_code.Name = "li_code";
             this.li_code.Power = null;

+ 19 - 18
UAS_MES_WEIP/FunctionCode/Make/Make_SMTSStencil.cs

@@ -161,30 +161,31 @@ namespace UAS_MES_NEW.Make
             //}
             //else
             //{
-                dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + User.UserCode + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
-                    if (int.Parse(su_singlepringqty1.Text) > 0)
+                    string em_name = dt.Rows[0]["em_name"].ToString();
+                    sql.Clear();
+                    sql.Append("insert into StencilUse(su_id,SU_USEPRODCODE,SU_CLEANNUMS,su_stid,su_linecode,su_stcode,su_usedate,su_useman,SU_USEMANCODE,SU_TABLE,su_usemacode,su_singlepringqty,su_stverison,SU_STATUS,su_indate)");
+                    sql.Append("select StencilUse_seq.nextval,'" + ma_prodcode.Text + "',ST_CLEANNUMS,st_id,'" + li_code.Text + "','" + SU_DEVCODE.Text + "',sysdate,'" + em_name + "','" + User.UserCode + "','" + st_table.Text + "','" + ma_code.Text + "'");
+                    sql.Append(",'" + su_singlepringqty1.Text + "',st_version,'上线',sysdate from ");
+                    sql.Append("Stencil where st_code='" + SU_DEVCODE.Text + "'");
+                    dh.ExecuteSql(sql.ToString(), "insert");
+                    dh.ExecuteSql("update Stencil set ST_USESTATUS='在线' where st_code='" + SU_DEVCODE.Text + "'", "update");
+                    MessageBox.Show("上线成功");
+                    st_table.SelectedItem = null;
+                    SU_DEVCODE.Text = "";
+                    em_code.Text = "";
+                    Receive.Enabled = false;
+                    LoadGridData();
+
+                    /*if (int.Parse(su_singlepringqty1.Text) > 0)
                     {
-                        string em_name = dt.Rows[0]["em_name"].ToString();
-                        sql.Clear();
-                        sql.Append("insert into StencilUse(su_id,SU_USEPRODCODE,SU_CLEANNUMS,su_stid,su_linecode,su_stcode,su_usedate,su_useman,SU_USEMANCODE,SU_TABLE,su_usemacode,su_singlepringqty,su_stverison,SU_STATUS,su_indate)");
-                        sql.Append("select StencilUse_seq.nextval,'" + ma_prodcode.Text + "',ST_CLEANNUMS,st_id,'" + li_code.Text + "','" + SU_DEVCODE.Text + "',sysdate,'" + em_name + "','" + em_code.Text + "','" + st_table.Text + "','" + ma_code.Text + "'");
-                        sql.Append(",'" + su_singlepringqty1.Text + "',st_version,'上线',sysdate from ");
-                        sql.Append("Stencil where st_code='" + SU_DEVCODE.Text + "'");
-                        dh.ExecuteSql(sql.ToString(), "insert");
-                        dh.ExecuteSql("update Stencil set ST_USESTATUS='在线' where st_code='" + SU_DEVCODE.Text + "'", "update");
-                        MessageBox.Show("上线成功");
-                        st_table.SelectedItem = null;
-                        SU_DEVCODE.Text = "";
-                        em_code.Text = "";
-                        Receive.Enabled = false;
-                        LoadGridData();
                     }
                     else
                     {
                         MessageBox.Show("单片次数必须大于0");
-                    }
+                    }*/
                 }
                 else
                 {
@@ -237,7 +238,7 @@ namespace UAS_MES_NEW.Make
                     sql.Append($@"INSERT INTO stenciluse (su_id,su_ensiona,su_ensionb,su_ensionc,su_ensiond,su_ensione,su_stid,su_stcode,su_indate,su_useman,
                             su_cleannums,su_backdate,su_returnman,su_returnmancode,su_status,su_returnifclean)
                             SELECT stenciluse_seq.NEXTVAL,'{ST_ENSIONA.Text}', '{ST_ENSIONB.Text}', '{ST_ENSIONC.Text}','{ST_ENSIOND.Text}','{ST_ENSIONE.Text}',st_id,'{SU_DEVCODE1.Text.Trim()}',sysdate,'{dt.Rows[0]["em_name"].ToString()}',
-                            '{(SU_RETURNIFCLEAN.Checked ? 1 : 0)}', sysdate,'{User.UserName}','{em_code1.Text.Trim()}','下线', '{(SU_RETURNIFCLEAN.Checked ? "-1" : "0")}'
+                            '{(SU_RETURNIFCLEAN.Checked ? 1 : 0)}', sysdate,'{User.UserName}','{User.UserCode}','下线', '{(SU_RETURNIFCLEAN.Checked ? "-1" : "0")}'
                             FROM stencil WHERE st_code = '" + SU_DEVCODE1.Text.Trim() + "'");
                     dh.ExecuteSql(sql.ToString(), "insert");
 

+ 25 - 19
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStencil.Designer.cs

@@ -109,12 +109,12 @@
             // 
             this.li_code_label.AutoSize = true;
             this.li_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.li_code_label.Location = new System.Drawing.Point(908, 742);
+            this.li_code_label.Location = new System.Drawing.Point(698, 741);
             this.li_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.li_code_label.Name = "li_code_label";
-            this.li_code_label.Size = new System.Drawing.Size(110, 31);
+            this.li_code_label.Size = new System.Drawing.Size(62, 31);
             this.li_code_label.TabIndex = 73;
-            this.li_code_label.Text = "产线编号";
+            this.li_code_label.Text = "线体";
             // 
             // RadioReceive
             // 
@@ -159,12 +159,12 @@
             // 
             this.st_table_label.AutoSize = true;
             this.st_table_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_table_label.Location = new System.Drawing.Point(399, 742);
+            this.st_table_label.Location = new System.Drawing.Point(413, 740);
             this.st_table_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.st_table_label.Name = "st_table_label";
-            this.st_table_label.Size = new System.Drawing.Size(76, 31);
+            this.st_table_label.Size = new System.Drawing.Size(62, 31);
             this.st_table_label.TabIndex = 83;
-            this.st_table_label.Text = "Table";
+            this.st_table_label.Text = "面别";
             // 
             // SU_DEVCODE1_label
             // 
@@ -181,7 +181,7 @@
             // 
             this.st_combinenumber_label.AutoSize = true;
             this.st_combinenumber_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_combinenumber_label.Location = new System.Drawing.Point(1158, 881);
+            this.st_combinenumber_label.Location = new System.Drawing.Point(1021, 845);
             this.st_combinenumber_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.st_combinenumber_label.Name = "st_combinenumber_label";
             this.st_combinenumber_label.Size = new System.Drawing.Size(134, 31);
@@ -214,18 +214,19 @@
             // 
             this.su_singlepringqty1_label.AutoSize = true;
             this.su_singlepringqty1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.su_singlepringqty1_label.Location = new System.Drawing.Point(670, 742);
+            this.su_singlepringqty1_label.Location = new System.Drawing.Point(832, 781);
             this.su_singlepringqty1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.su_singlepringqty1_label.Name = "su_singlepringqty1_label";
             this.su_singlepringqty1_label.Size = new System.Drawing.Size(158, 31);
             this.su_singlepringqty1_label.TabIndex = 108;
             this.su_singlepringqty1_label.Text = "单片印刷次数";
+            this.su_singlepringqty1_label.Visible = false;
             // 
             // SU_RETURNIFCLEAN
             // 
             this.SU_RETURNIFCLEAN.AutoSize = true;
             this.SU_RETURNIFCLEAN.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SU_RETURNIFCLEAN.Location = new System.Drawing.Point(708, 828);
+            this.SU_RETURNIFCLEAN.Location = new System.Drawing.Point(410, 826);
             this.SU_RETURNIFCLEAN.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.SU_RETURNIFCLEAN.Name = "SU_RETURNIFCLEAN";
             this.SU_RETURNIFCLEAN.Size = new System.Drawing.Size(122, 32);
@@ -237,19 +238,20 @@
             // 
             this.em_code_label.AutoSize = true;
             this.em_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_code_label.Location = new System.Drawing.Point(89, 786);
+            this.em_code_label.Location = new System.Drawing.Point(1045, 781);
             this.em_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.em_code_label.Name = "em_code_label";
             this.em_code_label.Size = new System.Drawing.Size(110, 31);
             this.em_code_label.TabIndex = 111;
             this.em_code_label.Text = "人员编号";
+            this.em_code_label.Visible = false;
             // 
             // em_code
             // 
             this.em_code.AllPower = null;
             this.em_code.BackColor = System.Drawing.Color.White;
             this.em_code.ID = null;
-            this.em_code.Location = new System.Drawing.Point(208, 787);
+            this.em_code.Location = new System.Drawing.Point(1154, 780);
             this.em_code.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.em_code.Name = "em_code";
             this.em_code.Power = null;
@@ -258,13 +260,14 @@
             this.em_code.Str1 = null;
             this.em_code.Str2 = null;
             this.em_code.TabIndex = 112;
+            this.em_code.Visible = false;
             // 
             // su_singlepringqty1
             // 
             this.su_singlepringqty1.AllPower = null;
             this.su_singlepringqty1.BackColor = System.Drawing.Color.White;
             this.su_singlepringqty1.ID = null;
-            this.su_singlepringqty1.Location = new System.Drawing.Point(838, 744);
+            this.su_singlepringqty1.Location = new System.Drawing.Point(989, 786);
             this.su_singlepringqty1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.su_singlepringqty1.Name = "su_singlepringqty1";
             this.su_singlepringqty1.Negative = false;
@@ -274,7 +277,8 @@
             this.su_singlepringqty1.Str1 = null;
             this.su_singlepringqty1.Str2 = null;
             this.su_singlepringqty1.TabIndex = 109;
-            this.su_singlepringqty1.Text = "1";
+            this.su_singlepringqty1.Text = "0";
+            this.su_singlepringqty1.Visible = false;
             // 
             // st_table
             // 
@@ -296,7 +300,7 @@
             this.Receive.DownImage = ((System.Drawing.Image)(resources.GetObject("Receive.DownImage")));
             this.Receive.Image = null;
             this.Receive.IsShowBorder = true;
-            this.Receive.Location = new System.Drawing.Point(1246, 733);
+            this.Receive.Location = new System.Drawing.Point(987, 734);
             this.Receive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Receive.MoveImage = ((System.Drawing.Image)(resources.GetObject("Receive.MoveImage")));
             this.Receive.Name = "Receive";
@@ -315,7 +319,7 @@
             this.Return.DownImage = ((System.Drawing.Image)(resources.GetObject("Return.DownImage")));
             this.Return.Image = null;
             this.Return.IsShowBorder = true;
-            this.Return.Location = new System.Drawing.Point(1027, 820);
+            this.Return.Location = new System.Drawing.Point(729, 818);
             this.Return.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Return.MoveImage = ((System.Drawing.Image)(resources.GetObject("Return.MoveImage")));
             this.Return.Name = "Return";
@@ -489,7 +493,7 @@
             this.li_code.Condition = null;
             this.li_code.DBTitle = null;
             this.li_code.FormName = null;
-            this.li_code.Location = new System.Drawing.Point(1027, 742);
+            this.li_code.Location = new System.Drawing.Point(768, 743);
             this.li_code.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.li_code.Name = "li_code";
             this.li_code.Power = null;
@@ -543,7 +547,7 @@
             this.em_code1.AllPower = null;
             this.em_code1.BackColor = System.Drawing.Color.White;
             this.em_code1.ID = null;
-            this.em_code1.Location = new System.Drawing.Point(519, 829);
+            this.em_code1.Location = new System.Drawing.Point(1154, 812);
             this.em_code1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.em_code1.Name = "em_code1";
             this.em_code1.Power = null;
@@ -552,17 +556,19 @@
             this.em_code1.Str1 = null;
             this.em_code1.Str2 = null;
             this.em_code1.TabIndex = 114;
+            this.em_code1.Visible = false;
             // 
             // em_code1_label
             // 
             this.em_code1_label.AutoSize = true;
             this.em_code1_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.em_code1_label.Location = new System.Drawing.Point(399, 828);
+            this.em_code1_label.Location = new System.Drawing.Point(1045, 809);
             this.em_code1_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.em_code1_label.Name = "em_code1_label";
             this.em_code1_label.Size = new System.Drawing.Size(110, 31);
             this.em_code1_label.TabIndex = 113;
             this.em_code1_label.Text = "人员编号";
+            this.em_code1_label.Visible = false;
             // 
             // ST_ENSIONA
             // 
@@ -746,7 +752,7 @@
             this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
             this.normalButton1.Image = null;
             this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(838, 820);
+            this.normalButton1.Location = new System.Drawing.Point(540, 818);
             this.normalButton1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";

+ 33 - 32
UAS_MES_WEIP/FunctionCode/Make/Make_SMTStencil.cs

@@ -161,30 +161,31 @@ namespace UAS_MES_NEW.Make
             //}
             //else
             //{
-                dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code.Text + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + User.UserCode + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
-                    if (int.Parse(su_singlepringqty1.Text) > 0)
-                    {
-                        string em_name = dt.Rows[0]["em_name"].ToString();
-                        sql.Clear();
-                        sql.Append("insert into StencilUse(su_id,SU_USEPRODCODE,SU_CLEANNUMS,su_stid,su_linecode,su_stcode,su_usedate,su_useman,SU_USEMANCODE,SU_TABLE,su_usemacode,su_singlepringqty,su_stverison,SU_STATUS,su_indate)");
-                        sql.Append("select StencilUse_seq.nextval,'" + ma_prodcode.Text + "',ST_CLEANNUMS,st_id,'" + li_code.Text + "','" + SU_DEVCODE.Text + "',sysdate,'" + em_name + "','" + em_code.Text + "','" + st_table.Text + "','" + ma_code.Text + "'");
-                        sql.Append(",'" + su_singlepringqty1.Text + "',st_version,'上线',sysdate from ");
-                        sql.Append("Stencil where st_code='" + SU_DEVCODE.Text + "'");
-                        dh.ExecuteSql(sql.ToString(), "insert");
-                        dh.ExecuteSql("update Stencil set ST_USESTATUS='在线' where st_code='" + SU_DEVCODE.Text + "'", "update");
-                        MessageBox.Show("上线成功");
-                        st_table.SelectedItem = null;
-                        SU_DEVCODE.Text = "";
-                        em_code.Text = "";
-                        Receive.Enabled = false;
-                        LoadGridData();
-                    }
-                    else
-                    {
-                        MessageBox.Show("单片印刷次数必须大于0");
-                    }
+                    string em_name = dt.Rows[0]["em_name"].ToString();
+                    sql.Clear();
+                    sql.Append("insert into StencilUse(su_id,SU_USEPRODCODE,SU_CLEANNUMS,su_stid,su_linecode,su_stcode,su_usedate,su_useman,SU_USEMANCODE,SU_TABLE,su_usemacode,su_singlepringqty,su_stverison,SU_STATUS,su_indate)");
+                    sql.Append("select StencilUse_seq.nextval,'" + ma_prodcode.Text + "',ST_CLEANNUMS,st_id,'" + li_code.Text + "','" + SU_DEVCODE.Text + "',sysdate,'" + em_name + "','" + em_code.Text + "','" + st_table.Text + "','" + ma_code.Text + "'");
+                    sql.Append(",'" + su_singlepringqty1.Text + "',st_version,'上线',sysdate from ");
+                    sql.Append("Stencil where st_code='" + SU_DEVCODE.Text + "'");
+                    dh.ExecuteSql(sql.ToString(), "insert");
+                    dh.ExecuteSql("update Stencil set ST_USESTATUS='在线' where st_code='" + SU_DEVCODE.Text + "'", "update");
+                    MessageBox.Show("上线成功");
+                    st_table.SelectedItem = null;
+                    SU_DEVCODE.Text = "";
+                    em_code.Text = "";
+                    Receive.Enabled = false;
+                    LoadGridData();
+
+                    //if (int.Parse(su_singlepringqty1.Text) > 0)
+                    //{
+                    //}
+                    //else
+                    //{
+                    //    MessageBox.Show("单片印刷次数必须大于0");
+                    //}
                 }
                 else
                 {
@@ -219,7 +220,7 @@ namespace UAS_MES_NEW.Make
                     MessageBox.Show("钢网编号" + SU_DEVCODE1.Text + "不存在或者未审核");
                 }
                 string St_USECOUNT = dt.Rows[0]["St_USECOUNT"].ToString();
-                dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + em_code1.Text + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select em_name from employee where em_code='" + User.UserCode + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
                         //if (int.Parse(st_combinenumber.Text) >= 0)
@@ -239,7 +240,7 @@ namespace UAS_MES_NEW.Make
                         sql.Append($@"INSERT INTO stenciluse (su_id,su_ensiona,su_ensionb,su_ensionc,su_ensiond,su_ensione,su_stid,su_stcode,su_indate,su_useman,
                             su_cleannums,su_backdate,su_returnman,su_returnmancode,su_status,su_returnifclean)
                             SELECT stenciluse_seq.NEXTVAL,'{ST_ENSIONA.Text}', '{ST_ENSIONB.Text}', '{ST_ENSIONC.Text}','{ST_ENSIOND.Text}','{ST_ENSIONE.Text}',st_id,'{SU_DEVCODE1.Text.Trim()}',sysdate,'{dt.Rows[0]["em_name"].ToString()}',
-                            '{(SU_RETURNIFCLEAN.Checked ? 1 : 0)}', sysdate,'{User.UserName}','{em_code1.Text.Trim()}','下线', '{(SU_RETURNIFCLEAN.Checked ? "-1" : "0")}'
+                            '{(SU_RETURNIFCLEAN.Checked ? 1 : 0)}', sysdate,'{User.UserName}','{User.UserCode}','下线', '{(SU_RETURNIFCLEAN.Checked ? "-1" : "0")}'
                             FROM stencil WHERE st_code = '" + SU_DEVCODE1.Text.Trim() + "'");
                         dh.ExecuteSql(sql.ToString(), "insert");
 
@@ -251,14 +252,14 @@ namespace UAS_MES_NEW.Make
                         SU_DEVCODE1.Text = "";
                         st_combinenumber.Text = "";
                         em_code1.Text = "";
-                            ST_ENSIONA.Text = "";
-                            ST_ENSIONB.Text = "";
-                            ST_ENSIONC.Text = "";
-                            ST_ENSIOND.Text = "";
-                            ST_ENSIONE.Text = "";
-                            SU_RETURNIFCLEAN.Checked = false;
-                            Return.Enabled = false;
-                            Confirm.PerformClick();
+                        ST_ENSIONA.Text = "";
+                        ST_ENSIONB.Text = "";
+                        ST_ENSIONC.Text = "";
+                        ST_ENSIOND.Text = "";
+                        ST_ENSIONE.Text = "";
+                        SU_RETURNIFCLEAN.Checked = false;
+                        Return.Enabled = false;
+                        Confirm.PerformClick();
                     //}
                     //else
                     //{