import request from '@/utils/request'

// 查询二级下拉列表
export function getTypeOptionInfo(query) {
  return request({
    url: '/material/scrap_reason/levelTwolist',
    method: 'get',
    params: query
  })
}
// 查询三级下拉列表
export function getTypeOptionInfoThree(query) {
    return request({
      url: '/material/scrap_reason/levelThreelist',
      method: 'get',
      params: query
    })
}

// 查询报废原因列表
export function getReasonList(query) {
  return request({
    url: '/material/scrap_reason/list',
    method: 'get',
    params: query
  })
}

// 报废原因管理--新增
export function addScrapReason(data) {
  return request({
      url: '/material/scrap_reason',
      method: 'post',
      data: data,
  })
}


// 查询报废原因详情
export function getScrapReasonDetail(id) {
  return request({
    url: '/material/scrap_reason/'+ id,
    method: 'get',
  })
}

// 报废原因管理--修改
export function editScrapReason(data) {
  return request({
      url: '/material/scrap_reason/edit',
      method: 'post',
      data: data,
  })
}

// 报废原因管理--删除
export function delScrapReason(data) {
  return request({
      url: '/material/scrap_reason/delete/',
      method: 'post',
      data: data,
  })
}


