From cb2280406e64fb50d960a830b8f1b8172fe3099d Mon Sep 17 00:00:00 2001
From: yaojian <1161995598@qq.com>
Date: Wed, 11 Mar 2026 16:57:19 +0800
Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E8=B4=B9=E7=AE=A1=E7=90=86=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/stuwork/classfeelog/index.vue | 44 ++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/src/views/stuwork/classfeelog/index.vue b/src/views/stuwork/classfeelog/index.vue
index 0da7b61..0dd7535 100644
--- a/src/views/stuwork/classfeelog/index.vue
+++ b/src/views/stuwork/classfeelog/index.vue
@@ -140,6 +140,13 @@
-
+
+
+
+ ¥{{ scope.row.termBalance.toFixed(2) }}
+
+ -
+
@@ -328,6 +335,7 @@ const tableColumns = [
{ prop: 'operatTime', label: '发生时间', icon: Calendar, width: 180 },
{ prop: 'type', label: '类型', icon: Collection },
{ prop: 'money', label: '金额', icon: Money },
+ { prop: 'termBalance', label: '学期班费结余', icon: Money, width: 120 },
{ prop: 'operator', label: '经办人', icon: User },
{ prop: 'purpose', label: '用途', icon: Document, minWidth: 150 },
{ prop: 'attachment', label: '附件', width: 100 },
@@ -345,7 +353,41 @@ const state: BasicTableProps = reactive({
classCode: '',
type: '',
},
- pageList: fetchList,
+ pageList: async (params: any) => {
+ const res = await fetchList(params);
+ // 后端返回数据结构:IPage
+ // ClassFeeLogRelationVO 包含 moneyTotal 和 classFeeLogVOList
+ if (res.data && res.data.records) {
+ // 展开所有班级的班费记录
+ const allRecords: any[] = [];
+ let totalMoney: number = 0;
+
+ res.data.records.forEach((item: any) => {
+ if (item.classFeeLogVOList && Array.isArray(item.classFeeLogVOList)) {
+ item.classFeeLogVOList.forEach((log: any) => {
+ allRecords.push({
+ ...log,
+ moneyTotal: item.moneyTotal // 添加班费结余到每条记录
+ });
+ });
+ }
+ // 记录总班费结余
+ if (item.moneyTotal !== undefined) {
+ totalMoney = item.moneyTotal;
+ }
+ });
+
+ return {
+ ...res,
+ data: {
+ records: allRecords,
+ total: allRecords.length,
+ moneyTotal: totalMoney // 保留总结余
+ }
+ };
+ }
+ return res;
+ },
props: {
item: 'records',
totalCount: 'total',