<!--pages/repairDispatch/dispatch.wxml-->
<view class="container" style="padding-bottom:100px;">
  <view class="height20"></view>
  <view>
    <form bindsubmit="formSubmit">
      <input name="orderId" value='{{ orderId }}' hidden='true' />
      <!-- <van-field label="订单编号" value="{{ orderNumber }}" input-align="right" readonly></van-field> -->
      <view class="part">
        <!-- 负责人 -->
        <van-field label="维修人员" required input-align="right" bindtap="hideKeybord" is-link>
          <view slot="input" style="width: 100%;">
            <input name="loadPointId" value='{{loadPointArray[loadPointIndex].id}}' hidden='true' />
            <picker bindchange="bindPickerChange" value="{{loadPointIndex}}" range="{{loadPointArray}}" range-key="loadPoint" data-pickername='loadPoint'>
              <view class="selectPlaceholder"> {{loadPointArray[loadPointIndex].loadPoint?loadPointArray[loadPointIndex].loadPoint:defaultText}}</view>
            </picker>
          </view>
        </van-field>

        <!-- 开始时间 -->
        <van-field label="时间" required readonly input-align="right" title-width="80rpx">
          <input name="timeSlot" value="{{statTime+'～'+endTime}}" hidden='true' />
          <view class="dateBox" slot="input" style="flex:1">
            <view class="contactInput">
              <van-field label="" name="statTime" placeholder="请选择" value="" input-align="center">
                <view slot="input" style="width: 100%;">
                  <picker mode="date" fields="day" name="statTime" value="{{statTime}}" bindchange="bindDateChange" data-pickertype='statTime'>
                    <view class="selectPlaceholder"> {{statTime?statTime:'选择开始时间'}}</view>
                  </picker>
                </view>
              </van-field>
            </view>
            <view>-</view>
            <view class="contactInput">
              <van-field label="" name="endTime" placeholder="请选择" value="" input-align="center">
                <view slot="input" style="width: 100%;">
                  <picker mode="date" fields="day" name="endTime" value="{{endTime}}" bindchange="bindDateChange" data-pickertype='endTime'>
                    <view class="selectPlaceholder"> {{endTime?endTime:'选择结束时间'}}</view>
                  </picker>
                </view>
              </van-field>
            </view>
          </view>
        </van-field>

        <!-- 审核人员 -->
        <van-field label="审核人员" required input-align="right" bindtap="hideKeybord" is-link>
          <view slot="input" style="width: 100%;">
            <input name="loadPointId" value='{{loadPointArray[loadPointIndex].id}}' hidden='true' />
            <picker bindchange="bindPickerChange" value="{{loadPointIndex}}" range="{{loadPointArray}}" range-key="loadPoint" data-pickername='loadPoint'>
              <view class="selectPlaceholder"> {{loadPointArray[loadPointIndex].loadPoint?loadPointArray[loadPointIndex].loadPoint:defaultText}}</view>
            </picker>
          </view>
        </van-field>

        <!-- 时段 -->
        <van-field label="时段" required input-align="right" bindtap="hideKeybord" type="textarea" autosize is-link>
          <view slot="input" style="width: 100%;">
            <input name="loadTimeId" value='{{loadTimeArray[loadTimeIndex].id}}' hidden='true' />
            <picker bindchange="bindPickerChange" value="{{loadTimeIndex}}" range="{{loadTimeArray}}" range-key="time" data-pickername='loadTime'>
              <view class="selectPlaceholder"> {{loadTimeArray[loadTimeIndex].time?loadTimeArray[loadTimeIndex].time:defaultText}}</view>
            </picker>
          </view>
        </van-field>


      </view>

      <view class="fixedBtn submitBtn">
        <van-button loading="{{isSubmitting}}" round block disabled="{{isSubmitting}}" loading-text="{{isSubmitting?'提交中...':''}}" type="info" form-type="submit">确定
        </van-button>
      </view>

    </form>
  </view>
</view>

<wxs module="filters" src="../../utils/filter.wxs"></wxs>