Эх сурвалжийг харах

修复审核时没有把保存的审核内容呈现出来

sugangqiang 2 жил өмнө
parent
commit
0eefdf5ee1

+ 46 - 29
app/admin/controller/Talent.php

@@ -35,31 +35,6 @@ class Talent extends AdminController {
         if (in_array($info["checkState"], [TalentState::BASE_VERIFY_FAIL, TalentState::FST_SUBMIT, TalentState::BASE_VERIFY_PASS, TalentState::BASE_REVERIFY_REJECT, TalentState::BASE_REVERIFY_FAIL])) {
         if (in_array($info["checkState"], [TalentState::BASE_VERIFY_FAIL, TalentState::FST_SUBMIT, TalentState::BASE_VERIFY_PASS, TalentState::BASE_REVERIFY_REJECT, TalentState::BASE_REVERIFY_FAIL])) {
             return view("talentInfo_base_check", ["info" => $info]);
             return view("talentInfo_base_check", ["info" => $info]);
         } else {
         } else {
-            $last_log = TalentLogApi::getLastLog($id, ProjectState::TALENT, 0, ["active", "=", 0]);
-            if ($last_log["step"] == 3 && $last_log["companyId"] != $this->user["companyId"]) {
-                $last_log = TalentLogApi::getLastLog($id, ProjectState::TALENT, $this->user["companyId"], ["active", "=", 0]);
-            }
-            if ($last_log["state"] == 10 && $last_log["new_state"] == 10) {
-                
-            }
-            if ($last_log["state"] == 11 && $last_log["new_state"] == 8) {
-                
-            }
-            if ($last_log["state"] == 10 && $last_log["new_state"] == 12) {
-                
-            }
-            if ($last_log["state"] == 10 && $last_log["new_state"] == 9) {
-                
-            }
-            if ($last_log["state"] == 14 && $last_log["new_state"] == 14) {
-                
-            }
-            if ($last_log["state"] == 15 && $last_log["new_state"] == 9) {
-                
-            }
-            if ($last_log["state"] == 16 && $last_log["new_state"] == 16) {
-                
-            }
             switch ($info["enterpriseType"]) {
             switch ($info["enterpriseType"]) {
                 case 1:
                 case 1:
                     $tpl = "talentInfo_common_check"; //$info["isImport"] ? "nofile_talentInfo_common_check" : "talentInfo_common_check";
                     $tpl = "talentInfo_common_check"; //$info["isImport"] ? "nofile_talentInfo_common_check" : "talentInfo_common_check";
@@ -797,10 +772,10 @@ class Talent extends AdminController {
      */
      */
     private function fstCheck(\think\Request $request, $talent_info) {
     private function fstCheck(\think\Request $request, $talent_info) {
         $params = $request->param();
         $params = $request->param();
+        $data["pass_dept_check"] = 0;
         if ($params["checkState"] == 3) {
         if ($params["checkState"] == 3) {
 //审核成功,并取消设置越过部门并审
 //审核成功,并取消设置越过部门并审
             $log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
             $log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
-            $data["pass_dept_check"] = 0;
             if ($talent_info["isImport"] && $talent_info["isMatchZhiren"]) {
             if ($talent_info["isImport"] && $talent_info["isMatchZhiren"]) {
                 $data["pass_dept_check"] = 1;
                 $data["pass_dept_check"] = 1;
             }
             }
@@ -809,7 +784,9 @@ class Talent extends AdminController {
                 return json(["msg" => "只有曾经通过部门并审,初审时才可以选择直接跳过部门并审阶段"]);
                 return json(["msg" => "只有曾经通过部门并审,初审时才可以选择直接跳过部门并审阶段"]);
 //审核成功,并设置越过部门并审。附加条件:最高进度曾经通过部门并审4(包含部门并审)
 //审核成功,并设置越过部门并审。附加条件:最高进度曾经通过部门并审4(包含部门并审)
             $log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
             $log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
-            $data["pass_dept_check"] = $talent_info["highProcess"] >= 4 ? 1 : 0;
+            if ($talent_info["highProcess"] >= 4) {
+                $data["pass_dept_check"] = 1;
+            }
         } else if ($params["checkState"] == 5) {
         } else if ($params["checkState"] == 5) {
             //选择重审部门
             //选择重审部门
             if ($talent_info["highProcess"] < 4)
             if ($talent_info["highProcess"] < 4)
@@ -825,7 +802,6 @@ class Talent extends AdminController {
                 }
                 }
             }
             }
             $log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
             $log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
-            $data["pass_dept_check"] = 0;
         } else {
         } else {
 //审核驳回并记录需要修改的字段和上传文件
 //审核驳回并记录需要修改的字段和上传文件
             $checkState = TalentState::SCND_SAVE; //退回材料编辑状态
             $checkState = TalentState::SCND_SAVE; //退回材料编辑状态
@@ -1490,7 +1466,48 @@ class Talent extends AdminController {
                 }
                 }
                 $talent_info["files"] = array_filter(explode(",", $talent_info["modify_files"]));
                 $talent_info["files"] = array_filter(explode(",", $talent_info["modify_files"]));
                 $talent_info["fields"] = array_filter(explode(",", $talent_info["modify_fields"]));
                 $talent_info["fields"] = array_filter(explode(",", $talent_info["modify_fields"]));
-                return json(["code" => 200, "obj" => ["process" => $process, "talentInfo" => $talent_info, "fieldList" => $field_tmp, "fileList" => $files, "companys" => $_companys]]);
+
+                /* 保存的审核内容start */
+                $last_log = TalentLogApi::getLastLog($id, ProjectState::TALENT, 0, ["active", "=", 0]);
+                if ($last_log["step"] == 3 && $last_log["companyId"] != $this->user["companyId"]) {
+                    $last_log = TalentLogApi::getLastLog($id, ProjectState::TALENT, $this->user["companyId"], ["active", "=", 0]);
+                }
+                $check = ["msg" => $last_log["description"]];
+                if ($last_log["state"] == TalentState::FST_VERIFY_PASS && $last_log["new_state"] == TalentState::FST_VERIFY_PASS) {
+                    if ($talent_info["pass_dept_check"] == 1) {
+                        if ($talent_info["isImport"] && $talent_info["isMatchZhiren"]) {
+                            $check["checkState"] = 3; //初审通过
+                        } else {
+                            $check["checkState"] = 4; //初审通过(跳过部门并审)
+                        }
+                    } else {
+                        if ($talent_info["re_check_companys"] && $talent_info["highProcess"] >= 4) {
+                            $check["checkState"] = 5; //初审通过(需要再次部门并审)
+                        } else {
+                            $check["checkState"] = 3; //初审通过
+                        }
+                    }
+                }
+                if ($last_log["state"] == TalentState::FST_VERIFY_REJECT && $last_log["new_state"] == TalentState::SCND_SAVE) {
+                    $check["checkState"] = 2; //初审驳回
+                }
+                if ($last_log["state"] == TalentState::FST_VERIFY_PASS && $last_log["new_state"] == TalentState::DEPT_VERIFY_PASS) {
+                    $check["checkState"] = 3; //部门通过
+                }
+                if ($last_log["state"] == TalentState::FST_VERIFY_PASS && $last_log["new_state"] == TalentState::SCND_SUBMIT) {
+                    $check["checkState"] = 2; //部门驳回
+                }
+                if ($last_log["state"] == TalentState::REVERIFY_PASS && $last_log["new_state"] == TalentState::REVERIFY_PASS) {
+                    $check["checkState"] = 3; //复审通过
+                }
+                if ($last_log["state"] == TalentState::REVERIFY_REJECT && $last_log["new_state"] == TalentState::SCND_SUBMIT) {
+                    $check["checkState"] = 2; //复审驳回
+                }
+                if ($last_log["state"] == TalentState::REVERIFY_FAIL && $last_log["new_state"] == TalentState::REVERIFY_FAIL) {
+                    $check["checkState"] = -1; //复审失败
+                }
+                /* 保存的审核内容end */
+                return json(["code" => 200, "obj" => ["process" => $process, "talentInfo" => $talent_info, "check" => $check, "fieldList" => $field_tmp, "fileList" => $files, "companys" => $_companys]]);
             } else {
             } else {
                 return json(["msg" => "该申报不在审核范围内,无法审核"]);
                 return json(["msg" => "该申报不在审核范围内,无法审核"]);
             }
             }

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

@@ -416,9 +416,9 @@ TalentInfoInfoDlg.showFirstCheckModal = function () {
                     }
                     }
                     $("#checkStateFirstModal").empty().append(optionHtml);
                     $("#checkStateFirstModal").empty().append(optionHtml);
                     $("#firstCheckForm")[0].reset();
                     $("#firstCheckForm")[0].reset();
-                    //$("#checkStateFirstModal").val(obj.checkState);
+                    $("#checkStateFirstModal").val(data.obj.check.checkState);
                     $("#checkStateFirstModal").trigger("change");
                     $("#checkStateFirstModal").trigger("change");
-                    $("#checkMsgFirst").val(obj.checkMsg);
+                    $("#checkMsgFirst").val(data.obj.check.msg);
                     if (obj.fields != null && obj.fields != '') {
                     if (obj.fields != null && obj.fields != '') {
                         $("#field_info input").each(function () {
                         $("#field_info input").each(function () {
                             for (var key in obj.fields) {
                             for (var key in obj.fields) {