fix(#579): 请修复 Bug #579:[一般] [报表管理-院内整体收入明细查询-门诊收费报表]列表的格式错乱
根因: - `processListWithSubtotals` 中的小计行使用 `...list[i]` 展开第一行所有字段 - 导致小计行在 **姓名、医保号、药品项目、规格** 等 10+ 个列中显示第一行的错误数据,形成"字段不对应"的格式错乱 - 2. 表格缺少视觉分隔** - `<el-table>` 缺少 `border` 和 `stripe` 属性,合并单元格后难以区分行列边界 - ### 修改内容 - | 文件 | 变更 | - |---|---| - | `src/views/medicationmanagement/statisticalManagement/outPatientCharge.vue` | 2 处改动 | - 改动明细:** - 1. **`el-table` 添加 `border` + `stripe`** — 使单元格有清晰边框,交替行色提升可读性 - 2. **小计行移除 `...list[i]` 字段展开** — 小计行仅保留 `departmentName: '小计'` 和 `totalPrice`,其他列自动为空,确保字段一一对应 - ### 验证 - ✅ ESLint 无错误 - ✅ Vite build 编译成功 - ✅ 修改范围最小化(仅 2 处改动,+3/-1 行) 修复: - Bug #579 门诊收费报表格式错乱 - ### 分析过程 - 通过全链路代码审查,发现两个核心问题:
This commit is contained in:
@@ -163,6 +163,8 @@
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
style="padding: 0 20px; width: 100%; height: 67vh"
|
||||
border
|
||||
stripe
|
||||
:data="purchaseinventoryList"
|
||||
:span-method="arraySpanMethod"
|
||||
@selection-change="handleSelectionChange"
|
||||
@@ -660,7 +662,6 @@ function processListWithSubtotals(list) {
|
||||
// 添加小计行(多于1行时才添加)
|
||||
if (rowspan > 1) {
|
||||
const subtotalRow = {
|
||||
...list[i],
|
||||
departmentName: '小计',
|
||||
totalPrice: totalPriceSum.toFixed(4),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user