diff --git a/src/views/material/lease/materialConfirm/index.vue b/src/views/material/lease/materialConfirm/index.vue index d374a666..2544a1a1 100644 --- a/src/views/material/lease/materialConfirm/index.vue +++ b/src/views/material/lease/materialConfirm/index.vue @@ -544,9 +544,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 = { @@ -575,7 +585,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 = '' diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue index f68a3f05..5a765908 100644 --- a/src/views/material/lease/outBound/index.vue +++ b/src/views/material/lease/outBound/index.vue @@ -115,11 +115,11 @@ prop="preCountNum" > - + > -->