1
This commit is contained in:
@@ -62,7 +62,11 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
客户备注: *
|
||||
<big>%s*
|
||||
商品明细: *
|
||||
品名 数量 单价 小计
|
||||
`
|
||||
priceQuote := `品名 数量
|
||||
--------------------------------*
|
||||
`
|
||||
pricePoints := `品名 数量 单价 小计
|
||||
--------------------------------*
|
||||
`
|
||||
// <S011>实际支付: %s*
|
||||
@@ -80,10 +84,24 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
buyerComment,
|
||||
// jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
|
||||
}
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += pricePoints
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += priceQuote
|
||||
}
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `%s*`
|
||||
orderFmt += `%8s%10s%10s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += `%s*`
|
||||
orderFmt += `%8s%10s%10s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += `%s %25s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
}
|
||||
|
||||
}
|
||||
orderFmt += `
|
||||
*
|
||||
@@ -154,9 +172,15 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
||||
// jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
|
||||
}
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `<big>%s*`
|
||||
orderFmt += `<big>%s %s %s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
orderFmt += `<big>%s*`
|
||||
orderFmt += `<big>%s %s %s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderFmt += `<big>%s %s*`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
|
||||
}
|
||||
}
|
||||
orderFmt += `
|
||||
<big>共%d种%d件商品*
|
||||
|
||||
Reference in New Issue
Block a user