贷后管理

V0.1
yujialong 1 year ago
parent 7e7c233b6b
commit 0341e2169d
  1. 12
      src/api/model.ts
  2. 33
      src/views/product/afterLoan/1030.vue
  3. 126
      src/views/product/afterLoan/1032.vue
  4. 130
      src/views/product/afterLoan/1033.vue
  5. 6
      src/views/product/afterLoan/CardList.vue

@ -70,3 +70,15 @@ export const fiveLevelClassificationSave = async (data: Record<string, any>): Pr
export const postLoanInspectionDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/postLoanInspection/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const postLoanInspectionSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/postLoanInspection/saveOrUpdate`, data)).data;
export const postCreditScoreDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/postCreditScore/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const postCreditScoreSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/postCreditScore/saveOrUpdate`, data)).data;
export const postLoanWarningDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/postLoanWarning/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const postLoanWarningSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/postLoanWarning/saveOrUpdate`, data)).data;
export const collectionAfterLoanDetails = async (checkpointId: number, projectId: number): Promise<any> =>
(await axios.post(`/product/collectionAfterLoan/details?checkpointId=${checkpointId}&projectId=${projectId}`)).data;
export const collectionAfterLoanSave = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/collectionAfterLoan/saveOrUpdate`, data)).data;

@ -15,7 +15,11 @@
<el-table-column prop="recordName"
label="检查方式"
min-width="150"
align="center"></el-table-column>
align="center">
<template #default="{ row, $index }">
{{ $index === 1 ? '贷后全检' : row.recordName }}
</template>
</el-table-column>
<el-table-column label="检查对象"
min-width="250"
align="center">
@ -81,34 +85,23 @@ const getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1030);
const result = [];
process.map((e, i) => {
const cur = info.value.find((n) => n.stRecordId === e.id);
const cur = info.value.length ? info.value[i] : {};
let temp = {
checkpointId: levelId,
projectId,
recordName: e.name,
recordChildren: e.recordChildren,
checkObject: 683,
checkTimeType: 689,
creditData: false,
governmentData: false,
isChoose: false,
timeDays: '',
checkObject: +(cur.checkObject || 683),
checkTimeType: +(cur.checkTimeType || 689),
creditData: info.value.length ? !!cur.creditData : false,
governmentData: info.value.length ? !!cur.governmentData : false,
isChoose: info.value.length ? !!cur.isChoose : false,
timeDays: cur.timeDays || '',
id: cur.id || '',
stRecordId: e.id,
};
result.push(temp);
i === 1 && result.push(JSON.parse(JSON.stringify(temp)));
});
if (info.value.length) {
result.forEach((e, i) => {
result[i].checkObject = +info.value[i].checkObject;
result[i].checkTimeType = +info.value[i].checkTimeType;
result[i].creditData = !!info.value[i].creditData;
result[i].governmentData = !!info.value[i].governmentData;
result[i].isChoose = !!info.value[i].isChoose;
result[i].timeDays = info.value[i].timeDays;
result[i].id = info.value[i].id;
});
}
form.value = result;
};
//

@ -0,0 +1,126 @@
<template>
<!-- 贷后预警 -->
<el-table class="c-table"
:data="form"
border>
<el-table-column label="选用"
width="80"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.isChoose"></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="recordName"
label="风险类型"
align="center"></el-table-column>
<el-table-column label="风险等级"
align="center">
<template #default="{ row }">
<div class="flex">
<el-select class="mr-2"
v-model="row.riskGradeType">
<el-option v-for="item in row?.recordChildren[1].recordChildren[0].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
</el-select>
<el-select v-model="row.riskGrade">
<el-option v-for="item in row?.recordChildren[1].recordChildren[1].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
</el-select>
</div>
</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, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { postLoanWarningDetails, postLoanWarningSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId } from '@/utils/common';
import Cookies from 'js-cookie';
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 getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1032);
const result = [];
process.map((e, i) => {
const cur = info.value.length ? info.value[i] : {};
result.push({
checkpointId: levelId,
projectId,
recordName: e.name,
recordChildren: e.recordChildren,
riskGrade: +(cur.riskGrade || 747),
riskGradeType: +(cur.riskGradeType || 744),
isChoose: info.value.length ? !!cur.isChoose : false,
id: cur.id || '',
stRecordId: e.id,
});
});
form.value = result;
};
//
const getDetail = async () => {
try {
const { data } = await postLoanWarningDetails(levelId, projectId);
info.value = data;
getConfig();
} finally {
}
};
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${levelId},42,69,1032`; // 1id
const rule = [];
data.map((e) => {
e.isChoose && rule.push(handleId(1052, '', '', `${preIds},${e.stRecordId},1052`, ''));
rule.push(handleId(1147, 299, e.riskGradeType, `${preIds},${e.stRecordId},1146,1147`, 1), handleId(1148, 300, e.riskGrade, `${preIds},${e.stRecordId},1146,1148`, 1));
});
await addOperation({
checkpointId: levelId,
parentId: preIds,
lcJudgmentRuleReq: rule,
projectId,
});
};
//
const submit = async () => {
let param = JSON.parse(JSON.stringify(form.value));
param.forEach((e) => {
e.isChoose = +e.isChoose;
});
const recordParam = JSON.parse(JSON.stringify(param));
param.forEach((e) => {
delete e.recordChildren;
});
await postLoanWarningSave({ postLoanWarningList: param });
addRecord(recordParam);
getDetail();
ElMessage.success('提交成功!');
};
onMounted(() => {
getDetail();
});
</script>
<style lang="scss" scoped>
@import url(../../../styles/form.scss);
</style>

@ -0,0 +1,130 @@
<template>
<!-- 贷后催收 -->
<el-table class="c-table"
:data="form"
:span-method="span"
border>
<el-table-column prop="recordName"
label="逾期时长"
min-width="150"
align="center">
</el-table-column>
<el-table-column label="选择催收方式"
align="center">
<template #default="{ row }">
<el-checkbox v-model="row.shortMessageCollection">短信催收</el-checkbox>
<el-checkbox v-model="row.appCollection">APP催收</el-checkbox>
<el-checkbox v-model="row.automaticOutboundCall">自动外呼</el-checkbox>
</template>
</el-table-column>
<el-table-column label="短信/APP/自动外呼 话术"
align="center">
<template #default="{ row }">
<el-select class=""
v-model="row.verbalTrick">
<el-option v-for="item in row?.recordChildren[3].subject.itemList"
:key="item"
:label="item.options"
:value="item.itemId" />
</el-select>
</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, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { collectionAfterLoanDetails, collectionAfterLoanSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { handleId } from '@/utils/common';
import Cookies from 'js-cookie';
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 getConfig = async () => {
const { process } = await getProcessInformationBasedOnRoles(1033);
const result = [];
process[0].recordChildren.map((e, i) => {
const cur = info.value.length ? info.value[i] : {};
result.push({
checkpointId: levelId,
projectId,
recordName: e.name,
recordChildren: e.recordChildren,
appCollection: info.value.length ? !!cur.appCollection : false,
automaticOutboundCall: info.value.length ? !!cur.automaticOutboundCall : false,
shortMessageCollection: info.value.length ? !!cur.shortMessageCollection : false,
verbalTrick: +(cur.verbalTrick || 750),
id: cur.id || '',
stRecordId: e.id,
});
});
form.value = result;
};
//
const getDetail = async () => {
try {
const { data } = await collectionAfterLoanDetails(levelId, projectId);
info.value = data;
getConfig();
} finally {
}
};
const fieldKeys = ['shortMessageCollection', 'appCollection', 'automaticOutboundCall'];
//
const addRecord = async (data: Record<string, any>) => {
const preIds = `1,${levelId},42,69,1033,1149`; // 1id
const rule = [];
data.map((e) => {
e.recordChildren.forEach((n, i) => {
if (i !== 3) {
e[fieldKeys[i]] && rule.push(handleId(n.id, '', '', `${preIds},${e.stRecordId},${n.id}`, ''));
} else {
rule.push(handleId(n.id, n.subjectId, e.verbalTrick, `${preIds},${e.stRecordId},${n.id}`, 1));
}
});
});
await addOperation({
checkpointId: levelId,
parentId: preIds,
lcJudgmentRuleReq: rule,
projectId,
});
};
//
const submit = async () => {
let param = JSON.parse(JSON.stringify(form.value));
param.map((e) => {
e.appCollection = +e.appCollection;
e.automaticOutboundCall = +e.automaticOutboundCall;
e.shortMessageCollection = +e.shortMessageCollection;
});
const recordParam = JSON.parse(JSON.stringify(param));
param.map((e) => {
delete e.recordChildren;
});
await collectionAfterLoanSave({ collectionAfterLoanList: param });
addRecord(recordParam);
getDetail();
ElMessage.success('提交成功!');
};
onMounted(() => {
getDetail();
});
</script>
<style lang="scss" scoped>
@import url(../../../styles/form.scss);
</style>

@ -16,6 +16,8 @@
<div class="right flex-1 px-5 pt-4">
<Com1 v-if="id == 1029" />
<Com2 v-else-if="id == 1030" />
<Com4 v-else-if="id == 1032" />
<Com5 v-else-if="id == 1033" />
</div>
</div>
</div>
@ -29,8 +31,8 @@ import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
import Com1 from './1029.vue';
import Com2 from './1030.vue';
import Com3 from './935.vue';
import Com4 from './936.vue';
import Com4 from './1032.vue';
import Com5 from './1033.vue';
const router = useRouter();
const route = useRoute();

Loading…
Cancel
Save