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

export function letterProcessList(data) {
  return request({
    url: `/letterProcess/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function letterProcessListExport(data, name) {
  return postBlob({
    url: '/letterProcess/list/export',
    data,
    name
  })
}

export function letterProcessDetailLetter(params) {
  return request({
    url: '/letterProcess/detailLetter',
    method: 'post',
    params: params
  })
}

export function letterProcessAddLetter(data) {
  return request({
    url: '/letterProcess/addLetter',
    method: 'post',
    data: data
  })
}

export function letterProcessUpdateLetter(data) {
  return request({
    url: '/letterProcess/updateLetter',
    method: 'post',
    data: data
  })
}

export function letterProcessDelLetter(params) {
  return request({
    url: '/letterProcess/delLetter',
    method: 'post',
    params: params
  })
}

// 网点申诉
export function letterProcessAppeal(data) {
  return request({
    url: '/letterProcess/appeal',
    method: 'post',
    data: data
  })
}

// 作废
export function letterProcessCancel(params) {
  return request({
    url: '/letterProcess/cancel',
    method: 'post',
    params: params
  })
}

// 中心批复
export function letterProcessExamine(data) {
  return request({
    url: '/letterProcess/examine',
    method: 'post',
    data: data
  })
}

// 驳回
export function letterProcessReject(params) {
  return request({
    url: '/letterProcess/reject',
    method: 'post',
    params: params
  })
}

// 发送
export function letterProcessSend(params) {
  return request({
    url: '/letterProcess/send',
    method: 'post',
    params: params
  })
}
