zhengkaixin 3 năm trước cách đây
mục cha
commit
e2bd2a2d12

+ 20 - 1
pages/record/details.vue

@@ -31,7 +31,7 @@
 				<view class="details-row"><p>消费电量</p><span>{{chargeDetail.electricQuantity != null ? chargeDetail.electricQuantity/10000 : '0.000'}}度</span></view>
 				<view class="details-row"><p>开始时间</p><span>{{chargeDetail.startTime}}</span></view>
 				<view class="details-row"><p>结束时间</p><span>{{chargeDetail.endTime}}</span></view>
-				<view class="details-row"><p>充电时长</p><span>{{chargeDetail.chargingMinute != null ? chargeDetail.chargingMinute+'分钟' : '00分00秒'}}</span></view>
+				<view class="details-row"><p>充电时长</p><span>{{chargeDetail.chargingMinute != null ? getPercent(chargeDetail.chargingMinute) : '0秒'}}</span></view>
 			</view>
 		</view>
 		<view class="details">
@@ -77,6 +77,25 @@
 			}
 		},
 		methods: {
+			getPercent(estimateMinute) {
+				var value="";
+				 
+				var ms =estimateMinute
+				if (ms > 0) {
+					var Hour = parseInt(Math.floor(ms / 60 ));
+					var Fen = parseInt(Math.floor(ms % 60 ));	
+				//	value = Hour + "小时"  + Fen+"分钟"
+					if(Hour){
+						value += Hour + "小时" 
+					}
+						
+					if(Fen){
+						value += Fen+"分钟"
+					}
+				}
+			
+				return value;
+			},
 			toHome() {
 				uni.navigateTo({
 					url: '/pages/index/index'

+ 20 - 1
pages/record/index.vue

@@ -25,7 +25,7 @@
 						<p :style="elderStatus ? 'font-size: 14px' : ''">充电电量:{{item.electricQuantity != null ? item.electricQuantity/10000 : '0.000'}}度</p>
 					</view>
 					<view class="recordList-row">
-						<p :style="elderStatus ? 'font-size: 14px' : ''">充电时长:{{item.chargingMinute != null ? item.chargingMinute+'分钟' : '00分00秒'}}</p>
+						<p :style="elderStatus ? 'font-size: 14px' : ''">充电时长:{{item.chargingMinute != null ? getPercent(item.chargingMinute): '0秒'}}</p>
 						<h4 class="oldTextjp2" oldstyle="font-size: 28px;">{{item.actualFee != null ? item.actualFee : '0.00'}}元</h4>
 					</view>
 				</view>
@@ -88,6 +88,25 @@
 			}
 		},
 		methods: {
+			getPercent(estimateMinute) {
+				var value="";
+				 
+				var ms =estimateMinute
+				if (ms > 0) {
+					var Hour = parseInt(Math.floor(ms / 60 ));
+					var Fen = parseInt(Math.floor(ms % 60 ));	
+				//	value = Hour + "小时"  + Fen+"分钟"
+					if(Hour){
+						value += Hour + "小时" 
+					}
+						
+					if(Fen){
+						value += Fen+"分钟"
+					}
+				}
+			
+				return value;
+			},
 			toUrl(item) {
 				if(item.status == '1') {
 					uni.navigateTo({

+ 18 - 2
pages/searchPile/apointment/apointmentRecharge.vue

@@ -12,8 +12,23 @@
 				<view class="details-item">
 					桩号:{{detail.deviceName}}
 				</view>
+				<template v-if="gun.sortNo">
+					<view class="details-item">
+						枪号:{{gun.sortNo}}号充电枪
+					</view>
+					<view class="details-item">
+						通道:{{gun.channelNo}}
+					</view>
+				</template>
+				
+				<template v-else >
+					<view class="details-item">
+						枪号:{{gun.channelNo}}号充电枪
+					</view>
+				</template>
+				
 				<view class="details-item">
-					枪号:{{id}}
+					号:{{id}}
 				</view>
 			</view>
 		</view>
@@ -103,7 +118,7 @@
 			return {
 				
 				
-				
+				gun:{},
 				id:0,
 				lockStatus:false,
 				lockTime:"",
@@ -198,6 +213,7 @@
 					uni.hideLoading()
 					this.lockStatus=res.data.lockStatus
 					this.lockTime=res.data.lockTime
+					this.gun=res.data.gun
 					if(this.lockStatus){
 						this.show=true;
 					}

+ 2 - 2
pages/searchPile/chargeProcess/dcCharging.vue

@@ -208,7 +208,7 @@
 			</view>
 			<view class="bottom2" >
 				<u-button type="primary"  @click="submit"
-				 :style="(chargingRecord.status==1||chargingRecord.status==4)?'background-color: #00b962':'background-color: #9be6c2;'"
+				 :style="(chargingRecord.status==0||chargingRecord.status==1||chargingRecord.status==4)?'background-color: #00b962':'background-color: #9be6c2;'"
 				 shape="circle" >结束充电</u-button>
 			</view>
 
@@ -488,7 +488,7 @@
 				})
 			},
 			submit() {
-				if(this.chargingRecord.status==1||this.chargingRecord.status==4){
+				if(this.chargingRecord.status==0||this.chargingRecord.status==1||this.chargingRecord.status==4){
 					
 				}else{
 					return

+ 2 - 1
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -70,7 +70,8 @@
 			</view>
 			<view class="charging-info">
 				<view class="name">
-					{{detail.name}}/充电枪{{gun.channelNo>9?gun.channelNo:'0'+gun.channelNo}}
+					{{detail.name}}/
+					{{gun.sortNo?gun.sortNo:gun.channelNo}}号充电枪
 					
 					<text class="free" v-if="gunDetail.chargingAppointment&&gunDetail.isMeAppoint">您已预约</text>
 					<text class="free" v-else-if="gunDetail.chargingAppointment&&!gunDetail.isMeAppoint">已被预约</text>