<!--pages/loadArrive/edit.wxml-->
<view class="container" style="padding-bottom:100px;">
  <view class="height20"></view>
  <view>
    <form bindsubmit="formSubmit">
      <input name="id" value='{{info.id}}' hidden='true' />
      <view class="part">
        <!-- 起卸预约订单 -->
        <van-field label="起卸预约订单" required input-align="right">
          <view slot="input" style="width: 100%;">
            <input name="appointId" value='{{loadappointArray[loadappointIndex].id}}' hidden='true' />
            <picker bindchange="bindPickerChange" value="{{loadappointIndex}}" range="{{loadappointArray}}" range-key="name" data-pickername='loadappoint'>
              <view wx:if="{{loadappointArray[loadappointIndex].name}}"> {{loadappointArray[loadappointIndex].name}}</view>
              <view wx:else class="selectPlaceholder">{{ defaultText }}</view>
            </picker>
          </view>
          <view slot="right-icon">
            <van-icon name="arrow" />
          </view>
        </van-field>
        
        <van-field label="船号" required name="shipNo" value="{{ info.shipNo }}" placeholder="请填写船号" input-align="right" ></van-field>

        <van-field label="报港数量" type="digit" required name="arriveNumber" value="{{ info.arriveNumber }}" placeholder="请输入报港数量" input-align="right" border="{{ false }}">
          <view slot="right-icon">
            <text>吨</text>
          </view>
        </van-field>

        <van-field label="到港时间" required name="arriveTime" value="{{ currentChoose }}" placeholder="请选择到港时间" input-align="right" bind:tap="openPicker">
        </van-field>
        <van-action-sheet show="{{ show }}" bind:close="onClose" bind:getuserinfo="onGetUserInfo">
          <van-datetime-picker type="datetime" value="{{ currentDate }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" bind:cancel="onCancel" bind:confirm="onConfirm"  bind:change="onChange" />
        </van-action-sheet>
        
        <view class="topItem">
          <van-field label="发航单上传" required readonly input-align="right" border="{{false}}" />
          <van-field name="" model:value="" label="" class="uploadBox">
            <view slot="input" class="uploadboxView">
              <van-uploader name="" deletable="{{true}}" data-type="fileList" file-list="{{ fileList }}" bind:after-read="afterRead" bind:delete="deleteImg" max-count="6" preview-size="110" />
            </view>
          </van-field>
        </view>

      </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>