Commit 7c4854cb authored by youjie's avatar youjie

同行优惠券列表

parent ababc867
......@@ -238,10 +238,10 @@
</span>
</span>
<el-dropdown-menu class="changelanguage" slot="dropdown">
<el-dropdown-item
@click.native="dropdownText = $t('pub.unlimitedSel'), msg.couponsUseScope = 0, getList(), resetPageIndex()">{{$t('pub.unlimitedSel')}}
<el-dropdown-item v-for="(item,index) in ScopeOfUseList" :key="index"
@click.native="dropdownText = $t('pub.unlimitedSel'), msg.CouponsUseScope = item.Id, getList(), resetPageIndex()">{{ item.Name }}
</el-dropdown-item>
<el-dropdown-item
<!-- <el-dropdown-item
@click.native="dropdownText = $t('active.cl_tongyong'), msg.couponsUseScope = 1, getList(), resetPageIndex()">{{$t('active.cl_tongyong')}}
</el-dropdown-item>
<el-dropdown-item
......@@ -257,25 +257,25 @@
</el-dropdown-item>
<el-dropdown-item
@click.native="dropdownText = $t('hotel.hotel'), msg.couponsUseScope = 10, getList(), resetPageIndex()">{{$t('hotel.hotel')}}
</el-dropdown-item>
</el-dropdown-item> -->
</el-dropdown-menu>
</el-dropdown>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 1 }"
@click="typeActive = 1, msg.couponsType = 0, msg.couponEffectStatus = 1, getList(), resetPageIndex()">{{$t('objFill.quanbuyouhuiquan')}}</span>
@click="typeActive = 1, msg.CouponStatus = 0, msg.CouponsType = 0, getList(), resetPageIndex()">{{$t('objFill.quanbuyouhuiquan')}}</span>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 2 }"
@click="typeActive = 2, msg.couponsType = 2, msg.couponEffectStatus = 1, getList(), resetPageIndex()">{{$t('active.cl_zkquan')}}</span>
@click="typeActive = 2, msg.CouponsType = 2, msg.CouponStatus = 1, getList(), resetPageIndex()">{{$t('active.cl_zkquan')}}</span>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 3 }"
@click="typeActive = 3, msg.couponsType = 1, msg.couponEffectStatus = 1, getList(), resetPageIndex()">{{$t('objFill.dikouquan')}}</span>
@click="typeActive = 3, msg.CouponsType = 1, msg.CouponStatus = 1, getList(), resetPageIndex()">{{$t('objFill.dikouquan')}}</span>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 4 }"
@click="typeActive = 4, msg.couponEffectStatus = 3, getList(), resetPageIndex()">{{$t('active.cl_ygqi')}}</span>
@click="typeActive = 4,msg.CouponsType=0, msg.CouponStatus = 3, getList(), resetPageIndex()">{{$t('active.cl_ygqi')}}</span>
</li>
</ul>
</el-row>
......@@ -314,36 +314,49 @@
pageSize: 1,
msg: {
pageIndex: 1,
pageSize: 8,
useState: 1,
lineId: 0,
lineteamId: 0,
couponsName: "",
couponsType: "",
couponStatus: 1,
couponEffectStatus: 1,
couponsUseScope: 0,
userId: '',
pageSize: 14,
userId: 0, //CustomerAccountId
lineId: 0, //线路
lineteamId: 0, //系列ID
CustomerType: 0, //0-同行,1-直客
CouponStatus: 0, //1未使用 2已使用 3已过期
CouponsUseScope: -1, //优惠券使用范围 有枚举
FromPlatform: 0, //来源平台 1app 2小程序
CouponsType: 0, //优惠券类型 1:抵用券,2:折扣卷
},
dataList: [],
dataLoading: false,
currentPage: 1,
Count: 1,
ScopeOfUseList: [],
};
},
computed: {},
created() {},
mounted() {
this.getScopeOfUse()
this.getList();
if (this.$route.query.customerId) {
this.msg.userId = this.$route.query.customerId;
}
},
methods: {
getScopeOfUse() {
this.apipost("coupon_post_GetCouponAllotOrderTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ScopeOfUseList = res.data.data
this.ScopeOfUseList.unshift({
Id: -1,
Name: '不限'
})
}
}, (error) => {
})
},
// 获取数据
getList() {
this.dataLoading = true;
this.apiJavaPost("/api/b2b/user/getUserCouponAllotList",
this.apipost("coupon_post_GetUserCanUseCouponPageList",
this.msg,
res => {
let nowTime = moment().format("YYYY-MM-DD HH:mm:ss");
......@@ -369,7 +382,6 @@
null
);
},
//查询初始化页码
resetPageIndex() {
this.msg.pageIndex = 1;
......
......@@ -128,7 +128,7 @@ p._info_coupon_name{
<img v-if="item.fromPlatform=='2'" src="../../../assets/img/yhq/xcx.png" alt="">
<img v-if="item.fromPlatform=='3'" src="../../../assets/img/yhq/pc.png" alt="">
</div>
<div class="_top" :class="{'_blue':item.couponsType===1,'_gray':item.couponEffectStatus===3 || !Platfrom(item.fromPlatform)}">
<div class="_top" :class="{'_blue':item.couponsType===1,'_gray': !Platfrom(item.fromPlatform)}">
<div class="_top_raduis">
<span></span>
<span></span>
......@@ -148,7 +148,7 @@ p._info_coupon_name{
</div>
<div class="_overdue" v-if="item.warning">{{$t('objFill.v101.Rest.jijianguoqi')}}</div>
<div class="_info_details">
<p class="_info_coupon_name" :title="item.couponsName">{{item.couponsName}}</p>
<p class="_info_coupon_name" :title="item.couponName">{{item.couponName}}</p>
<p class="_info_sale" v-if="item.couponsType !== 1">
{{item.denomination}}
<span>{{$t('objFill.v101.Rest.zhe')}}</span>
......@@ -158,7 +158,7 @@ p._info_coupon_name{
{{item.denomination}}
</p>
<p class="_info_full">{{$t('active.cl_man')}}{{item.useCondition}}{{$t('active.cl_keyong')}}</p>
<p class="_info_time _time">{{$t('objFill.v101.Rest.youxiaoshijian')}}{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}</p>
<p class="_info_time _time">{{$t('objFill.v101.Rest.youxiaoshijian')}}{{item.effectDate}}-{{item.expirationDate}}</p>
<p class="_info_bottom" @click="goUrl('heel',true)">{{$t('objFill.v101.Rest.qushiyong')}}</p>
</div>
</div>
......@@ -166,7 +166,7 @@ p._info_coupon_name{
<p class="_bottom_tit">{{$t('objFill.v101.Rest.keyongxljxl')}}</p>
<p
class="_bottom_info"
>{{item.lineName === '' ? $t('pub.unlimitedSel') : item.lineName}}-{{item.lineTeamName === '' ? $t('pub.unlimitedSel') : item.lineTeamName}}</p>
>{{item.lineNameStr === '' ? $t('pub.unlimitedSel') : item.lineNameStr}}-{{item.lineteamNameStr === '' ? $t('pub.unlimitedSel') : item.lineteamNameStr}}</p>
<p class="_bottom_tit">{{$t('objFill.v101.Rest.youhuiqly')}}</p>
<p class="_bottom_info _margin_bt0">{{item.remark}}</p>
</div>
......
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