添加商品种金额打印
This commit is contained in:
@@ -78,7 +78,6 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
商品明细: \n
|
商品明细: \n
|
||||||
品名 数量 小计\n
|
品名 数量 小计\n
|
||||||
--------------------------------\n`
|
--------------------------------\n`
|
||||||
// <FB>实际支付:</FB>%s\n
|
|
||||||
orderParams = append(orderParams,
|
orderParams = append(orderParams,
|
||||||
utils.Time2Str(order.OrderCreatedAt),
|
utils.Time2Str(order.OrderCreatedAt),
|
||||||
utils.Time2Str(expectedDeliveryTime),
|
utils.Time2Str(expectedDeliveryTime),
|
||||||
@@ -90,7 +89,6 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
order.ConsigneeMobile,
|
order.ConsigneeMobile,
|
||||||
order.ConsigneeAddress,
|
order.ConsigneeAddress,
|
||||||
order.BuyerComment,
|
order.BuyerComment,
|
||||||
// jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
@@ -106,8 +104,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
orderFmt += `\n
|
orderFmt += `\n
|
||||||
<FB>共%d种%d件商品</FB>
|
<FB>共%d种%d件商品</FB>\n
|
||||||
\n
|
<FB>实际支付:</FB>%s\n
|
||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
<center><FH2>商品质量问题请联系:</FH2></center>
|
<center><FH2>商品质量问题请联系:</FH2></center>
|
||||||
<center><FH2>%s:%s</FH2></center>\n
|
<center><FH2>%s:%s</FH2></center>\n
|
||||||
@@ -116,7 +114,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
|
|||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
`
|
`
|
||||||
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
||||||
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, order.StoreName, storeTel, globals.StoreName)
|
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), order.StoreName, storeTel, globals.StoreName)
|
||||||
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +160,6 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
<FS>商品明细: \n</FS>
|
<FS>商品明细: \n</FS>
|
||||||
品名 数量 小计\n
|
品名 数量 小计\n
|
||||||
--------------------------------\n`
|
--------------------------------\n`
|
||||||
// <FS2><FB>实际支付:</FB>%s\n</FS2>
|
|
||||||
orderParams = append(orderParams,
|
orderParams = append(orderParams,
|
||||||
utils.Time2Str(order.OrderCreatedAt),
|
utils.Time2Str(order.OrderCreatedAt),
|
||||||
utils.Time2Str(expectedDeliveryTime),
|
utils.Time2Str(expectedDeliveryTime),
|
||||||
@@ -174,7 +171,6 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
order.ConsigneeMobile,
|
order.ConsigneeMobile,
|
||||||
order.ConsigneeAddress,
|
order.ConsigneeAddress,
|
||||||
order.BuyerComment,
|
order.BuyerComment,
|
||||||
// jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
@@ -190,8 +186,8 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
orderFmt += `\n
|
orderFmt += `\n
|
||||||
<FS><FB>共%d种%d件商品</FB></FS>
|
<FS><FB>共%d种%d件商品</FB></FS>\n
|
||||||
\n
|
<FS2><FB>实际支付:</FB>%s\n</FS2>
|
||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
<center><FH2>商品质量问题请联系:</FH2></center>\n
|
<center><FH2>商品质量问题请联系:</FH2></center>\n
|
||||||
<center><FH2>%s:%s</FH2></center>\n
|
<center><FH2>%s:%s</FH2></center>\n
|
||||||
@@ -200,7 +196,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
|
|||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
`
|
`
|
||||||
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
||||||
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, order.StoreName, storeTel, globals.StoreName)
|
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), order.StoreName, storeTel, globals.StoreName)
|
||||||
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,14 +271,13 @@ func (c *PrinterHandler) getCancelOrRefundOrderContent(order *model.GoodsOrder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
orderFmt += `\n
|
orderFmt += `\n
|
||||||
<FB>共%d种%d件商品</FB>
|
<FB>共%d种%d件商品</FB>\n
|
||||||
\n
|
<FB>实际支付:%s</FB>\n
|
||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
`
|
`
|
||||||
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
||||||
orderParams = append(orderParams, order.SkuCount, order.GoodsCount)
|
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice))
|
||||||
globals.SugarLogger.Debug("string=========================", strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1))
|
|
||||||
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,14 +347,13 @@ func (c *PrinterHandler) getCancelOrRefundOrderContentBig(order *model.GoodsOrde
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
orderFmt += `\n
|
orderFmt += `\n
|
||||||
<FS><FB>共%d种%d件商品</FB></FS>
|
<FS><FB>共%d种%d件商品</FB></FS>\n
|
||||||
\n
|
<FS2><FB>实际支付:</FB>%s\n</FS2>\n
|
||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
--------------------------------\n
|
--------------------------------\n
|
||||||
`
|
`
|
||||||
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
// <QR>http://weixin.qq.com/r/tkkDGzTERmk5rXB49xyk</QR>
|
||||||
orderParams = append(orderParams, order.SkuCount, order.GoodsCount)
|
orderParams = append(orderParams, order.SkuCount, order.GoodsCount, jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice))
|
||||||
globals.SugarLogger.Debug("string=========================", strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1))
|
|
||||||
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
return strings.Replace(fmt.Sprintf(strings.Replace(orderFmt, "\n", "", -1), orderParams...), "\\n", "\r\n", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user