import request from '@/utils/request'


// 查询硬件-列表
export function listHardware(query) {
  return request({
    url: '/iscs/hardware/getIsHardwarePage',
    method: 'get',
    params: query
  })
}

// 获取所有车间
export function listAllWorkshop(){
  return request({
    url: '/mes/md/workshop/listAll',
    method: 'get'
  })
}
// 获取硬件详细信息
export function getHardwareInfo(repairId) {
  return request({
    url: '/iscs/hardware/selectIsHardwareById/?id=' + repairId,
    method: 'get'
  })
}

//新增硬件信息
export function addHardware(query) {
  return request({
    url: '/iscs/hardware/insertIsHardware',
    method: 'post',
    data: query
  })
}

// 修改硬件
export function updateHardware(data) {
  return request({
    url: '/iscs/hardware/updateIsHardware',
    method: 'post',
    data: data
  })
}

// 删除硬件
export function delHardware(repairId) {
  return request({
    url: '/iscs/hardware/deleteIsHardwareByIds?ids='+ repairId,
    method: 'post'
  })
}
