|
@@ -4,16 +4,16 @@
|
|
|
<u-navbar title="充电结束">
|
|
|
</u-navbar>
|
|
|
<view class="progress-bar2">
|
|
|
- <u-circle-progress width="400" active-color="green" :percent="50" border-width="20">
|
|
|
+ <u-circle-progress width="400" active-color="green" :percent="100" border-width="20">
|
|
|
<view class="u-progress-content">
|
|
|
<!-- <view class="u-progress-dot"></view> -->
|
|
|
<text class='u-progress-info' v-if="chargingGun.gunType==1">
|
|
|
- 50%
|
|
|
+ {{chargingRecord.endSoc}}
|
|
|
<p class="progress-text">当前电量</p>
|
|
|
</text>
|
|
|
|
|
|
<text class='u-progress-info' v-if="chargingGun.gunType==2">
|
|
|
- 20.000
|
|
|
+ {{chargingRecord.electricQuantity/10000}}
|
|
|
<p class="progress-text">已充电量(度)</p>
|
|
|
</text>
|
|
|
|
|
@@ -26,7 +26,7 @@
|
|
|
<view class="time-price">
|
|
|
<view class="item">
|
|
|
<view class="item-num">
|
|
|
- 00:20:00
|
|
|
+ {{getPercent2()}}
|
|
|
</view>
|
|
|
<view class="item-text">
|
|
|
充电时长
|
|
@@ -34,7 +34,7 @@
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<view class="item-num">
|
|
|
- 20:00元
|
|
|
+ {{chargingRecord.actualFee}}元
|
|
|
</view>
|
|
|
<view class="item-text">
|
|
|
充电金额
|
|
@@ -42,8 +42,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bottom">
|
|
|
- <u-button size="default" shape="circle">返回首页</u-button>
|
|
|
- <u-button size="default" shape="circle">查看订单详情</u-button>
|
|
|
+ <u-button size="default" shape="circle" @click="gotoMain(0)" >返回首页</u-button>
|
|
|
+ <u-button size="default" shape="circle" @click="gotoMain(1)">查看订单详情</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -152,8 +152,10 @@
|
|
|
停止充电后30分钟即开始收取占位费用,1元/分钟
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="bottom2" @click="submit">
|
|
|
- <u-button type="primary" shape="circle" >结束充电</u-button>
|
|
|
+ <view class="bottom2">
|
|
|
+ <u-button type="primary" @click="submit"
|
|
|
+ :style="chargingRecord.status==1?'':'background-color: #9be6c2;'"
|
|
|
+ shape="circle" >结束充电</u-button>
|
|
|
</view>
|
|
|
|
|
|
<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
|
|
@@ -204,6 +206,18 @@
|
|
|
this.addpercent()
|
|
|
},
|
|
|
methods: {
|
|
|
+ gotoMain(i){
|
|
|
+ if(i==0){
|
|
|
+ uni.reLaunch({
|
|
|
+ url:"/pages/index/index"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(i==1){
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages/record/details?id="+this.id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
addpercent(){
|
|
|
|
|
|
if(this.percent==0){
|
|
@@ -216,6 +230,18 @@
|
|
|
},100)
|
|
|
}
|
|
|
},
|
|
|
+ getPercent2() {
|
|
|
+ var ms=this.chargingRecord.chargingMinute*60;
|
|
|
+
|
|
|
+ var Hour = parseInt(Math.floor(ms / (60 * 60)));
|
|
|
+ var Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
|
|
|
+ var S = parseInt(Math.floor(ms % (60) ));
|
|
|
+
|
|
|
+ var obj = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen+ ":" + (S > 9 ? "" : "0") + S
|
|
|
+
|
|
|
+
|
|
|
+ return obj;
|
|
|
+ },
|
|
|
getPercent() {
|
|
|
var ms=this.chargingGun.chargeTimeSec;
|
|
|
|
|
@@ -286,6 +312,9 @@
|
|
|
})
|
|
|
},
|
|
|
submit() {
|
|
|
+ if(this.chargingRecord.status!=1){
|
|
|
+ return
|
|
|
+ }
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '确认结束充电?',
|
|
@@ -500,9 +529,7 @@
|
|
|
right: 0;
|
|
|
margin: auto;
|
|
|
|
|
|
- .u-btn--primary {
|
|
|
- background-color: #9be6c2;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|