|
|
@@ -13,6 +13,7 @@ using System.IO.Ports;
|
|
|
using System.IO;
|
|
|
using System.Text.RegularExpressions;
|
|
|
using System.Collections.Generic;
|
|
|
+using Seagull.BarTender.Print;
|
|
|
|
|
|
namespace UAS_MES_NEW.Packing
|
|
|
{
|
|
|
@@ -23,7 +24,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
LogStringBuilder sql = new LogStringBuilder();
|
|
|
AutoSizeFormClass asc = new AutoSizeFormClass();
|
|
|
Document doc;
|
|
|
- ApplicationClass lbl;
|
|
|
+ Engine engine;
|
|
|
Thread thread;
|
|
|
DataTable Dbfind;
|
|
|
string ErrorMessage = "";
|
|
|
@@ -40,7 +41,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
|
|
|
string ActWeigh = "0";
|
|
|
|
|
|
- Regex re = new Regex("\\d+.\\d+\\w+");
|
|
|
+ Regex re = new Regex("\\d+.\\w+");
|
|
|
|
|
|
decimal StandardQTY = 0;
|
|
|
|
|
|
@@ -64,7 +65,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- lbl = new ApplicationClass();
|
|
|
+ engine = new Engine(true);
|
|
|
BaseUtil.WriteLbl();
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -137,7 +138,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
pa_remark.AppendText(weigh + "\n");
|
|
|
if (weigh != "")
|
|
|
{
|
|
|
- weight.Text = weigh;
|
|
|
+ weight.Text = re.Match(weigh).Value; ;
|
|
|
}
|
|
|
}
|
|
|
catch (Exception)
|
|
|
@@ -224,7 +225,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
{
|
|
|
dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
//doc = lbl.Documents.Open(PrintLabel.Text);
|
|
|
- if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
|
|
|
+ if (Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
|
|
|
{
|
|
|
OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
|
|
|
}
|
|
|
@@ -571,7 +572,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
|
|
|
private void pr_code_TextChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
- LoadCheckQTY();
|
|
|
+ LoadCheckQTY();
|
|
|
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_url";
|
|
|
@@ -580,7 +581,6 @@ namespace UAS_MES_NEW.Packing
|
|
|
|
|
|
private void Make_PackageCollectionWeigh_FormClosing(object sender, FormClosingEventArgs e)
|
|
|
{
|
|
|
- BaseUtil.ClosePrint(lbl);
|
|
|
if (serialPort1.IsOpen)
|
|
|
{
|
|
|
GetData = false;
|