diff --git a/backend/routes.py b/backend/routes.py index 154d5ae..b90682d 100644 --- a/backend/routes.py +++ b/backend/routes.py @@ -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", "client_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", "client_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"]), + "planFinances": ("plan_finances", ["project_id", "tenant", "business_type", "customer_name", "client_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", "project_type", "weight"]), "planExpense": ("plan_expense_records", ["expense_type", "expense_month", "amount", "incurred_amount", "notes", "status", "tenant"]), } diff --git a/static/modules/plan.js b/static/modules/plan.js index 3c29218..e162e66 100644 --- a/static/modules/plan.js +++ b/static/modules/plan.js @@ -935,13 +935,18 @@ window.createPlanFinance = async (event) => { const result = await api("/api/planFinances", { method: "POST", body: JSON.stringify({ data }) }); if (result.id && data.customer_name) logActivity("finance", result.id, "创建了「" + data.customer_name + "」的财务项目"); } + } catch (error) { + toast("保存失败:" + error.message, "error"); + return; + } + try { form.reset(); document.querySelector("#plan_pf-id-input").value = ""; document.querySelector("#planModalTitle").textContent = "新增项目财务"; closePlanModal(); await load(); } catch (error) { - toast("保存失败:" + error.message, "error"); + toast("刷新失败:" + error.message, "error"); } }; diff --git a/templates/index.html b/templates/index.html index f394156..88cd957 100644 --- a/templates/index.html +++ b/templates/index.html @@ -80,7 +80,7 @@
-

OPC Manager v1.0.0.31

+

OPC Manager v1.0.0.32

科普 OPC 工作台