Browse Source

列表调整, 异常处理

zhengkaixin 1 năm trước cách đây
mục cha
commit
d2fca6ceeb
2 tập tin đã thay đổi với 46 bổ sung28 xóa
  1. 40 26
      pagesFinance/statistics/list.vue
  2. 6 2
      pagesFinance/user/pileManagement.vue

+ 40 - 26
pagesFinance/statistics/list.vue

@@ -75,9 +75,22 @@
 					  v-show="!getItem(item)"
 					 >
 						<view slot="title" class="u-collapse-title u-line-1" style="width: 100%;">
-						
-							{{item.station.stationNo?item.station.stationNo.substring(0,1):""}}-{{item.stationName}} <span style="float:right;"><span
-									style="font-size: 24rpx;margin-right: 8rpx;font-weight: normal;">总收入</span>{{item.actualMoney.toFixed(2)}}元</span>
+							<view style="    display: flex;
+    justify-content: space-between; flex-wrap: wrap;">
+								<view style="   margin-top: 3px;">{{item.station.stationNo?item.station.stationNo.substring(0,1):""}}-{{item.stationName}}</view>
+								 
+								 <view style="float:right;    margin-top: 3px;"><span
+										style="font-size: 24rpx;margin-right: 8rpx;font-weight: normal;">总收入</span>{{item.actualMoney.toFixed(2)}}元</view>
+							</view>
+							<view  style="    margin-top: 10px;" v-if="item.station.stationNo&&item.station.stationNo.indexOf('D')!=0" >
+								<span style="font-size: 24rpx; font-weight: normal;">平均充电量(度/枪/天)</span>
+								<span  style="float:right;">
+									<span style="font-size: 24rpx;margin-right: 8rpx;font-weight: normal;">快充枪:</span>{{(item.averageFast).toFixed(1)}} 
+									<span style="font-size: 24rpx;margin:0 8rpx;font-weight: normal;">|</span>
+									<span style="font-size: 24rpx;margin-right: 8rpx;font-weight: normal;">慢充枪:</span>{{(item.averageSlow).toFixed(1)}}
+								</span>
+								
+							</view>
 						</view>
 
 						<!-- -->
@@ -101,16 +114,22 @@
 								<view class="span1">总用电量</view>
 								<view class="span2">{{(item.eq).toFixed(1)}}<span>度</span></view>
 							</view>
-							<view class="details-row">
+							<view class="details-row"  v-if="item.station.stationNo&&item.station.stationNo.indexOf('D')!=0" >
 
 
 								<view class="span1">充电枪数量</view>
 								<view class="span2">快充{{item.fastNum}}/慢充{{item.slowNum}}</view>
+							</view>
+							<view class="details-row " v-else >
+								<view class="span1">总收入</view>
+								<view class="span2">{{item.actualMoney.toFixed(2)}}<span>元</span></view>
+							
+							
 							</view>
 						</view>
 
-						<view class="detailsline" v-if="item.fastNum||item.slowNum" >
-							<view class="details-row details-row-1"  v-if="item.fastNum" >
+						<view class="detailsline"  v-if="item.station.stationNo&&item.station.stationNo.indexOf('D')!=0"  >
+							<view class="details-row details-row-1"  >
 
 
 								<view class="span1">快充枪平均充电量</view>
@@ -119,9 +138,7 @@
 								</view>
 								<view class="span2" v-else>0<span>度/枪/天</span></view>
 							</view>
-							<view class="details-row " v-if="item.slowNum" :class="{
-								'details-row-1':item.fastNum==0
-							}" >
+							<view class="details-row " >
 
 								<view class="span1">慢充枪平均充电量</view>
 								<view class="span2" v-if="item.slowNum">
@@ -130,27 +147,24 @@
 								<view class="span2" v-else>0<span>度/枪/天</span></view>
 							</view>
 							
-							<view class="details-row "  v-if="!item.fastNum||!item.slowNum">
-							
-							
-								<view class="span1">折扣卡收益</view>
-								<view class="span2">{{(item.cardMoney).toFixed(2)}}<span>元</span></view>
-							
-							</view>
 						</view>
 
-						<view class="detailsline" v-if="item.fastNum&&item.slowNum">
+						<view class="detailsline"  v-if="item.station.stationNo&&item.station.stationNo.indexOf('D')!=0" >
+							
 							<view class="details-row details-row-1">
+								<view class="span1">总收入</view>
+								<view class="span2">{{item.actualMoney.toFixed(2)}}<span>元</span></view>
+							
 
-
-								<view class="span1">折扣卡收益</view>
-								<view class="span2">{{(item.cardMoney).toFixed(2)}}<span>元</span></view>
-
-							</view>
-							<view class="details-row">
-
-
-							</view>
+							</view>
+							<view class="details-row "   >
+							
+							
+								<view class="span1">折扣卡收益</view>
+								<view class="span2">{{(item.cardMoney).toFixed(2)}}<span>元</span></view>
+							
+							</view>
+							
 						</view>
 <!-- 
 

+ 6 - 2
pagesFinance/user/pileManagement.vue

@@ -43,10 +43,10 @@
 			</view>
 			
 			<u-cell-group  >
-				<u-cell-item  v-if="price" title="电价" :arrow="false" :value="price.costPrice.toFixed(2)+'元/度('+price.firstTime+'-'+price.latestTime+')'"> </u-cell-item>
+				<u-cell-item  v-if="price&&price.costPrice" title="电价" :arrow="false" :value="price.costPrice.toFixed(2)+'元/度('+price.firstTime+'-'+price.latestTime+')'"> </u-cell-item>
 				
 				<u-cell-item  v-if="deviceUser" title="联系人" :arrow="false" :value="deviceUser.contacts+'  '+deviceUser.contactPhone"></u-cell-item>
-				<view class="price-detail" v-if="price"
+				<view class="price-detail" v-if="price&&price.costPrice"
 				@click="gotoUrl('pagesFinance/user/chargingDetails?id='+price.deviceNo)"
 				
 				>
@@ -252,12 +252,16 @@
 				API.carStationDetail({
 					stationId:this.id
 				}).then((res) => {
+					
 					this.isAllow=res.data.isAllow	
 					 if(res.data.deviceList.length){
 						 
 							this.sprList=res.data.deviceList[0].sprDTOList
 							this.gunList=res.data.deviceList
 							this.price=res.data.price;
+							if(!this.price){
+								this.price={}
+							}
 							this.price.deviceNo=res.data.deviceList[0].deviceNo
 					 }