import request from '@/utils/request'

// 获取供应商待处理列表
export function supplierPendingList(data) {
  return request({
    url: '/businessProcessingTask/doMyPendingList',
    method: 'post',
    data
  })
}

// 获取供应商全部列表
export function supplierAllList(data) {
  return request({
    url: '/supplier/getAll',
    method: 'post',
    data
  })
}

// 获取供应商待尽调获取详情
export function getDueInfo(params) {
  return request({
    url: '/supplier/getDueDiligenceAllocation',
    method: 'get',
    params
  })
}

// 供应商尽调提交
export function dueSubmit(data) {
  return request({
    url: '/supplier/dueDiligenceAllocation',
    method: 'post',
    data
  })
}

// 获取供应商第一步审核信息
export function getFirstReviewInfo(params) {
  return request({
    url: '/supplier/getFirstReviewById',
    method: 'get',
    params
  })
}

// 获取供应商第一步一键计算
export function oneClickEvaluationSubmit(data) {
  return request({
    url: '/supplier/firstReview/measurement',
    method: 'post',
    data
  })
}

// 获取供应商第一步审核提交
export function firstReviewSubmit(data) {
  return request({
    url: '/supplier/firstReview',
    method: 'post',
    data
  })
}

// 获取供应商第二步审核信息
export function getTwoReviewInfo(params) {
  return request({
    url: '/supplier/getSecondReviewById',
    method: 'get',
    params
  })
}

// 获取供应商第一步一键计算
export function oneClickSecondEvaluationSubmit(data) {
  return request({
    url: '/supplier/secondReview/measurement',
    method: 'post',
    data
  })
}

// 获取供应商第二步审核提交
export function secondReviewSubmit(data) {
  return request({
    url: '/supplier/secondReview',
    method: 'post',
    data
  })
}

// 获取尽调时间确认信息
export function getDueDiligenceConfirm(params) {
  return request({
    url: '/supplier/getDueDiligenceConfirm',
    method: 'get',
    params
  })
}

// 获取尽调时间确认信息
export function dueConfirmSubmit(data) {
  return request({
    url: '/supplier/dueDiligenceConfirm',
    method: 'post',
    data
  })
}

// 获取视频尽调信息
export function getVideoDueInfo(params) {
  return request({
    url: '/supplier/getVideoDueDiligence',
    method: 'get',
    params
  })
}

// 获取供应商尽调信息一键计算
export function oneClickVideoEvaluation(data) {
  return request({
    url: '/supplier/video/measurement',
    method: 'post',
    data
  })
}

// 尽调信息提交
export function videoSubmit(data) {
  return request({
    url: '/supplier/videoDueDiligence',
    method: 'post',
    data
  })
}

// 下载报告
export const download = (data) => (
  request({
    url: '/supplier/download/report',
    method: 'get',
    params: data,
    responseType: 'arraybuffer'
  })
)
