<!--pages/createorder/index.wxml-->
<view class="body">
<view class="car">
<view>
<text style="color: red;">*</text> 用车类型
</view>
<view class="car_right">
  <view wx:if="{{userdata.operationRole==5}}" class="carsell">买电</view>
  <view wx:if="{{userdata.operationRole==6}}" class="carsell">卖电</view>
</view>
</view>
<view class="car">
<view>
<text style="color: red;">*</text> <text wx:if="{{cartype==2}}"> 出售电量</text> <text wx:if="{{cartype==1}}"> 需求电量</text> 
</view>
<view class="model_right">
<input class="powerlevel" type="text" value="{{workorderElectricity}}" bindinput="bindKeyInput" placeholder="请输入需求用电"/>kWh
</view>
</view>
<!-- <view class="car" wx:if="{{cartype==1}}">
<view>
<text style="color: red;">*</text> 意向电价
</view>
<view class="model_right">
<input class="powerlevel" type="text" bindinput="binddemandInput" placeholder="请输入需求用电"/>
</view>
</view> -->

<!-- 网电 -->
<view class="car">
<view style="margin-left: 18rpx;">
 变压器容量
</view>
<view class="model_right">
<input class="powerlevel" value="{{workorderpower}}" bindinput="bindintentionInput" type="text" placeholder="请输入变压器容量"/>kVA
</view>
</view>
<view class="car">
<view style="margin-left: 18rpx;">
 绿电
</view>
<view class="model_right">
  <radio-group bindchange="radioChange">
        <label class="weui-cell weui-check__label" wx:for="{{items}}" wx:key="value">

          <view class="weui-cell__hd">
            <radio value="{{item.value}}" checked="{{item.value == greenelectricity}}"/>
          </view>
          <view class="weui-cell__bd">{{item.name}}</view>
        </label>
      </radio-group>
</view>
</view>
<!-- <view class="car">
<view>
<text style="color: red;">*</text> 司机
</view>
<view class="model_right">
  <picker bindchange="binddriverChange" value="{{driverindex}}" range="{{objdriver}}" range-key="subtitle">
    <view class="picker">
    {{objdriver[driverindex].name}}
<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" color="#cccccc" bind:tap="onIconTap" />
    </view>
  </picker>
</view>
</view> -->
<!-- <view class="car">
<view style="margin-left: 18rpx;">
车长车型
</view>
<view class="model_right">
  <picker bindchange="bindectArrayChange" value="{{index}}" range="{{objectArray}}" range-key="subtitle">
    <view class="picker">
    {{objectArray[index].name}}
<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" color="#cccccc" bind:tap="onIconTap" />
    </view>
  </picker>
</view>
</view> -->
<!-- <view class="car">
<view>
<text style="color: red;">*</text> 用户
</view>
<view class="model_right">
  <picker bindchange="binduserChange" value="{{userindex}}" range="{{userdata}}" range-key="companyName">
    <view class="picker">
    {{userdata[userindex].companyName}}
<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" color="#cccccc" bind:tap="onIconTap" />
    </view>
  </picker>
</view>
</view> -->

<view class="car1">
<view>
<text style="color: red;">*</text> 地址
</view>
<view class="model_right">
  <picker bindchange="bindPickerChange" value="{{addressindex}}" range="{{address}}" range-key="poiName" wx:if="{{address.length>0}}">
    <view class="picker">
    <view>
    </view>
    <view style="display: flex;">
      <text  wx:if="{{addressindex===''}}" style="color: #cccccc;">请选择完整</text>
    <text wx:else> {{address[addressindex].poiName}}</text>

<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" color="#cccccc" bind:tap="onIconTap" />
    </view>
   
    </view>
  </picker>
  <view class="picker" wx:else bind:tap="toconfigure">
  <view style="width: 200rpx;"></view>
    新增地址
<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" color="#cccccc" bind:tap="onIconTap" />
    </view>
</view>
</view>
<view class="car1">
<view>
<text style="color: red;">*</text> 期望到达日期
</view>
<view class="model_right">
  <picker mode="date" value="{{date}}" start="2020-09-01" end="2030-09-01" bindchange="bindDateChange">
    <view class="picker">
    <view></view>
    <view style="display:flex;">
    <text wx:if="{{date!=''}}">{{date}}</text> 
    <text wx:else style="color: #cccccc;">请选择日期</text> 
<t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" color="#cccccc" bind:tap="onIconTap" />
    </view>
    </view>
  </picker>
</view>
</view>
<view class="car1">
<view>
<text style="color: red;">*</text> 期望到达时间
</view>
<view class="model_right">
  <!-- 时间选择器 -->
<picker mode="time" value="{{time}}" start="00:00" end="23:59" bindchange="bindTimeChange">
  <view class="picker">
  <view></view>
  <view style="display: flex;">
   <text wx:if="{{time}}">{{time}}</text> 
   <text wx:else style="color: #cccccc;">请选择时间</text> 
    <t-icon name="chevron-right-s" size="40rpx" color="#cccccc" />
  </view>
  </view>
</picker>
</view>
</view>
</view>
<!--
  
 -->

<button class="call-btn" bindtap="details" wx:if="{{orderid==''}}"> 
      <text class="call-btn_left_electricity">预约</text>
</button> 
<button class="call-btn" bindtap="editdetails" wx:else>
      <text class="call-btn_left_electricity">保存</text>
</button> 