<view>
  <view class="header margin-bottom">
    <view class="header-top flex-box flex-v-ce border-bottom" a:if="{{dataDetail.status==0}}">
      <img-box a:if="{{dataDetail.employee_name}}" imgUrl="{{dataDetail.employee_img}}" name="{{dataDetail.employee_name}}" height="90rpx" width="90rpx" fSize="24rpx"></img-box>
      <view class="header-top-right">
        <view class="name">{{dataDetail.employee_name}}</view>
        <view class="yellow" a:if="{{dataDetail.review_status==0}}">{{dataDetail.status_mark}}</view>
        <view class="red" a:if="{{dataDetail.review_status==1}}">{{dataDetail.status_mark}}</view>
        <view class="green" a:if="{{dataDetail.review_status==2}}">{{dataDetail.status_mark}}</view>
      </view>
    </view>
    <view class="header-top flex-box-v flex-center-center border-bottom" a:if="{{dataDetail.status==1||dataDetail.status==2}}">
      <img-box a:if="{{dataDetail.employee_name}}" imgUrl="{{dataDetail.employee_img}}" name="{{dataDetail.employee_name}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
      <view style="font-weight: 600;margin: 10rpx 0">{{dataDetail.employee_name}}</view>
      <view style="font-weight: 600;margin-bottom: 10rpx" a:if="{{dataDetail.status==1}}">
        <text class="red" a:if="{{dataDetail.review_point>0}}">
          <text>+</text>{{ dataDetail.review_point }}
        </text>
        <text a:else class="green">{{ dataDetail.review_point }}</text>
        <text style="margin-left:10rpx;">{{dataDetail.typeName}}</text>
      </view>
      <view>{{dataDetail.status_mark}}</view>
    </view>
    <view class="header-main">
      <view class="flex-box" a:for="{{dataDetail.detail}}">
        <block a:if="{{item.type=='text'&&item.value}}">
          <view class="laber">{{item.key}}</view>
          <view class="flex-1">{{ item.value }}</view>
        </block>
        <block a:if="{{item.type=='image'&&item.value}}">
          <view class="laber">{{item.key}}</view>
          <view class="flex-1 flex-box flex-d-wrap">
            <image catchTap="showImg" data-index="{{idx}}" data-item="{{item.value}}" a:for-index="idx" class="imgs" mode="scaleToFill" src="{{imgs}}" a:for="{{item.value}}" a:for-item="imgs"/>
          </view>
        </block>
      </view>
      <view class="flex-box-ce" style="padding-top:24rpx;border-top:2rpx solid #f1f1f1" catchTap="openDetail" a:if="{{dataDetail.source_type==1}}">
          <view class="flex-1">任务详情</view>
          <image mode="scaleToFill" class="img-right" src="../../../image/right.png"/>
      </view>
    </view>
  </view>
  <view class="margin-bottom">
    <block a:if="{{dataDetail.rule_id}}">
      <view class="main-title border-bottom">规则依据
        <text>此事件打分参考以下积分规则</text></view>
      <view class="header-main">
        <view class="flex-box flex-v-ce" a:if="{{dataDetail.rule_name}}">
          <view class="laber">规则分类</view>
          <view class="flex-1">{{ dataDetail.rule_name }}</view>
        </view>
        <view class="flex-box" a:if="{{dataDetail.item_name&& dataDetail.item_id>0}}">
          <view class="laber">积分规则</view>
          <view class="flex-1">{{ dataDetail.item_name }}</view>
        </view>
        <view class="flex-box flex-v-ce" a:if="{{dataDetail.item_id>0}}">
          <view class="laber">规则积分</view>
          <view class="flex-1">
            <text a:if="{{dataDetail.item_range_type==1}}">
              <text a:if="{{dataDetail.item_prize_type == 1}}">+</text> 
               {{ dataDetail.item_min_point }}
            </text>
            <text a:if="{{dataDetail.item_range_type==2}}">
              <text a:if="{{dataDetail.item_prize_type == 1}}">+</text> 
               {{ dataDetail.item_min_point }} ~ {{ dataDetail.item_max_point }}
            </text>
            <text style="margin-left:10rpx;">{{dataDetail.typeName}}</text>
          </view>
        </view>
      </view>
    </block>
  </view>
  <view class="main">
    <!-- 调用过程组件 -->
    <process process="{{dataDetail.process}}" a:if="{{dataDetail.process.length>0}}"/>
  </view>
  <!-- 积分任务 -->
  <view class="bottom flex-box flex-flex-center-center" a:if="{{!is&&dataDetail.review_status!=1&&dataDetail.source_type==1}}">
    <block a:if="{{dataDetail.status==0&&dataDetail.reviewer_id==userData.id}}">
      <view class="flex-1 defBtn" catchTap="openBh">驳回</view>
      <view class="flex-3 blueBtn" catchTap="submit">通过</view>
    </block>
    <block a:if="{{dataDetail.can_refuse == '1'}}">
      <text class="flex-2 fontColorF">撤回后需重新审批</text>
      <view></view>
      <view class="flex-1 blueBtn" catchTap="openCx">撤回</view>
    </block>
  </view>
  <!-- 积分申请 -->
  <view class="bottom flex-box flex-flex-center-center" a:if="{{!is&&dataDetail.review_status!=1&&dataDetail.source_type==2}}">
    <block a:if="{{dataDetail.status==0}}">
      <view class="flex-1 defBtn" catchTap="openBh">驳回</view>
      <view class="flex-3 blueBtn" catchTap="submit">通过</view>
    </block>
    <block a:if="{{dataDetail.can_refuse == '1'}}">
      <text class="flex-2 fontColorF">撤回后需重新审批</text>
      <view></view>
      <view class="flex-1 blueBtn" catchTap="openCx">撤回</view>
    </block>
  </view>
  <view class="bottom flex-box flex-flex-center-center" a:if="{{dataDetail.applyor_id==userData.id&&dataDetail.can_refuse == '1'&&dataDetail.source_type==2}}">
    <text class="flex-2 fontColorF">撤销申请后数据将不可恢复</text>
    <view></view>
    <view class="flex-1 blueBtn" catchTap="openCx">撤销申请</view>
  </view>
  <!-- 积分奖扣 -->
  <view class="bottom flex-box flex-flex-center-center" a:if="{{!is&&dataDetail.review_status!=1&&dataDetail.source_type==3}}">
    <block a:if="{{dataDetail.status==0}}">
      <view class="flex-1 defBtn" catchTap="openBh">驳回</view>
      <view class="flex-3 blueBtn" catchTap="submit">通过</view>
    </block>
    <block a:if="{{dataDetail.can_refuse == '1'}}">
      <text class="flex-2 fontColorF">撤回后需重新审批</text>
      <view></view>
      <view class="flex-1 blueBtn" catchTap="openCx">撤回</view>
    </block>
  </view>
  <view class="bottom flex-box flex-flex-center-center" a:if="{{dataDetail.applyor_id==userData.id&&dataDetail.can_refuse == '1'&&dataDetail.source_type==3}}">
    <text class="flex-2 fontColorF">撤销奖扣后数据将不可恢复</text>
    <view></view>
    <view class="flex-1 blueBtn" catchTap="openCx">撤销奖扣</view>
  </view>
  <!-- 弹出框 -->
  <view class="windows" a:if="{{isBh}}">
    <view class="windows-box">
      <view class="windows-title">确认驳回</view>
      <view class="windows-content">
        <textarea onInput="bindTextAreaBlur" maxlength="50" placeholder="请输入审批意见"/>
      </view>
      <view class="windows-btn flex-box flex-v-ce">
        <view class="flex-1" catchTap="openBh">取消</view>
        <button type="default" loading="{{disabled}}" class="flex-1" disabled="{{disabled}}" catchTap="confirmBh">确定</button>
      </view>
    </view>
  </view>
</view>