调整专项排查资产收入匹配口径
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
<section class="detail-block">
|
||||
<div class="block-header section-header">
|
||||
<div class="block-title">总收入</div>
|
||||
<div class="section-summary-value">{{ formatAmount(totalIncome) }}</div>
|
||||
<div class="section-summary-value">{{ formatWanAmount(totalIncome) }}</div>
|
||||
</div>
|
||||
<div class="detail-metric-list">
|
||||
<div class="detail-metric-item">
|
||||
<span class="metric-label">本人收入</span>
|
||||
<span class="metric-value">{{ formatAmount(incomeDetail.selfIncome) }}</span>
|
||||
<span class="metric-value">{{ formatWanAmount(incomeDetail.selfIncome) }}</span>
|
||||
</div>
|
||||
<div class="detail-metric-item">
|
||||
<span class="metric-label">配偶收入</span>
|
||||
<span class="metric-value">{{ formatAmount(incomeDetail.spouseIncome) }}</span>
|
||||
<span class="metric-value">{{ formatWanAmount(incomeDetail.spouseIncome) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -69,7 +69,7 @@
|
||||
<span class="metric-card-value">{{ assetDebtRatio }}</span>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<span class="metric-card-label">资产/收入比</span>
|
||||
<span class="metric-card-label">资产收入倍数</span>
|
||||
<span class="metric-card-value">{{ assetIncomeRatio }}</span>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
@@ -86,7 +86,9 @@
|
||||
</div>
|
||||
<div class="result-card" :class="[`result-card--${riskResult.type}`]">
|
||||
<div class="result-card-label">结论</div>
|
||||
<div class="result-card-value">{{ riskResult.text }}</div>
|
||||
<div class="result-card-value">
|
||||
<div v-for="line in riskResult.lines" :key="line" class="result-card-line">{{ line }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -115,7 +117,9 @@ export default {
|
||||
: {
|
||||
selfIncome: 0,
|
||||
spouseIncome: 0,
|
||||
employmentYears: null,
|
||||
totalIncome: 0,
|
||||
explainableIncome: 0,
|
||||
};
|
||||
},
|
||||
summary() {
|
||||
@@ -160,6 +164,15 @@ export default {
|
||||
totalDebt() {
|
||||
return this.resolveAmount(this.summary.totalDebt, this.debtDetail.totalDebt);
|
||||
},
|
||||
employmentYears() {
|
||||
const target = this.summary.employmentYears !== undefined && this.summary.employmentYears !== null
|
||||
? this.summary.employmentYears
|
||||
: this.incomeDetail.employmentYears;
|
||||
return target === undefined || target === null || target === "" ? null : Number(target);
|
||||
},
|
||||
explainableIncome() {
|
||||
return this.resolveAmount(this.summary.explainableIncome, this.incomeDetail.explainableIncome);
|
||||
},
|
||||
assetItems() {
|
||||
return Array.isArray(this.assetDetail.items) ? this.assetDetail.items : [];
|
||||
},
|
||||
@@ -184,12 +197,10 @@ export default {
|
||||
isPercent: true,
|
||||
});
|
||||
},
|
||||
// 资产/收入比 = totalAsset / totalIncome
|
||||
// 资产收入倍数 = totalAsset / explainableIncome
|
||||
assetIncomeRatio() {
|
||||
return this.formatMetricValue(this.totalAsset / this.totalIncome, {
|
||||
denominator: this.totalIncome,
|
||||
suffix: "倍",
|
||||
});
|
||||
const ratio = this.resolveRatio(this.summary.assetIncomeRatio, this.totalAsset, this.explainableIncome);
|
||||
return this.formatRatio(ratio);
|
||||
},
|
||||
// 负债/收入比 = totalDebt / totalIncome
|
||||
debtIncomeRatio() {
|
||||
@@ -202,22 +213,22 @@ export default {
|
||||
const riskResultMap = {
|
||||
NORMAL: {
|
||||
name: this.summary.riskLevelName || "正常",
|
||||
text: "结构基本合理",
|
||||
lines: this.buildResultLines(),
|
||||
type: "success",
|
||||
},
|
||||
RISK: {
|
||||
name: this.summary.riskLevelName || "存在风险",
|
||||
text: "负债与收入压力偏高",
|
||||
name: this.summary.riskLevelName || "关注",
|
||||
lines: this.buildResultLines(),
|
||||
type: "warning",
|
||||
},
|
||||
HIGH: {
|
||||
name: this.summary.riskLevelName || "高风险",
|
||||
text: "资产负债结构明显异常",
|
||||
name: this.summary.riskLevelName || "高关注",
|
||||
lines: this.buildResultLines(),
|
||||
type: "danger",
|
||||
},
|
||||
MISSING_INFO: {
|
||||
name: this.summary.riskLevelName || "缺少信息",
|
||||
text: "当前信息不完整",
|
||||
lines: [this.buildMissingInfoLine()],
|
||||
type: "info",
|
||||
},
|
||||
};
|
||||
@@ -246,6 +257,46 @@ export default {
|
||||
maximumFractionDigits: 2,
|
||||
})} 万元`;
|
||||
},
|
||||
buildResultLines() {
|
||||
return [
|
||||
`家庭总资产:${this.formatWanAmount(this.totalAsset)}`,
|
||||
`可解释收入:本人年收入 ${this.formatWanAmount(this.incomeDetail.selfIncome)} × 入职年限 ${this.employmentYears || "-"} 年 + 配偶年收入 ${this.formatWanAmount(this.incomeDetail.spouseIncome)} + 家庭总负债 ${this.formatWanAmount(this.totalDebt)} = ${this.formatWanAmount(this.explainableIncome)}`,
|
||||
`资产收入倍数:${this.formatRatio(this.resolveRatio(this.summary.assetIncomeRatio, this.totalAsset, this.explainableIncome))}`,
|
||||
];
|
||||
},
|
||||
buildMissingInfoLine() {
|
||||
const missing = [];
|
||||
if (this.resolveAmount(this.incomeDetail.selfIncome) <= 0) {
|
||||
missing.push("收入");
|
||||
}
|
||||
if (this.resolveAmount(this.totalAsset) <= 0) {
|
||||
missing.push("资产");
|
||||
}
|
||||
if (!this.employmentYears) {
|
||||
missing.push("入职时间");
|
||||
}
|
||||
return missing.length === 1
|
||||
? `缺少${missing[0]},暂无法判断。`
|
||||
: "关键信息不完整,暂无法判断。";
|
||||
},
|
||||
resolveRatio(preferred, numerator, denominator) {
|
||||
if (preferred !== undefined && preferred !== null && preferred !== "") {
|
||||
const ratio = Number(preferred);
|
||||
return Number.isFinite(ratio) ? ratio : null;
|
||||
}
|
||||
const divisor = Number(denominator || 0);
|
||||
if (!divisor) {
|
||||
return null;
|
||||
}
|
||||
const ratio = Number(numerator || 0) / divisor;
|
||||
return Number.isFinite(ratio) ? ratio : null;
|
||||
},
|
||||
formatRatio(value) {
|
||||
if (value === null || value === undefined || !Number.isFinite(Number(value))) {
|
||||
return "-";
|
||||
}
|
||||
return Number(value).toFixed(2);
|
||||
},
|
||||
buildAmountGroups(items, amountField, resolveLabel, totalAmount) {
|
||||
const groupMap = items.reduce((result, item, index) => {
|
||||
const label = resolveLabel(item);
|
||||
@@ -467,6 +518,11 @@ export default {
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.result-card-line {
|
||||
line-height: 1.7;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.empty-hint {
|
||||
font-size: 13px;
|
||||
color: #94a3b8;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<template slot="empty">
|
||||
<el-empty :image-size="80" description="暂无员工家庭资产负债核查数据" />
|
||||
</template>
|
||||
<el-table-column type="expand" width="1">
|
||||
<el-table-column type="expand" width="1" class-name="family-expand-column">
|
||||
<template slot-scope="scope">
|
||||
<div class="family-detail-wrapper">
|
||||
<div class="family-detail-toolbar">
|
||||
@@ -47,7 +47,7 @@
|
||||
<el-table-column prop="deptName" label="所属部门" min-width="140" />
|
||||
<el-table-column label="家庭总年收入" min-width="140">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatAmount(scope.row.totalIncome) }}</span>
|
||||
<span>{{ formatWanAmount(scope.row.totalIncome) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="家庭总负债" min-width="140">
|
||||
@@ -201,7 +201,7 @@ export default {
|
||||
}
|
||||
const detail = this.detailCache[row.staffIdCard] || {};
|
||||
const summary = detail.summary || {};
|
||||
const evidenceSummary = `${row.staffName}家庭资产负债核查:家庭总年收入${this.formatAmount(row.totalIncome)},家庭总负债${this.formatAmount(row.totalDebt)},家庭总资产${this.formatWanAmount(row.totalAsset)},风险情况${row.riskLevelName || "-" }。`;
|
||||
const evidenceSummary = `${row.staffName}家庭资产负债核查:家庭总年收入${this.formatWanAmount(row.totalIncome)},家庭总负债${this.formatAmount(row.totalDebt)},家庭总资产${this.formatWanAmount(row.totalAsset)},风险情况${row.riskLevelName || "-" }。`;
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "ASSET",
|
||||
relatedPersonName: row.staffName || "关联人员",
|
||||
@@ -291,4 +291,9 @@ export default {
|
||||
background: #f8fafc;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
::v-deep .family-expand-column .cell,
|
||||
::v-deep .family-expand-column .el-table__expand-icon {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user