Commit 78e17486a8152f3bc815acf798e3c8da1cb87620
1 parent
1bbce61f
商户券明细
Showing
4 changed files
with
96 additions
and
81 deletions
common/common.js
... | ... | @@ -29,11 +29,15 @@ const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBu |
29 | 29 | const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId"; |
30 | 30 | //刘淇接口 |
31 | 31 | |
32 | - | |
33 | 32 | // 商户卡券-可以购买卡券列表-分页 |
34 | 33 | const couponRuleParkPage = serverUrl + "/business/h5/coupon/couponRuleParkPage"; |
35 | 34 | |
36 | 35 | |
36 | +// 商户卡券-卡券申领明细 | |
37 | +const couponIssuedParkPage = serverUrl + "/business/h5/couponIssued/couponIssuedParkPage"; | |
38 | + | |
39 | + | |
40 | + | |
37 | 41 | //陈彪接口 |
38 | 42 | |
39 | 43 | // 余额明细下拉框选择列表 |
... | ... | @@ -189,7 +193,7 @@ export default { |
189 | 193 | getBusinessParkOrderByBusIdForPage, |
190 | 194 | getPayOrderByOrderId, |
191 | 195 | couponRuleParkPage, |
192 | - | |
196 | + couponIssuedParkPage, | |
193 | 197 | |
194 | 198 | //陈彪接口 |
195 | 199 | rechargeList, | ... | ... |
pages/businessCard/businessCard.vue
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | </uni-list> |
15 | 15 | <view slot="actions" class="card-actions no-border"> |
16 | 16 | |
17 | - <view class="card-actions-item" @click="actionsClick('购买')"> | |
17 | + <view class="card-actions-item" @click="toBuy(i)"> | |
18 | 18 | <uni-icons type="cart-filled" size="18" color="#999"></uni-icons> |
19 | 19 | <text class="card-actions-item-text">购买</text> |
20 | 20 | </view> |
... | ... | @@ -83,6 +83,11 @@ export default { |
83 | 83 | console.log(this.dataList) |
84 | 84 | }) |
85 | 85 | }, |
86 | + toBuy(i) { | |
87 | + uni.navigateTo({ | |
88 | + url: '../businessCard/buyCard?optionData='+JSON.stringify(i) | |
89 | + }); | |
90 | + }, | |
86 | 91 | } |
87 | 92 | } |
88 | 93 | </script> | ... | ... |
pages/businessCard/buyCard.vue
... | ... | @@ -3,15 +3,6 @@ |
3 | 3 | |
4 | 4 | <uni-section title="2小时(时长券)" type="line" > |
5 | 5 | <uni-card padding="0" spacing="0"> |
6 | - <!--<template v-slot:cover>--> | |
7 | - <!--<view class="custom-cover">--> | |
8 | - <!--<image class="cover-image" mode="aspectFill" :src="cover">--> | |
9 | - <!--</image>--> | |
10 | - <!--<view class="cover-content">--> | |
11 | - <!--<text class="uni-subtitle uni-white">今日新闻热点</text>--> | |
12 | - <!--</view>--> | |
13 | - <!--</view>--> | |
14 | - <!--</template>--> | |
15 | 6 | <uni-list> |
16 | 7 | <uni-list-item title="适应车场" rightText="万达商业广场" > |
17 | 8 | <text></text> |
... | ... | @@ -70,15 +61,7 @@ |
70 | 61 | </view> |
71 | 62 | <uni-section title="24小时(包天券)" type="line" > |
72 | 63 | <uni-card padding="0" spacing="0"> |
73 | - <!--<template v-slot:cover>--> | |
74 | - <!--<view class="custom-cover">--> | |
75 | - <!--<image class="cover-image" mode="aspectFill" :src="cover">--> | |
76 | - <!--</image>--> | |
77 | - <!--<view class="cover-content">--> | |
78 | - <!--<text class="uni-subtitle uni-white">今日新闻热点</text>--> | |
79 | - <!--</view>--> | |
80 | - <!--</view>--> | |
81 | - <!--</template>--> | |
64 | + | |
82 | 65 | <uni-list> |
83 | 66 | <uni-list-item title="适应车场" rightText="万达商业广场" > |
84 | 67 | <text></text> |
... | ... | @@ -120,7 +103,6 @@ |
120 | 103 | </template> |
121 | 104 | |
122 | 105 | <script> |
123 | -import common from "../../common/common.js"; | |
124 | 106 | export default { |
125 | 107 | data() { |
126 | 108 | const currentDate = this.getDate({ |
... | ... | @@ -162,18 +144,7 @@ export default { |
162 | 144 | }, |
163 | 145 | onShow() { |
164 | 146 | var me = this; |
165 | - var userInfo = me.getGlobalUser("globalUser"); | |
166 | - if (userInfo != null) { | |
167 | - me.phoneNumb = userInfo.userPhone; | |
168 | - } | |
169 | - var pages = getCurrentPages(); | |
170 | - var currPage = pages[pages.length - 1]; //当前页面 | |
171 | - console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon); | |
172 | - me.selCoupon = currPage.data.selCoupon; | |
173 | - console.log(JSON.stringify(me.selCoupon)); | |
174 | - // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon | |
175 | - // .discValue); | |
176 | - // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) { | |
147 | + | |
177 | 148 | }, |
178 | 149 | mounted() { |
179 | 150 | setTimeout(() => { | ... | ... |
pages/businessCard/cardDetail.vue
... | ... | @@ -36,8 +36,9 @@ |
36 | 36 | 开始时间 |
37 | 37 | </view> |
38 | 38 | <view class="uni-list-cell-db"> |
39 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange"> | |
40 | - <view class="uni-input">{{benginDate}}</view> | |
39 | + <picker mode="date" :value="beginTime" :start="startDate" :end="endDate" | |
40 | + @change="bindStartDateChange"> | |
41 | + <view class="uni-input">{{beginTime}}</view> | |
41 | 42 | </picker> |
42 | 43 | </view> |
43 | 44 | </view> |
... | ... | @@ -49,13 +50,55 @@ |
49 | 50 | 结束时间 |
50 | 51 | </view> |
51 | 52 | <view class="uni-list-cell-db"> |
52 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange"> | |
53 | - <view class="uni-input">{{overDate}}</view> | |
53 | + <picker mode="date" :value="endTime" :start="startDate" :end="endDate" @change="bindEndDateChange"> | |
54 | + <view class="uni-input">{{endTime}}</view> | |
54 | 55 | </picker> |
55 | 56 | </view> |
56 | 57 | </view> |
57 | 58 | </view> |
58 | 59 | |
60 | + <view v-for="(i, index) in dataList" :key="i.id"> | |
61 | + <uni-section :title="`${i.cardTypeName}(${i.cardType})`" type="line"> | |
62 | + <uni-list> | |
63 | + <uni-list-item> | |
64 | + <template v-slot:body> | |
65 | + <view class="slot-box uni-con-width"> | |
66 | + <view class="uni-flex uni-space-between "> | |
67 | + <view class="color-blue"> | |
68 | + JE000100011 | |
69 | + </view> | |
70 | + <view class="color-blue"> | |
71 | + {{i.carNumber}} | |
72 | + </view> | |
73 | + </view> | |
74 | + <view class="uni-flex uni-space-between" style="padding: 10px 0"> | |
75 | + <view> | |
76 | + <text class="color-blue paddingRight">领取时间</text> | |
77 | + 2020-11-01 01:01:01 | |
78 | + </view> | |
79 | + <view class="color-green"> | |
80 | + 已使用 | |
81 | + </view> | |
82 | + </view> | |
83 | + <view class="uni-flex uni-space-between"> | |
84 | + <view> | |
85 | + <text class="color-red paddingRight">使用时间</text> | |
86 | + 2020-11-01 01:01:01 | |
87 | + </view> | |
88 | + <view class="color-green"> | |
89 | + {{i.fullCutValue}}元/张 | |
90 | + </view> | |
91 | + </view> | |
92 | + </view> | |
93 | + </template> | |
94 | + </uni-list-item> | |
95 | + </uni-list> | |
96 | + </uni-section> | |
97 | + </view> | |
98 | + | |
99 | + | |
100 | + | |
101 | + | |
59 | 102 | <uni-section title="8折(折扣券)" type="line"> |
60 | 103 | <uni-list> |
61 | 104 | <uni-list-item> |
... | ... | @@ -71,7 +114,7 @@ |
71 | 114 | </view> |
72 | 115 | <view class="uni-flex uni-space-between" style="padding: 10px 0"> |
73 | 116 | <view> |
74 | - <text class="color-blue paddingRight" >领取时间</text> | |
117 | + <text class="color-blue paddingRight">领取时间</text> | |
75 | 118 | 2020-11-01 01:01:01 |
76 | 119 | </view> |
77 | 120 | <view class="color-green"> |
... | ... | @@ -109,7 +152,7 @@ |
109 | 152 | </view> |
110 | 153 | <view class="uni-flex uni-space-between" style="padding: 10px 0"> |
111 | 154 | <view> |
112 | - <text class="color-blue paddingRight" >领取时间</text> | |
155 | + <text class="color-blue paddingRight">领取时间</text> | |
113 | 156 | 2020-11-01 01:01:01 |
114 | 157 | </view> |
115 | 158 | <view class="color-red"> |
... | ... | @@ -146,7 +189,7 @@ |
146 | 189 | </view> |
147 | 190 | <view class="uni-flex uni-space-between" style="padding: 10px 0"> |
148 | 191 | <view> |
149 | - <text class="color-blue paddingRight" >领取时间</text> | |
192 | + <text class="color-blue paddingRight">领取时间</text> | |
150 | 193 | 2020-11-01 01:01:01 |
151 | 194 | </view> |
152 | 195 | <view class="color-blue"> |
... | ... | @@ -167,13 +210,10 @@ |
167 | 210 | </uni-list-item> |
168 | 211 | </uni-list> |
169 | 212 | </uni-section> |
170 | - | |
171 | - | |
172 | 213 | </view> |
173 | 214 | </template> |
174 | 215 | |
175 | 216 | <script> |
176 | -import common from "../../common/common.js"; | |
177 | 217 | export default { |
178 | 218 | data() { |
179 | 219 | const currentDate = this.getDate({ |
... | ... | @@ -181,15 +221,15 @@ export default { |
181 | 221 | }) |
182 | 222 | return { |
183 | 223 | title: 'picker', |
184 | - array: ['折扣券', '金额券', '单次券', '包天券', '满减券', '时长券'], | |
185 | - arrayWay: ['所有状态', '已失效', '已使用', '未使用', '已失效'], | |
224 | + array: ['单次券', '时长券', '满减券', '金额券', '包天券'], | |
225 | + arrayWay: ['已使用/绑定', '未使用'], | |
186 | 226 | index: 0, |
187 | 227 | indexWay: 0, |
188 | - benginDate: currentDate, | |
189 | - overDate: currentDate, | |
228 | + beginTime: currentDate, | |
229 | + endTime: currentDate, | |
190 | 230 | rows: [], |
191 | - pageNum: 1,//当前页 | |
192 | - pageSize: 1,//每页条数 | |
231 | + pageNum: '1',//当前页 | |
232 | + pageSize: '10',//每页条数 | |
193 | 233 | reload: false, |
194 | 234 | status: 'more', |
195 | 235 | contentText: { |
... | ... | @@ -198,43 +238,17 @@ export default { |
198 | 238 | contentmore: '我是有底线的~' |
199 | 239 | }, |
200 | 240 | iconType: 'auto', // 图标样式 |
241 | + dataList: [], | |
201 | 242 | } |
202 | 243 | }, |
203 | 244 | onLoad(params) { |
204 | 245 | wx.showShareMenu({ |
205 | 246 | withShareTicket: true |
206 | 247 | }) |
207 | - // this.mycarNumber = params.carNumber; | |
208 | - // this.myorderId = params.orderId; | |
209 | - // this.myparkCode = params.parkCode; | |
210 | - // this.myorderState = params.orderState; | |
211 | - // this.totalFee = params.totalFee | |
212 | - // this.unPayFee = params.unPayFee | |
213 | - // if (params.orderState == 5) { | |
214 | - // //停车补缴单 103 | |
215 | - // this.mypaySrcType = '103' | |
216 | - // } else { | |
217 | - // this.mypaySrcType = '101' | |
218 | - // } | |
219 | - // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode); | |
220 | - // this.getWxCode(); | |
221 | - // this.PDlogin(); | |
222 | - //console.log("xxxmake = "+this.makedateFormat()); | |
248 | + this.couponIssuedParkPage() | |
223 | 249 | }, |
224 | 250 | onShow() { |
225 | 251 | var me = this; |
226 | - var userInfo = me.getGlobalUser("globalUser"); | |
227 | - if (userInfo != null) { | |
228 | - me.phoneNumb = userInfo.userPhone; | |
229 | - } | |
230 | - var pages = getCurrentPages(); | |
231 | - var currPage = pages[pages.length - 1]; //当前页面 | |
232 | - console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon); | |
233 | - me.selCoupon = currPage.data.selCoupon; | |
234 | - console.log(JSON.stringify(me.selCoupon)); | |
235 | - // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon | |
236 | - // .discValue); | |
237 | - // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) { | |
238 | 252 | }, |
239 | 253 | computed: { |
240 | 254 | startDate() { |
... | ... | @@ -245,6 +259,27 @@ export default { |
245 | 259 | } |
246 | 260 | }, |
247 | 261 | methods: { |
262 | + couponIssuedParkPage: function () { | |
263 | + console.log(this.arrayWay) | |
264 | + let that = this | |
265 | + let paramsData = { | |
266 | + pageNum: this.pageNum, | |
267 | + pageSize: this.pageSize, | |
268 | + beginTime: this.beginTime, | |
269 | + endTime: this.endTime, | |
270 | + cardType: '', //卡券类型 :1-单次券,2-时长券,3-满减券,4-金额券,5-包天券 | |
271 | + isUesed: '1', //所有状态:已失效,已使用、未使用 | |
272 | + } | |
273 | + // 首页信息获取 接口 | |
274 | + that.$myRequest({ | |
275 | + url: that.$common.couponIssuedParkPage, | |
276 | + method: 'POST', | |
277 | + data: that.$common.requestSign(paramsData) | |
278 | + }).then(res => { | |
279 | + this.dataList = res.data.dataList | |
280 | + console.log(this.dataList) | |
281 | + }) | |
282 | + }, | |
248 | 283 | bindPickerChange: function (e) { |
249 | 284 | console.log('picker发送选择改变,携带值为', e.detail.value) |
250 | 285 | this.index = e.detail.value |
... | ... | @@ -254,10 +289,10 @@ export default { |
254 | 289 | this.indexWay = e.detail.value |
255 | 290 | }, |
256 | 291 | bindStartDateChange: function (e) { |
257 | - this.benginDate = e.detail.value | |
292 | + this.beginTime = e.detail.value | |
258 | 293 | }, |
259 | 294 | bindEndDateChange: function (e) { |
260 | - this.overDate = e.detail.value | |
295 | + this.endTime = e.detail.value | |
261 | 296 | }, |
262 | 297 | getDate(type) { |
263 | 298 | const date = new Date(); |
... | ... | @@ -296,7 +331,7 @@ export default { |
296 | 331 | justify-content: space-between; |
297 | 332 | } |
298 | 333 | |
299 | - .paddingRight{ | |
334 | + .paddingRight { | |
300 | 335 | padding-right: 20px; |
301 | 336 | } |
302 | 337 | </style> | ... | ... |