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,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 | export default { | 116 | export default { |
112 | 117 | ||
113 | // deviceInfo, | 118 | // deviceInfo, |
@@ -119,6 +124,7 @@ export default { | @@ -119,6 +124,7 @@ export default { | ||
119 | appVerson, | 124 | appVerson, |
120 | SetToken, | 125 | SetToken, |
121 | requestSign, | 126 | requestSign, |
127 | + moneyFormat, | ||
122 | 128 | ||
123 | // 接口 | 129 | // 接口 |
124 | userLogin, | 130 | userLogin, |
common/uni.css
@@ -1848,4 +1848,9 @@ checkbox-group label { | @@ -1848,4 +1848,9 @@ checkbox-group label { | ||
1848 | 1848 | ||
1849 | .color-62c7ee { | 1849 | .color-62c7ee { |
1850 | background-color: #62c7ee !important; | 1850 | background-color: #62c7ee !important; |
1851 | +} | ||
1852 | + | ||
1853 | +.marginAuto{ | ||
1854 | + width: 100%; | ||
1855 | + margin: 0 auto; | ||
1851 | } | 1856 | } |
1852 | \ No newline at end of file | 1857 | \ No newline at end of file |
pages/parkRecordList/parkRecordList.vue
@@ -27,40 +27,28 @@ | @@ -27,40 +27,28 @@ | ||
27 | </view> | 27 | </view> |
28 | </view> | 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 | </view> | 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 | </view> | 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 | </view> | 53 | </view> |
66 | 54 | ||
@@ -81,7 +69,8 @@ export default { | @@ -81,7 +69,8 @@ export default { | ||
81 | date: currentDate, | 69 | date: currentDate, |
82 | mycarNumber: '', | 70 | mycarNumber: '', |
83 | userIsLogin: false, | 71 | userIsLogin: false, |
84 | - shownoFlag: 0 | 72 | + // shownoFlag: 0, |
73 | + recordList: [], | ||
85 | } | 74 | } |
86 | }, | 75 | }, |
87 | onLoad(params) { | 76 | onLoad(params) { |
@@ -89,14 +78,7 @@ export default { | @@ -89,14 +78,7 @@ export default { | ||
89 | withShareTicket: true | 78 | withShareTicket: true |
90 | }) | 79 | }) |
91 | console.log("params.record : " + params.record); | 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 | onShow() { | 83 | onShow() { |
102 | var me = this; | 84 | var me = this; |
@@ -133,7 +115,7 @@ export default { | @@ -133,7 +115,7 @@ export default { | ||
133 | method: 'POST', | 115 | method: 'POST', |
134 | data: that.$common.requestSign(paramsData) | 116 | data: that.$common.requestSign(paramsData) |
135 | }).then(res => { | 117 | }).then(res => { |
136 | - console.log(res) | 118 | + this.recordList = res.data.dataList |
137 | }) | 119 | }) |
138 | }, | 120 | }, |
139 | bindDateChange: function (e) { | 121 | bindDateChange: function (e) { |