Ver Fonte

添加取消报废功能

callm há 1 dia atrás
pai
commit
a8c04b577d

+ 38 - 14
UAS_MES_XMW/FunctionCode/Make/Make_Repair.Designer.cs

@@ -95,6 +95,7 @@
             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();
@@ -394,6 +395,7 @@
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.CancelScrap);
             this.groupBoxWithBorder1.Controls.Add(this.cd_stepcode);
             this.groupBoxWithBorder1.Controls.Add(this.ms_reworkcheckno);
             this.groupBoxWithBorder1.Controls.Add(this.ms_makecode_label);
@@ -449,7 +451,7 @@
             | 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(1585, 119);
+            this.ms_reworkcheckno.Location = new System.Drawing.Point(1586, 120);
             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);
@@ -463,7 +465,7 @@
             | 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(407, 55);
+            this.ms_makecode_label.Location = new System.Drawing.Point(408, 56);
             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);
@@ -476,7 +478,7 @@
             | 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(31, 53);
+            this.ms_sncode_label.Location = new System.Drawing.Point(32, 54);
             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);
@@ -489,7 +491,7 @@
             | 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(1581, 55);
+            this.ms_checkno.Location = new System.Drawing.Point(1582, 56);
             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);
@@ -525,7 +527,7 @@
             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(181, 55);
+            this.ms_sncode.Location = new System.Drawing.Point(182, 56);
             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";
@@ -540,7 +542,7 @@
             this.Scrap.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.Scrap.Image = null;
             this.Scrap.IsShowBorder = true;
-            this.Scrap.Location = new System.Drawing.Point(1262, 132);
+            this.Scrap.Location = new System.Drawing.Point(1251, 134);
             this.Scrap.Margin = new System.Windows.Forms.Padding(6);
             this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
             this.Scrap.Name = "Scrap";
@@ -558,7 +560,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(1681, 445);
+            this.nr_code.Location = new System.Drawing.Point(1682, 446);
             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);
@@ -570,7 +572,7 @@
             | 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(531, 131);
+            this.st_rstepcode_label.Location = new System.Drawing.Point(532, 132);
             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);
@@ -583,7 +585,7 @@
             | 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(31, 131);
+            this.ma_craftcode_label.Location = new System.Drawing.Point(32, 132);
             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);
@@ -618,7 +620,7 @@
             | 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(1275, 55);
+            this.pr_detail_label.Location = new System.Drawing.Point(1276, 56);
             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);
@@ -631,7 +633,7 @@
             | 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(817, 55);
+            this.ms_prodcode_label.Location = new System.Drawing.Point(818, 56);
             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);
@@ -645,7 +647,7 @@
             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(1467, 55);
+            this.pr_detail.Location = new System.Drawing.Point(1468, 56);
             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";
@@ -659,7 +661,7 @@
             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(1009, 55);
+            this.ms_prodcode.Location = new System.Drawing.Point(1010, 56);
             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";
@@ -674,7 +676,7 @@
             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(567, 55);
+            this.ms_makecode.Location = new System.Drawing.Point(568, 56);
             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";
@@ -1024,6 +1026,27 @@
             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);
@@ -1155,5 +1178,6 @@
         private System.Windows.Forms.Label so_code;
         private System.Windows.Forms.Label mbr_dutycode;
         private CustomControl.ComBoxWithFocus.ComBoxWithFocus mbc_component;
+        private CustomControl.ButtonUtil.NormalButton CancelScrap;
     }
 }

+ 22 - 0
UAS_MES_XMW/FunctionCode/Make/Make_Repair.cs

@@ -1052,5 +1052,27 @@ namespace UAS_MES_NEW.Make
                 SaveRepairInf.Enabled = false;
             }
         }
+
+        private void CancelScrap_Click(object sender, EventArgs e)
+        {
+            if (ms_sncode.Text != "")
+            {
+                sql.Clear();
+                sql.Append("select ms_status,ms_outboxcode,nvl(ms_repairtimes,0)ms_repairtimes,ms_status,ms_paststep,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework from makeserial left join make ");
+                sql.Append("on ms_makecode=ma_code where ms_sncode = '" + GetSNCode.Text + "' order by ms_id desc");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    string ms_status = dt.Rows[0]["ms_status"].ToString();
+                    if (ms_status != "4")
+                    {
+                        OperatResult.AppendText(">>SN" + ms_sncode.Text + "不处于报废状态,不允许取消报废\n", Color.Red);
+                        return;
+                    }
+                    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());
+                }
+            }
+        }
     }
 }

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

@@ -124,6 +124,44 @@
     <value>190, 17</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="CancelScrap.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="CancelScrap.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="CancelScrap.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
   <data name="RepairComplete.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
@@ -206,6 +244,18 @@
   <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>