Commit f0fc324e authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/zk123/jz_travel

parents 41f5e5e0 3750b96e
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
.carrHeader-left{ .carrHeader-left{
position: absolute; position: absolute;
left: 32rpx; left: 32rpx;
z-index: 3;
} }
.carrHeaderBox{ .carrHeaderBox{
width: 100%; width: 100%;
......
<template> <template>
<view class="couponStyle" :style="{ height: contentHeight }" @click="lineShow=false"> <view class="couponStyle" :style="{ height: contentHeight }" @click="CouponsUseScopeShow=false">
<view class="couponHeaderBox"> <view class="couponHeaderBox">
<view class="couponHeader"> <view class="couponHeader">
<view class="couponHeadLeft"> <view class="couponHeadLeft">
<view class="couponHeadLText" @click.stop="lineShow=!lineShow"> <view class="couponHeadLText" @click.stop="CouponsUseScopeShow=!CouponsUseScopeShow">
<text class="couponHeadLTextL">{{ lineName }}</text> <text class="couponHeadLTextL">{{ CouponsUseScopeName }}</text>
<view> <view>
<u-icon :name="!lineShow?'arrow-down':'arrow-up'" size="24"></u-icon> <u-icon :name="!CouponsUseScopeShow?'arrow-down':'arrow-up'" size="24"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<view class="couponHeadRight"> <view class="couponHeadRight">
<text v-for="(item,index) in couponStateList" :key="index" :class="[msg.CouponType==item.id?'active':'']" <text v-for="(item,index) in couponStateList" :key="index" :class="[msg.CouponsType==item.id?'active':'']"
@click.stop="changeState()">{{ item.name }}</text> @click.stop="changeState(item)">{{ item.name }}</text>
</view> </view>
</view> </view>
<view class="couponLine" v-if="lineShow"> <view class="couponLine" v-if="CouponsUseScopeShow">
<view class="couponLineT" v-for="(item,index) in lineList"> <view class="couponLineT" v-for="(item,index) in ScopeOfUseList">
<view class="couponLineAllName" :class="[msg.lineId==item.id?'active':'']" @click.stop="msg.lineId=item.id,lineName=item.text"> <view class="couponLineAllName" :class="[msg.CouponsUseScope==item.Id?'active':'']" @click.stop="getScopeOfUseId(item)">
<text>{{ item.text }}</text> <text>{{ item.Name }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</Text> </Text>
<Text class="small" style="font-family: microsoft yahei ui light;margin-left: 5rpx;">{{ x.couponsType != 1? "折" : "" }}</Text> <Text class="small" style="font-family: microsoft yahei ui light;margin-left: 5rpx;">{{ x.couponsType != 1? "折" : "" }}</Text>
</view> </view>
<view class="tiaojian">抵扣券</view> <view class="tiaojian">{{x.couponsType==1?'抵扣券':'折扣卷'}}</view>
</view> </view>
</view> </view>
<view class="detail"> <view class="detail">
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</view> </view>
<view class="coupondLineTb"> <view class="coupondLineTb">
<view class="coupondLineTbt"> <view class="coupondLineTbt">
<template v-if="x.lineNameStr&&x.lineName!=''">适用线路:{{x.lineNameStr}}</template> <template v-if="x.CouponsUseScopeNameStr&&x.CouponsUseScopeName!=''">适用线路:{{x.CouponsUseScopeNameStr}}</template>
<template v-if="x.lineteamNameStr&&x.lineteamNameStr!=''">适用系列:{{x.lineteamNameStr}}</template> <template v-if="x.lineteamNameStr&&x.lineteamNameStr!=''">适用系列:{{x.lineteamNameStr}}</template>
<template v-if="x.remark&&x.remark!=''">{{x.remark}}</template> <template v-if="x.remark&&x.remark!=''">{{x.remark}}</template>
</view> </view>
...@@ -100,11 +100,11 @@ ...@@ -100,11 +100,11 @@
}, },
{ {
name: "折扣券", name: "折扣券",
id: 1, id: 2,
}, },
{ {
name: "抵扣券", name: "抵扣券",
id: 2, id: 1,
}, },
{ {
name: "已过期", name: "已过期",
...@@ -122,9 +122,9 @@ ...@@ -122,9 +122,9 @@
"lineteamId": 0, //系列ID "lineteamId": 0, //系列ID
"CustomerType": 0, //0-同行,1-直客 "CustomerType": 0, //0-同行,1-直客
"CouponStatus": 1, //优惠券状态 1未使用 2已使用 3已过期 "CouponStatus": 1, //优惠券状态 1未使用 2已使用 3已过期
"CouponsUseScope": 0, //优惠券使用范围 有枚举 "CouponsUseScope": -1, //优惠券使用范围 有枚举
"FromPlatform": "2", //来源平台 1app 2小程序 "FromPlatform": "2", //来源平台 1app 2小程序
"CouponType": 0, //优惠券类型 1:抵用券,2:折扣卷 "CouponsType": 0, //优惠券类型 1:抵用券,2:折扣卷
}, },
page_count: 1, page_count: 1,
couponDataList: [], couponDataList: [],
...@@ -136,7 +136,12 @@ ...@@ -136,7 +136,12 @@
nomore: "没有更多了", nomore: "没有更多了",
}, },
showBar: true, showBar: true,
lineList: [{ lineList: [
{
text: '不限',
id: -1
},
{
text: '通用', text: '通用',
id: 0 id: 0
}, },
...@@ -173,8 +178,8 @@ ...@@ -173,8 +178,8 @@
id: 8 id: 8
}, },
], ],
lineName: '通用', CouponsUseScopeName: '不限',
lineShow: false, CouponsUseScopeShow: false,
lineImgs: [ lineImgs: [
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322574781584.png', //跟团游 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322574781584.png', //跟团游
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322566159036.png', //自由行 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322566159036.png', //自由行
...@@ -187,6 +192,7 @@ ...@@ -187,6 +192,7 @@
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322569972025.png', //美食2 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322569972025.png', //美食2
], ],
b2bUserInfo: {}, b2bUserInfo: {},
ScopeOfUseList: [],
}; };
}, },
created() { created() {
...@@ -215,20 +221,44 @@ ...@@ -215,20 +221,44 @@
}); });
}, },
onLoad: function(option) { onLoad: function(option) {
this.getScopeOfUse()
this.loading = true this.loading = true
this.init() this.init()
}, },
methods: { methods: {
getScopeOfUseId(item){
this.CouponsUseScopeShow=false
this.msg.CouponsUseScope=item.Id
this.CouponsUseScopeName=item.Name
this.ResetQuery()
},
getScopeOfUse() {
this.apipost("coupon_post_GetCouponAllotOrderTypeEnumList", {}, (res) => {
if (res.resultCode == 1) {
this.ScopeOfUseList = res.data
this.ScopeOfUseList.unshift({
Id: -1,
Name: '不限'
})
}
}, (failed) => {
uni.showToast({
title: failed.message,
icon: "none",
});
}, (error) => {
})
},
//状态切换 //状态切换
changeState(item) { changeState(item) {
if (item.id <= 2) { if (item.id <= 2) {
this.msg.CouponType = item.id, this.msg.CouponsType = item.id,
this.msg.CouponStatus = 1; this.msg.CouponStatus = 1;
} else if (item.id == 3) { } else if (item.id == 3) {
this.msg.CouponType = 0; this.msg.CouponsType = 0;
this.msg.CouponStatus = 3; this.msg.CouponStatus = 3;
} }
this.ResetQuery(); this.ResetQuery();
}, },
//重新查询 //重新查询
...@@ -261,6 +291,7 @@ ...@@ -261,6 +291,7 @@
x.backGroubd = this.lineImgs[0] x.backGroubd = this.lineImgs[0]
}) })
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
if(this.page_count==1) this.status = 'nomore'
console.log("this.couponDataList", this.couponDataList) console.log("this.couponDataList", this.couponDataList)
} }
}, (failed) => { }, (failed) => {
...@@ -395,11 +426,15 @@ ...@@ -395,11 +426,15 @@
font-weight: bold; font-weight: bold;
size: 64px; size: 64px;
text-align: center; text-align: center;
display: flex;
flex-wrap: nowrap;
} }
.couponStyle .item .miane .money .small { .couponStyle .item .miane .money .small {
font-size: 12px; font-size: 12px;
font-weight: 100; font-weight: 100;
position: relative;
top: 12rpx;
} }
.couponStyle .item .miane .tiaojian { .couponStyle .item .miane .tiaojian {
...@@ -466,15 +501,16 @@ ...@@ -466,15 +501,16 @@
} }
.couponHeadLText { .couponHeadLText {
width: 210rpx;
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1; justify-content: space-between;
padding-left: 43rpx; padding-left: 43rpx;
border-right: 1rpx solid rgba(207, 207, 207, .4); border-right: 1rpx solid rgba(207, 207, 207, .4);
} }
.couponHeadLTextL { .couponHeadLTextL {
margin-right: 42rpx; // margin-right: 42rpx;
font-size: 28rpx; font-size: 28rpx;
} }
......
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