diff --git a/Repository/TransactionRecordRepository.cs b/Repository/TransactionRecordRepository.cs index ca5634a..a283e10 100644 --- a/Repository/TransactionRecordRepository.cs +++ b/Repository/TransactionRecordRepository.cs @@ -16,6 +16,7 @@ public interface ITransactionRecordRepository : IBaseRepository筛选交易类型 /// 筛选年份 /// 筛选月份 + /// 筛选交易摘要 /// 是否按金额降序排列,默认为false按时间降序 /// 交易记录列表 Task> GetPagedListAsync( @@ -26,6 +27,7 @@ public interface ITransactionRecordRepository : IBaseRepository @@ -36,7 +38,8 @@ public interface ITransactionRecordRepository : IBaseRepository /// 获取所有不同的交易分类 @@ -192,6 +195,7 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository(); @@ -201,7 +205,9 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository t.Reason.Contains(searchKeyword!) || t.Classify.Contains(searchKeyword!) || t.Card.Contains(searchKeyword!) || - t.ImportFrom.Contains(searchKeyword!)); + t.ImportFrom.Contains(searchKeyword!)) + .WhereIf(!string.IsNullOrWhiteSpace(reason), + t => t.Reason == reason); // 按分类筛选 if (!string.IsNullOrWhiteSpace(classify)) @@ -250,7 +256,8 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository(); @@ -259,7 +266,9 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository t.Reason.Contains(searchKeyword!) || t.Classify.Contains(searchKeyword!) || t.Card.Contains(searchKeyword!) || - t.ImportFrom.Contains(searchKeyword!)); + t.ImportFrom.Contains(searchKeyword!)) + .WhereIf(!string.IsNullOrWhiteSpace(reason), + t => t.Reason == reason); // 按分类筛选 if (!string.IsNullOrWhiteSpace(classify)) diff --git a/Web/src/components/PopupContainer.vue b/Web/src/components/PopupContainer.vue new file mode 100644 index 0000000..f4f72a3 --- /dev/null +++ b/Web/src/components/PopupContainer.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/Web/src/components/ReasonGroupList.vue b/Web/src/components/ReasonGroupList.vue new file mode 100644 index 0000000..1657ac6 --- /dev/null +++ b/Web/src/components/ReasonGroupList.vue @@ -0,0 +1,707 @@ + + + + + diff --git a/Web/src/components/TransactionDetailDialog.vue b/Web/src/components/TransactionDetailDialog.vue new file mode 100644 index 0000000..574cc6e --- /dev/null +++ b/Web/src/components/TransactionDetailDialog.vue @@ -0,0 +1,410 @@ + + + + + diff --git a/Web/src/views/CalendarView.vue b/Web/src/views/CalendarView.vue index e0b0e55..8caa5e3 100644 --- a/Web/src/views/CalendarView.vue +++ b/Web/src/views/CalendarView.vue @@ -12,44 +12,27 @@ /> - - - + + + { }); if(balance >= 0) { - return `结余收入 ${balance.toFixed(1)} 元`; + return `结余收入 ${balance.toFixed(1)} 元`; } else { - return `结余支出 ${(-balance).toFixed(1)} 元`; + return `结余支出 ${(-balance).toFixed(1)} 元`; } }; @@ -300,45 +284,4 @@ fetchDailyStatistics(now.getFullYear(), now.getMonth() + 1); background: transparent !important; } -/* 弹窗头部样式 */ -.popup-header-fixed { - padding: 16px; - position: relative; -} - -.close-icon { - position: absolute; - top: 16px; - left: 16px; - font-size: 18px; - color: #969799; - cursor: pointer; - z-index: 10; -} - -.date-title { - text-align: center; - margin: 0 0 12px; - font-size: 16px; - font-weight: 500; -} - -.header-stats { - display: flex; - justify-content: space-between; - align-items: center; - gap: 12px; -} - -.header-stats p { - flex: 1; - margin: 0; - font-size: 14px; - color: #646566; -} - -.popup-scroll-content { - padding-top: 8px; -} - diff --git a/Web/src/views/ClassificationBatch.vue b/Web/src/views/ClassificationBatch.vue index bfa96e3..b207dd7 100644 --- a/Web/src/views/ClassificationBatch.vue +++ b/Web/src/views/ClassificationBatch.vue @@ -9,14 +9,13 @@ />
- -
- 未分类账单数: {{ unclassifiedCount }} -
+ +
+ 未分类账单数: {{ unclassifiedCount }} +
- -
- + + - - - - - - - +
- - - - - - - - - - - - - - - - - - - - -
- - {{ item.text }} - - - + 新增 - - - 清空 - -
-
-
-
- - - - - - - - - - -
\ No newline at end of file diff --git a/Web/src/views/PeriodicRecord.vue b/Web/src/views/PeriodicRecord.vue index 9c91589..9cb00aa 100644 --- a/Web/src/views/PeriodicRecord.vue +++ b/Web/src/views/PeriodicRecord.vue @@ -85,20 +85,12 @@ - - - - + @@ -299,6 +289,7 @@ import { togglePeriodicEnabled } from '@/api/transactionPeriodic' import { getCategoryList, createCategory } from '@/api/transactionCategory' +import PopupContainer from '@/components/PopupContainer.vue' const router = useRouter() const navTitle = ref('周期账单') diff --git a/Web/src/views/StatisticsView.vue b/Web/src/views/StatisticsView.vue index 872a114..c7019a0 100644 --- a/Web/src/views/StatisticsView.vue +++ b/Web/src/views/StatisticsView.vue @@ -277,40 +277,31 @@ - - - + + + + { background: transparent !important; } -/* 弹出层样式 */ -.popup-container { - display: flex; - flex-direction: column; - height: 100%; - overflow: hidden; -} - -.popup-header-fixed { - padding: 16px; - position: relative; -} - -.category-title { - text-align: center; - margin: 0 0 12px; - font-size: 16px; - font-weight: 500; -} - -.header-stats { - display: flex; - justify-content: space-between; - align-items: center; - gap: 12px; -} - -.header-stats p { - margin: 0; - font-size: 13px; - color: var(--van-text-color-2); - flex: 1; -} - -.popup-scroll-content { - flex: 1; - overflow-y: auto; - -webkit-overflow-scrolling: touch; -} - \ No newline at end of file diff --git a/Web/src/views/TransactionsRecord.vue b/Web/src/views/TransactionsRecord.vue index 7c2e45e..cb51a60 100644 --- a/Web/src/views/TransactionsRecord.vue +++ b/Web/src/views/TransactionsRecord.vue @@ -29,83 +29,73 @@ /> - -