peng
2 天以前 6496b3f36d38f3196c4e41d0b9c329de646a2415
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调用
    },