feat: 计划模块新增客户/项目类型/加权字段+内联编辑
- plan_finances新增client_name/project_type/weight三列 - 表格新增客户/加权(内联下拉)/项目类型(内联下拉)三列 - 删除毛利率/付款率列 - 表头列定义修复(清理status残留空行) - planInlineUpdate支持表格内直接修改 - 版本号 v1.0.0.25
This commit is contained in:
@@ -115,6 +115,13 @@ def migrate_add_columns():
|
||||
conn.commit()
|
||||
print("[migrate] 加列迁移完成")
|
||||
|
||||
# plan_finances 新增字段
|
||||
_add_column_if_missing(conn, "plan_finances", "client_name",
|
||||
"ALTER TABLE plan_finances ADD COLUMN client_name VARCHAR(200) NOT NULL DEFAULT ''")
|
||||
_add_column_if_missing(conn, "plan_finances", "project_type",
|
||||
"ALTER TABLE plan_finances ADD COLUMN project_type VARCHAR(50) NOT NULL DEFAULT '待签约'")
|
||||
_add_column_if_missing(conn, "plan_finances", "weight",
|
||||
"ALTER TABLE plan_finances ADD COLUMN weight VARCHAR(10) NOT NULL DEFAULT '20%'")
|
||||
# 删除 plan_finances.status 列(计划模块不再需要状态字段)
|
||||
cur = conn.cursor()
|
||||
cur.execute("SHOW COLUMNS FROM plan_finances LIKE 'status'")
|
||||
|
||||
@@ -25,7 +25,7 @@ TABLES = {
|
||||
"tasks": ("project_tasks", ["project_id", "phase", "milestone", "task", "owner", "due_date", "blockers", "notes", "status", "sort_order", "priority", "tenant"]),
|
||||
"projectFinances": ("project_finances", ["project_id", "tenant", "business_type", "customer_name", "sign_amount", "sign_month", "sales_person", "owner", "total_rev", "total_gross", "total_payment", "total_cost", "total_paid", "budget_data", "expense_data", "start_date", "end_date", "task_type", "task_count", "service_fee_standard", "project_manager", "task_data", "project_code", "contact_name", "contact_phone", "other_info"]),
|
||||
"expense": ("expense_records", ["expense_type", "expense_month", "amount", "incurred_amount", "notes", "status", "tenant"]),
|
||||
"planFinances": ("plan_finances", ["project_id", "tenant", "business_type", "customer_name", "sign_amount", "sign_month", "sales_person", "owner", "total_rev", "total_gross", "total_payment", "total_cost", "total_paid", "budget_data", "expense_data", "start_date", "end_date", "task_type", "task_count", "service_fee_standard", "project_manager", "task_data", "project_code", "contact_name", "contact_phone", "other_info"]),
|
||||
"planFinances": ("plan_finances", ["project_id", "tenant", "business_type", "customer_name", "sign_amount", "sign_month", "sales_person", "owner", "total_rev", "total_gross", "total_payment", "total_cost", "total_paid", "budget_data", "expense_data", "start_date", "end_date", "task_type", "task_count", "service_fee_standard", "project_manager", "task_data", "project_code", "contact_name", "contact_phone", "other_info", "client_name", "project_type", "weight"]),
|
||||
"planExpense": ("plan_expense_records", ["expense_type", "expense_month", "amount", "incurred_amount", "notes", "status", "tenant"]),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user