import request from '@/utils/request'

// 查询物料类别列表
export function listMaterialType(query) {
  return request({
    url: '/materialType/materialType/list',
    method: 'get',
    params: query
  })
}

// 查询物料类别详细
export function getMaterialType(typeId) {
  return request({
    url: '/materialType/materialType/' + typeId,
    method: 'get'
  })
}

// 新增物料类别
export function addMaterialType(data) {
  return request({
    url: '/materialType/materialType',
    method: 'post',
    data: data
  })
}

// 修改物料类别
export function updateMaterialType(data) {
  return request({
    url: '/materialType/materialType',
    method: 'put',
    data: data
  })
}

// 删除物料类别
export function delMaterialType(typeId) {
  return request({
    url: '/materialType/materialType/' + typeId,
    method: 'delete'
  })
}
