import http from '@/utils/request'

export function addTicketPrintModel (params) {
  return http.post('/admin/ticketPrintTemplate/add', { data: params })
}

export function deleteTicketPrintModel (id) {
  return http.post('/admin/ticketPrintTemplate/delete', { data: { idList: [id] } })
}

export function getTicketPrintModelList (params) {
  return http.post('/admin/ticketPrintTemplate', { data: params })
}

export function updateTicketPrintModel (params) {
  return http.post('/admin/ticketPrintTemplate/update', { data: params })
}
export function secondPrintTicket (list) {
  return http.post('/order/secondPrintTicket',
    list
  )
}

/* -------------------------------------小票打印接口------------------------------- */
export function addReceiptPrintModel (params) {
  return http.post('/admin/ticketReceiptTemplate/add', { data: params })
}

export function deleteReceiptPrintModel (id) {
  return http.post('/admin/ticketReceiptTemplate/delete', { data: { idList: [id] } })
}

export function updateReceiptPrintModel (params) {
  return http.post('/admin/ticketReceiptTemplate/update', { data: params })
}

export function getReceiptPrintModel (params) {
  return http.post('/admin/ticketReceiptTemplate', { data: params })
}
