import request from '@/utils/request'

// 查询区域列台账列表
export function listRegion(query) {
  return request({
    url: '/production/region/list',
    method: 'get',
    params: query
  })
}
// 查询区域列台账列表
export function listAllRegion(query) {
  return request({
    url: '/production/region/listAll',
    method: 'get',
    params: query
  })
}

// 查询区域列台账详细
export function getRegion(id) {
  return request({
    url: '/production/region/' + id,
    method: 'get'
  })
}

// 新增区域列台账
export function addRegion(data) {
  return request({
    url: '/production/region',
    method: 'post',
    data: data
  })
}

// 修改区域列台账
export function updateRegion(data) {
  return request({
    url: '/production/region',
    method: 'put',
    data: data
  })
}

// 删除区域列台账
export function delRegion(id) {
  return request({
    url: '/production/region/' + id,
    method: 'delete'
  })
}

// 导出区域列台账
export function exportRegion(query) {
  return request({
    url: '/production/region/export',
    method: 'get',
    params: query
  })
}

// 导出区域
export function generateExcel(id) {
  return request({
    url: '/production/region/generateExcel/'+id,
    method: 'get',
  })
}
