金融产品设计及数字化营销沙盘
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

985 lines
51 KiB

<template>
<div>
<el-tabs v-model="curTab"
@tab-click="tabChange">
<el-tab-pane label="配置风控"
name="tab1">
<el-form ref="formRef"
:model="form"
label-width="120px"
label-suffix=":"
class="form"
status-icon>
<div class="step">
<h6 class="step-name mb-7">办理账户</h6>
<el-form-item label="提供材料"
prop="accountMaterials">
<div>
<div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-model="form.accountMaterialsCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.accountMaterialsCheck === 797">
<p class="tips">选择需要提供的申请人材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.accountMaterials">
1 year ago
<el-checkbox v-for="(item, i) in config[0]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList"
1 year ago
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</el-form-item>
<el-form-item label="发放账户"
prop="sendingAccount">
<div>
<div class="radio-wrap flex-col items-start">
1 year ago
<el-radio-group v-if="config.length"
v-model="form.sendingAccountCheck">
1 year ago
<el-radio v-for="(item, i) in config[0]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.sendingAccountCheck === 801 && config.length">
<p class="tips">选择需要发放的账户至少选一样</p>
1 year ago
<el-radio v-for="(item, i) in config[0]?.recordChildren[1]?.recordChildren[0]?.subject?.itemList"
:key="i"
v-model="form.sendingAccount"
:label="item.itemId">{{ item.options }}</el-radio>
</template>
</div>
</el-form-item>
</div>
<div class="step">
<h6 class="step-name mb-7">贷款申请</h6>
<el-form-item label="申请方式"
prop="loanApplicationMethod">
<p class="mr-5 text-xs text-[#666]">选择申请方式至少选一样</p>
1 year ago
<el-checkbox-group v-if="config.length"
1 year ago
style="font-size: 14px"
1 year ago
v-model="form.loanApplicationMethod">
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="提供材料"
prop="borrowerMaterial">
<div class="flex-1">
<div class="flex items-center">
<p class="field-name mr-5 mb-0">借款人材料</p>
<div class="radio-wrap flex-col items-start">
<el-radio-group v-model="form.borrowerMaterialCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
</div>
<div v-if="form.borrowerMaterialCheck === 797">
1 year ago
<p class="my-2 text-xs text-[#666]">选择需要提供的借款人材料至少选一样</p>
1 year ago
<el-checkbox-group v-if="config.length"
v-model="form.borrowerMaterial"
@change="denyAll('borrowerMaterial', 770)">
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[1]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
<!-- 企业 -->
2 years ago
<template v-if="info.productType">
<p class="field-name mt-5">企业材料</p>
<div>
<div class="radio-wrap flex-col items-start mb-2">
<el-radio-group v-model="form.enterpriseMaterialCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.enterpriseMaterialCheck === 797">
<p class="tips">选择需要提供的企业材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.enterpriseMaterial">
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[2]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
<p class="field-name mt-5">抵押物</p>
<div>
<div class="radio-wrap flex-col items-start mb-2">
<el-radio-group v-model="form.collateralCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.collateralCheck === 797">
<p class="tips">选择需要提供的抵押物材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.collateral">
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[3]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</template>
<!-- 个人 -->
<template v-else>
<p class="field-name mt-5 mb-0">配偶材料</p>
<div>
<div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-model="form.mateMaterialCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.mateMaterialCheck === 797">
<p class="tips">选择需要提供的配偶材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.mateMaterial"
@change="denyAll('mateMaterial', 350)">
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[2]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
<p class="field-name mt-5">经营类材料</p>
<div>
<div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-model="form.businessMaterialsCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.businessMaterialsCheck === 797">
<p class="tips">选择需要提供的经营类材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.businessMaterials"
@change="denyAll('businessMaterials', 351)">
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[3]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</template>
<p class="field-name mt-5">补充材料</p>
<div>
<div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-model="form.supplementaryMaterialsCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.supplementaryMaterialsCheck === 797">
<p class="tips">选择需要提供的补充材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.supplementaryMaterials"
@change="denyAll('supplementaryMaterials', 352)">
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[4]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</div>
</el-form-item>
</div>
<div class="step">
<h6 class="step-name mb-7">系统跑批准入风控策略</h6>
<el-form-item label="跑批对象"
prop="runBatchObject">
<div>
<div class="radio-wrap flex-col items-start mb-2">
1 year ago
<el-radio-group v-if="config.length"
v-model="form.runBatchObjectCheck">
1 year ago
<el-radio v-for="(item, i) in config[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.runBatchObjectCheck === 803">
1 year ago
<p class="tips">选择需要跑批的对象至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.runBatchObject">
1 year ago
<el-checkbox v-for="(item, i) in config[2]?.recordChildren[0]?.recordChildren[0]?.subject?.itemList"
1 year ago
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</el-form-item>
<el-form-item label="准入策略"
prop="accessStrategy">
<div>
<div class="radio-wrap flex-col items-start mb-2">
1 year ago
<el-radio-group v-if="config.length"
v-model="form.accessStrategyCheck">
1 year ago
<el-radio v-for="(item, i) in config[2]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.accessStrategyCheck === 803">
1 year ago
<p class="tips">选择需要跑批的准入策略至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.accessStrategy">
1 year ago
<el-checkbox v-for="(item, i) in config[2]?.recordChildren[1]?.recordChildren[0]?.subject?.itemList"
1 year ago
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</el-form-item>
<el-form-item label="信用评分策略"
label-width="130px"
prop="personalCreditScoringStrategiesCheck">
<div class="flex-1">
<div class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">个人信用评分策略</span>
<el-radio-group v-model="form.personalCreditScoringStrategiesCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<el-select v-if="form.personalCreditScoringStrategiesCheck === 797"
class="ml-5"
v-model="form.personalCreditScoringStrategies"
placeholder="请选择">
1 year ago
<el-option v-for="item in credits.filter(e => !e.scoringObject)"
:key="item"
1 year ago
:value="item.scoreCardName" />
</el-select>
</div>
<div class="flex items-center">
<div class="radio-wrap">
<span class="label">企业信用评分策略</span>
<el-radio-group v-model="form.corporateCreditScoringStrategiesCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<el-select v-if="form.corporateCreditScoringStrategiesCheck === 797"
class="ml-5"
v-model="form.corporateCreditScoringStrategies"
placeholder="请选择">
1 year ago
<el-option v-for="item in credits.filter(e => e.scoringObject)"
:key="item"
1 year ago
:value="item.scoreCardName" />
</el-select>
</div>
</div>
</el-form-item>
<el-form-item label="风险度策略"
prop="riskDegreeStrategy">
1 year ago
<div class="flex items-center h-[34px]">
<el-radio-group v-if="config.length"
class="mr-10"
v-model="form.riskDegreeStrategyCheck">
<el-radio v-for="(item, i) in config[2]?.recordChildren[3]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
1 year ago
<el-checkbox-group v-if="form.riskDegreeStrategyCheck === 803 && config.length"
1 year ago
style="font-size: 14px"
v-model="form.riskDegreeStrategy">
<el-checkbox v-for="(item, i) in config[2]?.recordChildren[3]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
<el-form-item label="利率定价模型"
label-width="130px"
prop="interestRatePricingModelCheck">
<div class="flex-1">
<div class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">{{ (info.productType ? '企业' : '个人') + '额度模型' }}</span>
1 year ago
<el-radio-group v-if="config.length"
v-model="form.interestRatePricingModelCheck">
1 year ago
<el-radio v-for="(item, i) in config[2]?.recordChildren[3]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
1 year ago
<el-select v-if="form.interestRatePricingModelCheck === 803 && config.length"
class="ml-5"
v-model="form.interestRatePricingModel"
placeholder="请选择">
1 year ago
<el-option v-for="item in config[2]?.recordChildren[4]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="item.itemId"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
<div class="radio-wrap">
<span class="label">{{ (info.productType ? '企业' : '个人') + '利率模型' }}</span>
1 year ago
<el-radio-group v-if="config.length"
v-model="form.individualInterestRateModel">
1 year ago
<el-radio v-for="(item, i) in config[2]?.recordChildren[4]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
</div>
</el-form-item>
</div>
<div class="step">
<h6 class="step-name mb-7">尽职调查</h6>
<el-form-item label="尽调方式"
prop="dueDiligenceMode">
<div>
<p class="tips leading-[32px]">选择尽调方式至少选一样</p>
1 year ago
<el-radio-group v-if="config.length"
v-model="form.dueDiligenceMode">
<el-radio v-for="(item, i) in config[3]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
</el-form-item>
<el-form-item label="尽调内容"
prop="dueDiligenceContent">
<div>
<p class="tips leading-[32px]">选择尽调内容至少选一样</p>
1 year ago
<el-checkbox-group v-if="config.length"
v-model="form.dueDiligenceContent">
<el-checkbox v-for="(item, i) in config[3]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
</div>
<div class="step">
<h6 class="step-name mb-7">贷款审查</h6>
<el-form-item label="审查内容"
prop="reviewContent">
<div>
<p class="tips leading-[32px]">选择审查材料至少选一样</p>
1 year ago
<el-radio-group v-if="config.length"
v-model="form.reviewContent">
<el-radio v-for="(item, i) in config[4]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
</el-form-item>
<el-form-item label="审查签字"
prop="reviewSignature">
<div>
<p class="tips leading-[32px]">选择签字表单至少选一样</p>
<el-radio v-model="form.reviewSignature"
:label="info.productType ? 262 : 115">用信调查申报表</el-radio>
</div>
</el-form-item>
</div>
<div class="step">
<h6 class="step-name mb-7">贷款审批</h6>
<el-form-item label="审批内容"
prop="reviewApproveContent">
<div>
<p class="tips leading-[32px]">选择审批材料至少选一样</p>
1 year ago
<el-radio-group v-if="config.length"
v-model="form.reviewApproveContent">
<el-radio v-for="(item, i) in config[5]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
</el-form-item>
<el-form-item label="审批签字"
prop="approvalSignature">
<div>
<p class="tips leading-[32px]">选择签字表单至少选一样</p>
<el-radio v-model="form.approvalSignature"
:label="info.productType ? 264 : 117">用信调查申报表</el-radio>
</div>
</el-form-item>
</div>
<div class="step">
<h6 class="step-name mb-7">签订合同</h6>
<el-form-item label="提供的材料"
prop="contractMaterials">
<div class="flex items-center">
1 year ago
<div class="radio-wrap mr-5">
<el-radio-group v-model="form.contractMaterialsCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<el-radio v-if="form.contractMaterialsCheck === 797"
v-model="form.contractMaterials"
:label="info.productType ? 265 : 118">抵押物所有权证明</el-radio>
</div>
</el-form-item>
2 years ago
<el-form-item label="合同模板">
<div class="flex-1">
<div class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">借贷合同</span>
<el-radio-group v-model="form.loanContractCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<el-select v-if="form.loanContractCheck === 797 && config.length"
class="ml-5"
v-model="form.loanContract"
placeholder="请选择">
1 year ago
<el-option v-for="item in config[6]?.recordChildren[1]?.recordChildren[0]?.recordChildren[0]?.subject?.itemList"
:key="item.itemId"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
<div class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">抵押合同</span>
<el-radio-group v-model="form.mortgageContractCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<el-select v-if="form.mortgageContractCheck === 797 && config.length"
class="ml-5"
v-model="form.mortgageContract"
placeholder="请选择">
1 year ago
<el-option v-for="item in config[6]?.recordChildren[1]?.recordChildren[1]?.recordChildren[0]?.subject?.itemList"
:key="item.itemId"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
<div class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">质押合同</span>
<el-radio-group v-model="form.pledgeContractCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<el-select v-if="form.pledgeContractCheck === 797 && config.length"
class="ml-5"
v-model="form.pledgeContract"
placeholder="请选择">
1 year ago
<el-option v-for="item in config[6]?.recordChildren[1]?.recordChildren[2]?.recordChildren[0]?.subject?.itemList"
:key="item.itemId"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
<div class="flex items-center">
<div class="radio-wrap">
<span class="label">担保合同</span>
<el-radio-group v-model="form.guaranteeContractCheck">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
1 year ago
<el-select v-if="form.guaranteeContractCheck === 797 && config.length"
class="ml-5"
v-model="form.guaranteeContract"
placeholder="请选择">
1 year ago
<el-option v-for="item in config[6]?.recordChildren[1]?.recordChildren[3]?.recordChildren[0]?.subject?.itemList"
:key="item.itemId"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
</div>
</el-form-item>
</div>
<div class="step">
<h6 class="step-name mb-7">贷后管理</h6>
<el-form-item label="选择策略"
prop="selectionStrategy">
<div>
<div class="radio-wrap flex-col items-start mb-1">
1 year ago
<el-radio-group v-if="config.length"
v-model="form.selectionStrategyCheck">
1 year ago
<el-radio v-for="(item, i) in config[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
1 year ago
<template v-if="form.selectionStrategyCheck === 803">
<p class="tips">选择策略至少选一样</p>
1 year ago
<el-checkbox-group v-if="(info.productType && config.length && config[7]?.recordChildren) || (!info.productType && config.length && config[7]?.recordChildren)"
1 year ago
v-model="form.selectionStrategy">
1 year ago
<el-checkbox v-for="(item, i) in info.productType ? config[7]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList : config[7]?.recordChildren[0]?.subject?.itemList"
1 year ago
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</el-form-item>
</div>
</el-form>
<div class="forms step-form">
<div class="flex justify-end">
<div class="submit"
@click="submit(formRef)">完成提交审批</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="产品要素"
name="tab2">
<info />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, computed, watch, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
2 years ago
import type { TabsPaneContext, FormInstance } from 'element-plus';
import { findById, riskSave, riskUpdate } from '@/api/bank';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
1 year ago
import { listCredit } from '@/api/model';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common';
import Info from './Info.vue';
import Cookies from 'js-cookie';
const emit = defineEmits(['getList']);
interface RuleForm {
accessStrategyCheck?: number;
accessStrategy: any;
accountMaterialsCheck?: number;
accountMaterials: any;
approvalSignature?: any;
bankProductsId: any;
borrowerMaterialCheck?: number;
borrowerMaterial: any;
businessMaterialsCheck?: number;
businessMaterials: any;
collateralCheck?: number;
collateral: any;
contractMaterialsCheck?: number;
contractMaterials: any;
corporateCreditScoringStrategiesCheck?: number;
corporateCreditScoringStrategies: any;
corporateInterestRateModel: any;
dueDiligenceContent: any;
dueDiligenceMode: any;
enterpriseMaterialCheck?: number;
enterpriseMaterial: any;
enterpriseQuotaModel: any;
guaranteeContractCheck?: number;
guaranteeContract: any;
individualInterestRateModel?: number;
interestRatePricingModelCheck?: number;
interestRatePricingModel: any;
loanApplicationMethod: any;
loanContractCheck?: number;
loanContract: any;
mateMaterialCheck?: number;
mateMaterial: any;
materialsForLoanApproval: any;
mortgageContractCheck?: number;
mortgageContract: any;
personalCreditScoringStrategiesCheck?: number;
personalCreditScoringStrategies: any;
pledgeContractCheck?: number;
pledgeContract: any;
reviewApproveContent: any;
reviewContent: any;
reviewSignature: any;
riskDegreeStrategyCheck?: number;
riskDegreeStrategy: any;
runBatchObjectCheck?: number;
runBatchObject: any;
selectionStrategyCheck?: number;
selectionStrategy: any;
sendingAccountCheck?: number;
sendingAccount: any;
supplementaryMaterialsCheck?: number;
supplementaryMaterials: any;
}
const router = useRouter();
const route = useRoute();
const id = computed(() => +route.query.id);
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const curTab = ref<string>('tab1');
const config = ref<any[]>([]);
1 year ago
const credits = ref<Record<string, any>[]>([]);
2 years ago
const info = ref<Record<string, any>>({});
const whethers = ref<Record<string, any>>([
{
id: 797,
name: '需要提供',
},
{
id: 798,
name: '无需提供',
},
]);
const formRef = ref<FormInstance>();
const form = reactive<RuleForm>({
...getIds(),
accessStrategyCheck: '',
accessStrategy: [],
accountMaterialsCheck: '',
accountMaterials: [],
approvalSignature: '',
bankProductsId: computed(() => +route.query.id),
borrowerMaterialCheck: '',
borrowerMaterial: [],
businessMaterialsCheck: '',
businessMaterials: [],
collateralCheck: '',
collateral: [],
contractMaterialsCheck: '',
contractMaterials: '',
corporateCreditScoringStrategiesCheck: '',
corporateCreditScoringStrategies: '',
corporateInterestRateModel: [],
dueDiligenceContent: [],
dueDiligenceMode: '',
enterpriseMaterialCheck: '',
enterpriseMaterial: [],
enterpriseQuotaModel: '',
guaranteeContractCheck: '',
guaranteeContract: '',
individualInterestRateModel: '',
interestRatePricingModelCheck: '',
interestRatePricingModel: '',
loanApplicationMethod: [],
loanContractCheck: '',
loanContract: '',
mateMaterialCheck: '',
mateMaterial: [],
materialsForLoanApproval: [],
mortgageContractCheck: '',
mortgageContract: '',
personalCreditScoringStrategiesCheck: '',
personalCreditScoringStrategies: '',
pledgeContractCheck: '',
pledgeContract: '',
reviewApproveContent: '',
reviewContent: '',
reviewSignature: '',
riskDegreeStrategyCheck: '',
riskDegreeStrategy: [],
runBatchObjectCheck: '',
runBatchObject: [],
selectionStrategyCheck: '',
selectionStrategy: [],
sendingAccountCheck: '',
sendingAccount: '',
supplementaryMaterialsCheck: '',
supplementaryMaterials: [],
});
// tab切换回调
const tabChange = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event);
};
// 配置项
const getConfig = async () => {
2 years ago
const { process } = await getProcessInformationBasedOnRoles(info.value.productType ? 71 : 70); // 个人70,企业71
config.value = process;
1 year ago
const { data } = await listCredit({
checkpointId: levelId,
projectId,
pageNum: 1,
pageSize: 1000,
});
credits.value = data;
};
// 详情
const getDetail = async () => {
if (id.value) {
try {
const { data } = await findById(id.value);
2 years ago
info.value = data;
getConfig();
} finally {
}
}
};
1 year ago
// 无需材料互斥(选择了无需的选项,则取消选择所有该字段的其他选项)
const denyAll = (field: string, denyId: number) => {
if (form[field].includes(denyId)) form[field] = [denyId];
};
watch(
() => route.query,
() => {
getDetail();
},
{
immediate: true,
},
);
// 提交
const submit = async (formEl: FormInstance | undefined) => {
if (!formEl) return;
await formEl.validate(async (valid, fields) => {
if (valid) {
try {
2 years ago
const isEnterprise = info.value.productType === 1;
const param = JSON.parse(JSON.stringify(form));
2 years ago
1 year ago
if (param.accountMaterialsCheck === 797 && !param.accountMaterials.length) return ElMessage.error('请选择需要提供的申请人材料');
if (param.sendingAccountCheck === 801 && !param.sendingAccount) return ElMessage.error('请选择需要发放的账户');
if (!param.loanApplicationMethod.length) return ElMessage.error('请选择申请方式');
1 year ago
if (param.borrowerMaterialCheck === 797 && !param.borrowerMaterial.length) return ElMessage.error('请选择借款人材料');
1 year ago
if (isEnterprise) {
// 企业
if (param.enterpriseMaterialCheck === 797 && !param.enterpriseMaterial.length) return ElMessage.error('请选择需要提供的企业材料');
if (param.collateralCheck === 797 && !param.collateral.length) return ElMessage.error('请选择需要提供的抵押物材料');
} else {
// 个人
if (param.mateMaterialCheck === 797 && !param.mateMaterial.length) return ElMessage.error('请选择需要提供的配偶材料');
if (param.businessMaterialsCheck === 797 && !param.businessMaterials.length) return ElMessage.error('请选择需要提供的经营类材料');
}
if (param.supplementaryMaterialsCheck === 797 && !param.supplementaryMaterials.length) return ElMessage.error('请选择需要提供的补充材料');
1 year ago
if (param.runBatchObjectCheck === 803 && !param.runBatchObject.length) return ElMessage.error('请选择需要跑批的对象');
if (param.accessStrategyCheck === 803 && !param.accessStrategy.length) return ElMessage.error('请选择需要跑批的准入策略');
1 year ago
if (!param.dueDiligenceMode) return ElMessage.error('请选择尽调方式');
if (!param.dueDiligenceContent.length) return ElMessage.error('请选择尽调内容');
if (!param.reviewContent) return ElMessage.error('请选择审查材料');
if (!param.reviewSignature) return ElMessage.error('请选择签字表单');
if (!param.reviewApproveContent) return ElMessage.error('请选择审批材料');
if (!param.approvalSignature) return ElMessage.error('请选择签字表单');
if (param.selectionStrategyCheck === 803 && !param.selectionStrategy.length) return ElMessage.error('请选择策略');
1 year ago
param.accessStrategy = param.accessStrategyCheck === 803 ? param.accessStrategy.join() : '';
param.borrowerMaterial = param.borrowerMaterial.join();
param.accountMaterials = param.accountMaterialsCheck === 797 ? param.accountMaterials.join() : '';
if (param.sendingAccountCheck === 802) param.sendingAccount = '';
// 企业
param.collateral = param.collateralCheck === 797 ? param.collateral.join() : '';
param.enterpriseMaterial = param.enterpriseMaterialCheck === 797 ? param.enterpriseMaterial.join() : '';
param.corporateInterestRateModel = param.corporateInterestRateModel.join();
param.materialsForLoanApproval = param.materialsForLoanApproval.join();
// 个人
param.businessMaterials = param.businessMaterialsCheck === 797 ? param.businessMaterials.join() : '';
param.mateMaterial = param.mateMaterialCheck === 797 ? param.mateMaterial.join() : '';
if (param.personalCreditScoringStrategiesCheck !== 797) param.personalCreditScoringStrategies = '';
if (param.corporateCreditScoringStrategiesCheck !== 797) param.corporateCreditScoringStrategies = '';
if (param.interestRatePricingModelCheck !== 803) param.interestRatePricingModel = '';
if (param.loanContractCheck !== 797) param.loanContract = '';
if (param.mortgageContractCheck !== 797) param.mortgageContract = '';
if (param.pledgeContractCheck !== 797) param.pledgeContract = '';
if (param.guaranteeContractCheck !== 797) param.guaranteeContract = '';
param.dueDiligenceContent = param.dueDiligenceContent.join();
param.loanApplicationMethod = param.loanApplicationMethod.join();
param.riskDegreeStrategy = param.riskDegreeStrategyCheck === 803 ? param.riskDegreeStrategy.join() : '';
1 year ago
param.runBatchObject = param.runBatchObjectCheck === 803 ? param.runBatchObject.join() : '';
param.selectionStrategy = param.selectionStrategyCheck === 803 ? param.selectionStrategy.join() : '';
param.supplementaryMaterials = param.supplementaryMaterialsCheck === 797 ? param.supplementaryMaterials.join() : '';
1 year ago
if (param.contractMaterialsCheck !== 797) param.contractMaterials = '';
2 years ago
if (info.value.riskControlDetails) {
param.id = info.value.riskControlDetails.id;
await riskUpdate(param);
2 years ago
addRecord(param);
2 years ago
} else {
2 years ago
await riskSave(param);
addRecord(param);
2 years ago
}
1 year ago
router.push(`/product/bank/detail?type=${route.query.type || ''}&i=${route.query.i}&role=${route.query.role}&id=${id.value}`);
ElMessage.success('提交成功!');
1 year ago
emit('getList');
} finally {
}
} else {
console.log('error submit!', fields);
}
});
};
// 新增判分记录
2 years ago
const addRecord = async (data: Record<string, any>) => {
2 years ago
const isEnterprise = info.value.productType === 1;
const preIds = `1,${Cookies.get('sand-level')},42,66,${isEnterprise ? 71 : 70}`; // 1,关卡id,角色(这个页面是风控经理配置风控),个人/企业(70/71)
1 year ago
const lcRule: Array<Record<string, any>> = [];
// 企业
if (isEnterprise) {
1 year ago
data.accountMaterialsCheck && lcRule.push(handleId(1246, 325, data.accountMaterialsCheck, preIds + ',112,120,1246', 1));
data.accountMaterials && lcRule.push(handleId(1254, 44, data.accountMaterials, preIds + ',112,120,1254', 1));
data.sendingAccountCheck && lcRule.push(handleId(1257, 326, data.sendingAccountCheck, preIds + ',112,121,1257', 1));
data.sendingAccount && lcRule.push(handleId(1255, 45, data.sendingAccount, preIds + ',112,121,1255', 1));
data.loanApplicationMethod && lcRule.push(handleId(122, 46, data.loanApplicationMethod, preIds + ',113,122', 1));
1 year ago
data.enterpriseMaterialCheck && lcRule.push(handleId(1294, 325, data.enterpriseMaterialCheck, preIds + ',113,124,1294', 1));
data.enterpriseMaterial && lcRule.push(handleId(1258, 48, data.enterpriseMaterial, preIds + ',113,124,1258', 1));
1 year ago
form.borrowerMaterialCheck && lcRule.push(handleId(1294, 325, form.borrowerMaterialCheck, preIds + ',113,123,1294', 1));
const borrowerMaterial = [];
form.borrowerMaterial.forEach((e) => {
borrowerMaterial.push(e);
});
1 year ago
borrowerMaterial.length && lcRule.push(handleId(316, 47, borrowerMaterial.join(), preIds + ',113,123,316', 1));
1 year ago
data.collateralCheck && lcRule.push(handleId(1294, 325, data.collateralCheck, preIds + ',113,125,1294', 1));
data.collateral && lcRule.push(handleId(1259, 49, data.collateral, preIds + ',113,125,1259', 1));
data.supplementaryMaterialsCheck && lcRule.push(handleId(1294, 325, data.supplementaryMaterialsCheck, preIds + ',113,126,1294', 1));
data.supplementaryMaterials && lcRule.push(handleId(1260, 50, data.supplementaryMaterials, preIds + ',113,126,1260', 1));
1 year ago
data.runBatchObjectCheck && lcRule.push(handleId(1302, 327, data.runBatchObjectCheck, preIds + ',114,127,1302', 1));
data.runBatchObject && lcRule.push(handleId(1261, 51, data.runBatchObject, preIds + ',114,127,1261', 1));
1 year ago
data.accessStrategyCheck && lcRule.push(handleId(1302, 327, data.accessStrategyCheck, preIds + ',114,128,1302', 1));
data.accessStrategy && lcRule.push(handleId(1262, 52, data.accessStrategy, preIds + ',114,128,1262', 1));
1 year ago
data.personalCreditScoringStrategiesCheck && lcRule.push(handleId(1306, 325, data.personalCreditScoringStrategiesCheck, preIds + ',114,129,1046,1306', 1));
1 year ago
data.personalCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.personalCreditScoringStrategies, preIds + ',114,129,1046,1307', 3));
1 year ago
data.corporateCreditScoringStrategiesCheck && lcRule.push(handleId(1306, 325, data.corporateCreditScoringStrategiesCheck, preIds + ',114,129,1047,1306', 1));
data.corporateCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.corporateCreditScoringStrategies, preIds + ',114,129,1047,1307', 3));
1 year ago
data.riskDegreeStrategyCheck && lcRule.push(handleId(1302, 327, data.riskDegreeStrategyCheck, preIds + ',114,130,1302', 1));
data.riskDegreeStrategy && lcRule.push(handleId(1301, 54, data.riskDegreeStrategy, preIds + ',114,130,1301', 1));
1 year ago
data.interestRatePricingModelCheck && lcRule.push(handleId(1302, 327, data.interestRatePricingModelCheck, preIds + ',114,131,305,1302', 1));
data.interestRatePricingModel && lcRule.push(handleId(1314, 55, data.interestRatePricingModel, preIds + ',114,131,305,1314', 1));
data.individualInterestRateModel && lcRule.push(handleId(304, 327, data.individualInterestRateModel, preIds + ',114,131,304', 1));
data.dueDiligenceMode && lcRule.push(handleId(132, 56, data.dueDiligenceMode, preIds + ',115,132', 1));
data.dueDiligenceContent && lcRule.push(handleId(133, 57, data.dueDiligenceContent, preIds + ',115,133', 1));
data.reviewContent && lcRule.push(handleId(134, 58, data.reviewContent, preIds + ',116,134', 1));
data.reviewSignature && lcRule.push(handleId(135, 59, data.reviewSignature, preIds + ',116,135', 1));
data.reviewApproveContent && lcRule.push(handleId(136, 60, data.reviewApproveContent, preIds + ',117,136', 1));
data.approvalSignature && lcRule.push(handleId(137, 61, data.approvalSignature, preIds + ',117,137', 1));
1 year ago
data.contractMaterialsCheck && lcRule.push(handleId(1264, 325, data.contractMaterialsCheck, preIds + ',118,138,1264', 1));
data.contractMaterials && lcRule.push(handleId(1263, 62, data.contractMaterials, preIds + ',118,138,1263', 1));
1 year ago
data.loanContractCheck && lcRule.push(handleId(1273, 325, data.loanContractCheck, preIds + ',118,139,306,1273', 1));
data.loanContract && lcRule.push(handleId(1269, 63, data.loanContract, preIds + ',118,139,306,1269', 1));
1 year ago
data.mortgageContractCheck && lcRule.push(handleId(1273, 325, data.mortgageContractCheck, preIds + ',118,139,307,1273', 1));
data.mortgageContract && lcRule.push(handleId(1270, 142, data.mortgageContract, preIds + ',118,139,307,1270', 1));
1 year ago
data.pledgeContractCheck && lcRule.push(handleId(1273, 325, data.pledgeContractCheck, preIds + ',118,139,308,1273', 1));
data.pledgeContract && lcRule.push(handleId(1271, 143, data.pledgeContract, preIds + ',118,139,308,1271', 1));
1 year ago
data.guaranteeContractCheck && lcRule.push(handleId(1273, 325, data.guaranteeContractCheck, preIds + ',118,139,309,1273', 1));
data.guaranteeContract && lcRule.push(handleId(1272, 144, data.guaranteeContract, preIds + ',118,139,309,1272', 1));
1 year ago
data.selectionStrategyCheck && lcRule.push(handleId(1302, 327, data.selectionStrategyCheck, preIds + ',119,140,1302', 1));
data.selectionStrategy && lcRule.push(handleId(1315, 64, data.selectionStrategy, preIds + ',119,140,1315', 1));
} else {
1 year ago
data.accountMaterialsCheck && lcRule.push(handleId(1294, 325, data.accountMaterialsCheck, preIds + ',72,75,1294', 1));
1 year ago
data.accountMaterials && lcRule.push(handleId(1295, 20, data.accountMaterials, preIds + ',72,75,1295', 1));
1 year ago
data.sendingAccountCheck && lcRule.push(handleId(1312, 326, data.sendingAccountCheck, preIds + ',72,76,1312', 1));
data.sendingAccount && lcRule.push(handleId(1296, 21, data.sendingAccount, preIds + ',72,76,1296', 1));
data.loanApplicationMethod && lcRule.push(handleId(1289, 22, data.loanApplicationMethod, preIds + ',73,77,1289', 1));
form.borrowerMaterialCheck && lcRule.push(handleId(1294, 325, form.borrowerMaterialCheck, preIds + ',73,78,1294', 1));
const borrowerMaterial = [];
form.borrowerMaterial.forEach((e) => {
borrowerMaterial.push(e);
});
borrowerMaterial.length && lcRule.push(handleId(314, 23, borrowerMaterial.join(), preIds + ',73,78,314', 1));
1 year ago
data.mateMaterialCheck && lcRule.push(handleId(1294, 325, data.mateMaterialCheck, preIds + ',73,79,1294', 1));
data.mateMaterial && lcRule.push(handleId(1291, 24, data.mateMaterial, preIds + ',73,79,1291', 1));
data.businessMaterialsCheck && lcRule.push(handleId(1294, 325, data.businessMaterialsCheck, preIds + ',73,80,1294', 1));
data.businessMaterials && lcRule.push(handleId(1292, 25, data.businessMaterials, preIds + ',73,80,1292', 1));
data.supplementaryMaterialsCheck && lcRule.push(handleId(1294, 325, data.supplementaryMaterialsCheck, preIds + ',73,81,1294', 1));
data.supplementaryMaterials && lcRule.push(handleId(1293, 26, data.supplementaryMaterials, preIds + ',73,81,1293', 1));
1 year ago
data.runBatchObjectCheck && lcRule.push(handleId(1302, 327, data.runBatchObjectCheck, preIds + ',74,82,1302', 1));
1 year ago
data.runBatchObject && lcRule.push(handleId(1297, 27, data.runBatchObject, preIds + ',74,82,1297', 1));
1 year ago
data.accessStrategyCheck && lcRule.push(handleId(1302, 327, data.accessStrategyCheck, preIds + ',74,83,1302', 1));
1 year ago
data.accessStrategy && lcRule.push(handleId(1298, 28, data.accessStrategy, preIds + ',74,83,1298', 1));
1 year ago
data.personalCreditScoringStrategiesCheck && lcRule.push(handleId(1306, 325, data.personalCreditScoringStrategiesCheck, preIds + ',74,84,1304,1306', 1));
1 year ago
data.personalCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.personalCreditScoringStrategies, preIds + ',74,84,1304,1307', 3));
1 year ago
data.corporateCreditScoringStrategiesCheck && lcRule.push(handleId(1306, 325, data.corporateCreditScoringStrategiesCheck, preIds + ',74,84,1305,1306', 1));
1 year ago
data.corporateCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.corporateCreditScoringStrategies, preIds + ',74,84,1305,1307', 3));
1 year ago
data.riskDegreeStrategyCheck && lcRule.push(handleId(1302, 327, data.riskDegreeStrategyCheck, preIds + ',74,85,1302', 1));
data.riskDegreeStrategy && lcRule.push(handleId(1300, 30, data.riskDegreeStrategy, preIds + ',74,85,1300', 1));
1 year ago
data.interestRatePricingModelCheck && lcRule.push(handleId(1302, 327, data.interestRatePricingModelCheck, preIds + ',74,86,1309,1302', 1));
data.interestRatePricingModel && lcRule.push(handleId(1311, 141, data.interestRatePricingModel, preIds + ',74,86,1309,1311', 1));
1 year ago
data.individualInterestRateModel && lcRule.push(handleId(1308, 327, data.individualInterestRateModel, preIds + ',74,86,1308', 1));
data.dueDiligenceMode && lcRule.push(handleId(88, 32, data.dueDiligenceMode, preIds + ',87,88', 1));
data.dueDiligenceContent && lcRule.push(handleId(89, 33, data.dueDiligenceContent, preIds + ',87,89', 1));
data.reviewContent && lcRule.push(handleId(91, 34, data.reviewContent, preIds + ',90,91', 1));
data.reviewSignature && lcRule.push(handleId(92, 35, data.reviewSignature, preIds + ',90,92', 1));
data.reviewApproveContent && lcRule.push(handleId(94, 36, data.reviewApproveContent, preIds + ',93,94', 1));
data.approvalSignature && lcRule.push(handleId(95, 37, data.approvalSignature, preIds + ',93,95', 1));
1 year ago
data.contractMaterialsCheck && lcRule.push(handleId(1248, 325, data.contractMaterialsCheck, preIds + ',96,97,1248', 1));
data.contractMaterials && lcRule.push(handleId(1247, 38, data.contractMaterials, preIds + ',96,97,1247', 1));
data.loanContractCheck && lcRule.push(handleId(1253, 325, data.loanContractCheck, preIds + ',96,98,310,1253', 1));
data.loanContract && lcRule.push(handleId(1249, 39, data.loanContract, preIds + ',96,98,310,1249', 1));
data.mortgageContractCheck && lcRule.push(handleId(1253, 325, data.mortgageContractCheck, preIds + ',96,98,311,1253', 1));
data.mortgageContract && lcRule.push(handleId(1250, 145, data.mortgageContract, preIds + ',96,98,311,1250', 1));
1 year ago
data.pledgeContractCheck && lcRule.push(handleId(1253, 325, data.pledgeContractCheck, preIds + ',96,98,312,1253', 1));
data.pledgeContract && lcRule.push(handleId(1251, 146, data.pledgeContract, preIds + ',96,98,312,1251', 1));
1 year ago
data.guaranteeContractCheck && lcRule.push(handleId(1253, 325, data.guaranteeContractCheck, preIds + ',96,98,313,1253', 1));
data.guaranteeContract && lcRule.push(handleId(1252, 147, data.guaranteeContract, preIds + ',96,98,313,1252', 1));
1 year ago
data.selectionStrategyCheck && lcRule.push(handleId(283, 327, data.selectionStrategyCheck, preIds + ',99,283', 1));
data.selectionStrategy && lcRule.push(handleId(281, 40, data.selectionStrategy, preIds + ',99,281', 1));
}
await addOperation({
...getIds(),
parentId: preIds,
lcJudgmentRuleReq: lcRule,
});
};
</script>
<style lang="scss" scoped>
2 years ago
@import url(../../../styles/form.scss);
</style>