银行相关1.0.2需求

V0.1
yujialong 8 months ago
parent 50a5452471
commit ec385dda77
  1. 3
      src/api/bank.ts
  2. 4
      src/api/config.ts
  3. 2
      src/layout/components/AppSidebar/Menu.vue
  4. 521
      src/views/product/bank/Add.vue
  5. 118
      src/views/product/bank/Approve.vue
  6. 134
      src/views/product/bank/Config.vue
  7. 6
      src/views/product/bank/Detail.vue
  8. 57
      src/views/product/bank/Info.vue
  9. 26
      src/views/product/bank/List.vue
  10. 4
      src/views/product/fund/Add.vue

@ -16,6 +16,8 @@ export const save = async (data: Record<string, any>): Promise<any> => (await ax
export const riskSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/save`, data)).data; export const riskSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/save`, data)).data;
export const riskUpdate = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/update`, data)).data; export const riskUpdate = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/update`, data)).data;
export const riskById = async (id: number): Promise<any> => (await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/findById?id=${id}`)).data; export const riskById = async (id: number): Promise<any> => (await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/findById?id=${id}`)).data;
export const riskControlDetailsAreDisplayed = async (id: number): Promise<any> =>
(await axios.post(`/product/managerOfRiskControl/bankRiskControlAllocation/riskControlDetailsAreDisplayed?id=${id}`)).data;
export const examineAndApprove = async (id: number | string, opinionDescription: string, status: number, approvalTime: string): Promise<any> => export const examineAndApprove = async (id: number | string, opinionDescription: string, status: number, approvalTime: string): Promise<any> =>
(await axios.post(`/product/product/bank/products/examineAndApprove?id=${id}&opinionDescription=${opinionDescription}&status=${status}&approvalTime=${approvalTime}`)).data; (await axios.post(`/product/product/bank/products/examineAndApprove?id=${id}&opinionDescription=${opinionDescription}&status=${status}&approvalTime=${approvalTime}`)).data;
export const update = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/products/update`, data)).data; export const update = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/products/update`, data)).data;
@ -23,3 +25,4 @@ export const cancelCollection = async (id: number): Promise<any> => (await axios
export const collect = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/checkPointCollect/collect`, data)).data; export const collect = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/checkPointCollect/collect`, data)).data;
export const submitOpe = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/operation/submit`, data)).data; export const submitOpe = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/operation/submit`, data)).data;
export const statistics = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/products/statistics`, data)).data; export const statistics = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/products/statistics`, data)).data;
export const approvalRecord = async (params: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/products/approvalRecord`, {}, { params })).data;

@ -20,6 +20,6 @@ export const checkPointListByStu = async (projectId: number, displayCollection?:
export const getTheCurrentUserName = async (): Promise<any> => (await axios.post('/product/product/bank/products/getTheCurrentUserName')).data; export const getTheCurrentUserName = async (): Promise<any> => (await axios.post('/product/product/bank/products/getTheCurrentUserName')).data;
export const getOperationTime = async (checkpointId: number, projectId: number): Promise<any> => export const getOperationTime = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/product/bank/products/getOperationTime?checkPointId=${checkpointId}&projectId=${projectId}`)).data; (await axios.post(`/product/product/bank/products/getOperationTime?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const saveOperationTime = async (checkpointId: number, projectId: number, operationTime: string): Promise<any> => export const saveOperationTime = async (checkpointId: number, projectId: number, operationTime: string): Promise<any> =>
(await axios.post(`/product/product/bank/products/saveOperationTime?checkPointId=${checkpointId}&projectId=${projectId}&operationTime=${operationTime}`)).data; (await axios.post(`/product/product/bank/products/saveOperationTime?checkpointId=${checkpointId}&projectId=${projectId}&operationTime=${operationTime}`)).data;

@ -149,7 +149,7 @@ const toPage = (path: string) => {
// //
const getNum = async (status?: number, type?: number) => { const getNum = async (status?: number, type?: number) => {
const { data } = await statistics({ const { data } = await statistics({
checkPointId: levelId, checkpointId: levelId,
projectId, projectId,
status, status,
productType: type, productType: type,

@ -2,22 +2,8 @@
<div> <div>
<el-tabs v-model="curTab" <el-tabs v-model="curTab"
@tab-click="tabChange"> @tab-click="tabChange">
<el-tab-pane :label="id ? '产品要素' : '新增产品'" <el-tab-pane :label="id ? '修改要素' : '新增产品'"
name="tab1"> name="tab1">
<div v-if="info"
class="audit">
<div class="line">
<span class="field">审批意见</span>
<span class="status">{{ getStatus(+info?.status) }}</span>
</div>
<div class="line">
<span class="field">意见描述</span>
{{ info.opinionDescription }}
</div>
<p class="mb-2 text-sm text-[#333] text-right">审查日期{{ info.approvalTime }}</p>
<p class="mb-2 text-sm text-[#333] text-right">审查员{{ userName }}</p>
</div>
<el-form ref="formRef" <el-form ref="formRef"
:model="form" :model="form"
:rules="rules" :rules="rules"
@ -25,132 +11,133 @@
label-suffix=":" label-suffix=":"
class="form" class="form"
status-icon> status-icon>
<el-form-item label="产品定义" <div class="h-[calc(100vh-230px)] pr-1 overflow-auto">
prop="productDefinition"> <el-form-item label="产品定义"
<el-input type="textarea" prop="productDefinition">
placeholder="用一段话简单介绍一下这个产品或者描述产品的设计理念。例如:本产品根据个人客户的信用状况,为其提供的一种短期融资便利产品,借款人可在额度金额内可循环周转使用贷款。" <el-input type="textarea"
maxlength="200" placeholder="用一段话简单介绍一下这个产品或者描述产品的设计理念。例如:本产品根据个人客户的信用状况,为其提供的一种短期融资便利产品,借款人可在额度金额内可循环周转使用贷款。"
v-model="form.productDefinition"></el-input> maxlength="200"
</el-form-item> v-model="form.productDefinition"></el-input>
<el-form-item label="产品名称" </el-form-item>
prop="productName"> <el-form-item label="产品名称"
<el-input placeholder="取个有吸引力的产品名,限20字。" prop="productName">
maxlength="20" <el-input placeholder="取个有吸引力的产品名,限20字。"
v-model="form.productName"></el-input> maxlength="20"
</el-form-item> v-model="form.productName"></el-input>
<el-form-item label="产品币种" </el-form-item>
prop="productCurrency"> <el-form-item label="产品币种"
<el-select v-model="form.productCurrency" prop="productCurrency">
placeholder="请选择"> <el-select v-model="form.productCurrency"
<el-option label="人民币" placeholder="请选择">
:value="1" /> <el-option label="人民币"
</el-select> :value="1" />
</el-form-item> </el-select>
<el-form-item label="贷款对象" </el-form-item>
required> <el-form-item label="贷款对象"
<div class="flex-1"> required>
<!-- 企业 --> <div class="flex-1">
<template v-if="form.productType"> <!-- 企业 -->
<div class="flex items-center"> <template v-if="form.productType">
<span class="mr-3 text-[#333] text-sm">企业类型</span> <div class="flex items-center">
<el-select v-model="form.productObject" <span class="mr-3 text-[#333] text-sm">企业类型</span>
placeholder="请选择"> <el-select v-model="form.productObject"
<el-option v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款对象')?.recordChildren[0]?.subject?.itemList" placeholder="请选择">
:key="i" <el-option v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款对象')?.recordChildren[0]?.subject?.itemList"
:label="item.options" :key="i"
:value="item.itemId" /> :label="item.options"
</el-select> :value="item.itemId" />
</div> </el-select>
<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>
</div> <div class="flex items-center mt-4">
</template> <span class="mr-3 text-[#333] text-sm">借款人年龄</span>
<!-- 个人 --> <div class="num-inputs ml-7">
<template v-else> <el-input placeholder="最小年龄"
<p class="field-name">选择本产品的贷款对象</p> v-model.number="form.minimumAge"></el-input>
<div class="flex items-center mb-2"> <span class="split">-</span>
<div class="radio-wrap"> <el-input placeholder="最大年龄"
<span class="label">1年龄</span> v-model.number="form.maximumAge"></el-input>
<span class="whether">是否启用</span> <span class="unit">周岁</span>
<el-radio-group v-model="form.ageSelectedState"> </div>
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div> </div>
</template>
<!-- 个人 -->
<template v-else>
<p class="field-name">选择本产品的贷款对象</p>
<div class="flex items-center mb-2">
<div class="radio-wrap">
<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-group>
</div>
<div v-if="form.ageSelectedState === 795" <div v-if="form.ageSelectedState === 795"
class="num-inputs ml-7"> class="num-inputs ml-7">
<el-input placeholder="最小年龄" <el-input placeholder="最小年龄"
v-model.number="form.minimumAge"></el-input> v-model.number="form.minimumAge"></el-input>
<span class="split">-</span> <span class="split">-</span>
<el-input placeholder="最大年龄" <el-input placeholder="最大年龄"
v-model.number="form.maximumAge"></el-input> v-model.number="form.maximumAge"></el-input>
</div>
</div> </div>
</div> <div class="flex items-center h-[47px] mb-2">
<div class="flex items-center h-[47px] mb-2"> <div class="radio-wrap">
<div class="radio-wrap"> <span class="label">2学历要求</span>
<span class="label">2学历要求</span> <span class="whether">是否启用</span>
<span class="whether">是否启用</span> <el-radio-group v-model="form.degreeSelectedStatus">
<el-radio-group v-model="form.degreeSelectedStatus"> <el-radio v-for="(item, i) in whethers"
<el-radio v-for="(item, i) in whethers" :key="i"
:key="i" :label="item.id">{{ item.name }}</el-radio>
:label="item.id">{{ item.name }}</el-radio> </el-radio-group>
</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>
</div> </div>
<el-checkbox-group v-if="form.degreeSelectedStatus === 795" <div class="flex items-center h-[47px] mb-2">
class="mt-2 ml-5" <div class="radio-wrap">
v-model="form.educationalRequirements"> <span class="label">3工作年限</span>
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[1]?.recordChildren[1]?.subject?.itemList" <span class="whether">是否启用</span>
:key="i" <el-radio-group v-model="form.workingLifeSelectedState">
:label="item.itemId">{{ item.options }}</el-checkbox> <el-radio v-for="(item, i) in whethers"
</el-checkbox-group> :key="i"
</div> :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>
</div>
<div class="flex items-center h-[47px] mb-2">
<div class="radio-wrap"> <div class="radio-wrap">
<span class="label">3工作年限</span> <span class="label">4公积金/社保</span>
<span class="whether">是否启用</span> <span class="whether">是否启用</span>
<el-radio-group v-model="form.workingLifeSelectedState"> <el-radio-group v-model="form.providentFundAndSocialSecurity">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</template>
<el-checkbox-group v-if="form.workingLifeSelectedState === 795" </div>
class="mt-2 ml-5" </el-form-item>
v-model="form.currentWorkingLife"> <el-form-item label="贷款用途"
<el-checkbox v-for="(item, i) in config.find((e) => e.name === '个人产品-贷款对象')?.recordChildren[2]?.recordChildren[1]?.subject?.itemList" prop="loanPurpose"
:key="i" :rules="[
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
<div class="radio-wrap">
<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-group>
</div>
</template>
</div>
</el-form-item>
<el-form-item label="贷款用途"
prop="loanPurpose"
:rules="[
{ required: true, message: '请选择贷款用途', trigger: 'change' }, { required: true, message: '请选择贷款用途', trigger: 'change' },
{ {
asyncValidator: async (rule, value, callback) => { asyncValidator: async (rule, value, callback) => {
@ -162,30 +149,30 @@
}, },
}, },
]"> ]">
<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">
<template v-if="form.productType"> <template v-if="form.productType">
<el-radio v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款用途')?.subject?.itemList" <el-radio v-for="(item, i) in config.find((e) => e.name === '企业产品-贷款用途')?.subject?.itemList"
:key="i" :key="i"
:label="item.itemId">{{ item.options }}</el-radio> :label="item.itemId">{{ item.options }}</el-radio>
</template> </template>
<template v-else> <template v-else>
<el-radio v-for="(item, i) in config.find(e => e.name === '个人产品-贷款用途')?.recordChildren[0]?.subject?.itemList" <el-radio v-for="(item, i) in config.find(e => e.name === '个人产品-贷款用途')?.recordChildren[0]?.subject?.itemList"
:key="i" :key="i"
:label="item.itemId">{{ item.options }}</el-radio> :label="item.itemId">{{ item.options }}</el-radio>
</template> </template>
</el-radio-group> </el-radio-group>
<el-input v-if="form?.loanPurpose === 822" <el-input v-if="form?.loanPurpose === 822"
class="w-[300px] ml-5" class="w-[300px] ml-5"
placeholder="请描述其他贷款用途可用于哪些方面。" placeholder="请描述其他贷款用途可用于哪些方面。"
maxlength="10" maxlength="10"
v-model="form.otherPurposesOfLoan"></el-input> v-model="form.otherPurposesOfLoan"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="担保方式" <el-form-item label="担保方式"
prop="bankGuaranteeTypeIds" prop="bankGuaranteeTypeIds"
:rules="[ :rules="[
{ {
asyncValidator: async (rule, value, callback) => { asyncValidator: async (rule, value, callback) => {
if (form.mortgageSelectedStatus === 795 && !value.find(e => e > 22 && e < 33)) { if (form.mortgageSelectedStatus === 795 && !value.find(e => e > 22 && e < 33)) {
@ -198,126 +185,127 @@
}, },
}, },
]"> ]">
<div class="flex-1"> <div class="flex-1">
<p class="field-name">选择本产品的担保种类</p> <p class="field-name">选择本产品的担保种类</p>
<div class="radio-wrap"> <div class="radio-wrap">
<span class="label">信用贷</span> <span class="label">信用贷</span>
<el-radio-group v-model="form.creditSelectedStatus"> <el-radio-group v-model="form.creditSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="radio-wrap my-1"> <div class="radio-wrap my-1">
<span class="label">保证贷</span> <span class="label">保证贷</span>
<el-radio-group v-model="form.guaranteeLoanSelectedStatus"> <el-radio-group v-model="form.guaranteeLoanSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="radio-wrap"> <div class="radio-wrap">
<span class="label">抵押贷</span> <span class="label">抵押贷</span>
<el-radio-group v-model="form.mortgageSelectedStatus"> <el-radio-group v-model="form.mortgageSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<el-checkbox-group v-if="form.mortgageSelectedStatus === 795" <el-checkbox-group v-if="form.mortgageSelectedStatus === 795"
v-model="form.bankGuaranteeTypeIds"> v-model="form.bankGuaranteeTypeIds">
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[2]?.recordChildren[0]?.subject?.itemList" <el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[2]?.recordChildren[0]?.subject?.itemList"
:key="j" :key="j"
:label="child.itemId">{{ child.options }}</el-checkbox> :label="child.itemId">{{ child.options }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="radio-wrap mt-1"> <div class="radio-wrap mt-1">
<span class="label">质押贷</span> <span class="label">质押贷</span>
<el-radio-group v-model="form.hypothecatedSelectedStatus"> <el-radio-group v-model="form.hypothecatedSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<el-checkbox-group v-if="form.hypothecatedSelectedStatus === 795" <el-checkbox-group v-if="form.hypothecatedSelectedStatus === 795"
v-model="form.bankGuaranteeTypeIds"> v-model="form.bankGuaranteeTypeIds">
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[3]?.recordChildren[0]?.subject?.itemList" <el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[3]?.recordChildren[0]?.subject?.itemList"
:key="j" :key="j"
:label="child.itemId">{{ child.options }}</el-checkbox> :label="child.itemId">{{ child.options }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="贷款额度" <el-form-item label="贷款额度"
prop="minimumLoan" prop="minimumLoan"
:rules="[ :rules="[
{ required: true, message: '请输入贷款额度', trigger: 'blur' }, { required: true, message: '请输入贷款额度', trigger: 'blur' },
]"> ]">
<div class="flex-1"> <div class="flex-1">
<div class="num-inputs"> <div class="num-inputs">
<el-input placeholder="最小额度" <el-input placeholder="最小额度"
v-model="form.minimumLoan"></el-input> v-model="form.minimumLoan"></el-input>
<span class="split">-</span> <span class="split">-</span>
<el-input placeholder="最高额度" <el-input placeholder="最高额度"
v-model="form.loanCeiling"></el-input> v-model="form.loanCeiling"></el-input>
<span class="unit">万元</span> <span class="unit">万元</span>
</div>
</div> </div>
</div> </el-form-item>
</el-form-item> <el-form-item label="贷款利率"
<el-form-item label="贷款利率" prop="minimumAprOnLoan"
prop="minimumAprOnLoan" :rules="[
:rules="[
{ required: true, message: '请输入贷款利率', trigger: 'blur' }, { required: true, message: '请输入贷款利率', trigger: 'blur' },
]"> ]">
<div class="flex-1"> <div class="flex-1">
<div class="num-inputs"> <div class="num-inputs">
<el-input placeholder="最小年利率" <el-input placeholder="最小年利率"
min="0" min="0"
v-model="form.minimumAprOnLoan"></el-input> v-model="form.minimumAprOnLoan"></el-input>
<span class="split">-</span> <span class="split">-</span>
<el-input placeholder="最高年利率" <el-input placeholder="最高年利率"
min="0" min="0"
v-model="form.maximumAnnualInterestRate"></el-input> v-model="form.maximumAnnualInterestRate"></el-input>
<span class="unit">%</span> <span class="unit">%</span>
</div>
</div> </div>
</div> </el-form-item>
</el-form-item> <el-form-item label="贷款期限"
<el-form-item label="贷款期限" prop="minimumTermOfLoan"
prop="minimumTermOfLoan" :rules="[
:rules="[
{ required: true, message: '请输入贷款期限', trigger: 'blur' }, { required: true, message: '请输入贷款期限', trigger: 'blur' },
]"> ]">
<div class="flex-1"> <div class="flex-1">
<div class="num-inputs"> <div class="num-inputs">
<el-input placeholder="最小期限" <el-input placeholder="最小期限"
v-model="form.minimumTermOfLoan"></el-input> v-model="form.minimumTermOfLoan"></el-input>
<span class="split">-</span> <span class="split">-</span>
<el-input placeholder="最大期限" <el-input placeholder="最大期限"
v-model="form.maximumTermOfLoan"></el-input> v-model="form.maximumTermOfLoan"></el-input>
<span class="unit"></span> <span class="unit"></span>
</div>
</div>
</el-form-item>
<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-group>
</div>
</el-form-item>
<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>
</div> </div>
</div> </el-form-item>
</el-form-item> </div>
<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-group>
</div>
</el-form-item>
<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>
</div>
</el-form-item>
<div class="flex justify-end"> <div class="flex justify-end">
<div class="submit" <div class="submit"
@click="submit(formRef)">完成提交风控经理</div> @click="submit(formRef)">完成提交风控经理</div>
@ -325,9 +313,11 @@
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="id" <el-tab-pane v-if="id"
label="产品风控" label="产品详情"
name="tab2"> name="tab2">
<info v-model:tab="curTab" /> <div class="h-[calc(100vh-170px)] pr-1 overflow-auto">
<info v-model:tab="curTab" />
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -380,7 +370,7 @@ interface RuleForm {
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const id = computed(() => route.query.id); const id = computed(() => route.query.id);
const curTab = ref<string>('tab1'); const curTab = ref<string>(route.query.show ? 'tab2' : 'tab1');
const config = ref<any[]>([]); const config = ref<any[]>([]);
const info = ref<Record<string, any>>(null); const info = ref<Record<string, any>>(null);
@ -622,13 +612,4 @@ onMounted(() => {
<style lang="scss" scoped> <style lang="scss" scoped>
@import url(../../../styles/form.scss); @import url(../../../styles/form.scss);
.audit {
@apply py-5 px-4 mb-[30px] bg-[#f9fafc] rounded-[10px];
.line {
@apply mb-[18px] text-sm leading-[1.6];
}
.field {
@apply text-sm font-semibold;
}
}
</style> </style>

@ -1,59 +1,62 @@
<template> <template>
<div> <div>
<el-tabs v-model="curTab"> <el-tabs v-model="curTab">
<el-tab-pane label="产品审批" <el-tab-pane label="审批"
name="tab1"> name="tab1">
<info ref="infoRef" /> <div class="h-[calc(100vh-170px)] pr-1 overflow-auto">
<el-form ref="formRef" <info ref="infoRef"
:model="form" @updateAudits="updateAudits" />
:rules="rules" <el-form ref="formRef"
label-width="100px" :model="form"
label-suffix=":" :rules="rules"
class="form pt-5 mt-5 border-t border-t-solid border-t-[#EDF1F5]" label-width="100px"
status-icon> label-suffix=":"
<el-form-item label="审批意见" class="form pt-5 mt-5 border-t border-t-solid border-t-[#EDF1F5]"
prop="status"> status-icon>
<el-select v-model="form.status" <el-form-item label="审批意见"
placeholder="请选择"> prop="status">
<el-option v-for="(item, i) in config[0]?.recordChildren[0]?.subject?.itemList.slice(2)" <el-select v-model="form.status"
:key="i" placeholder="请选择">
:label="item.options" <el-option v-for="(item, i) in autids"
:value="item.itemId" /> :key="i"
</el-select> :label="item.name"
</el-form-item> :value="item.id" />
<el-form-item label="意见描述" </el-select>
prop="opinionDescription"> </el-form-item>
<el-input type="textarea" <el-form-item label="意见描述"
placeholder="审批意见500字以内。" prop="opinionDescription">
maxlength="500" <el-input type="textarea"
v-model="form.opinionDescription"></el-input> placeholder="审批意见500字以内。"
</el-form-item> maxlength="500"
<div class="flex flex-col items-end"> v-model="form.opinionDescription"></el-input>
<div class="mb-[18px] text-sm leading-[1.6]"> </el-form-item>
<span class="text-sm font-semibold">审批日期</span> <div class="flex flex-col items-end">
<span>{{ date }}</span> <div class="mb-[18px] text-sm leading-[1.6]">
<span class="text-sm font-semibold">审批日期</span>
<span>{{ date }}</span>
</div>
<div class="inline-flex items-center mb-[18px] text-sm leading-[1.6]">
<span class="text-sm font-semibold">审批员</span>
<span v-if="signed"
class="text-lg text-[#f00]">{{ signed }}</span>
<span v-else
class="py-2 px-5 ml-1 text-sm text-white bg-[#006BFF] cursor-pointer"
@click="sign">签章</span>
</div>
</div> </div>
<div class="inline-flex items-center mb-[18px] text-sm leading-[1.6]"> <div class="flex justify-end">
<span class="text-sm font-semibold">审批员</span> <div class="submit"
<span v-if="signed" @click="submit(formRef)">审批</div>
class="text-lg text-[#f00]">{{ signed }}</span>
<span v-else
class="py-2 px-5 ml-1 text-sm text-white bg-[#006BFF] cursor-pointer"
@click="sign">签章</span>
</div> </div>
</div> </el-form>
<div class="flex justify-end"> </div>
<div class="submit"
@click="submit(formRef)">审批</div>
</div>
</el-form>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, reactive, onMounted } from 'vue'; import { ref, computed, reactive, onMounted, watch } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import type { TabsPaneContext, FormInstance, FormRules } from 'element-plus'; import type { TabsPaneContext, FormInstance, FormRules } from 'element-plus';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
@ -61,9 +64,10 @@ import Info from './Info.vue';
import { handleId, getIds, getNow, getUsername } from '@/utils/common'; import { handleId, getIds, getNow, getUsername } from '@/utils/common';
import { examineAndApprove } from '@/api/bank'; import { examineAndApprove } from '@/api/bank';
import { getOperationTime } from '@/api/config'; import { getOperationTime } from '@/api/config';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { addOperation } from '@/api/judgment';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { productState } from '@/store/useProduct';
const emit = defineEmits(['getList']); const emit = defineEmits(['getList']);
interface RuleForm { interface RuleForm {
@ -78,8 +82,7 @@ const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level'); const levelId = +Cookies.get('sand-level');
const curTab = ref<string>('tab1'); const curTab = ref<string>('tab1');
const date = ref<string>(dayjs(new Date()).format('YYYY-M-D')); const date = ref<string>(dayjs(new Date()).format('YYYY-M-D'));
const info = ref<any>({}); const autids = ref<Record<string, any>[]>([]);
const config = ref<any[]>([]);
const formRef = ref<FormInstance>(); const formRef = ref<FormInstance>();
const infoRef = ref<any>(null); const infoRef = ref<any>(null);
const form = reactive<RuleForm>({ const form = reactive<RuleForm>({
@ -93,11 +96,13 @@ const rules = reactive<FormRules<RuleForm>>({
}); });
const signed = ref<string>(); const signed = ref<string>();
// //
const getConfig = async () => { const updateAudits = (count: number) => {
const { process } = await getProcessInformationBasedOnRoles(43); // 43 if (count >= 2) {
config.value = process; autids.value.pop();
}
}; };
// //
const getDate = async () => { const getDate = async () => {
const res = await getOperationTime(levelId, projectId); const res = await getOperationTime(levelId, projectId);
@ -144,9 +149,18 @@ const submit = async (formEl: FormInstance | undefined) => {
}); });
}; };
onMounted(async () => { onMounted(async () => {
getConfig(); console.log(11);
date.value = dayjs(await getNow()).format('YYYY-MM-DD'); date.value = dayjs(await getNow()).format('YYYY-MM-DD');
}); });
watch(
() => route.query,
() => {
autids.value = productState.status.slice(3);
},
{
immediate: true,
},
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

@ -2,41 +2,28 @@
<div> <div>
<el-tabs v-model="curTab" <el-tabs v-model="curTab"
@tab-click="tabChange"> @tab-click="tabChange">
<el-tab-pane label="配置风控" <el-tab-pane :label="info.approvalTime ? '修改风控' : '配置风控'"
name="tab1"> name="tab1">
<div v-if="info.approvalTime"
class="audit">
<div class="line">
<span class="field">审批意见</span>
<span class="status">审批打回</span>
</div>
<div class="line">
<span class="field">意见描述</span>
{{ info.opinionDescription }}
</div>
<p class="mb-2 text-sm text-[#333] text-right">审查日期{{ info.approvalTime }}</p>
<p class="mb-2 text-sm text-[#333] text-right">审查员{{ userName }}</p>
</div>
<el-form ref="formRef" <el-form ref="formRef"
:model="form" :model="form"
label-width="120px" label-width="120px"
label-suffix=":" label-suffix=":"
class="form" class="form h-[calc(100vh-230px)] pr-1 overflow-auto"
status-icon> status-icon>
<!-- <div class="h-[calc(100vh-170px)] pr-1 overflow-auto"> -->
<div class="step"> <div class="step">
<h6 class="step-name mb-7">办理账户</h6> <h6 class="step-name mb-7">办理账户</h6>
<el-form-item label="提供材料" <el-form-item label="提供材料"
prop="accountMaterials"> prop="accountMaterials">
<div> <div>
<div class="radio-wrap flex-col items-start mb-1"> <div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-model="form.accountMaterialsCheck"> <el-radio-group v-model="form.provideMaterialSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<template v-if="form.accountMaterialsCheck === 797"> <template v-if="form.provideMaterialSelectedStatus === 797">
<p class="tips">选择需要提供的申请人材料至少选一样</p> <p class="tips">选择需要提供的申请人材料至少选一样</p>
<el-checkbox-group v-if="config.length" <el-checkbox-group v-if="config.length"
v-model="form.accountMaterials"> v-model="form.accountMaterials">
@ -52,13 +39,13 @@
<div> <div>
<div class="radio-wrap flex-col items-start"> <div class="radio-wrap flex-col items-start">
<el-radio-group v-if="config.length" <el-radio-group v-if="config.length"
v-model="form.sendingAccountCheck"> v-model="form.issueAccountSelectStatus">
<el-radio v-for="(item, i) in config[0]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList" <el-radio v-for="(item, i) in config[0]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="i" :key="i"
:label="item.itemId">{{ item.options }}</el-radio> :label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<template v-if="form.sendingAccountCheck === 801 && config.length"> <template v-if="form.issueAccountSelectStatus === 801 && config.length">
<p class="tips">选择需要发放的账户至少选一样</p> <p class="tips">选择需要发放的账户至少选一样</p>
<el-checkbox-group v-model="form.sendingAccount"> <el-checkbox-group v-model="form.sendingAccount">
@ -90,14 +77,14 @@
<div class="flex items-center"> <div class="flex items-center">
<p class="field-name mr-5 mb-0">借款人材料</p> <p class="field-name mr-5 mb-0">借款人材料</p>
<div class="radio-wrap flex-col items-start"> <div class="radio-wrap flex-col items-start">
<el-radio-group v-model="form.borrowerMaterialCheck"> <el-radio-group v-model="form.borrowerMaterialSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<div v-if="form.borrowerMaterialCheck === 797"> <div v-if="form.borrowerMaterialSelectedStatus === 797">
<p class="my-2 text-xs text-[#666]">选择需要提供的借款人材料至少选一样</p> <p class="my-2 text-xs text-[#666]">选择需要提供的借款人材料至少选一样</p>
<el-checkbox-group v-if="config.length" <el-checkbox-group v-if="config.length"
v-model="form.borrowerMaterial" v-model="form.borrowerMaterial"
@ -155,14 +142,14 @@
<p class="field-name mt-5 mb-0">配偶材料</p> <p class="field-name mt-5 mb-0">配偶材料</p>
<div> <div>
<div class="radio-wrap flex-col items-start mb-1"> <div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-model="form.mateMaterialCheck"> <el-radio-group v-model="form.mateMaterialSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<template v-if="form.mateMaterialCheck === 797"> <template v-if="form.mateMaterialSelectedStatus === 797">
<p class="tips">选择需要提供的配偶材料至少选一样</p> <p class="tips">选择需要提供的配偶材料至少选一样</p>
<el-checkbox-group v-if="config.length" <el-checkbox-group v-if="config.length"
v-model="form.mateMaterial" v-model="form.mateMaterial"
@ -176,14 +163,14 @@
<p class="field-name mt-5">经营类材料</p> <p class="field-name mt-5">经营类材料</p>
<div> <div>
<div class="radio-wrap flex-col items-start mb-1"> <div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-model="form.businessMaterialsCheck"> <el-radio-group v-model="form.businessMaterialsSelectedStatus">
<el-radio v-for="(item, i) in whethers" <el-radio v-for="(item, i) in whethers"
:key="i" :key="i"
:label="item.id">{{ item.name }}</el-radio> :label="item.id">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<template v-if="form.businessMaterialsCheck === 797"> <template v-if="form.businessMaterialsSelectedStatus === 797">
<p class="tips">选择需要提供的经营类材料至少选一样</p> <p class="tips">选择需要提供的经营类材料至少选一样</p>
<el-checkbox-group v-if="config.length" <el-checkbox-group v-if="config.length"
v-model="form.businessMaterials" v-model="form.businessMaterials"
@ -573,9 +560,11 @@
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="产品要素" <el-tab-pane :label="info.approvalTime ? '产品详情' : '产品要素'"
name="tab2"> name="tab2">
<info /> <div class="h-[calc(100vh-170px)] pr-1 overflow-auto">
<info />
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -585,26 +574,25 @@
import { ref, reactive, computed, watch, onMounted } from 'vue'; import { ref, reactive, computed, watch, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import type { TabsPaneContext, FormInstance } from 'element-plus'; import type { TabsPaneContext, FormInstance } from 'element-plus';
import { findById, riskSave, riskUpdate } from '@/api/bank'; import { findById, riskSave, riskUpdate, riskControlDetailsAreDisplayed } from '@/api/bank';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { listCredit } from '@/api/model'; import { listCredit } from '@/api/model';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds, getUsername } from '@/utils/common'; import { handleId, getIds, getUsername } from '@/utils/common';
import Info from './Info.vue'; import Info from './Info.vue';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { getStatus } from '@/store/useProduct';
const emit = defineEmits(['getList']); const emit = defineEmits(['getList']);
interface RuleForm { interface RuleForm {
accessPolicySelectedStatus?: number; accessPolicySelectedStatus?: number;
accessStrategy: any; accessStrategy: any;
accountMaterialsCheck?: number; provideMaterialSelectedStatus?: number;
accountMaterials: any; accountMaterials: any;
approvalSignature?: any; approvalSignature?: any;
bankProductsId: any; bankProductsId: any;
borrowerMaterialCheck?: number; borrowerMaterialSelectedStatus?: number;
borrowerMaterial: any; borrowerMaterial: any;
businessMaterialsCheck?: number; businessMaterialsSelectedStatus?: number;
businessMaterials: any; businessMaterials: any;
mortgagedPropertySelectedStatus?: number; mortgagedPropertySelectedStatus?: number;
collateral: any; collateral: any;
@ -626,7 +614,7 @@ interface RuleForm {
loanApplicationMethod: any; loanApplicationMethod: any;
loanContractSelectedStatus?: number; loanContractSelectedStatus?: number;
loanContract: any; loanContract: any;
mateMaterialCheck?: number; mateMaterialSelectedStatus?: number;
mateMaterial: any; mateMaterial: any;
materialsForLoanApproval: any; materialsForLoanApproval: any;
mortgageContractSelectedStatus?: number; mortgageContractSelectedStatus?: number;
@ -644,7 +632,7 @@ interface RuleForm {
runBatchObject: any; runBatchObject: any;
postLoanManagementSelectPolicySelectStatus?: number; postLoanManagementSelectPolicySelectStatus?: number;
selectionStrategy: any; selectionStrategy: any;
sendingAccountCheck?: number; issueAccountSelectStatus?: number;
sendingAccount: number[]; sendingAccount: number[];
supplementMaterialSelectedStatus?: number; supplementMaterialSelectedStatus?: number;
supplementaryMaterials: any; supplementaryMaterials: any;
@ -652,7 +640,7 @@ interface RuleForm {
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const id = computed(() => +route.query.id); const id = computed(() => +route.query.id);
const curTab = ref<string>('tab1'); const curTab = ref<string>(route.query.show ? 'tab2' : 'tab1');
const config = ref<any[]>([]); const config = ref<any[]>([]);
const credits = ref<Record<string, any>[]>([]); const credits = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>>({}); const info = ref<Record<string, any>>({});
@ -668,17 +656,17 @@ const whethers = ref<Record<string, any>>([
]); ]);
const formRef = ref<FormInstance>(); const formRef = ref<FormInstance>();
const userName = ref<string>(); const userName = ref<string>();
const form = reactive<RuleForm>({ let form = reactive<RuleForm>({
...getIds(), ...getIds(),
accessPolicySelectedStatus: '', accessPolicySelectedStatus: '',
accessStrategy: [], accessStrategy: [],
accountMaterialsCheck: '', provideMaterialSelectedStatus: '',
accountMaterials: [], accountMaterials: [],
approvalSignature: '', approvalSignature: '',
bankProductsId: computed(() => +route.query.id), bankProductsId: computed(() => +route.query.id),
borrowerMaterialCheck: '', borrowerMaterialSelectedStatus: '',
borrowerMaterial: [], borrowerMaterial: [],
businessMaterialsCheck: '', businessMaterialsSelectedStatus: '',
businessMaterials: [], businessMaterials: [],
mortgagedPropertySelectedStatus: '', mortgagedPropertySelectedStatus: '',
collateral: [], collateral: [],
@ -700,7 +688,7 @@ const form = reactive<RuleForm>({
loanApplicationMethod: [], loanApplicationMethod: [],
loanContractSelectedStatus: '', loanContractSelectedStatus: '',
loanContract: '', loanContract: '',
mateMaterialCheck: '', mateMaterialSelectedStatus: '',
mateMaterial: [], mateMaterial: [],
materialsForLoanApproval: [], materialsForLoanApproval: [],
mortgageContractSelectedStatus: '', mortgageContractSelectedStatus: '',
@ -718,7 +706,7 @@ const form = reactive<RuleForm>({
runBatchObject: [], runBatchObject: [],
postLoanManagementSelectPolicySelectStatus: '', postLoanManagementSelectPolicySelectStatus: '',
selectionStrategy: [], selectionStrategy: [],
sendingAccountCheck: '', issueAccountSelectStatus: '',
sendingAccount: [], sendingAccount: [],
supplementMaterialSelectedStatus: '', supplementMaterialSelectedStatus: '',
supplementaryMaterials: [], supplementaryMaterials: [],
@ -771,9 +759,26 @@ const getDetail = async () => {
userName.value = await getUsername(); userName.value = await getUsername();
if (id.value) { if (id.value) {
try { try {
//
const { data } = await findById(id.value); const { data } = await findById(id.value);
info.value = data; info.value = data;
getConfig(); getConfig();
// id
const res = await riskControlDetailsAreDisplayed(id.value);
const e = res.data;
e.interestRatePricingModel = e?.interestRatePricingModel?.length ? e.interestRatePricingModel[0] : '';
e.individualInterestRateModel = e?.individualInterestRateModel?.length ? e.individualInterestRateModel[0] : '';
e.reviewSignature = e?.reviewSignature?.length ? e.reviewSignature[0] : '';
e.approvalSignature = e?.approvalSignature?.length ? e.approvalSignature[0] : '';
e.loanContract = e?.loanContract?.length ? e.loanContract[0] : '';
e.mortgageContract = e?.mortgageContract?.length ? e.mortgageContract[0] : '';
e.pledgeContract = e?.pledgeContract?.length ? e.pledgeContract[0] : '';
e.guaranteeContract = e?.guaranteeContract?.length ? e.guaranteeContract[0] : '';
e.contractMaterials = e.contractMaterials ? +e.contractMaterials : '';
delete e.enterpriseQuotaModel;
form = Object.assign(form, e);
} finally { } finally {
} }
} }
@ -800,10 +805,10 @@ const submit = async (formEl: FormInstance | undefined) => {
const isEnterprise = info.value.productType === 1; const isEnterprise = info.value.productType === 1;
const param = JSON.parse(JSON.stringify(form)); const param = JSON.parse(JSON.stringify(form));
if (param.accountMaterialsCheck === 797 && !param.accountMaterials.length) return ElMessage.error('请选择需要提供的申请人材料'); if (param.provideMaterialSelectedStatus === 797 && !param.accountMaterials.length) return ElMessage.error('请选择需要提供的申请人材料');
if (param.sendingAccountCheck === 801 && !param.sendingAccount.length) return ElMessage.error('请选择需要发放的账户'); if (param.issueAccountSelectStatus === 801 && !param.sendingAccount.length) return ElMessage.error('请选择需要发放的账户');
if (!param.loanApplicationMethod.length) return ElMessage.error('请选择申请方式'); if (!param.loanApplicationMethod.length) return ElMessage.error('请选择申请方式');
if (param.borrowerMaterialCheck === 797 && !param.borrowerMaterial.length) return ElMessage.error('请选择借款人材料'); if (param.borrowerMaterialSelectedStatus === 797 && !param.borrowerMaterial.length) return ElMessage.error('请选择借款人材料');
if (isEnterprise) { if (isEnterprise) {
// //
@ -811,8 +816,8 @@ const submit = async (formEl: FormInstance | undefined) => {
if (param.mortgagedPropertySelectedStatus === 797 && !param.collateral.length) return ElMessage.error('请选择需要提供的抵押物材料'); if (param.mortgagedPropertySelectedStatus === 797 && !param.collateral.length) return ElMessage.error('请选择需要提供的抵押物材料');
} else { } else {
// //
if (param.mateMaterialCheck === 797 && !param.mateMaterial.length) return ElMessage.error('请选择需要提供的配偶材料'); if (param.mateMaterialSelectedStatus === 797 && !param.mateMaterial.length) return ElMessage.error('请选择需要提供的配偶材料');
if (param.businessMaterialsCheck === 797 && !param.businessMaterials.length) return ElMessage.error('请选择需要提供的经营类材料'); if (param.businessMaterialsSelectedStatus === 797 && !param.businessMaterials.length) return ElMessage.error('请选择需要提供的经营类材料');
} }
if (param.supplementMaterialSelectedStatus === 797 && !param.supplementaryMaterials.length) return ElMessage.error('请选择需要提供的补充材料'); if (param.supplementMaterialSelectedStatus === 797 && !param.supplementaryMaterials.length) return ElMessage.error('请选择需要提供的补充材料');
@ -827,17 +832,17 @@ const submit = async (formEl: FormInstance | undefined) => {
if (param.postLoanManagementSelectPolicySelectStatus === 803 && !param.selectionStrategy.length) return ElMessage.error('请选择策略'); if (param.postLoanManagementSelectPolicySelectStatus === 803 && !param.selectionStrategy.length) return ElMessage.error('请选择策略');
param.accessStrategy = param.accessPolicySelectedStatus === 803 ? param.accessStrategy.join() : ''; param.accessStrategy = param.accessPolicySelectedStatus === 803 ? param.accessStrategy.join() : '';
param.borrowerMaterial = param.borrowerMaterial.join(); param.borrowerMaterial = param.borrowerMaterialSelectedStatus === 797 ? param.borrowerMaterial.join() : '';
param.accountMaterials = param.accountMaterialsCheck === 797 ? param.accountMaterials.join() : ''; param.accountMaterials = param.provideMaterialSelectedStatus === 797 ? param.accountMaterials.join() : '';
param.sendingAccount = param.sendingAccountCheck === 801 ? param.sendingAccount.join() : ''; param.sendingAccount = param.issueAccountSelectStatus === 801 ? param.sendingAccount.join() : '';
// //
param.collateral = param.mortgagedPropertySelectedStatus === 797 ? param.collateral.join() : ''; param.collateral = param.mortgagedPropertySelectedStatus === 797 ? param.collateral.join() : '';
param.enterpriseMaterial = param.enterpriseMaterialSelectedStatus === 797 ? param.enterpriseMaterial.join() : ''; param.enterpriseMaterial = param.enterpriseMaterialSelectedStatus === 797 ? param.enterpriseMaterial.join() : '';
param.corporateInterestRateModel = param.corporateInterestRateModel.join(); param.corporateInterestRateModel = param.corporateInterestRateModel.join();
param.materialsForLoanApproval = param.materialsForLoanApproval.join(); param.materialsForLoanApproval = param.materialsForLoanApproval.join();
// //
param.businessMaterials = param.businessMaterialsCheck === 797 ? param.businessMaterials.join() : ''; param.businessMaterials = param.businessMaterialsSelectedStatus === 797 ? param.businessMaterials.join() : '';
param.mateMaterial = param.mateMaterialCheck === 797 ? param.mateMaterial.join() : ''; param.mateMaterial = param.mateMaterialSelectedStatus === 797 ? param.mateMaterial.join() : '';
if (param.personalCreditScoringStrategySelectedStatus !== 797) param.personalCreditScoringStrategies = ''; if (param.personalCreditScoringStrategySelectedStatus !== 797) param.personalCreditScoringStrategies = '';
if (param.enterpriseCreditScoringStrategySelectedStatus !== 797) param.corporateCreditScoringStrategies = ''; if (param.enterpriseCreditScoringStrategySelectedStatus !== 797) param.corporateCreditScoringStrategies = '';
if (param.individualCreditModelSelectedStatus !== 803) param.interestRatePricingModel = ''; if (param.individualCreditModelSelectedStatus !== 803) param.interestRatePricingModel = '';
@ -883,16 +888,16 @@ const addRecord = async (data: Record<string, any>) => {
// //
if (isEnterprise) { if (isEnterprise) {
data.accountMaterialsCheck && lcRule.push(handleId(1246, 325, data.accountMaterialsCheck, preIds + ',112,120,1246', 1)); data.provideMaterialSelectedStatus && lcRule.push(handleId(1246, 325, data.provideMaterialSelectedStatus, preIds + ',112,120,1246', 1));
data.accountMaterials && lcRule.push(handleId(1254, 44, data.accountMaterials, preIds + ',112,120,1254', 1)); data.accountMaterials && lcRule.push(handleId(1254, 44, data.accountMaterials, preIds + ',112,120,1254', 1));
data.sendingAccountCheck && lcRule.push(handleId(1257, 326, data.sendingAccountCheck, preIds + ',112,121,1257', 1)); data.issueAccountSelectStatus && lcRule.push(handleId(1257, 326, data.issueAccountSelectStatus, preIds + ',112,121,1257', 1));
data.sendingAccount && lcRule.push(handleId(1255, 45, data.sendingAccount, preIds + ',112,121,1255', 1)); data.sendingAccount && lcRule.push(handleId(1255, 45, data.sendingAccount, preIds + ',112,121,1255', 1));
data.loanApplicationMethod && lcRule.push(handleId(122, 46, data.loanApplicationMethod, preIds + ',113,122', 1)); data.loanApplicationMethod && lcRule.push(handleId(122, 46, data.loanApplicationMethod, preIds + ',113,122', 1));
data.enterpriseMaterialSelectedStatus && lcRule.push(handleId(1294, 325, data.enterpriseMaterialSelectedStatus, preIds + ',113,124,1294', 1)); data.enterpriseMaterialSelectedStatus && lcRule.push(handleId(1294, 325, data.enterpriseMaterialSelectedStatus, preIds + ',113,124,1294', 1));
data.enterpriseMaterial && lcRule.push(handleId(1258, 48, data.enterpriseMaterial, preIds + ',113,124,1258', 1)); data.enterpriseMaterial && lcRule.push(handleId(1258, 48, data.enterpriseMaterial, preIds + ',113,124,1258', 1));
form.borrowerMaterialCheck && lcRule.push(handleId(1294, 325, form.borrowerMaterialCheck, preIds + ',113,123,1294', 1)); form.borrowerMaterialSelectedStatus && lcRule.push(handleId(1294, 325, form.borrowerMaterialSelectedStatus, preIds + ',113,123,1294', 1));
const borrowerMaterial = []; const borrowerMaterial = [];
form.borrowerMaterial.forEach((e) => { form.borrowerMaterial.forEach((e) => {
borrowerMaterial.push(e); borrowerMaterial.push(e);
@ -948,24 +953,24 @@ const addRecord = async (data: Record<string, any>) => {
data.postLoanManagementSelectPolicySelectStatus && lcRule.push(handleId(1302, 327, data.postLoanManagementSelectPolicySelectStatus, preIds + ',119,140,1302', 1)); data.postLoanManagementSelectPolicySelectStatus && lcRule.push(handleId(1302, 327, data.postLoanManagementSelectPolicySelectStatus, preIds + ',119,140,1302', 1));
data.selectionStrategy && lcRule.push(handleId(1315, 64, data.selectionStrategy, preIds + ',119,140,1315', 1)); data.selectionStrategy && lcRule.push(handleId(1315, 64, data.selectionStrategy, preIds + ',119,140,1315', 1));
} else { } else {
data.accountMaterialsCheck && lcRule.push(handleId(1294, 325, data.accountMaterialsCheck, preIds + ',72,75,1294', 1)); data.provideMaterialSelectedStatus && lcRule.push(handleId(1294, 325, data.provideMaterialSelectedStatus, preIds + ',72,75,1294', 1));
data.accountMaterials && lcRule.push(handleId(1295, 20, data.accountMaterials, preIds + ',72,75,1295', 1)); data.accountMaterials && lcRule.push(handleId(1295, 20, data.accountMaterials, preIds + ',72,75,1295', 1));
data.sendingAccountCheck && lcRule.push(handleId(1312, 326, data.sendingAccountCheck, preIds + ',72,76,1312', 1)); data.issueAccountSelectStatus && lcRule.push(handleId(1312, 326, data.issueAccountSelectStatus, preIds + ',72,76,1312', 1));
data.sendingAccount && lcRule.push(handleId(1296, 21, data.sendingAccount, preIds + ',72,76,1296', 1)); data.sendingAccount && lcRule.push(handleId(1296, 21, data.sendingAccount, preIds + ',72,76,1296', 1));
data.loanApplicationMethod && lcRule.push(handleId(1289, 22, data.loanApplicationMethod, preIds + ',73,77,1289', 1)); data.loanApplicationMethod && lcRule.push(handleId(1289, 22, data.loanApplicationMethod, preIds + ',73,77,1289', 1));
form.borrowerMaterialCheck && lcRule.push(handleId(1294, 325, form.borrowerMaterialCheck, preIds + ',73,78,1294', 1)); form.borrowerMaterialSelectedStatus && lcRule.push(handleId(1294, 325, form.borrowerMaterialSelectedStatus, preIds + ',73,78,1294', 1));
const borrowerMaterial = []; const borrowerMaterial = [];
form.borrowerMaterial.forEach((e) => { form.borrowerMaterial.forEach((e) => {
borrowerMaterial.push(e); borrowerMaterial.push(e);
}); });
borrowerMaterial.length && lcRule.push(handleId(314, 23, borrowerMaterial.join(), preIds + ',73,78,314', 1)); borrowerMaterial.length && lcRule.push(handleId(314, 23, borrowerMaterial.join(), preIds + ',73,78,314', 1));
data.mateMaterialCheck && lcRule.push(handleId(1294, 325, data.mateMaterialCheck, preIds + ',73,79,1294', 1)); data.mateMaterialSelectedStatus && lcRule.push(handleId(1294, 325, data.mateMaterialSelectedStatus, preIds + ',73,79,1294', 1));
data.mateMaterial && lcRule.push(handleId(1291, 24, data.mateMaterial, preIds + ',73,79,1291', 1)); data.mateMaterial && lcRule.push(handleId(1291, 24, data.mateMaterial, preIds + ',73,79,1291', 1));
data.businessMaterialsCheck && lcRule.push(handleId(1294, 325, data.businessMaterialsCheck, preIds + ',73,80,1294', 1)); data.businessMaterialsSelectedStatus && lcRule.push(handleId(1294, 325, data.businessMaterialsSelectedStatus, preIds + ',73,80,1294', 1));
data.businessMaterials && lcRule.push(handleId(1292, 25, data.businessMaterials, preIds + ',73,80,1292', 1)); data.businessMaterials && lcRule.push(handleId(1292, 25, data.businessMaterials, preIds + ',73,80,1292', 1));
data.supplementMaterialSelectedStatus && lcRule.push(handleId(1294, 325, data.supplementMaterialSelectedStatus, preIds + ',73,81,1294', 1)); data.supplementMaterialSelectedStatus && lcRule.push(handleId(1294, 325, data.supplementMaterialSelectedStatus, preIds + ',73,81,1294', 1));
@ -1025,13 +1030,4 @@ const addRecord = async (data: Record<string, any>) => {
<style lang="scss" scoped> <style lang="scss" scoped>
@import url(../../../styles/form.scss); @import url(../../../styles/form.scss);
.audit {
@apply py-5 px-4 mb-[30px] bg-[#f9fafc] rounded-[10px];
.line {
@apply mb-[18px] text-sm leading-[1.6];
}
.field {
@apply text-sm font-semibold;
}
}
</style> </style>

@ -3,7 +3,9 @@
<el-tabs v-model="curTab"> <el-tabs v-model="curTab">
<el-tab-pane :label="status" <el-tab-pane :label="status"
name="tab1"> name="tab1">
<info @updateStatus="updateStatus" /> <div class="h-[calc(100vh-170px)] pr-1 overflow-auto">
<info @updateStatus="updateStatus" />
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -14,7 +16,7 @@ import { ref } from 'vue';
import Info from './Info.vue'; import Info from './Info.vue';
const curTab = ref<string>('tab1'); const curTab = ref<string>('tab1');
const status = ref<string>('产品要素'); const status = ref<string>('产品详情');
const updateStatus = (val: string) => { const updateStatus = (val: string) => {
status.value = val; status.value = val;

@ -1,17 +1,4 @@
<template> <template>
<div v-if="showAudit"
class="audit">
<div class="line">
<span class="field">审批意见</span>
<span class="status">{{ getStatus(+info?.status) }}</span>
</div>
<div class="line">
<span class="field">意见描述</span>
{{ info.opinionDescription }}
</div>
<p class="mb-2 text-sm text-[#333] text-right">审查日期{{ info.approvalTime }}</p>
<p class="mb-2 text-sm text-[#333] text-right">审查员{{ info.approvalTime && userName }}</p>
</div>
<div class="info my-2"> <div class="info my-2">
<template v-if="route.params.action !== 'add'"> <template v-if="route.params.action !== 'add'">
<h6 class="step-name">{{ route.params.action !== 'config' ? '一、' : '' }}产品定义</h6> <h6 class="step-name">{{ route.params.action !== 'config' ? '一、' : '' }}产品定义</h6>
@ -87,9 +74,9 @@
<p v-if="riskInfo?.riskDegreeStrategy" <p v-if="riskInfo?.riskDegreeStrategy"
class="text">系统跑批准入风控策略-风险度策略{{ riskInfo?.riskDegreeStrategy }}</p> class="text">系统跑批准入风控策略-风险度策略{{ riskInfo?.riskDegreeStrategy }}</p>
<p v-if="riskInfo?.interestRatePricingModel" <p v-if="riskInfo?.interestRatePricingModel"
class="text">系统跑批准入风控策略-利率定价模型-个人额度模型{{ riskInfo?.interestRatePricingModel }}</p> class="text">系统跑批准入风控策略-利率定价模型-{{ info.productType ? '企业' : '个人' }}额度模型{{ riskInfo?.interestRatePricingModel }}</p>
<p v-if="riskInfo?.individualInterestRateModel === '需要跑批'" <p v-if="riskInfo?.individualInterestRateModel === '需要跑批'"
class="text">系统跑批准入风控策略-利率定价模型-个人利率模型</p> class="text">系统跑批准入风控策略-利率定价模型-{{ info.productType ? '企业' : '个人' }}利率模型</p>
<p v-if="riskInfo?.dueDiligenceMode" <p v-if="riskInfo?.dueDiligenceMode"
class="text">尽职调查-尽调方式{{ riskInfo?.dueDiligenceMode }}</p> class="text">尽职调查-尽调方式{{ riskInfo?.dueDiligenceMode }}</p>
<p v-if="riskInfo?.dueDiligenceContent" <p v-if="riskInfo?.dueDiligenceContent"
@ -129,24 +116,43 @@
</template> </template>
</template> </template>
</div> </div>
<div v-if="approvals.length"
class="mt-10">
<div v-for="(item, i) in approvals"
:key="i"
class="audit">
<div class="line">
<span class="field">审批意见</span>
<span class="status">{{ getStatus(item?.status) }}</span>
</div>
<div class="line">
<span class="field">意见描述</span>
{{ item.opinionDescription }}
</div>
<p class="mb-2 text-sm text-[#333] text-right">审查日期{{ item.approvalTime }}</p>
<p class="mb-2 text-sm text-[#333] text-right">审查员{{ userName }}</p>
</div>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, watch, defineExpose } from 'vue'; import { ref, computed, watch, defineExpose } from 'vue';
import { findById } from '@/api/bank'; import { findById, approvalRecord } from '@/api/bank';
import { getTheCurrentUserName } from '@/api/config';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { getStatus } from '@/store/useProduct'; import { getStatus } from '@/store/useProduct';
import { getUsername } from '@/utils/common';
// const props = defineProps({ // const props = defineProps({
// tab: String, // tab: String,
// }); // });
const emit = defineEmits(['updateStatus']); const emit = defineEmits(['updateAudits']);
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const id = computed(() => +route.query.id); const id = computed(() => +route.query.id);
const info = ref<Record<string, any>>({}); const info = ref<Record<string, any>>({});
const riskInfo = ref<Record<string, any>>(null); const riskInfo = ref<Record<string, any>>(null);
const approvals = ref<Record<string, any>[]>([]);
const userName = ref<string>(); const userName = ref<string>();
// //
@ -161,26 +167,27 @@ const showAudit = computed(() => {
// //
const getDetail = async () => { const getDetail = async () => {
userName.value = await getUsername();
if (id.value) { if (id.value) {
try { try {
const { data } = await findById(id.value); const { data } = await findById(id.value);
info.value = data; info.value = data;
emit('updateStatus', data.riskControlDetails ? '审批结果' : '产品要素'); emit('updateAudits', data.rejectCount);
if (info.value.riskControlDetails) riskInfo.value = data.riskControlDetails; if (info.value.riskControlDetails) riskInfo.value = data.riskControlDetails;
const res = await approvalRecord({
id: id.value,
});
approvals.value = res.list;
} finally { } finally {
} }
} }
}; };
//
const getName = async () => {
const res = await getTheCurrentUserName();
userName.value = res.userName;
};
watch( watch(
() => route.query, () => route.query,
() => { () => {
getDetail(); getDetail();
getName();
}, },
{ {
immediate: true, immediate: true,

@ -96,27 +96,27 @@
label="操作" label="操作"
min-width="110"> min-width="110">
<template #default="{ row }"> <template #default="{ row }">
<el-button v-if="row.showDetailsOrNot"
type="text"
@click="toDetail(`/product/bank/detail`, row)"
size="small">{{ params.roleId == 43 ? '审批结果' : '产品详情' }}</el-button>
<el-button v-if="row.showElementsOrNot" <el-button v-if="row.showElementsOrNot"
type="text" type="text"
size="small" size="small"
@click="toDetail(`/product/bank/add`, row.id)">配置要素</el-button> @click="toDetail(`/product/bank/add`, row)">配置要素</el-button>
<el-button v-if="row.showRiskControlOrNot" <el-button v-if="row.showRiskControlOrNot"
type="text" type="text"
size="small" size="small"
@click="toDetail(`/product/bank/config`, row.id)">配置风控</el-button> @click="toDetail(`/product/bank/config`, row)">配置风控</el-button>
<el-popconfirm v-if="row.showDeleteOrNot" <el-popconfirm v-if="row.showDeleteOrNot"
title="您确定删除吗?" title="您确定删除吗?"
@confirm.stop="handleDelete(row.id)"> @confirm.stop="handleDelete(row)">
<template #reference> <template #reference>
<el-button type="text" <el-button type="text"
size="small" size="small"
@click.stop="stop">删除</el-button> @click.stop="stop">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
<el-button v-if="row.showDetailsOrNot"
type="text"
@click="toDetail(`/product/bank/detail`, row.id)"
size="small">{{ params.roleId == 43 ? '审批结果' : '产品详情' }}</el-button>
<el-button v-if="row.showApprovalOrNot" <el-button v-if="row.showApprovalOrNot"
type="text" type="text"
size="small" size="small"
@ -216,8 +216,16 @@ const toAdd = () => {
router.push(`/product/bank/add?type=${route.query.type}&i=${route.query.i}&role=${route.query.role}`); router.push(`/product/bank/add?type=${route.query.type}&i=${route.query.i}&role=${route.query.role}`);
}; };
// //
const toDetail = async (path: string, id: number) => { const toDetail = async (path: string, row: Record<string, any>) => {
router.push(`${path}?type=${params.productType}&i=${route.query.i}&role=${route.query.role}&id=${id}&name=${params.keyWord}`); let show = '';
if (row.showElementsOrNot && path === `/product/bank/detail`) {
path = `/product/bank/add`;
show = 1;
} else if (row.showRiskControlOrNot && path === `/product/bank/detail`) {
path = `/product/bank/config`;
show = 1;
}
router.push(`${path}?type=${params.productType}&i=${route.query.i}&role=${route.query.role}&id=${row.id}&name=${params.keyWord}&show=${show}`);
}; };
// //
const toCardList = () => { const toCardList = () => {

@ -480,9 +480,9 @@ const addRecord = async (data: Record<string, any>) => {
}); });
rule.push( rule.push(
handleId(1181, 314, data.buyingDuration, preIds + ',1179,1180,1181', 3), handleId(1181, 314, data.buyingDuration, preIds + ',1179,1180,1181', 3),
handleId(1182, 315, getId(data.buyingUnit), preIds + ',1179,1180,1182', 3), handleId(1182, 315, getId(data.buyingUnit), preIds + ',1179,1180,1182', 1),
handleId(1184, 314, data.sellingTime, preIds + ',1179,1183,1184', 3), handleId(1184, 314, data.sellingTime, preIds + ',1179,1183,1184', 3),
handleId(1185, 315, getId(data.soldUnit), preIds + ',1179,1183,1185', 3), handleId(1185, 315, getId(data.soldUnit), preIds + ',1179,1183,1185', 1),
); );
// //

Loading…
Cancel
Save