<view>
  <view class="header margin-bottom">
    <view class="header-top flex-box-v flex-center-center border-bottom">
      <img-box a:if="{{dataDetail.employee_name}}" name="{{dataDetail.employee_name}}" imgUrl="{{dataDetail.img_url}}" height="90rpx" width="90rpx" fSize="24rpx"></img-box>
      <view class="name">{{dataDetail.employee_name}}</view>
      <view class="num red" a:if="{{dataDetail.point>0}}">+{{dataDetail.point}}
        <text>{{dataDetail.typeName}}</text></view>
      <view class="num green" a:else>{{dataDetail.point}}
        <text>{{dataDetail.typeName}}</text></view>
    </view>
    <view class="header-main">
      <view class="flex-box" a:if="{{dataDetail.remark.customize!=''||dataDetail.remark.rule!=''}}">
        <view class="laber">任务描述</view>
        <view class="flex-1">{{dataDetail.remark.customize || dataDetail.remark.rule}}</view>
      </view>
      <!-- <view class="flex-box" a:if="{{dataDetail.files.length>0}}">
        <view class="laber">图片</view>
        <view class="flex-1 flex-box flex-d-wrap">
          <block a:for="{{dataDetail.files}}" a:for-item="imgs" a:for-index="idx">
            <image class="imgs" catchTap="showImg" mode="scaleToFill" src="{{imgs}}" data-index="{{idx}}" data-item="{{dataDetail.files}}"/>
          </block>
        </view>
      </view> -->
      <view class="flex-box flex-v-ce" a:if="{{dataDetail.rule_list}}">
        <view class="laber">规则分类</view>
        <view class="flex-1">{{dataDetail.rule_list }}</view>
      </view>
      <view class="flex-box flex-v-ce" a:if="{{dataDetail.source_type_mark}}">
        <view class="laber">来源类型</view>
        <view class="flex-1">{{dataDetail.source_type_mark }}</view>
      </view>
      <view class="flex-box flex-v-ce" a:if="{{dataDetail.date}}">
        <view class="laber">事件时间</view>
        <view class="flex-1">{{dataDetail.date }}</view>
      </view>
      <view class="flex-box flex-v-ce" a:if="{{dataDetail.recorder_name}}">
        <view class="laber">记录人</view>
        <view class="flex-1">{{dataDetail.recorder_name}}</view>
      </view>
      <view class="flex-box flex-v-ce" a:if="{{dataDetail.complete_task.time}}">
        <view class="laber">完成时间</view>
        <view class="flex-1">{{dataDetail.complete_task.time }}</view>
      </view>
      <view class="flex-box flex-v-ce" a:if="{{dataDetail.complete_task.remark}}">
        <view class="laber">完成备注</view>
        <view class="flex-1">{{dataDetail.complete_task.remark}}</view>
      </view>
      <view class="flex-box" a:if="{{dataDetail.complete_task.files.length>0}}">
        <view class="laber"></view>
        <view class="flex-1 flex-box flex-d-wrap">
          <block a:for="{{dataDetail.complete_task.files}}" a:for-item="imgs" a:for-index="idx">
            <image class="imgs" catchTap="showImg" mode="scaleToFill" src="{{imgs}}" data-index="{{idx}}" data-item="{{dataDetail.complete_task.files}}"/>
          </block>
        </view>
      </view>
    </view>
  </view>
  <view class="main margin-bottom">
    <block a:if="{{dataDetail.source_type!=10}}">
      <view class="mian-title border-bottom" a:if="{{dataDetail.rule_item_id}}">规则依据
        <text>此事件打分参考以下积分规则</text>
      </view>
      <view class="header-main" a:if="{{dataDetail.rule_item_id}}">
        <view class="flex-box flex-v-ce" a:if="{{dataDetail.rule_list}}">
          <view class="laber">规则分类</view>
          <view class="flex-1">{{dataDetail.rule_list }}</view>
        </view>
        <view class="flex-box" a:if="{{dataDetail.remark&&dataDetail.remark.rule}}">
          <view class="laber">积分规则</view>
          <view class="flex-1">{{dataDetail.remark.rule}}</view>
        </view>
        <view class="flex-box flex-v-ce" a:if="{{dataDetail.rule_item}}">
          <view class="laber">规则积分</view>
          <view class="flex-1">
            <text a:if="{{dataDetail.rule_item.range_type == 1}}">{{ dataDetail.rule_item.min_point }}</text>
            <text a:if="{{dataDetail.rule_item.range_type == 2}}">{{ dataDetail.rule_item.min_point }} ~ {{ dataDetail.rule_item.max_point }}</text>
            <text>{{dataDetail.typeName}}</text>
          </view>
        </view>
      </view>
    </block>
    <block a:else>
        <view class="log" catchTap="openLog">查看日志详情内容 <text style="font-size: 36rpx;padding-left:10rpx;">»</text></view>
    </block>
  </view>
  <view class="bottom flex-box flex-flex-center-center" a:if="{{dataDetail.recorder_id==userId&&dataDetail.process.length==1&&(dataDetail.event_type==3||dataDetail.event_type==4)}}">
    <text class="flex-2 fontColorF">撤销后数据将不可恢复</text>
    <view></view>
    <view class="flex-1 blueBtn" catchTap="openCx">撤销奖扣</view>
  </view>
  <!-- 调用过程组件 -->
  <view class="" style="margin-bottom:140rpx">
    <process process="{{dataDetail.process}}" a:if="{{dataDetail.process.length>0}}"/>
  </view>
</view>