|
@@ -67,6 +67,7 @@
|
|
|
<el-button v-if=" JSON.parse(row.status).value === 0 " v-hasPermi="['business:marketing:on']" type="text" @click="setStatus(row, 'on')">开启</el-button>
|
|
|
<el-button v-if=" JSON.parse(row.status).value === 3 || JSON.parse(row.status).value === 2 " v-hasPermi="['business:marketing:off']" type="text" @click="setStatus(row, 'off')">关闭</el-button>
|
|
|
<el-button v-if=" JSON.parse(row.status).value === 0 " v-hasPermi="['business:marketing:remove']" class="del" type="text" @click="del(row)">删除</el-button>
|
|
|
+ <el-button v-hasPermi="['business:marketing:copy']" type="text" @click="MarketingCopy(row.id,row.title)">复制</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -75,7 +76,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getMarketingList, delMarketing, setMarketingStatus, setMarketingStatusOff, ticketMarketingExport } from '@/api/business/marketing'
|
|
|
+import { getMarketingList, delMarketing, setMarketingStatus, setMarketingStatusOff, ticketMarketingExport, getMarketingCopy } from '@/api/business/marketing'
|
|
|
import ActivityTable from "./components/ActivityTable";
|
|
|
export default {
|
|
|
name: 'CouponList',
|
|
@@ -159,6 +160,20 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ MarketingCopy(id,title) {
|
|
|
+ this.$confirm(`确认复制活动 “${title}” 吗?`, '复制活动', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ getMarketingCopy(id).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.$message.success('操作已完成!')
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
// 导出订单
|
|
|
handleExportDraw() {
|