feat: 优化预算管理界面,增强预算编辑功能,添加预算删除接口
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
孙诚
2026-01-07 19:19:53 +08:00
parent 851886a601
commit 35a856c6e3
5 changed files with 267 additions and 134 deletions

View File

@@ -12,6 +12,8 @@ public class BudgetDto
public bool IsStopped { get; set; }
public string StartDate { get; set; } = string.Empty;
public string Period { get; set; } = string.Empty;
public DateTime? PeriodStart { get; set; }
public DateTime? PeriodEnd { get; set; }
public static BudgetDto FromEntity(BudgetRecord entity, decimal currentAmount = 0, DateTime? referenceDate = null)
{
@@ -38,7 +40,9 @@ public class BudgetDto
BudgetPeriodType.Month => $"{start:yy}年第{start.Month}月",
BudgetPeriodType.Week => $"{start:yy}年第{System.Globalization.CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(start, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday)}周",
_ => $"{start:yyyy-MM-dd} ~ {end:yyyy-MM-dd}"
}
},
PeriodStart = start,
PeriodEnd = end
};
}
}