Commit 78e17486a8152f3bc815acf798e3c8da1cb87620

Authored by 刘淇
1 parent 1bbce61f

商户券明细

common/common.js
@@ -29,11 +29,15 @@ const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBu @@ -29,11 +29,15 @@ const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBu
29 const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId"; 29 const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId";
30 //刘淇接口 30 //刘淇接口
31 31
32 -  
33 // 商户卡券-可以购买卡券列表-分页 32 // 商户卡券-可以购买卡券列表-分页
34 const couponRuleParkPage = serverUrl + "/business/h5/coupon/couponRuleParkPage"; 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,7 +193,7 @@ export default {
189 getBusinessParkOrderByBusIdForPage, 193 getBusinessParkOrderByBusIdForPage,
190 getPayOrderByOrderId, 194 getPayOrderByOrderId,
191 couponRuleParkPage, 195 couponRuleParkPage,
192 - 196 + couponIssuedParkPage,
193 197
194 //陈彪接口 198 //陈彪接口
195 rechargeList, 199 rechargeList,
pages/businessCard/businessCard.vue
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </uni-list> 14 </uni-list>
15 <view slot="actions" class="card-actions no-border"> 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 <uni-icons type="cart-filled" size="18" color="#999"></uni-icons> 18 <uni-icons type="cart-filled" size="18" color="#999"></uni-icons>
19 <text class="card-actions-item-text">购买</text> 19 <text class="card-actions-item-text">购买</text>
20 </view> 20 </view>
@@ -83,6 +83,11 @@ export default { @@ -83,6 +83,11 @@ export default {
83 console.log(this.dataList) 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 </script> 93 </script>
pages/businessCard/buyCard.vue
@@ -3,15 +3,6 @@ @@ -3,15 +3,6 @@
3 3
4 <uni-section title="2小时(时长券)" type="line" > 4 <uni-section title="2小时(时长券)" type="line" >
5 <uni-card padding="0" spacing="0"> 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 <uni-list> 6 <uni-list>
16 <uni-list-item title="适应车场" rightText="万达商业广场" > 7 <uni-list-item title="适应车场" rightText="万达商业广场" >
17 <text></text> 8 <text></text>
@@ -70,15 +61,7 @@ @@ -70,15 +61,7 @@
70 </view> 61 </view>
71 <uni-section title="24小时(包天券)" type="line" > 62 <uni-section title="24小时(包天券)" type="line" >
72 <uni-card padding="0" spacing="0"> 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 <uni-list> 65 <uni-list>
83 <uni-list-item title="适应车场" rightText="万达商业广场" > 66 <uni-list-item title="适应车场" rightText="万达商业广场" >
84 <text></text> 67 <text></text>
@@ -120,7 +103,6 @@ @@ -120,7 +103,6 @@
120 </template> 103 </template>
121 104
122 <script> 105 <script>
123 -import common from "../../common/common.js";  
124 export default { 106 export default {
125 data() { 107 data() {
126 const currentDate = this.getDate({ 108 const currentDate = this.getDate({
@@ -162,18 +144,7 @@ export default { @@ -162,18 +144,7 @@ export default {
162 }, 144 },
163 onShow() { 145 onShow() {
164 var me = this; 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 mounted() { 149 mounted() {
179 setTimeout(() => { 150 setTimeout(() => {
pages/businessCard/cardDetail.vue
@@ -36,8 +36,9 @@ @@ -36,8 +36,9 @@
36 开始时间 36 开始时间
37 </view> 37 </view>
38 <view class="uni-list-cell-db"> 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 </picker> 42 </picker>
42 </view> 43 </view>
43 </view> 44 </view>
@@ -49,13 +50,55 @@ @@ -49,13 +50,55 @@
49 结束时间 50 结束时间
50 </view> 51 </view>
51 <view class="uni-list-cell-db"> 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 </picker> 55 </picker>
55 </view> 56 </view>
56 </view> 57 </view>
57 </view> 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 <uni-section title="8折(折扣券)" type="line"> 102 <uni-section title="8折(折扣券)" type="line">
60 <uni-list> 103 <uni-list>
61 <uni-list-item> 104 <uni-list-item>
@@ -71,7 +114,7 @@ @@ -71,7 +114,7 @@
71 </view> 114 </view>
72 <view class="uni-flex uni-space-between" style="padding: 10px 0"> 115 <view class="uni-flex uni-space-between" style="padding: 10px 0">
73 <view> 116 <view>
74 - <text class="color-blue paddingRight" >领取时间</text> 117 + <text class="color-blue paddingRight">领取时间</text>
75 2020-11-01 01:01:01 118 2020-11-01 01:01:01
76 </view> 119 </view>
77 <view class="color-green"> 120 <view class="color-green">
@@ -109,7 +152,7 @@ @@ -109,7 +152,7 @@
109 </view> 152 </view>
110 <view class="uni-flex uni-space-between" style="padding: 10px 0"> 153 <view class="uni-flex uni-space-between" style="padding: 10px 0">
111 <view> 154 <view>
112 - <text class="color-blue paddingRight" >领取时间</text> 155 + <text class="color-blue paddingRight">领取时间</text>
113 2020-11-01 01:01:01 156 2020-11-01 01:01:01
114 </view> 157 </view>
115 <view class="color-red"> 158 <view class="color-red">
@@ -146,7 +189,7 @@ @@ -146,7 +189,7 @@
146 </view> 189 </view>
147 <view class="uni-flex uni-space-between" style="padding: 10px 0"> 190 <view class="uni-flex uni-space-between" style="padding: 10px 0">
148 <view> 191 <view>
149 - <text class="color-blue paddingRight" >领取时间</text> 192 + <text class="color-blue paddingRight">领取时间</text>
150 2020-11-01 01:01:01 193 2020-11-01 01:01:01
151 </view> 194 </view>
152 <view class="color-blue"> 195 <view class="color-blue">
@@ -167,13 +210,10 @@ @@ -167,13 +210,10 @@
167 </uni-list-item> 210 </uni-list-item>
168 </uni-list> 211 </uni-list>
169 </uni-section> 212 </uni-section>
170 -  
171 -  
172 </view> 213 </view>
173 </template> 214 </template>
174 215
175 <script> 216 <script>
176 -import common from "../../common/common.js";  
177 export default { 217 export default {
178 data() { 218 data() {
179 const currentDate = this.getDate({ 219 const currentDate = this.getDate({
@@ -181,15 +221,15 @@ export default { @@ -181,15 +221,15 @@ export default {
181 }) 221 })
182 return { 222 return {
183 title: 'picker', 223 title: 'picker',
184 - array: ['折扣券', '金额券', '单次券', '包天券', '满减券', '时长券'],  
185 - arrayWay: ['所有状态', '已失效', '已使用', '未使用', '已失效'], 224 + array: ['单次券', '时长券', '满减券', '金额券', '包天券'],
  225 + arrayWay: ['已使用/绑定', '未使用'],
186 index: 0, 226 index: 0,
187 indexWay: 0, 227 indexWay: 0,
188 - benginDate: currentDate,  
189 - overDate: currentDate, 228 + beginTime: currentDate,
  229 + endTime: currentDate,
190 rows: [], 230 rows: [],
191 - pageNum: 1,//当前页  
192 - pageSize: 1,//每页条数 231 + pageNum: '1',//当前页
  232 + pageSize: '10',//每页条数
193 reload: false, 233 reload: false,
194 status: 'more', 234 status: 'more',
195 contentText: { 235 contentText: {
@@ -198,43 +238,17 @@ export default { @@ -198,43 +238,17 @@ export default {
198 contentmore: '我是有底线的~' 238 contentmore: '我是有底线的~'
199 }, 239 },
200 iconType: 'auto', // 图标样式 240 iconType: 'auto', // 图标样式
  241 + dataList: [],
201 } 242 }
202 }, 243 },
203 onLoad(params) { 244 onLoad(params) {
204 wx.showShareMenu({ 245 wx.showShareMenu({
205 withShareTicket: true 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 onShow() { 250 onShow() {
225 var me = this; 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 computed: { 253 computed: {
240 startDate() { 254 startDate() {
@@ -245,6 +259,27 @@ export default { @@ -245,6 +259,27 @@ export default {
245 } 259 }
246 }, 260 },
247 methods: { 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 bindPickerChange: function (e) { 283 bindPickerChange: function (e) {
249 console.log('picker发送选择改变,携带值为', e.detail.value) 284 console.log('picker发送选择改变,携带值为', e.detail.value)
250 this.index = e.detail.value 285 this.index = e.detail.value
@@ -254,10 +289,10 @@ export default { @@ -254,10 +289,10 @@ export default {
254 this.indexWay = e.detail.value 289 this.indexWay = e.detail.value
255 }, 290 },
256 bindStartDateChange: function (e) { 291 bindStartDateChange: function (e) {
257 - this.benginDate = e.detail.value 292 + this.beginTime = e.detail.value
258 }, 293 },
259 bindEndDateChange: function (e) { 294 bindEndDateChange: function (e) {
260 - this.overDate = e.detail.value 295 + this.endTime = e.detail.value
261 }, 296 },
262 getDate(type) { 297 getDate(type) {
263 const date = new Date(); 298 const date = new Date();
@@ -296,7 +331,7 @@ export default { @@ -296,7 +331,7 @@ export default {
296 justify-content: space-between; 331 justify-content: space-between;
297 } 332 }
298 333
299 - .paddingRight{ 334 + .paddingRight {
300 padding-right: 20px; 335 padding-right: 20px;
301 } 336 }
302 </style> 337 </style>