|
|
@@ -23,11 +23,7 @@ namespace UAS_Web.tool
|
|
|
|
|
|
//打印图片集合
|
|
|
List<Bitmap> bitmaps = new List<Bitmap>();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
Report BarcodeReport = new Report();
|
|
|
- Report BoxReport = new Report();
|
|
|
|
|
|
//图片打印中间变量
|
|
|
int imagecount = 0;
|
|
|
@@ -160,6 +156,8 @@ namespace UAS_Web.tool
|
|
|
{
|
|
|
filter = FilterManager.GetFileter(request.Identifier.ToString()) as MessageFilter;
|
|
|
str = System.Text.Encoding.UTF8.GetString(filter.dataAll.ToArray());
|
|
|
+ if (str.Contains("不允许打印"))
|
|
|
+ return;
|
|
|
data = ToDictionary(str);
|
|
|
vendorZplPrint(data);
|
|
|
}
|
|
|
@@ -189,7 +187,7 @@ namespace UAS_Web.tool
|
|
|
barcode = (List<Dictionary<string, object>>)((Dictionary<string, object>)data)["barcode"];
|
|
|
}
|
|
|
catch {
|
|
|
- MessageBox.Show("打印数据解析异常,请联系管理员进行处理");
|
|
|
+ MessageBox.Show("打印数据异常,请联系管理员");
|
|
|
return;
|
|
|
}
|
|
|
try
|
|
|
@@ -219,16 +217,10 @@ namespace UAS_Web.tool
|
|
|
i++;
|
|
|
}
|
|
|
if (DownLoadFile.downloading)
|
|
|
- Console.WriteLine("标签更新有误");
|
|
|
+ MessageBox.Show("标签更新有误");
|
|
|
try
|
|
|
{
|
|
|
- if (type == "box")
|
|
|
- {
|
|
|
- BoxReport.Load(System.AppDomain.CurrentDomain.BaseDirectory + LABELNAME + ".frx");
|
|
|
- }
|
|
|
- else {
|
|
|
- BarcodeReport.Load(System.AppDomain.CurrentDomain.BaseDirectory + LABELNAME + ".frx");
|
|
|
- }
|
|
|
+ BarcodeReport.Load(System.AppDomain.CurrentDomain.BaseDirectory + LABELNAME + ".frx");
|
|
|
}
|
|
|
catch
|
|
|
{
|
|
|
@@ -387,11 +379,11 @@ namespace UAS_Web.tool
|
|
|
{
|
|
|
if (type == "box")
|
|
|
{
|
|
|
- BoxReport.RegisterData(dt, "VENDORBARCODE_BOX_VIEW");
|
|
|
- BoxReport.GetDataSource("VENDORBARCODE_BOX_VIEW").Enabled = true;
|
|
|
- BoxReport.PrintSettings.ShowDialog = false;
|
|
|
- BoxReport.PrintSettings.Printer = PrinterName;
|
|
|
- BoxReport.Print();
|
|
|
+ BarcodeReport.RegisterData(dt, "VENDORBARCODE_BOX_VIEW");
|
|
|
+ BarcodeReport.GetDataSource("VENDORBARCODE_BOX_VIEW").Enabled = true;
|
|
|
+ BarcodeReport.PrintSettings.ShowDialog = false;
|
|
|
+ BarcodeReport.PrintSettings.Printer = PrinterName;
|
|
|
+ BarcodeReport.Print();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -402,13 +394,14 @@ namespace UAS_Web.tool
|
|
|
BarcodeReport.Print();
|
|
|
}
|
|
|
}
|
|
|
- else {
|
|
|
+ else
|
|
|
+ {
|
|
|
BarcodeReport.RegisterData(dt, labelview);
|
|
|
BarcodeReport.GetDataSource(labelview).Enabled = true;
|
|
|
BarcodeReport.PrintSettings.ShowDialog = false;
|
|
|
BarcodeReport.PrintSettings.Printer = PrinterName;
|
|
|
BarcodeReport.Print();
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
catch(Exception ex)
|
|
|
{
|