import request from '@/utils/request'

// 创建就诊卡退费申请
export function createRefundApply(data) {
  return request({
    url: '/system/refund-apply/create',
    method: 'post',
    data: data
  })
}

// 更新就诊卡退费申请
export function updateRefundApply(data) {
  return request({
    url: '/system/refund-apply/update',
    method: 'put',
    data: data
  })
}

// 删除就诊卡退费申请
export function deleteRefundApply(id) {
  return request({
    url: '/system/refund-apply/delete?id=' + id,
    method: 'delete'
  })
}

// 获得就诊卡退费申请
export function getRefundApply(id) {
  return request({
    url: '/system/refund-apply/get?id=' + id,
    method: 'get'
  })
}

// 获得就诊卡退费申请分页
export function getRefundApplyPage(query) {
  return request({
    url: '/system/refund-apply/page',
    method: 'get',
    params: query
  })
}

// 导出就诊卡退费申请 Excel
export function exportRefundApplyExcel(query) {
  return request({
    url: '/system/refund-apply/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
