sugangqiang 2 years ago
parent
commit
4d59f5c5f8

+ 39 - 0
app/common/api/DictApi.php

@@ -205,6 +205,45 @@ class DictApi {
         return array_merge($dict1, $dict2);
     }
 
+    public static function getTalentFields_IC() {
+        $dict = [
+            "name" => "姓名",
+            "card_type" => "证件类型",
+            "card_number" => "证件号码",
+            "sex" => "性别",
+            "birthday" => "出生日期",
+            "nationality" => "国籍/地区",
+            "province" => "籍贯省",
+            "city" => "籍贯市",
+            "county" => "籍贯县",
+            "nation" => "民族",
+            "politics" => "政治面貌",
+            "break_faith" => "是否曾被相关主管部门列为失信个人",
+            "phone" => "手机号码",
+            "email" => "电子邮箱",
+            "highest_degree" => "最高学历",
+            "graduate_school" => "毕业院校",
+            "major" => "专业",
+            "study_abroad" => "是否有留学经历",
+            "position" => "职务",
+            "cur_entry_time" => "入职时间",
+            "labor_contract_rangetime" => "工作合同起止时间",
+            "talent_arrange" => "人才层次",
+            "talent_condition" => "认定条件",
+            "identifyConditionName" => "认定条件名称",
+            "identifyGetTime" => "认定条件证书取得时间",
+            "title" => "职称",
+            "pro_qua" => "国家职业资格",
+            "bank" => "开户银行",
+            "bank_branch_name" => "开户银行网点",
+            "bank_account" => "银行账号",
+            "education" => "教育背景及工作简历",
+            "experience" => "主要业绩及取得的荣誉",
+            "description" => "备注"
+        ];
+        return $dict;
+    }
+
     // 1保存未提交 2已提交未审核 3已审核 4驳回 5保存补充材料未提交 6提交补充材料进入初审 7初审通过 8初审驳回 9部门审核通过 10部门审核驳回 11复核通过 12复核驳回 13复核失败
     public static function getCheckLogStepName($state, $step) {
         $stepName = "";

+ 4 - 2
app/common/api/TalentConditionApi.php

@@ -12,11 +12,13 @@ use app\common\model\TalentCondition;
 class TalentConditionApi {
 
     public static function getList($lv, $type, $cat) {
-        $where[] = ["talentLevelCat", "=", $cat];
         $where[] = ["talentLevel", "=", $lv];
         $where[] = ["type", "=", $type];
-        $where[] = ["active", "=", 1];
         $where[] = ["delete", "=", 0];
+        $where[] = ["active", "=", 1];
+        if ($type == 1) {
+            $where[] = ["talentLevelCat", "=", $cat];
+        }
         return TalentCondition::where($where)->select()->toArray();
     }
 

+ 74 - 119
app/enterprise/controller/Talent.php

@@ -64,7 +64,7 @@ class Talent extends EnterpriseController {
         $ep->streetName = $streetList[$ep->street];
         $ep->industryFieldNewName = $industryFieldNew[$ep->industryFieldNew];
         if ($info) {
-            $info["real_state"] = TalentLogApi::getLastLog($id, $type)["state"];
+            $info["real_state"] = TalentLogApi::getLastLog($id, 1)["state"];
         }
         if ($info && in_array($info["checkState"], [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS, TalentState::REVERIFY_PASS, TalentState::REVERIFY_FAIL])) {
             return $this->view($request);
@@ -265,10 +265,19 @@ class Talent extends EnterpriseController {
         exit;
     }
 
+    public function submitToCheck() {
+        switch ($this->user["type"]) {
+            case 1:
+                return $this->submitToCheck_JJRC();
+            case 2:
+                return $this->submitToCheck_IC();
+        }
+    }
+
     /**
-     * 提交表单(新:混合基础信息人才申报信息)
+     * 提交表单(新:混合基础信息人才申报信息)晋江人才
      */
-    public function submitToCheck() {
+    private function submitToCheck_JJRC() {
         $params = $this->request->param();
         $id = $params["id"];
         if (!$info = TalentApi::chkIsOwner($id, $this->user["uid"])) {
@@ -389,6 +398,59 @@ class Talent extends EnterpriseController {
         exit;
     }
 
+    /**
+     * 提交表单(新:混合基础信息人才申报信息)晋江电路
+     */
+    private function submitToCheck_IC() {
+        $params = $this->request->param();
+        $id = $params["id"];
+        if (!$info = TalentApi::chkIsOwner($id, $this->user["uid"])) {
+            return json(["msg" => "没有对应的人才认定申报信息"]);
+        }
+        $checkState = $info["checkState"];
+        if ($checkState == TalentState::SCND_SAVE) {
+            $field_dict = \app\common\api\DictApi::getTalentFields_IC();
+
+            $no_empty = ["name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "county", "nation", "politics", "break_faith",
+                "phone", "email", "highest_degree", "graduate_school", "major", "study_abroad", "position", "cur_entry_time", "labor_contract_rangetime",
+                "talent_arrange", "talent_condition", "identifyConditionName", "identifyGetTime",
+                "bank", "bank_branch_name", "bank_account", "experience", "education"];
+
+            $no_empty = array_filter($no_empty);
+            $return = [];
+            foreach ($no_empty as $key) {
+                if (!$info[$key]) {
+                    $return[] = sprintf("请填写“%s”", $field_dict[$key]);
+                }
+            }
+            if (count($return) > 0) {
+                return json(["msg" => implode("<br>", $return)]);
+            }
+
+            $where = [];
+            $where[] = ["project", "=", 1];
+            $where[] = ["type", "=", $this->user["type"]];
+            $where[] = ["must", "=", 1];
+            $where[] = ["active", "=", 1];
+            $where[] = ["delete", "=", 0];
+            $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
+            $ft_ids = array_column($filetypes, "id");
+            $whr = [];
+            $whr[] = ["typeId", "in", $ft_ids];
+            $whr[] = ["mainId", "=", $id];
+            $distinct_filetypes = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->select();
+            $upload_type_counts = count($distinct_filetypes);
+            if ($upload_type_counts != count($ft_ids)) {
+                return json(["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"]);
+            }
+
+            $this->icSave($info, $this->request, TalentState::SCND_SUBMIT);
+        } else if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, TalentState::BASE_REVERIFY_FAIL, TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL, TalentState::ZX_FAIL, TalentState::ANNOUNCED_REVERIFY_FAIL, TalentState::PUBLISH_FAIL])) {
+            return json(["msg" => "审核失败,不能再提交审核", "code" => 500]);
+        }
+        return json(["msg" => "已提交审核,请耐心等待", "code" => 500]);
+    }
+
     /**
      * 保存表单(旧第二步)
      * @param type $info talent_info
@@ -762,103 +824,18 @@ class Talent extends EnterpriseController {
             if (!$data["headimgurl"] && $checkState == TalentState::SCND_SUBMIT)
                 throw new ValidateException("请上传头像。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
 
-            $where = [];
-            $where[] = ["project", "=", 1];
-            $where[] = ["type", "=", $this->user["type"]];
-            $where[] = ["must", "=", 1];
-            $where[] = ["active", "=", 1];
-            $where[] = ["delete", "=", 0];
-            $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
-
-            $age = 0;
-            if ($param["birthday"]) {
-                $birthday = $param["birthday"];
-                $birthdayYear = substr($birthday, 0, 4);
-                $currentYear = date("Y");
-                $age = $currentYear - $birthdayYear;
-            }
-            $ft_ids = [];
-            $deletes = [];
-            foreach ($filetypes as $ft) {
-                if ($ft["option"]) {
-                    if ($ft["rel"] == "birthday") {
-                        if ($age < $ft["option"]) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    } else {
-                        $selectVal = $param[$ft["rel"]];
-                        $conditions = array_filter(explode(",", $ft["option"]));
-                        if (!in_array($selectVal, $conditions)) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    }
-                }
-                $ft_ids[] = $ft["id"];
-            }
-
             $data["apply_year"] = $batch["batch"];
 
-            $all_valid_keys = ["talent_type", "name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "county", "nation", "politics", "experience", "education",
-                "import_way", "cur_entry_time", "position",
-                "source", "source_batch", "fujian_highcert_pubtime", "fujian_highcert_exptime", "quanzhou_highcert_pubtime", "quanzhou_highcert_exptime", "source_city", "source_county",
-                "talent_arrange", "talent_condition", "highest_degree", "graduate_school", "major", "professional", "bank", "bank_number", "bank_branch_name", "bank_account",
-                "study_abroad", "abroad_school", "abroad_major", "phone", "email", "annual_salary", "pro_qua"];
+            $all_valid_keys = ["name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "county", "nation", "politics", "experience", "education", "break_faith",
+                "phone", "email", "highest_degree", "graduate_school", "major", "study_abroad",
+                "position", "cur_entry_time", "labor_contract_rangetime",
+                "talent_arrange", "talent_condition", "identifyConditionName", "identifyGetTime", "title", "pro_qua",
+                "bank", "bank_branch_name", "bank_account", "description"];
             foreach ($all_valid_keys as $key) {
-                $data[$key] = trim($param[$key]);
-            }
-            if (in_array($data["talent_type"], [1, 2])) {
-                $data["tax_insurance_month"] = $param["tax_insurance_month"];
-                $data["labor_contract_rangetime"] = $param["labor_contract_rangetime"];
-                $data["fst_work_time"] = $param["fst_work_time"];
-                $data['pre_import_type'] = null;
-            } else {
-                $data["tax_insurance_month"] = null;
-                $data["labor_contract_rangetime"] = null;
-                $data["fst_work_time"] = null;
-                $data['pre_import_type'] = $param["pre_import_type"];
-            }
-
-            if ($data["study_abroad"] == 1) {
-                $data["abroad_school"] = $param["abroad_school"];
-                $data["abroad_major"] = $param["abroad_major"];
-            } else {
-                $data["abroad_school"] = null;
-                $data["abroad_major"] = null;
-            }
-            switch ($data["source"]) {
-                case 1:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = null;
-                    break;
-                case 2:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = null;
-                    break;
-                case 3:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = $param["source_city"];
-                    break;
-                case 4:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = $param["source_county"];
-                    break;
-            }
-
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($param["talent_condition"]);
-            if ($condition_info["isSalary"] == 1) {
-                $data["annual_salary"] = $param["annual_salary"];
-            } else {
-                $data["annual_salary"] = null;
+                $value = trim($param[$key]);
+                if ($value) {
+                    $data[$key] = $value;
+                }
             }
 
             if ($info["real_state"] == TalentState::FST_VERIFY_REJECT) {
@@ -904,28 +881,6 @@ class Talent extends EnterpriseController {
             }
 
             if ($id) {
-                if ($deletes) {
-                    //删除多余的附件,一般是选择人才类型留下来的
-                    $whr = [];
-                    $whr[] = ["typeId", "in", $deletes];
-                    $whr[] = ["id", "in", $files];
-                    $_wait_del_files = Db::table("new_talent_file")->where($whr)->select()->toArray();
-                    $_logfileIds[] = [];
-                    foreach ($_wait_del_files as $_del_file) {
-                        $_logfileIds[] = $_del_file["id"];
-                        @unlink("storage/" . $_del_file["url"]);
-                    }
-                    Db::table("new_talent_file")->where($whr)->delete();
-                    if ($_logfileIds) {
-                        $whr = [];
-                        $whr[] = ["fileId", "in", $_logfileIds];
-                        $_upd_checklog["description"] = "删除附件";
-                        $_upd_checklog["updateUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"]);
-                        $_upd_checklog["updateTime"] = date("Y-m-d H:i:s");
-                        Db::table("new_talent_checklog")->where($whr)->save($_upd_checklog);
-                    }
-                }
-
                 $whr = [];
                 $whr[] = ["id", "in", $files];
                 Db::table("new_talent_file")->where($whr)->save(["mainId" => $id]);

+ 4 - 0
app/enterprise/validate/TalentInfo.php

@@ -46,6 +46,8 @@ class TalentInfo extends Validate {
         "bank_number" => "regex:/^\d+$/",
         "bank_branch_name" => "regex:/^[\x{4e00}-\x{9fa5}]+银行[\x{4e00}-\x{9fa5}]+省?[\x{4e00}-\x{9fa5}]+市[\x{4e00}-\x{9fa5}]+$/u",
         "bank_account" => "regex:/^\d+$/",
+        "break_faith" => "between:1,2",
+        "identifyGetTime" => "dateFormat:Y-m-d"
     ];
     protected $message = [
         "name.regex" => "姓名只能是中文",
@@ -76,6 +78,8 @@ class TalentInfo extends Validate {
         "bank_number.regex" => "银行行号只能是数字",
         "bank_branch_name.regex" => "开户银行网点格式应为[XX银行XX省XX市XX行/处]",
         "bank_account.regex" => "银行账号只能是数字",
+        "break_faith.between" => "是否曾被相关主管部门列为失信个人只能在预设列表中选择",
+        "identifyGetTime.dateFormat" => "认定条件证书取得时间必需是有效的日期格式[yyyy-MM-dd]",
     ];
 
     protected function checkUnique($value, $rule, $data = [], $field) {

+ 25 - 25
app/enterprise/view/talent/ic_apply.html

@@ -59,6 +59,19 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$row.name}"/>
                                                         </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>证件类型</label>
+                                                            <select class="form-control" id="card_type" name="card_type" value="{$row.card_type}">
+                                                                <option value="">请选择</option>
+                                                                <option value="1">身份证</option>
+                                                                <option value="2">通行证</option>
+                                                                <option value="3">护照</option>
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>证件号码</label>
+                                                            <input class="form-control" id="card_number" name="card_number" value="{$row.card_number}">
+                                                        </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>性别</label>
                                                             <select class="form-control" id="sex" name="sex" value="{$row.sex}">
@@ -67,6 +80,10 @@
                                                                 <option value="2">女</option>
                                                             </select>
                                                         </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
+                                                            <input type="text" class="form-control date" id="birthday" name="birthday" value="{$row.birthday}"/>
+                                                        </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
                                                             <select class="form-control" id="nationality" name="nationality" value="{$row.nationality}">
@@ -95,23 +112,6 @@
                                                             <select class="form-control" id="politics" name="politics" value="{$row.politics}">
                                                             </select>
                                                         </div>
-                                                        <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
-                                                            <input type="text" class="form-control date" id="birthday" name="birthday" value="{$row.birthday}"/>
-                                                        </div>
-                                                        <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>证件类型</label>
-                                                            <select class="form-control" id="card_type" name="card_type" value="{$row.card_type}">
-                                                                <option value="">请选择</option>
-                                                                <option value="1">身份证</option>
-                                                                <option value="2">通行证</option>
-                                                                <option value="3">护照</option>
-                                                            </select>
-                                                        </div>
-                                                        <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>证件号码</label>
-                                                            <input class="form-control" id="card_number" name="card_number" value="{$row.card_number}">
-                                                        </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>是否曾被相关主管部门列为失信个人</label>
                                                             <select class="form-control" id="break_faith" name="break_faith" value="{$row.break_faith}">
@@ -141,7 +141,7 @@
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class="control-label spacing">是否有留学经历</label>
-                                                            <select class="form-control" id="studyAbroad" name="study_abroad" value="{$row.study_abroad}">
+                                                            <select class="form-control" id="study_abroad" name="study_abroad" value="{$row.study_abroad}">
                                                                 <option value="2">否</option>
                                                                 <option value="1">是</option>
                                                             </select>
@@ -168,27 +168,27 @@
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>人才层次</label>
-                                                            <select class="form-control" id="talent_arrange" name="talent_arrange" onchange="TalentInfoInfoDlg.getIdentifyCondition()"></select>
+                                                            <select class="form-control" id="talent_arrange" name="talent_arrange" onchange="TalentInfoInfoDlg.getIdentifyCondition()" value="{$row.talent_arrange}"></select>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>认定条件</label>
-                                                            <select class="form-control" id="identifyCondition" name="identifyCondition"></select>
+                                                            <select class="form-control" id="talent_condition" name="talent_condition" value="{$row.talent_condition}"></select>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>认定条件名称</label>
-                                                            <input type="text" class="form-control" id="identifyConditionName" name="identifyConditionName"/>
+                                                            <input type="text" class="form-control" id="identifyConditionName" name="identifyConditionName" value="{$row.identifyConditionName}"/>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>认定条件证书取得时间</label>
-                                                            <input type="text" class="form-control date" id="identifyGetTime" name="identifyGetTime"/>
+                                                            <input type="text" class="form-control date" id="identifyGetTime" name="identifyGetTime" value="{$row.identifyGetTime}"/>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing">职称</label>
-                                                            <input type="text" class="form-control" id="title" name="title"/>
+                                                            <input type="text" class="form-control" id="title" name="title" value="{$row.title}"/>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing">国家职业资格</label>
-                                                            <input type="text" class="form-control" id="professionalQualifications" name="professionalQualifications"/>
+                                                            <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$row.pro_qua}"/>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>开户银行</label>
@@ -211,7 +211,7 @@
                                                         <p style="text-align: center;color: red">
                                                             近期免冠半身彩照(两寸)
                                                         </p>
-                                                        <img id="photoImg" {if condition="$row['headimgurl']"} src="{$row.headimgurl|getStoragePath}" {else/} src="/static/img/photo.png" {/if} onclick="$('#photo').click();" style="height:110px;width:76px;">                                                        
+                                                        <img id="photoImg" {if condition="$row['headimgurl']"} src="{$row.headimgurl|getStoragePath}" {else/} src="/static/img/photo.png" {/if} onclick="$('#photo').click();" style="height:147px;width:105px;">                                                        
                                                     </div>
                                                 </div>
                                                 <div class="row">

+ 79 - 58
public/static/modular/gate/talentInfo/talentInfo_ic_info.js

@@ -6,14 +6,14 @@ var TalentInfoInfoDlg = {
     talentInfoInfoData: {},
     validateFields: {
         enterpriseId: {validators: {notEmpty: {message: '所属企业不能为空'}}},
-        companyName: {validators: {notEmpty: {message: '所属企业不能为空'}}},
         type: {validators: {notEmpty: {message: '人才类别不能为空'}}},
         name: {validators: {notEmpty: {message: '姓名不能为空'}}},
         nation: {validators: {notEmpty: {message: '民族不能为空'}}},
-        provinceCode: {validators: {notEmpty: {message: '户籍省份不能为空'}}},
-        cityCode: {validators: {notEmpty: {message: '户籍市不能为空'}}},
+        province: {validators: {notEmpty: {message: '户籍省份不能为空'}}},
+        city: {validators: {notEmpty: {message: '户籍市不能为空'}}},
+        county: {validators: {notEmpty: {message: '户籍县不能为空'}}},
         address: {validators: {notEmpty: {message: '现居地址不能为空'}}},
-        highEducation: {validators: {notEmpty: {message: '最高学历不能为空'}}},
+        highest_degree: {validators: {notEmpty: {message: '最高学历不能为空'}}},
         major: {validators: {notEmpty: {message: '专业不能为空'}}},
         phone: {
             validators: {
@@ -37,12 +37,11 @@ var TalentInfoInfoDlg = {
                 }
             }
         },
-        bank_number: {validators: {notEmpty: {message: '银行账号不能为空'}}},
+        bank_account: {validators: {notEmpty: {message: '银行账号不能为空'}}},
         cur_entry_time: {validators: {notEmpty: {message: '入职时间不能为空'}}},
         labor_contract_rangetime: {validators: {notEmpty: {message: '工作合同时间不能为空'}}},
-        identifyCondition: {validators: {notEmpty: {message: '认定条件不能为空'}}},
+        talent_condition: {validators: {notEmpty: {message: '认定条件不能为空'}}},
         identifyConditionName: {validators: {notEmpty: {message: '认定条件名称不能为空'}}},
-        type: {validators: {notEmpty: {message: '人才类别不能为空'}}},
         card_type: {validators: {notEmpty: {message: '证件类型不能为空'}}},
         card_number: {validators: {notEmpty: {message: '证件号码不能为空'}}},
         sex: {validators: {notEmpty: {message: '性别不能为空'}}},
@@ -80,12 +79,11 @@ var TalentInfoInfoDlg = {
                 }
             }
         },
-        startTime: {validators: {notEmpty: {message: '工作合同开始时间不能为空'}}},
-        talentArrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
+        talent_arrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
         identifyGetTime: {validators: {notEmpty: {message: '认定条件证书取得时间不能为空'}}},
         breakFaith: {validators: {notEmpty: {message: '是否曾被相关主管部门列为失信个人不能为空'}}},
-        mainHonours: {validators: {notEmpty: {message: '主要业绩及取得的荣誉不能为空'}}},
-        educationAndResume: {validators: {notEmpty: {message: '教育背景及工作简历不能为空'}}}
+        experience: {validators: {notEmpty: {message: '主要业绩及取得的荣誉不能为空'}}},
+        education: {validators: {notEmpty: {message: '教育背景及工作简历不能为空'}}}
     }
 };
 
@@ -144,36 +142,35 @@ TalentInfoInfoDlg.collectData = function () {
             .set('birthday')
             .set('address')
             .set('politics')
-            .set('highEducation')
-            .set('graduateSchool')
+            .set('highest_degree')
+            .set('graduate_school')
             .set('major')
-            .set('post')
+            .set('position')
             .set('phone')
             .set('email')
             .set('bank')
-            .set('bankNetwork')
-            .set('bankAccount')
-            .set('bankNumber')
-            .set('entryTime')
-            .set('startTime')
-            .set('endTime')
-            .set('talentArrange')
-            .set('identifyCondition')
+            .set('bank_branch_name')
+            .set('bank_account')
+            .set('bank_number')
+            .set('cur_entry_time')
+            .set('labor_contract_rangetime')
+            .set('talent_arrange')
+            .set('talent_condition')
             .set('identifyGetTime')
             .set('identifyConditionName')
             .set('breakFaith')
-            .set('educationAndResume')
-            .set('mainHonours')
+            .set('education')
+            .set('experience')
             .set('industryField')
             .set('title')
-            .set('professionalQualifications')
-            .set('studyAbroad')
+            .set('pro_qua')
+            .set('study_abroad')
             .set('studyAbroadCountry')
             .set('studyAbroadTime')
             .set('description');
-    this.talentInfoInfoData["provinceName"] = $("#provinceCode").find("option:selected").text();
-    this.talentInfoInfoData["cityName"] = $("#cityCode").find("option:selected").text();
-    this.talentInfoInfoData["countyName"] = $("#countyCode").find("option:selected").text();
+    this.talentInfoInfoData["provinceName"] = $("#province").find("option:selected").text();
+    this.talentInfoInfoData["cityName"] = $("#city").find("option:selected").text();
+    this.talentInfoInfoData["countyName"] = $("#county").find("option:selected").text();
 }
 
 /**
@@ -196,11 +193,6 @@ TalentInfoInfoDlg.addSubmit = function () {
         return;
     }
     var id = $('#id').val();
-    $("#provinceName").val($("#provinceCode").find("option:selected").text());
-    $("#cityName").val($("#cityCode").find("option:selected").text());
-    if ($("#countyCode").val() != null && $("#countyCode").val() != '') {
-        $("#countyName").val($("#countyCode").find("option:selected").text());
-    }
     if (id != null && id != '') {
         if (!TalentInfoInfoDlg.validateIsEdit())
             return;
@@ -237,8 +229,8 @@ TalentInfoInfoDlg.getIdentifyCondition = function () {
     var level = $("#talent_arrange").val();
     var type = $("#type").val();
     if (level == null || level == '') {
-        $("#identifyCondition").empty();
-        $("#identifyCondition").trigger('chosen:updated');
+        $("#talent_condition").empty();
+        $("#talent_condition").trigger('chosen:updated');
         return;
     }
     if (type == null || type == '') {
@@ -246,21 +238,21 @@ TalentInfoInfoDlg.getIdentifyCondition = function () {
         return;
     }
     Feng.addAjaxSelect({
-        "id": "identifyCondition",
+        "id": "talent_condition",
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/common/findIdentifyConditionByLevel?talentLevel=" + level + "&type=" + type
+        "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level + "&type=" + type
     });
-    $("#identifyCondition").trigger('chosen:updated');
+    $("#talent_condition").trigger('chosen:updated');
 }
 
 TalentInfoInfoDlg.bankChange = function () {
     var bank = $("#bank").val();
     if ($.trim(bank) == '中国工商银行') {
-        $("#bankNumber").val('102391050013');
+        $("#bank_number").val('102391050013');
     } else {
-        $("#bankNumber").val('');
+        $("#bank_number").val('');
     }
 }
 
@@ -305,8 +297,10 @@ TalentInfoInfoDlg.initFileTable = function () {
     var queryData = {};
     queryData['project'] = CONFIG.project_rcrd;
     queryData['type'] = $("#type").val();
+    queryData['checkState'] = $("#checkState").val();
+    queryData['isMix'] = 1;
     $("#fileTable").bootstrapTable({
-        url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType",
+        url: Feng.ctxPath + "/common/api/findCommonFileType",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
         search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
@@ -339,7 +333,7 @@ TalentInfoInfoDlg.initFileTable = function () {
             $("#fileTable").bootstrapTable('expandAllRows');
         },
         onExpandRow: function (index, row, $detail) {
-            var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/listTalentFile", function (data) {
+            var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentFile", function (data) {
                 if (data == null || data.length == 0) {
                     return;
                 }
@@ -434,7 +428,7 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
     if (!TalentInfoInfoDlg.validateIsEdit())
         return;
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/deleteFile", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
             if (data.code = 200) {
                 Feng.success(data.msg);
                 $("#fileTable").bootstrapTable("refresh", {});
@@ -463,7 +457,7 @@ TalentInfoInfoDlg.submitToCheck = function () {
     if (!TalentInfoInfoDlg.validateIsEdit())
         return;
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/submitToCheck", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talent/submitToCheck", function (data) {
             if (data.code == 200) {
                 Feng.success(data.msg);
                 // $("#checkState").val(data.obj);
@@ -486,13 +480,19 @@ TalentInfoInfoDlg.submitToCheck = function () {
  */
 TalentInfoInfoDlg.validateIsEdit = function () {
     var checkState = $("#checkState").val();
-    if (checkState != 1 && checkState != 5 && checkState != 10) {
-        if (checkState == -1) {
+    if (checkState != 0 && checkState != 8) {
+        if (checkState == 16 || checkState == -1 || checkState == -2 || checkState == 7) {
             Feng.error("您的申报审核不通过,无法再修改");
             return false;
-        } else if (checkState >= 35) {
+        } else if (checkState == 28) {
+            Feng.error("申报已完成");
+            return false;
+        } else if (checkState == 14) {
             Feng.error("您的申报已审核通过,无法再修改");
             return false;
+        } else if (checkState == 22 || checkState == 25 || checkState == 27) {
+            Feng.error("该申报已终止");
+            return false;
         } else {
             Feng.error("您的申报正在审核中,请耐心等待");
             return false;
@@ -532,7 +532,8 @@ TalentInfoInfoDlg.initFileTypeColumn = function () {
             formatter: function (value, row, index) {
                 var files = $("#files").val();
                 var checkState = $("#checkState").val();
-                if (checkState != 10 || files.indexOf(value) != -1) {
+                var realState = $("#realState").val();
+                if (checkState == 8 || (checkState == 11 && realState != 14) || (realState == 11 && files.indexOf(value) != -1)) {
                     return "<button type='button' onclick=\"TalentInfoInfoDlg.checkFile(this,'" + row.fState + "','" + value + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
                             "<i class=\"fa fa-upload\"></i>上传" +
                             "</button>";
@@ -581,6 +582,29 @@ TalentInfoInfoDlg.setNoChangeField = function () {
         }
     }
 }
+$("#card_type").change(function () {
+    async_padding($("#card_number").val().trim(), $(this).val());
+})
+$("#card_number").blur(function () {
+    async_padding($(this).val().trim(), $("#card_type").val());
+})
+function async_padding(card_number, card_type) {
+    if (card_number != "" && card_number.length == 18 && card_type == "1") {
+        var year = card_number.substring(6, 10);
+        var month = card_number.substring(10, 12);
+        var day = card_number.substring(12, 14);
+        var birthday = year + "-" + month + "-" + day;
+        var rule = /\d{4}-\d{2}-\d{2}/;
+        if (rule.test(birthday))
+            $("#birthday").val(birthday);
+        var num = card_number.substring(17, 1);
+        if (num % 2 == 0) {
+            $("#sex").val(2);
+        } else {
+            $("#sex").val(1);
+        }
+    }
+}
 
 $(function () {
     $('#talentInfoForm').bootstrapValidator({
@@ -611,11 +635,8 @@ $(function () {
         {"name": "nation", "code": "nation"},
         {"name": "talent_arrange", "code": "talent_arrange"},
         {"name": "nationality", "code": "nationality"},
-        {"name": "talentType", "code": "un_jbt_talentType"},
         {"name": "politics", "code": "politics"},
-        {"name": "highest_degree", "code": "highest_degree"},
-        {"name": "introductionMode", "code": "un_introduction_mode"},
-        {"name": "industryField", "code": "un_industryField"}];
+        {"name": "highest_degree", "code": "highest_degree"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
     //加载省份
     Feng.addAjaxSelect({
@@ -662,10 +683,10 @@ $(function () {
     $("#city").val($("#city").attr("value"));
     TalentInfoInfoDlg.afterSelectCity();
     $("#county").val($("#county").attr("value"));
-    $("#talentArrange").val($("#talentArrange").attr("value"));
+    $("#talent_arrange").val($("#talent_arrange").attr("value"));
     TalentInfoInfoDlg.getIdentifyCondition();
-    $("#talentArrange").val($("#talentArrange").attr("value"));
-    $("#identifyCondition").val($("#identifyCondition").attr("value"));
+    $("#talent_arrange").val($("#talent_arrange").attr("value"));
+    $("#talent_condition").val($("#talent_condition").attr("value"));
     TalentInfoInfoDlg.validId();
     $("#photo").change(function (e) {
         var tag = e.target;
@@ -679,10 +700,10 @@ $(function () {
         };
     });
     TalentInfoInfoDlg.setNoChangeField();
-    $("#identifyCondition").on('chosen:ready', function (e, params) {
+    $("#talent_condition").on('chosen:ready', function (e, params) {
         $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
     });
-    $("#identifyCondition").chosen({
+    $("#talent_condition").chosen({
         no_results_text: "没有找到结果!",
         width: '100%',
         search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配