zxl
2 天以前 b1c9a5d056e85fe8b0ee6e92f10e6e2c5495b356
manager/src/views/activity-prize/prize.vue
@@ -588,6 +588,7 @@
    handleRowClick(currentRow ,oldCurrentRow){
      this.prizeFrom.couponId = currentRow.id;
      this.showCoupon = currentRow.couponName;
      console.log(this.prizeFrom.couponId)
    },
    getCouponDataList() {
      // 获取数据
@@ -595,7 +596,6 @@
      getPlatformCouponList(this.couponSearchForm).then((res) => {
        this.couponLoading = false;
        if (res.success) {
          console.log(res);
          this.couponData = res.result.records;
          this.couponTotal = res.result.total;
        }
@@ -701,7 +701,7 @@
      this.modelShow = false
      this.submitLoading = false
      this.showCoupon = '';
      this.$refs.form.resetFields()
    },
    getPage(){
      this.loading = true;
@@ -723,10 +723,13 @@
      this.infoModalShow = false;
    },
    openEdit(row){
      this.$refs.form.resetFields();
      //重置id
      //需要判断是否可以编辑
      canUpDatePrizeDraw(row.id).then(res =>{
        if (res.code === 200){
          if (res.state){
            console.log(res.data)
            this.modelShow = true;
            this.modelTitle = "编辑奖品";
            this.prizeFrom ={
@@ -758,6 +761,9 @@
    },
    openAdd(){
      this.$refs.form.resetFields()
      //重置id
      this.prizeFrom.id = null;
      this.modelShow = true;
      this.modelTitle = "新增奖品";
      //清除表单状态.
@@ -767,15 +773,28 @@
      this.imgTempUrl = null;
      this.showCoupon = null;
    },
    delById(row){
      del(row.id).then(res=>{
        if (res.code === 200){
          this.$Message.success(res.msg)
        }else {
          this.$Message.error(res.msg)
    async delById(row){
      let status = false
     await canUpDatePrizeDraw(row.id).then(res => {
        if (res.code === 200) {
          status = res.state;
        }
        this.getPage()
      })
      });
     if (status){
       await del(row.id).then(res=>{
         if (res.code === 200){
           this.$Message.success(res.msg)
         }else {
           this.$Message.error(res.msg)
         }
         this.getPage()
       })
     }else {
       this.$Message.error("该奖品在抽奖活动中无法删除!")
     }
    },
    // 获取富文本编辑器的内容
    // 初始化数据