浏览代码

人才层次变更增加总院审核

sugangqiang 1 年之前
父节点
当前提交
bd3a425624

+ 2 - 2
app/admin/api/RoleApi.php

@@ -25,8 +25,8 @@ class RoleApi {
 
     public static function getList($params) {
         $where = [];
-        if (isset($params["roleName"])) {
-            $where = [["name", "like", "%" . $name . "%"]];
+        if (trim($params["roleName"])) {
+            $where = [["name", "like", "%" . $params["roleName"] . "%"]];
         }
         $list = Role::where($where)->select()->toArray();
         foreach ($list as &$item) {

+ 3 - 0
app/admin/controller/TalentTypeChange.php

@@ -573,6 +573,9 @@ class TalentTypeChange extends AdminController {
                     if ($checkState == 2) {
                         $data["checkState"] = MainState::FIRST_REJECT;
                     }
+                    if ($checkState == -2) {
+                        $data["checkState"] = MainState::FIRST_REJECT_BRANCH;
+                    }
                     //审核通过
                     if ($checkState == 3) {
                         $talent_condition = TalentConditionApi::getOne($old["newIdentifyCondition"]);

+ 85 - 0
app/common/api/TalentTypeChangeApi.php

@@ -35,6 +35,91 @@ class TalentTypeChangeApi {
         return $info;
     }
 
+    public static function getHospitalExamineList($request) {
+        $user = session("user");
+
+        $order = trim($request->param("order")) ?: "desc";
+        $offset = trim($request->param("offset")) ?: 0;
+        $limit = trim($request->param("limit")) ?: 10;
+        $talentName = trim($request->param("talentName"));
+        $idCard = trim($request->param("idCard"));
+        $enterpriseId = trim($request->param("enterpriseName"));
+        $oldTalentArrange = trim($request->param("oldTalentArrange"));
+        $newTalentArrange = trim($request->param("newTalentArrange"));
+        $checkState = trim($request->param("checkState"));
+        $oldIdentifyCondition = trim($request->param("oldIdentifyCondition"));
+        $newIdentifyCondition = trim($request->param("newIdentifyCondition"));
+        $oldIdentifyMonth = trim($request->param("oldIdentifyMonth"));
+        $newIdentifyMonth = trim($request->param("newIdentifyMonth"));
+        $oldYear = trim($request->param("oldYear"));
+        $newYear = trim($request->param("newYear"));
+        $where = [];
+        $where[] = ["ttc.delete", "=", 0];
+        $where[] = ["ttc.type", "=", 5];
+        $where[] = ["e.medicalCommunityId", "=", $user["medicalCommunityId"]];
+        $where[] = ["e.isGeneral", "=", 2];
+        if ($talentName) {
+            $where[] = ["talentName", "like", "%" . $talentName . "%"];
+        }
+        if ($idCard) {
+            $where[] = ["ttc.idCard", "like", "%" . $idCard . "%"];
+        }
+        if ($enterpriseId) {
+            $where[] = ["enterpriseId", "=", $enterpriseId];
+        }
+        if ($oldTalentArrange) {
+            $where[] = ["oldTalentArrange", "=", $oldTalentArrange];
+        }
+        if ($newTalentArrange) {
+            $where[] = ["newTalentArrange", "=", $newTalentArrange];
+        }
+        if ($oldIdentifyCondition) {
+            $where[] = ["oldIdentifyCondition", "=", $oldIdentifyCondition];
+        }
+        if ($newIdentifyCondition) {
+            $where[] = ["newIdentifyCondition", "=", $newIdentifyCondition];
+        }
+        if ($checkState) {
+            $where[] = ["ttc.checkState", "=", $checkState];
+        }
+        if ($oldIdentifyMonth) {
+            $where[] = ["oldIdentifyMonth", "like", "%" . $oldIdentifyMonth . "%"];
+        }
+        if ($newIdentifyMonth) {
+            $where[] = ["newIdentifyMonth", "like", "%" . $newIdentifyMonth . "%"];
+        }
+        if ($oldYear) {
+            $where[] = ["oldYear", "like", "%" . $oldYear . "%"];
+        }
+        if ($newYear) {
+            $where[] = ["newYear", "like", "%" . $newYear . "%"];
+        }
+        $count = ttcModel::alias("ttc")->leftJoin("un_enterprise e", "e.id=ttc.enterpriseId")->where($where)->count();
+        $list = ttcModel::alias("ttc")->field("ttc.*")->leftJoin("un_enterprise e", "e.id=ttc.enterpriseId")->where($where)->limit($offset, $limit)->order("ttc.createTime " . $order)->select()->toArray();
+        $talentArangeList = DictApi::selectByParentCode("talent_arrange"); //人才层次
+
+        foreach ($list as $k => $v) {
+            $list[$k]["oldTalentArrangeName"] = array_key_exists($v["oldTalentArrange"], $talentArangeList) ? $talentArangeList[$v["oldTalentArrange"]] : "";
+            $list[$k]["newTalentArrangeName"] = array_key_exists($v["newTalentArrange"], $talentArangeList) ? $talentArangeList[$v["newTalentArrange"]] : "";
+            if (strlen($v["oldIdentifyCondition"]) == 19) {
+                $condition = Db::table("un_identify_condition")->find($v["oldIdentifyCondition"]);
+                $list[$k]["oldIdentifyConditionCH"] = $condition["name"];
+            } else if ($v["oldIdentifyCondition"]) {
+                $condition = TalentConditionApi::getOne($v["oldIdentifyCondition"]);
+                $list[$k]["oldIdentifyConditionCH"] = $condition["name"];
+            }
+            if (strlen($v["newIdentifyCondition"]) == 19) {
+                $condition = Db::table("un_identify_condition")->find($v["newIdentifyCondition"]);
+                $list[$k]["newIdentifyConditionCH"] = $condition["name"];
+            } else if ($v["newIdentifyCondition"]) {
+                $condition = TalentConditionApi::getOne($v["newIdentifyCondition"]);
+                $list[$k]["newIdentifyConditionCH"] = $condition["name"];
+            }
+        }
+
+        return ["total" => $count, "rows" => $list];
+    }
+
     public static function getNewIdentifyConditionIdFromOldId($oldIdentifyConditionId) {
         $oldIdentifyCondition = Db::table("un_identify_condition")->find($oldIdentifyConditionId);
         $where = [];

+ 12 - 0
app/common/state/MainState.php

@@ -6,6 +6,8 @@ class MainState {
 
 //保存
     public const SAVE = 1;
+//待审核分支企业    
+    public const NEED_PRE_CHECK = 2;
 //待审核
     public const NEED_CHECK = 3;
 //部门初审驳回
@@ -14,6 +16,10 @@ class MainState {
     public const NOTPASS = -1;
 //待初审
     public const NEED_FIRST_CHECK = 7;
+//上级企业驳回到
+    public const GENERAL_REJECT = 8;
+//初审驳回到出分支企业
+    public const FIRST_REJECT_BRANCH = 9;
 //初审驳回
     public const FIRST_REJECT = 10;
 //待部门审核
@@ -51,12 +57,18 @@ class MainState {
                 return "<span class='label label-danger'>审核不通过</span>";
             case 1:
                 return "<span class='label'>待提交</span>";
+            case 2:
+                return "<span class='label label-success'>待总院审核</span>";
             case 3:
                 return "<span class='label label-success'>待审核</span>";
             case 5:
                 return "<span class='label label-danger'>部门初审驳回</span>";
             case 7:
                 return"<span class='label label-success'>待初审</span>";
+            case 8:
+                return "<span class='label label-danger'>总院驳回</span>";
+            case 9:
+                return "<span class='label label-danger'>初审驳回到分院</span>";
             case 10:
                 return "<span class='label label-danger'>初审驳回</span>";
             case 15:

+ 2 - 2
app/enterprise/controller/TalentAllowance.php

@@ -865,9 +865,9 @@ class TalentAllowance extends EnterpriseController {
         }
         $data["checkMsg"] = "";
         $data["checkState"] = AllowanceStateEnum::NEED_CHECK;
-        $ep = \app\common\api\EnterpriseApi::getOne($this->user["uid"]);
         $afterState = 7; //待初审
-        /* if ($ep->isGeneral == 2 && \app\common\api\Nhc::hasGeneralHospital($ep->medicalCommunityId)) {
+        /* $ep = \app\common\api\EnterpriseApi::getOne($this->user["uid"]);
+          if ($ep->isGeneral == 2 && \app\common\api\Nhc::hasGeneralHospital($ep->medicalCommunityId)) {
           $data["checkState"] = AllowanceStateEnum::NEED_GENERAL_CHECK; //分院并且有总院
           $afterState = 3; //待审核
           } */

+ 360 - 3
app/enterprise/controller/TalentTypeChange.php

@@ -80,7 +80,7 @@ class TalentTypeChange extends EnterpriseController {
             $talentTypeChange = TalentTypeChangeModel::find($data["id"]);
             if (!$talentTypeChange)
                 return json(["msg" => "不存在的变更记录", "code" => 500]);
-            if ($talentTypeChange["checkState"] != MainState::SAVE && $talentTypeChange["checkState"] != MainState::FIRST_REJECT && $talentTypeChange["checkState"] != MainState::BEFORE_REJECT) {
+            if ($talentTypeChange["checkState"] != MainState::SAVE && $talentTypeChange["checkState"] != MainState::FIRST_REJECT && $talentTypeChange["checkState"] != MainState::BEFORE_REJECT && $talentTypeChange["checkState"] != MainState::GENERAL_REJECT && $talentTypeChange["checkState"] != MainState::FIRST_REJECT_BRANCH) {
                 return json(["msg" => "正在审核中,无法修改", "code" => 500]);
             }
             $data['updateUser'] = $this->user["uid"];
@@ -134,7 +134,7 @@ class TalentTypeChange extends EnterpriseController {
             $response->msg = "没有对应的认定条件";
             return $response;
         }
-        if ($info["checkState"] != MainState::SAVE && $info["checkState"] != MainState::FIRST_REJECT && $info["checkState"] != MainState::BEFORE_REJECT) {
+        if ($info["checkState"] != MainState::SAVE && $info["checkState"] != MainState::FIRST_REJECT && $info["checkState"] != MainState::BEFORE_REJECT && $info["checkState"] != MainState::FIRST_REJECT_BRANCH && $info["checkState"] != MainState::GENERAL_REJECT) {
             $response->msg = "不能重复提交审核";
             return $response;
         }
@@ -175,12 +175,19 @@ class TalentTypeChange extends EnterpriseController {
         if (!$info["firstSubmitTime"]) {
             $data["firstSubmitTime"] = date("Y-m-d H:i:s");
         }
+        $checkState = MainState::NEED_FIRST_CHECK;
+        $ep = \app\common\api\EnterpriseApi::getOne($this->user["uid"]);
+        if ($ep->isGeneral == 2 && \app\common\api\Nhc::hasGeneralHospital($ep->medicalCommunityId)) {
+            //分院并且有总院
+            $checkState = MainState::NEED_PRE_CHECK;
+        }
+
         $data["newSubmitTime"] = date("Y-m-d H:i:s");
         $data["checkMsg"] = "";
         $data["files"] = "";
         $data["fields"] = "";
         $data["id"] = $id;
-        $data["checkState"] = MainState::NEED_FIRST_CHECK;
+        $data["checkState"] = $checkState;
         TalentTypeChangeModel::update($data);
         $user = $this->user;
         $log["id"] = getStringId();
@@ -217,6 +224,356 @@ class TalentTypeChange extends EnterpriseController {
         return $response;
     }
 
+    /**
+     * 审核列表页
+     */
+    public function examineCenter() {
+        $tpl = "";
+        switch ($this->user["type"]) {
+            case \app\common\state\CommonConst::ENTERPRISE_WJ:
+                $tpl = "/talent_type_change/examine_center"; //卫健医院
+                break;
+        }
+        $where[] = ["medicalCommunityId", "=", $this->user["medicalCommunityId"]];
+        $where[] = ["isGeneral", "=", 2];
+        $assigns["enterprises"] = \app\common\api\EnterpriseApi::getSimpleList($where);
+        return view($tpl, $assigns);
+    }
+
+    /**
+     * 审核列表页
+     */
+    public function examineList() {
+        $res = ttcApi::getHospitalExamineList($this->request);
+        return json($res);
+    }
+
+    /**
+     * 审核页面
+     * @return type
+     */
+    public function toCheckPage() {
+        $id = $this->request["id"];
+        $info = ttcApi::getOne($id);
+        $arrangeMap = DictApi::selectByParentCode("talent_arrange");
+        $importMap = DictApi::selectByParentCode("import_way");
+        $info["oldTalentArrangeName"] = $arrangeMap[$info["oldTalentArrange"]];
+        $info["oldIntroductionModeName"] = $importMap[$info["oldIntroductionMode"]];
+        $info["newTalentArrangeName"] = $arrangeMap[$info["newTalentArrange"]];
+        $info["newIntroductionModeName"] = $importMap[$info["newIntroductionMode"]];
+        $talentCatMap = DictApi::selectByParentCode("talent_condition_cats");
+        if (strlen($info["oldIdentifyCondition"]) == 19) {
+            $oldCondition = Db::table("un_identify_condition")->find($info["oldIdentifyCondition"]);
+            $info["oldIdentifyConditionCH"] = $oldCondition["name"];
+        } else {
+            $oldCondition = \app\common\api\TalentConditionApi::getOne($info["oldIdentifyCondition"]);
+            if ($oldCondition["talentLevelCat"]) {
+                $info["oldIdentifyConditionCategoryName"] = $talentCatMap[$oldCondition["talentLevelCat"]];
+            }
+            $info["oldIdentifyConditionCH"] = $oldCondition["name"];
+        }
+        if (strlen($info["newIdentifyCondition"]) == 19) {
+            $newCondition = Db::table("un_identify_condition")->find($info["newIdentifyCondition"]);
+            $info["newIdentifyConditionCH"] = $newCondition["name"];
+        } else {
+            $newCondition = \app\common\api\TalentConditionApi::getOne($info["newIdentifyCondition"]);
+            if ($newCondition["talentLevelCat"]) {
+                $info["newIdentifyConditionCategoryName"] = $talentCatMap[$newCondition["talentLevelCat"]];
+            }
+            $info["newIdentifyConditionCH"] = $newCondition["name"];
+        }
+        return view("check", ["info" => $info]);
+    }
+
+    public function findFieldsAndFiles() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $params = $this->request->param();
+        $id = $params["id"];
+        $info = ttcApi::getOne($id);
+        if (!$info) {
+            $response->msg = "请选择需要修改的对象";
+            return $response;
+        }
+        if ($info["checkState"] != MainState::GENERAL_REJECT) {
+            $response->msg = "只能修改总院驳回的数据";
+            return $response;
+        }
+        $talentInfo = \app\common\api\VerifyApi::getOne($info["talentId"]);
+        if (!$talentInfo || $talentInfo["checkState"] != \app\common\api\TalentState::CERTIFICATED || $talentInfo["delete"] == 1) {
+            $response->msg = "系统错误,请联系管理员";
+            return $response;
+        }
+        $fields = DictApi::getTalentTypeChangeFields($this->user["type"]);
+
+        $field_tmp = [];
+        if ($fields) {
+            foreach ($fields as $key => $field) {
+                $field_tmp[] = ["key" => $key, "value" => $field];
+            }
+        }
+        $condition = \app\common\api\TalentConditionApi::getOne($info["newIdentifyCondition"]);
+        $where = [];
+        $whr = [];
+        $where[] = ["project", "=", ProjectState::LEVELCHANGE];
+        $where[] = ["active", "=", 1];
+        $where[] = ["type", "=", $info["type"]];
+        $where[] = ["isConditionFile", "<>", 1];
+        $where[] = ["delete", "=", 0];
+        if ($condition && $condition["bindFileTypes"]) {
+            $companyWithFileType = array_filter(explode(";", $condition["companyWithFileType"]));
+            $cfKv = [];
+            for ($i = 0; $i < count($companyWithFileType); $i++) {
+                $setting = explode(":", $companyWithFileType[$i]);
+                $_companyId = $setting[0];
+                $_files = explode(",", $setting[1]);
+                $cfKv[$_companyId] = $_files;
+            }
+            $whr[] = ["id", "in", explode(",", $condition["bindFileTypes"])];
+            $files = Db::table("new_common_filetype")->whereOr([$where, $whr])->order("sn asc")->select()->toArray();
+            for ($i = 0; $i < count($files); $i++) {
+                foreach ($cfKv as $_companyId => $_files) {
+                    if (in_array($files[$i]["id"], $_files)) {
+                        $company = getCacheById("Company", $_companyId);
+                        $files[$i]["name"] .= sprintf("<span style='color:red;'>(%s)</span>", $company["name"]);
+                        break;
+                    }
+                }
+            }
+        } else {
+            $files = Db::table("new_common_filetype")->where($where)->order("sn asc")->select()->toArray();
+        }
+        $response->code = 200;
+        $response->id = $id;
+        $response->fileList = $files;
+        $response->fieldList = $field_tmp;
+        $response->select = [
+            "files" => array_filter(explode(",", $info["files"])),
+            "fields" => array_filter(explode(",", $info["fields"]))
+        ];
+        return $response;
+    }
+
+    public function updateFieldsAndFiles() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $params = $this->request->param();
+        $info = ttcApi::getOne($params["id"]);
+        if (!$info) {
+            $response->msg = "请选择需要修改的对象";
+            return $response;
+        }
+        if ($info["checkState"] != MainState::GENERAL_REJECT) {
+            $response->msg = "只能修改总院驳回的数据";
+            return $response;
+        }
+        $fields = array_filter(explode(",", $params["fields"]));
+        $files = array_filter(explode(",", $params["files"]));
+        if (!$fields && !$files) {
+            $response->msg = "请选择驳回的字段或者附件";
+            return $response;
+        }
+        $data["id"] = $params["id"];
+        $data["fields"] = $fields ? implode(",", $fields) : "";
+        $data["files"] = $files ? implode(",", $files) : "";
+        if (TalentTypeChangeModel::update($data)) {
+            $response->msg = "修改成功";
+            $response->code = 200;
+        } else {
+            $response->msg = "修改失败";
+        }
+        return $response;
+    }
+
+    public function validateIsCheck() {
+        $id = $this->request->param("id");
+        $response = new \stdClass();
+        $response->code = 500;
+        $info = ttcApi::getOne($id);
+        if (!$info || $info["delete"] == 1 || $info["type"] != $this->user["type"]) {
+            $response->msg = "没有对应的人才变更记录";
+            return $response;
+        }
+        if (!$info["talentId"]) {
+            $response->msg = "没有对应的人才信息";
+            return $response;
+        }
+        if (!$info["newIdentifyCondition"]) {
+            $response->msg = "没有对应的认定条件";
+            return $response;
+        }
+        $where = [];
+        $where[] = ["active", "=", 0];
+        $lastLog = [];
+        if ($info["checkState"] != MainState::NEED_PRE_CHECK && $info["checkState"] != MainState::FIRST_REJECT) {
+            $response->msg = "该申报不在审核范围内,无法审核";
+        } else {
+            $lastLog = TalentLogApi::getLastLogEx($id, ProjectState::LEVELCHANGE, 0, $where);
+            $response->code = 200;
+        }
+        if ($response->code == 200) {
+            if ($lastLog) {
+                $info["checkState"] = $lastLog["state"];
+                $info["checkMsg"] = $lastLog["description"];
+            } else {
+                $info["checkState"] = null;
+                $info["checkMsg"] = "";
+            }
+            $response->data = $info;
+
+            $condition = \app\common\api\TalentConditionApi::getOne($info["newIdentifyCondition"]);
+            $whrFile = [];
+            $whrOr = [];
+            $whrFile[] = ["project", "=", ProjectState::LEVELCHANGE];
+            $whrFile[] = ["active", "=", 1];
+            $whrFile[] = ["type", "=", $info["type"]];
+            $whrFile[] = ["isConditionFile", "<>", 1];
+            $whrFile[] = ["delete", "=", 0];
+            if ($condition && $condition["bindFileTypes"]) {
+                $companyWithFileType = array_filter(explode(";", $condition["companyWithFileType"]));
+                $cfKv = [];
+                for ($i = 0; $i < count($companyWithFileType); $i++) {
+                    $setting = explode(":", $companyWithFileType[$i]);
+                    $_companyId = $setting[0];
+                    $_files = explode(",", $setting[1]);
+                    $cfKv[$_companyId] = $_files;
+                }
+                $whrOr[] = ["id", "in", explode(",", $condition["bindFileTypes"])];
+                $files = \app\common\model\FileType::whereOr([$whrFile, $whrOr])->order("sn asc")->select()->toArray();
+                for ($i = 0; $i < count($files); $i++) {
+                    foreach ($cfKv as $_companyId => $_files) {
+                        if (in_array($files[$i]["id"], $_files)) {
+                            $company = getCacheById("Company", $_companyId);
+                            $files[$i]["name"] .= sprintf("<span style='color:red;'>(%s)</span>", $company["name"]);
+                            break;
+                        }
+                    }
+                }
+            } else {
+                $files = \app\common\model\FileType::where($whrFile)->order("sn asc")->select()->toArray();
+            }
+            $response->fileList = $files;
+
+            $fieldList = DictApi::getTalentTypeChangeFields($info["type"]);
+            $field_tmp = [];
+            foreach ($fieldList as $key => $field) {
+                $field_tmp[] = ["key" => $key, "value" => $field];
+            }
+            $response->fieldList = $field_tmp;
+        }
+        return $response;
+    }
+
+    public function check() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $talentTypeChange = $this->request->param();
+        $id = $talentTypeChange["id"];
+        $process = -2;
+        $checkState = $talentTypeChange["checkState"];
+        $checkMsg = $talentTypeChange["checkMsg"];
+        $fields = $talentTypeChange["fields"];
+        $files = $talentTypeChange["files"];
+        Db::startTrans();
+        try {
+            if (!$checkState) {
+                $response->msg = "请选择审核状态";
+                return $response;
+            }
+            $upd["id"] = $id;
+            $upd["fields"] = $fields;
+            $upd["files"] = $files;
+            Db::table("un_talent_type_change")->update($upd);
+            $where[] = ["active", "=", "0"];
+            $where[] = ["step", "=", $process];
+            $lastLog = TalentLogApi::getLastLogEx($id, ProjectState::LEVELCHANGE, 0, $where);
+            $user = $this->user;
+
+            $log["active"] = 0;
+            $log["state"] = $checkState;
+            $log["step"] = $process;
+            $log["companyId"] = $user["companyId"];
+            $log["stateChange"] = "保存未提交";
+            $log["type"] = ProjectState::LEVELCHANGE;
+            $log["mainId"] = $id;
+            $log["description"] = $checkMsg;
+            if ($lastLog) {
+                $log["id"] = $lastLog["id"];
+                $log["updateUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $log["updateTime"] = date("Y-m-d H:i:s");
+                Db::table("new_talent_checklog")->update($log);
+            } else {
+                $log["id"] = getStringId();
+                $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $log["createTime"] = date("Y-m-d H:i:s");
+                Db::table("new_talent_checklog")->insert($log);
+            }
+            Db::commit();
+            $response->msg = "审核成功";
+            $response->code = 200;
+            return $response;
+        } catch (\think\db\exception\DbException $e) {
+            Db::rollback();
+            $response->msg = "审核失败:" . $e->getMessage();
+            return $response;
+        }
+    }
+
+    public function submitCheck() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $talentTypeChange = $this->request->param();
+        $id = $talentTypeChange["id"];
+        $companyId = $talentTypeChange["companyId"];
+        $process = -2;
+        $where = [];
+        $where[] = ["active", "=", "0"];
+        $where[] = ["step", "=", $process];
+        $lastLog = TalentLogApi::getLastLogEx($id, ProjectState::LEVELCHANGE, 0, $where);
+        if (!$lastLog) {
+            $response->msg = "请先审核后再提交";
+            return $response;
+        }
+        $checkState = $lastLog["state"];
+        $checkMsg = $lastLog["description"];
+        $data["id"] = $id;
+        $data["checkMsg"] = $checkMsg;
+        $old = ttcApi::getOne($id);
+        //判断到达的最高流程
+        $data["highProcess"] = !$old["highProcess"] ? $process : ($old["highProcess"] < $process ? $process : $old["highProcess"]);
+
+        $user = $this->user;
+        Db::startTrans();
+        try {
+            if ($checkState == -1) {
+                $data["checkState"] = MainState::NOTPASS;
+            }
+            if ($checkState == 2) {
+                $data["checkState"] = MainState::GENERAL_REJECT;
+            }
+            if ($checkState == 3) {
+                $data["checkState"] = MainState::NEED_FIRST_CHECK;
+                $data["firstBeforeSubmitTime"] = date("Y-m-d H:i:s");
+            }
+            $log["id"] = $lastLog["id"];
+            $log["active"] = 1;
+            $log["state"] = 8;
+            $log["stateChange"] = MainState::getStateDesc($old["checkState"]) . "->" . MainState::getStateDesc($data["checkState"]);
+            $log["updateUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+            $log["updateTime"] = date("Y-m-d H:i:s");
+            Db::table("new_talent_checklog")->update($log);
+            Db::table("un_talent_type_change")->update($data);
+            Db::commit();
+            $response->msg = "提交审核成功";
+            $response->code = 200;
+            return $response;
+        } catch (\think\db\exception\DbException $e) {
+            Db::rollback();
+            $response->msg = "提交审核失败:" . $e->getMessage();
+            return $response;
+        }
+    }
+
     private function dataCheck($data) {
         $type = $data->param('type');
         if ($type == 1) {

+ 328 - 0
app/enterprise/view/talent_type_change/check.html

@@ -0,0 +1,328 @@
+{extend name="layout/content"}
+{block name="content"}
+<style type="text/css">
+    .spacing {
+        margin-bottom: 10px;
+        padding-right:4px;
+        padding-left: 4px;
+    }
+    #talentInfoForm label {
+        font-size: xx-small;
+    }
+
+    .has-feedback .form-control {
+        padding-right: 5px;
+    }
+    #field ul li{
+        list-style: none;
+        display:inline-block;
+        width:13%;
+    }
+    #field ul li input{
+        vertical-align:middle;
+        margin-right:5px;
+        margin-top:1px;
+    }
+    .imgs li{
+        list-style: none;
+        float: left;
+        border: 1px solid #d8d1d1;
+        text-align: center;
+        height: 30px;
+    }
+    .layui-layer-btn .layui-layer-btn1 {
+        border-color: #1E9FFF;
+        background-color: #1E9FFF;
+        color: #fff;
+    }
+    .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
+        background-color: #ddd;
+        opacity: 1;
+    }
+    #fileTable td{
+        word-break: break-word;
+        white-space: inherit;
+    }
+</style>
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <div class="form-horizontal">
+            <div class="row">
+                <div class="col-sm-12" >
+                    <div class="tabs-container" >
+                        <ul class="nav nav-tabs">
+                            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">1.基本信息</a></li>
+                            <li id="fileLi" class=""><a data-toggle="tab" href="#tab-2" onclick="TalentTypeChangeInfoDlg.initFileTable()"  aria-expanded="false">2.附件上传</a></li>
+                            <li  class="" style="float: right;">                                
+                                <button type="button" class="btn btn-sm btn-primary " onclick="TalentTypeChangeInfoDlg.download()" >
+                                    <i class="fa fa-download"></i>&nbsp;打包下载
+                                </button>
+                            </li>
+                        </ul>
+                    </div>
+                    <div class="tab-content">
+                        <div id="tab-1" class="tab-pane active">
+                            <div class="panel-body" >
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
+                                    <div class="panel-body">
+                                        <form id="talentTypeForm">
+                                            <div class="col-sm-12 form-group-sm">
+                                                <input type="hidden" id="id" name="id" value="{$info.id}">
+                                                <input type="hidden" id="process" name="process" value="{$info.process}">
+                                                <input type="hidden" id="type" name="type" value="{$info.type}">
+                                                <input type="hidden" id="checkState" name="checkState" value="{$info.checkState}"/>
+                                                <input type="hidden" id="talentId" name="talentId" value="{$info.talentId}"/>
+                                                <input type="hidden" id="enterpriseId" name="enterpriseId" value="{$info.enterpriseId}"/>
+                                                <input type="hidden" id="companyId" name="companyId" value="{$companyId}"/>
+                                                <input type="hidden" id="newSource" name="newSource" value="{$info.newSource}"/>
+                                                <input type="hidden" id="newIdentifyCondition" name="newIdentifyCondition" value="{$info.newIdentifyCondition}"/>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">变更对象</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="talentName" name="talentName" value="{$info.talentName}">
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">证件号码</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" id="idCard" readonly="readonly" name="idCard" value="{$info.idCard}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">单位名称</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" id="enterpriseName" readonly="readonly" name="enterpriseName" value="{$info.enterpriseName}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原申报年度</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldYear" name="oldYear" value="{$info.oldYear}">
+                                                    </div>
+                                                </div>
+                                                {if condition="$info['type'] == 1"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原申报来源</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldSourceName" name="oldSourceName" value="{$info.oldSourceName}">
+                                                    </div>
+                                                </div>
+                                                {eq name="info.oldSource" value="3"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原入选来源地级市</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldFromCityName" name="oldFromCityName" value="{$info.oldFromCityName}">
+                                                    </div>
+                                                </div>
+                                                {/eq}
+                                                {eq name="info.oldSource" value="4"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原入选来源县市区</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldFromCityName" name="oldFromCountyName" value="{$info.oldFromCountyName}">
+                                                    </div>
+                                                </div>
+                                                {/eq}
+                                                {/if}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原人才层次</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldTalentArrangeName" name="oldTalentArrangeName" value="{$info.oldTalentArrangeName}">
+                                                    </div>
+                                                </div>
+                                                {if condition="!in_array($info['type'],[2,5])"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原人才条款</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldIdentifyConditionCategoryName" name="oldIdentifyConditionCategoryName" value="{$info.oldIdentifyConditionCategoryName}" >
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原认定条件</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldIdentifyConditionCH" name="oldIdentifyConditionCH" value="{$info.oldIdentifyConditionCH}"/>
+                                                    </div>
+                                                </div>
+                                                {if condition="$info['type'] eq 2"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原认定条件名称</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" id="oldIdentifyConditionName" readonly="readonly" name="oldIdentifyConditionName" value="{$info.oldIdentifyConditionName}"/>
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                {gt name="oldAnnualSalary" value="0"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原年薪</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" id="oldAnnualSalary" name="oldAnnualSalary" value="{$info.oldAnnualSalary}"/>
+                                                    </div>
+                                                </div>
+                                                {/gt}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原认定条件证书取得时间</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" id="oldIdentifyGetTime" readonly="readonly" name="oldIdentifyGetTime" value="{$info.oldIdentifyGetTime}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原公布入选月份</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control " id="oldIdentifyMonth" readonly="readonly" name="oldIdentifyMonth" value="{$info.oldIdentifyMonth}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原人才编号</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control " id="oldCertificateNO" readonly="readonly" name="oldCertificateNO" value="{$info.oldCertificateNO}"/>
+                                                    </div>
+                                                </div>
+                                                {if condition="$info['type'] == 1"}
+                                                <div class="rowGroup" >
+                                                    <label class="col-sm-2 control-label spacing">原泉州高层次人才证书发证日期</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="oldCertificateStartTime"  name="oldCertificateStartTime" value="{$info.oldCertificateStartTime}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原泉州高层次人才证书的有效期</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control " id="oldCertificateOutTime" readonly="readonly" name="oldCertificateOutTime" value="{$info.oldCertificateOutTime}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">原引进方式</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" id="oldIntroductionModeName" readonly="readonly" name="oldIntroductionModeName" value="{$info.oldIntroductionModeName}">
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新申报年度</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newYear" name="newYear" value="{$info.newYear}">
+                                                    </div>
+                                                </div>
+                                                {if condition="$info['type'] == 1"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新申报来源</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newSourceName" name="newSourceName" value="{$info.newSourceName}">
+                                                    </div>
+                                                </div>
+                                                {eq name="info.newSource" value="3"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新入选来源地级市</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newFromCityName" name="newFromCityName" value="{$info.newFromCityName}">
+                                                    </div>
+                                                </div>
+                                                {/eq}                                              
+                                                {eq name="info.newSource" value="4"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新入选来源县市区</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newFromCountyName" name="newFromCountyName" value="{$info.newFromCountyName}">
+                                                    </div>
+                                                </div>
+                                                {/eq}
+                                                {/if}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新人才层次</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newTalentArrangeName" name="newTalentArrangeName" value="{$info.newTalentArrangeName}" >
+                                                    </div>
+                                                </div>
+                                                {if condition="!in_array($info['type'],[2,5])"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新人才条款</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newIdentifyConditionCategoryName" name="newIdentifyConditionCategoryName" value="{$info.newIdentifyConditionCategoryName}" >                                                        
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新认定条件</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newIdentifyConditionCH" name="newIdentifyConditionCH" value="{$info.newIdentifyConditionCH}" title="{$info.newIdentifyConditionCH}">
+                                                    </div>
+                                                </div>
+                                                {if condition="$info['type'] eq 2"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新认定条件名称</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newIdentifyConditionName" title="{$info.newIdentifyConditionName}" name="newIdentifyConditionName" value="{$info.newIdentifyConditionName}"/>
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                {gt name="newAnnualSalary" value="0"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新年薪</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" id="newAnnualSalary" name="newAnnualSalary" value="{$info.newAnnualSalary}"/>
+                                                    </div>
+                                                </div>
+                                                {/gt}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新认定条件证书取得时间</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newIdentifyGetTime" name="newIdentifyGetTime" value="{$info.newIdentifyGetTime}"/>
+                                                    </div>
+                                                </div>
+                                                {if condition="$info['type'] == 1 && $info['checkState'] == 35 && $info['isPublic'] >= 5"}
+                                                <div class="rowGroup" >
+                                                    <label class="col-sm-2 control-label spacing">新泉州高层次人才证书发证日期</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newCertificateStartTime" name="newCertificateStartTime" value="{$info.newCertificateStartTime}"/>
+                                                    </div>
+                                                </div>
+                                                <div class="rowGroup" >
+                                                    <label class="col-sm-2 control-label spacing">新泉州高层次人才证书的有效期</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newCertificateOutTime" name="newCertificateOutTime" value="{$info.newCertificateOutTime}"/>
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                                {if condition="$info['type'] == 1"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label spacing">新引进方式</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input class="form-control" readonly="readonly" id="newIntroductionModeName" name="newIntroductionModeName" value="{$info.newIntroductionModeName}">
+                                                    </div>
+                                                </div>
+                                                {/if}
+                                            </div>
+                                        </form>
+                                    </div>
+                                </div>
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
+                                    <table id="logTable">
+                                    </table>
+                                </div>
+                            </div>
+                        </div>
+                        <div id="tab-2" class="tab-pane ">                            
+                            <table id="fileTable" class="table-condensed" style="table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">
+                                <thead>
+                                    <tr>
+                                        <th data-field="selectItem" data-checkbox="true"></th>
+                                    </tr>
+                                </thead>
+                            </table>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+<!--<script src="${ctxPath}/static/modular/talentLibrary/talentTypeChange/talentTypeChange_common_check.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_common_check.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 199 - 0
app/enterprise/view/talent_type_change/examine_center.html

@@ -0,0 +1,199 @@
+{extend name="layout/content"}
+{block name="content"}
+<style type="text/css">
+    .layui-layer-btn .layui-layer-btn1 {
+        border-color: #009688;
+        background-color: #009688;
+        color: #fff;
+    }
+    ul li{
+        list-style: none;
+        display:inline-block;
+        margin-bottom: 5px;
+    }
+    #field ul li input{
+        vertical-align:middle;
+        margin-top:1px;
+    }
+</style>
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <h5>人才层次变更管理</h5>
+            </div>
+            <div class="ibox-content">
+                <div class="row row-lg">
+                    <div class="col-sm-12">
+                        <div class="row">
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">姓名
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="talentName" placeholder="" />
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">证件号码
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="idCard" placeholder="" />
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            医院名称
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="enterpriseName">
+                                        <option></option>
+                                        {volist name="enterprises" id="item"}
+                                        <option value="{$item.id}">{$item.name}</option>
+                                        {/volist}
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">原申报年度
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="oldYear" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            原人才层次
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="oldTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('old')">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            原认定条件
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="oldIdentifyCondition">
+                                        <option value="">--请选择--</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">原公布入选月份
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control time" id="oldIdentifyMonth" name="oldIdentifyMonth"/>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">新申报年度
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="newYear" placeholder="">
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            新人才层次
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="newTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('new')">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            新认定条件
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="newIdentifyCondition">
+                                        <option value="">--请选择--</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3" style="display: none">
+                                <div class="input-group">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">新公布入选月份
+                                        </button>
+                                    </div>
+                                    <input type="text" time="time" formate="date" class="form-control" id="newIdentifyMonth" name="newIdentifyMonth"/>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">审核状态
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="checkState">
+                                        <option value="">请选择</option>
+                                        <option value="1">待提交</option>
+                                        <option value="2">待审核</option>
+                                        <option value="-1">审核不通过</option>
+                                        <option value="7">待初审</option>
+                                        <option value="8">总院驳回</option>
+                                        <option value="9">初审驳回到分院</option>
+                                        <option value="10">初审驳回,待审核</option>
+                                        <option value="20">上级驳回</option>
+                                        <option value="15">已通过</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <button type="button" style="cursor:pointer;"  class="btn btn-sm btn-info  glyphicon glyphicon-search" onclick="TalentTypeChange.search()">搜索</button>
+                                <button type="button" style="cursor:pointer;"  class="btn btn-sm btn-warning glyphicon glyphicon-repeat" onclick="TalentTypeChange.reset()">重置</button>
+                            </div>
+
+                        </div>
+                        <div class="hidden-xs" id="TalentTypeChangeTableToolbar" role="group">
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentTypeChange.openTalentTypeChangeCheck()" id="">
+                                <i class="fa fa-check"></i>&nbsp;审核
+                            </button>
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentTypeChange.updateFieldsAndFiles()" id="">
+                                <i class="fa fa-edit"></i>&nbsp;修改驳回字段
+                            </button>
+                        </div>
+                        <table id="TalentTypeChangeTable" class="table-condensed" style="table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">
+                            <thead>
+                                <tr>
+                                    <th data-field="selectItem" data-checkbox="true"></th>
+                                </tr>
+                            </thead>
+                        </table>
+                    </div>
+                </div>
+
+            </div>
+        </div>
+    </div>
+</div>
+<iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
+<!--<script src="${ctxPath}/static/modular/talentLibrary/talentTypeChange/talentTypeChange_first.js"></script>-->
+<!--<script src="${ctxPath}/static/modular/talentLibrary/talentTypeChange/talentTypeChange_common.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_first.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_common.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 2 - 1
app/enterprise/view/talent_type_change/index.html

@@ -15,7 +15,8 @@
             </div>
             <div class="ibox-content">
                 <div class="row row-lg">
-                    <div class="col-sm-12">
+                    <div class="col-sm-12">                        
+                        <input type="hidden" id="type" value="{$type}"/>
                         <div class="row">
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">

+ 8 - 1
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange.js

@@ -27,8 +27,14 @@ TalentTypeChange.initColumn = function () {
             formatter: function (value, row, index) {
                 if (value == 1) {
                     return "<span class='label'>待提交</span>"
+                } else if (value == 2) {
+                    return "<span class='label label-success'>待总院审核</span>"
                 } else if (value == 10 || value == 5) {
                     return "<span class='label label-danger'>已驳回</span>"
+                } else if (value == 9) {
+                    return "<span class='label label-danger'>初审驳回</span>"
+                } else if (value == 8) {
+                    return "<span class='label label-danger'>总院驳回</span>"
                 } else {
                     if (row.isPublic >= 5) {
                         if (value == -1) {
@@ -117,7 +123,8 @@ TalentTypeChange.openTalentTypeChangeDetail = function () {
     if (this.check()) {
         var ajax = new $ax("/common/batch/checkBatchValid", function (data) {
             if (data.code == 200) {
-                if (TalentTypeChange.seItem.checkState != 1 && TalentTypeChange.seItem.checkState != 10) {
+                var type = $("#type").val();
+                if (TalentTypeChange.seItem.checkState != 1 && !(type != 5 && TalentTypeChange.seItem.checkState == 10) && !(type == 5 && TalentTypeChange.seItem.checkState == 8) && !(type == 5 && TalentTypeChange.seItem.checkState == 9)) {
                     Feng.info("正在审核中,无法修改");
                     return;
                 }

+ 157 - 0
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_common.js

@@ -0,0 +1,157 @@
+/**
+ * 查询表单提交参数对象
+ * @returns {{}}
+ */
+TalentTypeChange.formParams = function () {
+    var queryData = {};
+    queryData['talentName'] = $("#talentName").val();
+    queryData['idCard'] = $("#idCard").val();
+    queryData['enterpriseName'] = $("#enterpriseName").val();
+    queryData['oldTalentArrange'] = $("#oldTalentArrange").val();
+    queryData['newTalentArrange'] = $("#newTalentArrange").val();
+    queryData['checkState'] = $("#checkState").val();
+    queryData['oldIdentifyCondition'] = $("#oldIdentifyCondition").val();
+    queryData['newIdentifyCondition'] = $("#newIdentifyCondition").val();
+    queryData['oldIdentifyMonth'] = $("#oldIdentifyMonth").val();
+    queryData['newIdentifyMonth'] = $("#newIdentifyMonth").val();
+    if ($("#oldIdentifyCondition").val() == null || $("#oldIdentifyCondition").val() == '' || $("#oldIdentifyCondition").val() == "null") {
+        queryData['oldIdentifyCondition'] = "";
+    } else {
+        queryData['oldIdentifyCondition'] = $("#oldIdentifyCondition").val();
+    }
+    if ($("#newIdentifyCondition").val() == null || $("#newIdentifyCondition").val() == '' || $("#newIdentifyCondition").val() == "null") {
+        queryData['newIdentifyCondition'] = "";
+    } else {
+        queryData['newIdentifyCondition'] = $("#newIdentifyCondition").val();
+    }
+    queryData['isPublic'] = $("#isPublic").val();
+    queryData['oldYear'] = $("#oldYear").val();
+    queryData['newYear'] = $("#newYear").val();
+    return queryData;
+}
+
+/**
+ * 重置
+ */
+TalentTypeChange.reset = function () {
+    $("#talentName").val("");
+    $("#idCard").val("");
+    $("#oldTalentArrange").val("").trigger("change");
+    $("#newTalentArrange").val("").trigger("change");
+    $("#checkState").val("");
+    $("#enterpriseName").val("").trigger("chosen:updated");
+    $("#oldIdentifyCondition").val("").trigger("chosen:updated");
+    $("#newIdentifyCondition").val("").trigger("chosen:updated");
+    $("#oldIdentifyMonth").val("");
+    $("#newIdentifyMonth").val("");
+    $("#isPublic").val("");
+    $("#oldYear").val("");
+    $("#newYear").val("");
+}
+
+/**
+ * 查询人才类别变更列表
+ */
+TalentTypeChange.search = function () {
+    TalentTypeChange.table.refresh({query: TalentTypeChange.formParams()});
+};
+
+/**
+ * 显示审核日志
+ */
+TalentTypeChange.showLog = function (id) {
+    layer.open({
+        type: 1,
+        title: "日志",
+        fixed: false,
+        content: '<table id="' + id + '"></table>',
+        area: ['80%', '80%'],
+        maxmin: true,
+        success: function (layero, index) {
+            Feng.getCheckLog(id, {"type": CONFIG.project_levelchange, "mainId": id, "typeFileId": "", "active": 1})
+        }
+    });
+}
+
+/**
+ * 获取人才认定
+ */
+TalentTypeChange.getIdentifyCondition = function (type) {
+    var level = $("#" + type + "TalentArrange").val();
+    if (level == null || level == '') {
+        $("#" + type + "IdentifyCondition").empty();
+        $("#" + type + "IdentifyCondition").trigger('chosen:updated');
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": type + "IdentifyCondition",
+        "displayCode": "id",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level
+    });
+    $("#" + type + "IdentifyCondition").trigger('chosen:updated');
+}
+
+/**
+ * 页面初始化
+ */
+TalentTypeChange.init = function () {
+    //批量加载字典表数据
+    var arr = [
+        {"name": "oldTalentArrange", "code": "talent_arrange"},
+        {"name": "newTalentArrange", "code": "talent_arrange"}];
+    Feng.findChildDictBatch(JSON.stringify(arr));
+    TalentTypeChange.getIdentifyCondition();
+    $("#oldIdentifyCondition,#newIdentifyCondition").on('chosen:ready', function (e, params) {
+        $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
+    });
+    $("#enterpriseName,#oldIdentifyCondition,#newIdentifyCondition").chosen({
+        search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        disable_search: false,
+        width: "100%",
+        enable_split_word_search: true
+    });
+    //批量加载时间控件
+    $(".time").each(function () {
+        laydate.render({
+            elem: "#" + $(this).attr("id")
+            , type: "date"
+            , trigger: 'click'
+        });
+    });
+}
+
+/**
+ * 导出提交
+ */
+TalentTypeChange.export = function (process) {
+    var queryData = TalentTypeChange.formParams();
+    var url = Feng.ctxPath + "/admin/talentTypeChange/commonExport?" +
+            "&talentName=" + queryData.talentName +
+            "&idCard=" + queryData.idCard +
+            "&enterpriseName=" + queryData.enterpriseName +
+            "&oldTalentType=" + queryData.oldTalentType +
+            "&oldTalentArrange=" + queryData.oldTalentArrange +
+            "&newTalentType=" + queryData.newTalentType +
+            "&newTalentArrange=" + queryData.newTalentArrange +
+            "&oldIdentifyCondition=" + queryData.oldIdentifyCondition +
+            "&newIdentifyCondition=" + queryData.newIdentifyCondition +
+            "&oldIdentifyMonth=" + queryData.oldIdentifyMonth +
+            "&newIdentifyMonth=" + queryData.newIdentifyMonth +
+            "&checkState=" + queryData.checkState +
+            "&isPublic=" + queryData.isPublic +
+            "&oldYear=" + queryData.oldYear +
+            "&newYear=" + queryData.newYear +
+            "&process=" + process;
+    window.location.href = encodeURI(encodeURI(url));
+}
+
+/**
+ * 打包下载附件
+ */
+TalentTypeChange.download = function () {
+    if (this.check()) {
+        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=8&id=" + TalentTypeChange.seItem.id));
+    }
+}

+ 506 - 0
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_common_check.js

@@ -0,0 +1,506 @@
+/**
+ * 初始化人才类别变更详情对话框
+ */
+var locked = false;
+var TalentTypeChangeInfoDlg = {
+    talentTypeChangeInfoData: {},
+};
+
+/**
+ * 关闭此对话框
+ */
+TalentTypeChangeInfoDlg.close = function () {
+    parent.layer.close(window.parent.TalentTypeChange.layerIndex);
+}
+
+
+//初始化附件类别表单
+TalentTypeChangeInfoDlg.initFileTable = function () {
+    //Feng.showMiniFileModal(CONFIG.project_levelchange, $("#type").val(), $("#id").val(), $("#newSource").val(), $("#newIdentifyCondition").val(), $("#checkState").val());
+    var queryData = {};
+    queryData['type'] = $("#type").val();
+    queryData['project'] = CONFIG.project_levelchange;
+    queryData["source"] = $("#newSource").val();
+    queryData["talent_condition"] = $("#newIdentifyCondition").val();
+    queryData['checkState'] = $("#checkState").val();
+    queryData['isMix'] = 1;
+    $("#fileTable").bootstrapTable({
+        url: Feng.ctxPath + "/common/api/findCommonFileType",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        escape: true,
+        pagination: false, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        showColumns: false,
+        detailView: true, //是否显示父子表
+        pageList: [10, 30, 50],
+        queryParams: function (params) {
+            return $.extend(queryData, params)
+        },
+        rowStyle: function (row, index) {
+            return {classes: "info"};
+        },
+        columns: TalentTypeChangeInfoDlg.initFileTypeColumn(),
+        onPostBody: function () {
+            $("td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+        },
+        onLoadSuccess: function (data) {
+            $("#fileTable").bootstrapTable('expandAllRows');
+        },
+        onExpandRow: function (index, row, $detail) {
+            var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentFile", function (data) {
+                if (data == null || data.length == 0) {
+                    return;
+                }
+                var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+                for (var key in data) {
+                    var sn = data[key].url.lastIndexOf(".");
+                    var suffix = data[key].url.substring(sn + 1, data[key].url.length);
+                    var imgStr = "";
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
+                    }
+                    html = html + '<li style="display: none">' + data[key].id + '</li>\n' +
+                            '<li style="width: 80%;padding-top: 5px;">' + data[key].orignName + '</li>\n' +
+                            '<li style="width: 10%;">' + imgStr + '</li>\n' +
+                            "<li style='width: 10%;padding-top: 2px;'><button type='button' onclick=\"TalentTypeChangeInfoDlg.downloadFile('" + data[key].id + "')\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button></li>";
+                }
+                html = html + '</ul>';
+                $detail.html(html);
+                $(".imgs").viewer({
+                    // toolbar:false,
+                    fullscreen: false
+                });
+            }, function (data) {
+                Feng.error("查询失败!" + data.responseJSON.message + "!");
+            });
+            var queryData = {};
+            queryData["mainId"] = $("#id").val();
+            queryData["fileTypeId"] = row.id;
+            ajax.set(queryData);
+            ajax.start();
+        }
+    });
+
+}
+/**
+ * 初始化表格的列
+ */
+TalentTypeChangeInfoDlg.initFileTypeColumn = function () {
+    return [
+        {field: 'selectItem', checkbox: false, visible: false},
+        {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "15%", 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                if (row.must == 1) {
+                    return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> ' + value;
+                }
+                if (row.must == 2) {
+                    return '<i class="fa fa-paste"></i>' + value;
+                }
+            }
+        },
+        {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "67%", 'class': 'uitd_showTip'},
+        {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle', width: "8%",
+            formatter: function (value, row, index) {
+                if (value == null || value == '' || value == 'null') {
+                    return '无';
+                }
+                return "<button type='button' onclick=\"TalentTypeChangeInfoDlg.downloadFile('" + value + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
+                        "<i class=\"fa fa-download\"></i>下载" +
+                        "</button>";
+            }
+        },
+    ]
+};
+
+TalentTypeChangeInfoDlg.downloadFile = function (id) {
+    window.location.href = Feng.ctxPath + "/common/api/downloadFile?id=" + id;
+}
+
+/**
+ * 显示审核模态框
+ */
+TalentTypeChangeInfoDlg.showCommonCheckModal = function () {
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/validateIsCheck", function (data) {
+        if (data.code == 200) {
+            layer.open({
+                type: 1,
+                id: "neewFieldFormModel",
+                title: '审核',
+                area: ['800px', '350px'], //宽高
+                fix: false, //不固定
+                shade: 0,
+                maxmin: true,
+                content: TalentTypeChangeInfoDlg.createNoFieldCheckModal(),
+                btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+                btnAlign: 'c',
+                zIndex: layer.zIndex,
+                success: function (layero, index) {
+                    layer.setTop(layero);
+                    $("#commonCheckForm")[0].reset();
+                    var process = $("#process").val();
+                    if (process == 2) {
+                        var html = '<option value=""></option>\n' +
+                                '                            <option value="3">审核通过</option>\n' +
+                                '                            <option value="2">审核驳回</option>';
+                        $("#checkStateModal").empty().append(html);
+                    }
+                    $("#checkStateModal").val(data.checkState);
+                    $("#checkMsg").val(data.checkMsg);
+                },
+                yes: function (index, layero) {
+                    TalentTypeChangeInfoDlg.commonCheck(index);
+                }
+            });
+        } else {
+            Feng.error(data.msg);
+        }
+    }, function (data) {
+        Feng.error("校验失败!" + data.responseJSON.message + "!");
+    });
+    ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
+    ajax.start();
+}
+
+/**
+ * 显示初审审核模态框
+ */
+TalentTypeChangeInfoDlg.showFirstCheckModal = function () {
+    var process = $("#process").val();
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/validateIsCheck", function (data) {
+        if (data.code == 200) {
+            layer.open({
+                type: 1,
+                id: "neewFieldFormModel",
+                title: '审核',
+                area: ['800px', '450px'], //宽高
+                fix: false, //不固定
+                shade: 0,
+                maxmin: true,
+                content: TalentTypeChangeInfoDlg.creatFieldCheckModal(),
+                btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+                btnAlign: 'c',
+                zIndex: layer.zIndex,
+                success: function (layero, index) {
+                    layer.setTop(layero);
+                    var obj = data.data;
+                    var fileList = data.fileList;
+                    var fieldList = data.fieldList;
+                    var html = '';
+                    var html2 = '';
+                    for (var key in fileList) {
+                        html = html + '<ul><li style="width: 100%"><input type="checkbox" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
+                    }
+                    for (var key in fieldList) {
+                        html2 = html2 + '<li style="float:left;margin:0 0 10px 0;width:33%;"><input type="checkbox" value="' + fieldList[key]["key"] + '"><span>' + fieldList[key]["value"] + '</span></li>';
+                    }
+                    $("#field_file").css("overflow", "hidden").empty().append(html);
+                    $("#field_info ul").css("overflow", "hidden").empty().append(html2);
+                    var optionHtml = "";
+                    optionHtml = '<option value="">请选择</option>\n' +
+                            '                            <option value="3">审核通过</option>\n' +
+                            '                            <option value="2">审核驳回</option>\n' +
+                            '                            <option value="-1">审核不通过</option>';
+                    $("#checkStateFirstModal").empty().append(optionHtml);
+                    $("#firstCheckForm")[0].reset();
+                    $("#checkStateFirstModal").val(obj.checkState);
+                    $("#checkStateFirstModal").trigger("change");
+                    $("#checkMsgFirst").val(obj.checkMsg);
+                    if (obj.fields != null && obj.fields != '') {
+                        $("#field_info input").each(function () {
+                            var arr = obj.fields.split(",");
+                            for (var key in arr) {
+                                if ($(this).val() == arr[key]) {
+                                    this.checked = true;
+                                }
+                            }
+                        });
+                    }
+                    if (obj.files != null && obj.files != '') {
+                        $("#field_file input").each(function () {
+                            if (obj.files.indexOf($(this).val()) != -1) {
+                                this.checked = true;
+                            }
+                        });
+                    }
+                },
+                yes: function (index, layero) {
+                    TalentTypeChangeInfoDlg.firstCheck(index);
+                }
+            });
+        } else {
+            Feng.error(data.msg);
+        }
+    }, function (data) {
+        Feng.error("校验失败!" + data.responseJSON.message + "!");
+    });
+    ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
+    ajax.start();
+}
+
+
+TalentTypeChangeInfoDlg.creatFieldCheckModal = function () {
+    var type = $("#type").val();
+    var html = "<form id=\"firstCheckForm\" style=\"margin: 10px;\">\n" +
+            "                    <div class=\"form-group\">\n" +
+            "                        <label for=\"checkState\" class=\"control-label\">审核状态</label>\n" +
+            "                        <select class=\"form-control\" id=\"checkStateFirstModal\" onchange=\"TalentTypeChangeInfoDlg.toggleField()\">\n" +
+            "                            <option value=\"\"></option>\n" +
+            "                            <option value=\"3\">审核通过</option>\n" +
+            "                            <option value=\"2\">审核驳回</option>\n" +
+            "                            <option value=\"-1\">审核不通过</option>\n" +
+            "                        </select>\n" +
+            "                    </div>\n" +
+            "                    <div class=\"form-group\">\n" +
+            "                        <label for=\"checkMsg\" class=\"control-label\">审核意见</label>\n" +
+            "                        <textarea class=\"form-control\" id=\"checkMsgFirst\" rows='6' placeholder=\"审核状态属“审核通过”的,仅代表此步骤已操作完成,不代表用户提交的信息符合认定条件。若不符合认定条件的,请写明不符合原因。\"></textarea>\n" +
+            "                    </div>\n" +
+            "                    <div class=\"form-group\" id=\"field\" style=\"display: none\">\n" +
+            "                        <label for=\"checkMsg\" class=\"control-label\">可修改字段</label>\n" +
+            "                        <div id=\"field_info\">\n" +
+            "                            <ul>\n";
+    if (type == 1) {
+        html = html + "<li style=\"width: 33%\"><input type=\"checkbox\" value=\"newSource\"><span>新申报来源</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newOurCitySource\"><span>新公布入选来源</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newFromCity\"><span>新入选来源县市</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newQzBath\"><span>新入选名单批次</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newTalentArrange\"><span>新人才层次</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newIdentifyCondition\"><span>新认定条件</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newIdentifyGetTime\"><span>新认定条件证书取得时间</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newIdentifyConditionName\"><span>新认定条件名称</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newCertificateStartTime\"><span>新泉州高层次人才证书发证日期</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newCertificateOutTime\"><span>新泉州高层次人才证书的有效期</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newIntroductionMode\"><span>新引进方式</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newGygb\"><span>新是否为我市本级国有股比超过50</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newLetterTime\"><span>新首次来晋行政介绍信时间</span></li>\n";
+    }
+    if (type == 2) {
+        html = html +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newTalentArrange\"><span>新人才层次</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newIdentifyCondition\"><span>新认定条件</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newIdentifyGetTime\"><span>新认定条件证书取得时间</span></li>\n" +
+                "          <li style=\"width: 33%\"><input type=\"checkbox\" value=\"newIdentifyConditionName\"><span>新认定条件名称</span></li>\n";
+    }
+    html = html + "                            </ul>\n" +
+            "                        </div>\n" +
+            "                        <label for=\"checkMsg\" class=\"control-label\">可修改附件</label>\n" +
+            "                        <div id=\"field_file\">\n" +
+            "                        </div>\n" +
+            "                        <div class=\"form-group\" style=\"text-align: center\">\n" +
+            "                            <button type=\"button\" class=\"btn btn-primary\" onclick=\"TalentTypeChangeInfoDlg.checkAll()\">全选</button>\n" +
+            "                            <button type=\"button\" class=\"btn btn-success\" onclick=\"TalentTypeChangeInfoDlg.unCheckAll()\">反选</button>\n" +
+            "                        </div>\n" +
+            "                    </div>\n" +
+            "                </form>";
+    return html;
+}
+
+TalentTypeChangeInfoDlg.createNoFieldCheckModal = function () {
+    return '<form id="commonCheckForm" style="margin: 10px;">\n' +
+            '                    <div class="form-group">\n' +
+            '                        <label for="checkState" class="control-label">审核状态</label>\n' +
+            '                        <select class="form-control" id="checkStateModal" >\n' +
+            '                            <option value=""></option>\n' +
+            '                            <option value="3">审核通过</option>\n' +
+            '                            <option value="2">审核驳回</option>\n' +
+            '                        </select>\n' +
+            '                    </div>\n' +
+            '                    <div class="form-group" style="margin: 10px;">\n' +
+            '                        <label for="checkMsg" class="control-label">审核意见</label>\n' +
+            '                        <textarea class="form-control" id="checkMsg" placeholder="审核状态属“审核通过”的,仅代表此步骤已操作完成,不代表用户提交的信息符合认定条件。若不符合认定条件的,请写明不符合原因。" rows="6"></textarea>\n' +
+            '                    </div>\n' +
+            '                </form>';
+}
+
+
+
+
+
+TalentTypeChangeInfoDlg.toggleDepField = function () {
+    var checkState = $("#checkStateModal").val();
+    var checkMsg = $("#checkMsg").val();
+    if (checkState == 3) {
+        if (checkMsg == null || checkMsg == '') {
+            $("#checkMsg").val("部门审核通过,待复核");
+        }
+    } else {
+        $("#checkMsg").val("");
+    }
+}
+
+
+/**
+ * 显示字段或者隐藏字段选择
+ */
+TalentTypeChangeInfoDlg.toggleField = function () {
+    var checkState = $("#checkStateFirstModal").val();
+    var process = $("#process").val();
+    var source = $("#source").val();
+    var newCertificateOutTime = $("#newCertificateOutTime").val();
+    var checkMsgFirst = $("#checkMsgFirst").val();
+    if (checkState == 2) {
+        $("#checkMsgFirst").val("");
+        $("#field").show();
+    } else if (checkState == 3) {
+        $("#field").hide();
+        $("#field").find("input[type=checkbox]").removeAttr("checked");
+        if (checkMsgFirst == null || checkMsgFirst == '') {
+            $("#checkMsgFirst").val("审核通过,待初审。");
+        }
+    } else if (checkState == 4) {
+        $("#field").hide();
+        $("#field").find("input[type=checkbox]").removeAttr("checked");
+        if (checkMsgFirst == null || checkMsgFirst == '') {
+            $("#checkMsgFirst").val("初审通过,待复核。");
+        }
+    } else if (checkState == -1) {
+        $("#field").hide();
+        $("#checkMsgFirst").val("审核不通过");
+    }
+}
+
+/**
+ * 全选
+ */
+TalentTypeChangeInfoDlg.checkAll = function () {
+    $("#field input").each(function () {
+        this.checked = true;
+    })
+}
+/**
+ * 反选
+ */
+TalentTypeChangeInfoDlg.unCheckAll = function () {
+    $("#field input").each(function () {
+        if (this.checked) {
+            this.checked = false;
+        } else {
+            this.checked = true;
+        }
+    })
+}
+/**
+ * 审核提交
+ */
+TalentTypeChangeInfoDlg.commonCheck = function (i) {
+    var checkState = $("#checkStateModal").val();
+    var checkMsg = $("#checkMsg").val();
+    if (checkState == null || checkState == '') {
+        Feng.info("请选择审核状态");
+        return;
+    }
+    if (checkMsg == null || checkMsg == '') {
+        Feng.info("请填写审核意见");
+        return;
+    }
+    if (locked)
+        return;
+    locked = true;
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/check", function (data) {
+        if (data.code == 200) {
+            Feng.success(data.msg);
+            layer.close(i);
+        } else {
+            Feng.error(data.msg);
+        }
+        locked = false;
+    }, function (data) {
+        Feng.error("提交审核失败!" + data.responseJSON.message + "!");
+        locked = false;
+    });
+    ajax.setData({"id": $("#id").val(), "checkState": checkState, "checkMsg": $("#checkMsg").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
+    ajax.start();
+}
+
+/**
+ * 初审提交
+ */
+TalentTypeChangeInfoDlg.firstCheck = function (i) {
+    var checkState = $("#checkStateFirstModal").val();
+    var checkMsg = $("#checkMsgFirst").val();
+    if (checkState == null || checkState == '') {
+        Feng.info("请选择审核状态");
+        return;
+    }
+    if (checkMsg == null || checkMsg == '') {
+        Feng.info("请填写审核意见");
+        return;
+    }
+    var fields = '';
+    var files = '';
+    $("#field_info li input").each(function (index) {
+        if ($(this).is(":checked")) {
+            fields = fields + $(this).val() + ",";
+        }
+    });
+    $("#field_file li input").each(function (index) {
+        if ($(this).is(":checked")) {
+            files = files + $(this).val() + ",";
+        }
+    });
+    if (locked)
+        return;
+    locked = true;
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/check", function (data) {
+        if (data.code == 200) {
+            layer.close(i);
+            Feng.success(data.msg);
+        } else {
+            Feng.error(data.msg);
+        }
+        locked = false;
+    }, function (data) {
+        Feng.error("提交审核失败!" + data.responseJSON.message + "!")
+        locked = false;
+    });
+    ajax.setData({"id": $("#id").val(), "checkState": checkState, "checkMsg": checkMsg,
+        "process": $("#process").val(), "fields": fields, "files": files})
+    ajax.start();
+}
+
+TalentTypeChangeInfoDlg.submitCheck = function () {
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/submitCheck", function (data) {
+            if (data.code == 200) {
+                Feng.success(data.msg);
+                window.parent.TalentTypeChange.table.refresh();
+                TalentTypeChangeInfoDlg.close();
+            } else {
+                Feng.error(data.msg);
+            }
+        }, function (data) {
+            Feng.error("提交审核失败!" + data.responseJSON.message + "!");
+        });
+        ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()});
+        ajax.start();
+    }
+    Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation);
+}
+
+
+
+TalentTypeChangeInfoDlg.download = function () {
+    window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=8&id=" + $("#id").val()));
+}
+
+$(function () {
+    $("select").each(function () {
+        $(this).val($(this).attr("value"));
+    });
+    Feng.getCheckLog("logTable", {"type": CONFIG.project_levelchange, "mainId": $("#id").val(), "typeFileId": "", "active": 1})
+    TalentTypeChangeInfoDlg.initFileTable();
+});

+ 349 - 0
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_first.js

@@ -0,0 +1,349 @@
+/**
+ * 人才类别变更管理初始化
+ */
+var TalentTypeChange = {
+    id: "TalentTypeChangeTable", //表格id
+    seItem: null, //选中的条目
+    table: null,
+    layerIndex: -1
+};
+
+/**
+ * 初始化表格的列
+ */
+TalentTypeChange.initColumn = function () {
+    return [
+        {field: 'selectItem', radio: true},
+        {title: '原申报年度', field: 'oldYear', visible: true, align: 'center', valign: 'middle', width: '80px'},
+        {title: '医院名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '姓名', field: 'talentName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '原人才层次', field: 'oldTalentArrangeName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '原认定条件', field: 'oldIdentifyConditionCH', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "130px"},
+        {title: '原认定条件名称', field: 'oldIdentifyConditionName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "140px"},
+        {title: '原证书有效期', field: 'oldCertificateStartTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "140px",
+            formatter: function (value, row, index) {
+                return row.oldCertificateStartTime + "至" + row.oldCertificateOutTime
+            }
+        },
+        {title: '原公布入选月份', field: 'oldIdentifyMonth', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '新申报年度', field: 'newYear', visible: true, align: 'center', valign: 'middle', width: '80px'},
+        {title: '新人才层次', field: 'newTalentArrangeName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '新认定条件', field: 'newIdentifyConditionCH', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "140px"},
+        // {title: '新认定条件证书取得时间', field: 'newIdentifyGetTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"140px"},
+        {title: '新认定条件名称', field: 'newIdentifyConditionName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "130px"},
+        // {title: '新公布入选月份', field: 'newIdentifyMonth', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
+        {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
+            formatter: function (value, row, index) {
+                if (value == -1) {
+                    return "<span class='label label-danger'>审核不通过</span>"
+                }
+                if (value == 1) {
+                    return "<span class='label'>待提交</span>"
+                }
+                if (value == 2 || value == 7) {
+                    if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
+                        return "<span class='label label-success'>重新提交</span>"
+                    } else {
+                        if (row.type == 5) {
+                            return "<span class='label label-success'>待上级审核</span>"
+                        } else {
+                            return "<span class='label label-success'>待审核</span>"
+                        }
+                    }
+                }
+                if (value == 20) {
+                    if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
+                        return "<span class='label label-success'>上级驳回</span>"
+                    } else {
+                        return "<span class='label label-success'>待审核</span>"
+                    }
+                }
+                if (value == 8) {
+                    return "<span class='label label-danger'>已驳回</span>"
+                }
+                if (value == 9) {
+                    return "<span class='label label-danger'>上级驳回至分院</span>"
+                }
+                if (value == 10) {
+                    return "<span class='label label-danger'>上级驳回,待重新审核</span>"
+                }
+                if (value == 15 || value >= 25) {
+                    return "<span class='label label-primary'>已通过</span>"
+                }
+            }
+        },
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"TalentTypeChange.showLog('" + value + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
+            }
+        }
+    ];
+};
+
+/**
+ * 检查是否选中
+ */
+TalentTypeChange.check = function () {
+    var selected = $('#' + this.id).bootstrapTable('getSelections');
+    if (selected.length == 0) {
+        Feng.info("请先选中表格中的某一记录!");
+        return false;
+    } else {
+        TalentTypeChange.seItem = selected[0];
+        return true;
+    }
+};
+
+TalentTypeChange.updateFieldsAndFiles = function () {
+    if (this.check()) {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/findFieldsAndFiles?id=" + TalentTypeChange.seItem.id, function (data) {
+            if (data.code == 200) {
+                layer.open({
+                    type: 1,
+                    id: "neewFieldFormModel",
+                    title: '修改',
+                    area: ['800px', '450px'], //宽高
+                    fix: false, //不固定
+                    shade: 0,
+                    maxmin: true,
+                    content: TalentTypeChange.creatFieldCheckModal(data),
+                    btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+                    btnAlign: 'c',
+                    zIndex: layer.zIndex,
+                    success: function (layero, index) {
+                        var html1 = '';
+                        if (typeof data.fieldList != "undefined" && data.fieldList.length > 0) {
+                            for (var key in data.fieldList) {
+                                html1 += '<li style="float:left;margin:0 10px 10px 0;"><input type="checkbox" value="' + data.fieldList[key]["key"] + '"><span>' + data.fieldList[key]["value"] + '</span></li>';
+                            }
+                        }
+
+                        var html2 = '';
+                        for (var key in data.fileList) {
+                            html2 = html2 + '<ul><li style="width: 100%"><input type="checkbox" value="' + data.fileList[key].id + '"><span>' + data.fileList[key].name + '</span></li></ul>';
+                        }
+                        $("#firstCheckForm #field_info ul").css("overflow", "hidden").html(html1);
+                        $("#field_file").css("overflow", "hidden").empty().append(html2);
+                        //$("#field_file").empty().append(html);
+                        if (data.select.fields != null && data.select.fields != '') {
+                            $("#firstCheckForm #field_info li input").each(function () {
+                                if (data.select.fields.indexOf($(this).val()) != -1) {
+                                    this.checked = true;
+                                }
+                            });
+                        }
+                        if (data.select.files != null && data.select.files != '') {
+                            $("#field_file input").each(function () {
+                                if (data.select.files.indexOf($(this).val()) != -1) {
+                                    this.checked = true;
+                                }
+                            });
+                        }
+                    },
+                    yes: function (index, layero) {
+                        var fields = '';
+                        var files = '';
+                        $("#field_info li input").each(function (index) {
+                            if ($(this).is(":checked")) {
+                                fields = fields + $(this).val() + ",";
+                            }
+                        });
+                        $("#field_file li input").each(function (index) {
+                            if ($(this).is(":checked")) {
+                                files = files + $(this).val() + ",";
+                            }
+                        });
+                        if (fields == '' && files == '') {
+                            Feng.info("请选择可修改的字段或附件!");
+                            return;
+                        }
+                        var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/updateFieldsAndFiles", function (data) {
+                            if (data.code == 200) {
+                                layer.close(index);
+                                Feng.success(data.msg);
+                            } else {
+                                Feng.error(data.msg);
+                            }
+                        }, function (data) {
+                            Feng.error("修改失败!" + data.responseJSON.message + "!");
+                        });
+                        ajax.setData({"id": TalentTypeChange.seItem.id, "fields": fields, "files": files})
+                        ajax.start();
+                    }
+                });
+            } else {
+                Feng.error(data.msg);
+            }
+        }, function (data) {
+            Feng.error("查询失败!" + data.responseJSON.message + "!");
+        });
+        ajax.start();
+    }
+}
+
+
+TalentTypeChange.creatFieldCheckModal = function (obj) {
+    var field = obj.type == 1 ? '<li style="width: 33%"><input type="checkbox" value="newSource"><span>新申报来源</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newOurCitySource"><span>新公布入选来源</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newFromCity"><span>新入选来源县市</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newQzBath"><span>新入选名单批次</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newTalentArrange"><span>新人才层次</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newIdentifyCondition"><span>新认定条件</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newIdentifyGetTime"><span>新认定条件证书取得时间</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newIdentifyConditionName"><span>新认定条件名称</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newCertificateStartTime"><span>新泉州高层次人才证书发证日期</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newCertificateOutTime"><span>新泉州高层次人才证书的有效期</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newIntroductionMode"><span>新引进方式</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newGygb"><span>新是否为我市本级国有股比超过50</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newLetterTime"><span>新首次来晋行政介绍信时间</span></li>' :
+            '                                    <li style="width: 33%"><input type="checkbox" value="newTalentArrange"><span>新人才层次</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newIdentifyCondition"><span>新认定条件</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newIdentifyGetTime"><span>新认定条件证书取得时间</span></li>\n' +
+            '                                    <li style="width: 33%"><input type="checkbox" value="newIdentifyConditionName"><span>新认定条件名称</span></li>';
+    return '<form id="firstCheckForm">\n' +
+            '                    <div class="form-group" style="margin: 10px;">\n' +
+            '                        <div id="field">\n' +
+            '                            <label for="checkMsg" class="control-label">可修改字段</label>\n' +
+            '                            <div id="field_info">\n' +
+            '                                <ul>\n' + field +
+            '                                </ul>\n' +
+            '                            </div>\n' +
+            '                            <label for="checkMsg" class="control-label">可修改附件</label>\n' +
+            '                            <div id="field_file">\n' +
+            '                            </div>\n' +
+            '                            <div class="form-group" style="text-align: center">\n' +
+            '                                <button type="button" class="btn btn-primary" onclick="TalentTypeChange.checkAll()">全选</button>\n' +
+            '                                <button type="button" class="btn btn-success" onclick="TalentTypeChange.unCheckAll()">反选</button>\n' +
+            '                            </div>\n' +
+            '                        </div>\n' +
+            '                    </div>\n' +
+            '                </form>';
+}
+
+/**
+ * 全选
+ */
+TalentTypeChange.checkAll = function () {
+    $("#field input").each(function () {
+        this.checked = true;
+    })
+}
+/**
+ * 反选
+ */
+TalentTypeChange.unCheckAll = function () {
+    $("#field input").each(function () {
+        if (this.checked) {
+            this.checked = false;
+        } else {
+            this.checked = true;
+        }
+    })
+}
+
+/**
+ * 点击人才类别审核
+ */
+TalentTypeChange.openTalentTypeChangeCheck = function () {
+    if (this.check()) {
+        var index = layer.open({
+            type: 2,
+            title: '人才类别审核',
+            area: ['800px', '420px'], //宽高
+            fix: false, //不固定
+            maxmin: true,
+            content: Feng.ctxPath + '/enterprise/talentTypeChange/toCheckPage/id/' + TalentTypeChange.seItem.id,
+            btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+            btnAlign: 'c',
+            btn1: function (index, layero) {
+                var obj = layero.find("iframe")[0].contentWindow;
+                obj.TalentTypeChangeInfoDlg.showFirstCheckModal();
+            }, btn2: function (index, layero) {
+                var obj = layero.find("iframe")[0].contentWindow;
+                obj.TalentTypeChangeInfoDlg.submitCheck();
+                return false;
+            }
+        });
+        this.layerIndex = index;
+        layer.full(index);
+    }
+};
+
+/**
+ * 打开查看人才类别变更详情
+ */
+TalentTypeChange.openTalentTypeChangeDetail = function () {
+    if (this.check()) {
+        var index = layer.open({
+            type: 2,
+            title: '人才层次变更详情',
+            area: ['800px', '420px'], //宽高
+            fix: false, //不固定
+            maxmin: true,
+            content: Feng.ctxPath + '/enterprise/talentTypeChange/toSelectPage/id/' + TalentTypeChange.seItem.id,
+        });
+        this.layerIndex = index;
+        layer.full(index);
+    }
+};
+
+
+TalentTypeChange.getPhones = function () {
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/getPhones", function (data) {
+        if (data.code == 200) {
+            layer.open({
+                type: 1,
+                title: "手机号码",
+                area: ['830px', '300px'], //宽高
+                fix: false, //不固定
+                maxmin: true,
+                content: "<span style='word-break:break-all'>" + data.obj + "</span>"
+            });
+        } else {
+            Feng.info(data.msg);
+        }
+    }, function (data) {
+        Feng.error("操作失败!");
+    });
+    ajax.setData(TalentTypeChange.formParams());
+    ajax.start();
+}
+
+
+TalentTypeChange.getEnterprisePhones = function () {
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/talentTypeChange/getEnterprisePhones", function (data) {
+        if (data.code == 200) {
+            layer.open({
+                type: 1,
+                title: "手机号码",
+                area: ['830px', '300px'], //宽高
+                fix: false, //不固定
+                maxmin: true,
+                content: "<span style='word-break:break-all'>" + data.obj + "</span>"
+            });
+        } else {
+            Feng.info(data.msg);
+        }
+    }, function (data) {
+        Feng.error("操作失败!");
+    });
+    ajax.setData(TalentTypeChange.formParams());
+    ajax.start();
+}
+
+
+$(function () {
+    var defaultColunms = TalentTypeChange.initColumn();
+    var table = new BSTable(TalentTypeChange.id, "/enterprise/talentTypeChange/examineList", defaultColunms);
+    table.setPaginationType("server");
+    // table.setHeight(665);
+    table.setOnDblClickRow(function () {
+        TalentTypeChange.openTalentTypeChangeCheck();
+    });
+    TalentTypeChange.table = table.init();
+    TalentTypeChange.init();
+});

+ 17 - 13
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_info.js

@@ -234,15 +234,15 @@ TalentTypeChangeInfoDlg.talentInfoDetail = function () {
         $("#oldIntroductionMode").val(data.import_way);
         $("#oldYear").val(data.apply_year);
         /*if (data.enterpriseType == 1) {
-            var hide = [1, 2];
-            if (data.isMatchZhiren == 1) {
-                hide = [3, 4, 5];
-            }
-            for (var i in hide) {
-                $("#newSource option[value=" + hide[i] + "]").css("display", "none");
-            }
-            //toastr.success("符合晋江市现代产业体系人才补充认定标准的无需填写‘新泉州高层次人才证书发证日期’及‘新泉州高层次人才证书的有效期’。");
-        }*/
+         var hide = [1, 2];
+         if (data.isMatchZhiren == 1) {
+         hide = [3, 4, 5];
+         }
+         for (var i in hide) {
+         $("#newSource option[value=" + hide[i] + "]").css("display", "none");
+         }
+         //toastr.success("符合晋江市现代产业体系人才补充认定标准的无需填写‘新泉州高层次人才证书发证日期’及‘新泉州高层次人才证书的有效期’。");
+         }*/
     }, function (data) {
 
         Feng.error("查询失败!" + data.responseJSON.message + "!");
@@ -556,9 +556,10 @@ TalentTypeChangeInfoDlg.initFileTable = function () {
                 var files = $("#files").val().split(",");
                 var fields = $("#fields").val().split(",");
                 var checkState = $("#checkState").val();
+                var type = $("#type").val();
                 for (var key in data) {
                     var btn = "";
-                    if (checkState != 10 || (checkState == 10 && ((row.isConditionFile == 0 && files.indexOf(row.id.toString()) != -1) || (row.isConditionFile == 1 && (files.indexOf(row.id.toString()) != -1 || fields.indexOf("newIdentifyCondition")))))) {
+                    if (checkState == 1 || (((type != 5 && checkState == 10) || (type == 5 && (checkState == 9 || checkState == 8))) && ((row.isConditionFile == 0 && files.indexOf(row.id.toString()) != -1) || (row.isConditionFile == 1 && (files.indexOf(row.id.toString()) != -1 || fields.indexOf("newIdentifyCondition") != -1))))) {
                         btn = "<button type=\'button\' onclick=\"TalentTypeChangeInfoDlg.checkFile(this,'" + row.fState + "','" + row.id + "','" + data[key].id + "')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
                                 "<i class=\"fa fa-paste\"></i>修改" +
                                 "</button>" +
@@ -702,7 +703,8 @@ TalentTypeChangeInfoDlg.submitToCheck = function () {
  */
 TalentTypeChangeInfoDlg.validateIsEdit = function () {
     var checkState = $("#checkState").val();
-    if (checkState != 1 && checkState != 5 && checkState != 10) {
+    var type = $("#type").val();
+    if (checkState != 1 && checkState != 5 && !(type != 5 && checkState == 10) && !(type == 5 && checkState == 9) && !(type == 5 && checkState == 8)) {
         if (checkState == -1) {
             Feng.error("您的申报审核不通过,无法再修改");
             return false;
@@ -746,11 +748,12 @@ TalentTypeChangeInfoDlg.initFileTypeColumn = function () {
         {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "52%", 'class': 'uitd_showTip'},
         {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "10%",
             formatter: function (value, row, index) {
+                var type = $("#type").val();
                 var checkState = $("#checkState").val();
                 var files = $("#files").val().split(",");
                 var fields = $("#fields").val().split(",");
                 var html = "";
-                if (checkState != 10 || (checkState == 10 && ((row.isConditionFile == 0 && files.indexOf(value.toString()) != -1) || (row.isConditionFile == 1 && (files.indexOf(value.toString()) != -1 || fields.indexOf("newIdentifyCondition")))))) {
+                if (checkState == 1 || (((type != 5 && checkState == 10) || (type == 5 && (checkState == 9 || checkState == 8))) && ((row.isConditionFile == 0 && files.indexOf(value.toString()) != -1) || (row.isConditionFile == 1 && (files.indexOf(value.toString()) != -1 || fields.indexOf("newIdentifyCondition") != -1))))) {
                     html = "<button type='button' onclick=\"TalentTypeChangeInfoDlg.checkFile(this,'" + row.fState + "','" + value + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
                             "<i class=\"fa fa-upload\"></i>上传" +
                             "</button>";
@@ -775,9 +778,10 @@ TalentTypeChangeInfoDlg.downloadFile = function (id, type) {
 
 //设置不可修改的字段
 TalentTypeChangeInfoDlg.setNoChangeField = function () {
+    var type = $("#type").val();
     var checkState = $("#checkState").val();
     var fields = $("#fields").val();
-    if (checkState == 10) {
+    if ((type != 5 && checkState == 10) || (type == 5 && checkState == 8) || (type == 5 && checkState == 9)) {
         $("input").each(function () {
             $(this).attr("readonly", "readonly");
         });

+ 3 - 2
public/static/modular/talentLibrary/talentTypeChange/talentTypeChange_common_check.js

@@ -215,7 +215,8 @@ TalentTypeChangeInfoDlg.showFirstCheckModal = function () {
                         optionHtml = '<option value="">请选择</option>\n' +
                                 '                            <option value="3">审核通过</option>\n' +
                                 (obj.highProcess >= 3 ? '<option value="4">审核通过(跳过部门并审)</option>\n' : "") +
-                                '                            <option value="2">审核驳回</option>\n';
+                                '                            <option value="2">审核驳回</option>\n' +
+                                (obj.type == 5 ? '<option value="-2">驳回到分院</option>' : '');
                     }
                     if (process == 3) {
                         optionHtml = '<option value="">请选择</option>\n' +
@@ -360,7 +361,7 @@ TalentTypeChangeInfoDlg.toggleField = function () {
     var source = $("#source").val();
     var newCertificateOutTime = $("#newCertificateOutTime").val();
     var checkMsgFirst = $("#checkMsgFirst").val();
-    if (checkState == 2) {
+    if (checkState == 2 || checkState == -2) {
         $("#checkMsgFirst").val("");
         $("#field").show();
     } else if (checkState == 3) {

+ 9 - 0
public/static/modular/talentLibrary/talentTypeChange/talentTypeChange_first.js

@@ -42,6 +42,15 @@ TalentTypeChange.initColumn = function () {
                 if (value == 1) {
                     return "<span class='label'>待提交</span>"
                 }
+                if (value == 8) {
+                    return "<span class='label label-danger'>总院驳回到分院</span>"
+                }
+                if (value == 9) {
+                    return "<span class='label label-danger'>已驳回到分院</span>"
+                }
+                if (value == 2) {
+                    return "<span class='label label-success'>待总院审核</span>"
+                }
                 if (value == 7) {
                     if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
                         return "<span class='label label-success'>重新提交</span>"