|
|
|
@ -1,60 +1,46 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<el-tabs v-model="curTab"> |
|
|
|
|
<el-tab-pane :label="id ? '配置要素' : '新增产品'" |
|
|
|
|
name="tab1"> |
|
|
|
|
<el-form ref="formRef" |
|
|
|
|
:model="form" |
|
|
|
|
:rules="rules" |
|
|
|
|
label-width="100px" |
|
|
|
|
label-suffix=":" |
|
|
|
|
class="form" |
|
|
|
|
status-icon> |
|
|
|
|
<el-tab-pane :label="id ? '配置要素' : '新增产品'" name="tab1"> |
|
|
|
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px" label-suffix=":" class="form" status-icon> |
|
|
|
|
<div class="h-[calc(100vh-230px)] pr-1 overflow-auto"> |
|
|
|
|
<el-form-item label="产品定义" |
|
|
|
|
prop="productDefinition"> |
|
|
|
|
<el-input type="textarea" |
|
|
|
|
placeholder="用一段话简单介绍一下这个产品或者描述产品的设计理念。例如:本产品根据个人客户的信用状况,为其提供的一种短期融资便利产品,借款人可在额度金额内可循环周转使用贷款。" |
|
|
|
|
maxlength="200" |
|
|
|
|
v-model="form.productDefinition"></el-input> |
|
|
|
|
<el-form-item label="产品定义" prop="productDefinition"> |
|
|
|
|
<el-input |
|
|
|
|
type="textarea" |
|
|
|
|
placeholder="用一段话简单介绍一下这个产品或者描述产品的设计理念。例如:本产品根据个人客户的信用状况,为其提供的一种短期融资便利产品,借款人可在额度金额内可循环周转使用贷款。" |
|
|
|
|
maxlength="200" |
|
|
|
|
v-model="form.productDefinition" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="产品名称" |
|
|
|
|
prop="productName"> |
|
|
|
|
<el-input placeholder="取个有吸引力的产品名,限20字。" |
|
|
|
|
maxlength="20" |
|
|
|
|
v-model="form.productName"></el-input> |
|
|
|
|
<el-form-item label="产品名称" prop="productName"> |
|
|
|
|
<el-input placeholder="取个有吸引力的产品名,限20字。" maxlength="20" v-model="form.productName"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="产品币种" |
|
|
|
|
prop="productCurrency"> |
|
|
|
|
<el-select v-model="form.productCurrency" |
|
|
|
|
placeholder="请选择"> |
|
|
|
|
<el-option label="人民币" |
|
|
|
|
:value="1" /> |
|
|
|
|
<el-form-item label="产品币种" prop="productCurrency"> |
|
|
|
|
<el-select v-model="form.productCurrency" placeholder="请选择"> |
|
|
|
|
<el-option label="人民币" :value="1" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款对象" |
|
|
|
|
required> |
|
|
|
|
<el-form-item label="贷款对象" required> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<!-- 企业 --> |
|
|
|
|
<template v-if="productType"> |
|
|
|
|
<div class="flex items-center"> |
|
|
|
|
<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) => e.name === '企业产品-贷款对象')?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.options" |
|
|
|
|
:value="item.itemId" /> |
|
|
|
|
<el-select v-model="form.productObject" placeholder="请选择"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款对象')?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.options" |
|
|
|
|
:value="item.itemId" |
|
|
|
|
/> |
|
|
|
|
</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> |
|
|
|
|
<el-input placeholder="最小年龄" v-model.number="form.minimumAge"></el-input> |
|
|
|
|
<span class="split">-</span> |
|
|
|
|
<el-input placeholder="最大年龄" |
|
|
|
|
v-model.number="form.maximumAge"></el-input> |
|
|
|
|
<el-input placeholder="最大年龄" v-model.number="form.maximumAge"></el-input> |
|
|
|
|
<span class="unit">周岁</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -67,19 +53,14 @@ |
|
|
|
|
<span class="label">1、年龄</span> |
|
|
|
|
<span class="whether">是否启用</span> |
|
|
|
|
<el-radio-group v-model="form.ageSelectedState"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" :key="i" :label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div v-if="form.ageSelectedState === 795" |
|
|
|
|
class="num-inputs ml-7"> |
|
|
|
|
<el-input placeholder="最小年龄" |
|
|
|
|
v-model.number="form.minimumAge"></el-input> |
|
|
|
|
<div v-if="form.ageSelectedState === 795" 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> |
|
|
|
|
<el-input placeholder="最大年龄" v-model.number="form.maximumAge"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex items-center h-[47px] mb-2"> |
|
|
|
@ -87,18 +68,17 @@ |
|
|
|
|
<span class="label">2、学历要求</span> |
|
|
|
|
<span class="whether">是否启用</span> |
|
|
|
|
<el-radio-group v-model="form.degreeSelectedStatus"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<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.degreeSelectedStatus === 795" |
|
|
|
|
class="mt-2 ml-5" |
|
|
|
|
v-model="form.educationalRequirements"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[1]?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
|
<el-checkbox-group v-if="form.degreeSelectedStatus === 795" class="mt-2 ml-5" v-model="form.educationalRequirements"> |
|
|
|
|
<el-checkbox |
|
|
|
|
v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[1]?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId" |
|
|
|
|
>{{ item.options }}</el-checkbox |
|
|
|
|
> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -107,18 +87,17 @@ |
|
|
|
|
<span class="label">3、工作年限</span> |
|
|
|
|
<span class="whether">是否启用</span> |
|
|
|
|
<el-radio-group v-model="form.workingLifeSelectedState"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<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.workingLifeSelectedState === 795" |
|
|
|
|
class="mt-2 ml-5" |
|
|
|
|
v-model="form.currentWorkingLife"> |
|
|
|
|
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
|
<el-checkbox-group v-if="form.workingLifeSelectedState === 795" class="mt-2 ml-5" v-model="form.currentWorkingLife"> |
|
|
|
|
<el-checkbox |
|
|
|
|
v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.recordChildren[1]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId" |
|
|
|
|
>{{ item.options }}</el-checkbox |
|
|
|
|
> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -126,179 +105,152 @@ |
|
|
|
|
<span class="label">4、公积金/社保</span> |
|
|
|
|
<span class="whether">是否启用</span> |
|
|
|
|
<el-radio-group v-model="form.providentFundAndSocialSecurity"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" :key="i" :label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款用途" |
|
|
|
|
prop="loanPurpose" |
|
|
|
|
:rules="[ |
|
|
|
|
{ required: true, message: '请选择贷款用途', trigger: 'change' }, |
|
|
|
|
{ |
|
|
|
|
asyncValidator: async (rule, value, callback) => { |
|
|
|
|
if (value === 107 && !form.otherPurposesOfLoan) { |
|
|
|
|
callback('请输入其他贷款用途') |
|
|
|
|
} else { |
|
|
|
|
callback() |
|
|
|
|
} |
|
|
|
|
<el-form-item |
|
|
|
|
label="贷款用途" |
|
|
|
|
prop="loanPurpose" |
|
|
|
|
:rules="[ |
|
|
|
|
{ required: true, message: '请选择贷款用途', trigger: 'change' }, |
|
|
|
|
{ |
|
|
|
|
asyncValidator: async (rule, value, callback) => { |
|
|
|
|
if (value === 107 && !form.otherPurposesOfLoan) { |
|
|
|
|
callback('请输入其他贷款用途'); |
|
|
|
|
} else { |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
]"> |
|
|
|
|
]" |
|
|
|
|
> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<p class="field-name">选择本产品贷款资金的用途。</p> |
|
|
|
|
<el-radio-group v-model="form.loanPurpose"> |
|
|
|
|
<template v-if="productType"> |
|
|
|
|
<el-radio v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款用途')?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-radio> |
|
|
|
|
<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 => e.name === '个人产品-贷款用途')?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-radio> |
|
|
|
|
<el-radio v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款用途')?.recordChildren[0]?.subject?.itemList" :key="i" :label="item.itemId">{{ |
|
|
|
|
item.options |
|
|
|
|
}}</el-radio> |
|
|
|
|
</template> |
|
|
|
|
</el-radio-group> |
|
|
|
|
<el-input v-if="form?.loanPurpose === 822" |
|
|
|
|
class="w-[300px] ml-5" |
|
|
|
|
placeholder="请描述其他贷款用途可用于哪些方面。" |
|
|
|
|
maxlength="10" |
|
|
|
|
v-model="form.otherPurposesOfLoan"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
v-if="form?.loanPurpose === 822" |
|
|
|
|
class="w-[300px] ml-5" |
|
|
|
|
placeholder="请描述其他贷款用途可用于哪些方面。" |
|
|
|
|
maxlength="10" |
|
|
|
|
v-model="form.otherPurposesOfLoan" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="担保方式" |
|
|
|
|
prop="bankGuaranteeTypeIds" |
|
|
|
|
:rules="[ |
|
|
|
|
{ |
|
|
|
|
asyncValidator: async (rule, value, callback) => { |
|
|
|
|
if (form.mortgageSelectedStatus === 795 && !value.find(e => e > 22 && e < 33)) { |
|
|
|
|
callback('请选择抵押物') |
|
|
|
|
} else if (form.hypothecatedSelectedStatus === 795 && !value.find(e => e > 32 && e < 38)) { |
|
|
|
|
callback('请选择质押贷') |
|
|
|
|
} else { |
|
|
|
|
callback() |
|
|
|
|
} |
|
|
|
|
<el-form-item |
|
|
|
|
label="担保方式" |
|
|
|
|
prop="bankGuaranteeTypeIds" |
|
|
|
|
:rules="[ |
|
|
|
|
{ |
|
|
|
|
asyncValidator: async (rule, value, callback) => { |
|
|
|
|
if (form.mortgageSelectedStatus === 795 && !value.find((e) => e > 22 && e < 33)) { |
|
|
|
|
callback('请选择抵押物'); |
|
|
|
|
} else if (form.hypothecatedSelectedStatus === 795 && !value.find((e) => e > 32 && e < 38)) { |
|
|
|
|
callback('请选择质押贷'); |
|
|
|
|
} else { |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
]"> |
|
|
|
|
]" |
|
|
|
|
> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<p class="field-name">选择本产品的担保种类。</p> |
|
|
|
|
<div class="radio-wrap"> |
|
|
|
|
<span class="label">信用贷</span> |
|
|
|
|
<el-radio-group v-model="form.creditSelectedStatus"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<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.guaranteeLoanSelectedStatus"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<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.mortgageSelectedStatus"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<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.mortgageSelectedStatus === 795" |
|
|
|
|
v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[2]?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="j" |
|
|
|
|
:label="child.itemId">{{ child.options }}</el-checkbox> |
|
|
|
|
<el-checkbox-group v-if="form.mortgageSelectedStatus === 795" v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox |
|
|
|
|
v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[2]?.recordChildren[0]?.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.hypothecatedSelectedStatus"> |
|
|
|
|
<el-radio v-for="(item, i) in whethers" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id">{{ item.name }}</el-radio> |
|
|
|
|
<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.hypothecatedSelectedStatus === 795" |
|
|
|
|
v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[3]?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="j" |
|
|
|
|
:label="child.itemId">{{ child.options }}</el-checkbox> |
|
|
|
|
<el-checkbox-group v-if="form.hypothecatedSelectedStatus === 795" v-model="form.bankGuaranteeTypeIds"> |
|
|
|
|
<el-checkbox |
|
|
|
|
v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[3]?.recordChildren[0]?.subject?.itemList" |
|
|
|
|
:key="j" |
|
|
|
|
:label="child.itemId" |
|
|
|
|
>{{ child.options }}</el-checkbox |
|
|
|
|
> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款额度" |
|
|
|
|
prop="minimumLoan" |
|
|
|
|
:rules="[ |
|
|
|
|
{ required: true, message: '请输入贷款额度', trigger: 'blur' }, |
|
|
|
|
]"> |
|
|
|
|
<el-form-item label="贷款额度" prop="minimumLoan" :rules="[{ required: true, message: '请输入贷款额度', trigger: 'blur' }]"> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<div class="num-inputs"> |
|
|
|
|
<el-input placeholder="最小额度" |
|
|
|
|
v-model="form.minimumLoan"></el-input> |
|
|
|
|
<el-input placeholder="最小额度" v-model="form.minimumLoan"></el-input> |
|
|
|
|
<span class="split">-</span> |
|
|
|
|
<el-input placeholder="最高额度" |
|
|
|
|
v-model="form.loanCeiling"></el-input> |
|
|
|
|
<el-input placeholder="最高额度" v-model="form.loanCeiling"></el-input> |
|
|
|
|
<span class="unit">万元</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款利率" |
|
|
|
|
prop="minimumAprOnLoan" |
|
|
|
|
:rules="[ |
|
|
|
|
{ required: true, message: '请输入贷款利率', trigger: 'blur' }, |
|
|
|
|
]"> |
|
|
|
|
<el-form-item label="贷款利率" prop="minimumAprOnLoan" :rules="[{ required: true, message: '请输入贷款利率', trigger: 'blur' }]"> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<div class="num-inputs"> |
|
|
|
|
<el-input placeholder="最小年利率" |
|
|
|
|
min="0" |
|
|
|
|
v-model="form.minimumAprOnLoan"></el-input> |
|
|
|
|
<el-input placeholder="最小年利率" min="0" v-model="form.minimumAprOnLoan"></el-input> |
|
|
|
|
<span class="split">-</span> |
|
|
|
|
<el-input placeholder="最高年利率" |
|
|
|
|
min="0" |
|
|
|
|
v-model="form.maximumAnnualInterestRate"></el-input> |
|
|
|
|
<el-input placeholder="最高年利率" min="0" v-model="form.maximumAnnualInterestRate"></el-input> |
|
|
|
|
<span class="unit">%</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="贷款期限" |
|
|
|
|
prop="minimumTermOfLoan" |
|
|
|
|
:rules="[ |
|
|
|
|
{ required: true, message: '请输入贷款期限', trigger: 'blur' }, |
|
|
|
|
]"> |
|
|
|
|
<el-form-item label="贷款期限" prop="minimumTermOfLoan" :rules="[{ required: true, message: '请输入贷款期限', trigger: 'blur' }]"> |
|
|
|
|
<div class="flex-1"> |
|
|
|
|
<div class="num-inputs"> |
|
|
|
|
<el-input placeholder="最小期限" |
|
|
|
|
v-model="form.minimumTermOfLoan"></el-input> |
|
|
|
|
<el-input placeholder="最小期限" v-model="form.minimumTermOfLoan"></el-input> |
|
|
|
|
<span class="split">-</span> |
|
|
|
|
<el-input placeholder="最大期限" |
|
|
|
|
v-model="form.maximumTermOfLoan"></el-input> |
|
|
|
|
<el-input placeholder="最大期限" v-model="form.maximumTermOfLoan"></el-input> |
|
|
|
|
<span class="unit">月</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="还款方式" |
|
|
|
|
prop="modeRepayment"> |
|
|
|
|
<el-form-item label="还款方式" prop="modeRepayment"> |
|
|
|
|
<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) => e.name === '还款方式')?.subject?.itemList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.itemId">{{ item.options }}</el-checkbox> |
|
|
|
|
<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> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="提前还款" |
|
|
|
|
prop="whetherToSupportEarlyRepayment"> |
|
|
|
|
<el-form-item label="提前还款" prop="whetherToSupportEarlyRepayment"> |
|
|
|
|
<div class="flex-1 flex items-center"> |
|
|
|
|
<el-switch v-model="form.whetherToSupportEarlyRepayment" /> |
|
|
|
|
<p class="tips ml-4">本产品是否支持提前还款。</p> |
|
|
|
@ -306,14 +258,11 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex justify-end"> |
|
|
|
|
<div class="submit" |
|
|
|
|
@click="submit(formRef)">完成,提交风控经理</div> |
|
|
|
|
<div class="submit" @click="submit(formRef)">完成,提交风控经理</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane v-if="id" |
|
|
|
|
label="产品详情" |
|
|
|
|
name="tab2"> |
|
|
|
|
<el-tab-pane v-if="id" label="产品详情" name="tab2"> |
|
|
|
|
<div class="h-[calc(100vh-170px)] pr-1 overflow-auto"> |
|
|
|
|
<info /> |
|
|
|
|
</div> |
|
|
|
@ -330,9 +279,9 @@ import { findById, save, update, elementDetail } from '@/api/bank'; |
|
|
|
|
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
|
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
|
import { handleId, isIllegalNum, getIds, whethers, getUsername } from '@/utils/common'; |
|
|
|
|
import Info from './Info.vue'; |
|
|
|
|
import Cookies from 'js-cookie'; |
|
|
|
|
import { getStat } from '@/store/useProduct'; |
|
|
|
|
import Info from './Info.vue'; |
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['getList']); |
|
|
|
|
interface RuleForm { |
|
|
|
@ -377,7 +326,7 @@ const info = ref<Record<string, any>>(null); |
|
|
|
|
const formRef = ref<FormInstance>(); |
|
|
|
|
const userName = ref<string>(); |
|
|
|
|
|
|
|
|
|
let form = reactive<RuleForm>({ |
|
|
|
|
const form = reactive<RuleForm>({ |
|
|
|
|
...getIds(), |
|
|
|
|
productDefinition: '', |
|
|
|
|
productName: '', |
|
|
|
@ -472,51 +421,51 @@ const addRecord = async (data: Record<string, any>) => { |
|
|
|
|
const isEnterprise = productType === 1; |
|
|
|
|
const preIds = `1,${Cookies.get('sand-level')},41,${productType ? 45 : 44}`; // 1,关卡id,角色(这个页面是产品经理新增产品),个人/企业(44/45) |
|
|
|
|
const lcRule: Array<Record<string, any>> = [ |
|
|
|
|
handleId(48, 1, data.productDefinition, preIds + ',48', 3), |
|
|
|
|
handleId(49, 2, data.productName, preIds + ',49', 3), |
|
|
|
|
handleId(50, 3, 1, preIds + ',50', 1), |
|
|
|
|
handleId(48, 1, data.productDefinition, `${preIds},48`, 3), |
|
|
|
|
handleId(49, 2, data.productName, `${preIds},49`, 3), |
|
|
|
|
handleId(50, 3, 1, `${preIds},50`, 1), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
// 贷款用途 |
|
|
|
|
if (isEnterprise) { |
|
|
|
|
// 企业 |
|
|
|
|
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), |
|
|
|
|
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.ageSelectedState && lcRule.push(handleId(1235, 324, data.ageSelectedState, preIds + ',51,1234,1235', 1)); |
|
|
|
|
data.ageSelectedState === 795 && lcRule.push(handleId(1236, 41, data.minimumAge + '~' + data.maximumAge, preIds + ',51,1234,1236', 5)); |
|
|
|
|
data.ageSelectedState && lcRule.push(handleId(1235, 324, data.ageSelectedState, `${preIds},51,1234,1235`, 1)); |
|
|
|
|
data.ageSelectedState === 795 && lcRule.push(handleId(1236, 41, `${data.minimumAge}~${data.maximumAge}`, `${preIds},51,1234,1236`, 5)); |
|
|
|
|
|
|
|
|
|
data.degreeSelectedStatus && lcRule.push(handleId(1238, 324, data.degreeSelectedStatus, preIds + ',51,1237,1238', 1)); |
|
|
|
|
data.degreeSelectedStatus === 795 && lcRule.push(handleId(1239, 42, data.educationalRequirements, preIds + ',51,1237,1239', 1)); |
|
|
|
|
data.degreeSelectedStatus && lcRule.push(handleId(1238, 324, data.degreeSelectedStatus, `${preIds},51,1237,1238`, 1)); |
|
|
|
|
data.degreeSelectedStatus === 795 && lcRule.push(handleId(1239, 42, data.educationalRequirements, `${preIds},51,1237,1239`, 1)); |
|
|
|
|
|
|
|
|
|
data.workingLifeSelectedState && lcRule.push(handleId(1241, 324, data.workingLifeSelectedState, preIds + ',51,1240,1241', 1)); |
|
|
|
|
data.workingLifeSelectedState === 795 && lcRule.push(handleId(1242, 43, data.currentWorkingLife, preIds + ',51,1240,1242', 1)); |
|
|
|
|
data.workingLifeSelectedState && lcRule.push(handleId(1241, 324, data.workingLifeSelectedState, `${preIds},51,1240,1241`, 1)); |
|
|
|
|
data.workingLifeSelectedState === 795 && lcRule.push(handleId(1242, 43, data.currentWorkingLife, `${preIds},51,1240,1242`, 1)); |
|
|
|
|
|
|
|
|
|
data.providentFundAndSocialSecurity && lcRule.push(handleId(1244, 324, data.providentFundAndSocialSecurity, preIds + ',51,1243,1244', 1)); // 公积金社保 |
|
|
|
|
lcRule.push(handleId(1316, 328, data.loanPurpose, preIds + ',52,1316', 1)); |
|
|
|
|
data.loanPurpose === 822 && lcRule.push(handleId(1317, 11, data.otherPurposesOfLoan, preIds + ',52,1317', 3)); |
|
|
|
|
data.providentFundAndSocialSecurity && lcRule.push(handleId(1244, 324, data.providentFundAndSocialSecurity, `${preIds},51,1243,1244`, 1)); // 公积金社保 |
|
|
|
|
lcRule.push(handleId(1316, 328, data.loanPurpose, `${preIds},52,1316`, 1)); |
|
|
|
|
data.loanPurpose === 822 && lcRule.push(handleId(1317, 11, data.otherPurposesOfLoan, `${preIds},52,1317`, 3)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 担保方式 |
|
|
|
|
data.creditSelectedStatus && lcRule.push(handleId(108, 324, data.creditSelectedStatus, preIds + ',53,108', 1)); |
|
|
|
|
data.guaranteeLoanSelectedStatus && lcRule.push(handleId(109, 324, data.guaranteeLoanSelectedStatus, preIds + ',53,109', 1)); |
|
|
|
|
data.mortgageSelectedStatus && lcRule.push(handleId(1277, 324, data.mortgageSelectedStatus, preIds + ',53,110,1277', 1)); |
|
|
|
|
data.hypothecatedSelectedStatus && lcRule.push(handleId(1278, 324, data.hypothecatedSelectedStatus, preIds + ',53,111,1278', 1)); |
|
|
|
|
data.mortgageSelectedStatus === 795 && lcRule.push(handleId(1275, 13, data.bankGuaranteeTypeIds.filter((e: number) => e > 22 && e < 33).join(), preIds + ',53,110,1275', 1)); |
|
|
|
|
data.hypothecatedSelectedStatus === 795 && lcRule.push(handleId(1276, 14, data.bankGuaranteeTypeIds.filter((e: number) => e > 32 && e < 38).join(), preIds + ',53,111,1276', 1)); |
|
|
|
|
data.creditSelectedStatus && lcRule.push(handleId(108, 324, data.creditSelectedStatus, `${preIds},53,108`, 1)); |
|
|
|
|
data.guaranteeLoanSelectedStatus && lcRule.push(handleId(109, 324, data.guaranteeLoanSelectedStatus, `${preIds},53,109`, 1)); |
|
|
|
|
data.mortgageSelectedStatus && lcRule.push(handleId(1277, 324, data.mortgageSelectedStatus, `${preIds},53,110,1277`, 1)); |
|
|
|
|
data.hypothecatedSelectedStatus && lcRule.push(handleId(1278, 324, data.hypothecatedSelectedStatus, `${preIds},53,111,1278`, 1)); |
|
|
|
|
data.mortgageSelectedStatus === 795 && lcRule.push(handleId(1275, 13, data.bankGuaranteeTypeIds.filter((e: number) => e > 22 && e < 33).join(), `${preIds},53,110,1275`, 1)); |
|
|
|
|
data.hypothecatedSelectedStatus === 795 && lcRule.push(handleId(1276, 14, data.bankGuaranteeTypeIds.filter((e: number) => e > 32 && e < 38).join(), `${preIds},53,111,1276`, 1)); |
|
|
|
|
|
|
|
|
|
lcRule.push( |
|
|
|
|
handleId(54, 15, data.minimumLoan + '~' + data.loanCeiling, preIds + ',54', 5), |
|
|
|
|
handleId(55, 16, data.minimumAprOnLoan + '~' + data.maximumAnnualInterestRate, preIds + ',55', 5), |
|
|
|
|
handleId(56, 17, data.minimumTermOfLoan + '~' + data.maximumTermOfLoan, preIds + ',56', 5), |
|
|
|
|
handleId(57, 18, data.modeRepayment, preIds + ',57', 1), |
|
|
|
|
handleId(54, 15, `${data.minimumLoan}~${data.loanCeiling}`, `${preIds},54`, 5), |
|
|
|
|
handleId(55, 16, `${data.minimumAprOnLoan}~${data.maximumAnnualInterestRate}`, `${preIds},55`, 5), |
|
|
|
|
handleId(56, 17, `${data.minimumTermOfLoan}~${data.maximumTermOfLoan}`, `${preIds},56`, 5), |
|
|
|
|
handleId(57, 18, data.modeRepayment, `${preIds},57`, 1), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
lcRule.push(handleId(58, 140, data.whetherToSupportEarlyRepayment ? 345 : 346, preIds + ',58', 1)); |
|
|
|
|
lcRule.push(handleId(58, 140, data.whetherToSupportEarlyRepayment ? 345 : 346, `${preIds},58`, 1)); |
|
|
|
|
|
|
|
|
|
await addOperation({ |
|
|
|
|
...getIds(), |
|
|
|
|