礼金录入
支出录入
功能区
语音播报
总支出金额:
¥0.00
导入备份数据可以恢复之前的事项和礼金记录
${message}
`; const actions = [ { text: "取消", class: "themed-button-secondary border px-4 py-2 rounded", handler: () => resolve(null) }, { text: "确认", class: "themed-button-primary px-4 py-2 rounded", handler: () => { const passwordInput = document.getElementById("override-password").value; resolve(hashPassword(passwordInput) === currentEvent.passwordHash); }, }, ]; showModal(title, content, actions); setTimeout(() => document.getElementById("override-password")?.focus(), 50); // 确保焦点在密码输入框 }); } // --- UI 渲染与更新 --- /** * 主渲染函数,调用各个子模块进行页面更新。 */ function render() { renderGiftBook(); updateTotals(); updatePageInfo(); } /** * 渲染礼簿内容区域。 * @param {HTMLElement} container - 渲染的目标容器。 * @param {Array} items - 需要渲染的礼金记录数组。 */ function renderGiftBook(container = dom.giftBookContent, items = gifts.slice((currentPage - 1) * ITEMS_PER_PAGE, currentPage * ITEMS_PER_PAGE)) { container.innerHTML = ""; const nameRow = document.createElement("div"); nameRow.className = "gift-book-row"; const typeRow = document.createElement("div"); typeRow.className = "gift-book-row flex-1"; const amountRow = document.createElement("div"); amountRow.className = "gift-book-row"; for (let i = 0; i < ITEMS_PER_PAGE; i++) { const gift = items[i]; const giftIndex = (currentPage - 1) * ITEMS_PER_PAGE + i; // 姓名栏 const nameCell = document.createElement("div"); nameCell.className = "book-cell name-cell"; if (gift?.data) { const isModified = gift.data.history?.some((h) => h.type === "correction"); const isRemarks = gift.data.remarks; let statusIndicators = `*已备注
") || ""} ${(isModified && "*已修改
") || ""}