1
This commit is contained in:
@@ -40,13 +40,13 @@ func PrintOrder(ctx *jxcontext.Context, vendorOrderID string, vendorID int) (pri
|
||||
order.StoreID = storeID
|
||||
order.JxStoreID = storeID
|
||||
}
|
||||
printResult, err = PrintOrderByOrder(ctx, order)
|
||||
printResult, err = PrintOrderByOrder(ctx, order, "")
|
||||
}
|
||||
return printResult, err
|
||||
}
|
||||
|
||||
func PrintOrderByOrder(ctx *jxcontext.Context, order *model.GoodsOrder) (printResult *partner.PrinterStatus, err error) {
|
||||
return PrintOrderByOrder4Store(ctx, order, jxutils.GetSaleStoreIDFromOrder(order))
|
||||
func PrintOrderByOrder(ctx *jxcontext.Context, order *model.GoodsOrder, printType string) (printResult *partner.PrinterStatus, err error) {
|
||||
return PrintOrderByOrder4Store(ctx, order, jxutils.GetSaleStoreIDFromOrder(order), printType)
|
||||
}
|
||||
|
||||
func getStore4Print(db *dao.DaoDB, storeID int) (store *model.Store, err error) {
|
||||
@@ -71,7 +71,7 @@ func getStore4Print(db *dao.DaoDB, storeID int) (store *model.Store, err error)
|
||||
}
|
||||
|
||||
// PrintOrderByOrder4Store 打印订单信息
|
||||
func PrintOrderByOrder4Store(ctx *jxcontext.Context, order *model.GoodsOrder, storeID int) (printResult *partner.PrinterStatus, err error) {
|
||||
func PrintOrderByOrder4Store(ctx *jxcontext.Context, order *model.GoodsOrder, storeID int, printType string) (printResult *partner.PrinterStatus, err error) {
|
||||
globals.SugarLogger.Debugf("PrintOrderByOrder4Store orderID:%s", order.VendorOrderID)
|
||||
db := dao.GetDB()
|
||||
store, err := getStore4Print(db, storeID)
|
||||
@@ -89,9 +89,8 @@ func PrintOrderByOrder4Store(ctx *jxcontext.Context, order *model.GoodsOrder, st
|
||||
BrandIsPrint: model.NO,
|
||||
}
|
||||
}
|
||||
bill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
||||
|
||||
printResult, err = handler.PrintOrder(ctx, store, storeDetail, order)
|
||||
printResult, err = handler.PrintOrder(ctx, store, storeDetail, order, printType)
|
||||
if err == nil {
|
||||
dao.SetOrderPrintFlag(db, ctx.GetUserName(), order.VendorOrderID, order.VendorID, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user