import { request } from '../utils/request'

export function list(data: any) {
  return request({
    url: '/consumer/report/list',
    method: 'POST',
    data
  })
}

export function certificateList(data: any) {
  return request({
    url: '/consumer/report/electronicCertificate/list',
    method: 'POST',
    data
  })
}

export function visitRecord(data: any) {
  return request({
    url: '/consumer/report/electronicCertificate/visitRecord',
    method: 'POST',
    data
  })
}

export function certificateSave(data: any) {
  return request({
    url: '/consumer/report/electronicCertificate/save',
    method: 'POST',
    data
  })
}

export function certificateDiscard(data: any) {
  return request({
    url: '/consumer/report/electronicCertificate/discard',
    method: 'GET',
    data
  })
}

export function reportDelete(data: any) {
  return request({
    url: '/consumer/report/reportDelete',
    method: 'DELETE',
    data
  })
}

export function reportSave(data: any) {
  return request({
    url: '/consumer/report/save',
    method: 'POST',
    data
  })
}

export function reportPreview(data: any) {
  return request({
    url: '/consumer/report/preview',
    method: 'POST',
    data
  })
}

export function visitReport(id: any) {
  return request({
    url: `/consumer/inspectionRecord/originator/visitReport?id=${id}`,
    method: 'GET',
  })
}

export function certificateDetail(id: any) {
  return request({
    url: `/consumer/report/electronicCertificate/info?id=${id}`,
    method: 'GET',
  })
}

export function certificateDetail2(id: any) {
  return request({
    url: `/consumer/report/electronicCertificate/visit?id=${id}`,
    method: 'GET',
  })
}
export function reportCreateDate(id: any) {
  return request({
    url: `/consumer/report/reportCreateDate?id=${id}`,
    method: 'GET',
  })
}

