import request from '@/utils/request'

// 查询物资信息--分页 /dev-api/iscs/materials/getIsMaterialsPage
export function MaterialsLoanExceptionPage(query) {
  return request({
    url: '/iscs/exception/getIsMaterialsLoanExceptionPage',
    method: 'get',
    params: query
  })
}

// 新增物资信息 /dev-api/iscs/materials/insertIsMaterials
export function addMaterials(data) {
  return request({
    url: '/iscs/materials/insertIsMaterials',
    method: 'post',
    data: data
  })
}

// 修改物资信息 /dev-api/iscs/materials/updateIsMaterials
export function updateMaterials(data) {
  return request({
    url: '/iscs/materials/updateIsMaterials',
    method: 'post',
    data: data
  })
}

// 删除物资信息 /dev-api/iscs/materials/deleteIsMaterialsByMaterialsIds
export function deleteMaterials(data) {
  return request({
    url: '/iscs/materials/deleteIsMaterialsByMaterialsIds?materialsIds=' + data,
    method: 'post',
  })
}

// 获取物资详细信息 /dev-api/iscs/materials/selectIsMaterialsById
export function selectMaterialsById(query) {
  return request({
    url: '/iscs/materials/selectIsMaterialsById?materialsId=' + query,
    method: 'get',
  })
}


// 物资所属柜 查询物资柜-分页
export function getIsMaterialsCabinets() {
  return request({
    url: '/iscs/cabinet/getIsMaterialsCabinetPage',
    method: 'get',
  })
}
//绑定物资
export function updateMaterialsBinding(data) {
  return request({
    url: '/iscs/materials/updateMaterialsBinding',
    method: 'post',
    data: data
  })
}


