import request from '@/utils/request'

// 获取企业列表
export function getList(data) {
  return request({
    url: '/financing/list',
    method: 'post',
    data
  })
}

// 获取企业列表
export function getProjectInfo(params) {
  return request({
    url: '/projectInfo/getLocalCreditResolutionCompletedProject',
    method: 'get'
  })
}

// 获取企业列表
export function getFinishProCon(params) {
  return request({
    url: '/purchManagement/getPurchCompleted',
    method: 'get',
    params
  })
}

// 获取联系人信息
export function getApplicantInfo(params) {
  return request({
    url: '/financing/getApplicantInfo',
    method: 'get',
    params
  })
}

// 选择验收货物
export function chooseToAcceptTheGoods(data) {
  return request({
    url: '/financing/findGoodsByAcceptance',
    method: 'post',
    data
  })
}

// 生成底层
export function generateReceivable(data) {
  return request({
    url: '/financing/generateAccountsReceivable',
    method: 'post',
    data
  })
}

// 申请提交
export function applySubmit(data) {
  return request({
    url: '/financing/apply',
    method: 'post',
    data
  })
}

// 获取详情
export function getDetailsInfo(params) {
  return request({
    url: '/financing/getDetail',
    method: 'get',
    params
  })
}

// 合同签署详情
export function getContractSignDetails(params) {
  return request({
    url: '/financing/getSignConfirmDetail',
    method: 'get',
    params
  })
}

// 刷新认证状态
export function refreshAuthStatus(params) {
  return request({
    url: '/financing/getAuthStatus',
    method: 'get',
    params
  })
}

// 刷新签署状态
export function refreshSignStatus(params) {
  return request({
    url: '/financing/getSignStatus',
    method: 'get',
    params
  })
}

// 合同签署提交
export function contractSignSubmit(data) {
  return request({
    url: '/financing/contractSignConfirm/edit',
    method: 'post',
    data
  })
}

// 还款计划
export function getRepaymentPlan(params) {
  return request({
    url: '/financing/doViewLatestPlan',
    method: 'get',
    params
  })
}
