|
|
@ -35,45 +35,72 @@ |
|
|
|
<el-form-item label="贷款对象" |
|
|
|
<el-form-item label="贷款对象" |
|
|
|
required> |
|
|
|
required> |
|
|
|
<div class="flex-1"> |
|
|
|
<div class="flex-1"> |
|
|
|
<p class="field-name">选择本产品的贷款对象。</p> |
|
|
|
<!-- 企业 --> |
|
|
|
<div class="flex items-center mb-2"> |
|
|
|
<template v-if="form.productType"> |
|
|
|
<el-checkbox-group class="mt-1" |
|
|
|
<div class="flex items-center"> |
|
|
|
v-model="form.age"> |
|
|
|
<span class="mr-3 text-[#333] text-sm">企业类型</span> |
|
|
|
<el-checkbox label="年龄" /> |
|
|
|
<el-select v-model="form.productObject" |
|
|
|
</el-checkbox-group> |
|
|
|
placeholder="请选择"> |
|
|
|
<div class="num-inputs ml-7"> |
|
|
|
<el-option v-for="(item, i) in config.find((e: any) => e.name === '企业产品-贷款对象')?.recordChildren[0]?.subject?.itemList" |
|
|
|
<el-input placeholder="最小年龄" |
|
|
|
|
|
|
|
v-model.number="form.minimumAge"></el-input> |
|
|
|
|
|
|
|
<span class="split">-</span> |
|
|
|
|
|
|
|
<el-input placeholder="最大年龄" |
|
|
|
|
|
|
|
v-model.number="form.maximumAge"></el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex items-center mb-2"> |
|
|
|
|
|
|
|
<el-checkbox v-model="form.edu" |
|
|
|
|
|
|
|
label="学历要求"></el-checkbox> |
|
|
|
|
|
|
|
<el-checkbox-group v-if="form.edu" |
|
|
|
|
|
|
|
class="mt-2 ml-5" |
|
|
|
|
|
|
|
v-model="form.educationalRequirements"> |
|
|
|
|
|
|
|
<el-checkbox v-for="(item, i) in config[3]?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
:label="item.options" |
|
|
|
</el-checkbox-group> |
|
|
|
:value="item.itemId" /> |
|
|
|
</div> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex items-center mt-4"> |
|
|
|
|
|
|
|
<span class="mr-3 text-[#333] text-sm">借款人年龄</span> |
|
|
|
|
|
|
|
<div class="num-inputs ml-7"> |
|
|
|
|
|
|
|
<el-input placeholder="最小年龄" |
|
|
|
|
|
|
|
v-model.number="form.minimumAge"></el-input> |
|
|
|
|
|
|
|
<span class="split">-</span> |
|
|
|
|
|
|
|
<el-input placeholder="最大年龄" |
|
|
|
|
|
|
|
v-model.number="form.maximumAge"></el-input> |
|
|
|
|
|
|
|
<span class="unit">周岁</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<!-- 个人 --> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<p class="field-name">选择本产品的贷款对象。</p> |
|
|
|
|
|
|
|
<div class="flex items-center mb-2"> |
|
|
|
|
|
|
|
<el-checkbox-group class="mt-1" |
|
|
|
|
|
|
|
v-model="form.age"> |
|
|
|
|
|
|
|
<el-checkbox label="年龄" /> |
|
|
|
|
|
|
|
</el-checkbox-group> |
|
|
|
|
|
|
|
<div class="num-inputs ml-7"> |
|
|
|
|
|
|
|
<el-input placeholder="最小年龄" |
|
|
|
|
|
|
|
v-model.number="form.minimumAge"></el-input> |
|
|
|
|
|
|
|
<span class="split">-</span> |
|
|
|
|
|
|
|
<el-input placeholder="最大年龄" |
|
|
|
|
|
|
|
v-model.number="form.maximumAge"></el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex items-center mb-2"> |
|
|
|
|
|
|
|
<el-checkbox v-model="form.edu" |
|
|
|
|
|
|
|
label="学历要求"></el-checkbox> |
|
|
|
|
|
|
|
<el-checkbox-group v-if="form.edu" |
|
|
|
|
|
|
|
class="mt-2 ml-5" |
|
|
|
|
|
|
|
v-model="form.educationalRequirements"> |
|
|
|
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e: any) => e.name === '个人产品-贷款对象')?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
|
|
|
|
</el-checkbox-group> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex items-center mb-2"> |
|
|
|
<div class="flex items-center mb-2"> |
|
|
|
<el-checkbox v-model="form.curWL" |
|
|
|
<el-checkbox v-model="form.curWL" |
|
|
|
label="工作年限"></el-checkbox> |
|
|
|
label="工作年限"></el-checkbox> |
|
|
|
<el-checkbox-group v-if="form.curWL" |
|
|
|
<el-checkbox-group v-if="form.curWL" |
|
|
|
class="mt-2 ml-5" |
|
|
|
class="mt-2 ml-5" |
|
|
|
v-model="form.currentWorkingLife"> |
|
|
|
v-model="form.currentWorkingLife"> |
|
|
|
<el-checkbox v-for="(item, i) in config[3]?.recordChildren[2]?.subject?.itemList" |
|
|
|
<el-checkbox v-for="(item, i) in config.find((e: any) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.subject?.itemList" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-checkbox-group> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-checkbox v-model="form.providentFundAndSocialSecurity" |
|
|
|
<el-checkbox v-model="form.providentFundAndSocialSecurity" |
|
|
|
label="公积金/社保"></el-checkbox> |
|
|
|
label="公积金/社保"></el-checkbox> |
|
|
|
|
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="贷款用途" |
|
|
|
<el-form-item label="贷款用途" |
|
|
@ -81,9 +108,16 @@ |
|
|
|
<div class="flex-1"> |
|
|
|
<div class="flex-1"> |
|
|
|
<p class="field-name">选择本产品贷款资金的用途。</p> |
|
|
|
<p class="field-name">选择本产品贷款资金的用途。</p> |
|
|
|
<el-radio-group v-model="form.loanPurpose"> |
|
|
|
<el-radio-group v-model="form.loanPurpose"> |
|
|
|
<el-radio v-for="(item, i) in config[4]?.recordChildren" |
|
|
|
<template v-if="form.productType"> |
|
|
|
:key="i" |
|
|
|
<el-radio v-for="(item, i) in config.find((e: any) => e.name === '企业产品-贷款用途')?.subject?.itemList" |
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
: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" |
|
|
|
|
|
|
|
:key="i" |
|
|
|
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
<el-input v-if="form?.loanPurpose === 107" |
|
|
|
<el-input v-if="form?.loanPurpose === 107" |
|
|
|
class="w-[250px] ml-5" |
|
|
|
class="w-[250px] ml-5" |
|
|
@ -96,7 +130,7 @@ |
|
|
|
prop="bankGuaranteeTypeIds"> |
|
|
|
prop="bankGuaranteeTypeIds"> |
|
|
|
<div class="flex-1"> |
|
|
|
<div class="flex-1"> |
|
|
|
<p class="field-name">选择本产品的担保种类。</p> |
|
|
|
<p class="field-name">选择本产品的担保种类。</p> |
|
|
|
<div v-for="(item, i) in config[5]?.recordChildren" |
|
|
|
<div v-for="(item, i) in config.find((e: any) => e.name === '担保方式')?.recordChildren" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
class="mb-2"> |
|
|
|
class="mb-2"> |
|
|
|
<el-checkbox-group v-model="form.bankGuaranteeTypeIds"> |
|
|
|
<el-checkbox-group v-model="form.bankGuaranteeTypeIds"> |
|
|
@ -159,7 +193,7 @@ |
|
|
|
<div class="flex-1"> |
|
|
|
<div class="flex-1"> |
|
|
|
<p class="field-name">选择本产品可以选择的还款方式。</p> |
|
|
|
<p class="field-name">选择本产品可以选择的还款方式。</p> |
|
|
|
<el-checkbox-group v-model="form.modeRepayment"> |
|
|
|
<el-checkbox-group v-model="form.modeRepayment"> |
|
|
|
<el-checkbox v-for="(item, i) in config[9]?.subject?.itemList" |
|
|
|
<el-checkbox v-for="(item, i) in config.find((e: any) => e.name === '还款方式')?.subject?.itemList" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</el-checkbox-group> |
|
|
@ -199,18 +233,19 @@ interface RuleForm { |
|
|
|
bankGuaranteeTypeIds: any[]; |
|
|
|
bankGuaranteeTypeIds: any[]; |
|
|
|
currentWorkingLife?: any; |
|
|
|
currentWorkingLife?: any; |
|
|
|
educationalRequirements?: any; |
|
|
|
educationalRequirements?: any; |
|
|
|
loanCeiling?: number; |
|
|
|
loanCeiling: any; |
|
|
|
loanPurpose?: number; |
|
|
|
loanPurpose: any; |
|
|
|
maximumAge?: number; |
|
|
|
productObject: any; |
|
|
|
maximumAnnualInterestRate?: number; |
|
|
|
maximumAge: any; |
|
|
|
maximumTermOfLoan?: number; |
|
|
|
maximumAnnualInterestRate: any; |
|
|
|
minimumAge?: number; |
|
|
|
maximumTermOfLoan: any; |
|
|
|
minimumAprOnLoan?: number; |
|
|
|
minimumAge: any; |
|
|
|
minimumLoan?: number; |
|
|
|
minimumAprOnLoan: any; |
|
|
|
minimumTermOfLoan?: number; |
|
|
|
minimumLoan: any; |
|
|
|
|
|
|
|
minimumTermOfLoan: any; |
|
|
|
modeRepayment?: any; |
|
|
|
modeRepayment?: any; |
|
|
|
otherPurposesOfLoan: string; |
|
|
|
otherPurposesOfLoan: string; |
|
|
|
productObject?: number; |
|
|
|
productObject: any; |
|
|
|
productType: number; |
|
|
|
productType: number; |
|
|
|
providentFundAndSocialSecurity: any; |
|
|
|
providentFundAndSocialSecurity: any; |
|
|
|
whetherToSupportEarlyRepayment?: any; |
|
|
|
whetherToSupportEarlyRepayment?: any; |
|
|
@ -219,7 +254,7 @@ interface RuleForm { |
|
|
|
const router = useRouter(); |
|
|
|
const router = useRouter(); |
|
|
|
const route = useRoute(); |
|
|
|
const route = useRoute(); |
|
|
|
const curTab = ref<string>('tab1'); |
|
|
|
const curTab = ref<string>('tab1'); |
|
|
|
const config = ref<any>({}); |
|
|
|
const config = ref<any>([]); |
|
|
|
const formRef = ref<FormInstance>(); |
|
|
|
const formRef = ref<FormInstance>(); |
|
|
|
const form = reactive<RuleForm>({ |
|
|
|
const form = reactive<RuleForm>({ |
|
|
|
productDefinition: '', |
|
|
|
productDefinition: '', |
|
|
@ -230,6 +265,7 @@ const form = reactive<RuleForm>({ |
|
|
|
educationalRequirements: [], |
|
|
|
educationalRequirements: [], |
|
|
|
loanCeiling: '', |
|
|
|
loanCeiling: '', |
|
|
|
loanPurpose: '', |
|
|
|
loanPurpose: '', |
|
|
|
|
|
|
|
productObject: '', |
|
|
|
maximumAge: '', |
|
|
|
maximumAge: '', |
|
|
|
maximumAnnualInterestRate: '', |
|
|
|
maximumAnnualInterestRate: '', |
|
|
|
maximumTermOfLoan: '', |
|
|
|
maximumTermOfLoan: '', |
|
|
@ -262,7 +298,7 @@ const tabChange = (tab: TabsPaneContext, event: Event) => { |
|
|
|
}; |
|
|
|
}; |
|
|
|
// 配置项 |
|
|
|
// 配置项 |
|
|
|
const getConfig = async () => { |
|
|
|
const getConfig = async () => { |
|
|
|
const { process } = await getProcessInformationBasedOnRoles(41); |
|
|
|
const { process } = await getProcessInformationBasedOnRoles(form.productType === 1 ? 45 : 44); |
|
|
|
config.value = process; |
|
|
|
config.value = process; |
|
|
|
}; |
|
|
|
}; |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
@ -277,14 +313,18 @@ const submit = async (formEl: FormInstance | undefined) => { |
|
|
|
param.modeRepayment = param.modeRepayment.join(); |
|
|
|
param.modeRepayment = param.modeRepayment.join(); |
|
|
|
param.providentFundAndSocialSecurity = param.providentFundAndSocialSecurity ? 13 : ''; |
|
|
|
param.providentFundAndSocialSecurity = param.providentFundAndSocialSecurity ? 13 : ''; |
|
|
|
param.whetherToSupportEarlyRepayment = param.whetherToSupportEarlyRepayment ? 58 : ''; |
|
|
|
param.whetherToSupportEarlyRepayment = param.whetherToSupportEarlyRepayment ? 58 : ''; |
|
|
|
console.log(33, form, param); |
|
|
|
// 担保方式 |
|
|
|
await save(param); |
|
|
|
param.addBankProductsGuarantyStyleReqList = []; |
|
|
|
addRecord(param); |
|
|
|
param.bankGuaranteeTypeIds.forEach((e: number) => { |
|
|
|
|
|
|
|
param.addBankProductsGuarantyStyleReqList.push({ |
|
|
|
|
|
|
|
bankGuaranteeTypeId: (e > 22 && e < 33) || (e > 32 && e < 38) ? e : '', |
|
|
|
|
|
|
|
pid: e > 22 && e < 33 ? 110 : e > 32 && e < 38 ? 111 : e, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
const { message } = await save(param); |
|
|
|
|
|
|
|
addRecord(param, message); |
|
|
|
ElMessage.success('提交成功!'); |
|
|
|
ElMessage.success('提交成功!'); |
|
|
|
emit('getList', 1); |
|
|
|
emit('getList', 1); |
|
|
|
// setTimeout(() => { |
|
|
|
|
|
|
|
// router.push(``) |
|
|
|
|
|
|
|
// }, 1500); |
|
|
|
|
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -293,22 +333,34 @@ const submit = async (formEl: FormInstance | undefined) => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
// 新增判分记录 |
|
|
|
// 新增判分记录 |
|
|
|
const addRecord = async (data: any) => { |
|
|
|
const addRecord = async (data: Record<string, any>, newId: number) => { |
|
|
|
const preIds = `1,2,41,${data.productType ? 45 : 44}`; // 1,关卡id,角色(这个页面是产品经理新增产品),个人/企业(44/45) |
|
|
|
const isEnterprise = data.productType === 1; |
|
|
|
|
|
|
|
const preIds = `1,2,41,${data.productType ? 45 : 44},${newId}`; // 1,关卡id,角色(这个页面是产品经理新增产品),个人/企业(44/45) |
|
|
|
const lcRule = <Record<string, any>[]>[ |
|
|
|
const lcRule = <Record<string, any>[]>[ |
|
|
|
handleId(48, 1, data.productDefinition, preIds + ',48', 3), |
|
|
|
handleId(48, 1, data.productDefinition, preIds + ',48', 3), |
|
|
|
handleId(49, 2, data.productName, preIds + ',49', 3), |
|
|
|
handleId(49, 2, data.productName, preIds + ',49', 3), |
|
|
|
handleId(50, 3, 1, preIds + ',50', 1), |
|
|
|
handleId(50, 3, 1, preIds + ',50', 1), |
|
|
|
]; |
|
|
|
]; |
|
|
|
data.age && lcRule.push(handleId(100, 41, '[' + data.minimumAge + ',' + data.maximumAge + ']' + '', preIds + ',51,100', 5)); |
|
|
|
|
|
|
|
data.edu && lcRule.push(handleId(101, 42, data.educationalRequirements, preIds + ',51,101', 1)); |
|
|
|
|
|
|
|
data.curWL && lcRule.push(handleId(102, 43, data.currentWorkingLife, preIds + ',51,102', 1)); |
|
|
|
|
|
|
|
data.providentFundAndSocialSecurity && lcRule.push(handleId(103, '', '', preIds + ',51,103', '')); // 公积金社保 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 贷款用途 |
|
|
|
// 贷款用途 |
|
|
|
lcRule.push( |
|
|
|
if (isEnterprise) { |
|
|
|
data.loanPurpose === 107 ? handleId(107, 11, data.otherPurposesOfLoan, preIds + ',52,107', 3) : handleId(data.loanPurpose, '', '', preIds + ',52,' + data.loanPurpose, 1), |
|
|
|
// 企业 |
|
|
|
); |
|
|
|
lcRule.push( |
|
|
|
|
|
|
|
handleId(62, 7, data.productObject, preIds + ',61,62', 1), |
|
|
|
|
|
|
|
handleId(63, 8, '[' + data.minimumAge + ',' + data.maximumAge + ']' + '', preIds + ',61,63', 5), |
|
|
|
|
|
|
|
handleId(65, 19, data.loanPurpose, preIds + ',65', 1), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 个人 |
|
|
|
|
|
|
|
data.age && lcRule.push(handleId(100, 41, '[' + data.minimumAge + ',' + data.maximumAge + ']' + '', preIds + ',51,100', 5)); |
|
|
|
|
|
|
|
data.edu && lcRule.push(handleId(101, 42, data.educationalRequirements, preIds + ',51,101', 1)); |
|
|
|
|
|
|
|
data.curWL && lcRule.push(handleId(102, 43, data.currentWorkingLife, preIds + ',51,102', 1)); |
|
|
|
|
|
|
|
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.bankGuaranteeTypeIds.includes(108) && lcRule.push(handleId(108, '', '', preIds + ',53,108', '')); |
|
|
|
data.bankGuaranteeTypeIds.includes(108) && lcRule.push(handleId(108, '', '', preIds + ',53,108', '')); |
|
|
|