This commit is contained in:
邹宗楠
2024-09-24 17:00:58 +08:00
parent 7ef8a91fd3
commit b23c7bea37
7 changed files with 12 additions and 18 deletions

View File

@@ -138,16 +138,10 @@ func SendMsgToStore(storeID int, templateID, downloadURL, miniPageURL string, da
openIDs := GetWeixinOpenIDsFromStoreID(storeID)
successCount := 0
for _, openID := range openIDs {
if storeID == 668202 {
globals.SugarLogger.Debugf("--------:openId := %s", openID)
}
realMiniPageURL := miniPageURL
if err2 := SmartMessageTemplateSend(openID, templateID, downloadURL, realMiniPageURL, data); err2 == nil {
successCount++
} else {
if storeID == 668202 {
globals.SugarLogger.Debugf("-----------SendMsgToStore:err := %v", err2)
}
err = err2
}
}

View File

@@ -99,7 +99,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
for _, sku := range order.Skus {
orderFmt += `%s<BR>`
orderFmt += `%8s%10s%10s<BR>`
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
//标品需要打印条形码
if sku.Upc != "" {
orderFmt += `upc码 %s<BR>`
@@ -186,7 +186,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
for _, sku := range order.Skus {
orderFmt += `<B>%s<BR></B>`
orderFmt += `<B>%s %s %s<BR><BR></B>`
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
//标品需要打印条形码
if sku.Upc != "" {
orderFmt += `upc码 %s<BR>`

View File

@@ -102,8 +102,8 @@ func ManagerOrderPrint(order *model.GoodsOrder, storeTel string, storeDetail *da
skuList = append(skuList, &SkuListPrintOrder{
SkuName: sku.SkuName,
SkuCount: "X" + utils.Int2Str(sku.Count),
SalePrice: jxutils.IntPrice2StandardCurrencyString(sku.SalePrice),
TotalCountPrice: jxutils.IntPrice2StandardCurrencyString(sku.SalePrice * int64(sku.Count)),
SalePrice: jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice),
TotalCountPrice: jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice * int64(sku.Count)),
Upc: sku.Upc,
})
}

View File

@@ -361,7 +361,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
)
for _, sku := range order.Skus {
orderFmt += trenditapi.FormatPrintOrderItem(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.SalePrice))
orderFmt += trenditapi.FormatPrintOrderItem(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.VendorPrice))
}
orderFmt += `
<LEFT>共%d种%d件商品
@@ -430,7 +430,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
)
for k, sku := range order.Skus {
orderFmt += trenditapi.FormatPrintOrderItemBig(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.SalePrice))
orderFmt += trenditapi.FormatPrintOrderItemBig(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.VendorPrice))
if k != len(order.Skus) {
orderFmt += `<BR>`
}

View File

@@ -83,7 +83,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
for _, sku := range order.Skus {
orderFmt += `%s*`
orderFmt += `%8s%10s%10s*`
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
}
orderFmt += `
*
@@ -156,7 +156,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
for _, sku := range order.Skus {
orderFmt += `<big>%s*`
orderFmt += `<big>%s %s %s*`
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
}
orderFmt += `
<big>共%d种%d件商品*

View File

@@ -353,7 +353,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
)
for _, sku := range order.Skus {
orderFmt += xpyunapi.FormatPrintOrderItem(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.SalePrice))
orderFmt += xpyunapi.FormatPrintOrderItem(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.VendorPrice))
}
orderFmt += `
<L>共%d种%d件商品</L>
@@ -422,7 +422,7 @@ 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 += xpyunapi.FormatPrintOrderItem(sku.SkuName, sku.Count, utils.Int64ToFloat64(sku.VendorPrice))
}
orderFmt += `<L>共%d种%d件商品</L>
<L>实际支付: %s</L>

View File

@@ -95,7 +95,7 @@ func (c *PrinterHandler) getOrderContent(order *model.GoodsOrder, storeTel strin
//orderFmt += `%8s%10s%10s\n`
orderFmt += `<FH>%20s%8s</FH>\n`
//orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
//标品需要打印条形码
if sku.Upc != "" {
orderFmt += `upc码 %s\n`
@@ -176,7 +176,7 @@ func (c *PrinterHandler) getOrderContentBig(order *model.GoodsOrder, storeTel st
//orderFmt += `<FS2>%s %s %s\n\n</FS2>`
orderFmt += `<FS><FB>%15s%8s</FB>\n</FS>`
//orderParams = append(orderParams, sku.SkuName, "x"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.SalePrice*int64(sku.Count)))
orderParams = append(orderParams, sku.SkuName, "X"+utils.Int2Str(sku.Count), jxutils.IntPrice2StandardCurrencyString(sku.VendorPrice*int64(sku.Count)))
//标品需要打印条形码
if sku.Upc != "" {
orderFmt += `<FS>upc码 %s\n</FS>`