import request from '@/utils/request'

// 查询承包商信息列表
export function listContractor(query) {
  return request({
    url: '/invoice/contractor/list',
    method: 'get',
    params: query
  })
}

// 查询承包商信息详细
export function getContractor(id) {
  return request({
    url: '/invoice/contractor/' + id,
    method: 'get'
  })
}

// 新增承包商信息
export function addContractor(data) {
  return request({
    url: '/invoice/contractor',
    method: 'post',
    data: data
  })
}

// 修改承包商信息
export function updateContractor(data) {
  return request({
    url: '/invoice/contractor',
    method: 'put',
    data: data
  })
}

// 删除承包商信息
export function delContractor(id) {
  return request({
    url: '/invoice/contractor/' + id,
    method: 'delete'
  })
}

// 导出承包商信息
export function exportContractor(query) {
  return request({
    url: '/invoice/contractor/export',
    method: 'get',
    params: query
  })
}
