From 1a0d015ebde58481bc9bba4bc7a2b5154fcabfe5 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 26 六月 2026 18:06:07 +0800
Subject: [PATCH] 页面
---
admin/src/views/business/wxBill.vue | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/business/wxBill.vue b/admin/src/views/business/wxBill.vue
index 3f014da..2167718 100644
--- a/admin/src/views/business/wxBill.vue
+++ b/admin/src/views/business/wxBill.vue
@@ -13,6 +13,10 @@
format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
@change="selectDate"
></el-date-picker>
+ <el-button-group class="date-shortcuts">
+ <el-button size="mini" @click="setDateRange(7)">杩�7澶�</el-button>
+ <el-button size="mini" @click="setDateRange(30)">杩�30澶�</el-button>
+ </el-button-group>
</el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
@@ -151,6 +155,23 @@
}
this.search()
},
+ setDateRange (days) {
+ const end = new Date()
+ end.setHours(23, 59, 59, 999)
+ const start = new Date()
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * (days - 1))
+ start.setHours(0, 0, 0, 0)
+ const formatDate = (date) => {
+ const y = date.getFullYear()
+ const m = String(date.getMonth() + 1).padStart(2, '0')
+ const d = String(date.getDate()).padStart(2, '0')
+ return `${y}-${m}-${d}`
+ }
+ this.value1 = [`${formatDate(start)} 00:00:00`, `${formatDate(end)} 00:00:00`]
+ this.searchForm.startDate = this.value1[0]
+ this.searchForm.endDate = this.value1[1]
+ this.search()
+ },
// 椤电爜鍙樻洿澶勭悊
handlePageChange (pageIndex) {
this.__checkApi()
@@ -201,4 +222,7 @@
}
}
}
+.date-shortcuts {
+ margin-left: 10px;
+}
</style>
--
Gitblit v1.9.3