|
|
|
@ -21,8 +21,9 @@ namespace ButcherFactory.SegmentProduction_ |
|
|
|
if (AppContext.ConnectInfo.TraceBackUrl == "default") |
|
|
|
throw new Exception("请先配置追溯服务器地址"); |
|
|
|
if (dt == null) |
|
|
|
dt = DateTime.Today; |
|
|
|
var dic = new Dictionary<string, string>(); |
|
|
|
dt = DateTime.Today; |
|
|
|
var dic = new Dictionary<string, string>(); |
|
|
|
dic.Add("$ShotPrintName", entity.ShotPrintName); |
|
|
|
dic.Add("$Goods_Name", entity.Goods_Name); |
|
|
|
var info = string.Empty; |
|
|
|
if (entity.StandardPic) |
|
|
|
@ -43,7 +44,14 @@ namespace ButcherFactory.SegmentProduction_ |
|
|
|
var barImgUrl = string.Format(IMGFILE, id + "_bar"); |
|
|
|
BwpClientPrint.BwpClientWebPrint.CreateBarCode("69212203" + entity.Goods_Code, barImgUrl, new Size(120, 40)); |
|
|
|
dic.Add("$BarImg", barImgUrl); |
|
|
|
dic.Add("$Weight", string.Format("{0:#0.##}{1}", entity.Weight, entity.MainUnit)); |
|
|
|
string unit = entity.MainUnit; |
|
|
|
int rate =1; |
|
|
|
if (unit.ToUpper() == "KG") |
|
|
|
{ |
|
|
|
rate = 1000; |
|
|
|
unit = "g"; |
|
|
|
} |
|
|
|
dic.Add("$Weight", string.Format("{0:#0.##}{1}", entity.Weight * rate, unit)); |
|
|
|
|
|
|
|
BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE + template, dic); |
|
|
|
AfterPrint(); |
|
|
|
|