|
|
|
@ -201,20 +201,54 @@ |
|
|
|
|
]"> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<p class="field-name">选择本产品的担保种类。</p> |
|
|
|
|
<div v-for="(item, i) in config.find((e) => e.name === '担保方式')?.recordChildren" |
|
|
|
|
:key="i" |
|
|
|
|
class="mb-2"> |
|
|
|
|
<el-checkbox-group v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox :label="item.id">{{ item.name }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
<el-checkbox-group class="mb-1" |
|
|
|
|
v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox v-show="(item.id === 110 && form.bankGuaranteeTypeIds.includes(110)) || (item.id === 111 && form.bankGuaranteeTypeIds.includes(111))" |
|
|
|
|
v-for="(child, j) in item?.subject?.itemList" |
|
|
|
|
:key="j" |
|
|
|
|
:label="child.itemId">{{ child.options }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
<div class="radio-wrap"> |
|
|
|
|
<span class="label">信用贷</span> |
|
|
|
|
<el-radio-group v-model="form.bankGuarantee1"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="radio-wrap my-1"> |
|
|
|
|
<span class="label">保证贷</span> |
|
|
|
|
<el-radio-group v-model="form.bankGuarantee2"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="radio-wrap"> |
|
|
|
|
<span class="label">抵押贷</span> |
|
|
|
|
<el-radio-group v-model="form.bankGuarantee3"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</div> |
|
|
|
|
<el-checkbox-group v-if="form.bankGuarantee3 === 795" |
|
|
|
|
v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[2]?.subject?.itemList" |
|
|
|
|
:key="j" |
|
|
|
|
:label="child.itemId">{{ child.options }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
|
|
|
|
|
<div class="radio-wrap mt-1"> |
|
|
|
|
<span class="label">质押贷</span> |
|
|
|
|
<el-radio-group v-model="form.bankGuarantee4"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</div> |
|
|
|
|
<el-checkbox-group v-if="form.bankGuarantee4 === 795" |
|
|
|
|
v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[3]?.subject?.itemList" |
|
|
|
|
:key="j" |
|
|
|
|
:label="child.itemId">{{ child.options }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款额度" |
|
|
|
@ -318,7 +352,7 @@ interface RuleForm { |
|
|
|
|
productDefinition: string; |
|
|
|
|
productName: string; |
|
|
|
|
productCurrency: number; |
|
|
|
|
bankGuaranteeTypeIds: any[]; |
|
|
|
|
bankGuaranteeTypeIds: number[]; |
|
|
|
|
currentWorkingLife?: any; |
|
|
|
|
edu: number | string; |
|
|
|
|
educationalRequirements?: any; |
|
|
|
@ -340,6 +374,10 @@ interface RuleForm { |
|
|
|
|
productType: number; |
|
|
|
|
providentFundAndSocialSecurity: number | string; |
|
|
|
|
whetherToSupportEarlyRepayment?: any; |
|
|
|
|
bankGuarantee1?: number; |
|
|
|
|
bankGuarantee2?: number; |
|
|
|
|
bankGuarantee3?: number; |
|
|
|
|
bankGuarantee4?: number; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
@ -390,6 +428,10 @@ const form = reactive<RuleForm>({ |
|
|
|
|
productType: computed(() => +route.query.type), |
|
|
|
|
providentFundAndSocialSecurity: '', |
|
|
|
|
whetherToSupportEarlyRepayment: false, |
|
|
|
|
bankGuarantee1: '', |
|
|
|
|
bankGuarantee2: '', |
|
|
|
|
bankGuarantee3: '', |
|
|
|
|
bankGuarantee4: '', |
|
|
|
|
}); |
|
|
|
|
const rules = reactive<FormRules<RuleForm>>({ |
|
|
|
|
productDefinition: [{ required: true, message: '请输入产品定义', trigger: 'blur' }], |
|
|
|
@ -469,13 +511,49 @@ const submit = async (formEl: FormInstance | undefined) => { |
|
|
|
|
param.providentFundAndSocialSecurity = param.providentFundAndSocialSecurity === 795 ? 1 : ''; |
|
|
|
|
param.whetherToSupportEarlyRepayment = param.whetherToSupportEarlyRepayment ? 58 : ''; |
|
|
|
|
// 担保方式 |
|
|
|
|
param.addBankProductsGuarantyStyleReqList = []; |
|
|
|
|
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 graIds = []; |
|
|
|
|
// 信用贷 |
|
|
|
|
param.bankGuarantee1 === 795 && |
|
|
|
|
graIds.push({ |
|
|
|
|
bankGuaranteeTypeId: 108, |
|
|
|
|
pid: '', |
|
|
|
|
}); |
|
|
|
|
// 保证贷 |
|
|
|
|
param.bankGuarantee2 === 795 && |
|
|
|
|
graIds.push({ |
|
|
|
|
bankGuaranteeTypeId: 109, |
|
|
|
|
pid: '', |
|
|
|
|
}); |
|
|
|
|
// 抵押贷 |
|
|
|
|
param.bankGuarantee3 === 795 && |
|
|
|
|
graIds.push({ |
|
|
|
|
bankGuaranteeTypeId: 110, |
|
|
|
|
pid: '', |
|
|
|
|
}); |
|
|
|
|
// 质押贷 |
|
|
|
|
param.bankGuarantee4 === 795 && |
|
|
|
|
graIds.push({ |
|
|
|
|
bankGuaranteeTypeId: 111, |
|
|
|
|
pid: '', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
param.bankGuaranteeTypeIds.forEach((e: number) => { |
|
|
|
|
// 抵押贷 |
|
|
|
|
if (param.bankGuarantee3 === 795 && e > 22 && e < 33) { |
|
|
|
|
graIds.push({ |
|
|
|
|
bankGuaranteeTypeId: e, |
|
|
|
|
pid: 110, |
|
|
|
|
}); |
|
|
|
|
} else if (param.bankGuarantee4 === 795 && e > 32 && e < 38) { |
|
|
|
|
// 质押贷 |
|
|
|
|
graIds.push({ |
|
|
|
|
bankGuaranteeTypeId: e, |
|
|
|
|
pid: 111, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
param.addBankProductsGuarantyStyleReqList = graIds; |
|
|
|
|
debugger; |
|
|
|
|
let res; |
|
|
|
|
if (id.value) { |
|
|
|
|
param.id = id.value; |
|
|
|
@ -528,10 +606,12 @@ const addRecord = async (data: Record<string, any>) => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 担保方式 |
|
|
|
|
data.bankGuaranteeTypeIds.includes(108) && lcRule.push(handleId(108, '', '', preIds + ',53,108', '')); |
|
|
|
|
data.bankGuaranteeTypeIds.includes(109) && lcRule.push(handleId(109, '', '', preIds + ',53,109', '')); |
|
|
|
|
data.bankGuaranteeTypeIds.includes(110) && lcRule.push(handleId(110, 13, data.bankGuaranteeTypeIds.filter((e: number) => e > 22 && e < 33).join(), preIds + ',53,110', 1)); |
|
|
|
|
data.bankGuaranteeTypeIds.includes(111) && lcRule.push(handleId(111, 14, data.bankGuaranteeTypeIds.filter((e: number) => e > 32 && e < 38).join(), preIds + ',53,111', 1)); |
|
|
|
|
data.bankGuarantee1 && lcRule.push(handleId(100, 324, data.bankGuarantee1, preIds + ',53,108,100', 1)); |
|
|
|
|
data.bankGuarantee2 && lcRule.push(handleId(101, 324, data.bankGuarantee2, preIds + ',53,109,101', 1)); |
|
|
|
|
data.bankGuarantee3 && lcRule.push(handleId(102, 324, data.bankGuarantee3, preIds + ',53,110,102', 1)); |
|
|
|
|
data.bankGuarantee4 && lcRule.push(handleId(103, 324, data.bankGuarantee4, preIds + ',53,111,103', 1)); |
|
|
|
|
data.bankGuarantee3 === 795 && lcRule.push(handleId(110, 13, data.bankGuaranteeTypeIds.filter((e: number) => e > 22 && e < 33).join(), preIds + ',53,110', 1)); |
|
|
|
|
data.bankGuarantee4 === 795 && lcRule.push(handleId(111, 14, data.bankGuaranteeTypeIds.filter((e: number) => e > 32 && e < 38).join(), preIds + ',53,111', 1)); |
|
|
|
|
|
|
|
|
|
lcRule.push( |
|
|
|
|
handleId(54, 15, data.minimumLoan + '~' + data.loanCeiling, preIds + ',54', 5), |
|
|
|
|