| | |
| | | |
| | | <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'" |
| | |
| | | @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"> |
| | |
| | | |
| | | <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, |
| | |
| | | { |
| | | title: '操作', |
| | | slot: 'action', |
| | | width: 120, |
| | | width: 200, |
| | | align: 'center' |
| | | }, |
| | | ] |
| | |
| | | this.storeCouponSingleQuery.pageSize = 10 |
| | | this.storeCouponSingleQuery.pageNumber = 1 |
| | | this.getCouponStoreDataList(); |
| | | }, |
| | | generalCoupon(row){ |
| | | generateStoreCoupon(row.id).then(response => { |
| | | this.getList(); |
| | | }) |
| | | }, |
| | | handleStoreChange(storeId) { |
| | | if (storeId) { |
| | |
| | | // 状态改变 |
| | | 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调用 |
| | | }, |
| | | |