- 打印订单格式调整

This commit is contained in:
gazebo
2019-04-11 09:46:58 +08:00
parent 79e6e30616
commit f4e2d403dd
3 changed files with 7 additions and 9 deletions

View File

@@ -74,7 +74,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
for _, sku := range order.Skus { for _, sku := range order.Skus {
orderFmt += `%s<BR>` orderFmt += `%s<BR>`
orderFmt += `%10s%10s%10s<BR>` orderFmt += `%8s%10s%10s<BR>`
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 += `<BR> orderFmt += `<BR>
@@ -84,7 +84,6 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
<C><L><BOLD>商品质量问题请联系:</BOLD></L><BR></C> <C><L><BOLD>商品质量问题请联系:</BOLD></L><BR></C>
<C><L><BOLD>%s:%s</BOLD></L><BR></C><BR> <C><L><BOLD>%s:%s</BOLD></L><BR></C><BR>
<BR> <BR>
官方服务热线: 18011516898<BR>
更多信息请关注官方微信: 京西菜市<BR> 更多信息请关注官方微信: 京西菜市<BR>
<BR> <BR>
<BR><BR> <BR><BR>

View File

@@ -35,8 +35,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
} }
orderFmt := ` orderFmt := `
<big> 京西菜市** <big> 京西菜市**
手机买菜上京西* 手机买菜上京西*
极速到家送惊喜* 极速到家送惊喜*
------------------------------* ------------------------------*
下单时间: %s* 下单时间: %s*
预计送达: %s* 预计送达: %s*
@@ -72,7 +72,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
} }
for _, sku := range order.Skus { for _, sku := range order.Skus {
orderFmt += `%s*` orderFmt += `%s*`
orderFmt += `%10s%10s%10s*` orderFmt += `%8s%10s%10s*`
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 += ` orderFmt += `

View File

@@ -72,16 +72,15 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
for _, sku := range order.Skus { for _, sku := range order.Skus {
orderFmt += `%s\n` orderFmt += `%s\n`
orderFmt += `%10s%10s%10s\n` orderFmt += `%8s%10s%10s\n`
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 += `\n orderFmt += `\n
<FB>共%d种%d件商品</FB> <FB>共%d种%d件商品</FB>
\n \n
--------------------------------\n --------------------------------\n
<center><FB>商品质量问题请联系:</FB></center> <center><FH2>商品质量问题请联系:</FH2></center>
<center><FB>%s:%s</FB></center>\n <center><FH2>%s:%s</FH2></center>\n
官方服务热线: 18011516898\n
更多信息请关注官方微信: 京西菜市\n 更多信息请关注官方微信: 京西菜市\n
--------------------------------\n --------------------------------\n
--------------------------------\n --------------------------------\n