- 易联云打印格式完成
This commit is contained in:
@@ -33,7 +33,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
expectedDeliveryTime = order.OrderCreatedAt.Add(1 * time.Hour)
|
||||
}
|
||||
orderFmt := `
|
||||
<CB>京西菜市</CB><BR>
|
||||
<CB>京西菜市</CB><BR><BR>
|
||||
<C>手机买菜上京西</C><BR>
|
||||
<C>极速到家送惊喜</C><BR>
|
||||
--------------------------------<BR>
|
||||
|
||||
@@ -33,31 +33,31 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
expectedDeliveryTime = order.OrderCreatedAt.Add(1 * time.Hour)
|
||||
}
|
||||
orderFmt := `
|
||||
<CB>京西菜市</CB><BR>
|
||||
<C>手机买菜上京西</C><BR>
|
||||
<C>极速到家送惊喜</C><BR>
|
||||
--------------------------------<BR>
|
||||
下单时间: %s<BR>
|
||||
预计送达: %s<BR>
|
||||
订单编号: %s<BR>
|
||||
<BR>
|
||||
<FS2><center>京西菜市</center></FS2>\n\n
|
||||
<center>手机买菜上京西</center>\n
|
||||
<center>极速到家送惊喜</center>\n
|
||||
--------------------------------\n
|
||||
下单时间: %s\n
|
||||
预计送达: %s\n
|
||||
订单编号: %s\n
|
||||
\n
|
||||
|
||||
<B>%s#%d</B><BR><BR>
|
||||
<FS2>%s#%d</FS2>\n\n
|
||||
<QR>%s</QR>
|
||||
<BR>
|
||||
客户: %s<BR>
|
||||
电话: %s<BR>
|
||||
地址: %s<BR>
|
||||
<BR>
|
||||
客户备注: <BR>
|
||||
<B>%s</B><BR>
|
||||
<BR>
|
||||
\n
|
||||
客户: %s\n
|
||||
电话: %s\n
|
||||
地址: %s\n
|
||||
\n
|
||||
客户备注: \n
|
||||
<FS2>%s</FS2>\n
|
||||
\n
|
||||
|
||||
<BOLD>实际支付:</BOLD>%s<BR>
|
||||
<BR>
|
||||
商品明细: <BR>
|
||||
品名 数量 单价 小计<BR>
|
||||
--------------------------------<BR>`
|
||||
<FB>实际支付:</FB>%s\n
|
||||
\n
|
||||
商品明细: \n
|
||||
品名 数量 单价 小计\n
|
||||
--------------------------------\n`
|
||||
orderParams := []interface{}{
|
||||
utils.Time2Str(order.OrderCreatedAt),
|
||||
utils.Time2Str(expectedDeliveryTime),
|
||||
@@ -73,24 +73,24 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
||||
}
|
||||
|
||||
for _, sku := range order.Skus {
|
||||
orderFmt += `%s<BR>`
|
||||
orderFmt += `%10s%10s%10s<BR>`
|
||||
orderFmt += `%s\n`
|
||||
orderFmt += `%10s%10s%10s\n`
|
||||
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
|
||||
}
|
||||
orderFmt += `<BR>
|
||||
<BOLD>共%d种%d件商品</BOLD>
|
||||
<BR>
|
||||
--------------------------------<BR>
|
||||
<C><L><BOLD>商品质量问题请联系:</BOLD></L><BR></C>
|
||||
<C><L><BOLD>%s:%s</BOLD></L><BR></C><BR>
|
||||
<BR>
|
||||
官方服务热线: 18011516898<BR>
|
||||
更多信息请关注官方微信: 京西菜市<BR>
|
||||
<BR>
|
||||
<BR><BR>
|
||||
--------------------------------<BR>
|
||||
--------------------------------<BR>
|
||||
<BR><BR>
|
||||
orderFmt += `\n
|
||||
<FB>共%d种%d件商品</FB>
|
||||
\n
|
||||
--------------------------------\n
|
||||
<center<FB>商品质量问题请联系:</FB>\n</center>
|
||||
<center><FB>%s:%s</FB>\n</center>\n
|
||||
\n
|
||||
官方服务热线: 18011516898\n
|
||||
更多信息请关注官方微信: 京西菜市\n
|
||||
\n
|
||||
\n\n
|
||||
--------------------------------\n
|
||||
--------------------------------\n
|
||||
\n\n
|
||||
`
|
||||
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
||||
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, order.StoreName, storeTel)
|
||||
|
||||
Reference in New Issue
Block a user