|
|
|
@ -55,7 +55,7 @@ |
|
|
|
|
<span class="mr-3 text-[#333] text-sm">企业类型</span> |
|
|
|
|
<el-select v-model="form.productObject" |
|
|
|
|
placeholder="请选择"> |
|
|
|
|
<el-option v-for="(item, i) in config.find((e: any) => e.name === '企业产品-贷款对象')?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
<el-option v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款对象')?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.options" |
|
|
|
|
:value="item.itemId" /> |
|
|
|
@ -95,7 +95,7 @@ |
|
|
|
|
<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" |
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
@ -107,7 +107,7 @@ |
|
|
|
|
<el-checkbox-group v-if="form.curWL" |
|
|
|
|
class="mt-2 ml-5" |
|
|
|
|
v-model="form.currentWorkingLife"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e: any) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.subject?.itemList" |
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
@ -158,9 +158,9 @@ |
|
|
|
|
{ required: true, message: '请选择担保方式', trigger: 'change' }, |
|
|
|
|
{ |
|
|
|
|
asyncValidator: async (rule, value, callback) => { |
|
|
|
|
if (value.includes(110) && !value.find((e: any) => e > 22 && e < 33)) { |
|
|
|
|
if (value.includes(110) && !value.find((e) => e > 22 && e < 33)) { |
|
|
|
|
callback('请选择抵押物') |
|
|
|
|
} else if (value.includes(111) && !value.find((e: any) => e > 32 && e < 38)) { |
|
|
|
|
} else if (value.includes(111) && !value.find((e) => e > 32 && e < 38)) { |
|
|
|
|
callback('请选择质押贷') |
|
|
|
|
} else { |
|
|
|
|
callback() |
|
|
|
@ -170,11 +170,14 @@ |
|
|
|
|
]"> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<p class="field-name">选择本产品的担保种类。</p> |
|
|
|
|
<div v-for="(item, i) in config.find((e: any) => e.name === '担保方式')?.recordChildren" |
|
|
|
|
<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" |
|
|
|
@ -238,7 +241,7 @@ |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<p class="field-name">选择本产品可以选择的还款方式。</p> |
|
|
|
|
<el-checkbox-group v-model="form.modeRepayment"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e: any) => e.name === '还款方式')?.subject?.itemList" |
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '还款方式')?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
@ -273,7 +276,7 @@ import type { TabsPaneContext, FormInstance, FormRules } from 'element-plus'; |
|
|
|
|
import { findById, save, update } from '@/api/bank'; |
|
|
|
|
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
|
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
|
import { handleId } from '@/utils/common'; |
|
|
|
|
import { handleId, isIllegalNum } from '@/utils/common'; |
|
|
|
|
import { getStatus } from '@/store/useProduct'; |
|
|
|
|
import Info from './Info.vue'; |
|
|
|
|
import Cookies from 'js-cookie'; |
|
|
|
@ -391,7 +394,7 @@ const submit = async (formEl: FormInstance | undefined) => { |
|
|
|
|
if ((!param.productType && param.age) || param.productType) { |
|
|
|
|
if (!param.minimumAge) return ElMessage.error('请输入最小年龄'); |
|
|
|
|
if (!param.maximumAge) return ElMessage.error('请输入最大年龄'); |
|
|
|
|
if (param.minimumAge < 0 || param.minimumAge > 999 || param.maximumAge < 0 || param.maximumAge > 999) return ElMessage.error('请输入合理的年龄'); |
|
|
|
|
if (isIllegalNum(param.minimumAge) || isIllegalNum(param.maximumAge)) return ElMessage.error('请输入合理的年龄'); |
|
|
|
|
if (param.minimumAge > param.maximumAge) return ElMessage.error('最小年龄不得大于最大年龄'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -401,7 +404,11 @@ const submit = async (formEl: FormInstance | undefined) => { |
|
|
|
|
if (param.curWL && !param.currentWorkingLife.length) return ElMessage.error('请选择工作年限'); |
|
|
|
|
if (param.curWL && !param.currentWorkingLife.length) return ElMessage.error('请选择工作年限'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isIllegalNum(param.minimumLoan) || isIllegalNum(param.loanCeiling) || +param.minimumLoan > +param.loanCeiling) return ElMessage.error('请输入合理的贷款额度'); |
|
|
|
|
if (isIllegalNum(param.minimumAprOnLoan) || isIllegalNum(param.maximumAnnualInterestRate) || +param.minimumAprOnLoan > +param.maximumAnnualInterestRate) |
|
|
|
|
return ElMessage.error('请输入合理的贷款利率'); |
|
|
|
|
if (isIllegalNum(param.minimumTermOfLoan) || isIllegalNum(param.maximumTermOfLoan) || +param.minimumTermOfLoan > +param.maximumTermOfLoan) |
|
|
|
|
return ElMessage.error('请输入合理的贷款期限'); |
|
|
|
|
param.currentWorkingLife = param.currentWorkingLife.join(); |
|
|
|
|
param.educationalRequirements = param.educationalRequirements.join(); |
|
|
|
|
param.modeRepayment = param.modeRepayment.join(); |
|
|
|
|