额度模型完成

V0.1
yujialong 1 year ago
parent 978570f1e0
commit 1e031b35c1
  1. 4
      .env
  2. 8
      src/api/model.ts
  3. 7
      src/layout/components/AppSidebar/Menu.vue
  4. 5
      src/router/index.ts
  5. 4
      src/views/Role.vue
  6. 1
      src/views/config/level/Index.vue
  7. 6
      src/views/product/bank/Add.vue
  8. 161
      src/views/product/bank/Config.vue
  9. 301
      src/views/product/interestRate/772.vue
  10. 176
      src/views/product/interestRate/773.vue
  11. 118
      src/views/product/interestRate/CardList.vue
  12. 14
      src/views/product/strategy/150.vue

@ -2,7 +2,7 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘
VITE_PORT=9520
VITE_PROXY=http://192.168.31.125:8080
VITE_PUBLIC_PATH=./
VITE_BASE_API=http://192.168.31.217:9000
# VITE_BASE_API=http://121.37.12.51
# VITE_BASE_API=http://192.168.31.217:9000
VITE_BASE_API=http://121.37.12.51
VITE_I18N_LOCALE=zh-cn
VITE_I18N_FALLBACK_LOCALE=zh-cn

@ -54,11 +54,11 @@ export const personalInterestRateDetails = async (data: Record<string, any>): Pr
export const personalInterestRateSaveOrUpdate = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/interestRateModel/personalInterestRateSaveOrUpdate`, data)).data;
export const businessQuotaModelDetails = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/quotaModel/businessQuotaModelDetails?checkpointId=${data.checkpointId}&projectId=${data.projectId}`)).data;
export const businessQuotaModelDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/quotaModel/businessQuotaModelDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const businessQuotaModelSaveOrUpdate = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/quotaModel/businessQuotaModelSaveOrUpdate`, data)).data;
export const personalCreditModelDetails = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/quotaModel/personalCreditModelDetails?checkpointId=${data.checkpointId}&projectId=${data.projectId}`)).data;
export const personalCreditModelDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/quotaModel/personalCreditModelDetails?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const personalCreditModelSaveOrUpdate = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/quotaModel/personalCreditModelSaveOrUpdate`, data)).data;

@ -36,7 +36,7 @@
<p class="text">产品风控配置</p>
</li>
<li :class="{ active: active == 2 }"
@click="toPage('/product/strategy?type=&i=2&role=42')">
@click="toPage('/product/strategy?&i=2&role=42')">
<img class="icon"
src="@/assets/images/icon2.png"
alt="" />
@ -45,7 +45,8 @@
alt="" />
<p class="text">贷前准入模型</p>
</li>
<li>
<li :class="{ active: active == 3 }"
@click="toPage('/product/interestRate/tab1?&i=3&role=42')">
<img class="icon"
src="@/assets/images/icon3.png"
alt="" />
@ -72,7 +73,7 @@
alt="" />
<p class="text">审批产品</p>
</li>
<!-- 参数配置 -->
<!-- 保险 -->
<li v-else-if="route.path.includes('insurance')"
class="active">
<img class="icon-1"

@ -35,8 +35,9 @@ export const routes: Array<RouteRecordRaw> = [
{ path: 'bank', component: () => import('@/views/product/bank/List.vue'), meta: { title: '银行产品列表' } },
{ path: 'bank/:action', component: () => import('@/views/product/bank/CardList.vue'), meta: { title: '产品列表' } },
{ path: 'strategy', component: () => import('@/views/product/strategy/CardList.vue'), meta: { title: '产品列表' } },
{ path: 'insurance', component: () => import('@/views/product/insurance/List.vue'), meta: { title: '保险产品列表' } },
{ path: 'insurance/:action', component: () => import('@/views/product/insurance/CardList.vue'), meta: { title: '保险产品列表' } },
{ path: 'insurance', component: () => import('@/views/product/insurance/List.vue'), meta: { title: '保险产品' } },
{ path: 'insurance/:action', component: () => import('@/views/product/insurance/CardList.vue'), meta: { title: '保险产品' } },
{ path: 'interestRate/:action', component: () => import('@/views/product/interestRate/CardList.vue'), meta: { title: '利率定价模型' } },
],
},
{

@ -71,7 +71,7 @@
<div class="role bottom-[50px] left-[100px] bg-[url('@/assets/images/role/insurance.png')] hover:bg-[url('@/assets/images/role/insurance1.png')]"
@click="selecRole(275)"></div>
</div>
<div class="fixed top-[80px] right-[80px]">
<!-- <div class="fixed top-[80px] right-[80px]">
<div class="flex items-center h-[60px] px-4 rounded-tl-[20px] rounded-tr-[20px]"
style="background: linear-gradient(180deg, #7ebaff 0%, #0076ff 100%)">
<div class="w-[112px] h-[28px] bg-[url('@/assets/images/role/1.png')] bg-[length:100%_100%] bg-no-repeat"></div>
@ -106,7 +106,7 @@
</div>
</div>
</div>
</div>
</div> -->
<Panel />
</template>

@ -244,6 +244,7 @@ const toAdd = () => {
list.value.push({
customsPassName: '',
editing: true,
isEnable: 0,
});
nextTick(() => {
document.querySelector('#tableWrap').scrollTo({

@ -135,12 +135,12 @@
<p class="field-name">选择本产品贷款资金的用途</p>
<el-radio-group v-model="form.loanPurpose">
<template v-if="form.productType">
<el-radio v-for="(item, i) in config.find((e: any) => e.name === '企业产品-贷款用途')?.subject?.itemList"
<el-radio v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款用途')?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</template>
<template v-else>
<el-radio v-for="(item, i) in config.find((e: any) => e.name === '个人产品-贷款用途')?.recordChildren"
<el-radio v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款用途')?.recordChildren"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</template>
@ -459,7 +459,7 @@ const addRecord = async (data: Record<string, any>) => {
data.providentFundAndSocialSecurity && lcRule.push(handleId(103, '', '', preIds + ',51,103', '')); //
lcRule.push(
data.loanPurpose === 107 ? handleId(107, 11, data.otherPurposesOfLoan, preIds + ',52,107', 3) : handleId(data.loanPurpose, '', '', preIds + ',52,' + data.loanPurpose, 1),
data.loanPurpose === 107 ? handleId(107, 11, data.otherPurposesOfLoan, preIds + ',52,107', 3) : handleId(data.loanPurpose, '', '', preIds + ',52,' + data.loanPurpose, ''),
);
}

@ -175,19 +175,7 @@
</el-form-item>
<el-form-item label="利率定价模型"
label-width="130px"
prop="interestRatePricingModelCheck"
:rules="[
{ required: true, message: '请选择利率定价模型', trigger: 'change' },
{
asyncValidator: async (rule, value, callback) => {
if (value && !form.interestRatePricingModel) {
callback(`请选择${info.productType ? '企业' : '个人'}额度模型`)
} else {
callback()
}
},
},
]">
prop="interestRatePricingModelCheck">
<div class="flex-1">
<div class="flex items-center mb-3">
<el-checkbox v-model="form.interestRatePricingModelCheck"
@ -203,7 +191,7 @@
</el-select>
</div>
<el-checkbox v-model="form.individualInterestRateModel"
:label="103">{{ info.productType ? '企业' : '个人' }}利率模型</el-checkbox>
:label="info.productType ? 763 : 762">{{ info.productType ? '企业' : '个人' }}利率模型</el-checkbox>
</div>
</el-form-item>
</div>
@ -257,7 +245,7 @@
<el-form-item label="提供的材料"
prop="contractMaterials">
<el-radio v-model="form.contractMaterials"
:label="117">抵押物所有权证明</el-radio>
:label="info.productType ? 265 : 118">抵押物所有权证明</el-radio>
</el-form-item>
<el-form-item label="合同模板">
<div class="flex-1">
@ -411,13 +399,13 @@ const form = reactive<RuleForm>({
projectId,
accessStrategy: [],
accountMaterials: [],
approvalSignature: [],
approvalSignature: '',
bankProductsId: computed(() => +route.query.id),
borrowerMaterial: [],
borrowerMaterialSelect: '',
businessMaterials: [],
collateral: [],
contractMaterials: [],
contractMaterials: '',
corporateCreditScoringStrategiesCheck: false,
corporateCreditScoringStrategies: '',
corporateInterestRateModel: [],
@ -438,9 +426,9 @@ const form = reactive<RuleForm>({
personalCreditScoringStrategies: '',
pledgeContractCheck: false,
pledgeContract: '',
reviewApproveContent: [],
reviewApproveContent: '',
reviewContent: '',
reviewSignature: [],
reviewSignature: '',
riskDegreeStrategy: [],
runBatchObject: [],
selectionStrategy: [],
@ -485,7 +473,6 @@ watch(
immediate: true,
},
);
onMounted(() => {});
//
const submit = async (formEl: FormInstance | undefined) => {
if (!formEl) return;
@ -495,38 +482,22 @@ const submit = async (formEl: FormInstance | undefined) => {
const isEnterprise = info.value.productType === 1;
const param = JSON.parse(JSON.stringify(form));
// if (((isEnterprise && param.borrowerMaterial?.includes(316)) || (!isEnterprise && param.borrowerMaterial?.includes(314))) && !param.borrowerMaterialSelect)
// return ElMessage.error('');
// if (
// (param.personalCreditScoringStrategiesCheck && !param.personalCreditScoringStrategies) ||
// (param.corporateCreditScoringStrategiesCheck && !param.corporateCreditScoringStrategies)
// )
// return ElMessage.error('');
// if (param.loanContractCheck && !param.loanContract) return ElMessage.error('');
// if (param.mortgageContractCheck && !param.mortgageContract) return ElMessage.error('');
// if (param.pledgeContractCheck && !param.pledgeContract) return ElMessage.error('');
// if (param.guaranteeContractCheck && !param.guaranteeContract) return ElMessage.error('');
param.accessStrategy = param.accessStrategy.join();
if ((isEnterprise && param.borrowerMaterial?.includes(316)) || (!isEnterprise && param.borrowerMaterial?.includes(314)))
param.borrowerMaterial.splice(1, 0, param.borrowerMaterialSelect);
param.borrowerMaterial = param.borrowerMaterial.join();
param.accountMaterials = param.accountMaterials.join();
param.approvalSignature = param.approvalSignature[0];
//
// if (isEnterprise) {
param.collateral = param.collateral.join();
param.enterpriseMaterial = param.enterpriseMaterial.join();
param.corporateInterestRateModel = param.corporateInterestRateModel.join();
param.materialsForLoanApproval = param.materialsForLoanApproval.join();
// } else {
//
param.businessMaterials = param.businessMaterials.join();
param.mateMaterial = param.mateMaterial.join();
param.individualInterestRateModel = param.individualInterestRateModel.join();
// }
if (!param.personalCreditScoringStrategiesCheck) param.personalCreditScoringStrategies = '';
if (!param.corporateCreditScoringStrategiesCheck) param.corporateCreditScoringStrategies = '';
if (!param.personalCreditScoringStrategiesCheck) param.personalCreditScoringStrategies = 761;
if (!param.corporateCreditScoringStrategiesCheck) param.corporateCreditScoringStrategies = 761;
if (!param.interestRatePricingModelCheck) param.interestRatePricingModel = '';
if (!param.loanContractCheck) param.loanContract = '';
@ -534,17 +505,12 @@ const submit = async (formEl: FormInstance | undefined) => {
if (!param.pledgeContractCheck) param.pledgeContract = '';
if (!param.guaranteeContractCheck) param.guaranteeContract = '';
param.contractMaterials = param.contractMaterials[0];
param.dueDiligenceContent = param.dueDiligenceContent.join();
param.loanApplicationMethod = param.loanApplicationMethod.join();
param.reviewApproveContent = param.reviewApproveContent[0];
// if (param.reviewContent) param.reviewContent = 114;
param.reviewSignature = param.reviewSignature[0] || '';
param.riskDegreeStrategy = param.riskDegreeStrategy.join();
param.runBatchObject = param.runBatchObject.join();
param.selectionStrategy = param.selectionStrategy.join();
param.supplementaryMaterials = param.supplementaryMaterials.join();
if (info.value.riskControlDetails) {
param.id = info.value.riskControlDetails.id;
await riskUpdate(param);
@ -566,82 +532,89 @@ const submit = async (formEl: FormInstance | undefined) => {
//
const addRecord = async (data: Record<string, any>) => {
const isEnterprise = info.value.productType === 1;
const preIds = `1,${Cookies.get('sand-level')},42,${data.productType ? 71 : 70}`; // 1id/70/71
const preIds = `1,${Cookies.get('sand-level')},42,66,${isEnterprise ? 71 : 70}`; // 1id/70/71
const lcRule: Array<Record<string, any>> = [];
//
if (isEnterprise) {
lcRule.push(
handleId(120, 44, data.accountMaterials, preIds + ',112,120', 1),
handleId(121, 45, 162, preIds + ',112,121', 1),
handleId(122, 46, data.loanApplicationMethod, preIds + ',113,122', 1),
handleId(123, 47, data.borrowerMaterial, preIds + ',113,123', 1),
handleId(124, 48, data.collateral, preIds + ',113,124', 1),
handleId(125, 49, data.businessMaterials, preIds + ',113,125', 1),
handleId(126, 50, data.supplementaryMaterials, preIds + ',113,126', 1),
data.accountMaterials && lcRule.push(handleId(120, 44, data.accountMaterials, preIds + ',112,120', 1));
data.sendingAccount && lcRule.push(handleId(121, 45, 162, preIds + ',112,121', 1));
data.loanApplicationMethod && lcRule.push(handleId(122, 46, data.loanApplicationMethod, preIds + ',113,122', 1));
const borrowerMaterial = [];
form.borrowerMaterial.forEach((e) => {
e != 316 && borrowerMaterial.push(e);
});
borrowerMaterial && lcRule.push(handleId(316, 47, borrowerMaterial.join(), preIds + ',113,123,316', 1));
data.borrowerMaterialSelect && lcRule.push(handleId(317, 149, data.borrowerMaterialSelect, preIds + ',113,123,317', 1));
data.collateral && lcRule.push(handleId(124, 48, data.collateral, preIds + ',113,124', 1));
data.businessMaterials && lcRule.push(handleId(125, 49, data.businessMaterials, preIds + ',113,125', 1));
data.supplementaryMaterials && lcRule.push(handleId(126, 50, data.supplementaryMaterials, preIds + ',113,126', 1));
data.runBatchObject && lcRule.push(handleId(127, 51, data.runBatchObject, preIds + ',114,127', 1));
data.accessStrategy && lcRule.push(handleId(128, 52, data.accessStrategy, preIds + ',114,128', 1));
handleId(127, 51, data.runBatchObject, preIds + ',114,127', 1),
handleId(128, 52, data.accessStrategy, preIds + ',114,128', 1),
);
//
lcRule.push(handleId(1044, 302, data.personalCreditScoringStrategiesCheck ? 759 : 760, preIds + ',114,129,1046,1044', 1));
lcRule.push(handleId(1044, 302, data.corporateCreditScoringStrategiesCheck ? 759 : 760, preIds + ',114,129,1047,1044', 1));
data.personalCreditScoringStrategies === 761 && lcRule.push(handleId(1045, 303, data.personalCreditScoringStrategies, preIds + ',114,129,1046,1045', 1));
data.corporateCreditScoringStrategiesCheck && lcRule.push(handleId(129, 53, '241,' + data.corporateCreditScoringStrategies, preIds + ',114,129', 1));
data.corporateCreditScoringStrategies === 761 && lcRule.push(handleId(129, 53, '241,' + data.corporateCreditScoringStrategies, preIds + ',114,129', 1));
lcRule.push(handleId(130, 54, data.riskDegreeStrategy, preIds + ',114,130', 1));
data.interestRatePricingModelCheck && lcRule.push(handleId(131, 55, '247,' + data.interestRatePricingModel, preIds + ',114,131', 1));
data.individualInterestRateModel && lcRule.push(handleId(131, 55, data.individualInterestRateModel, preIds + ',114,131', 1));
data.riskDegreeStrategy && lcRule.push(handleId(130, 54, data.riskDegreeStrategy, preIds + ',114,130', 1));
data.interestRatePricingModelCheck && lcRule.push(handleId(305, 55, data.interestRatePricingModel, preIds + ',114,131,305', 1));
data.individualInterestRateModel && lcRule.push(handleId(763, 305, 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));
data.contractMaterials && lcRule.push(handleId(138, 62, data.contractMaterials, preIds + ',118,138', 1));
lcRule.push(
handleId(132, 56, data.dueDiligenceMode, preIds + ',115,132', 1),
handleId(133, 57, data.dueDiligenceContent, preIds + ',115,133', 1),
handleId(134, 58, data.reviewContent, preIds + ',116,134', 1),
handleId(135, 59, data.reviewSignature, preIds + ',116,135', 1),
handleId(136, 60, data.reviewApproveContent, preIds + ',117,136', 1),
handleId(137, 61, data.approvalSignature, preIds + ',117,137', 1),
handleId(138, 62, data.contractMaterials, preIds + ',118,138', 1),
);
data.loanContract && lcRule.push(handleId(139, 63, data.loanContract, preIds + ',118,139', 1));
data.mortgageContract && lcRule.push(handleId(139, 63, data.mortgageContract, preIds + ',118,139', 1));
data.pledgeContract && lcRule.push(handleId(139, 63, data.pledgeContract, preIds + ',118,139', 1));
data.guaranteeContract && lcRule.push(handleId(139, 63, data.guaranteeContract, preIds + ',118,139', 1));
lcRule.push(handleId(140, 64, data.selectionStrategy, preIds + ',119,140', 1));
data.selectionStrategy && lcRule.push(handleId(140, 64, data.selectionStrategy, preIds + ',119,140', 1));
} else {
lcRule.push(
handleId(75, 20, data.accountMaterials, preIds + ',72,75', 1),
handleId(76, 21, 46, preIds + ',72,76', 1),
handleId(77, 22, data.loanApplicationMethod, preIds + ',73,77', 1),
handleId(78, 23, data.borrowerMaterial, preIds + ',73,78', 1),
handleId(79, 24, data.mateMaterial, preIds + ',73,79', 1),
handleId(80, 25, data.businessMaterials, preIds + ',73,80', 1),
handleId(81, 26, data.supplementaryMaterials, preIds + ',73,81', 1),
handleId(82, 27, data.runBatchObject, preIds + ',74,82', 1),
handleId(83, 28, data.accessStrategy, preIds + ',74,83', 1),
);
data.accountMaterials && lcRule.push(handleId(75, 20, data.accountMaterials, preIds + ',72,75', 1));
data.sendingAccount && lcRule.push(handleId(76, 21, 46, preIds + ',72,76', 1));
data.loanApplicationMethod && lcRule.push(handleId(77, 22, data.loanApplicationMethod, preIds + ',73,77', 1));
const borrowerMaterial = [];
form.borrowerMaterial.forEach((e) => {
e != 314 && borrowerMaterial.push(e);
});
borrowerMaterial.length && lcRule.push(handleId(314, 23, borrowerMaterial.join(), preIds + ',73,78,314', 1));
data.borrowerMaterialSelect && lcRule.push(handleId(315, 148, data.borrowerMaterialSelect, preIds + ',73,78,315', 1));
data.mateMaterial && lcRule.push(handleId(79, 24, data.mateMaterial, preIds + ',73,79', 1));
data.businessMaterials && lcRule.push(handleId(80, 25, data.businessMaterials, preIds + ',73,80', 1));
data.supplementaryMaterials && lcRule.push(handleId(81, 26, data.supplementaryMaterials, preIds + ',73,81', 1));
data.runBatchObject && lcRule.push(handleId(82, 27, data.runBatchObject, preIds + ',74,82', 1));
data.accessStrategy && lcRule.push(handleId(83, 28, data.accessStrategy, preIds + ',74,83', 1));
//
lcRule.push(handleId(1044, 302, data.personalCreditScoringStrategiesCheck ? 759 : 760, preIds + ',74,84,1046,1044', 1));
lcRule.push(handleId(1044, 302, data.corporateCreditScoringStrategiesCheck ? 759 : 760, preIds + ',74,84,1047,1044', 1));
data.personalCreditScoringStrategies === 761 && lcRule.push(handleId(1045, 303, data.personalCreditScoringStrategies, preIds + ',74,84,1046,1045', 1));
data.corporateCreditScoringStrategiesCheck && lcRule.push(handleId(84, 29, '95,' + data.corporateCreditScoringStrategies, preIds + ',74,84', 1));
data.corporateCreditScoringStrategies === 761 && lcRule.push(handleId(1047, 303, data.corporateCreditScoringStrategies, preIds + ',74,84,1047,1045', 1));
lcRule.push(handleId(85, 30, data.riskDegreeStrategy, preIds + ',74,85', 1));
data.interestRatePricingModelCheck && lcRule.push(handleId(86, 31, '102,' + data.interestRatePricingModel, preIds + ',74,86', 1));
data.individualInterestRateModel && lcRule.push(handleId(86, 31, data.individualInterestRateModel, preIds + ',74,86', 1));
data.riskDegreeStrategy && lcRule.push(handleId(85, 30, data.riskDegreeStrategy, preIds + ',74,85', 1));
data.interestRatePricingModelCheck && lcRule.push(handleId(303, 141, data.interestRatePricingModel, preIds + ',74,86,303', 1));
data.individualInterestRateModel && lcRule.push(handleId(302, 304, data.individualInterestRateModel, preIds + ',74,86,302', 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));
data.contractMaterials && lcRule.push(handleId(97, 38, data.contractMaterials, preIds + ',96,97', 1));
lcRule.push(
handleId(88, 32, data.dueDiligenceMode, preIds + ',87,88', 1),
handleId(89, 33, data.dueDiligenceContent, preIds + ',87,89', 1),
handleId(91, 34, data.reviewContent, preIds + ',90,91', 1),
handleId(92, 35, data.reviewSignature, preIds + ',90,92', 1),
handleId(94, 36, data.reviewApproveContent, preIds + ',93,94', 1),
handleId(95, 37, data.approvalSignature, preIds + ',93,95', 1),
handleId(97, 38, data.contractMaterials, preIds + ',96,97', 1),
);
data.loanContract && lcRule.push(handleId(98, 39, data.loanContract, preIds + ',96,98', 1));
data.mortgageContract && lcRule.push(handleId(98, 39, data.mortgageContract, preIds + ',96,98', 1));
data.pledgeContract && lcRule.push(handleId(98, 39, data.pledgeContract, preIds + ',96,98', 1));
data.guaranteeContract && lcRule.push(handleId(98, 39, data.guaranteeContract, preIds + ',96,98', 1));
lcRule.push(handleId(99, 40, data.selectionStrategy, preIds + ',99', 1));
data.selectionStrategy && lcRule.push(handleId(99, 40, data.selectionStrategy, preIds + ',99', 1));
}
await addOperation({

@ -0,0 +1,301 @@
<template>
<!-- 个人额度模型 -->
<el-form label-width="80px"
class="form"
status-icon>
<h6 class="step-name mb-2">{{ formProcess[0]?.name }}</h6>
<el-form-item label="不超过">
<el-select v-model="form.firstMode">
<el-option v-for="item in formProcess[0]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<h6 class="step-name mt-4 mb-2">{{ formProcess[1]?.name }}</h6>
<el-form-item label="不超过">
<el-select v-model="form.secondMode">
<el-option v-for="item in formProcess[1]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<h6 class="step-name mt-4 mb-2">{{ formProcess[2]?.name }}</h6>
<el-form-item label="不超过">
<el-select v-model="form.thirdMode">
<el-option v-for="item in formProcess[2]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<el-form-item label="且"></el-form-item>
<el-form-item label="不超过">
<el-select v-model="form.andThird">
<el-option v-for="item in formProcess[2]?.recordChildren[1]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<el-form-item label="额度模型">
<el-table class="c-table"
:data="form.individualCreditModels"
:span-method="span"
border>
<el-table-column prop="indexName"
label="指标名称"
min-width="100"
align="center">
<template #default="{ row, $index }">
<span :class="{'text-[#006bff]': !$index || $index === len}">{{ row?.indexName }}</span>
</template>
</el-table-column>
<el-table-column label="描述"
min-width="150">
<template #default="{ row, $index }">
<span :class="{'text-[#006bff]': !$index || $index === len}">{{ row?.description }}</span>
</template>
</el-table-column>
<el-table-column label="分值"
min-width="150">
<template #default="{ row, $index }">
<div v-if="$index !== len"
class="flex items-center">
<span v-if="!$index"
class="mr-2 whitespace-nowrap">{{ row?.subject?.name }}</span>
<el-select v-model="row.score">
<el-option v-for="item in row?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</div>
<span v-else
class="text-[#006bff]">以上分值合计</span>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<div class="flex justify-end">
<div class="submit"
@click="submit">确认完成配置</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { personalCreditModelDetails, personalCreditModelSaveOrUpdate } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import { handleId } from '@/utils/common';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>>({
projectId,
checkpointId: levelId,
andThird: '',
firstMode: '',
secondMode: '',
thirdMode: '',
type: 1,
individualCreditModels: [],
});
const formProcess = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const len = ref<number>(0);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(772);
formProcess.value = process.slice(0, 3);
const list = process[3]?.recordChildren;
let cur = info.value.length ? info.value[0] : {};
const result = [
{
modelId: cur?.modelId || '',
id: cur?.id || '',
indexName: list[0]?.name,
description: list[0]?.remark,
subject: list[0]?.recordChildren[0]?.subject,
score: cur?.score || '',
},
];
const length = list.length - 1;
list?.forEach((e, i) => {
if (i && i !== length) {
cur = info.value.length ? info.value[i] : {};
let temp = {
indexName: e.name,
recordChildren: e.recordChildren,
stRecordId: e.id,
ruleId: e?.recordChildren[0]?.id || '',
description: e?.recordChildren[0]?.name || '',
subject: e?.recordChildren[0]?.subject || [],
score: '',
};
result.push(temp);
e?.recordChildren.forEach((n, j) => {
if (j) {
temp = JSON.parse(JSON.stringify(temp));
temp.description = n.name;
temp.subject = n.subject;
temp.ruleId = n.id;
result.push(temp);
}
});
}
});
cur = info.value.length ? info.value[info.value.length - 1] : {};
result.push({
indexName: list[length]?.name,
description: list[length]?.remark,
subject: list[length]?.subject,
score: '',
});
len.value = result.length - 1;
if (info.value.length) {
result.forEach((e, i) => {
result[i].score = info.value[i].score;
result[i].id = info.value[i].id;
result[i].modelId = info.value[i].modelId;
});
}
form.value.individualCreditModels = result;
};
//
const getDetail = async () => {
try {
const { data } = await personalCreditModelDetails(levelId, projectId);
if (data) {
form.value = data;
info.value = data.individualCreditModels;
}
getConfig();
} finally {
}
};
onMounted(() => {
getDetail();
});
interface SpanMethodProps {
row: Record<string, any>;
column: TableColumnCtx<Record<string, any>>;
rowIndex: number;
columnIndex: number;
}
const rowMerge1 = [1, 7, 16, 23, 71, 75, 87, 98];
const rowMerge2 = [5, 30, 59, 61, 63, 79];
const rowMerge3 = [11, 38, 45];
const rowMerge4 = [20, 27, 50, 53, 56, 65, 68, 81, 84, 102, 105, 108];
const rowMerge5 = [0, 43, 44, 111];
//
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (columnIndex === 0) {
if (rowMerge1.includes(rowIndex)) {
return {
rowspan: 4,
colspan: 1,
};
} else if (rowMerge2.includes(rowIndex)) {
return {
rowspan: 2,
colspan: 1,
};
} else if (rowMerge3.includes(rowIndex)) {
return {
rowspan: 5,
colspan: 1,
};
} else if (rowMerge4.includes(rowIndex)) {
return {
rowspan: 3,
colspan: 1,
};
} else if (rowIndex === 32) {
return {
rowspan: 6,
colspan: 1,
};
} else if (rowIndex === 91) {
return {
rowspan: 7,
colspan: 1,
};
} else if (rowMerge5.includes(rowIndex)) {
return {
rowspan: 1,
colspan: 1,
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
}
};
//
const submit = async () => {
let param = JSON.parse(JSON.stringify(form.value));
param?.individualCreditModels.forEach((e, i) => {
delete e.recordChildren;
delete e.subject;
});
await personalCreditModelSaveOrUpdate(param);
addRecord(param);
getDetail();
ElMessage.success('提交成功!');
};
const getItemId = (name: string): number | string => {
if (!name) return '';
return formProcess.value[0]?.recordChildren[0]?.subject?.itemList.find((e) => e.options === name)?.itemId;
};
//
const addRecord = async (data: Record<string, any>) => {
let preIds = `1,${Cookies.get('sand-level')},42,68,756,772`; // 1id
const rule: Array<Record<string, any>> = [];
data.firstMode && rule.push(handleId(777, 236, getItemId(data.firstMode), preIds + ',774,777', 1));
data.secondMode && rule.push(handleId(777, 236, getItemId(data.secondMode), preIds + ',775,777', 1));
data.thirdMode && rule.push(handleId(777, 236, getItemId(data.thirdMode), preIds + ',776,777', 1));
data.andThird && rule.push(handleId(778, 236, getItemId(data.andThird), preIds + ',776,778', 1));
preIds += `,788`;
form.value.individualCreditModels[0].score &&
rule.push(
handleId(
790,
238,
form.value?.individualCreditModels[0]?.subject?.itemList.find((e) => e.options === form.value.individualCreditModels[0].score)?.itemId,
preIds + ',789,790',
1,
),
);
form.value.individualCreditModels.forEach((e, i) => {
if (i && i !== len.value && e.subject) {
e.score && rule.push(handleId(e.ruleId, e.subject.subjectId, e?.subject?.itemList?.find((n) => n.options === e.score)?.itemId, `${preIds},${e.stRecordId},${e.ruleId}`, 1));
}
});
await addOperation({
checkpointId: levelId,
parentId: preIds,
lcJudgmentRuleReq: rule,
projectId,
});
};
</script>
<style lang="scss" scoped>
@import url(../../../styles/form.scss);
.c-table {
:deep(.el-input__inner) {
@apply px-2;
}
}
</style>

@ -0,0 +1,176 @@
<template>
<!-- 企业额度模型 -->
<el-form label-width="80px"
class="form"
status-icon>
<h6 class="step-name mb-2">{{ info[0]?.name }}</h6>
<el-form-item class="mb-1"
label="不超过">
<el-select v-model="form.firstMode">
<el-option v-for="item in info[0]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<el-form-item class="mb-1"
label="且"></el-form-item>
<el-form-item label="不超过">
<el-select v-model="form.andFirst">
<el-option v-for="item in info[0]?.recordChildren[1]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<h6 class="step-name mt-4 mb-2">{{ info[1]?.name }}</h6>
<el-form-item class="mb-1"
label="不超过">
<el-select v-model="form.secondMode">
<el-option v-for="item in info[0]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<el-form-item class="mb-1"
label="且"></el-form-item>
<el-form-item label="不超过">
<el-select v-model="form.andSecond">
<el-option v-for="item in info[0]?.recordChildren[1]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<h6 class="step-name mt-4 mb-2">{{ info[2]?.name }}</h6>
<el-form-item label="不超过">
<el-select v-model="form.thirdMode">
<el-option v-for="item in info[0]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<h6 class="step-name mt-4 mb-2">{{ info[3]?.name }}</h6>
<el-form-item label="不超过">
<el-select v-model="form.fourthMode">
<el-option v-for="item in info[0]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<h6 class="step-name mt-4 mb-2">{{ info[4]?.name }}</h6>
<el-form-item label="不超过">
<el-select v-model="form.fifthMode">
<el-option v-for="item in info[0]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
<h6 class="step-name mt-4 mb-2">{{ info[5]?.name }}</h6>
<el-form-item label="不超过">
<el-select v-model="form.sixthMode">
<el-option v-for="item in info[0]?.recordChildren[0]?.subject?.itemList"
:key="item"
:value="item.options" />
</el-select>
</el-form-item>
</el-form>
<div class="flex justify-end">
<div class="submit"
@click="submit">确认完成配置</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { businessQuotaModelDetails, businessQuotaModelSaveOrUpdate } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import { handleId } from '@/utils/common';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>>({
projectId,
checkpointId: levelId,
andFirst: '',
andSecond: '',
andThird: '',
fifthMode: '',
firstMode: '',
fourthMode: '',
secondMode: '',
sixthMode: '',
thirdMode: '',
type: 2,
});
const info = ref<Record<string, any>[]>([]);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(773);
info.value = process;
};
//
const getDetail = async () => {
try {
const { data } = await businessQuotaModelDetails(levelId, projectId);
if (data) {
form.value = data;
}
getConfig();
} finally {
}
};
onMounted(() => {
getDetail();
});
//
const submit = async () => {
let param = JSON.parse(JSON.stringify(form.value));
await businessQuotaModelSaveOrUpdate(param);
addRecord(param);
getDetail();
ElMessage.success('提交成功!');
};
const getItemId = (name: string): number | string => {
if (!name) return '';
return info.value[0]?.recordChildren[0]?.subject?.itemList.find((e) => e.options === name)?.itemId;
};
//
const addRecord = async (data: Record<string, any>) => {
let preIds = `1,${Cookies.get('sand-level')},42,68,756,773`; // 1id
const rule: Array<Record<string, any>> = [];
data.firstMode && rule.push(handleId(785, 237, getItemId(data.firstMode), preIds + ',779,785', 1));
data.andFirst && rule.push(handleId(786, 237, getItemId(data.andFirst), preIds + ',779,786', 1));
data.secondMode && rule.push(handleId(785, 237, getItemId(data.secondMode), preIds + ',780,785', 1));
data.andSecond && rule.push(handleId(786, 237, getItemId(data.andSecond), preIds + ',780,786', 1));
data.thirdMode && rule.push(handleId(785, 237, getItemId(data.thirdMode), preIds + ',781,785', 1));
data.fourthMode && rule.push(handleId(787, 237, getItemId(data.fourthMode), preIds + ',782,787', 1));
data.fifthMode && rule.push(handleId(785, 237, getItemId(data.fifthMode), preIds + ',783,785', 1));
data.sixthMode && rule.push(handleId(785, 237, getItemId(data.sixthMode), preIds + ',784,785', 1));
await addOperation({
checkpointId: levelId,
parentId: preIds,
lcJudgmentRuleReq: rule,
projectId,
});
};
</script>
<style lang="scss" scoped>
@import url(../../../styles/form.scss);
.c-table {
:deep(.el-input__inner) {
@apply px-2;
}
}
</style>

@ -0,0 +1,118 @@
<template>
<div class="block"
style="padding-top: 0">
<el-tabs v-model="curTab"
@tab-click="tabChange">
<el-tab-pane label="额度模型"
name="tab1">
<div class="flex">
<div class="left w-[241px] min-w-[241px] pr-5 py-4">
<ul class="products">
<li v-for="(item, i) in list[0]?.recordChildren"
:key="i"
:class="{ active: item.id === id }"
@click="switchProduct(item.id)">
<h6>{{ item.name }}</h6>
<p class="type">{{ item.remark }}</p>
</li>
</ul>
</div>
<div class="right flex-1 px-5 pt-2">
<Com1 v-if="id == 772" />
<Com2 v-else-if="id == 773" />
</div>
</div>
</el-tab-pane>
<el-tab-pane label="利率模型"
name="tab2">
<!-- <div class="flex">
<div class="left w-[241px] min-w-[241px] pr-5 py-4">
<ul class="products">
<li v-for="(item, i) in list2"
:key="i"
:class="{ active: item.id === riskId }"
@click="switchProductRisk(item.id)">
<h6>{{ item.name }}</h6>
<p class="mt-2 des">{{ item.remark }}</p>
</li>
</ul>
</div>
<div class="right flex-1 px-5 pt-2">
<Risk1 v-if="riskId === 702" />
<Risk2 v-else-if="riskId === 703" />
<Risk3 v-else-if="riskId === 704" />
</div>
</div> -->
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue';
import type { TabsPaneContext } from 'element-plus';
import { getProcessInformationBasedOnRoles } from '@/api/judgment';
import { delCredit, listCredit } from '@/api/model';
import { useRouter, useRoute } from 'vue-router';
import { ElMessage } from 'element-plus';
import Cookies from 'js-cookie';
import Com1 from './772.vue';
import Com2 from './773.vue';
const router = useRouter();
const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const curTab = computed(() => route.params.action);
const list = ref<Array<Record<string, any>>>([]);
const list1 = ref<Array<Record<string, any>>>([]);
const id = computed(() => +route.query.id);
const creditId = computed(() => +route.query.creditId);
//
const switchProduct = (id: number) => {
router.push(`/product/interestRate/${route.params.action}?&i=3&role=42&id=${id}`);
};
//
const getList = async (refresh?: number) => {
const { process } = await getProcessInformationBasedOnRoles(68);
// eslint-disable-next-line no-unused-expressions
!id.value && switchProduct(process[curTab.value === 'tab1' ? 0 : 1].recordChildren[0].id);
list.value = process;
};
onMounted(() => {
getList();
});
// tab
const tabChange = (tab: TabsPaneContext, event: Event) => {
getList();
};
</script>
<style lang="scss" scoped>
.left {
border-right: 1px solid #e9eff2;
}
.products {
@apply max-h-[calc(100vh-205px)] pr-1 overflow-auto;
li {
@apply relative p-5 pt-7 mb-5 rounded-[10px] cursor-pointer border border-solid border-[transparent] bg-[url('@/assets/images/10.png')] bg-[length:100%_100%] bg-no-repeat;
&.active {
@apply border-[#CAE0FF];
}
}
.del {
@apply absolute top-0 right-0;
}
h6 {
@apply text-[#14436b];
}
.type {
@apply my-3 text-sm text-[#333];
}
.des {
@apply text-sm text-[#8798a9];
}
}
</style>

@ -11,7 +11,7 @@
align="center">
</el-table-column>
<el-table-column label="规则"
min-width="250"
min-width="350"
align="center">
<template #default="{ row }">
<!-- 大病报销 || 贫困户 -->
@ -71,42 +71,42 @@
</template>
</el-table-column>
<el-table-column label="本人命中进黑名单"
width="140"
min-width="140"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.personalHitBlacklist"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="配偶命中拒入"
width="140"
min-width="140"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.mateHitRejected"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="父母/子女命中拒入"
width="150"
min-width="140"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.parentsHitRejected"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="其他家庭成员命中拒入"
width="170"
min-width="140"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.otherFamilyMembersHitRejected"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="企业大股东命中拒入"
width="160"
min-width="140"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.corporateMajorityHitRejected"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="本人及亲属企业命中准入"
width="160"
min-width="140"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.hitAccess"

Loading…
Cancel
Save