錫安組聚餐費用計算機

輕鬆管理聚餐費用,公平分攤開支,讓友誼更加純粹

開始使用

這是一個通用的聚餐費用計算機,可以幫助您:

  • 記錄聚餐人數與參與者資訊
  • 新增各項支出與購買者資訊
  • 自動計算每人應分攤的費用
  • 產生詳細的收支明細報表

使用提示

先設定總人數與負責人

新增所有支出項目與購買者

點擊計算按鈕取得結果

可以手動記錄計算結果

`; printWindow.document.write(html); printWindow.document.close(); printWindow.print(); }); // Show toast notification function showToast(type, message) { if (type === 'success') { toastIcon.innerHTML = ''; toast.className = toast.className.replace(/bg-\w+/, 'bg-green-50 border-green-200'); } else if (type === 'error') { toastIcon.innerHTML = ''; toast.className = toast.className.replace(/bg-\w+/, 'bg-red-50 border-red-200'); } else if (type === 'info') { toastIcon.innerHTML = ''; toast.className = toast.className.replace(/bg-\w+/, 'bg-blue-50 border-blue-200'); } toastMessage.textContent = message; toast.classList.add('border', 'transform-none'); toast.classList.remove('translate-x-full'); setTimeout(() => { toast.classList.add('translate-x-full'); }, 3000); } // Add CSS animations const style = document.createElement('style'); style.textContent = ` @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } } .animate-fadeIn { animation: fadeIn 0.5s ease-out; } .animate-fadeOut { animation: fadeOut 0.5s ease-in; } .input-focus { transition: all 0.3s ease; } .input-focus:focus { transform: translateY(-1px); } .btn-primary, .btn-secondary, .btn-accent { position: relative; overflow: hidden; } .btn-primary::before, .btn-secondary::before, .btn-accent::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s; } .btn-primary:hover::before, .btn-secondary:hover::before, .btn-accent:hover::before { left: 100%; } `; document.head.appendChild(style); // Keyboard shortcuts document.addEventListener('keydown', (e) => { if ((e.ctrlKey || e.metaKey) && e.key === 'Enter' && !resultSection.classList.contains('hidden')) { calculateBtn.click(); } });