|
|
@@ -374,8 +374,15 @@ namespace UAS_MES_NEW.Packing
|
|
|
//如果勾选了自动生成箱号,在封箱或者首次
|
|
|
if (AutoGenBoxCode.Checked && (pa_status.Text == "1" || pa_status.Text == "" || pa_status.Text == "0"))
|
|
|
{
|
|
|
- pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
|
|
|
- LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "自动生成", sn_code.Text, PreFix.Text + ":" + OutBoxLength.Text);
|
|
|
+ string maxbox = dh.getFieldDataByCondition("package", "min(pa_outboxcode)", "pa_makecode='"+ms_makecode+ "' and PA_PACKAGEQTY<PA_STANDARDQTY").ToString();
|
|
|
+ if (maxbox != "")
|
|
|
+ {
|
|
|
+ pa_outboxcode.Text = maxbox;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", ms_makecode, pr_code.Text, User.UserCode);
|
|
|
+ LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "自动生成", sn_code.Text, PreFix.Text + ":" + OutBoxLength.Text);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|