import request from '@/utils/request'

export function startTaskRevokeTFraud(pripids) {
  const form = new FormData()
  form.append('pripids', pripids)
  return request({
    url: '/revokeFraudBatch/startTaskRevokeTFraud',
    method: 'post',
    data: form
  })
}

export function getFraudBatchBaseinfoPage(data) {
  return request({
    url: '/fraudBatchBaseinfo/page',
    method: 'post',
    data
  })
}

export function remFraudBatchBaseinfo(ids, reasons) {
  const form = new FormData()
  form.append('ids', ids)
  form.append('reasons', reasons)
  return request({
    url: '/fraudBatchBaseinfo/remove',
    method: 'post',
    data: form
  })
}

export function exportExcel(data) {
  return request({
    url: '/fraudBatchBaseinfo/exportExcel',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

export function addFraudBatchBaseinfo(data) {
  return request({
    url: '/fraudBatchBaseinfo/add',
    method: 'post',
    data
  })
}

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

export function createDocument(bizseq, contentType) {
  const form = new FormData()
  form.append('bizseq', bizseq)
  form.append('contentType', contentType)
  return request({
    url: '/revokeFraudBatch/createDocument',
    method: 'post',
    data: form
  })
}

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

export function queryRevokeFraudBatchInfo(bizseq) {
  const form = new FormData()
  form.append('bizseq', bizseq)
  return request({
    url: '/revokeFraudBatch/queryRevokeFraudBatchInfo',
    method: 'post',
    data: form
  })
}

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

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

export function exportFailExcel(data) {
  return request({
    url: '/revokeFraudBatch/exportFailExcel',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

export function queryEntlockAbnInfo(pripid) {
  const form = new FormData()
  form.append('pripid', pripid)
  return request({
    url: '/revokeFraudBatch/queryEntlockAbnInfo',
    method: 'post',
    data: form
  })
}

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

export function tempSave(data) {
  return request({
    url: '/temporarySave/saveInfo',
    method: 'post',
    data
  })
}

export function temGet(bizseq, module, flow) {
  const form = new FormData()
  form.append('bizseq', bizseq)
  form.append('module', module)
  form.append('flow', flow)
  return request({
    url: '/temporarySave/getInfo',
    method: 'post',
    data: form
  })
}
