优化资产估值万元展示
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# 资产估值万元展示前端优化实施记录
|
||||
|
||||
## 修改内容
|
||||
|
||||
- 员工信息维护详情中的资产“当前估值”改为按万元展示,后端返回值和提交值仍按元处理。
|
||||
- 员工资产导入失败记录补充展示“当前估值”,并按万元展示。
|
||||
- 员工亲属关系维护详情和亲属资产导入失败记录中的“当前估值”改为按万元展示。
|
||||
- 项目详情专项排查中的“家庭总资产”、展开详情“总资产”和资产分组金额改为按万元展示;收入、负债及比率计算保持原有口径。
|
||||
|
||||
## 影响范围
|
||||
|
||||
- 仅影响前端只读展示,不修改新增、编辑、导入模板、接口参数、后端汇总逻辑和数据库存储单位。
|
||||
- 表单中的资产原值、当前估值输入仍按元填写和校验。
|
||||
|
||||
## 验证记录
|
||||
|
||||
- 已执行 `source ~/.nvm/nvm.sh && nvm use && npm run build:prod`,构建成功;仅出现项目既有资源体积 warning。
|
||||
- 已启动后端和前端开发服务,通过真实页面验证:
|
||||
- 员工信息维护详情:员工 `1000328` 的资产 `currentValue=1880000.00` 展示为 `188.00 万元`。
|
||||
- 员工亲属关系维护详情:关系人证件号 `320101199109243671` 的亲属资产 `currentValue=1880000.00` 展示为 `188.00 万元`,资产原值仍按原字段展示。
|
||||
- 项目 `90342` 专项排查:员工 `617673198109148314` 的家庭总资产和展开区资产分组均展示为 `188.00 万元`,收入、负债仍按原单位展示。
|
||||
- 页面控制台仅发现既有 `Vue-Treeselect` 动态加载配置 warning,与本次资产估值展示改动无关。
|
||||
- 测试完成后已停止本次启动的后端和前端服务,确认 `8080`、`62318` 端口无本次服务监听。
|
||||
@@ -370,7 +370,11 @@
|
||||
<el-table-column label="资产小类" prop="assetSubType" min-width="120" />
|
||||
<el-table-column label="资产名称" prop="assetName" min-width="140" />
|
||||
<el-table-column label="产权占比" prop="ownershipRatio" min-width="100" />
|
||||
<el-table-column label="当前估值" prop="currentValue" min-width="120" />
|
||||
<el-table-column label="当前估值" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatWanAmount(scope.row.currentValue) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产状态" prop="assetStatus" min-width="120" />
|
||||
<el-table-column label="备注" prop="remarks" min-width="160" show-overflow-tooltip />
|
||||
</el-table>
|
||||
@@ -487,6 +491,11 @@
|
||||
<el-table-column label="资产大类" prop="assetMainType" align="center" />
|
||||
<el-table-column label="资产小类" prop="assetSubType" align="center" />
|
||||
<el-table-column label="资产名称" prop="assetName" align="center" />
|
||||
<el-table-column label="当前估值" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatWanAmount(scope.row.currentValue) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="失败原因" prop="errorMessage" align="center" min-width="200" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
@@ -945,6 +954,19 @@ export default {
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
formatWanAmount(value) {
|
||||
if (value === null || value === undefined || value === "") {
|
||||
return "-";
|
||||
}
|
||||
const amount = Number(value);
|
||||
if (!Number.isFinite(amount)) {
|
||||
return "-";
|
||||
}
|
||||
return `${(amount / 10000).toLocaleString("zh-CN", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
})} 万元`;
|
||||
},
|
||||
normalizeAnnualIncome(value) {
|
||||
if (value === null || value === undefined) {
|
||||
return null;
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
<section class="detail-block">
|
||||
<div class="block-header section-header">
|
||||
<div class="block-title">总资产</div>
|
||||
<div class="section-summary-value">{{ formatAmount(totalAsset) }}</div>
|
||||
<div class="section-summary-value">{{ formatWanAmount(totalAsset) }}</div>
|
||||
</div>
|
||||
<div v-if="assetGroups.length" class="summary-group-list">
|
||||
<div v-for="group in assetGroups" :key="group.key" class="summary-group-item">
|
||||
<div class="summary-group-main">
|
||||
<span class="summary-group-name">{{ group.label }}</span>
|
||||
<span class="summary-group-amount">{{ formatAmount(group.amount) }}</span>
|
||||
<span class="summary-group-amount">{{ formatWanAmount(group.amount) }}</span>
|
||||
</div>
|
||||
<div class="summary-group-meta">
|
||||
<span class="summary-group-share-label">占比</span>
|
||||
@@ -236,6 +236,16 @@ export default {
|
||||
maximumFractionDigits: 2,
|
||||
})}`;
|
||||
},
|
||||
formatWanAmount(value) {
|
||||
const amount = Number(value || 0);
|
||||
if (!Number.isFinite(amount)) {
|
||||
return "-";
|
||||
}
|
||||
return `${(amount / 10000).toLocaleString("zh-CN", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
})} 万元`;
|
||||
},
|
||||
buildAmountGroups(items, amountField, resolveLabel, totalAmount) {
|
||||
const groupMap = items.reduce((result, item, index) => {
|
||||
const label = resolveLabel(item);
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="家庭总资产" min-width="140">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatAmount(scope.row.totalAsset) }}</span>
|
||||
<span>{{ formatWanAmount(scope.row.totalAsset) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险情况" min-width="120">
|
||||
@@ -146,6 +146,16 @@ export default {
|
||||
maximumFractionDigits: 2,
|
||||
})} 元`;
|
||||
},
|
||||
formatWanAmount(value) {
|
||||
const amount = Number(value || 0);
|
||||
if (!Number.isFinite(amount)) {
|
||||
return "-";
|
||||
}
|
||||
return `${(amount / 10000).toLocaleString("zh-CN", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2,
|
||||
})} 万元`;
|
||||
},
|
||||
async handleToggleDetail(row) {
|
||||
if (!row || !row.staffIdCard) {
|
||||
return;
|
||||
@@ -191,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.formatAmount(row.totalAsset)},风险情况${row.riskLevelName || "-" }。`;
|
||||
const evidenceSummary = `${row.staffName}家庭资产负债核查:家庭总年收入${this.formatAmount(row.totalIncome)},家庭总负债${this.formatAmount(row.totalDebt)},家庭总资产${this.formatWanAmount(row.totalAsset)},风险情况${row.riskLevelName || "-" }。`;
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "ASSET",
|
||||
relatedPersonName: row.staffName || "关联人员",
|
||||
|
||||
@@ -512,7 +512,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产原值" prop="originalValue" min-width="120" />
|
||||
<el-table-column label="当前估值" prop="currentValue" min-width="120" />
|
||||
<el-table-column label="当前估值" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatWanAmount(scope.row.currentValue) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="估值截止日期" prop="valuationDate" min-width="140">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.valuationDate ? parseTime(scope.row.valuationDate, '{y}-{m}-{d}') : '-' }}</span>
|
||||
@@ -641,7 +645,11 @@
|
||||
<el-table-column label="资产大类" prop="assetMainType" align="center" min-width="120" />
|
||||
<el-table-column label="资产小类" prop="assetSubType" align="center" min-width="120" />
|
||||
<el-table-column label="资产名称" prop="assetName" align="center" min-width="150" />
|
||||
<el-table-column label="当前估值" prop="currentValue" align="center" min-width="120" />
|
||||
<el-table-column label="当前估值" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatWanAmount(scope.row.currentValue) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产状态" prop="assetStatus" align="center" min-width="120" />
|
||||
<el-table-column label="失败原因" prop="errorMessage" align="center" min-width="220" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
@@ -964,6 +972,19 @@ export default {
|
||||
this.staffOptions = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
formatWanAmount(value) {
|
||||
if (value === null || value === undefined || value === "") {
|
||||
return "-";
|
||||
}
|
||||
const amount = Number(value);
|
||||
if (!Number.isFinite(amount)) {
|
||||
return "-";
|
||||
}
|
||||
return `${(amount / 10000).toLocaleString("zh-CN", {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
})} 万元`;
|
||||
},
|
||||
normalizeAnnualIncome(value) {
|
||||
if (value === null || value === undefined) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user