配置风控及策略联调

master
yujialong 10 months ago
parent ae5899a977
commit 331cf3e493
  1. 4
      .env
  2. 1
      src/api/bank.ts
  3. 44
      src/api/model.ts
  4. 1
      src/assets/svgs/preview.svg
  5. 2
      src/components/Panel/index.vue
  6. 2
      src/components/StrategyConfirm.vue
  7. 29
      src/views/Home.vue
  8. 3
      src/views/product/afterLoan/1031.vue
  9. 567
      src/views/product/bank/Config.vue
  10. 364
      src/views/product/strategy/150.vue
  11. 31
      src/views/product/strategy/150/Detail.vue
  12. 73
      src/views/product/strategy/150/Index.vue
  13. 271
      src/views/product/strategy/151.vue
  14. 300
      src/views/product/strategy/151/Detail.vue
  15. 166
      src/views/product/strategy/151/Index.vue
  16. 457
      src/views/product/strategy/152/Detail.vue
  17. 166
      src/views/product/strategy/152/Index.vue
  18. 8
      src/views/product/strategy/CardList.vue

@ -2,8 +2,8 @@ VITE_APP_TITLE=金融产品设计及数字化营销沙盘
VITE_PORT=9520
# VITE_PROXY=http://192.168.31.125:8080
VITE_PUBLIC_PATH=./
# VITE_BASE_API=http://192.168.31.51:9000
VITE_BASE_API=http://121.37.12.51
VITE_BASE_API=http://192.168.31.217:9000
# VITE_BASE_API=http://121.37.12.51
# VITE_BASE_API=https://www.occupationlab.com
VITE_I18N_LOCALE=zh-cn
VITE_I18N_FALLBACK_LOCALE=zh-cn

@ -15,7 +15,6 @@ export const elementDetail = async (id: number): Promise<any> => (await axios.po
export const save = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/products/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 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> =>

@ -3,25 +3,55 @@ import { getIds } from '@/utils/common';
const host = `http://192.168.31.51:9000`;
export const accessStrategyGovernmentBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyGovernmentBlacklist/details`, getIds())).data;
export const accessStrategyGovernmentBlacklistList = async (data: Record<string, any>): Promise<any> =>
(
await axios.post(`${host}/product/accessStrategyGovernmentBlacklist/list`, {
...getIds(),
...data,
})
).data;
export const accessStrategyGovernmentBlacklistFind = async (params: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/accessStrategyGovernmentBlacklist/details`, {}, { params })).data;
export const accessStrategyGovernmentBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyGovernmentBlacklist/saveOrUpdate`, data)).data;
(await axios.post(`${host}/product/accessStrategyGovernmentBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyGovernmentBlacklistDel = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/accessStrategyGovernmentBlacklist/delete`, data)).data;
export const accessStrategyEnterpriseBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyEnterpriseBlacklist/details`, getIds())).data;
export const accessStrategyEnterpriseBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyEnterpriseBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyAntiFraudStrategyFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyAntiFraudStrategy/details`, getIds())).data;
export const accessStrategyAntiFraudStrategySave = async (data: Record<string, any>): Promise<any> =>
export const accessStrategyAntiFraudStrategySave = async (data: Record<string, any>): PromiaccessStrategyGovernmentBlacklistse<any> =>
(await axios.post(`/product/accessStrategyAntiFraudStrategy/saveOrUpdate`, data)).data;
export const accessStrategyBusinessBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyBusinessBlacklist/details`, getIds())).data;
export const accessStrategyBusinessBlacklist = async (data: Record<string, any>): Promise<any> =>
(
await axios.post(`${host}/product/accessStrategyBusinessBlacklist/list`, {
...getIds(),
...data,
})
).data;
export const accessStrategyBusinessBlacklistFind = async (params: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/accessStrategyBusinessBlacklist/details`, {}, { params })).data;
export const accessStrategyBusinessBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyBusinessBlacklist/saveOrUpdate`, data)).data;
(await axios.post(`${host}/product/accessStrategyBusinessBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyBusinessBlacklistDel = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/accessStrategyBusinessBlacklist/delete`, data)).data;
export const accessStrategyCreditBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyCreditBlacklist/details`, getIds())).data;
export const accessStrategyCreditBlacklist = async (data: Record<string, any>): Promise<any> =>
(
await axios.post(`${host}/product/accessStrategyCreditBlacklist/list`, {
...getIds(),
...data,
})
).data;
export const accessStrategyCreditBlacklistFind = async (params: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/accessStrategyCreditBlacklist/details`, {}, { params })).data;
export const accessStrategyCreditBlacklistSave = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/accessStrategyCreditBlacklist/saveOrUpdate`, data)).data;
(await axios.post(`${host}/product/accessStrategyCreditBlacklist/saveOrUpdate`, data)).data;
export const accessStrategyCreditBlacklistDel = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`${host}/product/accessStrategyCreditBlacklist/delete`, data)).data;
export const accessStrategyInlineBlacklistFind = async (): Promise<any> => (await axios.post(`/product/accessStrategyInlineBlacklist/details`, getIds())).data;
export const accessStrategyInlineBlacklistSave = async (data: Record<string, any>): Promise<any> =>

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1713852488689" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2030" width="20" height="20" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M900.896 240.832c-21.344-29.024-51.04-63.04-83.584-95.552s-66.528-62.304-95.552-83.552c-49.44-36.256-73.376-40.384-87.136-40.384l-475.296 0c-42.336 0-76.704 34.336-76.704 76.672l0 827.968c0 42.336 34.368 76.704 76.704 76.704l705.248 0c42.208 0 76.768-34.336 76.768-76.704l0-597.952c-0.032-13.792-4.256-37.792-40.48-87.168l0 0 0 0zM773.856 188.672c29.504 29.472 52.544 55.968 69.568 77.984l-147.552 0 0-147.552c22.016 17.056 48.544 40.16 77.984 69.536l0 0 0 0 0 0zM880.032 925.952c0 8.384-7.008 15.392-15.392 15.392l-705.248 0c-8.384 0-15.392-7.008-15.392-15.392l0-827.936c0-8.288 7.008-15.328 15.392-15.328l475.296 0 0 214.688c0 16.864 13.728 30.688 30.688 30.688l214.688 0 0.032 597.92zM779.872 823.296l-172.928-172.96c29.024-36.384 46.432-82.464 46.432-132.704 0-117.6-95.328-212.896-212.896-212.896-117.632 0-212.896 95.296-212.896 212.896s95.328 212.896 212.896 212.896c46.304 0 83.744-9.344 118.688-34.496l173.984 173.984c6.56 6.56 17.088 6.56 23.584 0l23.136-23.072c6.432-6.528 6.432-17.12 0-23.648l0 0 0 0zM440.448 656.832c-76.896 0-139.232-62.336-139.232-139.232s62.336-139.232 139.232-139.232 139.232 62.336 139.232 139.232-62.304 139.232-139.232 139.232l0 0 0 0z" fill="#006bff" p-id="2031"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -534,7 +534,7 @@ let getCache = async (reloadPage?: number) => {
});
} else {
Cookies.remove('sand-level');
setNewProject();
setNewProject(reloadPage);
}
};
let handleCache = () => {

@ -31,6 +31,6 @@ const visible = computed({
});
const syncCheck = ref<boolean>(false);
const submit = () => {
emit('submit');
emit('submit', +syncCheck.value);
};
</script>

@ -30,11 +30,11 @@
<div class="relative mt-20">
<div v-for="(item, i) in levels"
:key="i"
:class="['item', { active: curLevel === item.checkpointId }]"
:class="['item', { active: curLevel === item.checkpointId, disabled: !item.enableOrNot }]"
@click="selecLevel(item)">
<span class="num">LV.{{ item.serialNumber }}</span>
<span class="num">LV.{{ i + 1 }}</span>
<div class="texts">
<h6>{{ numToChinese(item.serialNumber) }}</h6>
<h6>{{ numToChinese(i + 1) }}</h6>
<p class="des mul-ellipsis2">{{ item.customsPassName }}</p>
<img v-if="item.collect"
class="icon"
@ -90,19 +90,21 @@ const getLevel = async (only: any = '') => {
provide('getLevel', getLevel);
//
const selecLevel = (item: Record<string, any>) => {
curLevel.value = item.checkpointId;
if (item.enableOrNot) curLevel.value = item.checkpointId;
};
//
const collectItem = async (item: Record<string, any>) => {
if (item.collect) {
await cancelCollection(item.favoriteId);
} else {
await collect({
checkpointId: item.checkpointId,
projectId,
});
if (item.enableOrNot) {
if (item.collect) {
await cancelCollection(item.favoriteId);
} else {
await collect({
checkpointId: item.checkpointId,
projectId,
});
}
getLevel();
}
getLevel();
};
//
const toRole = () => {
@ -185,6 +187,9 @@ onMounted(() => {
-webkit-text-fill-color: #fff;
}
}
&.disabled {
@apply opacity-30 cursor-not-allowed;
}
&:nth-child(2) {
@apply top-[var(--line2)] left-[160px];

@ -199,7 +199,7 @@ import Cookies from 'js-cookie';
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
//
const answer = [[697, 697], [697, 697], [1, 707], [714], [], [697, 697], [697, 697]];
const answer = [[697, 693], [698, 691], [1, 707], [716], [], [695, 696], [696, 694]];
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1031);
@ -210,7 +210,6 @@ const getConfig = async () => {
},
];
process.map((e, i) => {
console.log('🚀 ~ process.map ~ i:', i);
let temp = {
...getIds(),
recordName: e.name,

@ -231,109 +231,109 @@
</div>
</el-form-item>
<el-form-item label="准入策略"
prop="accessStrategy">
<div>
<div class="radio-wrap flex-col items-start mb-2">
<el-radio-group v-if="config.length"
v-model="form.accessPolicySelectedStatus">
<el-radio v-for="(item, i) in config[2]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
<template v-if="form.accessPolicySelectedStatus === 803">
<p class="tips">选择需要跑批的准入策略至少选一样</p>
<el-checkbox-group v-if="config.length"
v-model="form.accessStrategy">
<el-checkbox v-for="(item, i) in config[2]?.recordChildren[1]?.recordChildren[0]?.subject?.itemList"
label-width="130px">
<div v-if="config.length && form.bankRiskControlAllocationTacticsList.length"
class="flex-1">
<div v-for="(item, i) in config[2]?.recordChildren[1]?.recordChildren"
:key="i"
class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label min-w-[130px]">{{ item.name }}</span>
<el-radio-group v-model="form.bankRiskControlAllocationTacticsList[i].tacticsSelectedStatus"
@change="getStrategy">
<el-radio v-for="(option, j) in item?.recordChildren[0]?.subject?.itemList"
:key="j"
:label="option.itemId">{{ option.options }}</el-radio>
</el-radio-group>
</div>
<template v-if="form.bankRiskControlAllocationTacticsList[i].tacticsSelectedStatus === 803">
<el-select class="ml-5 mr-3"
v-model="form.bankRiskControlAllocationTacticsList[i].tacticsId"
placeholder="请选择">
<el-option v-for="(item, i) in govList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
:label="item.strategyName"
:value="item.governmentId" />
</el-select>
<img v-if="form.bankRiskControlAllocationTacticsList[i].tacticsId"
src="@/assets/svgs/preview.svg"
alt=""
class="cursor-pointer"
@click="preview(form.bankRiskControlAllocationTacticsList[i].tacticsId, '150')">
</template>
</div>
</div>
</el-form-item>
<el-form-item label="信用评分策略"
label-width="130px"
prop="personalCreditScoringStrategySelectedStatus">
<div class="flex-1">
<div class="flex items-center mb-3">
<div v-if="config.length"
class="flex-1">
<div v-for="(item, i) in config[2]?.recordChildren[2]?.recordChildren"
:key="i"
class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">个人信用评分策略</span>
<el-radio-group v-model="form.personalCreditScoringStrategySelectedStatus">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
<span class="label">{{ item.name }}</span>
<el-radio-group v-model="form.creditScoringStrategyList[i].tacticsSelectedStatus">
<el-radio v-for="(option, j) in item?.recordChildren[0]?.subject?.itemList"
:key="j"
:label="option.itemId">{{ option.options }}</el-radio>
</el-radio-group>
</div>
<el-select v-if="form.personalCreditScoringStrategySelectedStatus === 797"
<el-select v-if="form.creditScoringStrategyList[i].tacticsSelectedStatus === 803"
class="ml-5"
v-model="form.personalCreditScoringStrategies"
v-model="form.creditScoringStrategyList[i].tacticsId"
placeholder="请选择">
<el-option v-for="item in credits.filter(e => !e.scoringObject)"
:key="item"
:value="item.scoreCardName" />
</el-select>
</div>
<div class="flex items-center">
</div>
</el-form-item>
<el-form-item label="风险度策略">
<div class="flex-1">
<div class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">企业信用评分策略</span>
<el-radio-group v-model="form.enterpriseCreditScoringStrategySelectedStatus">
<el-radio v-for="(item, i) in whethers"
<span class="label">个人风险度策略</span>
<el-radio-group v-model="form.personalRiskDegreeStrategySelectedStatus">
<el-radio v-for="(item, i) in whethers1"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
<el-select v-if="form.enterpriseCreditScoringStrategySelectedStatus === 797"
class="ml-5"
v-model="form.corporateCreditScoringStrategies"
placeholder="请选择">
<el-option v-for="item in credits.filter(e => e.scoringObject)"
:key="item"
:value="item.scoreCardName" />
</el-select>
</div>
</div>
</el-form-item>
<el-form-item label="风险度策略"
prop="riskDegreeStrategy">
<div class="flex items-center h-[34px]">
<el-radio-group v-if="config.length"
class="mr-10"
v-model="form.riskDegreePolicySelectedStatus">
<el-radio v-for="(item, i) in config[2]?.recordChildren[3]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
<el-checkbox-group v-if="form.riskDegreePolicySelectedStatus === 803 && config.length"
style="font-size: 14px"
v-model="form.riskDegreeStrategy">
<el-checkbox v-for="(item, i) in config[2]?.recordChildren[3]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
<el-form-item label="利率定价模型"
label-width="130px"
prop="individualCreditModelSelectedStatus">
<div class="flex-1">
<div class="flex items-center mb-3">
<div class="radio-wrap">
<span class="label">{{ (info.productType ? '企业' : '个人') + '额度模型' }}</span>
<el-radio-group v-if="config.length"
v-model="form.individualCreditModelSelectedStatus">
<el-radio v-for="(item, i) in config[2]?.recordChildren[3]?.recordChildren[1]?.subject?.itemList"
<span class="label">企业风险度策略</span>
<el-radio-group v-model="form.enterpriseRiskDegreeStrategySelectedStatus">
<el-radio v-for="(item, i) in whethers1"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
</el-radio-group>
</div>
<el-select v-if="form.individualCreditModelSelectedStatus === 803 && config.length"
</div>
</div>
</el-form-item>
<el-form-item label="利率定价模型"
label-width="130px">
<div v-if="config.length"
class="flex-1">
<div v-for="(item, i) in config[2]?.recordChildren[4]?.recordChildren.slice(0,2)"
:key="i"
class="radio-wrap mb-3">
<span class="label">{{ item.name }}</span>
<el-radio-group v-model="form.interestRatePricingModelList[i].tacticsSelectedStatus">
<el-radio v-for="(option, j) in whethers1"
:key="j"
:label="option.itemId">{{ option.options }}</el-radio>
</el-radio-group>
<el-select v-if="form.interestRatePricingModelList[i].tacticsSelectedStatus === 803"
class="ml-5"
v-model="form.interestRatePricingModel"
v-model="form.interestRatePricingModelList[i].tacticsId"
placeholder="请选择">
<el-option v-for="item in config[2]?.recordChildren[4]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="item.itemId"
@ -342,14 +342,40 @@
</el-select>
</div>
<div class="radio-wrap">
<span class="label">{{ (info.productType ? '企业' : '个人') + '利率模型' }}</span>
<el-radio-group v-if="config.length"
v-model="form.individualInterestRateModel">
<el-radio v-for="(item, i) in config[2]?.recordChildren[4]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
<div class="radio-wrap items-start mb-3">
<span class="label">企业额度模型</span>
<el-radio-group v-model="form.enterpriseQuotaModelSelectedStatus">
<el-radio v-for="(option, j) in whethers1"
:key="j"
:label="option.itemId">{{ option.options }}</el-radio>
</el-radio-group>
<el-checkbox-group v-if="form.enterpriseQuotaModelSelectedStatus === 803"
v-model="form.enterpriseQuotaModel"
class="ml-5">
<el-checkbox v-for="(item, i) in config[2]?.recordChildren[4]?.recordChildren[2]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId"
class="flex">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</div>
<div class="radio-wrap items-start mb-3">
<span class="label">企业利率模型</span>
<el-radio-group v-model="form.interestRatePricingModelList[2].tacticsSelectedStatus">
<el-radio v-for="(option, j) in whethers1"
:key="j"
:label="option.itemId">{{ option.options }}</el-radio>
</el-radio-group>
<el-select v-if="form.interestRatePricingModelList[2].tacticsSelectedStatus === 803"
class="ml-5"
v-model="form.interestRatePricingModelList[2].tacticsId"
placeholder="请选择">
<el-option v-for="item in config[2]?.recordChildren[4]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="item.itemId"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
</div>
</el-form-item>
@ -529,26 +555,28 @@
</div>
<div class="step">
<h6 class="step-name mb-7">贷后管理</h6>
<el-form-item label="选择策略"
prop="selectionStrategy">
<div>
<div class="radio-wrap flex-col items-start mb-1">
<el-radio-group v-if="config.length"
v-model="form.postLoanManagementSelectPolicySelectStatus">
<el-radio v-for="(item, i) in config[2]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-radio>
<el-form-item label="选择策略">
<div v-if="config.length"
class="flex-1">
<div v-for="(item, i) in config[7]?.recordChildren"
:key="i"
class="radio-wrap mb-3">
<span class="label min-w-[85px]">{{ item.name }}</span>
<el-radio-group v-model="form.postLoanSelectionStrategyList[i].tacticsSelectedStatus">
<el-radio v-for="(option, j) in item?.recordChildren[0]?.subject?.itemList"
:key="j"
:label="option.itemId">{{ option.options }}</el-radio>
</el-radio-group>
<el-select v-if="form.postLoanSelectionStrategyList[i].tacticsSelectedStatus === 803"
class="ml-5"
v-model="form.postLoanSelectionStrategyList[i].tacticsId"
placeholder="请选择">
<el-option v-for="item in config[2]?.recordChildren[4]?.recordChildren[1]?.recordChildren[1]?.subject?.itemList"
:key="item.itemId"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
<template v-if="form.postLoanManagementSelectPolicySelectStatus === 803">
<p class="tips">选择策略至少选一样</p>
<el-checkbox-group v-if="(info.productType && config.length && config[7]?.recordChildren) || (!info.productType && config.length && config[7]?.recordChildren)"
v-model="form.selectionStrategy">
<el-checkbox v-for="(item, i) in info.productType ? config[7]?.recordChildren[0]?.recordChildren[1]?.subject?.itemList : config[7]?.recordChildren[0]?.subject?.itemList"
:key="i"
:label="item.itemId">{{ item.options }}</el-checkbox>
</el-checkbox-group>
</template>
</div>
</el-form-item>
</div>
@ -567,16 +595,25 @@
</div>
</el-tab-pane>
</el-tabs>
<el-drawer v-model="visible"
title="查看政务黑名单策略"
size="100%"
custom-class="model-drawer">
<component :is="curPreview"
v-model:id="curPreviewId"
disabled />
</el-drawer>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, computed, watch, onMounted } from 'vue';
import { ref, reactive, computed, watch, defineAsyncComponent, getCurrentInstance } from 'vue';
import { ElMessage } from 'element-plus';
import type { TabsPaneContext, FormInstance } from 'element-plus';
import { findById, riskSave, riskUpdate, riskControlDetailsAreDisplayed } from '@/api/bank';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { listCredit } from '@/api/model';
import { listCredit, accessStrategyGovernmentBlacklistList } from '@/api/model';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds, getUsername } from '@/utils/common';
import Info from './Info.vue';
@ -584,8 +621,6 @@ import Cookies from 'js-cookie';
const emit = defineEmits(['getList']);
interface RuleForm {
accessPolicySelectedStatus?: number;
accessStrategy?: number[];
provideMaterialSelectedStatus?: number;
accountMaterials?: number[];
approvalSignature?: number;
@ -598,8 +633,6 @@ interface RuleForm {
collateral?: number[];
contractSupplyMaterialsSelectedStatus?: number;
contractMaterials?: number;
enterpriseCreditScoringStrategySelectedStatus?: number;
corporateCreditScoringStrategies?: string;
corporateInterestRateModel?: number[];
dueDiligenceContent?: number[];
dueDiligenceMode?: number[];
@ -607,9 +640,6 @@ interface RuleForm {
enterpriseMaterial?: number[];
guaranteeContractSelectedStatus?: number;
guaranteeContract?: number;
individualInterestRateModel?: number;
individualCreditModelSelectedStatus?: number;
interestRatePricingModel?: number;
loanApplicationMethod?: number[];
loanContractSelectedStatus?: number;
loanContract?: number;
@ -618,23 +648,25 @@ interface RuleForm {
materialsForLoanApproval?: number[];
mortgageContractSelectedStatus?: number;
mortgageContract?: number;
personalCreditScoringStrategySelectedStatus?: number;
personalCreditScoringStrategies?: number;
pledgeContractSelectedStatus?: number;
pledgeContract?: number;
reviewApproveContent?: number[];
reviewContent?: number[];
reviewSignature?: number;
riskDegreePolicySelectedStatus?: number;
riskDegreeStrategy?: number[];
runBatchObjectSelectedStatus?: number;
runBatchObject?: number[];
postLoanManagementSelectPolicySelectStatus?: number;
selectionStrategy?: number[];
issueAccountSelectStatus?: number;
sendingAccount?: number[];
supplementMaterialSelectedStatus?: number;
supplementaryMaterials?: number[];
bankRiskControlAllocationTacticsList: Record<string, any>[];
creditScoringStrategyList: Record<string, any>[];
interestRatePricingModelList: Record<string, any>[];
postLoanSelectionStrategyList: Record<string, any>[];
enterpriseRiskDegreeStrategySelectedStatus?: number;
personalRiskDegreeStrategySelectedStatus?: number;
enterpriseQuotaModelSelectedStatus?: number;
enterpriseQuotaModel?: number[];
}
const router = useRouter();
const route = useRoute();
@ -653,12 +685,25 @@ const whethers = ref<Record<string, any>>([
name: '无需提供',
},
]);
const whethers1 = ref<Record<string, any>>([
{
itemId: 803,
options: '需要跑批',
},
{
itemId: 804,
options: '无需跑批',
},
]);
const formRef = ref<FormInstance>();
const userName = ref<string>();
const curPreview = ref<string>('150');
const curPreviewId = ref<number>();
const visible = ref<boolean>(false);
const govList = ref<Record<string, any>[]>([]);
let form = reactive<RuleForm>({
...getIds(),
accessPolicySelectedStatus: '',
accessStrategy: [],
provideMaterialSelectedStatus: '',
accountMaterials: [],
approvalSignature: '',
@ -671,8 +716,6 @@ let form = reactive<RuleForm>({
collateral: [],
contractSupplyMaterialsSelectedStatus: '',
contractMaterials: '',
enterpriseCreditScoringStrategySelectedStatus: '',
corporateCreditScoringStrategies: '',
corporateInterestRateModel: [],
dueDiligenceContent: [],
dueDiligenceMode: [],
@ -680,9 +723,6 @@ let form = reactive<RuleForm>({
enterpriseMaterial: [],
guaranteeContractSelectedStatus: '',
guaranteeContract: '',
individualInterestRateModel: '',
individualCreditModelSelectedStatus: '',
interestRatePricingModel: '',
loanApplicationMethod: [],
loanContractSelectedStatus: '',
loanContract: '',
@ -691,34 +731,123 @@ let form = reactive<RuleForm>({
materialsForLoanApproval: [],
mortgageContractSelectedStatus: '',
mortgageContract: '',
personalCreditScoringStrategySelectedStatus: '',
personalCreditScoringStrategies: '',
pledgeContractSelectedStatus: '',
pledgeContract: '',
reviewApproveContent: [],
reviewContent: [],
reviewSignature: '',
riskDegreePolicySelectedStatus: '',
riskDegreeStrategy: [],
runBatchObjectSelectedStatus: '',
runBatchObject: [],
postLoanManagementSelectPolicySelectStatus: '',
selectionStrategy: [],
issueAccountSelectStatus: '',
sendingAccount: [],
supplementMaterialSelectedStatus: '',
supplementaryMaterials: [],
bankRiskControlAllocationTacticsList: [],
creditScoringStrategyList: [],
interestRatePricingModelList: [],
postLoanSelectionStrategyList: [],
enterpriseRiskDegreeStrategySelectedStatus: '',
personalRiskDegreeStrategySelectedStatus: '',
enterpriseQuotaModelSelectedStatus: '',
enterpriseQuotaModel: [],
});
const dynamicComponentMap = {
'150': defineAsyncComponent(() => import('../strategy/150/Detail.vue')),
// '151': defineAsyncComponent(() => import('./151.vue')),
// '152': defineAsyncComponent(() => import('./152.vue')),
// '153': defineAsyncComponent(() => import('./153.vue')),
// '154': defineAsyncComponent(() => import('./154.vue')),
// '155': defineAsyncComponent(() => import('./155.vue')),
// '156': defineAsyncComponent(() => import('./156.vue')),
// '148': defineAsyncComponent(() => import('./Credit.vue')),
// '702': defineAsyncComponent(() => import('./Risk1.vue')),
// '703': defineAsyncComponent(() => import('./Risk2.vue')),
// '704': defineAsyncComponent(() => import('./Risk3.vue')),
};
const app = getCurrentInstance().appContext.app;
for (const [name, asyncComponent] of Object.entries(dynamicComponentMap)) {
app.component(name, asyncComponent);
}
// tab
const tabChange = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event);
};
//
const getStrategy = async () => {
try {
const { page } = await accessStrategyGovernmentBlacklistList({ pageNum: 1, pageSize: 1000, keyWord: '', ...getIds() });
govList.value = page.records;
} finally {
}
};
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(info.value.productType ? 71 : 70); // 7071
config.value = process;
//
if (!form.bankRiskControlAllocationTacticsList.length) {
process[2].recordChildren[1].recordChildren.map((e) => {
form.bankRiskControlAllocationTacticsList.push({
type: 1,
bankId: '',
id: '',
tacticsId: '',
tacticsPointId: e.id,
tacticsSelectedStatus: '',
});
});
}
//
if (!form.creditScoringStrategyList.length) {
process[2].recordChildren[2].recordChildren.map((e) => {
form.creditScoringStrategyList.push({
type: 2,
bankId: '',
id: '',
tacticsId: '',
tacticsPointId: e.id,
tacticsSelectedStatus: '',
});
});
}
//
if (!form.interestRatePricingModelList.length) {
process[2].recordChildren[4].recordChildren.map((e, i) => {
i !== 2 &&
form.interestRatePricingModelList.push({
type: 3,
bankId: '',
id: '',
tacticsId: '',
tacticsPointId: e.id,
tacticsSelectedStatus: '',
});
});
}
//
if (!form.postLoanSelectionStrategyList.length) {
process[7].recordChildren.map((e) => {
form.postLoanSelectionStrategyList.push({
type: 4,
bankId: '',
id: '',
tacticsId: '',
tacticsPointId: e.id,
tacticsSelectedStatus: '',
});
});
}
if (form.bankRiskControlAllocationTacticsList[0].tacticsSelectedStatus === 803) {
getStrategy();
}
const { data } = await listCredit({
...getIds(),
pageNum: 1,
@ -760,23 +889,23 @@ const getDetail = async () => {
//
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);
if (e) {
e.enterpriseQuotaModel = e?.enterpriseQuotaModel?.split(',').map((e) => +e);
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 : '';
form = Object.assign(form, e);
}
getConfig();
} finally {
}
}
@ -820,16 +949,40 @@ const submit = async (formEl: FormInstance | undefined) => {
if (param.supplementMaterialSelectedStatus === 797 && !param.supplementaryMaterials.length) return ElMessage.error('请选择需要提供的补充材料');
if (param.runBatchObjectSelectedStatus === 803 && !param.runBatchObject.length) return ElMessage.error('请选择需要跑批的对象');
if (param.accessPolicySelectedStatus === 803 && !param.accessStrategy.length) return ElMessage.error('请选择需要跑批的准入策略');
const list1 = param.bankRiskControlAllocationTacticsList;
if (list1[0].tacticsSelectedStatus === 803 && !list1[0].tacticsId) return ElMessage.error('请选择政务黑名单策略');
if (list1[1].tacticsSelectedStatus === 803 && !list1[1].tacticsId) return ElMessage.error('请选择征信黑名单策略');
if (list1[2].tacticsSelectedStatus === 803 && !list1[2].tacticsId) return ElMessage.error('请选择商采黑名单策略');
if (list1[3].tacticsSelectedStatus === 803 && !list1[3].tacticsId) return ElMessage.error('请选择行内黑名单策略');
if (list1[4].tacticsSelectedStatus === 803 && !list1[4].tacticsId) return ElMessage.error('请选择企业黑名单策略');
if (list1[5].tacticsSelectedStatus === 803 && !list1[5].tacticsId) return ElMessage.error('请选择反欺诈策略');
if (list1[6].tacticsSelectedStatus === 803 && !list1[6].tacticsId) return ElMessage.error('请选择负面行业黑名单策略');
const list2 = param.creditScoringStrategyList;
if (list2[0].tacticsSelectedStatus === 803 && !list2[0].tacticsId) return ElMessage.error('请选择个人信用评分策略');
if (list2[1].tacticsSelectedStatus === 803 && !list2[1].tacticsId) return ElMessage.error('请选择企业信用评分策略');
const list3 = param.interestRatePricingModelList;
if (list3[0].tacticsSelectedStatus === 803 && !list3[0].tacticsId) return ElMessage.error('请选择个人利率模型');
if (list3[1].tacticsSelectedStatus === 803 && !list3[1].tacticsId) return ElMessage.error('请选择个人额度模型');
if (param.enterpriseQuotaModelSelectedStatus === 803 && !param.enterpriseQuotaModel.length) return ElMessage.error('请选择企业额度模型');
if (list3[2].tacticsSelectedStatus === 803 && !list3[2].tacticsId) return ElMessage.error('请选择企业利率模型');
if (!param.dueDiligenceMode.length) return ElMessage.error('请选择尽调方式');
if (!param.dueDiligenceContent.length) return ElMessage.error('请选择尽调内容');
if (!param.reviewContent.length) return ElMessage.error('请选择审查材料');
if (!param.reviewSignature) return ElMessage.error('请选择签字表单');
if (!param.reviewApproveContent.length) return ElMessage.error('请选择审批材料');
if (!param.approvalSignature) return ElMessage.error('请选择签字表单');
if (param.postLoanManagementSelectPolicySelectStatus === 803 && !param.selectionStrategy.length) return ElMessage.error('请选择策略');
param.accessStrategy = param.accessPolicySelectedStatus === 803 ? param.accessStrategy.join() : '';
const list4 = param.postLoanSelectionStrategyList;
if (list4[0].tacticsSelectedStatus === 803 && !list4[0].tacticsId) return ElMessage.error('请选择五级分类策略');
if (list4[1].tacticsSelectedStatus === 803 && !list4[1].tacticsId) return ElMessage.error('请选择贷后检查策略');
if (list4[2].tacticsSelectedStatus === 803 && !list4[2].tacticsId) return ElMessage.error('请选择贷后评分卡');
if (list4[3].tacticsSelectedStatus === 803 && !list4[3].tacticsId) return ElMessage.error('请选择贷后预警策略');
if (list4[4].tacticsSelectedStatus === 803 && !list4[4].tacticsId) return ElMessage.error('请选择贷后催收策略');
param.borrowerMaterial = param.borrowerMaterialSelectedStatus === 797 ? param.borrowerMaterial.join() : '';
param.accountMaterials = param.provideMaterialSelectedStatus === 797 ? param.accountMaterials.join() : '';
param.sendingAccount = param.issueAccountSelectStatus === 801 ? param.sendingAccount.join() : '';
@ -841,9 +994,6 @@ const submit = async (formEl: FormInstance | undefined) => {
//
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 = '';
if (param.loanContractSelectedStatus !== 797) param.loanContract = '';
if (param.mortgageContractSelectedStatus !== 797) param.mortgageContract = '';
@ -855,9 +1005,24 @@ const submit = async (formEl: FormInstance | undefined) => {
param.reviewContent = param.reviewContent.join();
param.reviewApproveContent = param.reviewApproveContent.join();
param.loanApplicationMethod = param.loanApplicationMethod.join();
param.riskDegreeStrategy = param.riskDegreePolicySelectedStatus === 803 ? param.riskDegreeStrategy.join() : '';
param.runBatchObject = param.runBatchObjectSelectedStatus === 803 ? param.runBatchObject.join() : '';
param.selectionStrategy = param.postLoanManagementSelectPolicySelectStatus === 803 ? param.selectionStrategy.join() : '';
//
list1.map((e) => {
if (e.tacticsSelectedStatus !== 803 && e.tacticsId) e.tacticsId = '';
});
list2.map((e) => {
if (e.tacticsSelectedStatus !== 803 && e.tacticsId) e.tacticsId = '';
});
list3.map((e) => {
if (e.tacticsSelectedStatus !== 803 && e.tacticsId) e.tacticsId = '';
});
list4.map((e) => {
if (e.tacticsSelectedStatus !== 803 && e.tacticsId) e.tacticsId = '';
});
param.enterpriseQuotaModel = param.enterpriseQuotaModelSelectedStatus === 803 ? param.enterpriseQuotaModel.join() : '';
debugger;
param.supplementaryMaterials = param.supplementMaterialSelectedStatus === 797 ? param.supplementaryMaterials.join() : '';
if (param.contractSupplyMaterialsSelectedStatus !== 797) param.contractMaterials = '';
if (info.value.riskControlDetails) {
@ -911,20 +1076,20 @@ const addRecord = async (data: Record<string, any>) => {
data.runBatchObjectSelectedStatus && lcRule.push(handleId(1302, 327, data.runBatchObjectSelectedStatus, preIds + ',114,127,1302', 1));
data.runBatchObject && lcRule.push(handleId(1261, 51, data.runBatchObject, preIds + ',114,127,1261', 1));
data.accessPolicySelectedStatus && lcRule.push(handleId(1302, 327, data.accessPolicySelectedStatus, preIds + ',114,128,1302', 1));
data.accessStrategy && lcRule.push(handleId(1262, 52, data.accessStrategy, preIds + ',114,128,1262', 1));
// data.accessPolicySelectedStatus && lcRule.push(handleId(1302, 327, data.accessPolicySelectedStatus, preIds + ',114,128,1302', 1));
// data.accessStrategy && lcRule.push(handleId(1262, 52, data.accessStrategy, preIds + ',114,128,1262', 1));
data.personalCreditScoringStrategySelectedStatus && lcRule.push(handleId(1306, 325, data.personalCreditScoringStrategySelectedStatus, preIds + ',114,129,1046,1306', 1));
data.personalCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.personalCreditScoringStrategies, preIds + ',114,129,1046,1307', 3));
data.enterpriseCreditScoringStrategySelectedStatus && lcRule.push(handleId(1306, 325, data.enterpriseCreditScoringStrategySelectedStatus, preIds + ',114,129,1047,1306', 1));
data.corporateCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.corporateCreditScoringStrategies, preIds + ',114,129,1047,1307', 3));
// data.personalCreditScoringStrategySelectedStatus && lcRule.push(handleId(1306, 325, data.personalCreditScoringStrategySelectedStatus, preIds + ',114,129,1046,1306', 1));
// data.personalCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.personalCreditScoringStrategies, preIds + ',114,129,1046,1307', 3));
// data.enterpriseCreditScoringStrategySelectedStatus && lcRule.push(handleId(1306, 325, data.enterpriseCreditScoringStrategySelectedStatus, preIds + ',114,129,1047,1306', 1));
// data.corporateCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.corporateCreditScoringStrategies, preIds + ',114,129,1047,1307', 3));
data.riskDegreePolicySelectedStatus && lcRule.push(handleId(1302, 327, data.riskDegreePolicySelectedStatus, preIds + ',114,130,1302', 1));
data.riskDegreeStrategy && lcRule.push(handleId(1301, 54, data.riskDegreeStrategy, preIds + ',114,130,1301', 1));
// data.riskDegreePolicySelectedStatus && lcRule.push(handleId(1302, 327, data.riskDegreePolicySelectedStatus, preIds + ',114,130,1302', 1));
// data.riskDegreeStrategy && lcRule.push(handleId(1301, 54, data.riskDegreeStrategy, preIds + ',114,130,1301', 1));
data.individualCreditModelSelectedStatus && lcRule.push(handleId(1302, 327, data.individualCreditModelSelectedStatus, preIds + ',114,131,305,1302', 1));
data.interestRatePricingModel && lcRule.push(handleId(1314, 55, data.interestRatePricingModel, preIds + ',114,131,305,1314', 1));
data.individualInterestRateModel && lcRule.push(handleId(304, 327, data.individualInterestRateModel, preIds + ',114,131,304', 1));
// data.individualCreditModelSelectedStatus && lcRule.push(handleId(1302, 327, data.individualCreditModelSelectedStatus, preIds + ',114,131,305,1302', 1));
// data.interestRatePricingModel && lcRule.push(handleId(1314, 55, data.interestRatePricingModel, preIds + ',114,131,305,1314', 1));
// data.individualInterestRateModel && lcRule.push(handleId(304, 327, data.individualInterestRateModel, preIds + ',114,131,304', 1));
data.dueDiligenceMode && lcRule.push(handleId(132, 56, data.dueDiligenceMode, preIds + ',115,132', 1));
data.dueDiligenceContent && lcRule.push(handleId(133, 57, data.dueDiligenceContent, preIds + ',115,133', 1));
@ -948,8 +1113,8 @@ const addRecord = async (data: Record<string, any>) => {
data.guaranteeContractSelectedStatus && lcRule.push(handleId(1273, 325, data.guaranteeContractSelectedStatus, preIds + ',118,139,309,1273', 1));
data.guaranteeContract && lcRule.push(handleId(1272, 144, data.guaranteeContract, preIds + ',118,139,309,1272', 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.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.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));
@ -977,20 +1142,54 @@ const addRecord = async (data: Record<string, any>) => {
data.runBatchObjectSelectedStatus && lcRule.push(handleId(1302, 327, data.runBatchObjectSelectedStatus, preIds + ',74,82,1302', 1));
data.runBatchObject && lcRule.push(handleId(1297, 27, data.runBatchObject, preIds + ',74,82,1297', 1));
data.accessPolicySelectedStatus && lcRule.push(handleId(1302, 327, data.accessPolicySelectedStatus, preIds + ',74,83,1302', 1));
data.accessStrategy && lcRule.push(handleId(1298, 28, data.accessStrategy, preIds + ',74,83,1298', 1));
//
const list1 = data.bankRiskControlAllocationTacticsList;
list1[0].tacticsSelectedStatus && lcRule.push(handleId(1325, 327, list1[0].tacticsSelectedStatus, `${preIds},74,83,1318,1325`, 1));
list1[0].tacticsId && lcRule.push(handleId(1326, 331, govList.value.find((e) => e.governmentId === list1[0].tacticsId)?.strategyName, `${preIds},74,83,1318,1326`, 3));
list1[1].tacticsSelectedStatus && lcRule.push(handleId(1327, 327, list1[1].tacticsSelectedStatus, `${preIds},74,83,1319,1327`, 1));
list1[1].tacticsId && lcRule.push(handleId(1328, 332, govList.value.find((e) => e.governmentId === list1[1].tacticsId)?.strategyName, `${preIds},74,83,1319,1328`, 3));
list1[2].tacticsSelectedStatus && lcRule.push(handleId(1329, 327, list1[2].tacticsSelectedStatus, `${preIds},74,83,1320,1329`, 1));
list1[2].tacticsId && lcRule.push(handleId(1330, 333, govList.value.find((e) => e.governmentId === list1[2].tacticsId)?.strategyName, `${preIds},74,83,1320,1330`, 3));
list1[3].tacticsSelectedStatus && lcRule.push(handleId(1331, 327, list1[3].tacticsSelectedStatus, `${preIds},74,83,1321,1331`, 1));
list1[3].tacticsId && lcRule.push(handleId(1332, 334, govList.value.find((e) => e.governmentId === list1[3].tacticsId)?.strategyName, `${preIds},74,83,1321,1332`, 3));
list1[4].tacticsSelectedStatus && lcRule.push(handleId(1333, 327, list1[4].tacticsSelectedStatus, `${preIds},74,83,1322,1333`, 1));
list1[4].tacticsId && lcRule.push(handleId(1334, 335, govList.value.find((e) => e.governmentId === list1[4].tacticsId)?.strategyName, `${preIds},74,83,1322,1334`, 3));
list1[5].tacticsSelectedStatus && lcRule.push(handleId(1335, 327, list1[5].tacticsSelectedStatus, `${preIds},74,83,1323,1335`, 1));
list1[5].tacticsId && lcRule.push(handleId(1336, 336, govList.value.find((e) => e.governmentId === list1[5].tacticsId)?.strategyName, `${preIds},74,83,1323,1336`, 3));
list1[6].tacticsSelectedStatus && lcRule.push(handleId(1337, 327, list1[6].tacticsSelectedStatus, `${preIds},74,83,1324,1337`, 1));
list1[6].tacticsId && lcRule.push(handleId(1338, 337, govList.value.find((e) => e.governmentId === list1[6].tacticsId)?.strategyName, `${preIds},74,83,1324,1338`, 3));
//
const list2 = data.creditScoringStrategyList;
list2[0].tacticsSelectedStatus && lcRule.push(handleId(1364, 327, list2[0].tacticsSelectedStatus, `${preIds},74,84,1304,1364`, 1));
list2[0].tacticsId && lcRule.push(handleId(1366, 327, list2[0].tacticsId, `${preIds},74,84,1304,1366`, 3));
data.personalCreditScoringStrategySelectedStatus && lcRule.push(handleId(1306, 325, data.personalCreditScoringStrategySelectedStatus, preIds + ',74,84,1304,1306', 1));
data.personalCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.personalCreditScoringStrategies, preIds + ',74,84,1304,1307', 3));
data.enterpriseCreditScoringStrategySelectedStatus && lcRule.push(handleId(1306, 325, data.enterpriseCreditScoringStrategySelectedStatus, preIds + ',74,84,1305,1306', 1));
data.corporateCreditScoringStrategies && lcRule.push(handleId(1307, 329, data.corporateCreditScoringStrategies, preIds + ',74,84,1305,1307', 3));
list2[1].tacticsSelectedStatus && lcRule.push(handleId(1365, 327, list2[1].tacticsSelectedStatus, `${preIds},74,84,1305,1365`, 1));
list2[1].tacticsId && lcRule.push(handleId(1367, 339, list2[1].tacticsId, `${preIds},74,84,1305,1367`, 3));
data.riskDegreePolicySelectedStatus && lcRule.push(handleId(1302, 327, data.riskDegreePolicySelectedStatus, preIds + ',74,85,1302', 1));
data.riskDegreeStrategy && lcRule.push(handleId(1300, 30, data.riskDegreeStrategy, preIds + ',74,85,1300', 1));
//
data.personalRiskDegreeStrategySelectedStatus && lcRule.push(handleId(1339, 327, data.personalRiskDegreeStrategySelectedStatus, preIds + '74,85,1339', 1));
data.enterpriseRiskDegreeStrategySelectedStatus && lcRule.push(handleId(1340, 327, data.enterpriseRiskDegreeStrategySelectedStatus, preIds + ',74,85,1340', 1));
data.individualCreditModelSelectedStatus && lcRule.push(handleId(1302, 327, data.individualCreditModelSelectedStatus, preIds + ',74,86,1309,1302', 1));
data.interestRatePricingModel && lcRule.push(handleId(1311, 141, data.interestRatePricingModel, preIds + ',74,86,1309,1311', 1));
data.individualInterestRateModel && lcRule.push(handleId(1308, 327, data.individualInterestRateModel, preIds + ',74,86,1308', 1));
//
const list3 = data.interestRatePricingModelList;
list3[0].tacticsSelectedStatus && lcRule.push(handleId(1310, 327, list3[0].tacticsSelectedStatus, `${preIds},74,86,1308,1310`, 1));
list3[0].tacticsId && lcRule.push(handleId(1360, 339, list3[0].tacticsId, `${preIds},74,86,1308,1360`, 3));
list3[1].tacticsSelectedStatus && lcRule.push(handleId(1311, 327, list3[1].tacticsSelectedStatus, `${preIds},74,86,1309,1311`, 1));
list3[1].tacticsId && lcRule.push(handleId(1361, 339, list3[1].tacticsId, `${preIds},74,86,1309,1361`, 3));
data.enterpriseQuotaModelSelectedStatus && lcRule.push(handleId(1343, 327, data.enterpriseQuotaModelSelectedStatus, preIds + '74,86,1341,1343', 1));
data.enterpriseQuotaModel && lcRule.push(handleId(1362, 338, data.enterpriseQuotaModel, preIds + ',74,86,1341,1362', 1));
list3[2].tacticsSelectedStatus && lcRule.push(handleId(1344, 327, list3[2].tacticsSelectedStatus, `${preIds},74,86,1342,1344`, 1));
list3[2].tacticsId && lcRule.push(handleId(1363, 339, list3[2].tacticsId, `${preIds},74,86,1342,1363`, 3));
data.dueDiligenceMode && lcRule.push(handleId(88, 32, data.dueDiligenceMode, preIds + ',87,88', 1));
data.dueDiligenceContent && lcRule.push(handleId(89, 33, data.dueDiligenceContent, preIds + ',87,89', 1));
@ -1014,8 +1213,22 @@ const addRecord = async (data: Record<string, any>) => {
data.guaranteeContractSelectedStatus && lcRule.push(handleId(1253, 325, data.guaranteeContractSelectedStatus, preIds + ',96,98,313,1253', 1));
data.guaranteeContract && lcRule.push(handleId(1252, 147, data.guaranteeContract, preIds + ',96,98,313,1252', 1));
data.postLoanManagementSelectPolicySelectStatus && lcRule.push(handleId(283, 327, data.postLoanManagementSelectPolicySelectStatus, preIds + ',99,283', 1));
data.selectionStrategy && lcRule.push(handleId(281, 40, data.selectionStrategy, preIds + ',99,281', 1));
//
const list4 = data.bankRiskControlAllocationTacticsList;
list4[0].tacticsSelectedStatus && lcRule.push(handleId(1350, 327, list4[0].tacticsSelectedStatus, `${preIds},99,1345,1350`, 1));
list4[0].tacticsId && lcRule.push(handleId(1355, 339, govList.value.find((e) => e.governmentId === list4[0].tacticsId)?.strategyName, `${preIds},99,1345,1355`, 3));
list4[1].tacticsSelectedStatus && lcRule.push(handleId(1351, 327, list4[1].tacticsSelectedStatus, `${preIds},99,1346,1351`, 1));
list4[1].tacticsId && lcRule.push(handleId(1356, 339, govList.value.find((e) => e.governmentId === list4[1].tacticsId)?.strategyName, `${preIds},99,1346,1356`, 3));
list4[2].tacticsSelectedStatus && lcRule.push(handleId(1352, 327, list4[2].tacticsSelectedStatus, `${preIds},99,1347,1352`, 1));
list4[2].tacticsId && lcRule.push(handleId(1357, 339, govList.value.find((e) => e.governmentId === list4[2].tacticsId)?.strategyName, `${preIds},99,1347,1357`, 3));
list4[3].tacticsSelectedStatus && lcRule.push(handleId(1353, 327, list4[3].tacticsSelectedStatus, `${preIds},99,1348,1353`, 1));
list4[3].tacticsId && lcRule.push(handleId(1358, 339, govList.value.find((e) => e.governmentId === list4[3].tacticsId)?.strategyName, `${preIds},99,1348,1358`, 3));
list4[4].tacticsSelectedStatus && lcRule.push(handleId(1354, 327, list4[4].tacticsSelectedStatus, `${preIds},99,1349,1354`, 1));
list4[4].tacticsId && lcRule.push(handleId(1359, 339, govList.value.find((e) => e.governmentId === list4[4].tacticsId)?.strategyName, `${preIds},99,1349,1359`, 3));
}
await addOperation({
@ -1024,6 +1237,12 @@ const addRecord = async (data: Record<string, any>) => {
lcJudgmentRuleReq: lcRule,
});
};
//
const preview = (strategyId: number, type: string) => {
curPreviewId.value = strategyId;
curPreview.value = type;
visible.value = true;
};
</script>
<style lang="scss" scoped>

@ -1,364 +0,0 @@
<template>
<!-- 政务 -->
<div class="c-auto">
<el-table class="c-table"
:data="form"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
<el-table-column prop="name"
label="政务黑名单指标"
min-width="100"
align="center">
</el-table-column>
<el-table-column label="进黑名单条件"
min-width="350"
align="center">
<template #default="{ row }">
<!-- 大病报销 || 贫困户 -->
<div v-if="row.stRecordId == 161 || row.stRecordId == 164"
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[row.span ? 1 : 0]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap">万元</span>
</div>
<!-- 大龄未婚 -->
<div v-else-if="row.stRecordId == 167"
class="flex items-center">
<template v-if="row.span">
<span class="whitespace-nowrap">且近一年</span>
<div class="w-[90px] ">
<el-select class="mx-2"
v-model="row.had">
<el-option value="有" />
<el-option value="无" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap">缴纳过社保或公积金</span>
</template>
<template v-else>
<span class="whitespace-nowrap">未婚且年龄</span>
<div class="w-[90px] ">
<el-select class="mx-2"
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap">,</span>
<el-select class="w-[80px] ml-2"
v-model="row.had">
<el-option value="有" />
<el-option value="无" />
</el-select>
<span class="ml-2 whitespace-nowrap">固定资产</span>
</template>
</div>
<span v-else>{{ '命中' + row.name }}</span>
</template>
</el-table-column>
<el-table-column label="本人命中进黑名单"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.personalHitBlacklist"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="配偶命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.mateHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="父母/子女命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.parentsHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="其他家庭成员命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.otherFamilyMembersHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="企业大股东命中拒入"
min-width="100"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.corporateMajorityHitRejected"
@change="e => checkRow(e, row)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="本人及亲属企业命中准入"
min-width="120"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.hitAccess"
@change="checkNone(row)"></el-checkbox>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex justify-end">
<div class="submit"
@click="submit">确认完成配置</div>
</div>
</template>
<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyGovernmentBlacklistFind, accessStrategyGovernmentBlacklistSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation, getOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const symbols: Array<Record<string, any>> = [
{
name: '>=',
},
{
name: '<',
},
{
name: '>',
},
{
name: '==',
},
{
name: '<=',
},
];
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(150);
const result = [];
process.map((e) => {
const cur = info.value.find((n) => n.stRecordId === e.id);
let num = cur?.ruleOne.match(/\d+/g);
let symbol = cur?.ruleOne.match(/[<>=]+/g);
let had = cur?.ruleOne.match(/[有无]+/g);
let temp = {
...getIds(),
name: e.name,
recordChildren: e.recordChildren,
isRule: isRule(e.id) ? 1 : 0,
corporateMajorityHitRejected: !!cur?.corporateMajorityHitRejected,
hitAccess: !!cur?.hitAccess,
mateHitRejected: !!cur?.mateHitRejected,
otherFamilyMembersHitRejected: !!cur?.otherFamilyMembersHitRejected,
parentsHitRejected: !!cur?.parentsHitRejected,
personalHitBlacklist: !!cur?.personalHitBlacklist,
symbol: isRule(e.id) && symbol?.length ? symbol[0] : '',
had: e.id === 167 && had?.length ? had[0] : '',
num: isRule(e.id) && num?.length ? num[0] : '',
ruleOne: '',
ruleTwo: '',
subjectId: e.subjectId,
stRecordId: e.id,
};
result.push(temp);
if (isRule(e.id)) {
temp = JSON.parse(JSON.stringify(temp));
temp.span = 1;
num = cur?.ruleTwo?.match(/\d+/g);
if (num?.length) temp.num = num[0];
symbol = cur?.ruleTwo?.match(/[<>=]+/g);
if (symbol?.length) temp.symbol = symbol[0];
if (e.id === 167) temp.had = cur?.ruleTwo;
result.push(temp);
}
});
form.value = result;
};
//
const getDetail = async () => {
try {
// const res = await getOperation({
// ...getIds(),
// checkpoint: levelId,
// parentId: '1,2,42,67,147,150',
// });
// cache.value = !!res.judgmentRuleReqs; //
const { data } = await accessStrategyGovernmentBlacklistFind();
info.value = data;
getConfig();
} finally {
}
};
watch(
() => route.query,
() => {
route.query.id === '150' && getDetail();
},
{
immediate: true,
},
);
// 3
const isRule = (rule: number): boolean => {
return rule === 161 || rule === 164 || rule === 167;
};
interface SpanMethodProps {
row: Record<string, any>;
column: TableColumnCtx<Record<string, any>>;
rowIndex: number;
columnIndex: number;
}
//
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
if (columnIndex === 0 || columnIndex === 2 || columnIndex === 3 || columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7) {
if (rowIndex === 4 || rowIndex === 6 || rowIndex === 8) {
return {
rowspan: 2,
colspan: 1,
};
} else if (rowIndex === 5 || rowIndex === 7 || rowIndex === 9) {
return {
rowspan: 0,
colspan: 0,
};
}
}
};
const checkRow = (e: boolean, row: Record<string, any>) => {
if (e) row.hitAccess = false;
};
const checkNone = (row: Record<string, any>) => {
if (row.hitAccess) {
row.corporateMajorityHitRejected = false;
row.mateHitRejected = false;
row.otherFamilyMembersHitRejected = false;
row.parentsHitRejected = false;
row.personalHitBlacklist = false;
}
};
//
const submit = async () => {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
e.corporateMajorityHitRejected = +e.corporateMajorityHitRejected;
e.hitAccess = +e.hitAccess;
e.mateHitRejected = +e.mateHitRejected;
e.otherFamilyMembersHitRejected = +e.otherFamilyMembersHitRejected;
e.parentsHitRejected = +e.parentsHitRejected;
e.personalHitBlacklist = +e.personalHitBlacklist;
if (e.stRecordId == 161 || e.stRecordId == 164) {
if (e.span) {
//
param[i - 1].ruleTwo = e.symbol + e.num;
} else {
e.ruleOne = e.symbol + e.num;
}
} else if (e.stRecordId == 167) {
if (e.span) {
//
param[i - 1].ruleTwo = e.had;
} else {
e.ruleOne = e.symbol + e.num + ',' + e.had;
}
}
});
param = param.filter((e) => !e.span);
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
delete e.had;
delete e.name;
delete e.symbol;
delete e.num;
});
await accessStrategyGovernmentBlacklistSave({ governmentBlacklistList: param });
addRecord(recordParam);
getDetail();
ElMessage.success('提交成功!');
};
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${Cookies.get('sand-level')},42,67,147,150`; // 1id
const rule = [];
data.map((e, i) => {
const temp = [];
e.personalHitBlacklist && temp.push(300);
e.mateHitRejected && temp.push(301);
e.parentsHitRejected && temp.push(302);
e.otherFamilyMembersHitRejected && temp.push(303);
e.corporateMajorityHitRejected && temp.push(304);
e.hitAccess && temp.push(757);
if (isRule(e.stRecordId)) {
const len = e?.recordChildren?.length - 1;
e?.recordChildren.map((n, j) => {
if (j !== len) {
if (n.id === 169 && e.had) {
rule.push(handleId(n.id, n.subjectId, e.had === '有' ? 387 : 388, preIds + ',' + e.stRecordId + ',' + n.id, 1));
} else if (n.id === 168) {
const val = e.symbol + e.num;
val && rule.push(handleId(n.id, n.subjectId, val, preIds + ',' + e.stRecordId + ',' + n.id, 5));
} else if (n.id === 170 && e.had) {
rule.push(handleId(n.id, n.subjectId, e.had === '有' ? 389 : 390, preIds + ',' + e.stRecordId + ',' + n.id, 1));
} else {
const val = j ? (n.id === 168 ? e.symbol + e.num : e.ruleTwo) : e.ruleOne;
val && rule.push(handleId(n.id, n.subjectId, val, preIds + ',' + e.stRecordId + ',' + n.id, 5));
}
} else if (temp.length) {
rule.push(handleId(n.id, 71, temp.join(), preIds + ',' + e.stRecordId + ',' + n.id, 1));
}
});
} else {
temp.length && rule.push(handleId(e.stRecordId, 71, temp.join(), preIds + ',' + e.stRecordId, 1));
}
});
await addOperation({
...getIds(),
parentId: preIds,
lcJudgmentRuleReq: rule,
});
};
</script>
<style lang="scss" scoped>
@import url(../../../styles/form.scss);
</style>

@ -9,12 +9,12 @@
placeholder="请输入20以内字符"
maxlength="20"
clearable
v-model="name"></el-input>
v-model="strategyName"></el-input>
</el-form-item>
<el-form-item label="策略规则">
<el-table class="c-table"
:data="form"
max-height="calc(100vh - 230px)"
:max-height="'calc(100vh - ' + (disabled ? 190 : 230) + 'px)'"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
@ -138,7 +138,8 @@
</el-table>
</el-form-item>
</el-form>
<div class="flex justify-end mt-3">
<div v-if="!disabled"
class="flex justify-end mt-3">
<div class="dia-btn cancel"
@click="emit('close')">取消</div>
<div class="dia-btn"
@ -150,7 +151,7 @@
</template>
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, computed } from 'vue';
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyGovernmentBlacklistFind, accessStrategyGovernmentBlacklistSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
@ -162,10 +163,12 @@ const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.
const props = defineProps({
disabled: { type: Boolean, default: false },
row: { type: Object },
});
const emit = defineEmits(['clsoe']);
const form = ref<Record<string, any>[]>([]);
const name = ref<string>();
const { governmentId, strategyName } = toRefs(props.row);
const info = ref<Record<string, any>[]>([]);
const symbols: Array<Record<string, any>> = [
{
@ -231,8 +234,12 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyGovernmentBlacklistFind();
info.value = data;
if (governmentId.value) {
const { data } = await accessStrategyGovernmentBlacklistFind({
governmentId: governmentId.value,
});
info.value = data;
}
getConfig();
} finally {
}
@ -325,7 +332,7 @@ const addRecord = async (data: Record<string, any>) => {
emit('close', 1);
};
//
const submit = async () => {
const submit = async (synchronizeUpdate?: number) => {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
@ -360,7 +367,13 @@ const submit = async () => {
delete e.symbol;
delete e.num;
});
await accessStrategyGovernmentBlacklistSave({ governmentBlacklistList: param });
await accessStrategyGovernmentBlacklistSave({
...getIds(),
governmentId: governmentId.value,
strategyName: strategyName.value,
synchronizeUpdate,
governmentBlacklistList: param,
});
addRecord(recordParam);
};
</script>

@ -1,7 +1,7 @@
<template>
<div class="block">
<div class="flex justify-between items-center mb-5">
<search v-model="params.fundName"
<search v-model="keyWord"
@change="initList"></search>
<div class="filter">
<el-popconfirm title="确定要删除吗?"
@ -37,23 +37,23 @@
type="index"
width="60"
align="center" />
<el-table-column prop="fundCode"
<el-table-column prop="strategyName"
label="政务黑名单策略名称"
min-width="100" />
<el-table-column prop="operationTime"
min-width="180" />
<el-table-column prop="createTime"
label="新增日期"
width="140" />
min-width="140" />
<el-table-column label="操作"
width="140">
<template #default="{ row }">
<el-button type="text"
@click="toDetail(`/product/fund/detail`, row.id)"
@click="toDetail(row, true)"
size="small">查看</el-button>
<el-button type="text"
@click="toDetail(`/product/fund/detail`, row.id)"
@click="toDetail(row)"
size="small">编辑</el-button>
<el-popconfirm title="您确定删除吗?"
@confirm.stop="handleDelete(row.id)">
@confirm.stop="handleDelete([row.governmentId])">
<template #reference>
<el-button type="text"
size="small">删除</el-button>
@ -73,32 +73,27 @@
class="px-3 py-2 justify-end"></el-pagination>
<el-drawer v-model="visible"
title="新增政务黑名单策略"
:title="(isDetail ? '查看' : curRow.governmentId ? '编辑' : '新增') + '政务黑名单策略'"
size="100%"
custom-class="model-drawer">
<Detail :disabled="false"
<Detail v-model:row="curRow"
:disabled="isDetail"
:key="i"
@close="closeDrawer" />
</el-drawer>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref, reactive, defineAsyncComponent } from 'vue';
import { onMounted, ref, watch, defineAsyncComponent } from 'vue';
import { ElMessage } from 'element-plus';
import { Delete } from '@element-plus/icons-vue';
import { pageSizes, pageLayout, toParams, getIds } from '@/utils/common';
import { fundProductList, batchDeletion } from '@/api/fund';
import { pageSizes, pageLayout } from '@/utils/common';
import { accessStrategyGovernmentBlacklistList, accessStrategyGovernmentBlacklistDel } from '@/api/model';
import Search from '@/components/Search.vue';
import { useRouter, useRoute } from 'vue-router';
const Detail = defineAsyncComponent(() => import('./Detail.vue'));
const router = useRouter();
const route = useRoute();
const params = reactive({
...getIds(),
createDateSort: '',
fundName: '',
});
const keyWord = ref<string>();
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0);
@ -108,13 +103,19 @@ const multipleSelection = ref<Record<string, any>[]>([]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const visible = ref<boolean>(false);
const curRow = ref<Record<string, any>>({
governmentId: '',
strategyName: '',
});
const isDetail = ref<boolean>(false);
const i = ref<number>(0);
//
const getList = async () => {
loading.value = true;
try {
const { data } = await fundProductList({ pageNum: currentPage.value, pageSize: pageSize.value, ...toParams(params) });
list.value = data.data.records;
total.value = data.data.total;
const { page } = await accessStrategyGovernmentBlacklistList({ pageNum: currentPage.value, pageSize: pageSize.value, keyWord: keyWord.value });
list.value = page.records;
total.value = page.total;
} finally {
loading.value = false;
}
@ -124,9 +125,8 @@ const initList = async () => {
currentPage.value = 1;
getList();
};
onMounted(() => {
getList();
});
watch(keyWord, initList);
onMounted(getList);
//
const handleSelectionChange = (val: Record<string, any>[]) => {
@ -134,23 +134,32 @@ const handleSelectionChange = (val: Record<string, any>[]) => {
};
//
const delAll = async () => {
// handleDelete(multipleSelection.value);
handleDelete(multipleSelection.value.map((e) => e.governmentId));
};
//
const toAdd = () => {
i.value++;
isDetail.value = false;
curRow.value = {
governmentId: '',
strategyName: '',
};
visible.value = true;
};
//
const toDetail = async (path: string, id: number) => {
router.push(`${path}?id=${id}&name=${params.fundName}`);
const toDetail = async (row: Record<string, any>, detail: boolean = false) => {
i.value++;
isDetail.value = detail;
curRow.value = row;
visible.value = true;
};
//
const closeDrawer = (refresh?: number) => {
visible.value = false;
refresh && initList();
};
const handleDelete = async (id: number) => {
await batchDeletion([id]);
const handleDelete = async (ids: number[]) => {
await accessStrategyGovernmentBlacklistDel({ ids });
getList();
ElMessage.success('删除成功!');
};

@ -1,271 +0,0 @@
<template>
<!-- 征信 -->
<el-table class="c-table"
:data="form"
:cell-style="{background:'#fff'}"
max-height="calc(100vh - 230px)"
border>
<el-table-column prop="name"
label="征信黑名单指标"
min-width="220"
align="center">
</el-table-column>
<el-table-column label="进黑名单条件"
width="700"
align="center">
<template #default="{ row }">
<!-- 贷记卡账户状态 -->
<div v-if="row.stRecordId == 204"
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.name }}</span>
<el-input class="w-[150px] mx-2"
placeholder="请输入"
v-model="row.ruleOne"></el-input>
<span class="whitespace-nowrap">的信用卡</span>
</div>
<!-- 贷记卡审批通过率 -->
<div v-else-if="isRule(row.stRecordId)"
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span v-if="row.recordChildren"
class="ml-2 whitespace-nowrap">{{ row?.recordChildren[1]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol1">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num1"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<div v-else-if="row.stRecordId == 230 || row.stRecordId == 231"
class="flex">
<el-select class="w-[85px] ml-2"
clearable
v-model="row.ruleOne">
<el-option value="有" />
<el-option value="无" />
</el-select>
</div>
<div v-else
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap">{{ row.stRecordId === 203 || row.stRecordId === 205 ? '元' : row.stRecordId === 207 || row.stRecordId === 229 ? '万元' : ' ' }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="本人命中是否进黑名单"
min-width="160"
align="center">
<template #default="{ row }">
<el-radio-group v-model="row.hitTheBlacklist">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="配偶命中是否拒入"
min-width="160"
align="center">
<template #default="{ row }">
<el-radio-group v-model="row.mateRejectedStandardIdentity">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
</el-table>
<div class="flex justify-end">
<div class="submit"
@click="submit">确认完成配置</div>
</div>
</template>
<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyCreditBlacklistFind, accessStrategyCreditBlacklistSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const whethers: Record<string, any>[] = [
{
id: 345,
name: '是',
},
{
id: 346,
name: '否',
},
];
const symbols: Array<Record<string, any>> = [
{
name: '>=',
},
{
name: '<',
},
{
name: '>',
},
{
name: '==',
},
{
name: '<=',
},
];
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(151);
const result = [];
process.map((e) => {
const cur = info.value.find((n) => n.stRecordId === e.id);
let num = cur?.ruleOne?.match(/\d+/g);
let num1 = cur?.ruleTwo?.match(/\d+/g);
let symbol = cur?.ruleOne?.match(/[<>=]+/g);
let symbol1 = cur?.ruleTwo?.match(/[<>=]+/g);
let temp = {
...getIds(),
name: e.name,
recordChildren: e.recordChildren,
hitTheBlacklist: cur?.hitTheBlacklist,
mateRejectedStandardIdentity: cur?.mateRejectedStandardIdentity,
symbol: symbol?.length ? symbol[0] : '',
symbol1: symbol1?.length ? symbol1[0] : '',
num: num?.length ? num[0] : '',
num1: num1?.length ? num1[0] : '',
ruleOne: e.id === 204 || e.id === 230 || e.id === 231 ? cur?.ruleOne : '',
ruleTwo: '',
subjectId: e.subjectId,
stRecordId: e.id,
};
result.push(temp);
});
form.value = result;
};
//
const getDetail = async () => {
try {
const { data } = await accessStrategyCreditBlacklistFind();
info.value = data;
getConfig();
} finally {
}
};
watch(
() => route.query,
() => {
route.query.id === '151' && getDetail();
},
{
immediate: true,
},
);
const isRule = (rule: number): boolean => {
return rule === 208 || (rule > 215 && rule < 222) || rule === 226;
};
//
const submit = async () => {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
e.ruleOne = e.symbol + e.num;
if (isRule(e.stRecordId)) {
e.ruleTwo = e.symbol1 + e.num1;
}
}
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await accessStrategyCreditBlacklistSave({ creditBlacklistList: param });
addRecord(recordParam);
getDetail();
ElMessage.success('提交成功!');
};
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${Cookies.get('sand-level')},42,67,147,151`; // 1id
const rule = [];
data[1].ruleOne && rule.push(handleId(234, 81, data[1].ruleOne, preIds + ',204,234', 3));
data[27].ruleOne && rule.push(handleId(267, 114, data[27].ruleOne === '有' ? 306 : 305, preIds + ',230,267', 1));
data[28].ruleOne && rule.push(handleId(268, 115, data[28].ruleOne === '有' ? 308 : 307, preIds + ',231,268', 1));
data.map((e, i) => {
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
const len = e?.recordChildren?.length - 1;
e?.recordChildren.map((n, j) => {
const val = j ? e.ruleTwo : e.ruleOne;
j !== len && val && rule.push(handleId(n.id, n.subjectId, val, preIds + ',' + e.stRecordId + ',' + n.id, 5));
});
}
//
e.hitTheBlacklist && rule.push(handleId(1245, 140, e.hitTheBlacklist, preIds + ',' + e.stRecordId + ',1245', 1));
e.mateRejectedStandardIdentity && rule.push(handleId(274, 140, e.mateRejectedStandardIdentity, preIds + ',' + e.stRecordId + ',274', 1));
});
await addOperation({
...getIds(),
parentId: preIds,
lcJudgmentRuleReq: rule,
});
};
</script>
<style lang="scss" scoped>
@import url(../../../styles/form.scss);
.c-table {
:deep(.el-input__inner) {
@apply px-2;
}
}
</style>

@ -0,0 +1,300 @@
<template>
<el-form label-width="90px"
label-suffix=":"
class="form"
:disabled="disabled">
<el-form-item label="策略名称"
prop="fundName">
<el-input class="w-[320px]"
placeholder="请输入20以内字符"
maxlength="20"
clearable
v-model="strategyName"></el-input>
</el-form-item>
<el-form-item label="策略规则">
<el-table class="c-table"
:data="form"
:cell-style="{background:'#fff'}"
max-height="calc(100vh - 230px)"
border>
<el-table-column prop="name"
label="征信黑名单指标"
min-width="220"
align="center">
</el-table-column>
<el-table-column label="进黑名单条件"
width="700"
align="center">
<template #default="{ row }">
<!-- 贷记卡账户状态 -->
<div v-if="row.stRecordId == 204"
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.name }}</span>
<el-input class="w-[150px] mx-2"
placeholder="请输入"
v-model="row.ruleOne"></el-input>
<span class="whitespace-nowrap">的信用卡</span>
</div>
<!-- 贷记卡审批通过率 -->
<div v-else-if="isRule(row.stRecordId)"
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span v-if="row.recordChildren"
class="ml-2 whitespace-nowrap">{{ row?.recordChildren[1]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol1">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num1"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<div v-else-if="row.stRecordId == 230 || row.stRecordId == 231"
class="flex">
<el-select class="w-[85px] ml-2"
clearable
v-model="row.ruleOne">
<el-option value="有" />
<el-option value="无" />
</el-select>
</div>
<div v-else
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap">{{ row.stRecordId === 203 || row.stRecordId === 205 ? '元' : row.stRecordId === 207 || row.stRecordId === 229 ? '万元' : ' ' }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="本人命中是否进黑名单"
min-width="160"
align="center">
<template #default="{ row }">
<el-radio-group v-model="row.hitTheBlacklist">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column label="配偶命中是否拒入"
min-width="160"
align="center">
<template #default="{ row }">
<el-radio-group v-model="row.mateRejectedStandardIdentity">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<div v-if="!disabled"
class="flex justify-end mt-3">
<div class="dia-btn cancel"
@click="emit('close')">取消</div>
<div class="dia-btn"
@click="syncVisible = true">确定</div>
</div>
<Confirm v-model="syncVisible"
@submit="submit" />
</template>
<script setup lang="ts">
import { ref, toRefs, onMounted, defineAsyncComponent } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyCreditBlacklistFind, accessStrategyCreditBlacklistSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
const props = defineProps({
disabled: { type: Boolean, default: false },
row: { type: Object },
});
const emit = defineEmits(['clsoe']);
const form = ref<Record<string, any>[]>([]);
const { creditId, strategyName } = toRefs(props.row);
const info = ref<Record<string, any>[]>([]);
const whethers: Record<string, any>[] = [
{
id: 345,
name: '是',
},
{
id: 346,
name: '否',
},
];
const symbols: Array<Record<string, any>> = [
{
name: '>=',
},
{
name: '<',
},
{
name: '>',
},
{
name: '==',
},
{
name: '<=',
},
];
const syncVisible = ref<boolean>(false);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(151);
const result = [];
process.map((e) => {
const cur = info.value.find((n) => n.stRecordId === e.id);
let num = cur?.ruleOne?.match(/\d+/g);
let num1 = cur?.ruleTwo?.match(/\d+/g);
let symbol = cur?.ruleOne?.match(/[<>=]+/g);
let symbol1 = cur?.ruleTwo?.match(/[<>=]+/g);
let temp = {
...getIds(),
name: e.name,
recordChildren: e.recordChildren,
hitTheBlacklist: cur?.hitTheBlacklist,
mateRejectedStandardIdentity: cur?.mateRejectedStandardIdentity,
symbol: symbol?.length ? symbol[0] : '',
symbol1: symbol1?.length ? symbol1[0] : '',
num: num?.length ? num[0] : '',
num1: num1?.length ? num1[0] : '',
ruleOne: e.id === 204 || e.id === 230 || e.id === 231 ? cur?.ruleOne : '',
ruleTwo: '',
subjectId: e.subjectId,
stRecordId: e.id,
};
result.push(temp);
});
form.value = result;
};
//
const getDetail = async () => {
try {
if (creditId.value) {
const { data } = await accessStrategyCreditBlacklistFind({
creditId: creditId.value,
});
info.value = data;
}
getConfig();
} finally {
}
};
onMounted(getDetail);
const isRule = (rule: number): boolean => {
return rule === 208 || (rule > 215 && rule < 222) || rule === 226;
};
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${Cookies.get('sand-level')},42,67,147,151`; // 1id
const rule = [];
data[1].ruleOne && rule.push(handleId(234, 81, data[1].ruleOne, preIds + ',204,234', 3));
data[27].ruleOne && rule.push(handleId(267, 114, data[27].ruleOne === '有' ? 306 : 305, preIds + ',230,267', 1));
data[28].ruleOne && rule.push(handleId(268, 115, data[28].ruleOne === '有' ? 308 : 307, preIds + ',231,268', 1));
data.map((e, i) => {
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
const len = e?.recordChildren?.length - 1;
e?.recordChildren.map((n, j) => {
const val = j ? e.ruleTwo : e.ruleOne;
j !== len && val && rule.push(handleId(n.id, n.subjectId, val, preIds + ',' + e.stRecordId + ',' + n.id, 5));
});
}
//
e.hitTheBlacklist && rule.push(handleId(1245, 140, e.hitTheBlacklist, preIds + ',' + e.stRecordId + ',1245', 1));
e.mateRejectedStandardIdentity && rule.push(handleId(274, 140, e.mateRejectedStandardIdentity, preIds + ',' + e.stRecordId + ',274', 1));
});
await addOperation({
...getIds(),
parentId: preIds,
lcJudgmentRuleReq: rule,
});
ElMessage.success('提交成功!');
syncVisible.value = false;
emit('close', 1);
};
//
const submit = async (synchronizeUpdate?: number) => {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e, i) => {
if (info.value.length) e.id = info.value.find((n) => n.stRecordId === e.stRecordId)?.id;
if (e.stRecordId != 204 && e.stRecordId != 230 && e.stRecordId != 231) {
e.ruleOne = e.symbol + e.num;
if (isRule(e.stRecordId)) {
e.ruleTwo = e.symbol1 + e.num1;
}
}
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await accessStrategyCreditBlacklistSave({
...getIds(),
creditId: creditId.value,
strategyName: strategyName.value,
synchronizeUpdate,
creditBlacklistList: param,
});
addRecord(recordParam);
};
</script>
<style lang="scss" scoped>
@import url(../../../../styles/form.scss);
.c-table {
:deep(.el-input__inner) {
@apply px-2;
}
}
</style>

@ -0,0 +1,166 @@
<template>
<div class="block">
<div class="flex justify-between items-center mb-5">
<search v-model="keyWord"
@change="initList"></search>
<div class="filter">
<el-popconfirm title="确定要删除吗?"
:disabled="!multipleSelection.length"
@confirm.stop="delAll">
<template #reference>
<div :class="['add-btn mr-2', {'cursor-not-allowed': !multipleSelection.length}]">
<el-icon :size="24"
color="#fff">
<Delete />
</el-icon>
批量删除
</div>
</template>
</el-popconfirm>
<div class="add-btn"
@click="toAdd">
<img src="@/assets/images/plus.png"
alt=""
class="icon" />
新增
</div>
</div>
</div>
<el-table ref="table"
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55" />
<el-table-column label="序号"
type="index"
width="60"
align="center" />
<el-table-column prop="strategyName"
label="征信黑名单策略名称"
min-width="180" />
<el-table-column prop="createTime"
label="新增日期"
min-width="140" />
<el-table-column label="操作"
width="140">
<template #default="{ row }">
<el-button type="text"
@click="toDetail(row, true)"
size="small">查看</el-button>
<el-button type="text"
@click="toDetail(row)"
size="small">编辑</el-button>
<el-popconfirm title="您确定删除吗?"
@confirm.stop="handleDelete([row.creditId])">
<template #reference>
<el-button type="text"
size="small">删除</el-button>
</template>
</el-popconfirm>
</template></el-table-column>
</el-table>
<el-pagination v-model:currentPage="currentPage"
v-model:pageSize="pageSize"
:total="total"
:page-sizes="pageSizes"
:layout="pageLayout"
@size-change="getList()"
@current-change="getList()"
small
background
class="px-3 py-2 justify-end"></el-pagination>
<el-drawer v-model="visible"
:title="(isDetail ? '查看' : curRow.governmentId ? '编辑' : '新增') + '征信黑名单策略'"
size="100%"
custom-class="model-drawer">
<Detail v-model:row="curRow"
:disabled="isDetail"
:key="i"
@close="closeDrawer" />
</el-drawer>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref, watch, defineAsyncComponent } from 'vue';
import { ElMessage } from 'element-plus';
import { Delete } from '@element-plus/icons-vue';
import { pageSizes, pageLayout } from '@/utils/common';
import { accessStrategyCreditBlacklist, accessStrategyCreditBlacklistDel } from '@/api/model';
import Search from '@/components/Search.vue';
const Detail = defineAsyncComponent(() => import('./Detail.vue'));
const keyWord = ref<string>();
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0);
const table = ref<any>();
const multipleSelection = ref<Record<string, any>[]>([]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const visible = ref<boolean>(false);
const curRow = ref<Record<string, any>>({
creditId: '',
strategyName: '',
});
const isDetail = ref<boolean>(false);
const i = ref<number>(0);
//
const getList = async () => {
loading.value = true;
try {
const { page } = await accessStrategyCreditBlacklist({ pageNum: currentPage.value, pageSize: pageSize.value, keyWord: keyWord.value });
list.value = page.records;
total.value = page.total;
} finally {
loading.value = false;
}
};
//
const initList = async () => {
currentPage.value = 1;
getList();
};
watch(keyWord, initList);
onMounted(getList);
//
const handleSelectionChange = (val: Record<string, any>[]) => {
multipleSelection.value = val;
};
//
const delAll = async () => {
handleDelete(multipleSelection.value.map((e) => e.creditId));
};
//
const toAdd = () => {
i.value++;
isDetail.value = false;
curRow.value = {
creditId: '',
strategyName: '',
};
visible.value = true;
};
//
const toDetail = async (row: Record<string, any>, detail: boolean = false) => {
i.value++;
isDetail.value = detail;
curRow.value = row;
visible.value = true;
};
//
const closeDrawer = (refresh?: number) => {
visible.value = false;
refresh && initList();
};
const handleDelete = async (ids: number[]) => {
await accessStrategyCreditBlacklistDel({ ids });
getList();
ElMessage.success('删除成功!');
};
</script>

@ -1,171 +1,190 @@
<template>
<!-- 商采 -->
<el-table class="c-table"
:data="form"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
<el-table-column prop="name"
label="数据源"
min-width="100"
align="center">
</el-table-column>
<el-table-column prop="rule"
label="商采黑名单指标"
min-width="150">
</el-table-column>
<el-table-column label="进黑名单条件"
width="540">
<template #default="{ row,$index }">
<div v-if="$index < 4"
class="flex items-center">
<span class="whitespace-nowrap">{{ row.rule }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<template v-else-if="$index > 3 && $index < 14 || $index === 16 || $index === 17 || $index === 19 || $index === 28">命中{{ row.rule }}</template>
<!-- 腾讯 -->
<div v-else-if="$index === 14"
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.recordChildren[0]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
<div class="w-[120px] ">
<el-select class="mx-2"
clearable
v-model="row.had">
<el-option v-for="item in house"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<div v-else-if="$index === 15"
class="flex items-center">
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in units"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap">内申请次数</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol1">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num1"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
<div class="w-[120px] ">
<el-select class="mx-2"
clearable
v-model="row.had">
<el-option v-for="item in house"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<div v-else-if="$index === 18"
class="w-[95px] ">
<el-select v-if="row.recordChildren"
clearable
v-model="row.symbol">
<el-option v-for="item in row?.recordChildren[0]?.subject?.itemList"
:key="item"
:label="item.options"
:value="item.options" />
</el-select>
</div>
<div v-else-if="$index > 19 && $index < 28"
class="flex items-center">
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in units"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap">{{tdNames[row.ruleId]}}</span>
<template v-if="row.ruleId === 350">
<div class="w-[95px] ">
<el-select class="mx-2"
<el-form label-width="90px"
label-suffix=":"
class="form"
:disabled="disabled">
<el-form-item label="策略名称"
prop="fundName">
<el-input class="w-[320px]"
placeholder="请输入20以内字符"
maxlength="20"
clearable
v-model="strategyName"></el-input>
</el-form-item>
<el-form-item label="策略规则">
<el-table class="c-table"
:data="form"
max-height="calc(100vh - 230px)"
:cell-style="{background:'#fff'}"
:span-method="span"
border>
<el-table-column prop="name"
label="数据源"
min-width="100"
align="center">
</el-table-column>
<el-table-column prop="rule"
label="商采黑名单指标"
min-width="150">
</el-table-column>
<el-table-column label="进黑名单条件"
width="540">
<template #default="{ row,$index }">
<div v-if="$index < 4"
class="flex items-center">
<span class="whitespace-nowrap">{{ row.rule }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<template v-else-if="$index > 3 && $index < 14 || $index === 16 || $index === 17 || $index === 19 || $index === 28">命中{{ row.rule }}</template>
<!-- 腾讯 -->
<div v-else-if="$index === 14"
class="flex items-center">
<span v-if="row.recordChildren"
class="whitespace-nowrap">{{ row?.recordChildren[0]?.recordChildren[0]?.name }}</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
<div class="w-[120px] ">
<el-select class="mx-2"
clearable
v-model="row.had">
<el-option v-for="item in house"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<div v-else-if="$index === 15"
class="flex items-center">
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in units"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap">内申请次数</span>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol1">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num1"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
<div class="w-[120px] ">
<el-select class="mx-2"
clearable
v-model="row.had">
<el-option v-for="item in house"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap"></span>
</div>
<div v-else-if="$index === 18"
class="w-[95px] ">
<el-select v-if="row.recordChildren"
clearable
v-model="row.symbol1">
<el-option v-for="item in symbols"
v-model="row.symbol">
<el-option v-for="item in row?.recordChildren[0]?.subject?.itemList"
:key="item"
:label="item.name"
:value="item.name" />
:label="item.options"
:value="item.options" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num1"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
<div v-else-if="$index > 19 && $index < 28"
class="flex items-center">
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num"></el-input>
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol">
<el-option v-for="item in units"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<span class="ml-2 whitespace-nowrap">{{tdNames[row.ruleId]}}</span>
<template v-if="row.ruleId === 350">
<div class="w-[95px] ">
<el-select class="mx-2"
clearable
v-model="row.symbol1">
<el-option v-for="item in symbols"
:key="item"
:label="item.name"
:value="item.name" />
</el-select>
</div>
<el-input class="w-[80px]"
placeholder="请输入"
v-model="row.num1"></el-input>
<span class="ml-2 whitespace-nowrap"></span>
</template>
</div>
</template>
</div>
</template>
</el-table-column>
</el-table>
<div class="flex justify-end">
<div class="submit"
@click="submit">确认完成配置</div>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<div v-if="!disabled"
class="flex justify-end mt-3">
<div class="dia-btn cancel"
@click="emit('close')">取消</div>
<div class="dia-btn"
@click="syncVisible = true">确定</div>
</div>
<Confirm v-model="syncVisible"
@submit="submit" />
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
import { ref, defineAsyncComponent, onMounted, toRefs } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyBusinessBlacklistFind, accessStrategyBusinessBlacklistSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
@ -174,9 +193,16 @@ import { useRouter, useRoute } from 'vue-router';
import { handleId, getNum, getSymbol, getChinese, getIds } from '@/utils/common';
import Cookies from 'js-cookie';
const router = useRouter();
const route = useRoute();
const Confirm = defineAsyncComponent(() => import('@/components/StrategyConfirm.vue'));
const props = defineProps({
disabled: { type: Boolean, default: false },
row: { type: Object },
});
const emit = defineEmits(['clsoe']);
const form = ref<Record<string, any>[]>([]);
const { businessId, strategyName } = toRefs(props.row);
const info = ref<Record<string, any>[]>([]);
const spanRows = [1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27];
const symbols: Array<Record<string, any>> = [
@ -227,6 +253,7 @@ const tdNames: Record<string, any> = {
350: '内身份证或手机号申请次数',
351: '内同一个设备或手机号申请被拒次数过多。',
};
const syncVisible = ref<boolean>(false);
//
const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(152);
@ -325,22 +352,18 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
const { data } = await accessStrategyBusinessBlacklistFind();
info.value = data;
if (businessId.value) {
const { data } = await accessStrategyBusinessBlacklistFind({
businessId: businessId.value,
});
info.value = data;
}
getConfig();
} finally {
}
};
watch(
() => route.query,
() => {
route.query.id === '152' && getDetail();
},
{
immediate: true,
},
);
onMounted(getDetail);
interface SpanMethodProps {
row: Record<string, any>;
@ -379,45 +402,6 @@ const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => {
}
}
};
//
const submit = async () => {
let param = [
{
id: info.value.find((n) => n.stRecordId === 318)?.id,
stRecordId: 318,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].symbol + form.value[1].num,
ruleThree: form.value[2].symbol + form.value[2].num,
ruleFour: form.value[3].symbol + form.value[3].num,
},
{
id: info.value.find((n) => n.stRecordId === 320)?.id,
stRecordId: 320,
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num + ',' + form.value[14].had,
ruleTwo: form.value[15].num + form.value[15].symbol + ',' + form.value[15].symbol1 + form.value[15].num1 + ',' + form.value[15].had,
},
{
id: info.value.find((n) => n.stRecordId === 322)?.id,
stRecordId: 322,
...getIds(),
ruleOne: form.value[18].symbol,
ruleTwo: form.value[20].num + form.value[20].symbol,
ruleThree: form.value[21].num + form.value[21].symbol,
ruleFour: form.value[22].num + form.value[22].symbol,
ruleFive: form.value[23].num + form.value[23].symbol,
ruleSix: form.value[24].num + form.value[24].symbol,
ruleSeven: form.value[25].num + form.value[25].symbol,
ruleEight: form.value[26].num + form.value[26].symbol + ',' + form.value[26].symbol1 + form.value[26].num1,
ruleNine: form.value[27].num + form.value[27].symbol,
},
];
await accessStrategyBusinessBlacklistSave({ businessBlacklistList: param });
addRecord(param);
getDetail();
ElMessage.success('提交成功!');
};
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${Cookies.get('sand-level')},42,67,147,152`; // 1id
@ -461,14 +445,55 @@ const addRecord = async (data: Record<string, any>) => {
parentId: preIds,
lcJudgmentRuleReq: rule,
});
ElMessage.success('提交成功!');
syncVisible.value = false;
emit('close', 1);
};
//
const submit = async (synchronizeUpdate?: number) => {
let param = [
{
id: info.value.find((n) => n.stRecordId === 318)?.id,
stRecordId: 318,
...getIds(),
ruleOne: form.value[0].symbol + form.value[0].num,
ruleTwo: form.value[1].symbol + form.value[1].num,
ruleThree: form.value[2].symbol + form.value[2].num,
ruleFour: form.value[3].symbol + form.value[3].num,
},
{
id: info.value.find((n) => n.stRecordId === 320)?.id,
stRecordId: 320,
...getIds(),
ruleOne: form.value[14].symbol + form.value[14].num + ',' + form.value[14].had,
ruleTwo: form.value[15].num + form.value[15].symbol + ',' + form.value[15].symbol1 + form.value[15].num1 + ',' + form.value[15].had,
},
{
id: info.value.find((n) => n.stRecordId === 322)?.id,
stRecordId: 322,
...getIds(),
ruleOne: form.value[18].symbol,
ruleTwo: form.value[20].num + form.value[20].symbol,
ruleThree: form.value[21].num + form.value[21].symbol,
ruleFour: form.value[22].num + form.value[22].symbol,
ruleFive: form.value[23].num + form.value[23].symbol,
ruleSix: form.value[24].num + form.value[24].symbol,
ruleSeven: form.value[25].num + form.value[25].symbol,
ruleEight: form.value[26].num + form.value[26].symbol + ',' + form.value[26].symbol1 + form.value[26].num1,
ruleNine: form.value[27].num + form.value[27].symbol,
},
];
await accessStrategyBusinessBlacklistSave({
...getIds(),
businessId: businessId.value,
strategyName: strategyName.value,
synchronizeUpdate,
businessBlacklistList: param,
});
addRecord(param);
};
</script>
<style lang="scss" scoped>
@import url(../../../styles/form.scss);
.c-table {
:deep(.el-input__inner) {
@apply px-2;
}
}
@import url(../../../../styles/form.scss);
</style>

@ -0,0 +1,166 @@
<template>
<div class="block">
<div class="flex justify-between items-center mb-5">
<search v-model="keyWord"
@change="initList"></search>
<div class="filter">
<el-popconfirm title="确定要删除吗?"
:disabled="!multipleSelection.length"
@confirm.stop="delAll">
<template #reference>
<div :class="['add-btn mr-2', {'cursor-not-allowed': !multipleSelection.length}]">
<el-icon :size="24"
color="#fff">
<Delete />
</el-icon>
批量删除
</div>
</template>
</el-popconfirm>
<div class="add-btn"
@click="toAdd">
<img src="@/assets/images/plus.png"
alt=""
class="icon" />
新增
</div>
</div>
</div>
<el-table ref="table"
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55" />
<el-table-column label="序号"
type="index"
width="60"
align="center" />
<el-table-column prop="strategyName"
label="商采黑名单策略名称"
min-width="180" />
<el-table-column prop="createTime"
label="新增日期"
min-width="140" />
<el-table-column label="操作"
width="140">
<template #default="{ row }">
<el-button type="text"
@click="toDetail(row, true)"
size="small">查看</el-button>
<el-button type="text"
@click="toDetail(row)"
size="small">编辑</el-button>
<el-popconfirm title="您确定删除吗?"
@confirm.stop="handleDelete([row.businessId])">
<template #reference>
<el-button type="text"
size="small">删除</el-button>
</template>
</el-popconfirm>
</template></el-table-column>
</el-table>
<el-pagination v-model:currentPage="currentPage"
v-model:pageSize="pageSize"
:total="total"
:page-sizes="pageSizes"
:layout="pageLayout"
@size-change="getList()"
@current-change="getList()"
small
background
class="px-3 py-2 justify-end"></el-pagination>
<el-drawer v-model="visible"
:title="(isDetail ? '查看' : curRow.businessId ? '编辑' : '新增') + '商采黑名单策略'"
size="100%"
custom-class="model-drawer">
<Detail v-model:row="curRow"
:disabled="isDetail"
:key="i"
@close="closeDrawer" />
</el-drawer>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref, watch, defineAsyncComponent } from 'vue';
import { ElMessage } from 'element-plus';
import { Delete } from '@element-plus/icons-vue';
import { pageSizes, pageLayout } from '@/utils/common';
import { accessStrategyBusinessBlacklist, accessStrategyBusinessBlacklistDel } from '@/api/model';
import Search from '@/components/Search.vue';
const Detail = defineAsyncComponent(() => import('./Detail.vue'));
const keyWord = ref<string>();
const currentPage = ref<number>(1);
const pageSize = ref<number>(10);
const total = ref<number>(0);
const table = ref<any>();
const multipleSelection = ref<Record<string, any>[]>([]);
const list = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const visible = ref<boolean>(false);
const curRow = ref<Record<string, any>>({
businessId: '',
strategyName: '',
});
const isDetail = ref<boolean>(false);
const i = ref<number>(0);
//
const getList = async () => {
loading.value = true;
try {
const { page } = await accessStrategyBusinessBlacklist({ pageNum: currentPage.value, pageSize: pageSize.value, keyWord: keyWord.value });
list.value = page.records;
total.value = page.total;
} finally {
loading.value = false;
}
};
//
const initList = async () => {
currentPage.value = 1;
getList();
};
watch(keyWord, initList);
onMounted(getList);
//
const handleSelectionChange = (val: Record<string, any>[]) => {
multipleSelection.value = val;
};
//
const delAll = async () => {
handleDelete(multipleSelection.value.map((e) => e.businessId));
};
//
const toAdd = () => {
i.value++;
isDetail.value = false;
curRow.value = {
businessId: '',
strategyName: '',
};
visible.value = true;
};
//
const toDetail = async (row: Record<string, any>, detail: boolean = false) => {
i.value++;
isDetail.value = detail;
curRow.value = row;
visible.value = true;
};
//
const closeDrawer = (refresh?: number) => {
visible.value = false;
refresh && initList();
};
const handleDelete = async (ids: number[]) => {
await accessStrategyBusinessBlacklistDel({ ids });
getList();
ElMessage.success('删除成功!');
};
</script>

@ -16,7 +16,7 @@
</el-sub-menu>
</el-menu>
<div class="right">
<component :is="curMenu"></component>
<component :is="curMenu" />
</div>
</div>
</div>
@ -34,8 +34,8 @@ const list = ref<Array<Record<string, any>>>([]);
const id = computed(() => +route.query.id);
const dynamicComponentMap = {
'150': defineAsyncComponent(() => import('./150/Index.vue')),
'151': defineAsyncComponent(() => import('./151.vue')),
'152': defineAsyncComponent(() => import('./152.vue')),
'151': defineAsyncComponent(() => import('./151/Index.vue')),
'152': defineAsyncComponent(() => import('./152/Index.vue')),
'153': defineAsyncComponent(() => import('./153.vue')),
'154': defineAsyncComponent(() => import('./154.vue')),
'155': defineAsyncComponent(() => import('./155.vue')),
@ -67,7 +67,7 @@ onBeforeUnmount(() => {
app.component('148', null);
app.component('150', null);
});
const handleSelect = (key: string, keyPath: string[]) => {
const handleSelect = (key: string) => {
curMenu.value = key;
router.push(`/product/strategy?i=${route.query.i}&role=${route.query.role}&id=${key}`);
};

Loading…
Cancel
Save