From 87b3cbe344f66bad0551123b755b5b66b3ddb858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B?= <994041296@163.com> Date: Sun, 23 Apr 2023 09:33:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=A1=E9=A2=9D=E6=B4=BB=E5=8A=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0card=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/full-discount/full-discount.vue | 112 +++++------------- 1 file changed, 29 insertions(+), 83 deletions(-) diff --git a/seller/src/views/promotion/full-discount/full-discount.vue b/seller/src/views/promotion/full-discount/full-discount.vue index 0e55855b..012efdea 100644 --- a/seller/src/views/promotion/full-discount/full-discount.vue +++ b/seller/src/views/promotion/full-discount/full-discount.vue @@ -1,29 +1,12 @@ - + @@ -120,7 +64,7 @@ import { } from "@/api/promotion.js"; export default { name: "full-cut", - data() { + data () { return { total: 0, selectDate: [], @@ -198,31 +142,31 @@ export default { }, methods: { // 改变页码 - newAct() { + newAct () { this.$router.push({ name: "full-discount-detail" }); }, // 初始化数据 - init() { + init () { this.getDataList(); }, // 改变页数 - changePage(v) { + changePage (v) { this.searchForm.pageNumber = v; this.getDataList(); }, // 改变页码 - changePageSize(v) { + changePageSize (v) { this.searchForm.pageSize = v; this.getDataList(); }, // 搜索 - handleSearch() { + handleSearch () { this.searchForm.pageNumber = 1; this.searchForm.pageSize = 10; this.getDataList(); }, // 重置 - handleReset() { + handleReset () { this.selectDate = ""; this.searchForm = {}; this.searchForm.pageNumber = 1; @@ -230,11 +174,11 @@ export default { this.getDataList(); }, // 编辑 - edit(row) { + edit (row) { this.$router.push({ name: "full-discount-detail", query: { id: row.id } }); }, // 删除 - del(row) { + del (row) { this.$Modal.confirm({ title: "提示", // 记得确认修改此处 @@ -253,7 +197,7 @@ export default { }); }, // 开启或关闭活动 - openOrClose(row) { + openOrClose (row) { let name = "开启"; let status = "START"; if (row.promotionStatus === "START") { @@ -325,7 +269,7 @@ export default { } }, // 获取列表数据 - getDataList() { + getDataList () { this.loading = true; if (this.selectDate && this.selectDate[0] && this.selectDate[1]) { this.searchForm.startTime = this.selectDate[0].getTime(); @@ -343,17 +287,19 @@ export default { }); }, }, - mounted() { + mounted () { this.init(); }, // 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新 - beforeRouteLeave(to, from, next) { + beforeRouteLeave (to, from, next) { from.meta.keepAlive = false; next(); }, };