|
@@ -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{
|