|
|
@@ -83,7 +83,7 @@ namespace UAS_MES.Make
|
|
|
else
|
|
|
{
|
|
|
sncode.Text = "";
|
|
|
- OperateResult.AppendText(">>序列号" + sncode.Text + "没有对应工序\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>无序列号" + sncode.Text + "对应工单信息\n", Color.Red);
|
|
|
|
|
|
}
|
|
|
string ErrorMessage = "";
|
|
|
@@ -92,22 +92,37 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
macode = ma_code.Text;
|
|
|
BaseUtil.CleanForm(this);
|
|
|
- ErrorMessage = "工单" + macode + "打印完成>>>请输入SN";
|
|
|
+ ErrorMessage = "工单" + macode + "打印结束>>>请输入SN";
|
|
|
OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
|
|
|
sncode.Focus();
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (PrintLabel.SelectedValue != null && PrintNum.Text.Trim() != "")
|
|
|
+ //所选标签不为空
|
|
|
+ if (PrintLabel.SelectedValue != null)
|
|
|
{
|
|
|
+ //如果打印张数为空,返回
|
|
|
+ if (PrintNum.Text == "" || int.Parse(PrintNum.Text) == 0)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>打印张数不可空或者为0\n", Color.Red);
|
|
|
+ //清空输入框的值,聚焦
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ //提示用户“>>请输入SN”
|
|
|
+ OperateResult.AppendText(">>请输入SN\n", Color.Green);
|
|
|
+ return;
|
|
|
+ }
|
|
|
Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ma_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
|
|
|
+
|
|
|
if (LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "彩盒打印", User.UserSourceCode, User.UserCode, "彩盒打印成功", out ErrorMessage))
|
|
|
{
|
|
|
- ErrorMessage = "打印完成,执行更新";
|
|
|
- OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Green);
|
|
|
+ //提示用户打印成功
|
|
|
+ OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
|
|
|
+ //刷新打印数量和剩余数量
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
|
|
|
+ BaseUtil.SetFormValue(Controls, dt);
|
|
|
mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
|
|
|
- mcd_remainqty.Text = int.Parse(mcd_remainqty.Text) - 1 + "";
|
|
|
sncode.Text = "";
|
|
|
sncode.Focus();
|
|
|
}
|
|
|
@@ -115,12 +130,12 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
sncode.Text = "";
|
|
|
sncode.Focus();
|
|
|
- OperateResult.AppendText(">>更新失败" + ErrorMessage + "\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>更新工序失败" + ErrorMessage + "\n", Color.Red);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ErrorMessage = "该序列号对应的产品未维护(彩盒)标签模板或打印张数没有选择";
|
|
|
+ OperateResult.AppendText(">>产品编号:" + pr_code.Text + "未维护机身标签\n", Color.Red);
|
|
|
OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
return;
|
|
|
}
|
|
|
@@ -136,7 +151,7 @@ namespace UAS_MES.Make
|
|
|
else
|
|
|
{
|
|
|
sncode.Text = "";
|
|
|
- OperateResult.AppendText("错误" + ErrorMessage2 + "\n", Color.Red);
|
|
|
+ OperateResult.AppendText(ErrorMessage2 + "\n", Color.Red);
|
|
|
}
|
|
|
}
|
|
|
}
|