import request from '@/utils/request'

// 查询物资类型列表
export function listMaterialtype(query) {
  return request({
    url: '/information/materialtype/list',
    method: 'get',
    params: query
  })
}

// 查询物资类型详细
export function getMaterialtype(id) {
  return request({
    url: '/information/materialtype/' + id,
    method: 'get'
  })
}

// 新增物资类型
export function addMaterialtype(data) {
  return request({
    url: '/information/materialtype',
    method: 'post',
    data: data
  })
}

// 修改物资类型
export function updateMaterialtype(data) {
  return request({
    url: '/information/materialtype',
    method: 'put',
    data: data
  })
}

// 删除物资类型
export function delMaterialtype(id) {
  return request({
    url: '/information/materialtype/' + id,
    method: 'delete'
  })
}

//获取物资类型下拉字典数据
export function materialtypeDict() {
  return request({
    url: '/information/materialtype/getAll',
    method: 'get'
  })
}
