|
|
@@ -94,6 +94,11 @@ namespace UAS_MES_NEW.Make
|
|
|
OperateResult.AppendText(">>请输入SN\n", Color.Black);
|
|
|
clearAll();
|
|
|
}
|
|
|
+ else if (btn.Name == "BigBox" && btn.Checked)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>请输入大箱号\n", Color.Black);
|
|
|
+ clearAll();
|
|
|
+ }
|
|
|
else if (btn.Name == "CartonBox" && btn.Checked)
|
|
|
{
|
|
|
OperateResult.AppendText(">>请输入卡通箱号\n", Color.Black);
|
|
|
@@ -188,6 +193,37 @@ namespace UAS_MES_NEW.Make
|
|
|
inputValue.Text = inputText.Text;
|
|
|
inputText.Text = "";
|
|
|
}
|
|
|
+ else if (BigBox.Checked)
|
|
|
+ {
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_imei1='" + inputText.Text + "' order by ms_id desc", "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select ms_outboxcode from makeserial where ms_imei2='" + inputText.Text + "' order by ms_id desc", "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ inputText.Text = dt.Rows[0]["ms_outboxcode"].ToString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //查询箱号是否存在
|
|
|
+ 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=2", "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());
|
|
|
}
|
|
|
}
|
|
|
@@ -202,6 +238,8 @@ namespace UAS_MES_NEW.Make
|
|
|
type = "机身标";
|
|
|
else if (giftBox.Checked)
|
|
|
type = "彩盒标";
|
|
|
+ else if (BigBox.Checked)
|
|
|
+ type = "大箱标";
|
|
|
else
|
|
|
type = "卡通箱标";
|
|
|
|
|
|
@@ -297,6 +335,36 @@ namespace UAS_MES_NEW.Make
|
|
|
// putInfo2MakeDown();
|
|
|
//}
|
|
|
}
|
|
|
+ else if (BigBox.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.BarTender(Tag.ToString(), ref engine, 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>
|