diff --git a/business/partner/printer/xpyun/xpyun.go b/business/partner/printer/xpyun/xpyun.go
index caab30d53..b2bf825ea 100644
--- a/business/partner/printer/xpyun/xpyun.go
+++ b/business/partner/printer/xpyun/xpyun.go
@@ -161,11 +161,14 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
if order.VendorID == model.VendorIDEBAI {
getCode = fmt.Sprintf("饿百取货码:%s", jxutils.GetEbaiOrderGetCode(order))
}
+ if order.BuyerComment == "" {
+ order.BuyerComment = "客户电话: " + order.ConsigneeMobile + ",配送遇到问题,可联系18048531223取消配送单,禁止未配送直接完成订单!"
+ }
orderParams := []interface{}{}
orderFmt := ``
if storeDetail != nil {
if storeDetail.BrandIsPrint == model.NO {
- orderFmt += `
%s\n`
+ orderFmt += `%s`
if order.VendorOrgCode == "34665" {
orderParams = append(orderParams, globals.StoreNameEbai2)
} else {
@@ -175,21 +178,20 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
}
orderFmt += `
` + xpyunapi.StrRepeat("-", 32) + `
-
下单时间: %s
-
预计送达: %s
-
客户姓名: %s
-
客户电话: %s
-
订单编号: %s
-![]()
%s: #%d
-%s"
-` + getCode + `
-` + xpyunapi.StrRepeat("-", 32) + `
+下单时间: %s
+预计送达: %s
+客户姓名: %s
+客户电话: %s
+订单编号: %s
+%s#%d
+%s
+` + getCode +
+ xpyunapi.StrRepeat("-", 32) + `
客户地址: %s
+` + xpyunapi.StrRepeat("-", 32) + `客户备注: %s
` + xpyunapi.StrRepeat("-", 32) + `
-
客户备注: %s
-` + xpyunapi.StrRepeat("-", 32) + `
-
商品列表
-商品名` + xpyunapi.StrRepeat(" ", 2) + `数量` + xpyunapi.StrRepeat(" ", 3) + `单价` + xpyunapi.StrRepeat(" ", 5) + `小计
+商品列表
+商品名` + xpyunapi.StrRepeat(" ", 2) + `数量` + xpyunapi.StrRepeat(" ", 3) + `单价` + xpyunapi.StrRepeat(" ", 5) + `小计
` + xpyunapi.StrRepeat("-", 32) + `
`
orderParams = append(orderParams,
@@ -209,14 +211,16 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
orderFmt += xpyunapi.FormatPrintOrderItem(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.SalePrice))
}
orderFmt += `
-共%d种%d件商品
-实际支付: %s元
+共%d种%d件商品
+实际支付: %s
`
- orderFmt += `
`
- orderFmt += xpyunapi.StrRepeat("-", 14) + "#23完" + xpyunapi.StrRepeat("-", 14)
- orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice))
+ orderFmt += `
`
+ orderFmt += xpyunapi.StrRepeat("-", 14) + "#%d完" + xpyunapi.StrRepeat("-", 14)
+ orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), order.OrderSeq)
return fmt.Sprintf(orderFmt, orderParams...)
}
+
+//todo 待修改
func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel string, storeDetail *dao.StoreDetail) (content string) {
expectedDeliveryTime := order.ExpectedDeliveredTime
if utils.IsTimeZero(expectedDeliveryTime) {
@@ -226,11 +230,14 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
if order.VendorID == model.VendorIDEBAI {
getCode = fmt.Sprintf("饿百取货码:%s", jxutils.GetEbaiOrderGetCode(order))
}
+ if order.BuyerComment == "" {
+ order.BuyerComment = "客户电话: " + order.ConsigneeMobile + ",配送遇到问题,可联系18048531223取消配送单,禁止未配送直接完成订单!"
+ }
orderParams := []interface{}{}
orderFmt := ``
if storeDetail != nil {
if storeDetail.BrandIsPrint == model.NO {
- orderFmt += `
%s\n`
+ orderFmt += `%s`
if order.VendorOrgCode == "34665" {
orderParams = append(orderParams, globals.StoreNameEbai2)
} else {
@@ -240,21 +247,21 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
}
orderFmt += `
` + xpyunapi.StrRepeat("-", 32) + `
-
下单时间: %s
-
预计送达: %s
-
客户姓名: %s
-
客户电话: %s
-
订单编号: %s
-![]()
%s: #%d
-%s"
-` + getCode + `
+下单时间: %s
+预计送达: %s
+客户姓名: %s
+客户电话: %s
+订单编号: %s
+%s#%d
+%s
+` + getCode +
+ xpyunapi.StrRepeat("-", 32) + `
+客户地址: %s
+` + xpyunapi.StrRepeat("-", 32) + `客户备注: %s
` + xpyunapi.StrRepeat("-", 32) + `
-客户地址: %s
-` + xpyunapi.StrRepeat("-", 32) + `
-
客户备注: %s
-` + xpyunapi.StrRepeat("-", 32) + `
-
商品列表 ` + xpyunapi.StrRepeat("-", 6) + `
-商品名` + xpyunapi.StrRepeat("-", 2) + `数量` + xpyunapi.StrRepeat("-", 3) + `单价` + xpyunapi.StrRepeat("-", 5) + `小计
"
+商品列表
+商品名` + xpyunapi.StrRepeat(" ", 2) + `数量` + xpyunapi.StrRepeat(" ", 3) + `单价` + xpyunapi.StrRepeat(" ", 5) + `小计
+` + xpyunapi.StrRepeat("-", 32) + "" + `
`
orderParams = append(orderParams,
utils.Time2Str(order.OrderCreatedAt),
@@ -272,12 +279,11 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
for _, sku := range order.Skus {
orderFmt += xpyunapi.FormatPrintOrderItem(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.SalePrice))
}
- orderFmt += `
-共%d种%d件商品
-实际支付: %s元
-` + xpyunapi.StrRepeat("-", 2) + `
+ orderFmt += `共%d种%d件商品
+实际支付: %s
`
- orderFmt += `
`
- orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice))
+ orderFmt += `
`
+ orderFmt += xpyunapi.StrRepeat("-", 14) + "#%d完" + xpyunapi.StrRepeat("-", 14)
+ orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), order.OrderSeq)
return fmt.Sprintf(orderFmt, orderParams...)
}