diff --git a/src/views/material/lease/clerkConfirmation/index.vue b/src/views/material/lease/clerkConfirmation/index.vue index e559e186..66ad656f 100644 --- a/src/views/material/lease/clerkConfirmation/index.vue +++ b/src/views/material/lease/clerkConfirmation/index.vue @@ -555,9 +555,19 @@ export default { if (this.$route.query.code) { this.queryParams.keyWord = this.$route.query.code } + const end = new Date() + let start = new Date() + start.setMonth(start.getMonth() - 1) + this.queryParams.time = [this.format(start), this.format(end)] this.getList() }, methods: { + format(date) { + const y = date.getFullYear() + const m = String(date.getMonth() + 1).padStart(2, '0') + const day = String(date.getDate()).padStart(2, '0') + return `${y}-${m}-${day}` + }, getList() { this.loading = true const params = { @@ -586,7 +596,10 @@ export default { }, /** 重置按钮操作 */ resetQuery() { - this.queryParams.time = [] + const end = new Date() + let start = new Date() + start.setMonth(start.getMonth() - 1) + this.queryParams.time = [this.format(start), this.format(end)] this.queryParams.taskStatus = '' this.queryParams.keyWord = '' this.queryParams.isConfirm = ''