4b045f7c
刘淇
江阴初始化项目
|
1
2
|
<template>
<view>
|
1bbce61f
刘淇
商户券
|
3
4
5
6
7
8
9
10
11
|
<view v-if="dataList.length>0">
<view v-for="(i, index) in dataList" :key="i.id">
<uni-section :title="`${i.cardRuleName}(${i.cardTypeName })`" type="line">
<uni-card padding="0" spacing="0">
<uni-list>
<uni-list-item title="适应车场" :rightText="i.plName">
<text></text>
</uni-list-item>
|
904a46e0
刘淇
卡券购买下单
|
12
|
<uni-list-item :title="`价格: ¥${$common.moneyFormat(i.value)}/张`"
|
1bbce61f
刘淇
商户券
|
13
14
15
16
|
:rightText="`商户库存:${i.cardNum}张`"></uni-list-item>
</uni-list>
<view slot="actions" class="card-actions no-border">
|
78e17486
刘淇
商户券明细
|
17
|
<view class="card-actions-item" @click="toBuy(i)">
|
1bbce61f
刘淇
商户券
|
18
19
20
|
<uni-icons type="cart-filled" size="18" color="#999"></uni-icons>
<text class="card-actions-item-text">购买</text>
</view>
|
75b91c08
刘淇
卡券发放
|
21
|
<view class="card-actions-item" @click="provideCard(i)" v-show="i.cardNum>0">
|
1bbce61f
刘淇
商户券
|
22
23
24
|
<uni-icons type="redo-filled" size="18" color="#999"></uni-icons>
<text class="card-actions-item-text">发放</text>
</view>
|
75b91c08
刘淇
卡券发放
|
25
|
<view class="card-actions-item" @click="printClick(i)" v-show="i.cardNum>0">
|
1bbce61f
刘淇
商户券
|
26
27
28
29
30
31
32
33
34
35
36
|
<uni-icons type="shop-filled" size="18" color="#999"></uni-icons>
<text class="card-actions-item-text">打印</text>
</view>
</view>
</uni-card>
</uni-section>
</view>
</view>
<view class="common-page-head" v-else>暂无可以购买的商户卡券</view>
|
4b045f7c
刘淇
江阴初始化项目
|
37
38
39
40
|
</view>
</template>
<script>
|
4b045f7c
刘淇
江阴初始化项目
|
41
42
|
export default {
data() {
|
4b045f7c
刘淇
江阴初始化项目
|
43
|
return {
|
1bbce61f
刘淇
商户券
|
44
|
dataList: [],
|
0b9d5f71
刘淇
停车记录详情
|
45
46
47
48
49
50
51
52
53
|
rows: [],
pageNum: 1,//当前页
pageSize: 1,//每页条数
reload: false,
status: 'more',
contentText: {
contentdown: '上拉加载更多~',
contentrefresh: '正在加载更多~',
contentmore: '我是有底线的~'
|
4b045f7c
刘淇
江阴初始化项目
|
54
|
},
|
0b9d5f71
刘淇
停车记录详情
|
55
|
iconType: 'auto', // 图标样式
|
4b045f7c
刘淇
江阴初始化项目
|
56
57
58
59
60
61
|
}
},
onLoad(params) {
wx.showShareMenu({
withShareTicket: true
})
|
0b9d5f71
刘淇
停车记录详情
|
62
|
this.couponRuleParkPage()
|
4b045f7c
刘淇
江阴初始化项目
|
63
64
65
|
},
onShow() {
var me = this;
|
4b045f7c
刘淇
江阴初始化项目
|
66
|
},
|
1bbce61f
刘淇
商户券
|
67
|
computed: {},
|
4b045f7c
刘淇
江阴初始化项目
|
68
|
methods: {
|
0b9d5f71
刘淇
停车记录详情
|
69
70
71
72
73
74
|
// 通过商户ID查询停车记录信息
couponRuleParkPage() {
let that = this
let paramsData = {
pageNum: '1',
pageSize: '10'
|
4b045f7c
刘淇
江阴初始化项目
|
75
|
}
|
0b9d5f71
刘淇
停车记录详情
|
76
77
|
// 首页信息获取 接口
that.$myRequest({
|
510601e4
刘淇
商户卡券
|
78
|
url: that.$common.couponRuleParkPage,
|
0b9d5f71
刘淇
停车记录详情
|
79
80
81
|
method: 'POST',
data: that.$common.requestSign(paramsData)
}).then(res => {
|
1bbce61f
刘淇
商户券
|
82
83
|
this.dataList = res.data.dataList
console.log(this.dataList)
|
0b9d5f71
刘淇
停车记录详情
|
84
|
})
|
4b045f7c
刘淇
江阴初始化项目
|
85
|
},
|
78e17486
刘淇
商户券明细
|
86
87
|
toBuy(i) {
uni.navigateTo({
|
9bac797d
刘淇
卡券发放
|
88
|
url: '../businessCard/buyCard?optionData=' + JSON.stringify(i)
|
78e17486
刘淇
商户券明细
|
89
90
|
});
},
|
9bac797d
刘淇
卡券发放
|
91
|
printClick(i) {
|
75b91c08
刘淇
卡券发放
|
92
|
uni.navigateTo({
|
9bac797d
刘淇
卡券发放
|
93
|
url: '../businessCard/cardPrint?optionData=' + JSON.stringify(i)
|
75b91c08
刘淇
卡券发放
|
94
95
|
});
},
|
9bac797d
刘淇
卡券发放
|
96
|
provideCard(i) {
|
75b91c08
刘淇
卡券发放
|
97
|
uni.navigateTo({
|
9bac797d
刘淇
卡券发放
|
98
|
url: '../businessCard/provideCard?optionData=' + JSON.stringify(i)
|
75b91c08
刘淇
卡券发放
|
99
100
|
});
}
|
4b045f7c
刘淇
江阴初始化项目
|
101
102
103
104
105
|
}
}
</script>
<style lang="scss" scoped>
|
0b9d5f71
刘淇
停车记录详情
|
106
|
/deep/ .uni-section {
|
19569f2b
刘淇
购买券
|
107
108
|
padding-bottom: 10px;
}
|
0b9d5f71
刘淇
停车记录详情
|
109
110
|
.rechargeWrap {
|
4b045f7c
刘淇
江阴初始化项目
|
111
|
position: relative;
|
0b9d5f71
刘淇
停车记录详情
|
112
|
.rechargeArrow {
|
4b045f7c
刘淇
江阴初始化项目
|
113
114
115
116
117
118
119
|
position: absolute;
right: 10px;
top: 30px;
font-size: 20px;
color: #999;
}
}
|
0b9d5f71
刘淇
停车记录详情
|
120
|
|
4b045f7c
刘淇
江阴初始化项目
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
.recordCon {
padding-right: 35px;
color: #999;
display: flex;
justify-content: space-between;
}
.container {
overflow: hidden;
}
.custom-cover {
flex: 1;
flex-direction: row;
position: relative;
}
.cover-content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 40px;
background-color: rgba($color: #000000, $alpha: 0.4);
display: flex;
flex-direction: row;
align-items: center;
padding-left: 15px;
font-size: 14px;
color: #fff;
}
.card-actions {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
height: 45px;
border-top: 1px #eee solid;
}
|
0b9d5f71
刘淇
停车记录详情
|
161
|
|
4b045f7c
刘淇
江阴初始化项目
|
162
163
164
165
166
|
.card-actions-item {
display: flex;
flex-direction: row;
align-items: center;
}
|
0b9d5f71
刘淇
停车记录详情
|
167
|
|
4b045f7c
刘淇
江阴初始化项目
|
168
169
170
171
172
|
.card-actions-item-text {
font-size: 12px;
color: #666;
margin-left: 5px;
}
|
0b9d5f71
刘淇
停车记录详情
|
173
|
|
4b045f7c
刘淇
江阴初始化项目
|
174
175
176
177
|
.cover-image {
flex: 1;
height: 150px;
}
|
0b9d5f71
刘淇
停车记录详情
|
178
|
|
4b045f7c
刘淇
江阴初始化项目
|
179
180
181
182
|
.no-border {
border-width: 0;
}
</style>
|