打印机不打印商品价格相关

This commit is contained in:
苏尹岚
2020-06-18 11:22:55 +08:00
parent 5c88bf1298
commit 6c77f3de15
5 changed files with 27 additions and 18 deletions

View File

@@ -58,7 +58,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
<RN>
<RN>
商品明细: <RN>
品名 数量 单价 小计<RN>
品名 数量 <RN>
********************************<RN>`
// <B1>实际支付:</B1>%s<RN>
orderParams := []interface{}{
@@ -79,7 +79,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
for _, sku := range order.Skus {
orderFmt += `%s<RN>`
orderFmt += `%8s%10s%10s<RN>`
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
}
orderFmt += `<RN>
<B1>共%d种%d件商品</B1>
@@ -126,7 +127,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
<RN>
<RN>
<S2>商品明细: <RN></S2>
<S2>品名数量单价小计<RN></S2>
<S2>品名 数量<RN></S2>
********************************<RN>`
// <S2><B1>实际支付:</B1>%s<RN></S2>
orderParams := []interface{}{
@@ -147,7 +148,8 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
for _, sku := range order.Skus {
orderFmt += `<S2>%s<RN></S2>`
orderFmt += `<S2>%s %s %s<RN><RN></S2>`
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
//jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count))
}
orderFmt += `<RN>
<S2><B1>共%d种%d件商品</B1></S2>