<!-- <image class="calculation" src="https://esos-iot.com/myminio/project/a6546181416e4ca5a266b3b5ce31c335.jpg" mode="widthFix"/> -->

<!-- <view class="side-bar-wrapper" style="height: calc(100vh - {{navbarHeight}}px)">
</view> -->

<view class="workorder">
  <view class="discharge" wx:if="{{userdata.operationRole==5}}">
    <view class="discharge_cheng {{selected==1?'selected':''}}" data-index="1" bind:tap="onselected">工单</view>
<!-- <view class="discharge_fang {{selected==2?'selected':''}}" data-index="2" bind:tap="onselected">结算</view> -->
</view>
<view class="discharge" wx:if="{{userdata.operationRole==6}}">
    <view class="discharge_cheng {{selected==1?'selected':''}}" data-index="1" bind:tap="onselected">工单</view>
<!-- <view class="discharge_fang {{selected==2?'selected':''}}" data-index="2" bind:tap="onselected">结算</view> -->
</view>
<view class="discharge" wx:if="{{userdata.operationRole==4}}">
<view class="discharge_cheng {{selected==1?'selected':''}}" data-index="1" bind:tap="onselected">充电工单</view>
<view class="discharge_fang {{selected==2?'selected':''}}" data-index="2" bind:tap="onselected">放电工单</view>
</view>
<view class="discharge_tabs" wx:if="{{userdata.operationRole==4}}">
  <t-tabs value="{{tabsindex}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
    <t-tab-panel label="全部" value="" />
  <t-tab-panel label="服务中" value="2" />
  <t-tab-panel label="已完成" value="3" />
  <t-tab-panel label="取消工单" value="5" />
    <!-- <t-tab-panel label="审核" value="1" /> -->
</t-tabs>
</view>
<view class="discharge_tabs" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&selected==1}}">
  <t-tabs value="{{tabsindex}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
    <t-tab-panel label="全部" value="" />
    <t-tab-panel label="工作中" value="2" />
  <t-tab-panel label="已完成" value="3" />
  <t-tab-panel label="取消工单" value="5" />
 
</t-tabs>
</view>
<view class="discharge_tabs" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&selected==2}}">
  <t-tabs value="{{tabsindex}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" split="{{false}}">
    <t-tab-panel label="全部" value="" />
    <t-tab-panel label="待结算" value="0" />
  <t-tab-panel label="已结算" value="1" />
  <t-tab-panel label="取消结算" value="2" />
 
</t-tabs>
</view>
<!-- <view bind:tap="onfilter">
  <t-icon name="filter" size="50rpx" color="#585CE5" data-name="filter" />
</view> -->
</view>
<view style="height: 260rpx;"></view>
<view class="order">
<view class="order_box" wx:for="{{driverlist}}" wx:key="workorderId" data-id="{{item.workorderId}}" bind:tap="details">
<view class="order_title">
<view class="order_title1"> <image class="order_image" src="https://esos-iot.com/myminio/project/458bb7eea14f42cc958eebf0a8b89da3.png" mode="aspectFit"/>
<!-- <text>{{item.carName}}</text> -->
<text wx:if="{{item.chargedischargeType==1}}">光伏</text>
<text wx:if="{{item.chargedischargeType==2}}">风电</text>
<text wx:if="{{item.chargedischargeType==3}}">网电</text>
</view> 
<!-- <view class="order_title1"> <image class="order_image" src="https://esos-iot.com/myminio/proje  ct/94f976d5afce444a8861b59681069218.png" mode="aspectFit"/> 浙C.78Z71</view> -->
<view wx:if="{{item.workorderType==0}}">待处理</view>
<view wx:if="{{item.workorderType==1}}">待出发</view>
<view wx:if="{{item.workorderType==2}}">行驶中</view>
<view wx:if="{{item.workorderType==3}}">到达地点</view>
<view wx:if="{{item.workorderType==4}}">工作中</view>
<!-- <view wx:if="{{item.workorderType==5}}">完成工作</view> -->
<view wx:if="{{item.workorderType==6}}">取消工单</view>

<view wx:if="{{item.workorderType==5&&item.settlementType==0}}">待结算</view>
<view wx:if="{{item.workorderType==5&&item.settlementType==1}}">结算成功</view>
<view wx:if="{{item.workorderType==5&&item.settlementType==2}}">结算失败</view>
</view>
<view class="order_direction"><text class="order_text">方向：</text>
<text style="color: #FDBA67;" wx:if="{{item.chargedischargeType==2}}">放电</text>
<text style="color: #00C775;" wx:if="{{item.chargedischargeType==1}}">充电</text>
</view>
<view class="order_time"><text class="order_text">需求电量：</text> {{item.workorderElectricity}}</view>
<view class="order_address"><text class="order_text">地址：</text>{{item.poiName}}</view>

<view class="order_bottom">
  <view class="order_time"><text class="order_text">预约时间：</text> {{item.workorderCreatetime}}</view>
<!-- <view class="order_view" data-id="{{item.workorderId}}" bind:tap="details">查看详情</view> -->
</view>
</view>
</view>
<view class="available" wx:if="{{driverlist.length<1}}">
<image src="https://esos-iot.com/myminio/project/9efa1691f71a48b6ae20648c0a2dae56.png" mode="aspectFit"/>
</view> 
<view style="height: 30rpx;"></view>
<!--
  
 --> 