31 lines
637 B
JavaScript
31 lines
637 B
JavaScript
import * as Api from '@/http/yskApi/Instead.js'
|
|
import go from '@/commons/utils/go.js'
|
|
//打印订单
|
|
export function printOrder(tableId) {
|
|
return new Promise((resolve, reject) => {
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '确定要打印订单吗?',
|
|
success(res) {
|
|
if (res.confirm) {
|
|
Api.$printOrder({
|
|
tableId
|
|
}).then(res => {
|
|
resolve(res)
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
}
|
|
//去支付页面
|
|
export function toPay(options) {
|
|
go.to('PAGES_CRESATE_ORDER_PAY', {
|
|
tableId: options.tableId,
|
|
tableName: options.name,
|
|
masterId: options.masterId,
|
|
orderId: orderDetail.info.id,
|
|
discount: 1
|
|
})
|
|
} |