|
@@ -115,8 +115,16 @@ export default {
|
|
|
},
|
|
|
// 编辑/新增
|
|
|
handleEdit (row) {
|
|
|
+ const _this = this
|
|
|
if (row) { // 编辑
|
|
|
- this.$router.push({ name: 'redPacketEdit', params: { sn: row.rewardRuleSn } })
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认要编辑吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.$router.push({ name: 'redPacketEdit', params: { sn: row.rewardRuleSn } })
|
|
|
+ }
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$router.push({ name: 'redPacketAdd' })
|
|
|
}
|
|
@@ -136,24 +144,40 @@ export default {
|
|
|
},
|
|
|
// 发布
|
|
|
handlePublish (row) {
|
|
|
- this.spinning = true
|
|
|
- rewardRuleRelease({ rewardRuleSn: row.rewardRuleSn }).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
|
|
|
+ rewardRuleRelease({ rewardRuleSn: row.rewardRuleSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ _this.spinning = false
|
|
|
+ })
|
|
|
}
|
|
|
- this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
// 终止
|
|
|
handleEnd (row) {
|
|
|
- this.spinning = true
|
|
|
- rewardRuleClose({ rewardRuleSn: row.rewardRuleSn }).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
|
|
|
+ rewardRuleClose({ rewardRuleSn: row.rewardRuleSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ _this.spinning = false
|
|
|
+ })
|
|
|
}
|
|
|
- this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
// 删除
|