From 73ee648b97b57c349a83aae76c511ff18eb374be Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 6 May 2024 15:31:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=B7=BB=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- src/api/model.ts | 65 ++-- src/components/StrategyConfirm.vue | 1 + src/views/product/afterLoan/1029/Detail.vue | 22 +- src/views/product/afterLoan/1029/Index.vue | 1 + src/views/product/afterLoan/1030/Detail.vue | 22 +- src/views/product/afterLoan/1030/Index.vue | 1 + src/views/product/afterLoan/1031/Detail.vue | 22 +- src/views/product/afterLoan/1031/Index.vue | 1 + src/views/product/afterLoan/1032/Detail.vue | 22 +- src/views/product/bank/Config.vue | 333 ++++++++++++------ src/views/product/interestRate/772/Detail.vue | 7 +- src/views/product/interestRate/772/Index.vue | 3 +- src/views/product/interestRate/935/Detail.vue | 12 +- src/views/product/interestRate/935/Index.vue | 2 +- src/views/product/interestRate/936/Detail.vue | 38 +- src/views/product/interestRate/936/Index.vue | 2 +- src/views/product/strategy/150/Detail.vue | 22 +- src/views/product/strategy/150/Index.vue | 2 +- src/views/product/strategy/151/Detail.vue | 22 +- src/views/product/strategy/151/Index.vue | 5 +- src/views/product/strategy/152/Detail.vue | 22 +- src/views/product/strategy/152/Index.vue | 3 +- src/views/product/strategy/153/Detail.vue | 28 +- src/views/product/strategy/153/Index.vue | 3 +- src/views/product/strategy/154/Detail.vue | 22 +- src/views/product/strategy/154/Index.vue | 3 +- src/views/product/strategy/155/Detail.vue | 22 +- src/views/product/strategy/155/Index.vue | 3 +- src/views/product/strategy/156/Detail.vue | 22 +- src/views/product/strategy/156/Index.vue | 3 +- src/views/product/strategy/512/Detail.vue | 23 +- src/views/product/strategy/512/Index.vue | 3 +- src/views/product/strategy/513/Detail.vue | 23 +- src/views/product/strategy/513/Index.vue | 3 +- src/views/product/strategy/Risk1.vue | 113 +++--- src/views/product/strategy/Risk2.vue | 84 ++--- src/views/product/strategy/Risk3.vue | 83 +++-- 38 files changed, 625 insertions(+), 445 deletions(-) diff --git a/.env b/.env index 79153fd..104e2c6 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ 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://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 diff --git a/src/api/model.ts b/src/api/model.ts index c21224c..dc4467a 100644 --- a/src/api/model.ts +++ b/src/api/model.ts @@ -95,31 +95,31 @@ export const accessStrategyNegativeIndustryStrategy = async (data: Record): Promise => - (await axios.post(`/product/accessStrategyNegativeIndustryStrategy/details`, {}, { params })).data; + (await axios.post(`${host}/product/accessStrategyNegativeIndustryStrategy/details`, {}, { params })).data; export const accessStrategyNegativeIndustryStrategySave = async (data: Record): Promise => - (await axios.post(`/product/accessStrategyNegativeIndustryStrategy/saveOrUpdate`, data)).data; + (await axios.post(`${host}/product/accessStrategyNegativeIndustryStrategy/saveOrUpdate`, data)).data; export const accessStrategyNegativeIndustryStrategyDel = async (data: Record): Promise => (await axios.post(`${host}/product/accessStrategyNegativeIndustryStrategy/delete`, data)).data; -export const delCredit = async (data: Record): Promise => (await axios.post(`/product/creditScoringStrategy/delete`, data)).data; -export const findCredit = async (id: number): Promise => (await axios.post(`/product/creditScoringStrategy/details?strategyId=${id}`)).data; +export const delCredit = async (data: Record): Promise => (await axios.post(`${host}/product/creditScoringStrategy/delete`, data)).data; +export const findCredit = async (id: number): Promise => (await axios.post(`${host}/product/creditScoringStrategy/details?strategyId=${id}`)).data; export const listCredit = async (data: Record): Promise => ( - await axios.post(`/product/creditScoringStrategy/list`, { + await axios.post(`${host}/product/creditScoringStrategy/list`, { ...data, ...getIds(), }) ).data; -export const saveCredit = async (data: Record): Promise => (await axios.post(`/product/creditScoringStrategy/saveOrUpdate`, data)).data; +export const saveCredit = async (data: Record): Promise => (await axios.post(`${host}/product/creditScoringStrategy/saveOrUpdate`, data)).data; export const detailRick = async (type: number): Promise => ( - await axios.post(`/product/riskDegreeStrategy/details`, { + await axios.post(`${host}/product/riskDegreeStrategy/details`, { ...getIds(), type, }) ).data; -export const saveRick = async (data: Record): Promise => (await axios.post(`/product/riskDegreeStrategy/saveOrUpdate`, data)).data; +export const saveRick = async (data: Record): Promise => (await axios.post(`${host}/product/riskDegreeStrategy/saveOrUpdate`, data)).data; export const interestRateModelList = async (data: Record): Promise => ( @@ -129,13 +129,13 @@ export const interestRateModelList = async (data: Record): Promise< }) ).data; export const businessInterestRateDetails = async (params: Record): Promise => - (await axios.post(`/product/interestRateModel/businessInterestRateDetails`, {}, { params })).data; + (await axios.post(`${host}/product/interestRateModel/businessInterestRateDetails`, {}, { params })).data; export const businessInterestRateSaveOrUpdate = async (data: Record): Promise => - (await axios.post(`/product/interestRateModel/businessInterestRateSaveOrUpdate`, data)).data; + (await axios.post(`${host}/product/interestRateModel/businessInterestRateSaveOrUpdate`, data)).data; export const personalInterestRateDetails = async (params: Record): Promise => - (await axios.post(`/product/interestRateModel/personalInterestRateDetails`, {}, { params })).data; + (await axios.post(`${host}/product/interestRateModel/personalInterestRateDetails`, {}, { params })).data; export const personalInterestRateSaveOrUpdate = async (data: Record): Promise => - (await axios.post(`/product/interestRateModel/personalInterestRateSaveOrUpdate`, data)).data; + (await axios.post(`${host}/product/interestRateModel/personalInterestRateSaveOrUpdate`, data)).data; export const deleteBusinessInterestRate = async (data: Record): Promise => (await axios.post(`${host}/product/interestRateModel/deleteBusinessInterestRate`, data)).data; export const deletePersonalInterestRate = async (data: Record): Promise => @@ -143,72 +143,73 @@ export const deletePersonalInterestRate = async (data: Record): Pro export const quotaModelList = async (data: Record): Promise => ( - await axios.post(`/product/quotaModel/list`, { + await axios.post(`${host}/product/quotaModel/list`, { ...getIds(), ...data, }) ).data; export const quotaModelDel = async (data: Record): Promise => (await axios.post(`${host}/product/quotaModel/delete`, data)).data; -export const businessQuotaModelDetails = async (): Promise => (await axios.post(`/product/quotaModel/businessQuotaModelDetails`, getIds())).data; +export const businessQuotaModelDetails = async (): Promise => (await axios.post(`${host}/product/quotaModel/businessQuotaModelDetails`, getIds())).data; export const businessQuotaModelSaveOrUpdate = async (data: Record): Promise => - (await axios.post(`/product/quotaModel/businessQuotaModelSaveOrUpdate`, data)).data; + (await axios.post(`${host}/product/quotaModel/businessQuotaModelSaveOrUpdate`, data)).data; export const personalCreditModelDetails = async (params: Record): Promise => - (await axios.post(`/product/quotaModel/personalCreditModelDetails`, {}, { params })).data; + (await axios.post(`${host}/product/quotaModel/personalCreditModelDetails`, {}, { params })).data; export const personalCreditModelSaveOrUpdate = async (data: Record): Promise => - (await axios.post(`/product/quotaModel/personalCreditModelSaveOrUpdate`, data)).data; + (await axios.post(`${host}/product/quotaModel/personalCreditModelSaveOrUpdate`, data)).data; export const fiveLevelClassification = async (data: Record): Promise => ( - await axios.post(`/product/fiveLevelClassification/list`, { + await axios.post(`${host}/product/fiveLevelClassification/list`, { ...getIds(), ...data, }) ).data; export const fiveLevelClassificationDetails = async (params: Record): Promise => - (await axios.post(`/product/fiveLevelClassification/details`, {}, { params })).data; -export const fiveLevelClassificationSave = async (data: Record): Promise => (await axios.post(`/product/fiveLevelClassification/saveOrUpdate`, data)).data; + (await axios.post(`${host}/product/fiveLevelClassification/details`, {}, { params })).data; +export const fiveLevelClassificationSave = async (data: Record): Promise => (await axios.post(`${host}/product/fiveLevelClassification/saveOrUpdate`, data)).data; export const fiveLevelClassificationDel = async (data: Record): Promise => (await axios.post(`${host}/product/fiveLevelClassification/delete`, data)).data; export const postLoanInspection = async (data: Record): Promise => ( - await axios.post(`/product/postLoanInspection/list`, { + await axios.post(`${host}/product/postLoanInspection/list`, { ...getIds(), ...data, }) ).data; -export const postLoanInspectionDetails = async (params: Record): Promise => (await axios.post(`/product/postLoanInspection/details`, {}, { params })).data; -export const postLoanInspectionSave = async (data: Record): Promise => (await axios.post(`/product/postLoanInspection/saveOrUpdate`, data)).data; +export const postLoanInspectionDetails = async (params: Record): Promise => (await axios.post(`${host}/product/postLoanInspection/details`, {}, { params })).data; +export const postLoanInspectionSave = async (data: Record): Promise => (await axios.post(`${host}/product/postLoanInspection/saveOrUpdate`, data)).data; export const postLoanInspectionDel = async (data: Record): Promise => (await axios.post(`${host}/product/postLoanInspection/delete`, data)).data; export const postCreditScore = async (data: Record): Promise => ( - await axios.post(`/product/postCreditScore/list`, { + await axios.post(`${host}/product/postCreditScore/list`, { ...getIds(), ...data, }) ).data; -export const postCreditScoreDetails = async (params: Record): Promise => (await axios.post(`/product/postCreditScore/details`, {}, { params })).data; -export const postCreditScoreSave = async (data: Record): Promise => (await axios.post(`/product/postCreditScore/saveOrUpdate`, data)).data; +export const postCreditScoreDetails = async (params: Record): Promise => (await axios.post(`${host}/product/postCreditScore/details`, {}, { params })).data; +export const postCreditScoreSave = async (data: Record): Promise => (await axios.post(`${host}/product/postCreditScore/saveOrUpdate`, data)).data; export const postCreditScoreDel = async (data: Record): Promise => (await axios.post(`${host}/product/postCreditScore/delete`, data)).data; export const postLoanWarning = async (data: Record): Promise => ( - await axios.post(`/product/postLoanWarning/list`, { + await axios.post(`${host}/product/postLoanWarning/list`, { ...getIds(), ...data, }) ).data; -export const postLoanWarningDetails = async (params: Record): Promise => (await axios.post(`/product/postLoanWarning/details`, {}, { params })).data; -export const postLoanWarningSave = async (data: Record): Promise => (await axios.post(`/product/postLoanWarning/saveOrUpdate`, data)).data; +export const postLoanWarningDetails = async (params: Record): Promise => (await axios.post(`${host}/product/postLoanWarning/details`, {}, { params })).data; +export const postLoanWarningSave = async (data: Record): Promise => (await axios.post(`${host}/product/postLoanWarning/saveOrUpdate`, data)).data; export const postLoanWarningDel = async (data: Record): Promise => (await axios.post(`${host}/product/postLoanWarning/delete`, data)).data; export const collectionAfterLoan = async (data: Record): Promise => ( - await axios.post(`/product/collectionAfterLoan/list`, { + await axios.post(`${host}/product/collectionAfterLoan/list`, { ...getIds(), ...data, }) ).data; -export const collectionAfterLoanDetails = async (params: Record): Promise => (await axios.post(`/product/collectionAfterLoan/details`, {}, { params })).data; -export const collectionAfterLoanSave = async (data: Record): Promise => (await axios.post(`/product/collectionAfterLoan/saveOrUpdate`, data)).data; +export const collectionAfterLoanDetails = async (params: Record): Promise => + (await axios.post(`${host}/product/collectionAfterLoan/details`, {}, { params })).data; +export const collectionAfterLoanSave = async (data: Record): Promise => (await axios.post(`${host}/product/collectionAfterLoan/saveOrUpdate`, data)).data; export const collectionAfterLoanDel = async (data: Record): Promise => (await axios.post(`${host}/product/collectionAfterLoan/delete`, data)).data; diff --git a/src/components/StrategyConfirm.vue b/src/components/StrategyConfirm.vue index b33c4d7..6df5820 100644 --- a/src/components/StrategyConfirm.vue +++ b/src/components/StrategyConfirm.vue @@ -31,6 +31,7 @@ const visible = computed({ }); const syncCheck = ref(false); const submit = () => { + visible.value = false; emit('submit', +syncCheck.value); }; diff --git a/src/views/product/afterLoan/1029/Detail.vue b/src/views/product/afterLoan/1029/Detail.vue index f2562d4..d769904 100644 --- a/src/views/product/afterLoan/1029/Detail.vue +++ b/src/views/product/afterLoan/1029/Detail.vue @@ -3,7 +3,8 @@ + :disabled="disabled" + v-loading="loading"> +
+
取消
+
确定
+
-
-
取消
-
确定
-
@@ -147,10 +148,13 @@ const getConfig = async () => { }); }); form.value = result; + loading.value = false; }; +const loading = ref(false); const syncVisible = ref(false); // 详情 const getDetail = async () => { + loading.value = true; try { if (strategyId.value) { const { data } = await fiveLevelClassificationDetails({ @@ -181,12 +185,14 @@ const addRecord = async (data: Record) => { parentId: preIds, lcJudgmentRuleReq: rule, }); + loading.value = false; ElMessage.success('提交成功!'); syncVisible.value = false; emit('close', 1); }; // 提交 const submit = async (synchronizeUpdate?: number) => { + loading.value = true; let param = JSON.parse(JSON.stringify(form.value)); const recordParam = JSON.parse(JSON.stringify(param)); diff --git a/src/views/product/afterLoan/1029/Index.vue b/src/views/product/afterLoan/1029/Index.vue index 564b9b1..6c9709a 100644 --- a/src/views/product/afterLoan/1029/Index.vue +++ b/src/views/product/afterLoan/1029/Index.vue @@ -91,6 +91,7 @@ import { Delete } from '@element-plus/icons-vue'; import { pageSizes, pageLayout } from '@/utils/common'; import { fiveLevelClassification, fiveLevelClassificationDel } from '@/api/model'; import Search from '@/components/Search.vue'; + const Detail = defineAsyncComponent(() => import('./Detail.vue')); const keyWord = ref(); diff --git a/src/views/product/afterLoan/1030/Detail.vue b/src/views/product/afterLoan/1030/Detail.vue index 6c67f97..befa82d 100644 --- a/src/views/product/afterLoan/1030/Detail.vue +++ b/src/views/product/afterLoan/1030/Detail.vue @@ -3,7 +3,8 @@ + :disabled="disabled" + v-loading="loading"> +
+
取消
+
确定
+
-
-
取消
-
确定
-
@@ -106,6 +107,7 @@ const emit = defineEmits(['clsoe']); const { strategyId, strategyName } = toRefs(props.row); const form = ref[]>([]); const info = ref[]>([]); +const loading = ref(false); const syncVisible = ref(false); // 配置项 const getConfig = async () => { @@ -129,9 +131,11 @@ const getConfig = async () => { result.push(temp); }); form.value = result; + loading.value = false; }; // 详情 const getDetail = async () => { + loading.value = true; try { if (strategyId.value) { const { data } = await postLoanInspectionDetails({ @@ -189,12 +193,14 @@ const addRecord = async (data: Record) => { parentId: preIds, lcJudgmentRuleReq: rule, }); + loading.value = false; ElMessage.success('提交成功!'); syncVisible.value = false; emit('close', 1); }; // 提交 const submit = async (synchronizeUpdate?: number) => { + loading.value = true; let param = JSON.parse(JSON.stringify(form.value)); param.map((e, i) => { e.creditData = +e.creditData; diff --git a/src/views/product/afterLoan/1030/Index.vue b/src/views/product/afterLoan/1030/Index.vue index 61c3c1e..6b66b25 100644 --- a/src/views/product/afterLoan/1030/Index.vue +++ b/src/views/product/afterLoan/1030/Index.vue @@ -91,6 +91,7 @@ import { Delete } from '@element-plus/icons-vue'; import { pageSizes, pageLayout } from '@/utils/common'; import { postLoanInspection, postLoanInspectionDel } from '@/api/model'; import Search from '@/components/Search.vue'; + const Detail = defineAsyncComponent(() => import('./Detail.vue')); const keyWord = ref(); diff --git a/src/views/product/afterLoan/1031/Detail.vue b/src/views/product/afterLoan/1031/Detail.vue index dfec006..79564bd 100644 --- a/src/views/product/afterLoan/1031/Detail.vue +++ b/src/views/product/afterLoan/1031/Detail.vue @@ -3,7 +3,8 @@ + :disabled="disabled" + v-loading="loading"> +
+
取消
+
确定
+
-
-
取消
-
确定
-
@@ -228,6 +229,7 @@ const form = ref[]>([]); const info = ref[]>([]); // 公式的默认答案 const answer = [[697, 693], [698, 691], [1, 707], [716], [], [695, 696], [696, 694]]; +const loading = ref(false); const syncVisible = ref(false); // 配置项 const getConfig = async () => { @@ -268,9 +270,11 @@ const getConfig = async () => { }); } form.value = result; + loading.value = false; }; // 详情 const getDetail = async () => { + loading.value = true; try { if (strategyId.value) { const { data } = await postCreditScoreDetails({ @@ -365,12 +369,14 @@ const addRecord = async (data: Record) => { parentId: preIds, lcJudgmentRuleReq: rule, }); + loading.value = false; ElMessage.success('提交成功!'); syncVisible.value = false; emit('close', 1); }; // 提交 const submit = async (synchronizeUpdate?: number) => { + loading.value = true; let param = JSON.parse(JSON.stringify(form.value)); const recordParam = JSON.parse(JSON.stringify(param)); param.map((e) => { diff --git a/src/views/product/afterLoan/1031/Index.vue b/src/views/product/afterLoan/1031/Index.vue index 973c8c4..6756cd8 100644 --- a/src/views/product/afterLoan/1031/Index.vue +++ b/src/views/product/afterLoan/1031/Index.vue @@ -91,6 +91,7 @@ import { Delete } from '@element-plus/icons-vue'; import { pageSizes, pageLayout } from '@/utils/common'; import { postCreditScore, postCreditScoreDel } from '@/api/model'; import Search from '@/components/Search.vue'; + const Detail = defineAsyncComponent(() => import('./Detail.vue')); const keyWord = ref(); diff --git a/src/views/product/afterLoan/1032/Detail.vue b/src/views/product/afterLoan/1032/Detail.vue index 28020ef..4a99c5e 100644 --- a/src/views/product/afterLoan/1032/Detail.vue +++ b/src/views/product/afterLoan/1032/Detail.vue @@ -3,7 +3,8 @@ + :disabled="disabled" + v-loading="loading"> +
+
取消
+
确定
+
-
-
取消
-
确定
-
@@ -84,6 +85,7 @@ const emit = defineEmits(['clsoe']); const { strategyId, strategyName } = toRefs(props.row); const form = ref[]>([]); const info = ref[]>([]); +const loading = ref(false); const syncVisible = ref(false); // 配置项 const getConfig = async () => { @@ -103,9 +105,11 @@ const getConfig = async () => { }); }); form.value = result; + loading.value = false; }; // 详情 const getDetail = async () => { + loading.value = true; try { if (strategyId.value) { const { data } = await postLoanWarningDetails({ @@ -135,12 +139,14 @@ const addRecord = async (data: Record) => { parentId: preIds, lcJudgmentRuleReq: rule, }); + loading.value = false; ElMessage.success('提交成功!'); syncVisible.value = false; emit('close', 1); }; // 提交 const submit = async (synchronizeUpdate?: number) => { + loading.value = true; let param = JSON.parse(JSON.stringify(form.value)); param.forEach((e) => { e.isChoose = +e.isChoose; diff --git a/src/views/product/bank/Config.vue b/src/views/product/bank/Config.vue index 16de986..942b639 100644 --- a/src/views/product/bank/Config.vue +++ b/src/views/product/bank/Config.vue @@ -277,21 +277,30 @@ class="flex items-center mb-3">
{{ item.name }} - - + {{ option.options }}
- - - + @@ -327,20 +336,24 @@ :key="i" class="radio-wrap mb-3"> {{ item.name }} - + {{ option.options }} - - - + +
@@ -363,19 +376,20 @@
企业利率模型 - + {{ option.options }} - - + :label="item.modelName" + :value="item.id" />
@@ -563,20 +577,30 @@ :key="i" class="radio-wrap mb-3"> {{ item.name }} - + {{ option.options }} - - - + + @@ -616,7 +640,6 @@ import type { TabsPaneContext, FormInstance } from 'element-plus'; import { findById, riskSave, riskUpdate, riskControlDetailsAreDisplayed } from '@/api/bank'; import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; import { - listCredit, accessStrategyGovernmentBlacklistList, accessStrategyCreditBlacklist, accessStrategyBusinessBlacklist, @@ -624,6 +647,14 @@ import { accessStrategyEnterpriseBlacklist, accessStrategyAntiFraudStrategy, accessStrategyNegativeIndustryStrategy, + listCredit, + quotaModelList, + interestRateModelList, + fiveLevelClassification, + postLoanInspection, + postCreditScore, + postLoanWarning, + collectionAfterLoan, } from '@/api/model'; import { useRouter, useRoute } from 'vue-router'; import { handleId, getIds, getUsername } from '@/utils/common'; @@ -684,7 +715,6 @@ const route = useRoute(); const id = computed(() => +route.query.id); const curTab = ref(route.query.show ? 'tab2' : 'tab1'); const config = ref([]); -const credits = ref[]>([]); const info = ref>({}); const whethers = ref>([ { @@ -764,6 +794,7 @@ let form = reactive({ const curPreviewTitle = ref(); const assessNames = ['政务黑名单', '征信黑名单', '商采黑名单', '行内黑名单', '企业黑名单', '反欺诈策略', '负面行业黑名单策略']; +const afterNames = ['五级分类策略', '贷后检查策略', '贷后评分卡', '贷后预警策略', '贷后催收策略']; const dynamicComponentMap = { '150': defineAsyncComponent(() => import('../strategy/150/Detail.vue')), '151': defineAsyncComponent(() => import('../strategy/151/Detail.vue')), @@ -772,10 +803,13 @@ const dynamicComponentMap = { '154': defineAsyncComponent(() => import('../strategy/154/Detail.vue')), '155': defineAsyncComponent(() => import('../strategy/155/Detail.vue')), '156': defineAsyncComponent(() => import('../strategy/156/Detail.vue')), - // '148': defineAsyncComponent(() => import('./Credit.vue')), - // '702': defineAsyncComponent(() => import('./Risk1.vue')), - // '703': defineAsyncComponent(() => import('./Risk2.vue')), - // '704': defineAsyncComponent(() => import('./Risk3.vue')), + '512': defineAsyncComponent(() => import('../strategy/512/Detail.vue')), + '513': defineAsyncComponent(() => import('../strategy/513/Detail.vue')), + '1029': defineAsyncComponent(() => import('../afterLoan/1029/Detail.vue')), + '1030': defineAsyncComponent(() => import('../afterLoan/1030/Detail.vue')), + '1031': defineAsyncComponent(() => import('../afterLoan/1031/Detail.vue')), + '1032': defineAsyncComponent(() => import('../afterLoan/1032/Detail.vue')), + '1033': defineAsyncComponent(() => import('../afterLoan/1033/Detail.vue')), }; const app = getCurrentInstance().appContext.app; for (const [name, asyncComponent] of Object.entries(dynamicComponentMap)) { @@ -804,6 +838,64 @@ const getAccess = async (i: number) => { } } }; +// 信用评分策略 +const getCredits = async (i: number) => { + const list = config.value[2]?.recordChildren[2]?.recordChildren; + if (!list[i].blackList) { + try { + const res = await listCredit({ + ...strategyParams, + type: i, + }); + if (res) list[i].blackList = res.data.records; + } finally { + } + } +}; +// 利率定价模型 +const getRate = async (i: number) => { + const list = config.value[2].recordChildren[4].recordChildren; + if (!list[i].blackList) { + try { + let res; + if (!i) { + res = await quotaModelList({ + ...strategyParams, + type: 1, + }); // 个人利率模型 + } else if (i === 1) { + res = await interestRateModelList({ + ...strategyParams, + type: 1, + }); // 个人额度模型 + } else if (i === 2) { + res = await interestRateModelList({ + ...strategyParams, + type: 2, + }); // 企业利率模型 + form.interestRatePricingModelList[2].blackList = res.page.records; + } + if (res && i !== 2) list[i].blackList = res.page.records; + } finally { + } + } +}; +// 贷后管理 +const getAfter = async (i: number) => { + const list = config.value[7]?.recordChildren; + if (!list[i].blackList) { + try { + let res; + if (!i) res = await fiveLevelClassification(strategyParams); // 五级分类策略 + if (i === 1) res = await postLoanInspection(strategyParams); // 贷后检查策略 + if (i === 2) res = await postCreditScore(strategyParams); // 贷后评分卡 + if (i === 3) res = await postLoanWarning(strategyParams); // 贷后预警策略 + if (i === 4) res = await collectionAfterLoan(strategyParams); // 贷后催收策略 + if (res) list[i].blackList = res.page.records; + } finally { + } + } +}; // 配置项 const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(info.value.productType ? 71 : 70); // 个人70,企业71 @@ -874,39 +966,6 @@ const getConfig = async () => { e.tacticsSelectedStatus === 803 && getAccess(i); }); } - - const { data } = await listCredit({ - ...getIds(), - pageNum: 1, - pageSize: 1000, - }); - credits.value = [ - { - scoringObject: 0, - scoreCardName: '个人信用评分策略', - }, - { - scoringObject: 0, - scoreCardName: '个人评分-评级贷', - }, - { - scoringObject: 0, - scoreCardName: '个人标准评分卡', - }, - { - scoringObject: 1, - scoreCardName: '企业标准评分卡', - }, - { - scoringObject: 1, - scoreCardName: '大型企业评分卡', - }, - { - scoringObject: 1, - scoreCardName: '小型企业评分卡', - }, - ...data, - ]; }; // 详情 const getDetail = async () => { @@ -1135,11 +1194,14 @@ const addRecord = async (data: Record) => { // 信用评分策略 const list2 = data.creditScoringStrategyList; - list2[0].tacticsSelectedStatus && lcRule.push(handleId(1307, 327, list2[0].tacticsSelectedStatus, `${preIds},114,129,1046,1307`, 1)); - // list2[0].tacticsId && lcRule.push(handleId(1390, 339, list2[0].tacticsId, `${preIds},114,129,1046,1390`, 3)); + if (list2.length) { + const list = config.value[2]?.recordChildren[2]?.recordChildren; + list2[0].tacticsSelectedStatus && lcRule.push(handleId(1307, 327, list2[0].tacticsSelectedStatus, `${preIds},114,129,1046,1307`, 1)); + list2[0].tacticsId && lcRule.push(handleId(1390, 339, list[0].blackList.find((e) => e.id === list2[0].tacticsId)?.scoreCardName || '', `${preIds},114,129,1046,1390`, 3)); - list2[1].tacticsSelectedStatus && lcRule.push(handleId(1391, 327, list2[1].tacticsSelectedStatus, `${preIds},114,129,1047,1391`, 1)); - // list2[1].tacticsId && lcRule.push(handleId(1392, 339, list2[1].tacticsId, `${preIds},114,129,1047,1392`, 3)); + list2[1].tacticsSelectedStatus && lcRule.push(handleId(1391, 327, list2[1].tacticsSelectedStatus, `${preIds},114,129,1047,1391`, 1)); + list2[1].tacticsId && lcRule.push(handleId(1392, 339, list[1].blackList.find((e) => e.id === list2[1].tacticsId)?.scoreCardName || '', `${preIds},114,129,1047,1392`, 3)); + } // 风险度策略 data.personalRiskDegreeStrategySelectedStatus && lcRule.push(handleId(1301, 327, data.personalRiskDegreeStrategySelectedStatus, preIds + ',114,130,1301', 1)); @@ -1147,17 +1209,20 @@ const addRecord = async (data: Record) => { // 利率定价模型 const list3 = data.interestRatePricingModelList; - list3[0].tacticsSelectedStatus && lcRule.push(handleId(1398, 327, list3[0].tacticsSelectedStatus, `${preIds},114,131,1394,1398`, 1)); - // list3[0].tacticsId && lcRule.push(handleId(1399, 339, list3[0].tacticsId, `${preIds},114,131,1394,1399`, 3)); + if (list3.length) { + const list = config.value[2].recordChildren[4].recordChildren; + list3[0].tacticsSelectedStatus && lcRule.push(handleId(1398, 327, list3[0].tacticsSelectedStatus, `${preIds},114,131,1394,1398`, 1)); + list3[0].tacticsId && lcRule.push(handleId(1399, 339, list[0].blackList.find((e) => e.id === list3[0].tacticsId)?.modelName || '', `${preIds},114,131,1394,1399`, 3)); - list3[1].tacticsSelectedStatus && lcRule.push(handleId(1400, 327, list3[1].tacticsSelectedStatus, `${preIds},114,131,1395,1400`, 1)); - // list3[1].tacticsId && lcRule.push(handleId(1401, 339, list3[1].tacticsId, `${preIds},114,131,1395,1401`, 3)); + list3[1].tacticsSelectedStatus && lcRule.push(handleId(1400, 327, list3[1].tacticsSelectedStatus, `${preIds},114,131,1395,1400`, 1)); + list3[1].tacticsId && lcRule.push(handleId(1401, 339, list[1].blackList.find((e) => e.id === list3[1].tacticsId)?.modelName || '', `${preIds},114,131,1395,1401`, 3)); - data.enterpriseQuotaModelSelectedStatus && lcRule.push(handleId(1402, 327, data.enterpriseQuotaModelSelectedStatus, preIds + ',114,131,1396,1402', 1)); - data.enterpriseQuotaModel && lcRule.push(handleId(1403, 338, data.enterpriseQuotaModel, preIds + ',114,131,1396,1403', 1)); + data.enterpriseQuotaModelSelectedStatus && lcRule.push(handleId(1402, 327, data.enterpriseQuotaModelSelectedStatus, preIds + ',114,131,1396,1402', 1)); + data.enterpriseQuotaModel && lcRule.push(handleId(1403, 338, data.enterpriseQuotaModel, preIds + ',114,131,1396,1403', 1)); - list3[2].tacticsSelectedStatus && lcRule.push(handleId(1404, 327, list3[2].tacticsSelectedStatus, `${preIds},114,131,1397,1404`, 1)); - // list3[2].tacticsId && lcRule.push(handleId(1405, 339, list3[2].tacticsId, `${preIds},114,131,1397,1405`, 3)); + list3[2].tacticsSelectedStatus && lcRule.push(handleId(1404, 327, list3[2].tacticsSelectedStatus, `${preIds},114,131,1397,1404`, 1)); + list3[2].tacticsId && lcRule.push(handleId(1405, 339, list3[2].blackList.find((e) => e.id === list3[2].tacticsId)?.modelName || '', `${preIds},114,131,1397,1405`, 3)); + } 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)); @@ -1180,6 +1245,26 @@ const addRecord = async (data: Record) => { 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)); + + // 贷后管理 + const list4 = data.postLoanSelectionStrategyList; + if (list4.length) { + const list = config.value[7]?.recordChildren; + list4[0].tacticsSelectedStatus && lcRule.push(handleId(1411, 327, list4[0].tacticsSelectedStatus, `${preIds},119,1406,1411`, 1)); + list4[0].tacticsId && lcRule.push(handleId(1412, 339, list[0].blackList.find((e) => e.strategyId === list4[0].tacticsId)?.strategyName || '', `${preIds},119,1406,1412`, 3)); + + list4[1].tacticsSelectedStatus && lcRule.push(handleId(1413, 327, list4[1].tacticsSelectedStatus, `${preIds},119,1407,1413`, 1)); + list4[1].tacticsId && lcRule.push(handleId(1414, 339, list[1].blackList.find((e) => e.strategyId === list4[1].tacticsId)?.strategyName || '', `${preIds},119,1407,1414`, 3)); + + list4[2].tacticsSelectedStatus && lcRule.push(handleId(1415, 327, list4[2].tacticsSelectedStatus, `${preIds},119,1408,1415`, 1)); + list4[2].tacticsId && lcRule.push(handleId(1416, 339, list[2].blackList.find((e) => e.strategyId === list4[2].tacticsId)?.strategyName || '', `${preIds},119,1408,1416`, 3)); + + list4[3].tacticsSelectedStatus && lcRule.push(handleId(1417, 327, list4[3].tacticsSelectedStatus, `${preIds},119,1409,1417`, 1)); + list4[3].tacticsId && lcRule.push(handleId(1418, 339, list[3].blackList.find((e) => e.strategyId === list4[3].tacticsId)?.strategyName || '', `${preIds},119,1409,1418`, 3)); + + list4[4].tacticsSelectedStatus && lcRule.push(handleId(1419, 327, list4[4].tacticsSelectedStatus, `${preIds},119,1410,1419`, 1)); + list4[4].tacticsId && lcRule.push(handleId(1420, 339, list[4].blackList.find((e) => e.strategyId === list4[4].tacticsId)?.strategyName || '', `${preIds},119,1410,1420`, 3)); + } } 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)); @@ -1239,11 +1324,14 @@ const addRecord = async (data: Record) => { // 信用评分策略 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)); + if (list2.length) { + const list = config.value[2]?.recordChildren[2]?.recordChildren; + list2[0].tacticsSelectedStatus && lcRule.push(handleId(1364, 327, list2[0].tacticsSelectedStatus, `${preIds},74,84,1304,1364`, 1)); + list2[0].tacticsId && lcRule.push(handleId(1366, 339, list[0].blackList.find((e) => e.id === list2[0].tacticsId)?.scoreCardName || '', `${preIds},74,84,1304,1366`, 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)); + 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, list[1].blackList.find((e) => e.id === list2[1].tacticsId)?.scoreCardName || '', `${preIds},74,84,1305,1367`, 3)); + } // 风险度策略 data.personalRiskDegreeStrategySelectedStatus && lcRule.push(handleId(1339, 327, data.personalRiskDegreeStrategySelectedStatus, preIds + '74,85,1339', 1)); @@ -1251,17 +1339,20 @@ const addRecord = async (data: Record) => { // 利率定价模型 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)); + if (list3.length) { + const list = config.value[2].recordChildren[4].recordChildren; + 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, list[0].blackList.find((e) => e.id === list3[0].tacticsId)?.modelName || '', `${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)); + 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, list[1].blackList.find((e) => e.id === list3[1].tacticsId)?.modelName || '', `${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)); + 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)); + 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].blackList.find((e) => e.id === list3[2].tacticsId)?.modelName || '', `${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)); @@ -1286,21 +1377,24 @@ const addRecord = async (data: Record) => { data.guaranteeContract && lcRule.push(handleId(1252, 147, data.guaranteeContract, preIds + ',96,98,313,1252', 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.strategyId === list4[0].tacticsId)?.strategyName, `${preIds},99,1345,1355`, 3)); + const list4 = data.postLoanSelectionStrategyList; + if (list4.length) { + const list = config.value[7]?.recordChildren; + list4[0].tacticsSelectedStatus && lcRule.push(handleId(1350, 327, list4[0].tacticsSelectedStatus, `${preIds},99,1345,1350`, 1)); + list4[0].tacticsId && lcRule.push(handleId(1355, 339, list[0].blackList.find((e) => e.strategyId === 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.strategyId === list4[1].tacticsId)?.strategyName, `${preIds},99,1346,1356`, 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, list[1].blackList.find((e) => e.strategyId === 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.strategyId === list4[2].tacticsId)?.strategyName, `${preIds},99,1347,1357`, 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, list[2].blackList.find((e) => e.strategyId === 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.strategyId === list4[3].tacticsId)?.strategyName, `${preIds},99,1348,1358`, 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, list[3].blackList.find((e) => e.strategyId === 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.strategyId === list4[4].tacticsId)?.strategyName, `${preIds},99,1349,1359`, 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, list[4].blackList.find((e) => e.strategyId === list4[4].tacticsId)?.strategyName || '', `${preIds},99,1349,1359`, 3)); + } } await addOperation({ @@ -1320,6 +1414,27 @@ const preview = (row: Record, i: number) => { curPreviewTitle.value = `查看${assessNames[i]}策略`; visible.value = true; }; +// 预览信用评分策略 +const previewCredits = (row: Record, i: number) => { + const { tacticsId } = form.creditScoringStrategyList[i]; + curRow.value = { + id: tacticsId, + }; + curPreview.value = i ? '513' : '512'; + curPreviewTitle.value = `查看${i ? '企业' : '个人'}信用评分策略`; + visible.value = true; +}; +// 预览贷后管理 +const previewAfter = (row: Record, i: number) => { + const { tacticsId } = form.postLoanSelectionStrategyList[i]; + curRow.value = { + strategyId: tacticsId, + strategyName: row.blackList.find((e) => e.strategyId === tacticsId)?.strategyName, + }; + curPreview.value = Object.keys(dynamicComponentMap)[i + 9]; + curPreviewTitle.value = `查看${afterNames[i]}策略`; + visible.value = true; +};