| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <div v-if="data.status !== '结束'" class="inline-16">
- <el-button :type="!data.disabled?'':'primary'" :disabled="!data.disabled" slot="reference" size="mini" @click="onShow">{{ $t('结 束') }}</el-button>
- </div>
- </template>
- <script>
- export default {
- props:['data'],
- methods:{
- onShow() {
- this.$confirm(this.$t('确定结束该活动吗')+'?', this.$t('提示'), {
- confirmButtonText: this.$t('确定'),
- cancelButtonText: this.$t('取消'),
- type: 'warning',
- closeOnClickModal:false
- }).then(() => {
- this.finishRow()
- }).catch(() => {
- this.$message({
- type: 'info',
- message: this.$t('已取消结束该活动')
- });
- });
- },
- async finishRow () {
- const res = await this.$api.requested({
- "classname": "webmanage.saletool.orderclue.ordercluecampaign",
- "method": "endcampaign",
- "content": {
- "sat_campaignids": [this.data.sat_campaignid]
- }
- })
- this.tool.showMessage(res,()=>{
- this.$emit('onSuccess')
- })
- }
- }
- }
- </script>
- <style>
- </style>
|