京西打印
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package jxprint
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/jxprintapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -243,17 +244,23 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
||||
if len(order.Skus) == 0 {
|
||||
return
|
||||
}
|
||||
content := ""
|
||||
if store.PrinterFontSize == partner.PrinterFontSizeBig {
|
||||
//content = c.getOrderContentBig(order, store.Tel1, storeDetail)
|
||||
} else {
|
||||
if storeDetail.PrinterTemplate != "" {
|
||||
content = c.getOrderContentByTemplate(order, store.Tel1, storeDetail)
|
||||
} else {
|
||||
content = c.getOrderContent(order, store.Tel1, storeDetail)
|
||||
}
|
||||
printData := ManagerOrderAndStore(order, store.Tel1, storeDetail)
|
||||
printData[BigFont] = false
|
||||
if store.PrinterFontSize == partner.PrinterFontSizeBig || store.PrinterFontSize == partner.PrinterFontSizeBig2 {
|
||||
printData[BigFont] = true
|
||||
}
|
||||
return c.PrintMsg(ctx, store.PrinterSN, utils.Int2Str(order.OrderSeq), order.VendorOrderID, content)
|
||||
// 打印次数
|
||||
printData[PrintNumber] = 1
|
||||
if store.PrinterFontSize == partner.PrinterFontSizeBig2 || store.PrinterFontSize == partner.PrinterFontSizeNormal2 {
|
||||
printData[PrintNumber] = 2
|
||||
}
|
||||
|
||||
orderPrint, err := json.Marshal(printData)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return c.PrintMsg(ctx, store.PrinterSN, utils.Int2Str(order.OrderSeq), order.VendorOrderID, string(orderPrint))
|
||||
}
|
||||
|
||||
func (c *PrinterHandler) PrintCancelOrRefundOrder(ctx *jxcontext.Context, printType int, store *model.Store, storeDetail *dao.StoreDetail, order *model.GoodsOrder) (printerStatus *partner.PrinterStatus, err error) {
|
||||
|
||||
Reference in New Issue
Block a user