银行相关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 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 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> =>
(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;
@ -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 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 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 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> =>
(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 { data } = await statistics({
checkPointId: levelId,
checkpointId: levelId,
projectId,
status,
productType: type,

@ -2,22 +2,8 @@
<div>
<el-tabs v-model="curTab"
@tab-click="tabChange">
<el-tab-pane :label="id ? '产品要素' : '新增产品'"
<el-tab-pane :label="id ? '修改要素' : '新增产品'"
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"
:model="form"
:rules="rules"
@ -25,132 +11,133 @@
label-suffix=":"
class="form"
status-icon>
<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>
<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>
<div class="flex-1">
<!-- 企业 -->
<template v-if="form.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>
</div>
<div class="flex items-center mt-4">
<span class="mr-3 text-[#333] text-sm">借款人年龄</span>
<div class="num-inputs ml-7">
<el-input placeholder="最小年龄"
v-model.number="form.minimumAge"></el-input>
<span class="split">-</span>
<el-input placeholder="最大年龄"
v-model.number="form.maximumAge"></el-input>
<span class="unit">周岁</span>
<div 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>
<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-select>
</el-form-item>
<el-form-item label="贷款对象"
required>
<div class="flex-1">
<!-- 企业 -->
<template v-if="form.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>
</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 class="flex items-center mt-4">
<span class="mr-3 text-[#333] text-sm">借款人年龄</span>
<div class="num-inputs ml-7">
<el-input placeholder="最小年龄"
v-model.number="form.minimumAge"></el-input>
<span class="split">-</span>
<el-input placeholder="最大年龄"
v-model.number="form.maximumAge"></el-input>
<span class="unit">周岁</span>
</div>
</div>
</template>
<!-- 个人 -->
<template v-else>
<p class="field-name">选择本产品的贷款对象</p>
<div class="flex items-center mb-2">
<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"
class="num-inputs ml-7">
<el-input placeholder="最小年龄"
v-model.number="form.minimumAge"></el-input>
<span class="split">-</span>
<el-input placeholder="最大年龄"
v-model.number="form.maximumAge"></el-input>
<div 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>
</div>
</div>
</div>
<div class="flex items-center h-[47px] mb-2">
<div class="radio-wrap">
<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-group>
<div class="flex items-center h-[47px] mb-2">
<div class="radio-wrap">
<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-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>
<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 class="flex items-center h-[47px] mb-2">
<div class="radio-wrap">
<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-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">
<span class="label">3工作年限</span>
<span class="label">4公积金/社保</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"
: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>
</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="[
</template>
</div>
</el-form-item>
<el-form-item label="贷款用途"
prop="loanPurpose"
:rules="[
{ required: true, message: '请选择贷款用途', trigger: 'change' },
{
asyncValidator: async (rule, value, callback) => {
@ -162,30 +149,30 @@
},
},
]">
<div class="flex-1">
<p class="field-name">选择本产品贷款资金的用途</p>
<el-radio-group v-model="form.loanPurpose">
<template v-if="form.productType">
<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>
</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>
</div>
</el-form-item>
<el-form-item label="担保方式"
prop="bankGuaranteeTypeIds"
:rules="[
<div class="flex-1">
<p class="field-name">选择本产品贷款资金的用途</p>
<el-radio-group v-model="form.loanPurpose">
<template v-if="form.productType">
<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>
</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>
</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)) {
@ -198,126 +185,127 @@
},
},
]">
<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-group>
</div>
<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-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-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-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-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>
<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-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>
<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-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>
<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-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>
</div>
</el-form-item>
<el-form-item label="贷款额度"
prop="minimumLoan"
:rules="[
</div>
</el-form-item>
<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>
<span class="split">-</span>
<el-input placeholder="最高额度"
v-model="form.loanCeiling"></el-input>
<span class="unit">万元</span>
<div class="flex-1">
<div class="num-inputs">
<el-input placeholder="最小额度"
v-model="form.minimumLoan"></el-input>
<span class="split">-</span>
<el-input placeholder="最高额度"
v-model="form.loanCeiling"></el-input>
<span class="unit">万元</span>
</div>
</div>
</div>
</el-form-item>
<el-form-item label="贷款利率"
prop="minimumAprOnLoan"
:rules="[
</el-form-item>
<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>
<span class="split">-</span>
<el-input placeholder="最高年利率"
min="0"
v-model="form.maximumAnnualInterestRate"></el-input>
<span class="unit">%</span>
<div class="flex-1">
<div class="num-inputs">
<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>
<span class="unit">%</span>
</div>
</div>
</div>
</el-form-item>
<el-form-item label="贷款期限"
prop="minimumTermOfLoan"
:rules="[
</el-form-item>
<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>
<span class="split">-</span>
<el-input placeholder="最大期限"
v-model="form.maximumTermOfLoan"></el-input>
<span class="unit"></span>
<div class="flex-1">
<div class="num-inputs">
<el-input placeholder="最小期限"
v-model="form.minimumTermOfLoan"></el-input>
<span class="split">-</span>
<el-input placeholder="最大期限"
v-model="form.maximumTermOfLoan"></el-input>
<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>
</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>
</el-form-item>
</el-form-item>
</div>
<div class="flex justify-end">
<div class="submit"
@click="submit(formRef)">完成提交风控经理</div>
@ -325,9 +313,11 @@
</el-form>
</el-tab-pane>
<el-tab-pane v-if="id"
label="产品风控"
label="产品详情"
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-tabs>
</div>
@ -380,7 +370,7 @@ interface RuleForm {
const router = useRouter();
const route = useRoute();
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 info = ref<Record<string, any>>(null);
@ -622,13 +612,4 @@ onMounted(() => {
<style lang="scss" scoped>
@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>

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

@ -2,41 +2,28 @@
<div>
<el-tabs v-model="curTab"
@tab-click="tabChange">
<el-tab-pane label="配置风控"
<el-tab-pane :label="info.approvalTime ? '修改风控' : '配置风控'"
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"
:model="form"
label-width="120px"
label-suffix=":"
class="form"
class="form h-[calc(100vh-230px)] pr-1 overflow-auto"
status-icon>
<!-- <div class="h-[calc(100vh-170px)] pr-1 overflow-auto"> -->
<div class="step">
<h6 class="step-name mb-7">办理账户</h6>
<el-form-item label="提供材料"
prop="accountMaterials">
<div>
<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"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<template v-if="form.accountMaterialsCheck === 797">
<template v-if="form.provideMaterialSelectedStatus === 797">
<p class="tips">选择需要提供的申请人材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.accountMaterials">
@ -52,13 +39,13 @@
<div>
<div class="radio-wrap flex-col items-start">
<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"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
<template v-if="form.sendingAccountCheck === 801 && config.length">
<template v-if="form.issueAccountSelectStatus === 801 && config.length">
<p class="tips">选择需要发放的账户至少选一样</p>
<el-checkbox-group v-model="form.sendingAccount">
@ -90,14 +77,14 @@
<div class="flex items-center">
<p class="field-name mr-5 mb-0">借款人材料</p>
<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"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
</div>
<div v-if="form.borrowerMaterialCheck === 797">
<div v-if="form.borrowerMaterialSelectedStatus === 797">
<p class="my-2 text-xs text-[#666]">选择需要提供的借款人材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.borrowerMaterial"
@ -155,14 +142,14 @@
<p class="field-name mt-5 mb-0">配偶材料</p>
<div>
<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"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<template v-if="form.mateMaterialCheck === 797">
<template v-if="form.mateMaterialSelectedStatus === 797">
<p class="tips">选择需要提供的配偶材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.mateMaterial"
@ -176,14 +163,14 @@
<p class="field-name mt-5">经营类材料</p>
<div>
<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"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<template v-if="form.businessMaterialsCheck === 797">
<template v-if="form.businessMaterialsSelectedStatus === 797">
<p class="tips">选择需要提供的经营类材料至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.businessMaterials"
@ -573,9 +560,11 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="产品要素"
<el-tab-pane :label="info.approvalTime ? '产品详情' : '产品要素'"
name="tab2">
<info />
<div class="h-[calc(100vh-170px)] pr-1 overflow-auto">
<info />
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -585,26 +574,25 @@
import { ref, reactive, computed, watch, onMounted } from 'vue';
import { ElMessage } 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 { listCredit } from '@/api/model';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds, getUsername } from '@/utils/common';
import Info from './Info.vue';
import Cookies from 'js-cookie';
import { getStatus } from '@/store/useProduct';
const emit = defineEmits(['getList']);
interface RuleForm {
accessPolicySelectedStatus?: number;
accessStrategy: any;
accountMaterialsCheck?: number;
provideMaterialSelectedStatus?: number;
accountMaterials: any;
approvalSignature?: any;
bankProductsId: any;
borrowerMaterialCheck?: number;
borrowerMaterialSelectedStatus?: number;
borrowerMaterial: any;
businessMaterialsCheck?: number;
businessMaterialsSelectedStatus?: number;
businessMaterials: any;
mortgagedPropertySelectedStatus?: number;
collateral: any;
@ -626,7 +614,7 @@ interface RuleForm {
loanApplicationMethod: any;
loanContractSelectedStatus?: number;
loanContract: any;
mateMaterialCheck?: number;
mateMaterialSelectedStatus?: number;
mateMaterial: any;
materialsForLoanApproval: any;
mortgageContractSelectedStatus?: number;
@ -644,7 +632,7 @@ interface RuleForm {
runBatchObject: any;
postLoanManagementSelectPolicySelectStatus?: number;
selectionStrategy: any;
sendingAccountCheck?: number;
issueAccountSelectStatus?: number;
sendingAccount: number[];
supplementMaterialSelectedStatus?: number;
supplementaryMaterials: any;
@ -652,7 +640,7 @@ interface RuleForm {
const router = useRouter();
const route = useRoute();
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 credits = 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 userName = ref<string>();
const form = reactive<RuleForm>({
let form = reactive<RuleForm>({
...getIds(),
accessPolicySelectedStatus: '',
accessStrategy: [],
accountMaterialsCheck: '',
provideMaterialSelectedStatus: '',
accountMaterials: [],
approvalSignature: '',
bankProductsId: computed(() => +route.query.id),
borrowerMaterialCheck: '',
borrowerMaterialSelectedStatus: '',
borrowerMaterial: [],
businessMaterialsCheck: '',
businessMaterialsSelectedStatus: '',
businessMaterials: [],
mortgagedPropertySelectedStatus: '',
collateral: [],
@ -700,7 +688,7 @@ const form = reactive<RuleForm>({
loanApplicationMethod: [],
loanContractSelectedStatus: '',
loanContract: '',
mateMaterialCheck: '',
mateMaterialSelectedStatus: '',
mateMaterial: [],
materialsForLoanApproval: [],
mortgageContractSelectedStatus: '',
@ -718,7 +706,7 @@ const form = reactive<RuleForm>({
runBatchObject: [],
postLoanManagementSelectPolicySelectStatus: '',
selectionStrategy: [],
sendingAccountCheck: '',
issueAccountSelectStatus: '',
sendingAccount: [],
supplementMaterialSelectedStatus: '',
supplementaryMaterials: [],
@ -771,9 +759,26 @@ const getDetail = async () => {
userName.value = await getUsername();
if (id.value) {
try {
//
const { data } = await findById(id.value);
info.value = data;
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 {
}
}
@ -800,10 +805,10 @@ const submit = async (formEl: FormInstance | undefined) => {
const isEnterprise = info.value.productType === 1;
const param = JSON.parse(JSON.stringify(form));
if (param.accountMaterialsCheck === 797 && !param.accountMaterials.length) return ElMessage.error('请选择需要提供的申请人材料');
if (param.sendingAccountCheck === 801 && !param.sendingAccount.length) return ElMessage.error('请选择需要发放的账户');
if (param.provideMaterialSelectedStatus === 797 && !param.accountMaterials.length) return ElMessage.error('请选择需要提供的申请人材料');
if (param.issueAccountSelectStatus === 801 && !param.sendingAccount.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) {
//
@ -811,8 +816,8 @@ const submit = async (formEl: FormInstance | undefined) => {
if (param.mortgagedPropertySelectedStatus === 797 && !param.collateral.length) return ElMessage.error('请选择需要提供的抵押物材料');
} else {
//
if (param.mateMaterialCheck === 797 && !param.mateMaterial.length) return ElMessage.error('请选择需要提供的配偶材料');
if (param.businessMaterialsCheck === 797 && !param.businessMaterials.length) return ElMessage.error('请选择需要提供的经营类材料');
if (param.mateMaterialSelectedStatus === 797 && !param.mateMaterial.length) return ElMessage.error('请选择需要提供的配偶材料');
if (param.businessMaterialsSelectedStatus === 797 && !param.businessMaterials.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('请选择策略');
param.accessStrategy = param.accessPolicySelectedStatus === 803 ? param.accessStrategy.join() : '';
param.borrowerMaterial = param.borrowerMaterial.join();
param.accountMaterials = param.accountMaterialsCheck === 797 ? param.accountMaterials.join() : '';
param.sendingAccount = param.sendingAccountCheck === 801 ? param.sendingAccount.join() : '';
param.borrowerMaterial = param.borrowerMaterialSelectedStatus === 797 ? param.borrowerMaterial.join() : '';
param.accountMaterials = param.provideMaterialSelectedStatus === 797 ? param.accountMaterials.join() : '';
param.sendingAccount = param.issueAccountSelectStatus === 801 ? param.sendingAccount.join() : '';
//
param.collateral = param.mortgagedPropertySelectedStatus === 797 ? param.collateral.join() : '';
param.enterpriseMaterial = param.enterpriseMaterialSelectedStatus === 797 ? param.enterpriseMaterial.join() : '';
param.corporateInterestRateModel = param.corporateInterestRateModel.join();
param.materialsForLoanApproval = param.materialsForLoanApproval.join();
//
param.businessMaterials = param.businessMaterialsCheck === 797 ? param.businessMaterials.join() : '';
param.mateMaterial = param.mateMaterialCheck === 797 ? param.mateMaterial.join() : '';
param.businessMaterials = param.businessMaterialsSelectedStatus === 797 ? param.businessMaterials.join() : '';
param.mateMaterial = param.mateMaterialSelectedStatus === 797 ? param.mateMaterial.join() : '';
if (param.personalCreditScoringStrategySelectedStatus !== 797) param.personalCreditScoringStrategies = '';
if (param.enterpriseCreditScoringStrategySelectedStatus !== 797) param.corporateCreditScoringStrategies = '';
if (param.individualCreditModelSelectedStatus !== 803) param.interestRatePricingModel = '';
@ -883,16 +888,16 @@ const addRecord = async (data: Record<string, any>) => {
//
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.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.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.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 = [];
form.borrowerMaterial.forEach((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.selectionStrategy && lcRule.push(handleId(1315, 64, data.selectionStrategy, preIds + ',119,140,1315', 1));
} 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.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.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 = [];
form.borrowerMaterial.forEach((e) => {
borrowerMaterial.push(e);
});
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.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.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>
@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>

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

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

@ -96,27 +96,27 @@
label="操作"
min-width="110">
<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"
type="text"
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"
type="text"
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"
title="您确定删除吗?"
@confirm.stop="handleDelete(row.id)">
@confirm.stop="handleDelete(row)">
<template #reference>
<el-button type="text"
size="small"
@click.stop="stop">删除</el-button>
</template>
</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"
type="text"
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}`);
};
//
const toDetail = async (path: string, id: number) => {
router.push(`${path}?type=${params.productType}&i=${route.query.i}&role=${route.query.role}&id=${id}&name=${params.keyWord}`);
const toDetail = async (path: string, row: Record<string, any>) => {
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 = () => {

@ -480,9 +480,9 @@ const addRecord = async (data: Record<string, any>) => {
});
rule.push(
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(1185, 315, getId(data.soldUnit), preIds + ',1179,1183,1185', 3),
handleId(1185, 315, getId(data.soldUnit), preIds + ',1179,1183,1185', 1),
);
//

Loading…
Cancel
Save