This commit is contained in:
邹宗楠
2026-03-06 16:07:37 +08:00
parent 31e92ff4f0
commit c075f733a3
2 changed files with 12 additions and 8 deletions

View File

@@ -1729,6 +1729,9 @@ func GetMatterStoreOrderCount(ctx *jxcontext.Context, storeID int) (result *Orde
flag = false flag = false
} }
orderTime = *orderPay.PayFinishedAt orderTime = *orderPay.PayFinishedAt
if time.Now().Sub(orderTime) > 30*24*time.Hour {
orderTime = time.Now().AddDate(0, -1, 0)
}
} else { } else {
orderTime = time.Now().AddDate(0, -1, 0) orderTime = time.Now().AddDate(0, -1, 0)
flag = true flag = true

View File

@@ -29,6 +29,7 @@ func init() {
partner.RegisterPrinterPlatform(CurPrinterHandler) partner.RegisterPrinterPlatform(CurPrinterHandler)
} }
// getOrderContent 添加了BOLD 标签
func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel string, storeDetail *dao.StoreDetail) (content string) { func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel string, storeDetail *dao.StoreDetail) (content string) {
expectedDeliveryTime := order.ExpectedDeliveredTime expectedDeliveryTime := order.ExpectedDeliveredTime
if utils.IsTimeZero(expectedDeliveryTime) { if utils.IsTimeZero(expectedDeliveryTime) {
@@ -54,9 +55,9 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
<CB>%s#%d</CB><BR> <CB>%s#%d</CB><BR>
<C><BOLD>%s:%s</BOLD></C><BR> <C><BOLD>%s:%s</BOLD></C><BR>
--------------------------------<BR> --------------------------------<BR>
下单时间: %s<BR> <BOLD>下单时间: %s</BOLD><BR>
预计送达: %s<BR> <BOLD>预计送达: %s</BOLD><BR>
订单编号: %s<BR> <BOLD>订单编号: %s</BOLD><BR>
` `
if order.BusinessType == model.BusinessTypeDingshida { if order.BusinessType == model.BusinessTypeDingshida {
orderFmt += ` orderFmt += `
@@ -71,8 +72,8 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
<QR>%s</QR><BR> <QR>%s</QR><BR>
` + getCode + ` + getCode +
`客户: %s<BR> `客户: %s<BR>
电话: %s<BR> <BOLD>电话: %s</BOLD><BR>
地址: %s<BR> <BOLD>地址: %s</BOLD><BR>
<BR> <BR>
客户备注: <BR> 客户备注: <BR>
<BOLD>%s</BOLD><BR> <BOLD>%s</BOLD><BR>
@@ -98,7 +99,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
order.BuyerComment, order.BuyerComment,
// jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice), // jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
) )
//switch order.EarningType { //switch order.EarningType { z
//case model.EarningTypePoints: // 扣点 //case model.EarningTypePoints: // 扣点
// orderFmt += pricePoints // orderFmt += pricePoints
//case model.EarningTypeQuote: // 报价 //case model.EarningTypeQuote: // 报价
@@ -107,9 +108,9 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
for _, sku := range order.Skus { for _, sku := range order.Skus {
if sku.Count > 1 { if sku.Count > 1 {
orderFmt += `%s <RIGHT><BOLD>%s</BOLD></RIGHT><BR>` orderFmt += `<BOLD>%s <RIGHT>%s</RIGHT></BOLD><BR>`
} else { } else {
orderFmt += `%s <RIGHT>%s</RIGHT><BR>` orderFmt += `<BOLD>%s <RIGHT>%s</RIGHT></BOLD><BR>`
} }
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count)) orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count))
//switch order.EarningType { //switch order.EarningType {