|
|
|
@ -87,8 +87,7 @@ |
|
|
|
|
<div v-if="form.borrowerMaterialSelectedStatus === 797"> |
|
|
|
|
<p class="my-2 text-xs text-[#666]">选择需要提供的借款人材料(至少选一样)</p> |
|
|
|
|
<el-checkbox-group v-if="config.length" |
|
|
|
|
v-model="form.borrowerMaterial" |
|
|
|
|
@change="denyAll('borrowerMaterial', 770)"> |
|
|
|
|
v-model="form.borrowerMaterial"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[1]?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
@ -152,8 +151,7 @@ |
|
|
|
|
<template v-if="form.mateMaterialSelectedStatus === 797"> |
|
|
|
|
<p class="tips">选择需要提供的配偶材料(至少选一样)</p> |
|
|
|
|
<el-checkbox-group v-if="config.length" |
|
|
|
|
v-model="form.mateMaterial" |
|
|
|
|
@change="denyAll('mateMaterial', 350)"> |
|
|
|
|
v-model="form.mateMaterial"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[2]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
@ -173,8 +171,7 @@ |
|
|
|
|
<template v-if="form.businessMaterialsSelectedStatus === 797"> |
|
|
|
|
<p class="tips">选择需要提供的经营类材料(至少选一样)</p> |
|
|
|
|
<el-checkbox-group v-if="config.length" |
|
|
|
|
v-model="form.businessMaterials" |
|
|
|
|
@change="denyAll('businessMaterials', 351)"> |
|
|
|
|
v-model="form.businessMaterials"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[3]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
@ -195,8 +192,7 @@ |
|
|
|
|
<template v-if="form.supplementMaterialSelectedStatus === 797"> |
|
|
|
|
<p class="tips">选择需要提供的补充材料(至少选一样)</p> |
|
|
|
|
<el-checkbox-group v-if="config.length" |
|
|
|
|
v-model="form.supplementaryMaterials" |
|
|
|
|
@change="denyAll('supplementaryMaterials', 352)"> |
|
|
|
|
v-model="form.supplementaryMaterials"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config[1]?.recordChildren[4]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
@ -625,7 +621,8 @@ |
|
|
|
|
:title="curPreviewTitle" |
|
|
|
|
size="100%" |
|
|
|
|
custom-class="model-drawer"> |
|
|
|
|
<component :is="curPreview" |
|
|
|
|
<component v-if="loadedComponents[activeComponent]" |
|
|
|
|
:is="loadedComponents[activeComponent]" |
|
|
|
|
v-model:row="curRow" |
|
|
|
|
disabled |
|
|
|
|
:key="curRow.strategyId" /> |
|
|
|
@ -634,7 +631,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import { ref, reactive, computed, watch, defineAsyncComponent, getCurrentInstance } from 'vue'; |
|
|
|
|
import { ref, reactive, computed, watch, defineAsyncComponent, markRaw } from 'vue'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
import type { TabsPaneContext, FormInstance } from 'element-plus'; |
|
|
|
|
import { findById, riskSave, riskUpdate, riskControlDetailsAreDisplayed } from '@/api/bank'; |
|
|
|
@ -738,7 +735,6 @@ const whethers1 = ref<Record<string, any>>([ |
|
|
|
|
]); |
|
|
|
|
const formRef = ref<FormInstance>(); |
|
|
|
|
const userName = ref<string>(); |
|
|
|
|
const curPreview = ref<string>('150'); |
|
|
|
|
const curRow = ref<Record<string, any>>(); |
|
|
|
|
const strategyParams = { pageNum: 1, pageSize: 100, keyWord: '', ...getIds() }; |
|
|
|
|
const visible = ref<boolean>(false); |
|
|
|
@ -795,26 +791,38 @@ let form = reactive<RuleForm>({ |
|
|
|
|
const curPreviewTitle = ref<string>(); |
|
|
|
|
const assessNames = ['政务黑名单', '征信黑名单', '商采黑名单', '行内黑名单', '企业黑名单', '反欺诈策略', '负面行业黑名单策略']; |
|
|
|
|
const afterNames = ['五级分类策略', '贷后检查策略', '贷后评分卡', '贷后预警策略', '贷后催收策略']; |
|
|
|
|
const dynamicComponentMap = { |
|
|
|
|
'150': defineAsyncComponent(() => import('../strategy/150/Detail.vue')), |
|
|
|
|
'151': defineAsyncComponent(() => import('../strategy/151/Detail.vue')), |
|
|
|
|
'152': defineAsyncComponent(() => import('../strategy/152/Detail.vue')), |
|
|
|
|
'153': defineAsyncComponent(() => import('../strategy/153/Detail.vue')), |
|
|
|
|
'154': defineAsyncComponent(() => import('../strategy/154/Detail.vue')), |
|
|
|
|
'155': defineAsyncComponent(() => import('../strategy/155/Detail.vue')), |
|
|
|
|
'156': defineAsyncComponent(() => import('../strategy/156/Detail.vue')), |
|
|
|
|
'512': defineAsyncComponent(() => import('../strategy/512/Detail.vue')), |
|
|
|
|
'513': defineAsyncComponent(() => import('../strategy/513/Detail.vue')), |
|
|
|
|
'1029': defineAsyncComponent(() => import('../afterLoan/1029/Detail.vue')), |
|
|
|
|
'1030': defineAsyncComponent(() => import('../afterLoan/1030/Detail.vue')), |
|
|
|
|
'1031': defineAsyncComponent(() => import('../afterLoan/1031/Detail.vue')), |
|
|
|
|
'1032': defineAsyncComponent(() => import('../afterLoan/1032/Detail.vue')), |
|
|
|
|
'1033': defineAsyncComponent(() => import('../afterLoan/1033/Detail.vue')), |
|
|
|
|
const asyncComponents = { |
|
|
|
|
150: defineAsyncComponent(() => import('../strategy/150/Detail.vue')), |
|
|
|
|
151: defineAsyncComponent(() => import('../strategy/151/Detail.vue')), |
|
|
|
|
152: defineAsyncComponent(() => import('../strategy/152/Detail.vue')), |
|
|
|
|
153: defineAsyncComponent(() => import('../strategy/153/Detail.vue')), |
|
|
|
|
154: defineAsyncComponent(() => import('../strategy/154/Detail.vue')), |
|
|
|
|
155: defineAsyncComponent(() => import('../strategy/155/Detail.vue')), |
|
|
|
|
156: defineAsyncComponent(() => import('../strategy/156/Detail.vue')), |
|
|
|
|
512: defineAsyncComponent(() => import('../strategy/512/Detail.vue')), |
|
|
|
|
513: defineAsyncComponent(() => import('../strategy/513/Detail.vue')), |
|
|
|
|
1029: defineAsyncComponent(() => import('../afterLoan/1029/Detail.vue')), |
|
|
|
|
1030: defineAsyncComponent(() => import('../afterLoan/1030/Detail.vue')), |
|
|
|
|
1031: defineAsyncComponent(() => import('../afterLoan/1031/Detail.vue')), |
|
|
|
|
1032: defineAsyncComponent(() => import('../afterLoan/1032/Detail.vue')), |
|
|
|
|
1033: defineAsyncComponent(() => import('../afterLoan/1033/Detail.vue')), |
|
|
|
|
}; |
|
|
|
|
const loadedComponents = markRaw({}); |
|
|
|
|
const activeComponent = ref<string>(''); |
|
|
|
|
|
|
|
|
|
// 加载组件的方法 |
|
|
|
|
const loadComponent = async (componentName: string) => { |
|
|
|
|
if (!loadedComponents[componentName]) { |
|
|
|
|
try { |
|
|
|
|
loadedComponents[componentName] = asyncComponents[componentName]; |
|
|
|
|
activeComponent.value = componentName; |
|
|
|
|
} catch (error) { |
|
|
|
|
console.error(`Failed to load component ${componentName}`, error); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
activeComponent.value = componentName; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
const app = getCurrentInstance().appContext.app; |
|
|
|
|
for (const [name, asyncComponent] of Object.entries(dynamicComponentMap)) { |
|
|
|
|
app.component(name, asyncComponent); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// tab切换回调 |
|
|
|
|
const tabChange = (tab: TabsPaneContext, event: Event) => { |
|
|
|
@ -997,6 +1005,7 @@ const getDetail = async () => { |
|
|
|
|
if (e) { |
|
|
|
|
if (e.personalRiskDegreeStrategySelectedStatus) e.personalRiskDegreeStrategySelectedStatus = +e.personalRiskDegreeStrategySelectedStatus; |
|
|
|
|
if (e.enterpriseRiskDegreeStrategySelectedStatus) e.enterpriseRiskDegreeStrategySelectedStatus = +e.enterpriseRiskDegreeStrategySelectedStatus; |
|
|
|
|
if (e.enterpriseQuotaModelSelectedStatus) e.enterpriseQuotaModelSelectedStatus = +e.enterpriseQuotaModelSelectedStatus; |
|
|
|
|
e.enterpriseQuotaModel = e?.enterpriseQuotaModel?.split(',').map((e) => +e); |
|
|
|
|
e.reviewSignature = e?.reviewSignature?.length ? e.reviewSignature[0] : ''; |
|
|
|
|
e.approvalSignature = e?.approvalSignature?.length ? e.approvalSignature[0] : ''; |
|
|
|
@ -1013,10 +1022,6 @@ const getDetail = async () => { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 无需材料互斥(选择了无需的选项,则取消选择所有该字段的其他选项) |
|
|
|
|
const denyAll = (field: string, denyId: number) => { |
|
|
|
|
if (form[field].includes(denyId)) form[field] = [denyId]; |
|
|
|
|
}; |
|
|
|
|
watch( |
|
|
|
|
() => route.query, |
|
|
|
|
() => { |
|
|
|
@ -1421,34 +1426,34 @@ const addRecord = async (data: Record<string, any>) => { |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 预览策略 |
|
|
|
|
const preview = (row: Record<string, any>, i: number) => { |
|
|
|
|
const preview = async (row: Record<string, any>, i: number) => { |
|
|
|
|
const { tacticsId } = form.bankRiskControlAllocationTacticsList[i]; |
|
|
|
|
curRow.value = { |
|
|
|
|
strategyId: tacticsId, |
|
|
|
|
strategyName: row.blackList.find((e) => e.strategyId === tacticsId)?.strategyName, |
|
|
|
|
}; |
|
|
|
|
curPreview.value = Object.keys(dynamicComponentMap)[i]; |
|
|
|
|
await loadComponent(Object.keys(asyncComponents)[i]); |
|
|
|
|
curPreviewTitle.value = `查看${assessNames[i]}策略`; |
|
|
|
|
visible.value = true; |
|
|
|
|
}; |
|
|
|
|
// 预览信用评分策略 |
|
|
|
|
const previewCredits = (row: Record<string, any>, i: number) => { |
|
|
|
|
const previewCredits = async (row: Record<string, any>, i: number) => { |
|
|
|
|
const { tacticsId } = form.creditScoringStrategyList[i]; |
|
|
|
|
curRow.value = { |
|
|
|
|
id: tacticsId, |
|
|
|
|
}; |
|
|
|
|
curPreview.value = i ? '513' : '512'; |
|
|
|
|
await loadComponent(i ? '513' : '512'); |
|
|
|
|
curPreviewTitle.value = `查看${i ? '企业' : '个人'}信用评分策略`; |
|
|
|
|
visible.value = true; |
|
|
|
|
}; |
|
|
|
|
// 预览贷后管理 |
|
|
|
|
const previewAfter = (row: Record<string, any>, i: number) => { |
|
|
|
|
const previewAfter = async (row: Record<string, any>, i: number) => { |
|
|
|
|
const { tacticsId } = form.postLoanSelectionStrategyList[i]; |
|
|
|
|
curRow.value = { |
|
|
|
|
strategyId: tacticsId, |
|
|
|
|
strategyName: row.blackList.find((e) => e.strategyId === tacticsId)?.strategyName, |
|
|
|
|
}; |
|
|
|
|
curPreview.value = Object.keys(dynamicComponentMap)[i + 9]; |
|
|
|
|
await loadComponent(Object.keys(asyncComponents)[i + 9]); |
|
|
|
|
curPreviewTitle.value = `查看${afterNames[i]}策略`; |
|
|
|
|
visible.value = true; |
|
|
|
|
}; |
|
|
|
|