<!--pages/ucenter/charginglog/charginglog.wxml-->
<view class="topBar">
<view class="card {{searchIndex==-1?'active':''}}" data-idx="-1" bindtap="switchBar">全部</view>
<view class="card {{searchIndex==0?'active':''}}" data-idx="0" bindtap="switchBar">待履约</view>
<view class="card {{searchIndex==2?'active':''}}" data-idx="2" bindtap="switchBar">已履约</view>
<view class="card {{searchIndex==1?'active':''}}" data-idx="1" bindtap="switchBar">已取消</view>
<view class="card {{searchIndex==3?'active':''}}" data-idx="3" bindtap="switchBar">已违约</view>
</view>

<scroll-view class='context' scroll-y='true'  bindscrolltolower="bindScrollTolowerEvent" >
  <view class='context_block'></view>
  
  <block  wx:for="{{reservUserOrderList}}" wx:key="id">
    <view class="text_context {{item.height}}" hover-class='active'>
    <view class="upFlag" >{{item.reservStatusCN}}</view>
    <view class="downBtn" wx:if="{{item.cancleBtnFlag}}" bindtap="cancleBtn" data-idx="{{item.id}}">取消预约</view>
    <view class="downBtn" wx:if="{{item.customerServiceFlag}}" bindtap="customerServiceBtn">联系客服</view>
      <!-- <view class="map-1" bindtap="getRoute">
        <image src="/images/jt.png"></image>
        <view>路线</view>
      </view> -->
      <view class='charging_text_title'>
        <view class='charging'>
          <image src='/images/charging2_1.png'></image>
        </view>
        <view class='charging_text_title1'>
          <text class='bold'>{{item.reservStation.chargStationName}}</text>
          <text class="h1">{{item.reservPile.chargPileId}}</text>
        </view>
      </view>
      <text>{{item.reservPile.chargPileName}}</text>
      <view  class="inline-view">
        <view class='inlineView' decode='true'><text space="nbsp">预约时段: </text> <text class="gray2"> {{item.reservChargeStartTime}}-{{item.reservChargeEndTime}}</text></view>
      </view>
      <view  class="inline-view">
        <view class='inlineView' decode='true'><text space="nbsp">提交预约时间: </text>  <text class="gray2">{{item.createTime}}</text></view>
      </view>
      <view  class="inline-view" wx:if="{{item.chongdianzhuangmingcheng}}">
        <text class='inlineView' decode='true'>启动充电桩名称: {{item.chargePile.chargPileName}}</text>
      </view>
      <view  class="inline-view" wx:if="{{item.chongdianzhuangbianhao}}">
        <text class='inlineView' decode='true'>启动充电桩编号: {{item.chargePile.chargPileId}}</text>
      </view>
      <view  class="inline-view" wx:if="{{item.chongdianshichang}}">
        <text class='inline' decode='true'>充电时长：{{item.pileLog.totalTime}}&nbsp;&nbsp;&nbsp;&nbsp;</text>
        <text class='inline'>充电电量：{{item.pileLog.chargpower}}度</text>
      </view>
      <text class='gray'  wx:if="{{item.chongdiankaishijieshu}}">{{item.pileLog.startTime}}-{{item.pileLog.endTime}}</text>
      <view style='line-height:0;'  wx:if="{{item.chongdianfeiyong}}">
        <text class='inline gray1'>总费用：</text>
        <text class='inline red'>{{item.pileLog.chargallmoney}}</text>
        <text class='inline gray1' decode='true'>元&nbsp;&nbsp;&nbsp;&nbsp;服务费：</text>
        <text class='inline red'>{{item.pileLog.chargservice}}</text>
        <text class='inline gray1' decode='true'>元&nbsp;&nbsp;&nbsp;&nbsp;电费：</text>
        <text class='inline red'>{{item.pileLog.chargmoney}}</text>
        <text class='inline gray1'>元</text>
      </view>
    </view>
  </block>
  <view class='context_block'></view>
  <view class='context_block'></view>
  <view class='context_block'></view>
  <view class='context_block'></view>
</scroll-view>