fix(bonus): 修复奖金查询跨月查询日期区间不正确的问题

This commit is contained in:
woody 2025-09-01 10:55:49 +08:00
parent 7c45082ca8
commit 7dac4daa72
1 changed files with 6 additions and 8 deletions

View File

@ -131,15 +131,13 @@ export default {
},
methods: {
setDefaultDateRange() {
const end = new Date()
const start = new Date()
end.setDate(end.getDate() - 1)
start.setDate(start.getDate() - 15) // 15
const end = dayjs().subtract(1, 'day')
const start = dayjs().subtract(15, 'day')
this.startDate = start.format('YYYY-MM-DD')
this.endDate = end.format('YYYY-MM-DD')
this.startDate = this.formatDate(start)
this.endDate = this.formatDate(end)
this.startDateValue = Number(start)
this.endDateValue = Number(end)
this.startDateValue = Number(start.toDate())
this.endDateValue = Number(end.toDate())
},
formatDate(date) {
return dayjs(date).format('YYYY-MM-DD')