Browse Source

添加快速维修,大小写问题处理

章政 8 years ago
parent
commit
d40df43022

+ 2 - 3
UAS-MES/CustomControl/TextBoxWithIcon/BlurSearch.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         private void InitializeComponent()
         {
         {
             this.ListBox = new System.Windows.Forms.ListBox();
             this.ListBox = new System.Windows.Forms.ListBox();
-            this.EnterTextBox = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
+            this.EnterTextBox = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
             // ListBox
             // ListBox
@@ -51,7 +51,6 @@
             this.EnterTextBox.Dock = System.Windows.Forms.DockStyle.Top;
             this.EnterTextBox.Dock = System.Windows.Forms.DockStyle.Top;
             this.EnterTextBox.ID = null;
             this.EnterTextBox.ID = null;
             this.EnterTextBox.Location = new System.Drawing.Point(0, 0);
             this.EnterTextBox.Location = new System.Drawing.Point(0, 0);
-            this.EnterTextBox.Lock = false;
             this.EnterTextBox.Margin = new System.Windows.Forms.Padding(2);
             this.EnterTextBox.Margin = new System.Windows.Forms.Padding(2);
             this.EnterTextBox.Name = "EnterTextBox";
             this.EnterTextBox.Name = "EnterTextBox";
             this.EnterTextBox.Power = null;
             this.EnterTextBox.Power = null;
@@ -84,6 +83,6 @@
         #endregion
         #endregion
 
 
         private System.Windows.Forms.ListBox ListBox;
         private System.Windows.Forms.ListBox ListBox;
-        private MaCodeTextBox EnterTextBox;
+        private SnCollectionBox EnterTextBox;
     }
     }
 }
 }

+ 11 - 1
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -217,9 +217,19 @@ namespace UAS_MES.Make
                     BadCodeTree.Nodes.Clear();
                     BadCodeTree.Nodes.Clear();
                     return;
                     return;
                 }
                 }
+                dt = (DataTable)dh.ExecuteSql("select mb_stepcode from makebad where mb_sncode='" + GetSNCode.Text + "' and mb_status=0 order by mb_id desc", "select");
+                //打不良的资源和当前资源相等可以快速维修,无须登录维修资源
+                bool QuickRepair = false;
+                if (dt.Rows.Count > 0)
+                {
+                    if (dt.Rows[0]["mb_stepcode"].ToString() == User.CurrentStepCode)
+                    {
+                        QuickRepair = true;
+                    }
+                }
                 string ErrorMessage = "";
                 string ErrorMessage = "";
                 //验证工序是否正确
                 //验证工序是否正确
-                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage) || QuickRepair)
                 {
                 {
                     BadInf_1.Clear();
                     BadInf_1.Clear();
                     string oStatus = "";
                     string oStatus = "";