import request from '@/utils/request'

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

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

// 新增物资类型
export function addAssetsType(data) {
  return request({
    url: '/base/assetsType',
    method: 'post',
    data: data
  })
}

// 修改物资类型
export function updateAssetsType(data) {
  return request({
    url: '/base/assetsType',
    method: 'put',
    data: data
  })
}

// 删除物资类型
export function delAssetsType(id) {
  return request({
    url: '/base/assetsType/' + id,
    method: 'delete'
  })
}

// 根据分类查询物资
export function findAllByCategory(category) {
  return request({
    url: '/base/assetsType/findAllByCategory/' + category,
    method: 'get'
  })
}
