import request from '@/utils/request'

// 查询套餐订单列表
export function listPackageOrder(query) {
  return request({
    url: '/his/packageOrder/list',
    method: 'get',
    params: query
  })
}

// 查询套餐订单详细
export function getPackageOrder(orderId) {
  return request({
    url: '/his/packageOrder/' + orderId,
    method: 'get'
  })
}

// 查询电话
export function getPhone(orderId) {
  return request({
    url: '/his/packageOrder/queryPhone/' + orderId,
    method: 'get'
  })
}

export function payment(orderId) {
  return request({
    url: '/his/packageOrder/payment/' + orderId,
    method: 'get'
  })
}
export function refund(orderId) {
  return request({
    url: '/his/packageOrder/refund/' + orderId,
    method: 'get'
  })
}
export function inquiryRefund(orderId) {
  return request({
    url: '/his/packageOrder/inquiryRefund/' + orderId,
    method: 'get'
  })
}
export function storeRefund(orderId) {
  return request({
    url: '/his/packageOrder/storeRefund/' + orderId,
    method: 'get'
  })
}
// 新增套餐订单
export function addPackageOrder(data) {
  return request({
    url: '/his/packageOrder',
    method: 'post',
    data: data
  })
}

export function refundAudit(data) {
  return request({
    url: '/his/packageOrder/refundAudit',
    method: 'put',
    data: data
  })
}

// 修改套餐订单
export function updatePackageOrder(data) {
  return request({
    url: '/his/packageOrder',
    method: 'put',
    data: data
  })
}

// 删除套餐订单
export function delPackageOrder(orderId) {
  return request({
    url: '/his/packageOrder/' + orderId,
    method: 'delete'
  })
}

// 导出套餐订单
export function exportPackageOrder(query) {
  return request({
    url: '/his/packageOrder/export',
    method: 'get',
    params: query
  })
}