|
|
@@ -57,7 +57,7 @@ namespace UAS_MES_NEW.Make
|
|
|
ma_code.SelectField = "ma_code # 工单号,pr_code # 产品编号,ma_qty # 工单数量,pr_detail # 产品名称,pr_spec # 产品规格,ma_craftcode # 途程编号";
|
|
|
ma_code.FormName = Name;
|
|
|
ma_code.SetValueField = new string[] { "ma_code", "pr_code", "ma_qty", "pr_detail", "pr_spec", "ma_craftcode" };
|
|
|
- ma_code.Condition = "ma_kind='返工' and ma_statuscode='STARTED'";
|
|
|
+ ma_code.Condition = "ma_kind in('返工','委托加工直接入库-返工生产','返工委外订单') and ma_statuscode='STARTED'";
|
|
|
ma_code.DbChange += Ma_code_DbChange;
|
|
|
|
|
|
ma_code.SetLockCheckBox(LockCheckBox);
|
|
|
@@ -140,7 +140,7 @@ namespace UAS_MES_NEW.Make
|
|
|
sql.Append("select ma_salecode,nvl(ma_checksacode,0)ma_checksacode,ma_prodcode,ma_craftname,ma_inqty,ma_craftcode,ma_qty,nvl(ma_inqty,0) ma_inqty,");
|
|
|
sql.Append("nvl(ma_scrapqty,0)ma_scrapqty,ma_id,nvl(ma_unlimitin,0) ma_unlimitin,ma_wccode,NVL(re_autodecom,0)");
|
|
|
sql.Append("re_autodecom,nvl(re_ifsnok,0)re_ifsnok,re_code from make left join rework on ma_screcode=re_code where ");
|
|
|
- sql.Append("ma_code='" + ma_code.Text + "'and ma_kind='返工' and ma_statuscode='STARTED'");
|
|
|
+ sql.Append("ma_code='" + ma_code.Text + "'and ma_kind in('返工','委托加工直接入库-返工生产','返工委外订单') and ma_statuscode='STARTED'");
|
|
|
DataTable MaInf = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
string ma_prodcode = MaInf.Rows[0]["ma_prodcode"].ToString();
|
|
|
string ma_salecode = MaInf.Rows[0]["ma_salecode"].ToString();
|
|
|
@@ -358,7 +358,7 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
if (ma_code.Text.Length >= 5)
|
|
|
{
|
|
|
- if (dh.CheckExist("make", "ma_kind='返工' and ma_statuscode='STARTED' and ma_code='" + ma_code.Text + "'"))
|
|
|
+ if (dh.CheckExist("make", "ma_kind in('返工','委托加工直接入库-返工生产','返工委外订单') and ma_statuscode='STARTED' and ma_code='" + ma_code.Text + "'"))
|
|
|
{
|
|
|
sql.Clear();
|
|
|
sql.Append("select ma_id,ma_craftcode,ma_code,pr_code,pr_detail,pr_spec,ma_qty,nvl(ma_savemacbt,0) ma_savemacbt,nvl(ma_saveimei, 0)");
|