fix(bonus): 修复奖金查询跨月查询日期区间不正确的问题
This commit is contained in:
parent
7c45082ca8
commit
7dac4daa72
|
@ -131,15 +131,13 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setDefaultDateRange() {
|
setDefaultDateRange() {
|
||||||
const end = new Date()
|
const end = dayjs().subtract(1, 'day')
|
||||||
const start = new Date()
|
const start = dayjs().subtract(15, 'day')
|
||||||
end.setDate(end.getDate() - 1)
|
this.startDate = start.format('YYYY-MM-DD')
|
||||||
start.setDate(start.getDate() - 15) // 默认查询最近15天
|
this.endDate = end.format('YYYY-MM-DD')
|
||||||
|
|
||||||
this.startDate = this.formatDate(start)
|
this.startDateValue = Number(start.toDate())
|
||||||
this.endDate = this.formatDate(end)
|
this.endDateValue = Number(end.toDate())
|
||||||
this.startDateValue = Number(start)
|
|
||||||
this.endDateValue = Number(end)
|
|
||||||
},
|
},
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
return dayjs(date).format('YYYY-MM-DD')
|
return dayjs(date).format('YYYY-MM-DD')
|
||||||
|
|
Loading…
Reference in New Issue