fix: 修复收入预算计算和添加存款计划明细功能
问题1:修复收入预算实际金额计算 - 在 BudgetRepository.cs 中修复 SelectedCategories.Split 逻辑 - 添加 StringSplitOptions.RemoveEmptyEntries 和 StringSplitOptions.TrimEntries 参数 - 添加单元测试验证修复 问题2:添加存款计划明细按钮和弹窗 - 在 BudgetCard.vue 中添加 'show-detail' emit - 为存款计划卡片(category === 2)添加明细按钮 - 在 SavingsBudgetContent.vue 中实现明细弹窗 - 弹窗显示:收入预算、支出预算、计划存款公式、存款结果 问题3:统一卡片样式 - 修复 BudgetChartAnalysis.vue 的卡片样式 - 使用 16px 圆角、增强阴影和边框
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace Repository;
|
||||
namespace Repository;
|
||||
|
||||
public interface IBudgetRepository : IBaseRepository<BudgetRecord>
|
||||
{
|
||||
@@ -16,7 +16,7 @@ public class BudgetRepository(IFreeSql freeSql) : BaseRepository<BudgetRecord>(f
|
||||
|
||||
if (!string.IsNullOrEmpty(budget.SelectedCategories))
|
||||
{
|
||||
var categoryList = budget.SelectedCategories.Split(',');
|
||||
var categoryList = budget.SelectedCategories.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
||||
query = query.Where(t => categoryList.Contains(t.Classify));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user