fix: 年份动态计算 + 首页布局优化

- 后端所有硬编码2026替换为date.today().year动态计算
- 首页移除4个快捷跳转卡片
- 首页新增时间段筛选下拉框
- 版本号更新至v1.0.0.3
This commit is contained in:
mac
2026-07-07 17:02:47 +08:00
parent 075350a026
commit ec140bf105
4 changed files with 27 additions and 23 deletions

View File

@@ -2,6 +2,7 @@
# 依赖db.py被 routes.py 和 migrations/seed_data.py 调用
import json
from datetime import date
from pathlib import Path
from db import _exec, rows, one
@@ -61,7 +62,8 @@ def attach_common(conn, resource, items):
def monthly_finance(conn, tenant="科普·无界"):
months = [f"2026-{m:02d}" for m in range(1, 13)]
_year = date.today().year
months = [f"{_year}-{m:02d}" for m in range(1, 13)]
pfs = rows(conn,
"SELECT sign_amount, sign_month, status, budget_data, expense_data FROM project_finances WHERE tenant=? AND status='已签约'",
[tenant])