import request from '@/utils/request'

// 查询预约开票申请列表
export function listInvoice(query) {
  return request({
    url: '/approve/invoice/list',
    method: 'get',
    params: query
  })
}

// 查询预约开票申请详细
export function getInvoice(id) {
  return request({
    url: '/approve/invoice/' + id,
    method: 'get'
  })
}

// 新增预约开票申请
export function addInvoice(data) {
  return request({
    url: '/approve/invoice',
    method: 'post',
    data: data
  })
}

// 修改预约开票申请
export function updateInvoice(data) {
  return request({
    url: '/approve/invoice',
    method: 'put',
    data: data
  })
}

// 删除预约开票申请
export function delInvoice(id) {
  return request({
    url: '/approve/invoice/' + id,
    method: 'delete'
  })
}

// 导出预约开票申请
export function exportInvoice(query) {
  return request({
    url: '/approve/invoice/export',
    method: 'get',
    params: query
  })
}

export function handleApprove(data) {
  return request({
    url: '/approve/invoice/handle',
    data: data,
    method: 'put'
  })
}
