Browse Source

修改必须传关键物料

callm 1 week ago
parent
commit
80efa3751c
1 changed files with 9 additions and 0 deletions
  1. 9 0
      UAS_MES_YD/FunctionCode/Query/Query_SOP.cs

+ 9 - 0
UAS_MES_YD/FunctionCode/Query/Query_SOP.cs

@@ -84,6 +84,15 @@ namespace UAS_MES_NEW.Query
                     return;
                 }
             }
+            if (pa_outboxcode.Text != "")
+            {
+                dt = (DataTable)dh.ExecuteSql("select * from packagedetail left join make on PD_MAKECODE||'-1'=ma_code left join craftmaterial on cm_sncode=pd_barcode where CM_PRDETAIL='CPU' and pd_makecode='" + ma_code.Text + "' and pd_outboxcode='" + pa_outboxcode.Text + "' and ma_prodcode in (select PC_CODE from pcba_cust) and cm_barcode is null", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "CPU关键物料绑定不完整,不允许打印\n", Color.Black);
+                    return;
+                }
+            }
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 outboxcode = dt.Rows[i]["pa_outboxcode"].ToString();