<view>
  <view class="header margin-bottom">
    <view class="search flex-box flex-v-ce">
      <image mode="scaleToFill" src="../../../image/ss.png"/>
      <input placeholder="请输入姓名或内容" onInput="bindKeyInput" onConfirm="bindKeyInput" class="flex-1"/>
    </view>
    <view class="flex-box flex-v-ce selectItems border-bottom">
      <view data-index="1" class="{{activeIndex == 1? 'active':''}} flex-1" catchTap="activeItem">待我审批</view>
      <view data-index="2" class="{{activeIndex == 2? 'active':''}} flex-1" catchTap="activeItem">我已审批</view>
      <view class="selectImg" catchTap="openSearch">
        <image mode="scaleToFill" src="../../../image/sx.png"/></view>
    </view>
  </view>
  <view class="main scroll">
    <no-bata a:if="{{dataList.length==0}}"></no-bata>
    <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{dataList.length>0&&activeIndex==1}}" onScrollToLower="onScrollToLower">
      <view class="flex-box li border-bottom" data-item="{{item}}" catchTap="openDetail" a:for="{{dataList}}">
        <img-box name="{{item.employee_name}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
        <view class="flex-1 main-right">
          <view class="name" a:if="{{item.source_type == 2}}">{{item.employee_name}}的积分申请</view>
          <view class="name" a:if="{{item.source_type == 1}}">{{item.employee_name}}的积分任务</view>
          <view class="name" a:if="{{item.source_type == 3}}">{{item.employee_name}}的积分奖扣</view>
          <view class="name" a:if="{{item.source_type == 4}}">{{item.employee_name}}的绩效工作</view>
          <view class="context" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
          <view class="context" a:else>{{item.remark.rule}}</view>
          <view class="flex-box flex-v-ce">
            <view class="date flex-1">{{item.event_time}}</view>
            <view class="flex-box flex-v-ce">
              <text a:if="{{item.source_type != 4}}" catchTap="openBh" data-item="{{item}}">驳回</text>
              <text>通过</text>
            </view>
          </view>
        </view>
      </view>
      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
    </scroll-view>
    <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{dataList.length>0&&activeIndex==2}}" onScrollToLower="onScrollToLower">
      <view class="flex-box li border-bottom" data-item="{{item}}" catchTap="openDetail" a:for="{{dataList}}">
        <img-box name="{{item.employee_name}}" height="70rpx" width="70rpx" fSize="24rpx"></img-box>
        <view class="flex-1 main-right">
          <view class="flex-box flex-v-ce">
            <view class="name flex-1" a:if="{{item.source_type == 2}}">{{item.employee_name}}的积分申请</view>
            <view class="name flex-1" a:if="{{item.source_type == 1}}">{{item.employee_name}}的积分任务</view>
            <view class="name flex-1" a:if="{{item.source_type == 3}}">{{item.employee_name}}的积分奖扣</view>
            <view class="name flex-1" a:if="{{item.source_type == 4}}">{{item.employee_name}}的绩效工作</view>
            <block a:if="{{item.status==1}}">
              <view class="red" a:if="{{item.review_point>0}}">+{{item.review_point}}</view>
              <view class="green" a:else>{{item.review_point}}</view>
            </block>
          </view>
          <view class="context" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
          <view class="context" a:else>{{item.remark.rule}}</view>
          <view class="flex-box flex-v-ce" style="margin-bottom:28rpx">
            <view class="date flex-1">{{item.event_time}}</view>
            <view class="greenBox" a:if="{{item.status==1}}">审批通过</view>
            <view class="redBox" a:if="{{item.status==2}}">审批驳回</view>
          </view>
        </view>
      </view>
      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
    </scroll-view>
  </view>
  <!-- 弹出框 -->
  <view class="windows" a:if="{{isBh}}">
    <view class="windows-box">
      <view class="windows-title">确认驳回</view>
      <view class="windows-content">
        <textarea value="{{textArea}}" onInput="bindTextAreaBlur" maxlength="50" placeholder="请输入审批意见"/>
      </view>
      <view class="windows-btn flex-box flex-v-ce">
        <view class="flex-1" catchTap="closeBh">取消</view>
        <view class="flex-1" catchTap="confirmBh">确定</view>
      </view>
    </view>
  </view>
</view>