import request from '@/utils/request'

export function getWarehouseList(query) {
  return request({
    url: '/inm/warehouse/',
    method: 'get',
    params: query
  })
}
export function createWarehouse(data) {
  return request({
    url: '/inm/warehouse/',
    method: 'post',
    data
  })
}
export function updateWarehouse(id, data) {
  return request({
    url: `/inm/warehouse/${id}/`,
    method: 'put',
    data
  })
}
export function deleteWarehouse(id, data) {
  return request({
    url: `/inm/warehouse/${id}/`,
    method: 'delete',
    data
  })
}
//物料
export function getInventoryList(query) {
  return request({
    url: '/inm/inventory/',
    method: 'get',
    params: query
  })
}
export function createInventory(data) {
  return request({
    url: '/inm/inventory/',
    method: 'post',
    data
  })
}
export function updateInventory(id, data) {
  return request({
    url: `/inm/inventory/${id}/`,
    method: 'put',
    data
  })
}
export function deleteInventory(id, data) {
  return request({
    url: `/inm/inventory/${id}/`,
    method: 'delete',
    data
  })
}
