sugangqiang 2 年之前
父節點
當前提交
f7e4321e16
共有 2 個文件被更改,包括 9 次插入3 次删除
  1. 3 1
      app/common/api/VerifyApi.php
  2. 6 2
      public/static/modular/talentIdentify/talentInfo/talentInfo_base.js

+ 3 - 1
app/common/api/VerifyApi.php

@@ -99,14 +99,16 @@ class VerifyApi {
         $count = Talent::alias("ti")
                         ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                         ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                         ->where($where)
                         ->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])->count();
         $list = Talent::alias("ti")
                         ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                         ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                         ->where($where)
                         ->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])
-                        ->field("ti.*,e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")
+                        ->field("ti.*,tl.last_state as 'lastState',tl.state as 'realState',e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")
                         ->limit($offset, $limit)->order("ti.createTime " . $order)
                         ->select()->toArray();
         foreach ($list as &$item) {

+ 6 - 2
public/static/modular/talentIdentify/talentInfo/talentInfo_base.js

@@ -41,8 +41,12 @@ TalentInfo.initColumn = function () {
                 if (typeof row.deptCheckState != "undefined") {
                     if (row.deptCheckState == 9) {
                         return "<span class='label label-primary'>部门已通过</span>"
-                    }else if(row.deptCheckState == 6){
-                        return "<span class='label label-danger'>部门已驳回</span>"
+                    } else if (row.deptCheckState == 6) {
+                        if (row.lastState == 10) {
+                            return "<span class='label label-success'>待重新审核</span>"
+                        } else {
+                            return "<span class='label label-danger'>部门已驳回</span>"
+                        }
                     } else {
                         return "<span class='label label-success'>待审核</span>"
                     }