1
This commit is contained in:
@@ -44,7 +44,7 @@ func (s *DefScheduler) OnAfsOrderNew(order *model.AfsOrder, isPending bool) (err
|
|||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, orderObj, model.PrintTypeOrder)
|
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, orderObj, model.PrintAfsOrder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -313,6 +313,7 @@ const (
|
|||||||
PrintTypeWayBill = "wayBill " // 京西云打印机:打印运单
|
PrintTypeWayBill = "wayBill " // 京西云打印机:打印运单
|
||||||
PrintTypeStore = "store " // 京西云打印机:门店下线
|
PrintTypeStore = "store " // 京西云打印机:门店下线
|
||||||
PrintTypeEnter = "enter" // 京西云打印机:进店订单
|
PrintTypeEnter = "enter" // 京西云打印机:进店订单
|
||||||
|
PrintAfsOrder = "afs" // 京西云打印机:售后
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -258,14 +258,16 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
|||||||
//}
|
//}
|
||||||
printData[AppID] = "1000" // 菜市应用
|
printData[AppID] = "1000" // 菜市应用
|
||||||
switch printType {
|
switch printType {
|
||||||
case "order":
|
case "order": // 订单状态
|
||||||
printData[OrderStatus] = utils.Int2Str(order.Status) // 订单状态
|
printData[OrderStatus] = utils.Int2Str(order.Status)
|
||||||
case "wayBill":
|
case "wayBill": // 运单状态
|
||||||
printData[WayBillStatus] = order.VendorStatus // 运单状态
|
printData[WayBillStatus] = order.VendorStatus
|
||||||
case "store":
|
case "store": // 门店状态
|
||||||
printData[StoreStatus] = utils.Int2Str(store.Status) // 门店状态
|
printData[StoreStatus] = utils.Int2Str(store.Status)
|
||||||
case "enter":
|
case "enter": // 催单
|
||||||
printData[ReminderStatus] = "1" // 催单
|
printData[ReminderStatus] = "1"
|
||||||
|
case "afs": // 售后
|
||||||
|
printData[OrderStatus] = utils.Int2Str(130)
|
||||||
}
|
}
|
||||||
orderPrint, err := json.Marshal(printData)
|
orderPrint, err := json.Marshal(printData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -276,6 +278,10 @@ func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store,
|
|||||||
return c.PrintMsg(ctx, store.PrinterSN, orderSel, "", string(orderPrint))
|
return c.PrintMsg(ctx, store.PrinterSN, orderSel, "", 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) {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// PrintStore 打印门店
|
// PrintStore 打印门店
|
||||||
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, vendorCode int) (printerStatus *partner.PrinterStatus, err error) {
|
func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store, storeDetail *dao.StoreDetail, vendorCode int) (printerStatus *partner.PrinterStatus, err error) {
|
||||||
data := make(map[string]interface{}, 0)
|
data := make(map[string]interface{}, 0)
|
||||||
@@ -290,10 +296,6 @@ func (c *PrinterHandler) PrintStore(ctx *jxcontext.Context, store *model.Store,
|
|||||||
return c.PrintMsg(ctx, store.PrinterSN, "99999", "", string(orderPrint))
|
return c.PrintMsg(ctx, store.PrinterSN, "99999", "", 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) {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *PrinterHandler) EmptyPrintList(ctx *jxcontext.Context, id1, id2 string) (err error) {
|
func (c *PrinterHandler) EmptyPrintList(ctx *jxcontext.Context, id1, id2 string) (err error) {
|
||||||
if globals.EnableStoreWrite {
|
if globals.EnableStoreWrite {
|
||||||
err = api.JxPrintAPI.DelPrinterSeq(id1)
|
err = api.JxPrintAPI.DelPrinterSeq(id1)
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ const (
|
|||||||
WayBillStatus = "wayBillStatus" // 运单状态
|
WayBillStatus = "wayBillStatus" // 运单状态
|
||||||
StoreStatus = "storeStatus" // 门店状态
|
StoreStatus = "storeStatus" // 门店状态
|
||||||
ReminderStatus = "reminderStatus" // 催单状态
|
ReminderStatus = "reminderStatus" // 催单状态
|
||||||
|
AfsOrderStatus = "afsOrderStatus" // 售后
|
||||||
|
|
||||||
RiderVendorId = "riderVendorId" // 骑手所属平台id
|
RiderVendorId = "riderVendorId" // 骑手所属平台id
|
||||||
RiderName = "riderName" // 骑手名称
|
RiderName = "riderName" // 骑手名称
|
||||||
|
|||||||
Reference in New Issue
Block a user