import request from '@/utils/request'

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

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

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

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

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