perf: 计划费用保存/删除性能优化

- 后端新增/api/<resource>/list轻量级列表接口
- plan_expense.js保存/删除后改为轻量刷新,不再调load()
- 避免全量bootstrap+7模块渲染,只刷新费用列表
- 版本号 v1.0.0.37
This commit is contained in:
mac
2026-07-09 16:03:30 +08:00
parent 236d43052e
commit 296917456c
3 changed files with 29 additions and 5 deletions

View File

@@ -199,8 +199,10 @@ window.savePlanExpense = async function(event) {
return;
}
closePlanExpModal();
await load();
renderPlanExpense();
try {
state.data.planExpense = await api("/api/planExpense/list?tenant=" + encodeURIComponent(state.tenant));
renderPlanExpense();
} catch (e) { /* non-critical */ }
};
window.deletePlanExpItem = async function() {
@@ -213,6 +215,8 @@ window.deletePlanExpItem = async function() {
return;
}
closePlanExpModal();
await load();
renderPlanExpense();
try {
state.data.planExpense = await api("/api/planExpense/list?tenant=" + encodeURIComponent(state.tenant));
renderPlanExpense();
} catch (e) { /* non-critical */ }
};