|
|
@@ -31,8 +31,6 @@ namespace UAS_MES.Make
|
|
|
|
|
|
DataTable dt;
|
|
|
|
|
|
- System.DateTime[] indate;
|
|
|
-
|
|
|
ftpOperater ftp;
|
|
|
|
|
|
DataTable listA;
|
|
|
@@ -179,7 +177,7 @@ namespace UAS_MES.Make
|
|
|
else
|
|
|
type = "卡通箱标";
|
|
|
|
|
|
- getlabel = "select pl_labelcode ||':'||pl_labelname pl_name,pl_labelname,pl_labelcode, pl_indate,pl_labelurl from productlabel where pl_prodcode='" + pr_code.Text + "'and PL_LABELTYPE='" + type + "' order by pl_isdefault desc";
|
|
|
+ getlabel = "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='"+type+"' and la_statuscode='AUDITED' order by la_isdefault";
|
|
|
|
|
|
listA = (DataTable)dh.ExecuteSql(getlabel, "select");
|
|
|
if (listA.Rows.Count == 0)
|
|
|
@@ -187,14 +185,12 @@ namespace UAS_MES.Make
|
|
|
OperateResult.AppendText("<<产品:" + pr_code.Text + "未维护" + type + "模板\n", Color.Red);
|
|
|
}
|
|
|
PrintLabel.DataSource = listA;
|
|
|
- PrintLabel.DisplayMember = "pl_name";
|
|
|
- PrintLabel.ValueMember = "pl_labelcode";
|
|
|
+ PrintLabel.DisplayMember = "la_name";
|
|
|
+ PrintLabel.ValueMember = "la_id";
|
|
|
ftp = new ftpOperater();
|
|
|
- indate = new System.DateTime[listA.Rows.Count];
|
|
|
for (int i = 0; i < listA.Rows.Count; i++)
|
|
|
{
|
|
|
- BaseUtil.GetPrintLabel(listA.Rows[i]["pl_labelname"].ToString(), listA.Rows[i]["pl_labelurl"].ToString(), listA.Rows[i]["pl_indate"].ToString());
|
|
|
- indate[i] = Convert.ToDateTime(listA.Rows[i]["pl_indate"].ToString());
|
|
|
+ BaseUtil.GetPrintLabel(listA.Rows[i]["la_name"].ToString(), listA.Rows[i]["la_url"].ToString());
|
|
|
}
|
|
|
}
|
|
|
private void print_Click(object sender, EventArgs e)
|
|
|
@@ -229,8 +225,8 @@ namespace UAS_MES.Make
|
|
|
//判定通过进行打印
|
|
|
//按照打印张数打印
|
|
|
OperateResult.AppendText("<<打印成功\n", Color.Green);
|
|
|
- doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text.Split(':')[1]);
|
|
|
- Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.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, inputValue.Text, int.Parse(printNum.Text));
|
|
|
//打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode.Text, User.UserLineCode, User.UserSourceCode, giftBox.Checked ? "彩盒标补打印" : "机身标补打印", "补打印成功", inputValue.Text, "");
|
|
|
//如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
|
|
|
@@ -254,8 +250,8 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
//判断通过,打印
|
|
|
OperateResult.AppendText("<<打印成功\n", Color.Green);
|
|
|
- doc = lbl.Documents.Open(ftpOperater.DownLoadTo + PrintLabel.Text.Split(':')[1]);
|
|
|
- Print.CodeSoft(Tag.ToString(), doc, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.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, inputValue.Text, int.Parse(printNum.Text));
|
|
|
//打印成功,记录日志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
|