feat: 大版本更新-工作台改版+总报完善+UI优化
工作台改版: - 学会→学术, 总工作台→总览(数据库迁移+session清理) - 侧边栏工作台从下拉菜单改为竖向平铺+独立图标 - 5个工作台去除部门模块, 只有总览显示 - 工作台顺序: 总览→学术→MCN→科普→医患→科研 经营月报+季度月报: - 月度/季度总览改名(月度总览→经营月报, 季度总览→季度月报) - 财务概览增加回款/项目现金流行(7行) - 新增业务线经营情况卡片(毛利/平台费用/利润) - 新增业务线现金流卡片(项目现金流/平台费用已付/业务线现金流) - 季度月报完善为三卡片结构, 与经营月报一致 - 计划模块总览独立数据源(computePlanMonthly) UI优化: - 汇总卡片单行显示+5x2网格+去外层卡片 - 项目表格行高压缩(py-px+line-height:0.95) - 表头不压缩, 只压缩tbody - 加权/项目类型内联下拉去原生箭头+自定义箭头 - 加权/项目类型表头去除排序箭头 - 实际模块已付→支出, 已回款→回款, 成本→成本(不含平台费用) - 现金流注释(回款-支出) - 卡片间距/筛选区/tip高度压缩 - 实际模块增加执行提示tip 修复: - routes.py planFinances client_name列去重 - plan_expense.js savePlanExpense改用api()+load() - plan.js createPlanFinance拆分try-catch - 版本号 v1.0.0.35
This commit is contained in:
@@ -114,3 +114,46 @@ def migrate_fix_expense_status():
|
||||
conn.close()
|
||||
|
||||
|
||||
|
||||
def migrate_rename_xuehui_to_xueshu():
|
||||
"""工作台重命名:学会·无界 → 学术·无界"""
|
||||
from db import db, _exec, mysql
|
||||
conn = db()
|
||||
try:
|
||||
tables = ["project_finances", "plan_finances", "expense_records", "plan_expense_records",
|
||||
"sales_leads", "business_proposals", "product_versions", "operation_projects",
|
||||
"follow_up_records", "project_tasks", "finance_records", "users", "user_tenants"]
|
||||
for table in tables:
|
||||
try:
|
||||
cur = _exec(conn, f"UPDATE {table} SET tenant='学术·无界' WHERE tenant='学会·无界'")
|
||||
affected = cur.rowcount
|
||||
cur.close()
|
||||
if affected:
|
||||
conn.commit()
|
||||
print(f"[migrate] {table}: {affected} 条记录 tenant 改为 '学术·无界'")
|
||||
except mysql.connector.Error:
|
||||
pass
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
def migrate_rename_zong_to_overview():
|
||||
"""工作台重命名:总工作台 → 总览"""
|
||||
from db import db, _exec, mysql
|
||||
conn = db()
|
||||
try:
|
||||
tables = ["project_finances", "plan_finances", "expense_records", "plan_expense_records",
|
||||
"sales_leads", "business_proposals", "product_versions", "operation_projects",
|
||||
"follow_up_records", "project_tasks", "finance_records", "users", "user_tenants"]
|
||||
for table in tables:
|
||||
try:
|
||||
cur = _exec(conn, f"UPDATE {table} SET tenant='总览' WHERE tenant='总工作台'")
|
||||
affected = cur.rowcount
|
||||
cur.close()
|
||||
if affected:
|
||||
conn.commit()
|
||||
print(f"[migrate] {table}: {affected} 条记录 tenant 改为 '总览'")
|
||||
except mysql.connector.Error:
|
||||
pass
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
Reference in New Issue
Block a user