|
|
@@ -97,7 +97,7 @@ namespace UAS_MES_NEW.Make
|
|
|
private void radioButton_CheckedChange(object sender, EventArgs e)
|
|
|
{
|
|
|
RadioButton btn = sender as RadioButton;
|
|
|
- if ((btn.Name == "giftBox" || btn.Name == "fuselagel") && btn.Checked)
|
|
|
+ if ((btn.Name == "giftBox" ) && btn.Checked)
|
|
|
{
|
|
|
//如果是切换成彩盒或者机身标提示用户 输入SN
|
|
|
OperateResult.AppendText(">>请输入SN\n", Color.Black);
|
|
|
@@ -108,6 +108,11 @@ namespace UAS_MES_NEW.Make
|
|
|
OperateResult.AppendText(">>请输入卡通箱号\n", Color.Black);
|
|
|
clearAll();
|
|
|
}
|
|
|
+ else if (btn.Name == "fuselagel" && btn.Checked)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>请输入栈板号\n", Color.Black);
|
|
|
+ clearAll();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void inputText_KeyDown(object sender, KeyEventArgs e)
|
|
|
@@ -122,7 +127,7 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
OperateResult.AppendText(">>" + inputText.Text + "\n", Color.Black);
|
|
|
//打印类型为彩盒或者机身标
|
|
|
- if (giftBox.Checked || fuselagel.Checked)
|
|
|
+ if (giftBox.Checked)
|
|
|
{
|
|
|
//select max(ms_id)ms_id from makeserial where ms_sncode=?
|
|
|
ms_id = dh.getFieldDataByCondition("makeserial", "max(ms_id) ms_id", "ms_sncode='" + inputText.Text + "'").ToString();
|
|
|
@@ -163,6 +168,24 @@ namespace UAS_MES_NEW.Make
|
|
|
//展示产品编号和标签模板到界面
|
|
|
inputValue.Text = inputText.Text;
|
|
|
inputText.Text = "";
|
|
|
+ }//打印类型为栈板
|
|
|
+ else if (fuselagel.Checked)
|
|
|
+ {
|
|
|
+ //查询箱号是否存在
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select pa_id,pa_prodcode pr_code,pa_makecode ms_makecode,pr_detail from package left join product on pr_code=pa_prodcode where pa_outboxcode='" + inputText.Text + "' and pa_type=3", "select");
|
|
|
+ if (dt.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ //无值,返回提示用户“箱号不存在”, “>>请输入卡通箱号”
|
|
|
+ OperateResult.AppendText("<<栈板号:" + inputText.Text + "不存在\n", Color.Red, inputText);
|
|
|
+ OperateResult.AppendText(">>请输入栈板号\n", Color.Black);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //界面赋值
|
|
|
+ BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
+ //有值,可以打
|
|
|
+ //展示产品编号和标签模板到界面
|
|
|
+ inputValue.Text = inputText.Text;
|
|
|
+ inputText.Text = "";
|
|
|
}
|
|
|
print_Click(sender, new EventArgs());
|
|
|
}
|
|
|
@@ -175,7 +198,7 @@ namespace UAS_MES_NEW.Make
|
|
|
return;
|
|
|
}
|
|
|
if (fuselagel.Checked)
|
|
|
- type = "机身标";
|
|
|
+ type = "栈板标";
|
|
|
else if (giftBox.Checked)
|
|
|
type = "彩盒标";
|
|
|
else
|
|
|
@@ -206,7 +229,7 @@ namespace UAS_MES_NEW.Make
|
|
|
return;
|
|
|
}
|
|
|
//打印类型 彩盒或者标签,再次判断是否已装箱,未转号
|
|
|
- if (giftBox.Checked || fuselagel.Checked)
|
|
|
+ if (giftBox.Checked)
|
|
|
{
|
|
|
mapB = (DataTable)dh.ExecuteSql("select ms_outboxcode, nvl(ms_downstatus,0) ms_downstatus from makeserial where ms_id='" + ms_id + "' and ms_sncode='" + inputValue.Text + "'", "select");
|
|
|
if (mapB.Rows.Count == 0)
|
|
|
@@ -273,6 +296,37 @@ namespace UAS_MES_NEW.Make
|
|
|
// putInfo2MakeDown();
|
|
|
//}
|
|
|
}
|
|
|
+ //打印类型为栈板标签
|
|
|
+ else if (fuselagel.Checked)
|
|
|
+ {
|
|
|
+ //select pa_downstatus from package where pa_outboxcode=? 输入值code
|
|
|
+ mapB = (DataTable)dh.ExecuteSql("select pa_downstatus from package where pa_outboxcode='" + inputValue.Text + "'", "select");
|
|
|
+ //无值提示用户箱号错误,不存在。
|
|
|
+ if (mapB.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<栈板标号:" + inputValue.Text + "错误,不存在\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //doc = lbl.Documents.Open(PrintLabel.Text);
|
|
|
+ if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), ms_makecode.Text, pr_code.Text, "栈板标", "-1", out errorMessage))
|
|
|
+ {
|
|
|
+ //判断通过,打印
|
|
|
+ OperateResult.AppendText("<<打印成功\n", Color.Green);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(errorMessage + "\n", Color.Red);
|
|
|
+ }
|
|
|
+ //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
|
|
|
+ LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, "栈板标标签补打印,栈板标号:" + inputValue.Text, "补打印成功", inputValue.Text, "");
|
|
|
+ ////如果pa_downstatus<>0,则更新pa_downstatus=-1 where pa_outboxcode=?code,同时插入记录至表 MAKEDOWN
|
|
|
+ //if (mapB.Rows[0]["pa_downstatus"].ToString() == "0")
|
|
|
+ //{
|
|
|
+ // dh.ExecuteSql("update package set pa_downstatus='-1' where pa_outboxcode='" + inputValue.Text + "'", "update");
|
|
|
+ // //插入MakeDown表
|
|
|
+ // putInfo2MakeDown();
|
|
|
+ //}
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|