import request from '@/utils/request'

// 查询仓库物料列表
export function listMaterial(query) {
  return request({
    url: '/aps_warehouse_material/material/list',
    method: 'get',
    params: query
  })
}

// 查询仓库物料详细
export function getMaterial(id) {
  return request({
    url: '/aps_warehouse_material/material/' + id,
    method: 'get'
  })
}

// 新增仓库物料
export function addMaterial(data) {
  return request({
    url: '/aps_warehouse_material/material',
    method: 'post',
    data: data
  })
}

// 修改仓库物料
export function updateMaterial(data) {
  return request({
    url: '/aps_warehouse_material/material',
    method: 'put',
    data: data
  })
}

// 删除仓库物料
export function delMaterial(id) {
  return request({
    url: '/aps_warehouse_material/material/' + id,
    method: 'delete'
  })
}
