|
|
@@ -78,7 +78,7 @@ namespace UAS_MES.Make
|
|
|
//加载表单数据
|
|
|
string Err = "";
|
|
|
sql.Clear();
|
|
|
- sql.Append("select pr_code,pa_outboxcode,pa_prodcode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,pr_detail,pa_packageqty,pa_standardqty,pr_outboxinnerqty,pa_currentqty from package left join product on pa_prodcode=");
|
|
|
+ sql.Append("select pr_code,pa_outboxcode,pa_prodcode,pa_makecode,pa_sccode,nvl(pa_downstatus,0) pa_downstatus,pa_checkno,pa_status,pr_packrule,pr_detail,pa_packageqty,nvl(pa_standardqty,0) pa_standardqty,pr_outboxinnerqty,pa_currentqty from package left join product on pa_prodcode=");
|
|
|
sql.Append("pr_code where pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
Err = "箱号";
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
@@ -87,6 +87,10 @@ 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;
|
|
|
+ }
|
|
|
}
|
|
|
else OperateResult.AppendText(">>" + Err + "不存在\n", Color.Red);
|
|
|
}
|
|
|
@@ -138,7 +142,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
//获取序列号信息
|
|
|
sql.Clear();
|
|
|
- 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("select pr_code,ms_makecode,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,");
|
|
|
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");
|
|
|
@@ -148,9 +152,9 @@ namespace UAS_MES.Make
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
}
|
|
|
//保证箱内容量不会被重置
|
|
|
- if (pa_standardqty.Text != "0")
|
|
|
+ if (pa_standardqty.Text != "0" && pa_standardqty.Text != "")
|
|
|
{
|
|
|
- pr_outboxinnerqty.Text = pa_standardqty.Text;
|
|
|
+ pr_outboxinnerqty.Value = int.Parse(pa_standardqty.Text);
|
|
|
}
|
|
|
if (pa_outboxcode.Text == "")
|
|
|
{
|
|
|
@@ -246,13 +250,15 @@ namespace UAS_MES.Make
|
|
|
OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
|
|
|
//满箱更新状态为1
|
|
|
- if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) + 1 == pr_outboxinnerqty.Value)
|
|
|
+ LoadData();
|
|
|
+ if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == pr_outboxinnerqty.Value)
|
|
|
{
|
|
|
dh.UpdateByCondition("package", "pa_status=1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ pa_status.Text = "1";
|
|
|
+ pa_standardqty.Text = "";
|
|
|
if (AutoPrint.Checked)
|
|
|
Print_Click(new object(), new EventArgs());
|
|
|
}
|
|
|
- LoadData();
|
|
|
LoadGridData();
|
|
|
sn_code.Clear();
|
|
|
}
|
|
|
@@ -316,6 +322,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
pa_status.Text = "1";
|
|
|
+ pa_standardqty.Text = "";
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "封箱成功", pa_outboxcode.Text, "");
|
|
|
OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.Green);
|
|
|
}
|