fix(bonus): 修复奖金查询跨月查询日期区间不正确的问题
This commit is contained in:
parent
7c45082ca8
commit
7dac4daa72
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue