lilei 2 lat temu
rodzic
commit
417cf25eea

+ 30 - 14
src/views/numsGoodsShelves/redPacket/redPacketStatistics.vue

@@ -242,27 +242,43 @@ export default {
     },
     // 标记发布
     handlePublish (row) {
-      this.spinning = true
-      rewardOrderGiveReward({ id: row.id }).then(res => {
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要标记为已发布吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          rewardOrderGiveReward({ id: row.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
         }
-        this.spinning = false
       })
     },
     // 批量发布
     plPublish () {
+      const _this = this
       if (this.totalChoose) {
-        this.spinning = true
-        rewardOrderGiveRewardBatch({
-          idList: this.rowSelectionInfo.selectedRowKeys
-        }).then(res => {
-          if (res.status == 200) {
-            this.$message.success(res.message)
-            this.$refs.table.refresh()
+        this.$confirm({
+          title: '提示',
+          content: '确认要批量标记为已发布吗?',
+          centered: true,
+          onOk () {
+            _this.spinning = true
+            rewardOrderGiveRewardBatch({
+              idList: _this.rowSelectionInfo.selectedRowKeys
+            }).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.$refs.table.refresh()
+              }
+              _this.spinning = false
+            })
           }
-          this.spinning = false
         })
       } else {
         this.$message.warning('请选择要批量标记为发布的活动!')