浏览代码

"复审将所有状态统一表述并分类(含搜索栏,列表、导出记录):
1.待复审(首次提交)
2.待复审(重新提交)
3.复审通过
4.复审驳回
5.复审不通过"

sugangqiang 2 年之前
父节点
当前提交
802fd79a1f

+ 7 - 2
app/admin/view/talent/re_verify.html

@@ -109,8 +109,13 @@
                                     </div>
                                     <select class="form-control" id="checkState">
                                         <option value="">---请选择---</option>
-                                        <option value="1">待审核</option>
-                                        <option value="-1">审核不通过</option>
+                                        <!--<option value="1">待审核</option>
+                                        <option value="-1">审核不通过</option>-->
+                                        <option value="1">待复审(首次提交)</option>
+                                        <option value="2">待复审(重新提交)</option>
+                                        <option value="3">复审通过</option>
+                                        <option value="4">复审驳回</option>
+                                        <option value="5">复审不通过</option>
                                     </select>
                                 </div>                            
                             </div>

+ 47 - 11
app/common/api/VerifyApi.php

@@ -408,10 +408,21 @@ class VerifyApi {
         if ($process == 5) {
             $whereRaw = sprintf("(tl.state in (14,15,16)) or (tl.state=12 and ti.pass_dept_check=0) or (tl.state=10 and ti.pass_dept_check=1) or (tl.state=10 and (tc.companyIds is null or tc.companyIds = ''))");
             switch ($params["checkState"]) {
-                case 1:
+                case 1://待复审(首次提交)
+                    $where[] = ["tl.state", "in", [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS]];
+                    $where[] = ["tl2.resubmit", "EXP", Db::raw("is null")];
+                    break;
+                case 2://待复审(重新提交)
                     $where[] = ["tl.state", "in", [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS]];
+                    $where[] = ["tl2.resubmit", "EXP", Db::raw("is not null")];
+                    break;
+                case 3://复审通过
+                    $where[] = ["tl.state", "=", TalentState::REVERIFY_PASS];
+                    break;
+                case 4://复审驳回
+                    $where[] = ["tl.state", "=", TalentState::REVERIFY_REJECT];
                     break;
-                case -1:
+                case 5://复审不通过
                     $where[] = ["tl.state", "=", TalentState::REVERIFY_FAIL];
                     break;
             }
@@ -419,18 +430,18 @@ class VerifyApi {
                             ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                             ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                             ->leftJoin("(select mainId,last_state,new_state,state,createTime from new_talent_checklog where md5(concat(createTime,mainId,`type`)) in (select md5(concat(max(createTime),mainId,`type`)) from `new_talent_checklog` where `type`=1 and `step` is null and active=1 and typeFileId is null group by mainId,`type`)) tl", "`tl`.`mainId`=ti.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)")
+                            ->leftJoin("(select id as resubmit,mainId from new_talent_checklog where state=15 and `type`=1 and `active`=1 group by mainId) as tl2", "`tl2`.mainId=`ti`.id")
                             ->whereRaw($whereRaw)->where($where)->count();
             $list = Talent::alias("ti")
                             ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                             ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                             ->leftJoin("(select mainId,last_state,new_state,state,createTime from new_talent_checklog where md5(concat(createTime,mainId,`type`)) in (select md5(concat(max(createTime),mainId,`type`)) from `new_talent_checklog` where `type`=1 and `step` is null and active=1 and typeFileId is null group by mainId,`type`)) tl", "`tl`.`mainId`=ti.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)")
+                            ->leftJoin("(select id as resubmit,mainId from new_talent_checklog where state=15 and `type`=1 and `active`=1 group by mainId) as tl2", "`tl2`.mainId=`ti`.id")
                             ->whereRaw($whereRaw)
                             ->where($where)
                             ->limit($offset, $limit)
                             ->order("ti.createTime " . $order)
-                            ->field("ti.*,tl.last_state as 'lastState',tl.state as 'realState',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,tl2.resubmit")
                             ->select()->toArray();
         } else {
             switch ($process) {
@@ -487,6 +498,7 @@ class VerifyApi {
                     break;
                 case 6:
                     $where[] = ["tl.state", ">=", TalentState::REVERIFY_PASS];
+                    $where[] = ["tl.state", "not in", [TalentState::REVERIFY_REJECT, TalentState::REVERIFY_FAIL]];
                     if ($params["checkState"]) {
                         $where[] = ["tl.state", "=", $params["checkState"]];
                     }
@@ -758,10 +770,21 @@ class VerifyApi {
                 case 5:
                     $whereRaw = sprintf("(tl.state in (14,15,16)) or (tl.state=12 and ti.pass_dept_check=0) or (tl.state=10 and ti.pass_dept_check=1) or (tl.state=10 and (tc.companyIds is null or tc.companyIds = ''))");
                     switch ($params["checkState"]) {
-                        case 1:
+                        case 1://待复审(首次提交)
                             $where[] = ["tl.state", "in", [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS]];
+                            $where[] = ["tl2.resubmit", "EXP", Db::raw("is null")];
+                            break;
+                        case 2://待复审(重新提交)
+                            $where[] = ["tl.state", "in", [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS]];
+                            $where[] = ["tl2.resubmit", "EXP", Db::raw("is not null")];
+                            break;
+                        case 3://复审通过
+                            $where[] = ["tl.state", "=", TalentState::REVERIFY_PASS];
                             break;
-                        case -1:
+                        case 4://复审驳回
+                            $where[] = ["tl.state", "=", TalentState::REVERIFY_REJECT];
+                            break;
+                        case 5://复审不通过
                             $where[] = ["tl.state", "=", TalentState::REVERIFY_FAIL];
                             break;
                     }
@@ -810,11 +833,12 @@ class VerifyApi {
                                 ->select()->toArray();
             }
         } else if ($process == 5) {
+            $fields[] = "tl2.resubmit";
             $list = Talent::alias("ti")
                             ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                             ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                             ->leftJoin("(select description,mainId,last_state,new_state,state,createTime from new_talent_checklog where md5(concat(createTime,mainId,`type`)) in (select md5(concat(max(createTime),mainId,`type`)) from `new_talent_checklog` where `type`=1 and `step` is null and active=1 and typeFileId is null group by mainId,`type`)) tl", "`tl`.`mainId`=ti.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)")
+                            ->leftJoin("(select id as resubmit,mainId from new_talent_checklog where state=15 and `type`=1 and `active`=1 group by mainId) as tl2", "`tl2`.mainId=`ti`.id")
                             ->whereRaw($whereRaw)
                             ->where($where)
                             ->field($fields)
@@ -890,7 +914,11 @@ class VerifyApi {
                         if ($process == 3) {
                             $item["checkState"] = "初审通过(待复审)";
                         } else {
-                            $item["checkState"] = "待复审";
+                            if ($item["resubmit"]) {
+                                $item["checkState"] = "待复审(重新提交)";
+                            } else {
+                                $item["checkState"] = "待复审(首次提交)";
+                            }
                         }
                     }
                     if ($item["pass_dept_check"] == 0) {
@@ -913,10 +941,18 @@ class VerifyApi {
                 } else if ($process == 4) {
                     $item["checkState"] = "部门并审通过";
                 } else {
-                    $item["checkState"] = "待复审";
+                    if ($item["resubmit"]) {
+                        $item["checkState"] = "待复审(重新提交)";
+                    } else {
+                        $item["checkState"] = "待复审(首次提交)";
+                    }
                 }
             } else if ($item["state"] == TalentState::REVERIFY_REJECT) {
-                $item["checkState"] = "待初审(复审驳回)";
+                if ($process == 3) {
+                    $item["checkState"] = "待初审(复审驳回)";
+                } else {
+                    $item["checkState"] = "复审驳回";
+                }
             } else {
                 $item["checkState"] = TalentState::getStateName($item["state"]);
             }

+ 18 - 4
public/static/modular/talentIdentify/talentInfo/talentInfo_base.js

@@ -104,7 +104,11 @@ TalentInfo.initColumn = function () {
                         if (process == 4) {
                             return "<span class='label label-success'>待部门并审</span>";
                         }
-                        return "<span class='label label-success'>待复审</span>";
+                        if (row.resubmit) {
+                            return "<span class='label label-success'>待复审(重新提交)</span>";
+                        } else {
+                            return "<span class='label label-success'>待复审(首次提交)</span>";
+                        }
                     }
                     if (value == 8) {
                         if (row.realState == 11) {
@@ -131,7 +135,13 @@ TalentInfo.initColumn = function () {
                             return "<span class='label label-success'>待初审(首次提交)</span>"
                         }
                     }
-                    if (value == 16 || value == -1 || value == -2 || value == 7) {
+                    if (value == -2) {
+                        return "<span class='label label-danger'>初审不通过</span>"
+                    }
+                    if (value == 16) {
+                        return "<span class='label label-danger'>复审不通过</span>"
+                    }
+                    if (value == -1 || value == 7) {
                         return "<span class='label label-danger'>审核不通过</span>"
                     }
                     if (value == 4) {
@@ -155,7 +165,11 @@ TalentInfo.initColumn = function () {
                         if (process == 3) {
                             return "<span class='label label-success'>待复审(部门并审通过)</span>";
                         }
-                        return "<span class='label label-success'>待复审</span>";
+                        if (row.resubmit) {
+                            return "<span class='label label-success'>待复审(重新提交)</span>";
+                        } else {
+                            return "<span class='label label-success'>待复审(首次提交)</span>";
+                        }
                     }
                     if (value == 13) {
                         if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 4) {
@@ -165,7 +179,7 @@ TalentInfo.initColumn = function () {
                         }
                     }
                     if (value == 14) {
-                        return "<span class='label label-primary'>通过</span>"
+                        return "<span class='label label-primary'>复审通过</span>"
                     }
                     if (value == 15) {
                         if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 5) {

+ 8 - 8
public/static/modular/talentIdentify/talentInfo/talentInfo_common_check.js

@@ -411,8 +411,8 @@ TalentInfoInfoDlg.showFirstCheckModal = function () {
                     var optionHtml = "";
                     if (process <= 4 && process != 2) {
                         optionHtml = '<option value="">请选择</option>\n' +
-                                (obj.highProcess == 4 && process == 3 ? '<option value="5">审核通过(需要再次部门并审)</option>\n' : '<option value="3">审核通过</option>') +
-                                (obj.highProcess == 4 && process == 3 ? '<option value="4">审核通过(跳过部门并审)</option>\n' : "") +
+                                (obj.highProcess >= 4 && process == 3 && obj.isMatchZhiren == 0 ? '<option value="5">审核通过(需要再次部门并审)</option>\n' : '<option value="3">审核通过</option>') +
+                                (obj.highProcess >= 4 && process == 3 && obj.isMatchZhiren == 0 ? '<option value="4">审核通过(跳过部门并审)</option>\n' : "") +
                                 '                            <option value="2">审核驳回</option>\n';
                     }
                     if (process == 5 || process == 2) {
@@ -844,14 +844,14 @@ $(function () {
     $(".fa").bind("mouseover", function () {
         var htm = $(this).data('msg');
         console.log(htm)
-        if(htm != '' && typeof(htm) != "undefined"){
+        if (htm != '' && typeof (htm) != "undefined") {
             $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
-        }else{
+        } else {
             var id = $(this).data('id');
-            html = $("#"+id).html();
-            if(id == "shebao"){
-                $(this).webuiPopover({title: '详情', content: html, trigger: 'hover',placement: 'right'}).webuiPopover('show');
-            }else{
+            html = $("#" + id).html();
+            if (id == "shebao") {
+                $(this).webuiPopover({title: '详情', content: html, trigger: 'hover', placement: 'right'}).webuiPopover('show');
+            } else {
                 $(this).webuiPopover({title: '详情', content: html, trigger: 'hover'}).webuiPopover('show');
             }