账单列表 - BillAI

账单管理

查看、筛选和手动添加账单记录

{#if activeTab === 'list'} {/if}
{#if activeTab === 'list'}
{#if errorMessage}
{errorMessage}
{/if}
总交易笔数
{totalRecords}

筛选条件下的账单总数

总支出
¥{totalExpense.toFixed(2)}

筛选条件下的支出汇总

总收入
¥{totalIncome.toFixed(2)}

筛选条件下的收入汇总

筛选条件 {#if filterCategory || filterIncomeExpense || filterBillType || startDate || endDate} {/if}
{ applyFilters(); }} />
{filterCategory || '全部'} 全部 {#each categories as cat} {cat} {/each}
{filterIncomeExpense || '全部'} 全部 支出 收入
{filterBillType === 'alipay' ? '支付宝' : filterBillType === 'wechat' ? '微信' : filterBillType === 'jd' ? '京东' : filterBillType === 'manual' ? '手动' : '全部'} 全部 支付宝 微信 京东 手动
{#if isLoading}

加载中...

{:else if displayRecords.length > 0}
时间 分类 金额 {#each displayRecords as record} handleRowClick(record)} > {formatDateTime(record.time)} {record.category} ¥{record.amount.toFixed(2)} {/each}

显示 {(currentPage - 1) * pageSize + 1} - {Math.min(currentPage * pageSize, totalRecords)} 条,共 {totalRecords} 条 {#if searchText} (当前页筛选后:{displayRecords.length} 条) {/if}

{#each (() => { // 计算显示的页码范围(最多显示5页) const maxPages = 5; let start = Math.max(1, currentPage - Math.floor(maxPages / 2)); let end = Math.min(totalPages, start + maxPages - 1); // 如果右侧空间不足,向左调整 if (end - start < maxPages - 1) { start = Math.max(1, end - maxPages + 1); } return Array.from({ length: end - start + 1 }, (_, i) => start + i); })() as page} {/each}
{:else}

没有找到账单记录

请先上传账单或调整筛选条件

{/if}
{/if} {#if activeTab === 'manual'} {/if}