finish.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div v-if="data.status !== '结束'" class="inline-16">
  3. <el-button type="primary" slot="reference" size="mini" @click="onShow">结 束</el-button>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. props:['data'],
  9. methods:{
  10. onShow() {
  11. this.$confirm('确定结束该活动嘛?', '提示', {
  12. confirmButtonText: '确定',
  13. cancelButtonText: '取消',
  14. type: 'warning',
  15. closeOnClickModal:false
  16. }).then(() => {
  17. this.finishRow()
  18. }).catch(() => {
  19. this.$message({
  20. type: 'info',
  21. message: '已取消结束该活动'
  22. });
  23. });
  24. },
  25. async finishRow () {
  26. const res = await this.$api.requested({
  27. "classname": "webmanage.saletool.orderclue.ordercluecampaign",
  28. "method": "endcampaign",
  29. "content": {
  30. "sat_campaignids": [this.data.sat_campaignid]
  31. }
  32. })
  33. this.tool.showMessage(res,()=>{
  34. this.$emit('onSuccess')
  35. })
  36. }
  37. }
  38. }
  39. </script>
  40. <style>
  41. </style>