实现风险明细员工负面征信功能

This commit is contained in:
wkc
2026-03-28 16:13:24 +08:00
parent 559572da8c
commit 2cb4481c3b
23 changed files with 672 additions and 5 deletions

View File

@@ -63,3 +63,15 @@ export function getOverviewSuspiciousTransactions(params) {
}
})
}
export function getOverviewEmployeeCreditNegative(params) {
return request({
url: '/ccdi/project/overview/employee-credit-negative',
method: 'get',
params: {
projectId: params.projectId,
pageNum: params.pageNum,
pageSize: params.pageSize
}
})
}

View File

@@ -54,6 +54,7 @@ import {
} from "./preliminaryCheck.mock";
import {
getOverviewDashboard,
getOverviewEmployeeCreditNegative,
getOverviewRiskPeople,
getOverviewRiskModelCards,
getOverviewSuspiciousTransactions,
@@ -198,7 +199,7 @@ export default {
this.selectedModelCodes = [];
this.resetProjectAnalysisDialog();
try {
const [dashboardRes, riskPeopleRes, riskModelCardsRes, suspiciousRes] = await Promise.all([
const [dashboardRes, riskPeopleRes, riskModelCardsRes, suspiciousRes, creditNegativeRes] = await Promise.all([
getOverviewDashboard(this.projectId),
getOverviewRiskPeople(this.projectId),
getOverviewRiskModelCards(this.projectId),
@@ -208,11 +209,17 @@ export default {
pageNum: 1,
pageSize: 5,
}),
getOverviewEmployeeCreditNegative({
projectId: this.projectId,
pageNum: 1,
pageSize: 5,
}),
]);
const dashboardData = (dashboardRes && dashboardRes.data) || {};
const riskPeopleData = (riskPeopleRes && riskPeopleRes.data) || {};
const riskModelCardsData = (riskModelCardsRes && riskModelCardsRes.data) || {};
const suspiciousData = (suspiciousRes && suspiciousRes.data) || {};
const creditNegativeData = (creditNegativeRes && creditNegativeRes.data) || {};
this.realData = createOverviewLoadedData({
projectId: this.projectId,
@@ -220,6 +227,7 @@ export default {
riskPeopleData,
riskModelCardsData,
suspiciousData,
creditNegativeData,
});
const hasOverviewData = Boolean(

View File

@@ -131,6 +131,60 @@
/>
</div>
<div class="block">
<div class="block-header">
<div>
<div class="block-title">员工负面征信信息</div>
<div class="block-subtitle">展示当前项目员工的负面征信信息</div>
</div>
</div>
<el-table
v-loading="employeeCreditNegativeLoading"
:data="employeeCreditNegativeList"
class="result-table"
>
<template slot="empty">
<el-empty :image-size="96" description="当前项目暂无员工负面征信信息" />
</template>
<el-table-column prop="personName" label="员工姓名" min-width="140" />
<el-table-column label="身份证号" min-width="180" show-overflow-tooltip>
<template slot-scope="scope">
{{ formatIdCard(scope.row.personId) }}
</template>
</el-table-column>
<el-table-column prop="queryDate" label="最近征信查询日期" min-width="160" />
<el-table-column prop="civilCnt" label="民事案件笔数" min-width="120" align="center" />
<el-table-column label="民事案件金额" min-width="140" align="right">
<template slot-scope="scope">
{{ formatAmount(scope.row.civilLmt) }}
</template>
</el-table-column>
<el-table-column prop="enforceCnt" label="强制执行笔数" min-width="120" align="center" />
<el-table-column label="强制执行金额" min-width="140" align="right">
<template slot-scope="scope">
{{ formatAmount(scope.row.enforceLmt) }}
</template>
</el-table-column>
<el-table-column prop="admCnt" label="行政处罚笔数" min-width="120" align="center" />
<el-table-column label="行政处罚金额" min-width="140" align="right">
<template slot-scope="scope">
{{ formatAmount(scope.row.admLmt) }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="employeeCreditNegativeTotal > 0"
:total="employeeCreditNegativeTotal"
:page.sync="employeeCreditNegativePageNum"
:limit.sync="employeeCreditNegativePageSize"
:page-sizes="[5]"
layout="total, prev, pager, next, jumper"
@pagination="handleEmployeeCreditNegativePageChange"
/>
</div>
<div class="block">
<div class="block-header">
<div>
@@ -265,7 +319,10 @@
</template>
<script>
import { getOverviewSuspiciousTransactions } from "@/api/ccdi/projectOverview";
import {
getOverviewEmployeeCreditNegative,
getOverviewSuspiciousTransactions,
} from "@/api/ccdi/projectOverview";
import { getBankStatementDetail } from "@/api/ccdiProjectBankStatement";
const SUSPICIOUS_TYPE_OPTIONS = [
@@ -335,6 +392,11 @@ export default {
suspiciousPageSize: 5,
suspiciousTotal: 0,
suspiciousTransactionList: [],
employeeCreditNegativeLoading: false,
employeeCreditNegativePageNum: 1,
employeeCreditNegativePageSize: 5,
employeeCreditNegativeTotal: 0,
employeeCreditNegativeList: [],
projectId: null,
statementDetailCache: {},
};
@@ -358,9 +420,15 @@ export default {
this.suspiciousPageNum = 1;
this.suspiciousPageSize = 5;
this.suspiciousTotal = Number(value && value.total) || 0;
this.employeeCreditNegativePageNum = 1;
this.employeeCreditNegativePageSize = 5;
this.employeeCreditNegativeTotal = Number(value && value.employeeCreditNegativeTotal) || 0;
const rows = Array.isArray(value && value.suspiciousTransactionList)
? value.suspiciousTransactionList
: [];
this.employeeCreditNegativeList = Array.isArray(value && value.employeeCreditNegativeList)
? value.employeeCreditNegativeList
: [];
this.hydrateSuspiciousRows(rows);
},
},
@@ -380,6 +448,15 @@ export default {
}
await this.loadSuspiciousTransactions();
},
async handleEmployeeCreditNegativePageChange(pageInfo) {
if (typeof pageInfo === "number") {
this.employeeCreditNegativePageNum = pageInfo;
} else {
this.employeeCreditNegativePageNum = pageInfo.page;
this.employeeCreditNegativePageSize = 5;
}
await this.loadEmployeeCreditNegative();
},
async loadSuspiciousTransactions() {
if (!this.projectId) {
this.suspiciousTransactionList = [];
@@ -407,6 +484,33 @@ export default {
this.suspiciousLoading = false;
}
},
async loadEmployeeCreditNegative() {
if (!this.projectId) {
this.employeeCreditNegativeList = [];
this.employeeCreditNegativeTotal = 0;
this.employeeCreditNegativeLoading = false;
return;
}
this.employeeCreditNegativeLoading = true;
try {
const response = await getOverviewEmployeeCreditNegative({
projectId: this.projectId,
pageNum: this.employeeCreditNegativePageNum,
pageSize: 5,
});
const data = (response && response.data) || {};
this.employeeCreditNegativeList = Array.isArray(data.rows) ? data.rows : [];
this.employeeCreditNegativeTotal = Number(data.total) || 0;
} catch (error) {
this.employeeCreditNegativeList = [];
this.employeeCreditNegativeTotal = 0;
this.$message.error("加载员工负面征信信息失败");
console.error("加载员工负面征信信息失败", error);
} finally {
this.employeeCreditNegativeLoading = false;
}
},
async hydrateSuspiciousRows(rows) {
const safeRows = Array.isArray(rows) ? rows : [];
if (!safeRows.length) {
@@ -526,6 +630,12 @@ export default {
}
return String(value);
},
formatIdCard(value) {
if (value === null || value === undefined || value === "") {
return "-";
}
return String(value);
},
formatAmount(value) {
if (value === null || value === undefined || value === "") {
return "-";

View File

@@ -118,6 +118,31 @@ export const mockOverviewData = {
actionLabel: "查看详情",
},
],
employeeCreditNegativeTotal: 2,
employeeCreditNegativeList: [
{
personName: "李四",
personId: "331081199003230321",
queryDate: "2026-03-20",
civilCnt: 1,
civilLmt: 120000,
enforceCnt: 0,
enforceLmt: 0,
admCnt: 0,
admLmt: 0,
},
{
personName: "王五",
personId: "331081199003231077",
queryDate: "2026-03-18",
civilCnt: 0,
civilLmt: 0,
enforceCnt: 2,
enforceLmt: 50000,
admCnt: 1,
admLmt: 2000,
},
],
transactionList: [
{
tradeDate: "2024-01-15",
@@ -392,7 +417,23 @@ function normalizeSuspiciousTransactions(rows) {
}));
}
export function createOverviewLoadedData({ projectId, dashboardData, riskPeopleData, riskModelCardsData, suspiciousData } = {}) {
function normalizeEmployeeCreditNegativeRows(rows) {
if (!Array.isArray(rows)) {
return [];
}
return rows.map((item) => ({
...item,
}));
}
export function createOverviewLoadedData({
projectId,
dashboardData,
riskPeopleData,
riskModelCardsData,
suspiciousData,
creditNegativeData,
} = {}) {
return {
...mockOverviewData,
summary: {
@@ -420,6 +461,8 @@ export function createOverviewLoadedData({ projectId, dashboardData, riskPeopleD
suspiciousTransactionList: normalizeSuspiciousTransactions(suspiciousData && suspiciousData.rows),
suspiciousType: "ALL",
total: suspiciousData && suspiciousData.total ? suspiciousData.total : 0,
employeeCreditNegativeList: normalizeEmployeeCreditNegativeRows(creditNegativeData && creditNegativeData.rows),
employeeCreditNegativeTotal: creditNegativeData && creditNegativeData.total ? creditNegativeData.total : 0,
transactionList: normalizeSuspiciousTransactions(suspiciousData && suspiciousData.rows),
abnormalAccountList: [],
},
@@ -448,6 +491,8 @@ export const mockOverviewStateData = {
suspiciousTransactionList: [],
suspiciousType: "ALL",
total: 0,
employeeCreditNegativeList: [],
employeeCreditNegativeTotal: 0,
transactionList: [],
abnormalAccountList: [],
},