|
|
@@ -249,7 +249,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
}
|
|
|
}
|
|
|
dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_nextstepcode,ms_craftcode,ms_prodcode from makeserial where ms_sncode ='" + sn_code.Text + "' order by ms_id desc", "select");
|
|
|
- if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
|
|
|
+ if (LogicHandler.CheckStepSNAndMacode(ma_code.Text, User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && (dt.Rows[0]["ms_status"].ToString() == "2" || dt.Rows[0]["ms_status"].ToString() == "3")))
|
|
|
{
|
|
|
if (oMsID == "" || oMsID == "null" || oMsID == "0")
|
|
|
{
|
|
|
@@ -258,6 +258,11 @@ namespace UAS_MES_NEW.Packing
|
|
|
oMakeCode = dt.Rows[0]["ms_makecode"].ToString();
|
|
|
}
|
|
|
//如果是已完工序列号验证装箱工序是否存在于途程中
|
|
|
+ if (oMsStatus == "3" && !Cancel.Checked)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>" + sn_code.Text + "处于待维修状态,不允许采集\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (oMsStatus == "2")
|
|
|
{
|
|
|
string prodcode = dt.Rows[0]["ms_prodcode"].ToString();
|
|
|
@@ -346,8 +351,9 @@ 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);
|
|
|
- if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'")) {
|
|
|
- OperateResult.AppendText(">>箱号"+ pa_outboxcode.Text + "已生成,不允许重复使用\n", Color.Red, sn_code);
|
|
|
+ if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "'"))
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已生成,不允许重复使用\n", Color.Red, sn_code);
|
|
|
pa_outboxcode.Text = "";
|
|
|
return;
|
|
|
}
|
|
|
@@ -900,7 +906,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
pa_status.Text = "0";
|
|
|
//删除箱的明细
|
|
|
- dh.ExecuteSql("delete from labelprintlog where lpl_value='"+pa_outboxcode.Text+"'","delete");
|
|
|
+ dh.ExecuteSql("delete from labelprintlog where lpl_value='" + pa_outboxcode.Text + "'", "delete");
|
|
|
dh.ExecuteSql("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'", "delete");
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "卡通箱拆解", "成功", pa_outboxcode.Text, ob_checkno.Text);
|
|
|
OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "成功拆解!\n", Color.Green);
|
|
|
@@ -1152,7 +1158,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
|
|
|
if (e.KeyCode != Keys.Enter) return;
|
|
|
|
|
|
- if(string.IsNullOrEmpty(pr_code.Text))
|
|
|
+ if (string.IsNullOrEmpty(pr_code.Text))
|
|
|
{
|
|
|
OperateResult.AppendText("维护装箱容量前请先扫码" + "\n", Color.Red);
|
|
|
return;
|