Commit 16cff37f829ec180533621d82a6d2f95b6d40006
1 parent
752e0b8b
停车记录
Showing
3 changed files
with
32 additions
and
39 deletions
common/common.js
... | ... | @@ -108,6 +108,11 @@ var getGlobalUser = function(key) { |
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | +// 除了金额 | |
112 | +var moneyFormat = function (val) { | |
113 | + return (val/100).toFixed(2) | |
114 | +} | |
115 | + | |
111 | 116 | export default { |
112 | 117 | |
113 | 118 | // deviceInfo, |
... | ... | @@ -119,6 +124,7 @@ export default { |
119 | 124 | appVerson, |
120 | 125 | SetToken, |
121 | 126 | requestSign, |
127 | + moneyFormat, | |
122 | 128 | |
123 | 129 | // 接口 |
124 | 130 | userLogin, | ... | ... |
common/uni.css
pages/parkRecordList/parkRecordList.vue
... | ... | @@ -27,40 +27,28 @@ |
27 | 27 | </view> |
28 | 28 | </view> |
29 | 29 | |
30 | - | |
31 | - <view class="parkRecordWrap"> | |
32 | - <view> | |
33 | - 金融物流港(原蒙东云计算) | |
34 | - </view> | |
35 | - <view class="recordCon"> | |
36 | - <text>蒙DL232112</text> | |
37 | - <text>2022-03-20 20:20:20</text> | |
38 | - </view> | |
39 | - <view class="recordCon"> | |
40 | - <text>实收:10.00</text> | |
41 | - <text>应收:10.00</text> | |
30 | + <view v-if="recordList.length>0"> | |
31 | + <view class="parkRecordWrap" v-for="(i, index) in recordList"> | |
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> | |
42 | 44 | </view> |
43 | - </view> | |
44 | 45 | |
45 | - | |
46 | - <view class="parkRecordWrap"> | |
47 | - <view> | |
48 | - 金融物流港(原蒙东云计算) | |
49 | - </view> | |
50 | - <view class="recordCon"> | |
51 | - <text>蒙DL232112</text> | |
52 | - <text>2022-03-20 20:20:20</text> | |
53 | - </view> | |
54 | - <view class="recordCon"> | |
55 | - <text>实收:10.00</text> | |
56 | - <text>应收:10.00</text> | |
57 | - </view> | |
58 | 46 | </view> |
59 | 47 | |
60 | 48 | |
61 | - <view v-if="shownoFlag == 1" class="novipcard_Mid"> | |
62 | - <image class="novipcard" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image> | |
63 | - <view class="novipcard_txt"> | |
49 | + <view v-else> | |
50 | + <image class="marginAuto" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image> | |
51 | + <view class="text-center"> | |
64 | 52 | 暂无停车记录 |
65 | 53 | </view> |
66 | 54 | |
... | ... | @@ -81,7 +69,8 @@ export default { |
81 | 69 | date: currentDate, |
82 | 70 | mycarNumber: '', |
83 | 71 | userIsLogin: false, |
84 | - shownoFlag: 0 | |
72 | + // shownoFlag: 0, | |
73 | + recordList: [], | |
85 | 74 | } |
86 | 75 | }, |
87 | 76 | onLoad(params) { |
... | ... | @@ -89,14 +78,7 @@ export default { |
89 | 78 | withShareTicket: true |
90 | 79 | }) |
91 | 80 | console.log("params.record : " + params.record); |
92 | - if (params.record == 1) { | |
93 | - this.mycarNumber = ''; | |
94 | - } | |
95 | - else { | |
96 | - this.mycarNumber = params.carNumber; | |
97 | - // this.mycarNumber = '苏B3M913'; | |
98 | - } | |
99 | - this.getBusinessParkOrderByBusIdForPage() | |
81 | + this.getBusinessParkOrderByBusIdForPage() | |
100 | 82 | }, |
101 | 83 | onShow() { |
102 | 84 | var me = this; |
... | ... | @@ -133,7 +115,7 @@ export default { |
133 | 115 | method: 'POST', |
134 | 116 | data: that.$common.requestSign(paramsData) |
135 | 117 | }).then(res => { |
136 | - console.log(res) | |
118 | + this.recordList = res.data.dataList | |
137 | 119 | }) |
138 | 120 | }, |
139 | 121 | bindDateChange: function (e) { | ... | ... |