import request from '@/utils/request'

// 资方融资管理-获取融资列表列表
export function queryFinancialList(data) {
  return request({
    url: '/financing/from/investors/findBySearch',
    method: 'post',
    data
  })
}

// 资方融资管理-新增、暂存、修改资方授信
export function addOrUpdateCapitalAuth(data) {
  return request({
    url: '/financing/from/investors/add',
    method: 'post',
    data
  })
}

// 资方融资管理-续授信
export function continueCredit(data) {
  return request({
    url: '/financing/from/investors/credit',
    method: 'post',
    data
  })
}

// 资方融资管理-获取可以融资的供应商
export function getFinancialableSuppiler(params) {
  return request({
    url: '/financing/from/investors/getSuppliers',
    method: 'get',
    params
  })
}

// 资方融资管理-制作授信合同
export function makeCreditContract(params) {
  return request({
    url: '/financing/from/investors/makeContract',
    method: 'get',
    params
  })
}

// 资方融资管理-查看详情
export function getDetails(params) {
  return request({
    url: '/financing/from/investors/getDetail',
    method: 'get',
    params
  })
}

// 资方融资管理-查看授信详情
export function getCreditDetails(params) {
  return request({
    url: '/financing/from/investors/getCreditDetail',
    method: 'get',
    params
  })
}

// 资方融资管理-从苏商查询授信详情
export function getCreditDetailsFromSuShang(params) {
  return request({
    url: '/financing/from/investors/findCreditDetail',
    method: 'get',
    params
  })
}

// 资方融资管理-查询资方
export function queryCapitalList(data) {
  return request({
    url: '/sys/stakeholders/management/search',
    method: 'post',
    data
  })
}

// 资方融资管理-资方授信列表-刷新授信结果
export function freshAuthRes(params) {
  return request({
    url: '/financing/from/investors/findCreditDetail',
    method: 'get',
    params
  })
}

// 身份证OCR识别
export function ocrIdentifyCard(params) {
  return request({
    url: '/zjxl/do_idCardOCR',
    method: 'get',
    params
  })
}

// 营业执照OCR识别
export function ocrBusinessLicense(params) {
  return request({
    url: '/zjxl/do_businessLicenseOCR',
    method: 'get',
    params
  })
}

// 资方融资管理-行业类型
export function getIndustryType(params) {
  return request({
    url: '/smb/industry/getIndustry',
    method: 'get',
    params
  })
}

// 资方放款信息-查询列表
export function queryLoanMoneyList(data) {
  return request({
    url: '/financing/loanInfo/list',
    method: 'post',
    data
  })
}

// 资方放款信息-查询详情
export function getLoanDetails(params) {
  return request({
    url: '/financing/loanInfo/detail',
    method: 'get',
    params
  })
}

// 资方垫付信息-垫付列表
export function getAdvancePaymentList(data) {
  return request({
    url: '/financing/from/advancePayment/findBySearch',
    method: 'post',
    data
  })
}

// 资方垫付信息-查询详情
export function getAdvancePaymentDetails(params) {
  return request({
    url: '/financing/from/advancePayment/findBySearch',
    method: 'get',
    params
  })
}

// 资方垫付信息-重新发起
export function reissueAdvancePayment(params) {
  return request({
    url: '/financing/from/advancePayment/reissue',
    method: 'get',
    params
  })
}

// 资方还款信息-获取还款列表
export function getPaymentList(data) {
  return request({
    url: '/financing/payment/findBySearch',
    method: 'post',
    data
  })
}

// 资方还款信息-获取还款详情
export function getPaymentDetails(params) {
  return request({
    url: '/financing/payment/getDetail',
    method: 'get',
    params
  })
}

// 资方还款信息-重新还款
export function repayPayment(params) {
  return request({
    url: '/financing/payment/repay',
    method: 'get',
    params
  })
}

// 资方授信-资方对账记录
export function getCapitalAccountRecord(params) {
  return request({
    url: '/financing/reconciliation/info/findBySearch',
    method: 'get',
    params
  })
}
