diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue index 3e582b2e9..c64dff22f 100644 --- a/fuintAdmin/src/views/shopowner.vue +++ b/fuintAdmin/src/views/shopowner.vue @@ -373,6 +373,30 @@ export default { sjkbStoreAmount(e){ console.log(e) this.sjkbTitle = e + let command = e + if (command=='今日'){ + let start = new Date(); + start.setHours(0) + start.setMinutes(0) + start.setSeconds(0) + start.setMilliseconds(0) + this.showValue = [start,new Date()] + } else if (command=='近一周'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000) + this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (command=='本月'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000) + this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] + } else if (command=='本年'){ + let nowDate = new Date(); + let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate()) + this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)] + }else if (command=='自定义'){ + this.disabled = false + } + this.getStoreAmount() }, goList() { this.$router.push('/notificationList/index')