zhengkaixin преди 2 години
родител
ревизия
3504503541

+ 1 - 1
pages/index/index.vue

@@ -265,7 +265,7 @@
 					<span v-else >前方等待{{item.waitNum-1}}位</span>
 				</view>
 				<view class="text-3 oldTextjp2" oldstyle="font-size: 16px;">
-					{{item.deviceName}}<!-- /<br />{{item.deviceNo}} -->
+				<p style=" width: 160%;">	{{item.stationName}}/{{item.deviceName}}&nbsp;&nbsp;当前电价{{item.chargingCostPrice }}元/度</p>
 				</view>
 			</view>
 			<view class="img-box">

+ 0 - 4
pages/login/completeInfo.vue

@@ -209,10 +209,6 @@
 					uni.redirectTo({
 						url: '/pages/index/index'
 					})
-				}else {
-					uni.navigateBack({
-						url: '/pages/user/car/index'
-					})
 				}
 			},
 			checkboxChange() {

+ 4 - 3
pages/searchPile/chargeProcess/charge.vue

@@ -25,8 +25,9 @@
 			
 			<view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''" class="self-stop ">
 				充满自停
-			</view>
-			<view style="color: rgba(153, 153, 153, 100);
+			</view>
+			
+			<view  v-if="false"  style="color: rgba(153, 153, 153, 100); 
 			font-size: 14px;
 			text-align: left;
 			font-family: AlibabaPuHui-regular;">充满自停将<span style="color:#53b56b">预扣费10元</span>,充电结束后按实际金额结算,多退少补<br/>
@@ -130,7 +131,7 @@
 				stationId:"",
 				elderMode:false,
 				isback:true,
-				moneyActiveClass: "20",
+				moneyActiveClass: "-1",
 				detail: {},
 				couponsuse:'',
 				//提交信息

+ 94 - 8
pages/searchPile/chargeProcess/dcCharging.vue

@@ -136,7 +136,7 @@
 			</view>
 		</view>
 
-		<view style="background-color: #fff; padding-bottom: 60px;" v-else>
+		<view style="background-color: #fff; padding-bottom: 60px;"  class="progress-bar-main" v-else>
 			<ujp-navbar title="充电详情">
 			</ujp-navbar>
 			<view class="iconfont tittle-font" @click="show = true">
@@ -228,7 +228,18 @@
 						电流
 					</view>
 				</view>
-			</view>
+			</view>
+			<view class="info" >
+				<view class="info-name">
+					{{chargingRecord.chargeStrategy==0?'充电模式':''}}
+					{{chargingRecord.chargeStrategy==2?'充电金额':''}}
+				</view>
+				<view class="info-text" >
+					{{chargingRecord.chargeStrategy==0?'充满自停':''}}
+					{{chargingRecord.chargeStrategy==2?chargingRecord.estimateFee+'元':''}}
+				</view>
+			</view>
+			
 			<view class="info" >
 				<view class="info-name">
 					优惠券
@@ -261,7 +272,28 @@
 					 {{chargingRecord.deviceName}}枪{{chargingRecord.channelNo}} 
 					
 				</view>
-			</view>
+			</view>
+			
+			<view class="info" v-if="price" style="line-height: 23px;">
+				<view class="info-text" style="text-align: left;"  >
+					<view style="font-weight: bold;font-size: 20px;">当前价格</view>
+					<view class="info-name2" >
+						{{price.startTime}}-{{price.endTime}}
+					</view>
+				</view>
+				<view class="info-text"  style="line-height: 23px;">
+					<view><span style="color: #FF3D00;font-size: 20px;"><b>{{price.costPrice}}</b></span>元/度</view>
+					
+					<view class="info-name2">
+						电价:{{price.electricityPrice}}元 | 服务费:{{price.servicePrice}}元
+					</view>
+				</view>
+				
+				
+				
+			</view>
+			
+			
 			<view class="info" v-if="false">
 				<view class="info-name">
 					占位费说明
@@ -299,7 +331,13 @@
 </template>
 
 
-<script>
+<script>
+	var formatNum=function(num) {
+		let res = Number(num);
+		return res < 10 ? '0' + res : res;
+	};
+	import * as api from "@/apis/site.js"
+	
 	import * as API from '@/apis/chargeProcess.js'
 	import * as API_weixin from '@/apis/weixin.js'
 	import * as userAPI from '@/apis/user.js'
@@ -331,7 +369,8 @@
 				isReady:true,
 				waitNum:'',
 				projectName:"",
-				userCard:null,
+				userCard:null,
+				price:null,
 			}
 		},
 		onLoad(op) {
@@ -389,7 +428,41 @@
 				return false
 			}
 		},
-		methods: {
+		methods: {
+			getChargingStationPrice(id){
+				 
+				if(!id||id==undefined){
+					return 
+				}
+				//id='e012f9fe-90a8-4a47-bb64-26ea139c3c05'
+				api.getChargingStationPrice({
+					stationId:id
+				}).then((res)=>{
+					let date = new Date();
+					let hours = date.getHours();
+					let minutes = date.getMinutes();
+					let seconds = date.getSeconds();
+					let date_str =  formatNum(hours)+ ':'+ formatNum(minutes);//+ ' ' +formatWeek;
+					if(res.data.prices&&res.data.prices.length){
+						
+						for(var i in  res.data.prices[0].priceList){
+							var item=res.data.prices[0].priceList[i];
+							if(date_str>=item.startTime &&  date_str<= item.endTime)
+							{
+								this.price=	item								
+							}
+						}
+						
+					}
+					
+					
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
 			showToast() {
 				this.$refs.uToast.show({
 					title: '提交成功',
@@ -552,7 +625,8 @@
 					//(this.chargingRecord)
 					this.couponObj= res.data.coupon
 					this.chargingGun = res.data.chargingGun
-					this.waitNum=res.data.chargingRecord.waitNum;
+					this.waitNum=res.data.chargingRecord.waitNum;
+					this.getChargingStationPrice(this.chargingGun.stationId )
 					//this.isReady = true;
 					//直流
 					if(this.chargingGun.gunType==1){
@@ -648,7 +722,19 @@
 		padding-bottom: 50px;
 	}
 </style>
-<style lang="scss" scoped>
+<style lang="scss" scoped>
+	.progress-bar-main{
+		.info-name2{
+			color: #777777 ;
+			font-size:14px;
+		}
+		.info-name{
+			font-weight:bold;
+			font-size: 20px;
+			
+		}
+	}
+
 	@import "@/_theme.scss";
 	.tittle-font {
 		@include themeify{

+ 3 - 3
pages/searchPile/stationAndPile/chargingGunDetail.vue

@@ -58,9 +58,9 @@
 			carDet(t){
 				this.onShowRole = true
 				if(t){
-					uni.navigateTo({
-						url: "/pages/user/car/index?jpcode=jp_team51_charge_id:A_" +  this.id
-					})
+					// uni.navigateTo({
+					// 	url: "/pages/user/car/index?jpcode=jp_team51_charge_id:A_" +  this.id
+					// })
 				}else{
 					uni.navigateTo({
 						url: "/pages/user/car/carDet?jpcode=jp_team51_charge_id:A_" +  this.id

+ 3 - 5
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -126,7 +126,7 @@
 			</view>
 			<view class="car-number">
 				{{car?car.carNum:''}}
-				<img @click="carDet(car?car.carNum:'')" src="../../../static/img/riLine-edit-box-line Copy.svg" alt="">
+				<img   v-if="!car" @click="carDet(car?car.carNum:'')" src="../../../static/img/riLine-edit-box-line Copy.svg" alt="">
 			</view>
 		</view>
 
@@ -246,10 +246,8 @@
 			},
 			carDet(t){
 				this.onShowRole = true
-				if(t){
-					uni.navigateTo({
-						url: "/pages/user/car/index?jpcode=jp_team51_charge_id:A_" +  this.id
-					})
+				if(false){
+					
 				}else{
 					uni.navigateTo({
 						url: "/pages/user/car/carDet?jpcode=jp_team51_charge_id:A_" +  this.id

+ 10 - 8
pages/user/finance/balance.vue

@@ -75,14 +75,7 @@
 			}
 		},
 		onReady() {
-			var date = new Date();
-			var year = date.getFullYear();
-			var monthN = date.getMonth() + 1;	
-			if(monthN >= 1 && monthN <= 9) {
-				monthN = "0" + monthN;
-			}
-			this.dateMonth = year + '-' + monthN + '-01';
-			
+		
 			
 			if(this.carhelp.get("getElderModeClass") == "长辈模式") {
 				this.elderStatus = true;
@@ -91,6 +84,15 @@
 			}
 		},
 		onShow(){
+			
+			var date = new Date();
+			var year = date.getFullYear();
+			var monthN = date.getMonth() + 1;	
+			if(monthN >= 1 && monthN <= 9) {
+				monthN = "0" + monthN;
+			}
+			this.dateMonth = year + '-' + monthN + '-01';
+			
 			this.getCarPersonAccount();
 			this.getAccountRecordData();
 				

+ 10 - 2
pages/user/finance/refundList.vue

@@ -74,6 +74,7 @@
 			_self = this;
 		},
 		onReady(){
+		
 			this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
 			if(this.elderMode)
 				this.theme('elder')
@@ -166,8 +167,15 @@
 					}
 					
 				},function(err){
-					uni.showToast({
-						title:err
+					// uni.showToast({
+					// 	title:err
+					// })
+					
+					uni.showModal({
+							content:err,
+						title:'提示',
+						showCancel:false,
+						confirmText:'知道了'
 					})
 				}
 				);

+ 1 - 3
pages/user/index.vue

@@ -516,9 +516,7 @@
 			},
 			carManage() {
 				if(this.userId) {
-					uni.navigateTo({
-						url: '/pages/user/car/index'
-					})
+				
 				} else {
 					uni.navigateTo({
 						url: '/pages/login/login'