1
This commit is contained in:
@@ -80,18 +80,18 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
\n
|
||||
\n
|
||||
商品明细: \n`
|
||||
points := `
|
||||
orderFmt += `
|
||||
品名 数量 小计\n
|
||||
--------------------------------\n`
|
||||
quote := `
|
||||
品名 数量 \n
|
||||
--------------------------------\n`
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += points
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += quote
|
||||
}
|
||||
// quote := `
|
||||
//品名 数量 \n
|
||||
//--------------------------------\n`
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += points
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += quote
|
||||
//}
|
||||
orderParams = append(orderParams,
|
||||
jxutils.GetVendorName(order.VendorID),
|
||||
order.OrderSeq,
|
||||
@@ -107,15 +107,17 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
)
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += `<FH>%s</FH>\n`
|
||||
orderFmt += `<FH>%20s%8s</FH>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += `<FH>%s%25s</FH>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
}
|
||||
orderFmt += `<FH><LR>%s,%s</LR></FH>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += `<FH>%s</FH>\n`
|
||||
// orderFmt += `<FH>%20s%8s</FH>\n`
|
||||
// orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += `<FH>%s%25s</FH>\n`
|
||||
// orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
//}
|
||||
|
||||
//标品需要打印条形码
|
||||
if sku.Upc != "" {
|
||||
@@ -188,17 +190,14 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
\n
|
||||
<FS>商品明细: \n</FS>`
|
||||
|
||||
points := `品名 数量 小计\n
|
||||
orderFmt += `品名 小计\n
|
||||
--------------------------------\n`
|
||||
|
||||
quote := `品名 小计\n
|
||||
--------------------------------\n`
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += points
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += quote
|
||||
}
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += points
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += quote
|
||||
//}
|
||||
|
||||
orderParams = append(orderParams,
|
||||
jxutils.GetVendorName(order.VendorID),
|
||||
@@ -215,15 +214,17 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
)
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += `<FH2>%s\n</FH2>`
|
||||
orderFmt += `<FS><FB>%15s%8s</FB>\n</FS>`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += `<FH2>%s%25s\n</FH2>`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count))
|
||||
}
|
||||
orderFmt += `<FH2><LR>%s,%s</LR></FH2>\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count))
|
||||
//switch order.EarningType {
|
||||
//case model.EarningTypePoints: // 扣点
|
||||
// orderFmt += `<FH2>%s\n</FH2>`
|
||||
// orderFmt += `<FS><FB>%15s%8s</FB>\n</FS>`
|
||||
// orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
//case model.EarningTypeQuote: // 报价
|
||||
// orderFmt += `<FH2>%s%25s\n</FH2>`
|
||||
// orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count))
|
||||
//}
|
||||
|
||||
//标品需要打印条形码
|
||||
if sku.Upc != "" {
|
||||
|
||||
Reference in New Issue
Block a user