|
|
@@ -101,40 +101,30 @@ namespace UAS_MES.Make
|
|
|
//所选标签不为空
|
|
|
if (PrintLabel.SelectedValue != null)
|
|
|
{
|
|
|
- //判断打印数量是否合理
|
|
|
- //合理
|
|
|
- if (int.Parse(PrintNum.Text) <= int.Parse(mcd_remainqty.Text) && int.Parse(PrintNum.Text) > 0)
|
|
|
- {
|
|
|
- //按照打印张数打印
|
|
|
- Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text));
|
|
|
- //提示用户打印成功
|
|
|
- OperateResult.AppendText(">>打印成功\n", Color.Green);
|
|
|
- //更新打印的数据
|
|
|
- LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "机身标打印", User.UserSourceCode, User.UserName, "机身标打印成功", out oErrorMessage);
|
|
|
- //清空输入框的值,聚焦
|
|
|
- sncode.Text = "";
|
|
|
- sncode.Focus();
|
|
|
- //刷新打印数量和剩余数量
|
|
|
- mcd_remainqty.Text = int.Parse(mcd_remainqty.Text) - 1 + "";
|
|
|
- mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
|
|
|
+ //按照打印张数打印
|
|
|
+ Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text));
|
|
|
+ //提示用户打印成功
|
|
|
+ OperateResult.AppendText(">>打印成功\n", Color.Green);
|
|
|
+ //更新打印的数据
|
|
|
+ LogicHandler.UpdateMakeMessage(sncode.Text, ma_code.Text, "机身标打印", User.UserSourceCode, User.UserName, "机身标打印成功", out oErrorMessage);
|
|
|
+ //清空输入框的值,聚焦
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ //刷新打印数量和剩余数量
|
|
|
+ mcd_remainqty.Text = int.Parse(mcd_remainqty.Text) - 1 + "";
|
|
|
+ mcd_okqty.Text = int.Parse(mcd_okqty.Text) + 1 + "";
|
|
|
|
|
|
- //IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
|
|
|
- if (int.Parse(mcd_remainqty.Text) == 0)
|
|
|
- {
|
|
|
- BaseUtil.CleanForm(this);
|
|
|
- OperateResult.AppendText(">>工单:" + ma_code.Text + "打印完成,>>请输入SN\n", Color.Green);
|
|
|
- }
|
|
|
- //剩余数量不为0
|
|
|
- else
|
|
|
- {
|
|
|
- //提示用户“>>请输入SN”
|
|
|
- OperateResult.AppendText(">>请输入SN\n", Color.Green);
|
|
|
- }
|
|
|
+ //IF 剩余数=0,则清空form中的数据, 提示用户“工单:xx已经打印完成,>>请输入SN”, 清空mapB,listC 中的数据
|
|
|
+ if (int.Parse(mcd_remainqty.Text) == 0)
|
|
|
+ {
|
|
|
+ BaseUtil.CleanForm(this);
|
|
|
+ OperateResult.AppendText(">>工单:" + ma_code.Text + "打印完成,>>请输入SN\n", Color.Green);
|
|
|
}
|
|
|
- //打印数量不合理
|
|
|
+ //剩余数量不为0
|
|
|
else
|
|
|
{
|
|
|
- OperateResult.AppendText(">>打印数量不合理\n", Color.Red);
|
|
|
+ //提示用户“>>请输入SN”
|
|
|
+ OperateResult.AppendText(">>请输入SN\n", Color.Green);
|
|
|
}
|
|
|
}
|
|
|
//标签为空
|