import request from '@/utils/request'

export function getAllVoucher(data) {
  return request({
    url: '/voucherLogs/getAll',
    method: 'post',
    data
  })
}

export function getAllVoucherOrder(data) {
  return request({
    url: '/voucherOrder/getAll',
    method: 'post',
    data
  })
}

export function submitVoucher(data) {  // 提交生成一个付款二维码
  return request({
    url: '/voucherOrder/submitVoucher',
    method: 'post',
    data
  })
}

// voucher/getVoucher
export function getVoucher(params) {  // 获取可选择充值的代金卷类别
  return request({
    url: '/voucher/getVoucher',
    method: 'get',
    params
  })
}

export function getVocherNumber(data) {
  return request({
    url: '/voucherShopHold/statistics',
    method: 'post',
    data
  })
}

/**
 *
 * 商家代金卷转增接口
 * @param {Object} data
 * @returns
 */

export function voucherShopHold(data) {
  return request({
    url: '/voucherShopHold/statistics',
    method: 'post',
    data
  })
}
