import request, { postBlob, getBlob } from '@/utils/request'

export function workerOldRefundExamine(params) {
  return request({
    url: `/worker/old-refund/examine`,
    method: 'post',
    params
  })
}

export function workerOldRefundReview(params) {
  return request({
    url: `/worker/old-refund/review`,
    method: 'post',
    params
  })
}

export function workerNewRefundList(data) {
  return request({
    url: `/worker/new-refund/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function workerNewRefundRefund(params) {
  return request({
    url: `/worker/new-refund/refund`,
    method: 'post',
    params
  })
}

export function workerNewRefundExamine(params) {
  return request({
    url: `/worker/new-refund/examine`,
    method: 'post',
    params
  })
}

export function workerNewRefundDetail(params) {
  return request({
    url: '/worker/new-refund/detail',
    method: 'post',
    params
  })
}

export function workerOldRefundList(data) {
  return request({
    url: `/worker/old-refund/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function workerOldRefundRefund(params) {
  return request({
    url: `/worker/old-refund/refund`,
    method: 'post',
    params
  })
}

export function workerOldRefundDetail(params) {
  return request({
    url: '/worker/old-refund/detail',
    method: 'post',
    params
  })
}

// 下载模板
export function workerTemplateExcel(data, name) {
  return getBlob({
    url: '/worker/old-refund/template/excel',
    data,
    name
  })
}

export function WorkerNewRefundListExport(data, name) {
  return postBlob({
    url: '/worker/new-refund/list/export',
    data,
    name
  })
}

export function WorkerOldRefundListExport(data, name) {
  return postBlob({
    url: '/worker/old-refund/list/export',
    data,
    name
  })
}
export function workerOldRefundTransferFlag(params) {
  return request({
    url: `/worker/old-refund/transfer/flag`,
    method: 'post',
    params
  })
}
