Forráskód Böngészése

添加仓库领用

章政 6 éve
szülő
commit
73157a063c

+ 48 - 142
UAS-MES/FunctionCode/Make/Make_SMTStockStencil.Designer.cs

@@ -29,13 +29,9 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_SMTStockStencil));
-            this.ms_makecode_label = new System.Windows.Forms.Label();
-            this.ma_prodcode_label = new System.Windows.Forms.Label();
-            this.li_code_label = new System.Windows.Forms.Label();
             this.RadioReceive = new System.Windows.Forms.RadioButton();
             this.RadioReturn = new System.Windows.Forms.RadioButton();
             this.SU_DEVCODE_label = new System.Windows.Forms.Label();
-            this.st_table_label = new System.Windows.Forms.Label();
             this.SU_DEVCODE1_label = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.ST_ENSIONE_label = new System.Windows.Forms.Label();
@@ -43,12 +39,11 @@
             this.ST_ENSIONC_label = new System.Windows.Forms.Label();
             this.ST_ENSIONB_label = new System.Windows.Forms.Label();
             this.ST_ENSIONA_label = new System.Windows.Forms.Label();
-            this.ma_qty_label = new System.Windows.Forms.Label();
-            this.ma_qty = new System.Windows.Forms.Label();
-            this.su_singlepringqty1_label = new System.Windows.Forms.Label();
             this.SU_RETURNIFCLEAN = new System.Windows.Forms.CheckBox();
-            this.su_singlepringqty1 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.st_table = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.ma_prodcode_label = new System.Windows.Forms.Label();
+            this.ma_qty = new System.Windows.Forms.Label();
+            this.ma_qty_label = new System.Windows.Forms.Label();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
             this.Receive = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Return = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.Scrap = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -69,42 +64,11 @@
             this.su_table = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.su_usemacode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Confirm = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.li_code = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ma_prodcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES.CustomControl.TextBoxWithIcon.SearchTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.ToolsBom)).BeginInit();
             this.SuspendLayout();
             // 
-            // ms_makecode_label
-            // 
-            this.ms_makecode_label.AutoSize = true;
-            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(2, 9);
-            this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
-            this.ms_makecode_label.TabIndex = 68;
-            this.ms_makecode_label.Text = "归属工单";
-            // 
-            // ma_prodcode_label
-            // 
-            this.ma_prodcode_label.AutoSize = true;
-            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode_label.Location = new System.Drawing.Point(229, 9);
-            this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(74, 21);
-            this.ma_prodcode_label.TabIndex = 69;
-            this.ma_prodcode_label.Text = "产品编号";
-            // 
-            // li_code_label
-            // 
-            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(602, 430);
-            this.li_code_label.Name = "li_code_label";
-            this.li_code_label.Size = new System.Drawing.Size(74, 21);
-            this.li_code_label.TabIndex = 73;
-            this.li_code_label.Text = "产线编号";
-            // 
             // RadioReceive
             // 
             this.RadioReceive.AutoSize = true;
@@ -122,7 +86,7 @@
             // 
             this.RadioReturn.AutoSize = true;
             this.RadioReturn.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.RadioReturn.Location = new System.Drawing.Point(3, 457);
+            this.RadioReturn.Location = new System.Drawing.Point(3, 458);
             this.RadioReturn.Name = "RadioReturn";
             this.RadioReturn.Size = new System.Drawing.Size(55, 24);
             this.RadioReturn.TabIndex = 78;
@@ -141,16 +105,6 @@
             this.SU_DEVCODE_label.TabIndex = 81;
             this.SU_DEVCODE_label.Text = "钢网编号";
             // 
-            // st_table_label
-            // 
-            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(263, 430);
-            this.st_table_label.Name = "st_table_label";
-            this.st_table_label.Size = new System.Drawing.Size(51, 21);
-            this.st_table_label.TabIndex = 83;
-            this.st_table_label.Text = "Table";
-            // 
             // SU_DEVCODE1_label
             // 
             this.SU_DEVCODE1_label.AutoSize = true;
@@ -221,15 +175,26 @@
             this.ST_ENSIONA_label.TabIndex = 100;
             this.ST_ENSIONA_label.Text = "A";
             // 
-            // ma_qty_label
+            // SU_RETURNIFCLEAN
             // 
-            this.ma_qty_label.AutoSize = true;
-            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_qty_label.Location = new System.Drawing.Point(681, 9);
-            this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(58, 21);
-            this.ma_qty_label.TabIndex = 105;
-            this.ma_qty_label.Text = "工单数";
+            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(267, 459);
+            this.SU_RETURNIFCLEAN.Name = "SU_RETURNIFCLEAN";
+            this.SU_RETURNIFCLEAN.Size = new System.Drawing.Size(84, 24);
+            this.SU_RETURNIFCLEAN.TabIndex = 110;
+            this.SU_RETURNIFCLEAN.Text = "是否清洗";
+            this.SU_RETURNIFCLEAN.UseVisualStyleBackColor = true;
+            // 
+            // ma_prodcode_label
+            // 
+            this.ma_prodcode_label.AutoSize = true;
+            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode_label.Location = new System.Drawing.Point(229, 9);
+            this.ma_prodcode_label.Name = "ma_prodcode_label";
+            this.ma_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.ma_prodcode_label.TabIndex = 69;
+            this.ma_prodcode_label.Text = "产品编号";
             // 
             // ma_qty
             // 
@@ -240,53 +205,25 @@
             this.ma_qty.Size = new System.Drawing.Size(0, 21);
             this.ma_qty.TabIndex = 106;
             // 
-            // su_singlepringqty1_label
-            // 
-            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(444, 430);
-            this.su_singlepringqty1_label.Name = "su_singlepringqty1_label";
-            this.su_singlepringqty1_label.Size = new System.Drawing.Size(106, 21);
-            this.su_singlepringqty1_label.TabIndex = 108;
-            this.su_singlepringqty1_label.Text = "单片印刷次数";
+            // ma_qty_label
             // 
-            // SU_RETURNIFCLEAN
+            this.ma_qty_label.AutoSize = true;
+            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty_label.Location = new System.Drawing.Point(681, 9);
+            this.ma_qty_label.Name = "ma_qty_label";
+            this.ma_qty_label.Size = new System.Drawing.Size(58, 21);
+            this.ma_qty_label.TabIndex = 105;
+            this.ma_qty_label.Text = "工单数";
             // 
-            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(267, 459);
-            this.SU_RETURNIFCLEAN.Name = "SU_RETURNIFCLEAN";
-            this.SU_RETURNIFCLEAN.Size = new System.Drawing.Size(84, 24);
-            this.SU_RETURNIFCLEAN.TabIndex = 110;
-            this.SU_RETURNIFCLEAN.Text = "是否清洗";
-            this.SU_RETURNIFCLEAN.UseVisualStyleBackColor = true;
+            // ms_makecode_label
             // 
-            // 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(556, 432);
-            this.su_singlepringqty1.Name = "su_singlepringqty1";
-            this.su_singlepringqty1.Power = null;
-            this.su_singlepringqty1.Size = new System.Drawing.Size(39, 21);
-            this.su_singlepringqty1.Str = null;
-            this.su_singlepringqty1.Str1 = null;
-            this.su_singlepringqty1.Str2 = null;
-            this.su_singlepringqty1.TabIndex = 109;
-            this.su_singlepringqty1.Text = "1";
-            // 
-            // st_table
-            // 
-            this.st_table.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.st_table.FormattingEnabled = true;
-            this.st_table.Items.AddRange(new object[] {
-            "BOTTOM",
-            "TOP"});
-            this.st_table.Location = new System.Drawing.Point(319, 431);
-            this.st_table.Name = "st_table";
-            this.st_table.Size = new System.Drawing.Size(121, 20);
-            this.st_table.TabIndex = 107;
+            this.ms_makecode_label.AutoSize = true;
+            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ms_makecode_label.Location = new System.Drawing.Point(2, 9);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
+            this.ms_makecode_label.TabIndex = 68;
+            this.ms_makecode_label.Text = "归属工单";
             // 
             // Receive
             // 
@@ -295,7 +232,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(828, 425);
+            this.Receive.Location = new System.Drawing.Point(267, 429);
             this.Receive.MoveImage = ((System.Drawing.Image)(resources.GetObject("Receive.MoveImage")));
             this.Receive.Name = "Receive";
             this.Receive.NormalImage = ((System.Drawing.Image)(resources.GetObject("Receive.NormalImage")));
@@ -320,6 +257,7 @@
             this.Return.Power = null;
             this.Return.Size = new System.Drawing.Size(68, 28);
             this.Return.TabIndex = 103;
+            this.Return.Tag = "Make!SMTStockStencil";
             this.Return.Text = "退回";
             this.Return.UseVisualStyleBackColor = false;
             this.Return.Click += new System.EventHandler(this.Return_Click);
@@ -535,25 +473,6 @@
             this.Confirm.UseVisualStyleBackColor = false;
             this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
             // 
-            // li_code
-            // 
-            this.li_code.AllPower = null;
-            this.li_code.BackColor = System.Drawing.Color.White;
-            this.li_code.Caller = null;
-            this.li_code.Condition = null;
-            this.li_code.DBTitle = null;
-            this.li_code.FormName = null;
-            this.li_code.Location = new System.Drawing.Point(682, 430);
-            this.li_code.Name = "li_code";
-            this.li_code.Power = null;
-            this.li_code.ReturnData = null;
-            this.li_code.SelectField = null;
-            this.li_code.SetValueField = null;
-            this.li_code.Size = new System.Drawing.Size(127, 21);
-            this.li_code.TabIndex = 74;
-            this.li_code.TableName = null;
-            this.li_code.TextBoxEnable = false;
-            // 
             // ma_prodcode
             // 
             this.ma_prodcode.AllPower = null;
@@ -594,9 +513,6 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(908, 551);
             this.Controls.Add(this.SU_RETURNIFCLEAN);
-            this.Controls.Add(this.su_singlepringqty1);
-            this.Controls.Add(this.su_singlepringqty1_label);
-            this.Controls.Add(this.st_table);
             this.Controls.Add(this.ma_qty);
             this.Controls.Add(this.ma_qty_label);
             this.Controls.Add(this.Receive);
@@ -615,15 +531,12 @@
             this.Controls.Add(this.label7);
             this.Controls.Add(this.SU_DEVCODE1);
             this.Controls.Add(this.SU_DEVCODE1_label);
-            this.Controls.Add(this.st_table_label);
             this.Controls.Add(this.SU_DEVCODE);
             this.Controls.Add(this.SU_DEVCODE_label);
             this.Controls.Add(this.RadioReturn);
             this.Controls.Add(this.RadioReceive);
             this.Controls.Add(this.ToolsBom);
             this.Controls.Add(this.Confirm);
-            this.Controls.Add(this.li_code);
-            this.Controls.Add(this.li_code_label);
             this.Controls.Add(this.ma_prodcode);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.ms_makecode_label);
@@ -641,20 +554,12 @@
         }
 
         #endregion
-
-        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
-        private System.Windows.Forms.Label ms_makecode_label;
-        private System.Windows.Forms.Label ma_prodcode_label;
-        private CustomControl.TextBoxWithIcon.EnterTextBox ma_prodcode;
-        private System.Windows.Forms.Label li_code_label;
-        private CustomControl.TextBoxWithIcon.SearchTextBox li_code;
         private CustomControl.ButtonUtil.NormalButton Confirm;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum ToolsBom;
         private System.Windows.Forms.RadioButton RadioReceive;
         private System.Windows.Forms.RadioButton RadioReturn;
         private CustomControl.TextBoxWithIcon.EnterTextBox SU_DEVCODE;
         private System.Windows.Forms.Label SU_DEVCODE_label;
-        private System.Windows.Forms.Label st_table_label;
         private CustomControl.TextBoxWithIcon.EnterTextBox SU_DEVCODE1;
         private System.Windows.Forms.Label SU_DEVCODE1_label;
         private System.Windows.Forms.Label label7;
@@ -671,11 +576,6 @@
         private CustomControl.ButtonUtil.NormalButton Scrap;
         private CustomControl.ButtonUtil.NormalButton Return;
         private CustomControl.ButtonUtil.NormalButton Receive;
-        private System.Windows.Forms.Label ma_qty_label;
-        private System.Windows.Forms.Label ma_qty;
-        private CustomControl.ComBoxWithFocus.ComBoxWithFocus st_table;
-        private CustomControl.TextBoxWithIcon.EnterTextBox su_singlepringqty1;
-        private System.Windows.Forms.Label su_singlepringqty1_label;
         private System.Windows.Forms.DataGridViewTextBoxColumn su_stcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn st_pcbcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn su_status;
@@ -685,5 +585,11 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn su_table;
         private System.Windows.Forms.DataGridViewTextBoxColumn su_usemacode;
         private System.Windows.Forms.CheckBox SU_RETURNIFCLEAN;
+        private System.Windows.Forms.Label ma_prodcode_label;
+        private System.Windows.Forms.Label ma_qty;
+        private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ma_prodcode;
+        private System.Windows.Forms.Label ma_qty_label;
+        private System.Windows.Forms.Label ms_makecode_label;
     }
 }

+ 20 - 42
UAS-MES/FunctionCode/Make/Make_SMTStockStencil.cs

@@ -34,8 +34,6 @@ namespace UAS_MES.Make
             ST_ENSIONC.Enabled = false;
             ST_ENSIOND.Enabled = false;
             ST_ENSIONE.Enabled = false;
-            st_table.Enabled = false;
-            su_singlepringqty1.Enabled = false;
             Receive.Enabled = false;
             Return.Enabled = false;
             Scrap.Enabled = false;
@@ -45,7 +43,6 @@ namespace UAS_MES.Make
         private void Make_SMTStencil_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            li_code.Text = User.UserLineCode;
             //工单号放大镜配置
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
             ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_detail # 产品名称,ma_softversion # 软件版本,ma_salecode # 销售单号,pr_sendchecktype # 产品送检方式";
@@ -54,18 +51,6 @@ namespace UAS_MES.Make
             ma_code.Condition = "ma_statuscode in('STARTED','AUDITED')";
             ma_code.DbChange += Ma_code_DbChange;
 
-            li_code.TableName = "Line";
-            li_code.SelectField = "li_code # 线别编号,li_name # 线别名称";
-            li_code.Condition = "li_wccode='SMT'";
-            li_code.FormName = Name;
-            li_code.SetValueField = new string[] { "li_code", "li_name" };
-            li_code.DbChange += Li_code_DbChange;
-        }
-
-        private void Li_code_DbChange(object sender, EventArgs e)
-        {
-            Dbfind = li_code.ReturnData;
-            BaseUtil.SetFormValue(this.Controls, Dbfind);
         }
 
         private void Ma_code_DbChange(object sender, EventArgs e)
@@ -96,15 +81,11 @@ namespace UAS_MES.Make
 
         private void Receive_Click(object sender, EventArgs e)
         {
-            if (ma_code.Text == "")
-            {
-                MessageBox.Show("工单号不能为空");
-            }
             DataTable dt = (DataTable)dh.ExecuteSql("select ST_USESTATUS from Stencil where st_code='" + SU_DEVCODE.Text + "' and st_statuscode='AUDITED'", "select");
             if (dt.Rows.Count > 0)
             {
                 string status = dt.Rows[0]["ST_USESTATUS"].ToString();
-                if (status == "借出" || status == "报废"|| status=="在线")
+                if (status == "借出" || status == "报废" || status == "在线")
                 {
                     MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "处于" + status + "状态,无法领用");
                     return;
@@ -113,22 +94,16 @@ namespace UAS_MES.Make
             else
             {
                 MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不存在或者未审核");
-            }
-            dt = (DataTable)dh.ExecuteSql("select 1 from STENILCANUSEPRO where sp_stcode='" + SU_DEVCODE.Text + "' and sp_prodcode='" + ma_prodcode.Text + "'", "select");
-            if (dt.Rows.Count == 0)
-            {
-                MessageBox.Show("钢网编号" + SU_DEVCODE.Text + "不能在产品" + ma_prodcode.Text + "中使用");
                 return;
             }
             sql.Clear();
-            sql.Append("insert into StencilUse(su_id,SU_USEPRODCODE,su_stid,su_linecode,su_stcode,su_usedate,su_useman,SU_USEMANCODE,SU_TABLE,su_usemacode,su_singlepringqty,su_stverison,SU_STATUS)");
-            sql.Append("select StencilUse_seq.nextval,'" + ma_prodcode.Text + "',st_id,'" + li_code.Text + "','" + SU_DEVCODE.Text + "',sysdate,'" + User.UserName + "','" + User.UserCode + "','" + st_table.Text + "','" + ma_code.Text + "'");
-            sql.Append(",'" + su_singlepringqty1.Text + "',st_version,'借出' from ");
+            sql.Append("insert into StencilUse(su_id,su_stid,su_stcode,su_stockusedate,su_useman,SU_USEMANCODE,su_stverison,SU_STATUS)");
+            sql.Append("select StencilUse_seq.nextval,st_id,'" + SU_DEVCODE.Text + "',sysdate,'" + User.UserName + "','" + User.UserCode + "'");
+            sql.Append(",st_version,'借出' 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 = "";
             Receive.Enabled = false;
             LoadGridData();
@@ -144,6 +119,11 @@ namespace UAS_MES.Make
                     if (dt.Rows.Count > 0)
                     {
                         string status = dt.Rows[0]["ST_USESTATUS"].ToString();
+                        if (status == "在线")
+                        {
+                            MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "处于在线状态,无法退回");
+                            return;
+                        }
                         if (status == "在仓")
                         {
                             MessageBox.Show("当前钢网" + SU_DEVCODE.Text + "未借出,无需归还");
@@ -232,11 +212,13 @@ namespace UAS_MES.Make
             DataTable dt = (DataTable)dh.ExecuteSql("select St_USECOUNT from stencil where st_code='" + SU_DEVCODE1.Text + "'", "select");
             string St_USECOUNT = dt.Rows[0]["St_USECOUNT"].ToString();
             sql.Clear();
-            sql.Append("update StencilUse set SU_IFSCRAPOLD=-1,SU_STATUS='报废'");
+            sql.Append("update StencilUse set SU_IFSCRAPOLD=-1,SU_STATUS='报废',SU_ENSIONA='" + ST_ENSIONA.Text + "',SU_ENSIONB='" + ST_ENSIONB.Text + "',SU_ENSIONC='" + ST_ENSIONC.Text + "',SU_ENSIOND='" + ST_ENSIOND.Text + "',SU_ENSIONE='" + ST_ENSIONE.Text + "'");
             sql.Append(",SU_RETURNIFCLEAN='" + (SU_RETURNIFCLEAN.Checked ? "-1" : "0") + "' where su_id=(select max(su_id) from stenciluse where su_stcode='" + SU_DEVCODE1.Text + "')");
             dh.ExecuteSql(sql.ToString(), "update");
             sql.Clear();
-            sql.Append("update STENCIL set ST_SCRAPREASON='" + scrapreason + "',ST_USESTATUS='报废' where st_code='" + SU_DEVCODE1.Text + "'");
+            sql.Append("update Stencil set ST_SCRAPREASON='" + scrapreason + "',ST_USESTATUS='报废',ST_ENSIONA='" + ST_ENSIONA.Text + "',ST_ENSIONB='" + ST_ENSIONB.Text + "',");
+            sql.Append("ST_ENSIONC='" + ST_ENSIONC.Text + "',ST_ENSIOND='" + ST_ENSIOND.Text + "',ST_ENSIONE='" + ST_ENSIONE.Text + "' ");
+            sql.Append("where st_code='" + SU_DEVCODE1.Text + "'");
             dh.ExecuteSql(sql.ToString(), "insert");
             //推送人员信息
             string[] emid = dh.GetConfig("sendEmp", "Stencil").ToString().Replace("\n", "#").Split('#');
@@ -246,6 +228,13 @@ namespace UAS_MES.Make
                 LogicHandler.SendMessage(emid[i], em_name, "钢网" + SU_DEVCODE1.Text + "已报废");
             }
             form.Close();
+            SU_DEVCODE1.Text = "";
+            ST_ENSIONA.Text = "";
+            ST_ENSIONB.Text = "";
+            ST_ENSIONC.Text = "";
+            ST_ENSIOND.Text = "";
+            ST_ENSIONE.Text = "";
+            SU_RETURNIFCLEAN.Checked = false;
             Scrap.Enabled = false;
         }
 
@@ -258,8 +247,6 @@ namespace UAS_MES.Make
                     {
                         SU_DEVCODE.Enabled = true;
                         Receive.Enabled = true;
-                        st_table.Enabled = true;
-                        su_singlepringqty1.Enabled = true;
                         Receive.Enabled = true;
                         SU_DEVCODE1.Enabled = false;
                         ST_ENSIONA.Enabled = false;
@@ -281,8 +268,6 @@ namespace UAS_MES.Make
                         ST_ENSIOND.Enabled = true;
                         ST_ENSIONE.Enabled = true;
                         SU_DEVCODE.Enabled = false;
-                        st_table.Enabled = false;
-                        su_singlepringqty1.Enabled = false;
                         Receive.Enabled = false;
                         Receive.Enabled = false;
                     }
@@ -344,13 +329,6 @@ namespace UAS_MES.Make
                 }
                 if (dt.Rows.Count > 0)
                 {
-                    for (int i = 0; i < st_table.Items.Count; i++)
-                    {
-                        if (st_table.Items[i].ToString() == dt.Rows[0]["st_table"].ToString())
-                        {
-                            st_table.SelectedItem = st_table.Items[i];
-                        }
-                    }
                     Receive.Enabled = true;
                     if (dt.Rows[0]["st_usestatus"].ToString() == "报废")
                     {