import request from '@/utils/request'

// 查询关键部件库存清单列表
export function listParts(query) {
  return request({
    url: '/reliability/parts/list',
    method: 'get',
    params: query
  })
}

// 查询关键部件库存清单详细
export function getParts(id) {
  return request({
    url: '/reliability/parts/' + id,
    method: 'get'
  })
}

// 新增关键部件库存清单
export function addParts(data) {
  return request({
    url: '/reliability/parts',
    method: 'post',
    data: data
  })
}

// 修改关键部件库存清单
export function updateParts(data) {
  return request({
    url: '/reliability/parts',
    method: 'put',
    data: data
  })
}

// 删除关键部件库存清单
export function delParts(id) {
  return request({
    url: '/reliability/parts/' + id,
    method: 'delete'
  })
}

// 导出关键部件库存清单
export function exportParts(query) {
  return request({
    url: '/reliability/parts/export',
    method: 'get',
    params: query
  })
}