Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

章政 8 years ago
parent
commit
ea55ea58aa
1 changed files with 20 additions and 18 deletions
  1. 20 18
      UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

+ 20 - 18
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

@@ -330,14 +330,6 @@ namespace UAS_MES.Warehouse
                                     OperateResult.AppendText("序列号" + input.Text + "处于下地状态,不允许出货\n", Color.Red, input);
                                     return;
                                 }
-                                if (needMakeIn != "0")
-                                {
-                                    if (ms_iostatus != "1")
-                                    {
-                                        OperateResult.AppendText("序列号" + input.Text + "必须完工入库才允许出库\n", Color.Red, input);
-                                        return;
-                                    }
-                                }
                                 if (ms_iostatus == "2")
                                 {
                                     OperateResult.AppendText("序列号" + input.Text + "已出库,出库单号:" + ms_outno + "\n", Color.Red, input);
@@ -348,6 +340,15 @@ namespace UAS_MES.Warehouse
                                     OperateResult.AppendText("序列号" + input.Text + "出入库状态异常\n", Color.Red, input);
                                     return;
                                 }
+                                if (needMakeIn != "0")
+                                {
+                                    if (ms_iostatus != "1")
+                                    {
+                                        OperateResult.AppendText("序列号" + input.Text + "必须完工入库才允许出库\n", Color.Red, input);
+                                        return;
+                                    }
+                                }
+                           
                                 if (ms_outno != "")
                                 {
                                     OperateResult.AppendText("序列号" + input.Text + "已经被出货单:" + ms_outno + "采集\n", Color.Red, input);
@@ -661,6 +662,16 @@ namespace UAS_MES.Warehouse
                 OperateResult.AppendText(type + input.Text + "已出库,请重新输入\n", Color.Red, input);
                 return false;
             }
+            if (dt.Rows[0]["pa_iostatus"].ToString() == "2")
+            {
+                OperateResult.AppendText(type + input.Text + "已经出货\n", Color.Red, input);
+                return false;
+            }
+            if (dt.Rows[0]["pa_iostatus"].ToString() == "3")
+            {
+                OperateResult.AppendText(type + input.Text + "处于销售退货状态\n", Color.Red, input);
+                return false;
+            }
             if (needMakeIn != "0")
             {
                 if (dt.Rows[0]["pa_iostatus"].ToString() != "1")
@@ -674,16 +685,7 @@ namespace UAS_MES.Warehouse
                 OperateResult.AppendText(type + input.Text + "处于下地状态,若需出货,请先取消下地\n", Color.Red, input);
                 return false;
             }
-            if (dt.Rows[0]["pa_iostatus"].ToString() == "2")
-            {
-                OperateResult.AppendText(type + input.Text + "已经出货\n", Color.Red, input);
-                return false;
-            }
-            if (dt.Rows[0]["pa_iostatus"].ToString() == "3")
-            {
-                OperateResult.AppendText(type + input.Text + "处于销售退货状态\n", Color.Red, input);
-                return false;
-            }
+        
             if (dt.Rows[0]["pa_outno"].ToString() != "")
             {
                 OperateResult.AppendText(type + input.Text + "已经被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集\n", Color.Red, input);