|
|
@@ -84,6 +84,7 @@ namespace UAS_MES.Make
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
+ //记录该数据保证在修改不被允许的前提下能偶回复之前的值
|
|
|
StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
}
|
|
|
@@ -112,7 +113,7 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
|
|
|
}
|
|
|
- else OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护打印标签\n", Color.Red);
|
|
|
+ else OperateResult.AppendText(">>产品" + pr_code.Text + "未维护打印标签\n", Color.Red);
|
|
|
}
|
|
|
|
|
|
//加载工单信息和装箱明细信息
|
|
|
@@ -135,8 +136,9 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
|
|
|
{
|
|
|
+ //获取序列号信息
|
|
|
sql.Clear();
|
|
|
- sql.Append("select pa_prodcode,ms_makecode,pr_code,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,pa_standardqty,");
|
|
|
+ sql.Append("select pr_code,ms_makecode,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,nvl(pa_standardqty,0) pa_standardqty,");
|
|
|
sql.Append("pr_outboxinnerqty from makeserial left join product on ms_prodcode=pr_code left join packagedetail ");
|
|
|
sql.Append("on pd_barcode=ms_sncode left join package on pa_id =pd_paid where ms_id='" + oMsID + "'");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
@@ -145,6 +147,7 @@ namespace UAS_MES.Make
|
|
|
StandardQTY = decimal.Parse(dt.Rows[0]["pr_outboxinnerqty"].ToString());
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
}
|
|
|
+ //保证箱内容量不会被重置
|
|
|
if (pa_standardqty.Text != "0")
|
|
|
{
|
|
|
pr_outboxinnerqty.Text = pa_standardqty.Text;
|
|
|
@@ -152,6 +155,7 @@ namespace UAS_MES.Make
|
|
|
if (pa_outboxcode.Text == "")
|
|
|
{
|
|
|
string boxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
+ //序列号存在箱号的情况下获取所有的装箱数据
|
|
|
if (boxcode != "")
|
|
|
{
|
|
|
pa_outboxcode.Text = boxcode;
|
|
|
@@ -159,6 +163,7 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ //如果勾选了自动生成箱号,在封箱或者首次
|
|
|
if (AutoGenBoxCode.Checked && (pa_status.Text == "1" || pa_status.Text == ""))
|
|
|
pa_outboxcode.GeneratePaCode_Click(new object(), new EventArgs());
|
|
|
}
|
|
|
@@ -195,7 +200,7 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
break;
|
|
|
case "PROD":
|
|
|
- if (dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_id='" + oMsID + "'").ToString() != pa_prodcode.Text)
|
|
|
+ if (dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_id='" + oMsID + "'").ToString() != pr_code.Text)
|
|
|
{
|
|
|
OperateResult.AppendText(">>序列号" + sn_code.Text + "对应物料和该箱所装物料不同\n", Color.Red, sn_code);
|
|
|
return;
|
|
|
@@ -284,9 +289,9 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
LoadCheckQTY();
|
|
|
pa_outboxcode.MakeCode = pa_makecode.Text;
|
|
|
- pa_outboxcode.ProdCode = pa_prodcode.Text;
|
|
|
+ pa_outboxcode.ProdCode = pr_code.Text;
|
|
|
pa_outboxcode.Caller = "PACKAGE";
|
|
|
- dt = (DataTable)dh.ExecuteSql("select pl_labelcode||':'||pl_labelname pl_laname,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_prodcode='" + pa_prodcode.Text + "' order by pl_isdefault desc ", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select pl_labelcode||':'||pl_labelname pl_laname,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_prodcode='" + pr_code.Text + "' order by pl_isdefault desc ", "select");
|
|
|
PrintLabel.DataSource = dt;
|
|
|
PrintLabel.DisplayMember = "pl_laname";
|
|
|
PrintLabel.ValueMember = "pl_labelcode";
|
|
|
@@ -354,7 +359,7 @@ namespace UAS_MES.Make
|
|
|
condition = "and ob_status='ENTERING' ";
|
|
|
}
|
|
|
sql.Append("select ob_batchqty,ob_nowcheckqty,ob_checkno from oqcbatch where ");
|
|
|
- sql.Append("ob_linecode='" + User.UserLineCode + "' and ob_prodcode='" + pa_prodcode.Text + "' and ");
|
|
|
+ sql.Append("ob_linecode='" + User.UserLineCode + "' and ob_prodcode='" + pr_code.Text + "' and ");
|
|
|
sql.Append("ob_stepcode='" + User.CurrentStepCode + "' " + condition);
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
if (dt.Rows.Count > 0)
|