Commit f27cc590 authored by 华国豪's avatar 华国豪 🙄

‘优惠券功能扩展’

parent d1864399
<style>
</style>
<template>
<div class="flexOne page-CouponDetail">
<div class="query-box">
<ul class="user_time_picker">
<li>
<span>
<em>状态</em>
<el-select filterable v-model="msg.useState">
<el-option label="未使用" value="1"></el-option>
<el-option label="已使用" value="2"></el-option>
<el-option label="已作废" value="3"></el-option>
</el-select>
</span>
</li>
<li>
<input
type="button"
class="hollowFixedBtn"
value="查询"
@click="resetPageIndex(),getList()"
>
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>获得途径</th>
<th>获得渠道</th>
<th>使用状态</th>
<th>订单号</th>
<th>订单类型</th>
<th>使用日期</th>
<th>类型</th>
<th>用户</th>
<th>获得日期</th>
<!-- <th>操作</th> -->
</tr>
<tr v-for="(item,index) in DataList" v-loading="loading">
<td>
<span v-if="item.accessType == 1">抽奖</span>
</td>
<td>{{item.acessName}}</td>
<td>
<span v-if="item.useState == 1" style="color: green">未使用</span>
<span v-if="item.useState == 2" style="color: gary">已使用</span>
<span v-if="item.useState == 3" style="color: red">已作废</span>
</td>
<td>
<span v-if="item.orderId === 0">暂无</span>
<span v-else>{{item.orderId}}</span>
</td>
<td>
<span v-if="item.orderType === 0">暂无</span>
<span v-else>
<span v-if="item.orderType == 1">团队</span>
<span v-if="item.orderType == 2">签证</span>
<span v-if="item.orderType == 3">机票</span>
</span>
</td>
<td>{{item.useDate ? item.useDate : '未使用'}}</td>
<td>{{item.couponsType ===1 ? "抵用券" : "折扣券"}}</td>
<td>{{item.userPlatform}}{{item.userName}}</td>
<td>{{item.acessDate}}</td>
<!-- <td>
<el-tooltip class="item" effect="dark" content="修改用户信息" placement="top">
<el-button
type="primary"
icon="el-icon-edit"
circle
@click="outerVisible=true,dialogTitle='修改用户信息',updateData(item),getCompany()"
></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除优惠券" placement="top">
<el-button
v-if="item.couponStatus !== 3"
type="danger"
icon="iconfont icon-img_delete_small"
circle
@click="deleteItem(item)"
></el-button>
</el-tooltip>
</td> -->
</tr>
</table>
<div class="noDataNotice" v-if="DataList.length<1">
<i class="iconfont icon-kong"></i>
<p>没有找到你需要的数据</p>
</div>
<el-pagination
background
@current-change="handleCurrentChange"
v-if="DataList.length>0"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="msg.pageSize"
:total="total"
></el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
DataList: [],
msg: {
pageIndex: 1,
pageSize: 15,
couponId: '',
useState: '',
},
currentPage: 1,
total: 0,
};
},
created(){
this.msg.couponId = this.$route.query.couponId
this.msg.useState = this.$route.query.useState
},
mounted() {
let userInfo = this.getLocalStorage();
this.getList();
},
methods: {
getList() {
//获取数据
this.loading = true
this.apiJavaPost("/api/sell/coupon/getCouponAllotList", this.msg, res => {
console.log(res);
if (res.data.resultCode === 1) {
// this.currentPage = res.data.data.pageCount
this.total = res.data.data.count
this.DataList = res.data.data.pageData
} else {
this.$message.error(res.data.message)
}
this.loading = false
}, null);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
}
};
</script>
\ No newline at end of file
This diff is collapsed.
......@@ -165,7 +165,14 @@
@click="goUrl(item)"
></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除活动" placement="top">
<el-button
type="danger"
icon="iconfont icon-img_delete_small"
circle
@click="deleteItem(item)"
></el-button>
</el-tooltip>
</td>
</tr>
</table>
......@@ -480,6 +487,28 @@ export default {
this.addMsg.lotteryRules = item.lotteryRules,
this.addMsg.image = item.image
},
// 删除抽奖
deleteItem: function (item) {
this.$confirm('确定删除“'+ item.lotteryName +'”活动?删除后不可恢复!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/sell/lottery/updateLotteryStatus", {lotteryId: item.id, status: 3,}, res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message)
}
}, null);
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
//跳转至获取抽奖奖项信息列表
goUrl(item){
this.$router.push({
......
......@@ -2801,6 +2801,14 @@ export default {
title: '优惠券列表'
}
},
{
path: '/CouponDetail',
name: 'CouponDetail',
component: resolve => require(['@/components/activity/CouponDetail'], resolve),
meta: {
title: '优惠券发放列表'
}
},
{
path: '/LuckyDraw',
name: 'LuckyDraw',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment