forked from angelo/web-retail-h5
feat(bonus): 奖金查询控制
This commit is contained in:
parent
b58166d6e5
commit
22e0e1b1b8
|
@ -92,8 +92,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 注意: 后端API需要支持按日期范围查询奖金明细
|
|
||||||
// import { getBonusDetailsByDate, getTodayBonusTotal } from '@/config/bonus.js';
|
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { queryBonusTotal, queryBonusList } from '@/config/bonus'
|
import { queryBonusTotal, queryBonusList } from '@/config/bonus'
|
||||||
export default {
|
export default {
|
||||||
|
@ -154,10 +152,9 @@ export default {
|
||||||
// 校验区间不能超过31天
|
// 校验区间不能超过31天
|
||||||
const start = dayjs(this.startDate)
|
const start = dayjs(this.startDate)
|
||||||
const end = dayjs(this.endDate)
|
const end = dayjs(this.endDate)
|
||||||
console.log(end.diff(start, 'day'), '...a?')
|
if (end.diff(start, 'day') > 60) {
|
||||||
if (end.diff(start, 'day') > 30) {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '最多只能查询31天内的数据',
|
title: '最多只能查询60天内的数据',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue