<!--pages/applySetting/applySetting.wxml-->
<view class="apply-setting-page">
  <view class="title">设置授权</view>
  <view class="description">您同意向<text wx:if="{{batch}}">以上申请人</text><text wx:else>申请人{{name}}</text>授权个人信息报告，请选择您授权的报告。</view>
  <view class="field-box">
    <view class="label">选择报告</view>
    <picker mode="selector" value="{{selectIndex}}" range="{{reportList}}" range-key="name" bindchange="reportChange">
      <view class="select-box">{{selectIndex ? reportList[selectIndex].name : '请选择'}}<image src="/assets/images/inspected/arrows.png" /></view>
    </picker>
  </view>
  <view class="add-report" bind:tap="jumpReport">
    <image src="/assets/images/information/icon_add.png" />
    生成新报告
  </view>
  <view class="field-box">
    <view class="label">授权期限</view>
    <view class="switch-box"><switch checked="{{unlimited}}" bindchange="bindLimitChange" />不限时间</view>
  </view>
  <picker mode="date" value="{{endDate}}" start="{{startDate}}" bindchange="bindDateChange">
    <view class="select-time">{{endDate ? endDate : '选择截止时间'}}</view>
  </picker>
  <view class="btn-box">
    <btn width="268rpx" height="86rpx" fontSize="28rpx" bind:tap="submit">确认授权</btn>
  </view>
  <message-box id="shadow1" title="授权成功！" message="您是尊贵的年费用户，可以设置默认的应答模式，是否现在设置？" confirmText="立即设置" cancelText="暂时不需要" bind:cancel="back" bind:close="back" bind:confirm="jumpSet" />
  <message-box id="shadow2" title="授权成功！" message="邀请您成为年费用户，享受快捷授权，一键就搞定！" confirmText="更多权益了解一下" cancelText="暂不了解" bind:cancel="back" bind:close="back" bind:confirm="jumpBuy" />
</view>
