|
|
@@ -236,8 +236,8 @@ namespace UAS_MES.Make
|
|
|
//更新至下一步工序
|
|
|
if (LogicHandler.SetStepResult((oMakeCode == "null" ? ma_code.Text : oMakeCode), User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage2))
|
|
|
{
|
|
|
- doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text.Split(':')[1]);
|
|
|
- Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
|
|
|
+ doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text);
|
|
|
+ Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
|
|
|
//提示用户打印成功
|
|
|
OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒打印", "彩盒打印成功", sncode.Text, "");
|
|
|
@@ -298,15 +298,15 @@ namespace UAS_MES.Make
|
|
|
//根据产品编号获取打印模板
|
|
|
private void pr_code_TextChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
- DataTable dt = (DataTable)dh.ExecuteSql("select pl_labelcode ||':'||pl_labelname pl_name,pl_labelname,pl_labelcode,pl_labelurl,pl_indate from productlabel where pl_prodcode='" + pr_code.Text + "' and PL_LABELTYPE='彩盒标' order by PL_ISDEFAULT DESC", "select");
|
|
|
- PrintLabel.DataSource = dt;
|
|
|
- PrintLabel.DisplayMember = "pl_name";
|
|
|
- PrintLabel.ValueMember = "pl_labelcode";
|
|
|
- indate = new System.DateTime[dt.Rows.Count];
|
|
|
- for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
+ DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where la_prodcode='" + pr_code.Text + "' and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
|
|
|
+ PrintLabel.DataSource = _dt;
|
|
|
+ PrintLabel.DisplayMember = "la_name";
|
|
|
+ PrintLabel.ValueMember = "la_id";
|
|
|
+ ftpOperater ftp = new ftpOperater();
|
|
|
+ indate = new System.DateTime[_dt.Rows.Count];
|
|
|
+ for (int i = 0; i < _dt.Rows.Count; i++)
|
|
|
{
|
|
|
- BaseUtil.GetPrintLabel(dt.Rows[i]["pl_labelname"].ToString(), dt.Rows[i]["pl_labelurl"].ToString(), dt.Rows[i]["pl_indate"].ToString());
|
|
|
- indate[i] = Convert.ToDateTime(dt.Rows[i]["pl_indate"].ToString());
|
|
|
+ BaseUtil.GetPrintLabel(_dt.Rows[i]["la_name"].ToString(), _dt.Rows[i]["la_url"].ToString());
|
|
|
}
|
|
|
pr_change = true;
|
|
|
}
|
|
|
@@ -367,7 +367,7 @@ namespace UAS_MES.Make
|
|
|
|
|
|
private void PrintLabel_TabIndexChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
- MessageBox.Show(PrintLabel.Text);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|