import request from '@/utils/request'

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

// 查询库位详细
export function getLocation(fId) {
  return request({
    url: '/basicdata/location/' + fId,
    method: 'get'
  })
}

// 新增库位
export function addLocation(data) {
  return request({
    url: '/basicdata/location',
    method: 'post',
    data: data
  })
}

// 修改库位
export function updateLocation(data) {
  return request({
    url: '/basicdata/location',
    method: 'put',
    data: data
  })
}

// 删除库位
export function delLocation(fId) {
  return request({
    url: '/basicdata/location/' + fId,
    method: 'delete'
  })
}

// 导出库位
export function exportLocation(query) {
  return request({
    url: '/basicdata/location/export',
    method: 'get',
    params: query
  })
}