diff --git a/business/partner/printer/xpyun/xpyun.go b/business/partner/printer/xpyun/xpyun.go index bfd094ae7..caab30d53 100644 --- a/business/partner/printer/xpyun/xpyun.go +++ b/business/partner/printer/xpyun/xpyun.go @@ -102,6 +102,7 @@ func (c *PrinterHandler) RebindPrinter(ctx *jxcontext.Context, lastBindResult *p } func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, order *model.GoodsOrder, printType string, asfOrder *model.AfsOrder) (printerStatus *partner.PrinterStatus, err error) { + globals.SugarLogger.Debugf("打印order参数:%s", utils.Format4Output(order, false)) if len(order.Skus) == 0 { globals.SugarLogger.Debugf("order.sku为空") return @@ -174,21 +175,22 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin } orderFmt += ` ` + xpyunapi.StrRepeat("-", 32) + ` -
下单时间: %s
-
预计送达: %s
-
客户姓名: %s
-
客户电话: %s
-
订单编号: %s
-
%s: #%d
+
下单时间: %s +
预计送达: %s +
客户姓名: %s +
客户电话: %s +
订单编号: %s +
%s: #%d %s" ` + getCode + ` ` + xpyunapi.StrRepeat("-", 32) + ` -客户地址: %s
+客户地址: %s ` + xpyunapi.StrRepeat("-", 32) + ` -
客户备注: %s
+
客户备注: %s +` + xpyunapi.StrRepeat("-", 32) + ` +
商品列表
+商品名` + xpyunapi.StrRepeat(" ", 2) + `数量` + xpyunapi.StrRepeat(" ", 3) + `单价` + xpyunapi.StrRepeat(" ", 5) + `小计
` + xpyunapi.StrRepeat("-", 32) + ` -
商品列表 ` + xpyunapi.StrRepeat("-", 6) + `
-商品名` + xpyunapi.StrRepeat("-", 2) + `数量` + xpyunapi.StrRepeat("-", 3) + `单价` + xpyunapi.StrRepeat("-", 5) + `小计
" ` orderParams = append(orderParams, utils.Time2Str(order.OrderCreatedAt), @@ -209,9 +211,9 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin orderFmt += ` 共%d种%d件商品
实际支付: %s元
-` + xpyunapi.StrRepeat("-", 2) + ` ` orderFmt += `

` + orderFmt += xpyunapi.StrRepeat("-", 14) + "#23完" + xpyunapi.StrRepeat("-", 14) orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice)) return fmt.Sprintf(orderFmt, orderParams...) }