Commit aad2a308ffcbce08eb5a0c5462cf67e619c25fbc
Merge remote-tracking branch 'origin/branch' into branch
Showing
3 changed files
with
32 additions
and
39 deletions
common/common.js
| ... | ... | @@ -111,6 +111,11 @@ var getGlobalUser = function(key) { |
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | +// 除了金额 | |
| 115 | +var moneyFormat = function (val) { | |
| 116 | + return (val/100).toFixed(2) | |
| 117 | +} | |
| 118 | + | |
| 114 | 119 | export default { |
| 115 | 120 | |
| 116 | 121 | // deviceInfo, |
| ... | ... | @@ -122,6 +127,7 @@ export default { |
| 122 | 127 | appVerson, |
| 123 | 128 | SetToken, |
| 124 | 129 | requestSign, |
| 130 | + moneyFormat, | |
| 125 | 131 | |
| 126 | 132 | // 接口 |
| 127 | 133 | 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) { | ... | ... |