<!--pages/payee/add/add.wxml-->
<view class="ns" style="height:{{isIPX?'88px':'64px'}};">
  <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};height: 19.0909px;" mode="widthFix" bindtap="back"></image>
  <text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"查看":"新增"}}银行汇票</text>
</view>
<view class="main-box table-box table-boxs" style="margin-top:{{isIPX?'100px':'75px'}};">

    <van-field readonly="{{form.id ? true:false}}" label="汇票号码" value="{{ form.orderNum }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderNum"/>
    <view class="section" style="margin-top: -28rpx;">
          <view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>汇票类型</view>
            <picker bindchange="onConfirmorderType" value="{{orderTypeindex}}" range="{{orderTypeOptions}}" range-key="{{'dictLabel'}}">
                <view class="picker">
                    {{orderTypeOptions[orderTypeindex].dictLabel?orderTypeOptions[orderTypeindex].dictLabel:"选择汇票类型"}}
                    <van-icon name="arrow-down" />
                </view>
            </picker>
        </view>
    <!-- <van-popup show="{{showOrderType}}" round position="bottom"  bind:close="closeBox" data-name="showOrderType">
      <van-picker
        columns="{{orderTypeOptions}}"
        show-toolbar
        value-key="dictLabel"
        bind:cancel="closeBox"
        bind:confirm="onConfirmOrderType"
        data-name="showOrderType"
        data-value="form.orderType"
      />
    </van-popup>
    <van-field label="汇票类型" value="{{ form.orderTypeText }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderType" is-link arrow-direction	="down" bindtap="openBox" data-name="showOrderType"/> -->

    <van-field readonly="{{form.id ? true:false}}" label="出票金额" value="{{ form.orderAmount }}" type="digit" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderAmount"/>
    
    <van-field readonly="{{form.id ? true:false}}" label="付票单位" value="{{ form.billPayUnit }}" placeholder="付票单位" border="{{ false }}" bind:change="onChange" input-align="right" required   data-value="form.billPayUnit" />
    <van-field readonly="{{form.id ? true:false}}" label="收票单位" value="{{ form.billReceiveUnit }}" placeholder="收票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billReceiveUnit"/>
    <view class="section" style="margin-top: -28rpx;">
          <view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>开票日期</view>
          <picker mode="date" value="{{form.startTime}}"  bindchange="onConfirmStartTime">
              <view class="picker">
                  {{form.startTime?form.startTime:'开票日期'}}
              </view>
          </picker>
      </view>
    <view class="section" style="margin-top: -28rpx;">
          <view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>到期日期</view>
          <picker mode="date" value="{{form.endTime}}"  bindchange="onConfirmEndTime">
              <view class="picker">
                  {{form.endTime?form.endTime:'到期日期'}}
              </view>
          </picker>
      </view>
    <view class="section" style="margin-top: -28rpx;">
          <view class="section__title"><text style="color:red;margin-right: 8rpx;">*</text>汇票状态</view>
            <picker bindchange="onConfirmorderStatus" value="{{orderStatusindex}}" range="{{orderStatusOptions}}" range-key="{{'dictLabel'}}">
                <view class="picker">
                    {{orderStatusOptions[orderStatusindex].dictLabel?orderStatusOptions[orderStatusindex].dictLabel:"选择汇票状态"}}
                    <van-icon name="arrow-down" />
                </view>
            </picker>
        </view>
    <van-field readonly="{{form.id ? true:false}}" label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right"  data-value="form.remark"/>
  </view>
  <view class="bottom" wx:if="{{showBtn}}">
    <view class="btn2" bindtap="goSubmit">保存</view>
  </view>