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

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

@@ -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 "-";