From 58f9b26048ee04139a809986f366e3edf98cd7cd Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期日, 28 九月 2025 09:14:04 +0800 Subject: [PATCH] 店铺绑优惠卷领取记录 --- manager/src/views/promotions/coupon/coupon_store.vue | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 deletions(-) diff --git a/manager/src/views/promotions/coupon/coupon_store.vue b/manager/src/views/promotions/coupon/coupon_store.vue index ba7c1ed..8350cb8 100644 --- a/manager/src/views/promotions/coupon/coupon_store.vue +++ b/manager/src/views/promotions/coupon/coupon_store.vue @@ -103,7 +103,14 @@ <template slot-scope="{ row }" slot="action"> <Button + @click="generalCoupon(row)" + type="primary" + class="add-btn" + v-if="row.generateStatus ==='NOT_GENERATE'" + >鐢熸垚浼樻儬鍗�</Button> + <Button @click="detail(row)" + style="margin-left: 10px;" type="primary" class="add-btn" :disabled="row.generateStatus === 'NOT_GENERATE'" @@ -164,7 +171,8 @@ @click="generalQrCode(row)" type="primary" class="add-btn" - >鏌ョ湅</Button> + v-if="row.claimStatus === 'NOT_CLAIM'" + >鏌ョ湅浜岀淮鐮�</Button> </template> </Table> <Row type="flex" justify="center" class="mt_10"> @@ -263,10 +271,10 @@ <script> import vueQr from "vue-qr"; -import {addStoreCoupon, getPage, getPageByStoreCoupon} from "../../../api/coupon-store"; +import {addStoreCoupon, getPage, getPageByStoreCoupon,changeStatus} from "../../../api/coupon-store"; import * as API_Order from "@/api/order"; import {promotionsScopeTypeRender, promotionsStatusRender} from "../../../utils/promotions"; -import {getPlatformCouponList} from "../../../api/promotion"; +import {getPlatformCouponList,generateStoreCoupon} from "../../../api/promotion"; export default { components:{ "vue-qr": vueQr, @@ -530,7 +538,7 @@ { title: '鎿嶄綔', slot: 'action', - width: 120, + width: 200, align: 'center' }, ] @@ -556,6 +564,11 @@ this.storeCouponSingleQuery.pageSize = 10 this.storeCouponSingleQuery.pageNumber = 1 this.getCouponStoreDataList(); + }, + generalCoupon(row){ + generateStoreCoupon(row.id).then(response => { + this.getList(); + }) }, handleStoreChange(storeId) { if (storeId) { @@ -691,8 +704,10 @@ // 鐘舵�佹敼鍙� handleStatusChange(row, status) { const action = status === 'ENABLE' ? '鍚敤' : '绂佺敤'; - this.$Message.success(`宸�${action}浼樻儬鍒�"${row.couponName}"`); - + changeStatus(row.id).then(response => { + this.getList(); + this.$Message.success(`宸�${action}浼樻儬鍒�"${row.couponName}"`); + }) // 杩欓噷鍙互娣诲姞API璋冪敤 }, -- Gitblit v1.8.0