import request from '@/utils/request'

// 查询特种设备申请列表
export function listApprove(query) {
  return request({
    url: '/sems/approve/list',
    method: 'get',
    params: query
  })
}

// 查询特种设备申请列表
export function listHisApprove(query) {
  return request({
    url: '/sems/approve/hisApprovelist',
    method: 'get',
    params: query
  })
}

// 处理申请
export function handleApprove(data) {
  return request({
    url: '/sems/approve/handle',
    method: 'put',
    data: data
  })
}

// 查询特种设备申请详细
export function getApprove(id) {
  return request({
    url: '/sems/approve/' + id,
    method: 'get'
  })
}

// 查询特种设备申请详细
export function getApproveInfo(id) {
  return request({
    url: '/sems/approve/info/' + id,
    method: 'get'
  })
}

// 新增特种设备申请
export function addApprove(data) {
  return request({
    url: '/sems/approve',
    method: 'post',
    data: data
  })
}

// 新增特年检
export function addYearApprove(data) {
  return request({
    url: '/sems/approve/year',
    method: 'post',
    data: data
  })
}

// 月检申请
export function addMonthApprove(data) {
  return request({
    url: '/sems/approve/month',
    method: 'post',
    data: data
  })
}

// 修改特种设备申请
export function updateApprove(data) {
  return request({
    url: '/sems/approve',
    method: 'put',
    data: data
  })
}

// 删除特种设备申请
export function delApprove(id) {
  return request({
    url: '/sems/approve/' + id,
    method: 'delete'
  })
}

// 导出特种设备申请
export function exportApprove(query) {
  return request({
    url: '/sems/approve/export',
    method: 'get',
    params: query
  })
}
