Browse Source

取消报废功能优化

callm 14 hours ago
parent
commit
5e754e447c

+ 53 - 52
UAS_MES_XMW/FunctionCode/Make/Make_Repair.Designer.cs

@@ -56,6 +56,7 @@
             this.nr_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
             this.nrg_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
             this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.CancelScrap = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.cd_stepcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ms_reworkcheckno = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
@@ -95,7 +96,6 @@
             this.Clean = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.NewBadCode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.SaveBadLocation = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.CancelScrap = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
@@ -224,7 +224,7 @@
             // 
             // GetSNCode_Label
             // 
-            this.GetSNCode_Label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.GetSNCode_Label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode_Label.AutoSize = true;
             this.GetSNCode_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -424,6 +424,28 @@
             this.groupBoxWithBorder1.Text = "工单信息";
             this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
             // 
+            // CancelScrap
+            // 
+            this.CancelScrap.AllPower = "ifall";
+            this.CancelScrap.BackColor = System.Drawing.Color.Transparent;
+            this.CancelScrap.DownImage = ((System.Drawing.Image)(resources.GetObject("CancelScrap.DownImage")));
+            this.CancelScrap.Enabled = false;
+            this.CancelScrap.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.CancelScrap.Image = null;
+            this.CancelScrap.IsShowBorder = true;
+            this.CancelScrap.Location = new System.Drawing.Point(1425, 132);
+            this.CancelScrap.Margin = new System.Windows.Forms.Padding(6);
+            this.CancelScrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("CancelScrap.MoveImage")));
+            this.CancelScrap.Name = "CancelScrap";
+            this.CancelScrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("CancelScrap.NormalImage")));
+            this.CancelScrap.Power = null;
+            this.CancelScrap.Size = new System.Drawing.Size(136, 48);
+            this.CancelScrap.TabIndex = 130;
+            this.CancelScrap.Tag = "IfRead";
+            this.CancelScrap.Text = "取消报废";
+            this.CancelScrap.UseVisualStyleBackColor = true;
+            this.CancelScrap.Click += new System.EventHandler(this.CancelScrap_Click);
+            // 
             // cd_stepcode
             // 
             this.cd_stepcode.AllPower = "ifall";
@@ -447,11 +469,11 @@
             // 
             // ms_reworkcheckno
             // 
-            this.ms_reworkcheckno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_reworkcheckno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_reworkcheckno.AutoSize = true;
             this.ms_reworkcheckno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_reworkcheckno.Location = new System.Drawing.Point(1586, 120);
+            this.ms_reworkcheckno.Location = new System.Drawing.Point(1587, 121);
             this.ms_reworkcheckno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_reworkcheckno.Name = "ms_reworkcheckno";
             this.ms_reworkcheckno.Size = new System.Drawing.Size(146, 41);
@@ -461,11 +483,11 @@
             // 
             // ms_makecode_label
             // 
-            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             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(408, 56);
+            this.ms_makecode_label.Location = new System.Drawing.Point(409, 57);
             this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(114, 41);
@@ -474,11 +496,11 @@
             // 
             // ms_sncode_label
             // 
-            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(32, 54);
+            this.ms_sncode_label.Location = new System.Drawing.Point(33, 55);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(114, 41);
@@ -487,11 +509,11 @@
             // 
             // ms_checkno
             // 
-            this.ms_checkno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_checkno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_checkno.Location = new System.Drawing.Point(1582, 56);
+            this.ms_checkno.Location = new System.Drawing.Point(1583, 57);
             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(146, 41);
@@ -522,12 +544,12 @@
             // 
             // ms_sncode
             // 
-            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode.AutoSize = true;
             this.ms_sncode.CutLength = null;
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode.Location = new System.Drawing.Point(182, 56);
+            this.ms_sncode.Location = new System.Drawing.Point(183, 57);
             this.ms_sncode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_sncode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_sncode.Name = "ms_sncode";
@@ -560,7 +582,7 @@
             this.nr_code.AutoSize = true;
             this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_code.ForeColor = System.Drawing.Color.Black;
-            this.nr_code.Location = new System.Drawing.Point(1682, 446);
+            this.nr_code.Location = new System.Drawing.Point(1683, 447);
             this.nr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.nr_code.Name = "nr_code";
             this.nr_code.Size = new System.Drawing.Size(0, 41);
@@ -568,11 +590,11 @@
             // 
             // st_rstepcode_label
             // 
-            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.st_rstepcode_label.AutoSize = true;
             this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_rstepcode_label.Location = new System.Drawing.Point(532, 132);
+            this.st_rstepcode_label.Location = new System.Drawing.Point(533, 133);
             this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.st_rstepcode_label.Name = "st_rstepcode_label";
             this.st_rstepcode_label.Size = new System.Drawing.Size(146, 41);
@@ -581,11 +603,11 @@
             // 
             // ma_craftcode_label
             // 
-            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ma_craftcode_label.AutoSize = true;
             this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode_label.Location = new System.Drawing.Point(32, 132);
+            this.ma_craftcode_label.Location = new System.Drawing.Point(33, 133);
             this.ma_craftcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_craftcode_label.Name = "ma_craftcode_label";
             this.ma_craftcode_label.Size = new System.Drawing.Size(146, 41);
@@ -616,11 +638,11 @@
             // 
             // pr_detail_label
             // 
-            this.pr_detail_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.pr_detail_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(1276, 56);
+            this.pr_detail_label.Location = new System.Drawing.Point(1277, 57);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
@@ -629,11 +651,11 @@
             // 
             // ms_prodcode_label
             // 
-            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode_label.AutoSize = true;
             this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode_label.Location = new System.Drawing.Point(818, 56);
+            this.ms_prodcode_label.Location = new System.Drawing.Point(819, 57);
             this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_prodcode_label.Name = "ms_prodcode_label";
             this.ms_prodcode_label.Size = new System.Drawing.Size(146, 41);
@@ -642,12 +664,12 @@
             // 
             // pr_detail
             // 
-            this.pr_detail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.pr_detail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(1468, 56);
+            this.pr_detail.Location = new System.Drawing.Point(1469, 57);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_detail.Name = "pr_detail";
@@ -656,12 +678,12 @@
             // 
             // ms_prodcode
             // 
-            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.CutLength = null;
             this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode.Location = new System.Drawing.Point(1010, 56);
+            this.ms_prodcode.Location = new System.Drawing.Point(1011, 57);
             this.ms_prodcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_prodcode.Name = "ms_prodcode";
@@ -671,12 +693,12 @@
             // 
             // ms_makecode
             // 
-            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(568, 56);
+            this.ms_makecode.Location = new System.Drawing.Point(569, 57);
             this.ms_makecode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_makecode.Name = "ms_makecode";
@@ -821,7 +843,7 @@
             // GetSNCode
             // 
             this.GetSNCode.AllPower = null;
-            this.GetSNCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.GetSNCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode.BackColor = System.Drawing.Color.White;
             this.GetSNCode.ID = null;
@@ -900,7 +922,7 @@
             // mbl_loc
             // 
             this.mbl_loc.AllPower = null;
-            this.mbl_loc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.mbl_loc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbl_loc.BackColor = System.Drawing.Color.White;
             this.mbl_loc.ID = null;
@@ -919,7 +941,7 @@
             // bc_name
             // 
             this.bc_name.AllPower = null;
-            this.bc_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.bc_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.bc_name.BackColor = System.Drawing.Color.White;
             this.bc_name.Enabled = false;
@@ -938,7 +960,7 @@
             // bg_name
             // 
             this.bg_name.AllPower = null;
-            this.bg_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.bg_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.bg_name.BackColor = System.Drawing.Color.White;
             this.bg_name.Enabled = false;
@@ -1026,27 +1048,6 @@
             this.SaveBadLocation.UseVisualStyleBackColor = true;
             this.SaveBadLocation.Click += new System.EventHandler(this.SaveBadLocation_Click);
             // 
-            // CancelScrap
-            // 
-            this.CancelScrap.AllPower = "ifall";
-            this.CancelScrap.BackColor = System.Drawing.Color.Transparent;
-            this.CancelScrap.DownImage = ((System.Drawing.Image)(resources.GetObject("CancelScrap.DownImage")));
-            this.CancelScrap.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.CancelScrap.Image = null;
-            this.CancelScrap.IsShowBorder = true;
-            this.CancelScrap.Location = new System.Drawing.Point(1425, 132);
-            this.CancelScrap.Margin = new System.Windows.Forms.Padding(6);
-            this.CancelScrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("CancelScrap.MoveImage")));
-            this.CancelScrap.Name = "CancelScrap";
-            this.CancelScrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("CancelScrap.NormalImage")));
-            this.CancelScrap.Power = null;
-            this.CancelScrap.Size = new System.Drawing.Size(136, 48);
-            this.CancelScrap.TabIndex = 130;
-            this.CancelScrap.Tag = "IfRead";
-            this.CancelScrap.Text = "取消报废";
-            this.CancelScrap.UseVisualStyleBackColor = true;
-            this.CancelScrap.Click += new System.EventHandler(this.CancelScrap_Click);
-            // 
             // Make_Repair
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

+ 13 - 10
UAS_MES_XMW/FunctionCode/Make/Make_Repair.cs

@@ -201,6 +201,9 @@ namespace UAS_MES_NEW.Make
                     //    OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "超出允许维修次数【" + repaircount + "】,不允许维修\n", Color.Red);
                     //    return;
                     //}
+                    CancelScrap.Enabled = false;
+                    RepairComplete.Enabled = true;
+                    Scrap.Enabled = true;
                     string ms_status = dt.Rows[0]["ms_status"].ToString();
                     ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
                     ifrework = dt.Rows[0]["ms_ifrework"].ToString();
@@ -217,12 +220,11 @@ namespace UAS_MES_NEW.Make
                     {
                         if (ms_status == "4")
                         {
-                            OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已处于报废状态\n", Color.Red);
-                            BaseUtil.CleanForm(this);
-                            BadCodeTree.Nodes.Clear();
-                            return;
+                            CancelScrap.Enabled = true;
+                            RepairComplete.Enabled = false;
+                            Scrap.Enabled = false;
                         }
-                        if (ms_status != "3")
+                        if (ms_status != "3" && ms_status != "4")
                         {
                             OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "不处于维修状态\n", Color.Red);
                             BaseUtil.CleanForm(this);
@@ -234,10 +236,9 @@ namespace UAS_MES_NEW.Make
                     {
                         if (reworkstatus == "4")
                         {
-                            OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已处于报废状态\n", Color.Red);
-                            BaseUtil.CleanForm(this);
-                            BadCodeTree.Nodes.Clear();
-                            return;
+                            CancelScrap.Enabled = true;
+                            RepairComplete.Enabled = false;
+                            Scrap.Enabled = false;
                         }
                         if (reworkstatus != "0" && reworkstatus != "3")
                         {
@@ -486,7 +487,7 @@ namespace UAS_MES_NEW.Make
                 sql.Clear();
                 sql.Append("select mbr_id,mbr_brcode,mbr_brgcode,mbr_solutioncode,so_code,so_name,mbr_dutycode,mbr_dutyname,nd_name,nrg_name");
                 sql.Append(",nr_name,nr_code,nrg_code from makebadreason left join QUA_NGReason on nr_code=mbr_brcode left join ");
-                sql.Append("QUA_NGREASONGROUPdet on nrgd_nrcode=nr_code left join QUA_NGREASONGROUP on nrg_id=nrgd_nrgid and ");
+                sql.Append("QUA_NGREASONGROUPdet on nrgd_nrcode=nr_code and nr_id=NRGD_NRGID left join QUA_NGREASONGROUP on nrg_id=nrgd_nrgid and ");
                 sql.Append("mbr_brgcode=nrg_code left join solution on so_code=mbr_solutioncode left join ngduty on nd_code=mbr_dutycode ");
                 sql.Append("where mbr_mbid=" + mb_id);
                 DataTable dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -1069,8 +1070,10 @@ namespace UAS_MES_NEW.Make
                         OperatResult.AppendText(">>SN" + ms_sncode.Text + "不处于报废状态,不允许取消报废\n", Color.Red);
                         return;
                     }
+                    OperatResult.AppendText(">>SN" + ms_sncode.Text + "取消报废成功\n", Color.Green);
                     sqls.Add("update makeserial set ms_paststep = ms_paststep ||'," + User.CurrentStepCode + "',ms_status=3,ms_reworkstatus= '',ms_nextstepcode='',ms_stepcode='" + User.CurrentStepCode + "' where ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'");
                     dh.ExecuteSQLTran(sqls.ToArray());
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "取消报废", "取消报废成功", ms_sncode.Text, ms_checkno.Text);
                 }
             }
         }

+ 0 - 12
UAS_MES_XMW/FunctionCode/Make/Make_Repair.resx

@@ -244,18 +244,6 @@
   <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="mbp_part1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeleteCom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="DeletePos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <metadata name="mbl_loc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>