<view>
  <form>
    <view class="flex-box flex-v-ce form-top" catchTap="openSelect"  data-num="3">
      <view class="label isBt">录入对象</view>
      <view class="flex-1 font-flex-word">
          <block a:for="{{users}}">
              <text style="font-size:32rpx">{{item.name}},</text>
          </block>
      </view>
      <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
    </view>
    <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 border-bottom" 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-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 class="flex-box flex-v-ce li" a:else data-index="{{index}}" data-num="2" catchTap="openSelect">
          <view class="label isBt">选择分类</view>
          <view class="flex-1">{{item.rule_name}}</view>
          <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
        </view>

        <view class="flex-box li" style="padding:15rpx 28rpx;" a:if="{{item.checked}}">
          <view class="label isBt" style="position: relative;top:8rpx;">积分</view>
          <text class="red" style="position: relative;top:8rpx;" a:if="{{item.isArrindex==true}}">+</text>
          <text class="green" a:else style="position: relative;top:8rpx;">-</text>
          <view class="flex-1">
            <view class="flex-box flex-v-ce">
              <view a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}" style="padding-left:10rpx; height:60rpx;line-height:60rpx;" class="flex-1">{{item.point}}</view>
              <input a:else value="{{item.point}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange" a:if="{{item.selectRule.range_type!=1}}">
                <view class="{{item.isArrindex==true? 'picker-right':'picker-left'}} yuan"></view>
                <view class="flex-box flex-v-ce" class="picker">
                  <text class="red flex-1">奖</text>
                  <text class="green flex-1">扣</text>
                </view>
              </view>
            </view>
            <block a:if="{{item.selectRule}}">
              <view class="fontColorT input_text" a:if="{{item.selectRule.range_type==1&&item.selectRule.min_point==item.selectRule.max_point}}">固定：{{item.selectRule.min_point}} {{item.selectRule.pt_Obj[0].name}}</view>
              <view class="fontColorT input_text" a:else> 范围(可修改)：{{item.selectRule.min_point}}至{{item.selectRule.max_point}}
                <text>{{item.selectRule.pt_Obj[0].name}}</text></view>
            </block>
          </view>
        </view>
        <view class="flex-box li" style="padding:15rpx 28rpx;" a:else>
          <view class="label isBt" style="position: relative;top:8rpx;">积分</view>
          <text class="red" style="position: relative;top:8rpx;" a:if="{{item.isArrindex2==true}}">+</text>
          <text class="green" a:else style="position: relative;top:8rpx;">-</text>
          <view class="flex-1">
            <view class="flex-box flex-v-ce">
              <input value="{{item.point2}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput2" data-index="{{index}}" class="flex-1"/>
              <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange2">
                <view class="{{item.isArrindex2==true? 'picker-right':'picker-left'}} yuan"></view>
                <view class="flex-box flex-v-ce" class="picker">
                  <text class="red flex-1">奖</text>
                  <text class="green flex-1">扣</text>
                </view>
              </view>
            </view>
          </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="4" data-item="{{{id:item.reviewer_id,name:item.revieweName}}}"  catchTap="openSelect">
          <view class="label">审批人</view>
          <view class="flex-1">{{item.revieweName}}</view>
          <image mode="scaleToFill" src="../../../image/right.png" class="rightImg"/>
        </view>
        <view class="li">
          <textarea maxlength="100" value="{{item.remark}}" 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}}"/>
          </view>
        </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}}" a:if="{{isShowType}}">
    <select-rule isGzType="AF" onConfirm="onSelectItem" onClose="onClose" a:if="{{isShowType=='1'}}"/>
    <select-type isGzType="AF" onConfirm="onSelectType" onClose="onClose" a:if="{{isShowType=='2'}}"/>
    <select-section-staff isLeadership="{{true}}" selectUser="{{users}}" onClose="onClose" onConfirm="onSelectUser" a:if="{{isShowType=='3'}}"/>
    <select-section-staff-two isLeadership="{{false}}" selectUser="{{reviewerObj}}" onClose="onClose" onConfirm="onSelectUser2" a:if="{{isShowType=='4'}}"/>
  </view>
</view>