refactor: 彻底删除计划模块status字段+新增蓝色tip

- 数据库: DROP plan_finances.status 列(幂等迁移)
- 后端: routes.py TABLES移除status, migrate用显式列名
- 前端: plan.js移除表单/表格/过滤/汇总所有status引用
- planFilter值从待签约改为projects
- 计划页面顶部新增蓝色tip提醒条
- 版本号 v1.0.0.22
This commit is contained in:
mac
2026-07-08 13:21:54 +08:00
parent fdb16d053a
commit a57cba8043
6 changed files with 44 additions and 32 deletions

View File

@@ -121,11 +121,16 @@ def migrate_move_pending_to_plan():
conn = db()
try:
cur = conn.cursor()
# 获取 plan_finances 的列名(排除 status因计划模块已删除该列
cur.execute("SHOW COLUMNS FROM plan_finances")
plan_cols = [row[0] for row in cur.fetchall()]
col_list = ", ".join(plan_cols)
# 仅迁移 id 不存在于计划表的待签约项目
cur.execute(
"INSERT INTO plan_finances "
"SELECT * FROM project_finances WHERE status='待签约' "
"AND id NOT IN (SELECT id FROM plan_finances)"
f"INSERT INTO plan_finances ({col_list}) "
f"SELECT {col_list} FROM project_finances WHERE status='待签约' "
f"AND id NOT IN (SELECT id FROM plan_finances)"
)
moved = cur.rowcount
if moved: