<view>
  <form onSubmit="formSubmit">
    <view a:for="{{items}}" a:for-index="index" key="{{index}}">
      <view class="flex-box flex-v-ce" style="padding-right:28rpx;">
        <view class="title flex-1">第({{index+1}})条</view>
        <view style="font-size:24rpx" data-index="{{index}}" class="blue" a:if="{{items.length>1}}" catchTap="deleteArr">删除</view>
      </view>
      <view class="inputs">
        <view class="flex-box flex-v-ce li" data-index="{{index}}" data-num="3" data-item="{{{id:item.employee_id,name:item.employeeName}}}" catchTap="openSelect">
          <view class="label isBt">录入对象</view>
          <view class="flex-1">{{item.employeeName}}</view>
          <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
        </view>
        <view class="flex-box flex-v-ce li" style="padding:26rpx 28rpx;" data-index="{{index}}">
          <view class="label">指定规则</view>
          <view class="flex-1"></view>
          <switch onChange="switchChange" checked="{{item.checked}}" data-index="{{index}}" color="#26A2FF"></switch>
        </view>
        <view class="flex-box flex-v-ce li" a:if="{{item.checked}}" data-ruleId="{{item.selectRule.id}}" data-index="{{index}}" data-num="1" catchTap="openSelect">
          <view class="label isBt">选择规则</view>
          <view class="flex-1" a:if="{{item.selectRule}}">已选择1条</view>
          <view class="flex-1" a:else></view>
          <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
        </view>
        <view a:if="{{item.selectRule&&item.checked}}" class="selectRule">
          <view class="flex-box flex-v-ce">
              <view  a:if="{{item.selectRule.range_type=='1'}}">
                <text class="red" a:if="{{item.selectRule.min_point>0}}">{{item.selectRule.min_point}}</text>
                <text class="green" a:else>{{item.selectRule.min_point}}</text>
              </view>
              <view class="green" a:else>
                  <text class="red" a:if="{{item.selectRule.min_point>0}}"> {{item.selectRule.min_point}}~{{item.selectRule.max_point}}</text>
                  <text class="green" a:else>{{item.selectRule.min_point}} ~ {{item.selectRule.max_point}}</text>
              </view>
              <view class="fontColorF" style="margin-left:10rpx;">
                 {{item.selectRule.pt_Obj.name}}
              </view>
          </view>
          <view style="font-size:24rpx;margin-left:10rpx;" class="fontColorF">
            {{item.selectRule.remark}}
          </view>
        </view>
        <view class="li">
          <textarea value="{{item.remark}}" maxlength="100" onInput="bindTextAreaBlur" placeholder="申请内容" data-index="{{index}}"></textarea>
          <image mode="scaleToFill" src="../../../image/addImg.png" data-index="{{index}}" class="addImg" catchTap="openImg"/>
        </view>
        <view style="background:#fff;padding:0 28rpx;" a:if="{{item.files[0]}}" class="flex-box flex-v-ce">
          <view a:for="{{item.files}}" key="index" a:for-item="imgs" a:for-index="imgIndex" style="position:relative">
            <text class="detele" data-itemIndx="{{index}}" data-index="{{imgIndex}}" catchTap="deteleImg">×</text>
            <image mode="scaleToFill" class="showImg" src="{{imgs}}"  data-index="{{imgIndex}}" data-item="{{item.files}}" catchTap="showImg"/>
          </view>
        </view>
         <view class="flex-box flex-v-ce li" catchTap="openDate" data-index="{{index}}">
          <view class="label isBt">发生时间</view>
          <view class="flex-1">{{item.event_time}}</view>
          <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
        </view>
        <view class="flex-box flex-v-ce li" data-index="{{index}}" data-num="2" data-item="{{{id:item.reviewer_id,name:item.revieweName,employee_id:item.employee_id}}}" catchTap="openSelect">
          <view class="label isBt">审批人</view>
          <view class="flex-1">{{item.revieweName}}</view>
          <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
        </view>
      </view>
    </view>
    <view class="add" catchTap="addArr">+  再加一条</view>
    <view class="btn-area">
      <button type="default" loading="{{disabled}}" class="defBtn" disabled="{{disabled}}" catchTap="formSubmit">提交</button>
    </view>
  </form>
  <view class="box" animation="{{animationInfo}}">
        <select-rule defaultId="{{defaultRuleId}}" onConfirm="onSelectItem" onClose="onClose" a:if="{{isShowType=='1'}}"/>
        <select-section-staff-two superior_list="{{superior_list}}" onClose="onClose" selectUser="{{reviewerObj}}" onConfirm="onSelectUser" a:if="{{isShowType=='2'}}"/>
        <select-section-staff  isAllSelect="{{false}}" isBoss="{{true}}" selectUser="{{employeeObj}}" onClose="onClose" onConfirm="onSelectUserEmployee" a:if="{{isShowType=='3'}}"/>
  </view>
</view>