Browse Source

修改客户条码绑定逻辑

callm 3 weeks ago
parent
commit
83bd7d4ae5
1 changed files with 15 additions and 1 deletions
  1. 15 1
      UAS_MES_ZT/FunctionCode/Make/Make_TestCollectionCT2.cs

+ 15 - 1
UAS_MES_ZT/FunctionCode/Make/Make_TestCollectionCT2.cs

@@ -439,7 +439,8 @@ namespace UAS_MES_NEW.Make
                     {
                         if (khcheck.Checked)
                         {
-                            if (oth.Text != "") {
+                            if (oth.Text != "")
+                            {
                                 string ms_status = dh.getFieldDataByCondition("makeserial", "ms_status", "ms_sncode='" + oth.Text + "'").ToString();
                                 if (ms_status != "2")
                                 {
@@ -448,6 +449,12 @@ namespace UAS_MES_NEW.Make
                                     return;
                                 }
                             }
+                            else
+                            {
+                                OperateResult.AppendText(">>客户条码必须采集\n", Color.Red, oth);
+                                oth.Focus();
+                                return;
+                            }
                         }
                         else
                         {
@@ -1151,6 +1158,13 @@ namespace UAS_MES_NEW.Make
             {
                 if (oth.Text != "")
                 {
+                    string ms_status = dh.getFieldDataByCondition("makeserial", "ms_status", "ms_sncode='" + oth.Text + "'").ToString();
+                    if (ms_status != "2")
+                    {
+                        OperateResult.AppendText(">>条码" + oth.Text + "未完工,不允许采集\n", Color.Red, oth);
+                        oth.Focus();
+                        return;
+                    }
                     ms_sncode.Focus();
                     ms_sncode.SelectAll();
                 }