import request from '@/utils/request'

// 查询库区列表
export function listArea(query) {
  return request({
    url: '/basicdata/area/list',
    method: 'get',
    params: query
  })
}

// 查询库区详细
export function getArea(fId) {
  return request({
    url: '/basicdata/area/' + fId,
    method: 'get'
  })
}

// 新增库区
export function addArea(data) {
  return request({
    url: '/basicdata/area',
    method: 'post',
    data: data
  })
}

// 修改库区
export function updateArea(data) {
  return request({
    url: '/basicdata/area',
    method: 'put',
    data: data
  })
}

// 删除库区
export function delArea(fId) {
  return request({
    url: '/basicdata/area/' + fId,
    method: 'delete'
  })
}

// 导出库区
export function exportArea(query) {
  return request({
    url: '/basicdata/area/export',
    method: 'get',
    params: query
  })
}