Commit 83c494796243558da567e3679a9b65d46b5785fa

Authored by chenbiao
1 parent e357dabe

add 7月需求

common/common.js
1 1 import md5 from './md5.min.js';
2 2 // 江阴正式环境
3 3 var serverUrl = "https://bus.jycrtc.com";
  4 +// 测试环境
  5 +// var serverUrl = "http://test.jycrtc.com:8096";
4 6 //江阴微信小程序appid
5 7 const hs_wxPay_appId = 'wxfdc1af620d3ab750';
6 8 // 江阴慧停车orgId
... ... @@ -67,13 +69,17 @@ const walletDetailsPage = serverUrl + "/business/h5/wallet/detailsPage";
67 69 // 钱包充值-微信
68 70 const publicUnifiedOrder = serverUrl + "/business/h5/pay/weixinpay/publicUnifiedOrder";
69 71  
  72 +// 根据商户支出停车费订单ID获取订单信息
  73 +const getParkingInfoByOrderId = serverUrl + "/business/h5/wallet/detail/getParkingInfoByOrderId";
  74 +
70 75 // 钱包-根据订单ID获取购买优惠券信息
71 76 const couponInfo = serverUrl + "/business/h5/wallet/detail/couponInfo";
72 77 // 根据车牌号查询车牌号订单支付详情
73 78 const queryParkingRecordByCarNumbers ="https://pay.jycrtc.com/queryParkOrder/queryParkingRecordPageByCarNumbersForBusiness";
74   -
75   -const getOpenIdByCode = "https://pay.jycrtc.com/weixinPublicPay/getSmallRoutineOpenIdByCode"
76   -
  79 +// 根据商户支出 购买卡券订单ID获取订单信息
  80 +const getOpenIdByCode = "https://pay.jycrtc.com/weixinPublicPay/getSmallRoutineOpenIdByCode"
  81 +// 停车记录明细总览
  82 +const parkingCouponSummary = serverUrl +"/business/h5/order/parkingCouponSummary"
77 83  
78 84 const requestSign = function (inputData) {
79 85 var jsonList = inputData || {};
... ... @@ -257,4 +263,6 @@ export default {
257 263 couponInfo,
258 264 queryParkingRecordByCarNumbers,
259 265 getOpenIdByCode,
  266 + getParkingInfoByOrderId,
  267 + parkingCouponSummary,
260 268 }
... ...
common/filters.js
... ... @@ -3,7 +3,11 @@ const tranNull = value => {
3 3 if (value === null || value === undefined || value === '') return '-'
4 4 return value
5 5 }
6   -
  6 +// 为空处理 return ‘’
  7 +const tranStrNull = value => {
  8 + if (value === null || value === undefined || value === '') return ''
  9 + return value
  10 +}
7 11  
8 12 /*
9 13 @切割字符串
... ... @@ -124,14 +128,37 @@ const cardTypeFormate = num => {
124 128  
125 129 }
126 130  
  131 +function formatDateYMD(value) {
  132 + if (value === null || value === undefined || value === ''){
  133 + return '-'
  134 + } else{
  135 + var date = new Date(value);
  136 + var y = date.getFullYear(),
  137 + m = date.getMonth() + 1,
  138 + d = date.getDate(),
  139 + h = date.getHours(),
  140 + i = date.getMinutes(),
  141 + s = date.getSeconds();
  142 + if (m < 10) { m = '0' + m; }
  143 + if (d < 10) { d = '0' + d; }
  144 + if (h < 10) { h = '0' + h; }
  145 + if (i < 10) { i = '0' + i; }
  146 + if (s < 10) { s = '0' + s; }
  147 + var t = y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s;
  148 + return t;
  149 + }
  150 +
  151 +}
127 152  
128 153 export default {
129 154 tranNull,
  155 + tranStrNull,
130 156 RMB,
131 157 cutString,
132 158 toFixed2,
133 159 ortherToFixed,
134 160 toThousands,
135 161 timeFormatter,
136   - cardTypeFormate
  162 + cardTypeFormate,
  163 + formatDateYMD,
137 164 }
... ...
pages/businessCard/buyCard.vue
... ... @@ -174,7 +174,7 @@ export default {
174 174 let that = this
175 175 let paramsData = {
176 176 buyNum: this.vModelValue.toString(),
177   - totalPrice: this.needPay.toString(),
  177 + totalPrice: (this.needPay * 100).toString(),
178 178 cardRelParkNo: this.cardRelParkNo,
179 179 cardRuleNo: this.cardRuleNo
180 180 }
... ...
pages/index/index.vue
... ... @@ -21,7 +21,7 @@
21 21 <button type="primary" @click="login">登录</button>
22 22 </view>
23 23 <view class="uni-common-mt login-foot">
24   - 点击”登录“,即表示你同意《商户用户协议》
  24 + 点击”登录“,即表示你同意<view style="color: blue;">《商户用户协议》</view>
25 25 </view>
26 26 </view>
27 27 <view class="bg-white" v-else>
... ...
pages/moneyRecharge/moneyRecharge.vue
... ... @@ -3,7 +3,7 @@
3 3  
4 4 <view class="rechargeTop">
5 5 <view class="toDetail uni-list-cell-pd uni-right" @click="detailCell">明细 ></view>
6   - <view class="rechargeNum uni-center">¥{{acctBalance | toFixed2 }}</view>
  6 + <view class="rechargeNum uni-center">¥{{acctBalance | toFixed2 }}</view>
7 7 </view>
8 8  
9 9 <uni-section title="充值金额(元)" type="line" padding>
... ...
pages/parkPay/parkPay.vue
1 1 <template>
2   - <view>
  2 + <view>
3 3  
4   - <!-- <view class="order-time">
  4 + <!-- <view class="order-time">
5 5 剩余支付时间: {{appOrderTimeout}}
6 6 </view> -->
7 7  
8   - <view class="order-title">
9   - 订单详情
10   - </view>
11   - <view class="order-info">
12   - 车牌号:{{mycarNumber | tranNull}}
13   - </view>
14   - <view class="order-line"></view>
15   - <view class="order-info">
16   - 停车场:{{parkName | tranNull}}
17   - </view>
18   - <view class="order-line"></view>
19   - <view class="order-info">
20   - 进场时间:{{parkInTime | tranNull}}
21   - </view>
22   - <view class="order-line"></view>
23   - <view class="order-info">
24   - 停车时间:{{staytime | timeFormatter}}
25   - </view>
26   - <view class="order-line"></view>
27   - <view class="order-info">
28   - 总计费用:{{due |toFixed2}}元
29   - </view>
30   - <view class="order-line"></view>
31   -
32   - <view class="flex-row-justify-between">
33   - <view class="order-info">
34   - 支付金额
35   - </view>
36   - <view class="flex-row-justify-end">
37   - <view class="order-info" style="font-weight:bold;font-size:17px ;">
38   - {{orderFee | toFixed2}}
39   - </view>
40   - <view class="order-info" style="margin-right: 50upx;margin-left: 0px;">
41   - 元
42   - </view>
43   - </view>
44   - </view>
45   -
46   - <view class="order-line-bold"></view>
47   -
48   - <view class="order-title">
49   - 支付方法
50   - </view>
51   - <view class="order-line"></view>
52   -
53   - <view class="orderwaysview">
54   - <!--<image src="../../static/orderInfo/orderinfo-wechat.png" class="orderways"></image>-->
55   - <view class="order-info" style="margin-left: 15px;">
56   - 商户余额
57   - </view>
58   - <image src="../../static/orderInfo/orderinfo-sel.png" class="orderwaysSel"></image>
59   -
60   - </view>
61   -
62   - <view class="order-line"></view>
63   - <button @click="payClick" class="button-sp-area" type="primary" plain="true">确认支付</button>
64   -
65   - </view>
  8 + <view class="order-title">
  9 + 订单详情
  10 + </view>
  11 + <view class="order-info">
  12 + 车牌号:{{mycarNumber | tranNull}}
  13 + </view>
  14 + <view class="order-line"></view>
  15 + <view class="order-info">
  16 + 停车场:{{parkName | tranNull}}
  17 + </view>
  18 + <view class="order-line"></view>
  19 + <view class="order-info">
  20 + 进场时间:{{parkInTime | tranNull}}
  21 + </view>
  22 + <view class="order-line"></view>
  23 + <view class="order-info">
  24 + 停车时间:{{staytime | timeFormatter}}
  25 + </view>
  26 + <view class="order-line"></view>
  27 + <view class="order-info">
  28 + 总计费用:{{due |toFixed2}}元
  29 + </view>
  30 + <view class="order-line"></view>
  31 +
  32 + <view class="flex-row-justify-between">
  33 + <view class="order-info">
  34 + 需支付金额
  35 + </view>
  36 + <view class="flex-row-justify-end">
  37 + <view class="order-info" style="font-weight:bold;font-size:18px;">
  38 + {{orderFee | toFixed2}}
  39 + </view>
  40 + <view class="order-info" style="margin-right: 50upx;margin-left: 0px;">
  41 + 元
  42 + </view>
  43 + </view>
  44 + </view>
  45 + <view class="uni-list-cell-pd pos-rel">
  46 + <input class="" type="number"
  47 + style="background-color: #fff;height:40px;line-height: 40px;padding-left: 15px;font-size: 20px;" v-model="rechargeNum"
  48 + @input="checkNum" :maxlength="maxlength" placeholder="确认支付金额(单位:元)">
  49 + <view class="pos-abs paywarp">
  50 + 元
  51 + </view>
  52 + </view>
  53 + <view class="order-line-bold"></view>
  54 +
  55 + <view class="order-title">
  56 + 支付方法
  57 + </view>
  58 + <view class="order-line"></view>
  59 +
  60 + <view class="orderwaysview">
  61 + <!--<image src="../../static/orderInfo/orderinfo-wechat.png" class="orderways"></image>-->
  62 + <view class="order-info" style="margin-left: 15px;">
  63 + 商户余额
  64 + </view>
  65 + <image src="../../static/orderInfo/orderinfo-sel.png" class="orderwaysSel"></image>
  66 +
  67 + </view>
  68 +
  69 + <view class="order-line"></view>
  70 + <button @click="payClick" class="button-sp-area" type="primary" plain="true">确认支付</button>
  71 +
  72 + </view>
66 73 </template>
67 74  
68 75 <script>
69   -export default {
70   - data() {
71   - return {
72   - businessId: '',
73   - orderId: '',
74   - mycarNumber: '',
75   - parkName: '',
76   - parkInTime: '',
77   - staytime: '',
78   - due: '',
79   - orderFee: '',
80   - // appOrderTimeout:'0',
81   - totalFee: '', //应收
82   - }
83   - },
84   - onLoad(params) {
85   - wx.showShareMenu({
86   - withShareTicket: true
87   - })
88   - let data = JSON.parse(params.optionData)
89   - this.mycarNumber = data.carNumber
90   - this.parkName = data.parkName;
91   - this.parkInTime = data.parkInTime;
92   - this.staytime = data.parkDuration;
93   - this.due = data.totalFee;
94   - this.orderFee = data.unPayFee;
95   - this.orderId = data.orderId;
96   - },
97   - onShow() {
98   - },
99   - methods: {
100   - payClick() {
101   - let that = this;
102   - let paramsData = {
103   - payType: '35',
104   - paySrcType: '101',
105   - orderId: that.orderId,
106   - payFee: that.orderFee,
107   - }
108   - // 获取 接口
109   - that.$myRequest({
110   - url: that.$common.accountPay,
111   - method: 'POST',
112   - data: that.$common.requestSign(paramsData)
113   - }).then(res => {
114   - console.log('余额支付:' + res)
115   - uni.showToast({
116   - title: "支付成功",
117   - icon: 'success',
118   - duration: 2000
119   - });
120   - setTimeout(function () {
121   - let pages = getCurrentPages(); //当前页
122   - let beforePage = pages[pages.length - 2];
123   - uni.navigateBack({
124   - success: function () {
125   - beforePage.onLoad();
126   - }
127   - })
128   - }, 2000);
129   - })
130   - },
131   - }
132   -}
  76 + export default {
  77 + data() {
  78 + return {
  79 + businessId: '',
  80 + orderId: '',
  81 + mycarNumber: '',
  82 + parkName: '',
  83 + parkInTime: '',
  84 + staytime: '',
  85 + due: '',
  86 + orderFee: '',
  87 + // appOrderTimeout:'0',
  88 + totalFee: '', //应收
  89 + rechargeNum: '',
  90 + maxlength: 6 //默认一个长度
  91 + }
  92 + },
  93 + onLoad(params) {
  94 + wx.showShareMenu({
  95 + withShareTicket: true
  96 + })
  97 + let data = JSON.parse(params.optionData)
  98 + this.mycarNumber = data.carNumber
  99 + this.parkName = data.parkName;
  100 + this.parkInTime = data.parkInTime;
  101 + this.staytime = data.parkDuration;
  102 + this.due = data.totalFee;
  103 + this.orderFee = data.unPayFee;
  104 + this.rechargeNum = data.unPayFee / 100;
  105 + this.orderId = data.orderId;
  106 + },
  107 + onShow() {},
  108 + methods: {
  109 + checkNum(e) {
  110 + let value = e.detail.value;
  111 + let dot = value.indexOf('.'); //包含小数点
  112 + let reg = /^[0-9]+$/; //正整数
  113 + if (dot > -1) {
  114 + this.maxlength = dot + 3; //长度是小数点后两位
  115 + if (value.length > dot + 3) {}
  116 + }
  117 + if (reg.test(value)) { //如果是正整数不包含小数点
  118 + this.maxlength = 6;
  119 + }
  120 + },
  121 + payClick() {
  122 + let that = this;
  123 + let orderFee = that.orderFee;
  124 + let rechargeNum = that.rechargeNum;
  125 + if (rechargeNum <= 0) {
  126 + return uni.showToast({
  127 + title: '不能输入小于等于0的金额',
  128 + icon: 'error'
  129 + })
  130 + } else if (rechargeNum === " ") {
  131 + return uni.showToast({
  132 + title: '金额不能为空',
  133 + icon: 'error'
  134 + })
  135 + } else if (rechargeNum > orderFee) {
  136 + return uni.showToast({
  137 + title: '金额不能大于需支付金额',
  138 + icon: 'error'
  139 + })
  140 + } else {
  141 +
  142 + let paramsData = {
  143 + payType: '35',
  144 + paySrcType: '101',
  145 + orderId: that.orderId,
  146 + payFee: (rechargeNum * 100).toString(),
  147 + }
  148 + // 获取 接口
  149 + that.$myRequest({
  150 + url: that.$common.accountPay,
  151 + method: 'POST',
  152 + data: that.$common.requestSign(paramsData)
  153 + }).then(res => {
  154 + console.log('余额支付:' + res)
  155 + uni.showToast({
  156 + title: "支付成功",
  157 + icon: 'success',
  158 + duration: 2000
  159 + });
  160 + setTimeout(function() {
  161 + let pages = getCurrentPages(); //当前页
  162 + let beforePage = pages[pages.length - 2];
  163 + uni.navigateBack({
  164 + success: function() {
  165 + beforePage.onLoad();
  166 + }
  167 + })
  168 + }, 2000);
  169 + })
  170 + }
  171 +
  172 + },
  173 + }
  174 + }
133 175 </script>
134 176  
135 177 <style scoped lang="scss">
136   - .order-time {
137   - padding: 5px 0;
138   - background: #f0ad4e;
139   - text-align: center;
140   - color: #fff;
141   - }
142   -
143   - .order-title {
144   - font-size: 18px;
145   - margin-left: 16px;
146   - margin-top: 15px;
147   - font-weight: bold;
148   - color: #404040;
149   - }
150   -
151   - .order-info {
152   - font-size: 14px;
153   - margin-left: 15px;
154   - margin-top: 12px;
155   - color: #404040;
156   - }
157   -
158   - .order-line {
159   - background: #D9D9D9;
160   - height: 1px;
161   - margin-top: 12px;
162   - margin-left: 15px;
163   - padding: 0px;
164   - overflow: hidden;
165   - /* 透明度 */
166   - opacity: 0.5;
167   - }
168   -
169   - .order-line-bold {
170   - background: #FAFAFA;
171   - height: 12px;
172   - margin-top: 12px;
173   - padding: 0px;
174   - overflow: hidden;
175   - }
176   -
177   - .flex-row-justify-between {
178   - display: flex;
179   - flex-direction: row;
180   - justify-content: space-between;
181   - }
182   -
183   - .flex-row-justify-end {
184   - display: flex;
185   - flex-direction: row;
186   - /* 水平对齐*/
187   - align-items: baseline;
188   -
189   - }
190   -
191   - .order-discount {
192   - color: #C8C7CC;
193   - margin-right: 20 upx;
194   - /* margin-right: 12px ; */
195   - /* margin-top:12px ; */
196   -
197   - }
198   -
199   - .orderwaysview {
200   - display: flex;
201   - flex-direction: row;
202   - }
203   -
204   - .orderways {
205   - width: 18px;
206   - height: 18px;
207   - margin-left: 15px;
208   - margin-top: 14px;
209   - }
210   -
211   - .orderwaysSel {
212   - width: 16px;
213   - height: 16px;
214   - margin-left: auto;
215   - margin-right: 14px;
216   - margin-top: 14px;
217   - /* justify-content:flex-end; */
218   - }
219   -
220   - .button-sp-area {
221   - margin: 0 auto;
222   - width: 60%;
223   - margin-top: 40px;
224   -
225   - }
  178 + .order-time {
  179 + padding: 5px 0;
  180 + background: #f0ad4e;
  181 + text-align: center;
  182 + color: #fff;
  183 + }
  184 +
  185 + .order-title {
  186 + font-size: 18px;
  187 + margin-left: 16px;
  188 + margin-top: 15px;
  189 + font-weight: bold;
  190 + color: #404040;
  191 + }
  192 +
  193 + .order-info {
  194 + font-size: 14px;
  195 + margin-left: 15px;
  196 + margin-top: 12px;
  197 + color: #404040;
  198 + }
  199 +
  200 + .order-line {
  201 + background: #D9D9D9;
  202 + height: 1px;
  203 + margin-top: 12px;
  204 + margin-left: 15px;
  205 + padding: 0px;
  206 + overflow: hidden;
  207 + /* 透明度 */
  208 + opacity: 0.5;
  209 + }
  210 +
  211 + .order-line-bold {
  212 + background: #FAFAFA;
  213 + height: 12px;
  214 + margin-top: 12px;
  215 + padding: 0px;
  216 + overflow: hidden;
  217 + }
  218 +
  219 + .flex-row-justify-between {
  220 + display: flex;
  221 + flex-direction: row;
  222 + justify-content: space-between;
  223 + }
  224 +
  225 + .flex-row-justify-end {
  226 + display: flex;
  227 + flex-direction: row;
  228 + /* 水平对齐*/
  229 + align-items: baseline;
  230 +
  231 + }
  232 +
  233 + .order-discount {
  234 + color: #C8C7CC;
  235 + margin-right: 20 upx;
  236 + /* margin-right: 12px ; */
  237 + /* margin-top:12px ; */
  238 +
  239 + }
  240 +
  241 + .orderwaysview {
  242 + display: flex;
  243 + flex-direction: row;
  244 + }
  245 +
  246 + .orderways {
  247 + width: 18px;
  248 + height: 18px;
  249 + margin-left: 15px;
  250 + margin-top: 14px;
  251 + }
  252 +
  253 + .orderwaysSel {
  254 + width: 16px;
  255 + height: 16px;
  256 + margin-left: auto;
  257 + margin-right: 14px;
  258 + margin-top: 14px;
  259 + /* justify-content:flex-end; */
  260 + }
  261 +
  262 + .button-sp-area {
  263 + margin: 0 auto;
  264 + width: 60%;
  265 + margin-top: 40px;
  266 +
  267 + }
  268 +
  269 + .paywarp {
  270 + top: 12px;
  271 + right: 30px;
  272 + font-size: 20px;
  273 + height: 40px;
  274 + line-height: 40px;
  275 + }
226 276 </style>
... ...
pages/parkRecordList/parkRecordList.vue
1 1 <template>
2   - <view>
3   - <!--<view class="uni-title uni-common-pl">日期选择器</view>-->
  2 + <view>
  3 + <!--<view class="uni-title uni-common-pl">日期选择器</view>-->
  4 + <uni-notice-bar scrollable backgroundColor="#f0ad4e" color="#fff" single :text="detailText | tranNull">
  5 + </uni-notice-bar>
4 6  
  7 + <view class="uni-list">
  8 + <view class="uni-list-cell">
  9 + <view class="uni-list-cell-left">
  10 + 开始时间
  11 + </view>
  12 + <view class="uni-list-cell-db">
  13 + <picker mode="date" :value="startTime" :start="startDate" :end="endDate"
  14 + @change="bindStartDateChange">
  15 + <view class="uni-input">{{startTime}}</view>
  16 + </picker>
  17 + </view>
  18 + </view>
5 19  
6   - <view class="uni-list">
7   - <view class="uni-list-cell">
8   - <view class="uni-list-cell-left">
9   - 开始时间
10   - </view>
11   - <view class="uni-list-cell-db">
12   - <picker mode="date" :value="startTime" :start="startDate" :end="endDate" @change="bindStartDateChange">
13   - <view class="uni-input">{{startTime}}</view>
14   - </picker>
15   - </view>
16   - </view>
  20 + <view class="uni-list-cell">
  21 + <view class="uni-list-cell-left">
  22 + 结束时间
  23 + </view>
  24 + <view class="uni-list-cell-db">
  25 + <picker mode="date" :value="endTime" :start="startDate" :end="endDate" @change="bindDateChange">
  26 + <view class="uni-input">{{endTime}}</view>
  27 + </picker>
  28 + </view>
  29 + </view>
  30 + </view>
17 31  
18   - <view class="uni-list-cell">
19   - <view class="uni-list-cell-left">
20   - 结束时间
21   - </view>
22   - <view class="uni-list-cell-db">
23   - <picker mode="date" :value="endTime" :start="startDate" :end="endDate" @change="bindDateChange">
24   - <view class="uni-input">{{endTime}}</view>
25   - </picker>
26   - </view>
27   - </view>
28   - </view>
  32 + <view v-if="recordList.length>0">
  33 + <view class="parkRecordWrap" v-for="(i, index) in recordList" @click="toRecordDetail(i)">
  34 + <view>
  35 + {{i.plName}}
  36 + </view>
  37 + <view class="recordCon">
  38 + <text>{{i.carNumber}}</text>
  39 + <!--<text>{{i.parkOutTime}}</text>-->
  40 + <uni-dateformat :date="i.parkOutTime" format="yyyy-MM-dd hh:mm:ss"></uni-dateformat>
  41 + </view>
  42 + <view class="recordCon">
  43 + <text>实收:{{ $common.moneyFormat(i.orderActFee) }}</text>
  44 + <text>应收:{{ $common.moneyFormat(i.orderTotalFee) }}</text>
  45 + </view>
  46 + </view>
29 47  
30   - <view v-if="recordList.length>0">
31   - <view class="parkRecordWrap" v-for="(i, index) in recordList" @click="toRecordDetail(i)">
32   - <view>
33   - {{i.plName}}
34   - </view>
35   - <view class="recordCon">
36   - <text>{{i.carNumber}}</text>
37   - <!--<text>{{i.parkOutTime}}</text>-->
38   - <uni-dateformat :date="i.parkOutTime" format="yyyy-MM-dd hh:mm:ss"></uni-dateformat>
39   - </view>
40   - <view class="recordCon">
41   - <text>实收:{{ $common.moneyFormat(i.orderTotalFee) }}</text>
42   - <text>应收:{{ $common.moneyFormat(i.orderActFee) }}</text>
43   - </view>
44   - </view>
  48 + </view>
45 49  
46   - </view>
47 50  
  51 + <view v-else>
  52 + <image class="marginAuto" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image>
  53 + <view class="text-center">
  54 + 暂无停车记录
  55 + </view>
48 56  
49   - <view v-else>
50   - <image class="marginAuto" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image>
51   - <view class="text-center">
52   - 暂无停车记录
53   - </view>
  57 + </view>
54 58  
55   - </view>
56 59  
57   -
58   - </view>
  60 + </view>
59 61 </template>
60 62  
61 63 <script>
62   -export default {
63   - data() {
64   - const currentDate = this.getDate({
65   - format: true
66   - })
67   - return {
68   - startTime:currentDate,
69   - endTime: currentDate,
70   - mycarNumber: '',
71   - userIsLogin: false,
72   - // shownoFlag: 0,
73   - recordList: [],
74   - }
75   - },
76   - onLoad(params) {
77   - wx.showShareMenu({
78   - withShareTicket: true
79   - })
80   - console.log("params.record : " + params.record);
81   - this.getBusinessParkOrderByBusIdForPage()
82   - },
83   - onShow() {
84   - var me = this;
85   - var userInfo = me.getGlobalUser("globalUser");
86   - if (userInfo != null) {
87   - me.userIsLogin = true;
88   - } else {
89   - me.userIsLogin = false;
90   - }
91   - },
92   - // 过滤器
93   - filters: {},
94   - //计算属性
95   - computed: {
96   - startDate() {
97   - return this.getDate('start');
98   - },
99   - endDate() {
100   - return this.getDate('end');
101   - }
102   - },
103   - methods: {
104   - // 通过商户ID查询停车记录信息
105   - getBusinessParkOrderByBusIdForPage() {
106   - let that = this
107   - let paramsData = {
108   - businessId: uni.getStorageSync("indexInfo").businessId,
109   - startTime: that.startTime,
110   - endTime: that.endTime
111   - }
112   - // 首页信息获取 接口
113   - that.$myRequest({
114   - url: that.$common.getBusinessParkOrderByBusIdForPage,
115   - method: 'POST',
116   - data: that.$common.requestSign(paramsData)
117   - }).then(res => {
118   - this.recordList = res.data.dataList
119   - })
120   - },
121   - toRecordDetail: function(i){
122   - // console.log(orderId)
123   - uni.navigateTo({
124   - url: '../parkRecordList/recordDetail?optionData='+JSON.stringify(i)
125   - });
  64 + export default {
  65 + data() {
  66 + const currentDate = this.getDate({
  67 + format: true
  68 + })
  69 + return {
  70 + detailText: '',
  71 + startTime: currentDate,
  72 + endTime: currentDate,
  73 + mycarNumber: '',
  74 + userIsLogin: false,
  75 + // shownoFlag: 0,
  76 + recordList: [],
  77 + }
  78 + },
  79 + onLoad(params) {
  80 + wx.showShareMenu({
  81 + withShareTicket: true
  82 + })
  83 + console.log("params.record : " + params.record);
  84 + this.getCouponSummary();
  85 + this.getBusinessParkOrderByBusIdForPage()
  86 + },
  87 + onShow() {
  88 + var me = this;
  89 + var userInfo = me.getGlobalUser("globalUser");
  90 + if (userInfo != null) {
  91 + me.userIsLogin = true;
  92 + } else {
  93 + me.userIsLogin = false;
  94 + }
  95 + },
  96 + // 过滤器
  97 + filters: {},
  98 + //计算属性
  99 + computed: {
  100 + startDate() {
  101 + return this.getDate('start');
  102 + },
  103 + endDate() {
  104 + return this.getDate('end');
  105 + }
  106 + },
  107 + methods: {
  108 + getCouponSummary() {
  109 + let that = this;
  110 + let data = {
  111 + businessId: uni.getStorageSync("indexInfo").businessId,
  112 + startTime: that.startTime,
  113 + endTime: that.endTime
  114 + };
  115 + console.log(data)
  116 + that.$myRequest({
  117 + url: that.$common.parkingCouponSummary,
  118 + method: 'POST',
  119 + data: that.$common.requestSign(data)
  120 + }).then(res => {
  121 +
  122 + let data = res.data;
  123 + that.detailText = data.totalFeeSummary+' '+data.actFeeSummary+' '+data.dicountFeeSummary;
  124 +
  125 + })
  126 +
  127 + },
  128 + // 通过商户ID查询停车记录信息
  129 + getBusinessParkOrderByBusIdForPage() {
  130 + let that = this
  131 + let paramsData = {
  132 + businessId: uni.getStorageSync("indexInfo").businessId,
  133 + startTime: that.startTime,
  134 + endTime: that.endTime
  135 + }
  136 + // 首页信息获取 接口
  137 + that.$myRequest({
  138 + url: that.$common.getBusinessParkOrderByBusIdForPage,
  139 + method: 'POST',
  140 + data: that.$common.requestSign(paramsData)
  141 + }).then(res => {
  142 + this.recordList = res.data.dataList
  143 + })
  144 + },
  145 + toRecordDetail: function(i) {
  146 + // console.log(orderId)
  147 + uni.navigateTo({
  148 + url: '../parkRecordList/recordDetail?optionData=' + JSON.stringify(i)
  149 + });
126 150  
127   - },
128   - bindStartDateChange: function (e) {
129   - this.startTime = e.detail.value
130   - this.getBusinessParkOrderByBusIdForPage()
131   - },
132   - bindDateChange: function (e) {
133   - this.endTime = e.detail.value
134   - this.getBusinessParkOrderByBusIdForPage()
135   - },
136   - getDate(type) {
137   - const date = new Date();
138   - let year = date.getFullYear();
139   - let month = date.getMonth() + 1;
140   - let day = date.getDate();
141   - if (type === 'start') {
142   - year = year - 60;
143   - } else if (type === 'end') {
144   - year = year + 2;
145   - }
146   - month = month > 9 ? month : '0' + month;
147   - day = day > 9 ? day : '0' + day;
148   - return `${year}-${month}-${day}`;
149   - },
150   - }
151   -}
  151 + },
  152 + bindStartDateChange: function(e) {
  153 + this.startTime = e.detail.value
  154 + this.getCouponSummary();
  155 + this.getBusinessParkOrderByBusIdForPage()
  156 + },
  157 + bindDateChange: function(e) {
  158 + this.endTime = e.detail.value
  159 + this.getCouponSummary();
  160 + this.getBusinessParkOrderByBusIdForPage()
  161 + },
  162 + getDate(type) {
  163 + const date = new Date();
  164 + let year = date.getFullYear();
  165 + let month = date.getMonth() + 1;
  166 + let day = date.getDate();
  167 + if (type === 'start') {
  168 + year = year - 60;
  169 + } else if (type === 'end') {
  170 + year = year + 2;
  171 + }
  172 + month = month > 9 ? month : '0' + month;
  173 + day = day > 9 ? day : '0' + day;
  174 + return `${year}-${month}-${day}`;
  175 + },
  176 + }
  177 + }
152 178 </script>
153 179  
154 180 <style lang="scss" scoped>
155   - .parkRecordWrap {
156   - padding: 5px 40px 5px 15px;
157   - border-bottom: 1px solid #ccc;
158   - position: relative;
159   - :after {
160   - content: '>';
161   - position: absolute;
162   - top: 20px;
163   - right: 5px;
164   - font-size: 18px;
165   - }
166   - }
  181 + .parkRecordWrap {
  182 + padding: 5px 40px 5px 15px;
  183 + border-bottom: 1px solid #ccc;
  184 + position: relative;
  185 +
  186 + :after {
  187 + content: '>';
  188 + position: absolute;
  189 + top: 20px;
  190 + right: 5px;
  191 + font-size: 18px;
  192 + }
  193 + }
167 194  
168   - .recordCon {
169   - color: #999;
170   - display: flex;
171   - justify-content: space-between;
172   - }
  195 + .recordCon {
  196 + color: #999;
  197 + display: flex;
  198 + justify-content: space-between;
  199 + }
173 200 </style>
... ...
pages/rechargeDetail/outDetail.vue
1 1 <template>
2 2 <view>
3 3 <view style="height: 100px;line-height: 100px;" class="uni-center">
4   - <text style="font-size: 32px;font-weight: 500;">{{changeFeeDetail}}</text>
  4 + <text style="font-size: 32px;font-weight: 500;">{{changeFeeDetail}}</text>
5 5 </view>
6 6 <view class="border-bg"></view>
7 7  
... ... @@ -38,6 +38,42 @@
38 38 {{typeName | tranNull}}
39 39 </view>
40 40 </view>
  41 + <!-- 支出 支付停车费 sta -->
  42 + <view class="" v-if="parkIsShow">
  43 + <view class="uni-list-cell paddingTopBottom">
  44 + <view class="uni-list-cell-left">
  45 + 车场名称
  46 + </view>
  47 + <view class="uni-list-cell-db">
  48 + {{plName | tranNull}}
  49 + </view>
  50 + </view>
  51 + <view class="uni-list-cell paddingTopBottom">
  52 + <view class="uni-list-cell-left">
  53 + 车牌号码
  54 + </view>
  55 + <view class="uni-list-cell-db">
  56 + {{carNumber | tranNull}}
  57 + </view>
  58 + </view>
  59 + <view class="uni-list-cell paddingTopBottom">
  60 + <view class="uni-list-cell-left">
  61 + 入场时间
  62 + </view>
  63 + <view class="uni-list-cell-db">
  64 + {{parkInTime | formatDateYMD}}
  65 + </view>
  66 + </view>
  67 + <view class="uni-list-cell paddingTopBottom">
  68 + <view class="uni-list-cell-left">
  69 + 出场时间
  70 + </view>
  71 + <view class="uni-list-cell-db">
  72 + {{parkOutTime | formatDateYMD}}
  73 + </view>
  74 + </view>
  75 + </view>
  76 + <!-- 支出 购买卡券 sta -->
41 77 <view class="" v-if="cardIsShow">
42 78 <view class="uni-list-cell paddingTopBottom">
43 79 <view class="uni-list-cell-left">
... ... @@ -81,9 +117,14 @@
81 117 typeName: '',
82 118 payType: '商户余额',
83 119 cardRuleName: '',
  120 + plName: '',
  121 + carNumber: '',
  122 + parkInTime: '',
  123 + parkOutTime: '',
84 124 cardType: '',
85 125 cardNum: '',
86 126 cardIsShow: false,
  127 + parkIsShow: false,
87 128 }
88 129 },
89 130 onLoad(params) {
... ... @@ -101,8 +142,12 @@
101 142 if (option.typeName == "购买卡券") {
102 143 this.cardIsShow = true;
103 144 this.getCouponInfo();
  145 + } else if (option.typeName == "支付停车费") {
  146 + this.parkIsShow = true;
  147 + this.getParkingInfo();
104 148 } else {
105 149 this.cardIsShow = false;
  150 + this.parkIsShow = false;
106 151 }
107 152 },
108 153 onShow() {
... ... @@ -173,6 +218,24 @@
173 218 that.cardNum = res.data.buyNum
174 219 })
175 220 },
  221 + getParkingInfo() {
  222 + let that = this
  223 + let paramsData = {
  224 + orderId: that.orderId
  225 + }
  226 + that.$myRequest({
  227 + url: that.$common.getParkingInfoByOrderId,
  228 + method: 'POST',
  229 + data: that.$common.requestSign(paramsData)
  230 + }).then(res => {
  231 + console.log(res)
  232 +
  233 + that.plName = res.data.plName
  234 + that.carNumber = res.data.carNumber
  235 + that.parkInTime = res.data.parkInTime
  236 + that.parkOutTime = res.data.parkOutTime
  237 + })
  238 + },
176 239 }
177 240 }
178 241 </script>
... ...
pages/rechargeDetail/rechargeDetail.vue
... ... @@ -76,7 +76,7 @@
76 76 <uni-list class="rechargeWrap pos-rel" clickable v-for="(item, index) in orderList" :key="index" >
77 77 <view class="" @click="toOutDetail(item)">
78 78 <view class="recordCon uni-list-cell-pd">
79   - <text class="color-black">{{item.changeFeeDetail}}</text>
  79 + <text class="color-black">{{item.changeFeeDetail}}元 {{item.carNumber | tranStrNull}}</text>
80 80 <text>{{item.payStateDesc}}</text>
81 81 </view>
82 82 <view class="recordCon uni-list-cell-pd">
... ...