From 02771f4edb3fdb46c780ab3025b19d4c2258fd87 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 28 Jul 2025 09:16:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/lease/clerkConfirmation/index.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 = ''