You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
748 B
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/utils/request.js'
// 获取打印小票模板(无自定义配置时返回默认模板)
export const getPrintTemplate = (params = {}) => {
return request({
tag: 'pad.print',
path: '/template',
method: 'GET',
query: params
})
}
// 按当前模板打印小票
export const printTicket = (params = {}) => {
return request({
tag: 'pad.print',
path: '/ticket',
method: 'POST',
body: params
})
}
// 保存打印小票模板POST + body签名参数与其他 POST 接口一致)
export const savePrintTemplate = (params = {}) => {
const body = JSON.parse(JSON.stringify(params))
return request({
tag: 'pad.print',
path: '/template',
method: 'POST',
body
})
}