|
|
@@ -1,41 +1,66 @@
|
|
|
<template>
|
|
|
<view class="page" :style="{'height':windowHeight}">
|
|
|
|
|
|
- <scroll-view scroll-y :style="{'height':windowHeight}">
|
|
|
- <view class="row-list flex-row justify-start" v-for="(item,index) in equityList" :key="index">
|
|
|
- <view class="h-text flex-col justify-center ">
|
|
|
- <view class="money">
|
|
|
- <text>¥{{item.faceValue}}</text>
|
|
|
+ <view class="flex-row">
|
|
|
+ <view class="flex-col justify-center" @click="noUseChange">
|
|
|
+ <u-icon v-if="noUse" name="checkmark-circle-fill" color="#38db38" size="25" ></u-icon>
|
|
|
+ <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>
|
|
|
+ </view>
|
|
|
+ <view class="noUse">
|
|
|
+ <text>不使用权益券</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view :style="{'height':scrollViewHeight}">
|
|
|
+ <scroll-view class="scroll " :style="{'height':scrollViewHeight}" scroll-y>
|
|
|
+ <view class="row-list flex-row justify-start" :class="{'grayscale' :serviceProjectId != item.serviceProjectId || serviceObjectId != item.serviceObjectId }" v-for="(item,index) in equityList" @click="clickCoupons(item,index)" :key="index">
|
|
|
+ <view class="h-text flex-col justify-center ">
|
|
|
+ <view class="money">
|
|
|
+ <text>¥{{item.faceValue}}</text>
|
|
|
+ </view>
|
|
|
+<!-- <view class="desc">-->
|
|
|
+<!-- <text>{{item.name}}</text>-->
|
|
|
+<!-- </view>-->
|
|
|
</view>
|
|
|
- <!-- <view class="desc">-->
|
|
|
- <!-- <text>{{item.title}}</text>-->
|
|
|
- <!-- </view>-->
|
|
|
- </view>
|
|
|
|
|
|
- <view class="h-center-content flex-col justify-around">
|
|
|
- <view class="h-value">
|
|
|
- <text>{{item.description}}</text>
|
|
|
- </view>
|
|
|
- <view class="title">
|
|
|
- 使用项目:{{item.serviceProjectName || ''}}
|
|
|
- </view>
|
|
|
- <view class="title">
|
|
|
- 绑定对象:{{item.serviceObjectName}}
|
|
|
- </view>
|
|
|
- <view class="title">
|
|
|
- 结束期限:{{item.effectiveEndTime.substring(0,10)}}
|
|
|
+ <view class="h-center-content flex-col ">
|
|
|
+ <view class="h-value">
|
|
|
+ <text>{{item.description}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="title">
|
|
|
+ 使用项目:{{item.serviceProjectName || ''}}
|
|
|
+ </view>
|
|
|
+ <view class="title">
|
|
|
+ 绑定对象:{{item.serviceObjectName}}
|
|
|
+ </view>
|
|
|
+ <view class="title">
|
|
|
+ 结束期限:{{item.effectiveEndTime.substring(0,10)}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
- </view>
|
|
|
+ <view class="h-right-content flex-col justify-center">
|
|
|
+
|
|
|
+ <view class="flex-row justify-center" v-if="serviceProjectId != item.serviceProjectId || serviceObjectId != item.serviceObjectId ">
|
|
|
|
|
|
-<!-- <view class="h-right-content flex-col justify-center ">-->
|
|
|
-<!-- <view class="btn" @click="payRights(item)">-->
|
|
|
-<!-- <text>购买</text>-->
|
|
|
-<!-- </view>-->
|
|
|
-<!-- </view>-->
|
|
|
+ <view class="h-btn-img">
|
|
|
+ <image class="h-btn-img" src="/static/coupon/u2110.png" mode=""></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
+ <view class="flex-row justify-center" v-else>
|
|
|
+ <u-icon v-if="item.isUse " name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
|
|
|
+ <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view class="btn" @click="useCoupons">
|
|
|
+ <text>确定</text>
|
|
|
</view>
|
|
|
- </scroll-view>
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
</view>
|
|
|
@@ -44,21 +69,75 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- windowHeight:'',
|
|
|
- userInfo:{},
|
|
|
equityList:[],
|
|
|
+ noUse:true,
|
|
|
+ windowHeight:'',
|
|
|
+ scrollViewHeight:'',
|
|
|
+ serviceObjectId:'',
|
|
|
+ serviceProjectId:'',
|
|
|
};
|
|
|
},
|
|
|
- onLoad(option) {
|
|
|
+ onLoad(e) {
|
|
|
+ this.serviceProjectId = e.serviceProjectId
|
|
|
+ this.serviceObjectId = e.serviceObjectId
|
|
|
let sysInfo = uni.getSystemInfoSync()
|
|
|
- this.windowHeight =sysInfo.windowHeight - 44 +'px'//除标题栏栏外的屏幕可用高度
|
|
|
- this.userInfo = uni.getStorageSync('userInfo')
|
|
|
-
|
|
|
+ this.windowHeight =sysInfo.windowHeight +'px'
|
|
|
+ this.scrollViewHeight =sysInfo.windowHeight -(sysInfo.windowWidth/750)*252 +'px'
|
|
|
this.myEquityCardList()
|
|
|
},
|
|
|
+ computed: {
|
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
|
|
|
|
+ useCoupons(){
|
|
|
+ let equitys = []
|
|
|
+ for (const equity of this.equityList) {
|
|
|
+ if (equity.isUse){
|
|
|
+ equitys.push(equity)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.$emit('getEquity',equitys)
|
|
|
+ uni.navigateBack({
|
|
|
+ data:1
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ noUseChange(){
|
|
|
+ this.noUse = !this.noUse
|
|
|
+ if (this.noUse){
|
|
|
+ this.equityList.forEach(item=>{
|
|
|
+ item.isUse = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ clickCoupons(item,index){
|
|
|
+
|
|
|
+ if (this.serviceProjectId != item.serviceProjectId || this.serviceObjectId != item.serviceObjectId){
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //关闭多选开始
|
|
|
+ this.equityList.forEach(item=>{
|
|
|
+ item.isUse = false
|
|
|
+ })
|
|
|
+ //关闭多选结束
|
|
|
+
|
|
|
+ console.log(item)
|
|
|
+ this.noUse = false
|
|
|
+ item.isUse = !item.isUse
|
|
|
+ this.$set(this.equityList,index,item)
|
|
|
+
|
|
|
+ let flag = true
|
|
|
+ this.equityList.forEach(item=>{
|
|
|
+ if (item.isUse){
|
|
|
+ flag = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.noUse = flag
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
myEquityCardList(){
|
|
|
this.$api.myEquityCardList().then(res=>{
|
|
|
console.log(res)
|
|
|
@@ -70,8 +149,6 @@
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
@import '/common/css/common.css';
|
|
|
@import './index.rpx.scss';
|
|
|
-
|
|
|
</style>
|