v2.0.3 — 财务增加费用说明输入框 + 明细表默认折叠可展开

This commit is contained in:
mac
2026-06-16 15:49:35 +08:00
parent 68797e4fb5
commit 194c91cf25

View File

@@ -426,8 +426,9 @@ function renderFinance() {
{ label: "日期", input: `<input name="month" type="date" required>` },
{ label: "类型", input: `<select name="category"><option>签单</option><option></option><option></option><option></option><option></option></select>` },
{ label: "金额/万", input: `<input name="amount" type="number" step="0.01" required>` },
{ label: "费用说明", input: `<input name="notes" placeholder="摘要说明">` },
], { handler: "createFinance", text: "新增明细" }), "p-4")}
${renderTable(["日期", "类型", "金额", "备注"], rows)}
${card(`<div class="flex items-center justify-between cursor-pointer" onclick="document.querySelector('#finance-table').classList.toggle('hidden'); this.querySelector('i').classList.toggle('rotate-90')"><h3 class="font-bold text-slate-700">明细列表 <span class="text-slate-400 font-normal">(${state.data.finance.length})</span></h3><i data-lucide="chevron-down" class="transition-transform rotate-90"></i></div><div id="finance-table" class="hidden mt-3">${renderTable(["日期", "类型", "金额", "备注"], rows)}</div>`, "p-4")}
</div>`;
renderChartOn("financeChart2", state.data.financeMonthly);
}