sugangqiang 1 год назад
Родитель
Сommit
2559557cb8

+ 0 - 9
app/admin/controller/Talent.php

@@ -236,9 +236,6 @@ class Talent extends AdminController {
                 $_assigns = ["medicalCommunities" => $medicalCommunities];
                 $_assigns = ["medicalCommunities" => $medicalCommunities];
                 $assigns = array_merge($assigns, $_assigns);
                 $assigns = array_merge($assigns, $_assigns);
                 break;
                 break;
-            case CommonConst::ENTERPRISE_GJ:
-                $tpl = "/talent/school/fst_verify";
-                break;
         }
         }
         return view($tpl, $assigns);
         return view($tpl, $assigns);
     }
     }
@@ -276,9 +273,6 @@ class Talent extends AdminController {
                 $medicalCommunities = \app\common\api\Nhc::getMedicalCommunityList();
                 $medicalCommunities = \app\common\api\Nhc::getMedicalCommunityList();
                 $newAssigns["medicalCommunities"] = $medicalCommunities;
                 $newAssigns["medicalCommunities"] = $medicalCommunities;
                 break;
                 break;
-            case CommonConst::ENTERPRISE_GJ:
-                //$tpl = "/talent/school/dept_verify";
-                break;
         }
         }
 
 
         return view($tpl, $newAssigns);
         return view($tpl, $newAssigns);
@@ -298,9 +292,6 @@ class Talent extends AdminController {
                 $_assigns = ["medicalCommunities" => $medicalCommunities];
                 $_assigns = ["medicalCommunities" => $medicalCommunities];
                 $assigns = array_merge($assigns, $_assigns);
                 $assigns = array_merge($assigns, $_assigns);
                 break;
                 break;
-            case CommonConst::ENTERPRISE_GJ:
-                $tpl = "/talent/school/re_verify";
-                break;
         }
         }
         return view($tpl, $assigns);
         return view($tpl, $assigns);
     }
     }

+ 250 - 0
app/admin/view/talent/school/talentInfo_common_check.html

@@ -0,0 +1,250 @@
+{extend name="layout/content"}
+{block name="content"}
+<style type="text/css">
+    .spacing {
+        margin-bottom: 10px;
+    }
+    #talentInfoForm label {
+        font-size: 10px;
+    }
+    .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;
+    }
+    .layui-layer-btn .layui-layer-btn1 {
+        border-color: #1E9FFF;
+        background-color: #1E9FFF;
+        color: #fff;
+    }
+    .imgs li{
+        list-style: none;
+        float: left;
+        border: 1px solid #d8d1d1;
+        text-align: center;
+        height: 30px;
+    }
+    .control-label{
+        color: #337ab7;
+    }
+</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">基本信息</a></li>
+                            <li id="fileLi" class=""><a data-toggle="tab" href="#tab-2" onclick="TalentInfoInfoDlg.initICFileTable()"  aria-expanded="false">申报附件</a></li>
+                            <li  class="" style="float: right;">
+                                <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfoInfoDlg.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()">申报信息<span style="color: red;">({$info.apply_year}年度)</span></div>
+                                    <div class="panel-body">
+                                        <form id="talentInfoForm" class="form-horizontal" action="/api/talentInfo/upsert" method="post" enctype="multipart/form-data" target="hiddenIframe">
+                                            <div class="col-sm-12 form-group-sm">
+                                                <input type="hidden" name="id" id="id" value="{$info.id}">
+                                                <input type="hidden" name="type" id="type" value="{$info.enterpriseType}">
+                                                <input type="hidden" name="process" id="process" value="{$info.process}">
+                                                <input type="hidden" name="checkState" id="checkState" value="{$info.checkState}">
+                                                <input type="hidden" name="enterprise_tag" id="enterprise_tag" value="{$info.enterpriseTag}">
+                                                <div class="row">
+                                                    <div class="col-sm-11">
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
+                                                            <input type="text" class="form-control" id="name" name="name" value="{$info.name}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>民族</label>
+                                                            <input class="form-control" id="nation" name="nation" value="{$info.nationName}"/>
+                                                        </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="{$info.card_type}">
+                                                                {eq name="info.card_type" value="1"}<option value="1">身份证</option>{/eq}
+                                                                {eq name="info.card_type" value="2"}<option value="2">通行证</option>{/eq}
+                                                                {eq name="info.card_type" value="3"}<option value="3">护照</option>{/eq}
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>证件号码</span></label>
+                                                            <input type="text" class="form-control" id="card_number" name="card_number" value="{$info.card_number}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>性别</label>
+                                                            <input type="text" class="form-control" value="{eq name='info.sex' value='1'}男{else/}女{/eq}" id="sex"/>
+                                                        </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="{$info.birthday}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
+                                                            <input class="form-control" id="politics" name="politics" value="{$info.politicsName}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
+                                                            <input class="form-control" id="nationality" name="nationality" value="{$info.nationalityName}">
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
+                                                            <input class="form-control" id="provinceCode" name="province" value="{$info.provinceName}{$info.cityName}{$info.countyName}"/>
+                                                        </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="talent_type" name="talent_type" value="{$info.talentTypeName}"/>
+                                                        </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="companyName"  name="companyName" readonly="readonly" value="{$info.enterpriseName}" />
+                                                        </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="position" name="position" value="{$info.position}"/>
+                                                        </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="cur_entry_time" name="cur_entry_time" value="{$info.cur_entry_time}"/>
+                                                        </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="labor_contract_rangetime" name="labor_contract_rangetime" value="{$info.labor_contract_rangetime}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>最高学历</label>
+                                                            <select class="form-control" id="highest_degree" name="highest_degree" value="{$info.highest_degree}">
+                                                                <option value="" selected="true">{$info.highestDegreeName}</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" id="graduate_school" name="graduate_school" value="{$info.graduate_school}"/>
+                                                        </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="major" name="major" value="{$info.major}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing">是否有留学经历</label>
+                                                            <input type="text" class="form-control" id="study_abroad" name="study_abroad" value="{eq name='info.study_abroad' value='2'}否{else/}是{/eq}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4" {if condition="$info['study_abroad'] eq 2 or !$info['study_abroad']"}style="display:none;"{/if}>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>留学院校</label>
+                                                            <input type="text" class="form-control" id="abroad_school" name="abroad_school" value="{$info.abroad_school}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4" {if condition="$info['study_abroad'] eq 2 or !$info['study_abroad']"}style="display:none;"{/if}>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>留学专业</label>
+                                                            <input type="text" class="form-control" id="abroad_major" name="abroad_major" value="{$info.abroad_major}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing">职称</label>
+                                                            <input type="text" class="form-control" id="title" name="title" value="{$info.title}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing">国家职业资格</label>
+                                                            <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$info.pro_qua}"/>
+                                                        </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="phone" name="phone" value="{$info.phone}"/>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing">电子邮箱</label>
+                                                            <input type="text" class="form-control" id="email" name="email" value="{$info.email}"/>
+                                                        </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">
+                                                                <option value="">{$info.talentArrangeName}</option>
+                                                            </select>
+                                                        </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_category" name="talent_arrange_category">
+                                                                <option value="">{$info.talentArrangeCatName}</option>
+                                                            </select>
+                                                        </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>认定条件</label>
+                                                            <select class="form-control" id="talent_condition">
+                                                                <option value="{$info.talent_condition}">{$info.talentConditionName}</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" id="bank" name="bank" value="{$info.bank}" placeholder="XX银行"/>
+                                                        </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="bank_account" name="bank_account" value="{$info.bank_account}"/>
+                                                        </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="bank_number" name="bank_number" value="{$info.bank_number}"/>
+                                                        </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="bankNetwork" name="bank_branch_name" value="{$info.bank_branch_name}" PLACEHOLDER="XX银行XX省XX市XX支行/分行/分理处"/>
+                                                        </div>
+                                                    </div>
+                                                    <div class="col-sm-1">
+                                                        <img id="photoImg" src="{$info.headimgurl|getStoragePath}"  style="height:147px;width:105px;">
+                                                    </div>
+                                                </div>
+                                                <div class="row">
+                                                    <div class="rowGroup col-sm-12">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>教育背景及工作简历</label>
+                                                        <textarea style="overflow: auto;word-break: break-all; " class="form-control" id="education" name="education" rows="2">{$info.education}</textarea>
+                                                    </div>
+                                                </div>
+                                                <div class="row">
+                                                    <div class="rowGroup col-sm-12">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>主要业绩及取得的荣誉</label>
+                                                        <textarea style="overflow: auto;word-break: break-all; " class="form-control" id="experience" name="experience" rows="2">{$info.experience}</textarea>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </form>
+                                    </div>
+                                    <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="font-size: 10px;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 type="text/javascript">
+    document.write('<script src="/static/modular/talentIdentify/talentInfo/talentInfo_common_check.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 13 - 8
app/common/api/DictApi.php

@@ -304,28 +304,33 @@ class DictApi {
     public static function getTalentFields_GJ() {
     public static function getTalentFields_GJ() {
         $dict = [
         $dict = [
             "name" => "姓名",
             "name" => "姓名",
-            "sex" => "性别",
             "nation" => "民族",
             "nation" => "民族",
-            "politics" => "政治面貌",
             "card_type" => "证件类型",
             "card_type" => "证件类型",
             "card_number" => "证件号码",
             "card_number" => "证件号码",
+            "sex" => "性别",
             "birthday" => "出生日期",
             "birthday" => "出生日期",
+            "politics" => "政治面貌",
+            "nationality" => "国籍/地区",
+            "province" => "籍贯省",
+            "city" => "籍贯市",
+            "county" => "籍贯县",
             "talent_type" => "人才类型",
             "talent_type" => "人才类型",
+            "position" => "职务",
+            "cur_entry_time" => "入职时间",
+            "labor_contract_rangetime" => "工作合同起止时间",
             "highest_degree" => "最高学历",
             "highest_degree" => "最高学历",
             "graduate_school" => "毕业院校",
             "graduate_school" => "毕业院校",
             "major" => "专业",
             "major" => "专业",
             "study_abroad" => "是否有留学经历",
             "study_abroad" => "是否有留学经历",
-            "abroad_school" => "留学毕业院校",
+            "abroad_school" => "留学院校",
             "abroad_major" => "留学专业",
             "abroad_major" => "留学专业",
-            "position" => "职务",
-            "cur_entry_time" => "入职时间",
-            "labor_contract_rangetime" => "工作合同起止时间",
             "title" => "职称",
             "title" => "职称",
+            "pro_qua" => "职业资格",
+            "phone" => "手机号码",
+            "email" => "电子邮箱",
             "talent_arrange" => "人才层次",
             "talent_arrange" => "人才层次",
             "talent_arrange_category" => "人才条款",
             "talent_arrange_category" => "人才条款",
             "talent_condition" => "认定条件",
             "talent_condition" => "认定条件",
-            "phone" => "手机号码",
-            "email" => "电子邮箱",
             "bank" => "开户银行",
             "bank" => "开户银行",
             "bank_account" => "银行账号",
             "bank_account" => "银行账号",
             "bank_number" => "银行行号",
             "bank_number" => "银行行号",

+ 1 - 1
app/common/controller/Api.php

@@ -330,7 +330,7 @@ class Api extends BaseController {
                 } else {
                 } else {
                     $where[] = ["isConditionFile", "<>", 1]; //排除人才条件上传文件
                     $where[] = ["isConditionFile", "<>", 1]; //排除人才条件上传文件
                 }
                 }
-                if (($talent_condition && in_array($source, [3, 4, 5])) || $type == \app\common\state\CommonConst::ENTERPRISE_WJ) {
+                if (($talent_condition && in_array($source, [3, 4, 5])) || $type == \app\common\state\CommonConst::ENTERPRISE_WJ || $type == \app\common\state\CommonConst::ENTERPRISE_GJ) {
                     $condition_info = Db::table("new_talent_condition")->findOrEmpty($talent_condition);
                     $condition_info = Db::table("new_talent_condition")->findOrEmpty($talent_condition);
                     if ($condition_info["bindFileTypes"]) {
                     if ($condition_info["bindFileTypes"]) {
                         $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
                         $whr[] = ["id", "in", $condition_info["bindFileTypes"]];

+ 214 - 0
app/enterprise/controller/Talent.php

@@ -621,6 +621,76 @@ class Talent extends EnterpriseController {
         exit;
         exit;
     }
     }
 
 
+    /**
+     * 提交表单:高教
+     */
+    private function submitToCheck_GJ() {
+        $params = $this->request->param();
+        $id = $params["id"];
+        if (!$info = TalentApi::chkIsOwner($id, $this->user["uid"])) {
+            return json(["msg" => "没有对应的人才认定申报信息"]);
+        }
+        if ($info) {
+            $info["real_state"] = TalentLogApi::getLastLog($id, 1)["state"];
+        }
+        $checkState = $info["checkState"];
+        if ($checkState == TalentState::SCND_SAVE) {
+            $field_dict = \app\common\api\DictApi::getTalentFields_GJ();
+
+            $no_empty = ["name", "nation", "card_type", "card_number", "sex", "birthday", "politics", "nationality", "province", "city", "talent_type",
+                "position", "cur_entry_time", "labor_contract_rangetime", "highest_degree", "graduate_school", "major", "study_abroad", "phone",
+                "talent_arrange", "talent_condition",
+                "bank", "bank_account", "bank_number", "bank_branch_name", "experience", "education"];
+            if ($info["study_abroad"] == 1) {
+                $no_empty[] = "abroad_school";
+                $no_empty[] = "abroad_major";
+            }
+            $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)]);
+            }
+
+            $condition_info = Db::table("new_talent_condition")->findOrEmpty($info["talent_condition"]);
+            if ($condition_info["bindFileTypes"]) {
+                $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
+                $whr[] = ["must", "=", 1];
+            }
+
+            $where = [];
+            $where[] = ["project", "=", ProjectState::TALENT];
+            $where[] = ["type", "=", $this->user["type"]];
+            $where[] = ["must", "=", 1];
+            $where[] = ["active", "=", 1];
+            $where[] = ["delete", "=", 0];
+            $where[] = ["isConditionFile", "<>", 1];
+            if ($whr) {
+                $filetypes = Db::table("new_common_filetype")->whereOr([$where, $whr])->select()->toArray();
+            } else {
+                $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()->toArray();
+            $upload_type_counts = count($distinct_filetypes);
+            if ($upload_type_counts != count($ft_ids)) {
+                return json(["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"]);
+            }
+
+            return $this->gjSave($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
      * @param type $info talent_info
@@ -1272,6 +1342,150 @@ class Talent extends EnterpriseController {
         }
         }
     }
     }
 
 
+    private function gjSave($info, \think\Request $request, $checkState) {
+        try {
+            $batch = BatchApi::checkBatchValid(["type" => ProjectState::TALENT, "year" => $info["apply_year"], "first_submit_time" => $info["first_submit_time"]], $this->user["type"]);
+            if ($batch["code"] != 200) {
+                throw new ValidateException($batch["msg"]);
+            }
+            $param = $request->param();
+            validate(TalentInfo::class)->check($param);
+            $id = $param["id"];
+            if ($id) {
+                if (!$info || $info["id"] != $id || $info["enterprise_id"] != $this->user["uid"]) {
+                    throw new ValidateException("没有对应的人才认定申报信息");
+                }
+            }
+            $files = $param["uploadFiles"];
+            $data["headimgurl"] = $info["headimgurl"];
+            if ($request->file()) {
+                $headimg = $request->file("photo");
+                $upload = new \app\common\api\UploadApi();
+                $result = $upload->uploadOne($headimg, "image", "talent/photo");
+                $file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
+                $width = imagesx($file);
+                $height = imagesy($file);
+                //免冠二寸照长宽413:579
+                if ($width * 579 != $height * 413) {
+                    @unlink("storage/" . $result->filepath); //像素不符合,删除上传文件                    
+                    throw new ValidateException("近期免冠半身彩照(二寸)不符合二寸像素标准。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
+                }
+                if ($info && $info["headimgurl"]) {
+                    //如果新照片符合像素要求,则删除旧照片
+                    $old_head_url = "storage/" . $info["headimgurl"];
+                    if (file_exists($old_head_url))
+                        @unlink($old_head_url);
+                }
+                $data["headimgurl"] = $result->filepath;
+            }
+            if (!$data["headimgurl"] && $checkState == TalentState::SCND_SUBMIT)
+                throw new ValidateException("请上传头像。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
+
+            $data["apply_year"] = $batch["batch"];
+
+            $all_valid_keys = ["name", "nation", "card_type", "card_number", "sex", "birthday", "politics", "nationality", "province", "city", "county", "talent_type",
+                "position", "cur_entry_time", "labor_contract_rangetime",
+                "highest_degree", "graduate_school", "major", "study_abroad", "title", "pro_qua", "phone", "email",
+                "talent_arrange", "talent_condition",
+                "bank", "bank_account", "bank_number", "bank_branch_name", "experience", "education"];
+            foreach ($all_valid_keys as $key) {
+                $value = trim($param[$key]);
+                if ($value) {
+                    $data[$key] = $value;
+                }
+            }
+
+            if ($data["study_abroad"] == 1) {
+                $data["abroad_school"] = $param["abroad_school"];
+                $data["abroad_major"] = $param["abroad_major"];
+            }
+            if ($data["study_abroad"] == 2) {
+                $data["abroad_school"] = null;
+                $data["abroad_major"] = null;
+            }
+
+            if ($info["real_state"] == TalentState::FST_VERIFY_REJECT) {
+                //真实状态11是驳回,需要判断什么字段可以提交                
+                $modify_fields = array_filter(explode(",", $info["modify_fields"]));
+                $tmp_data = $data;
+                $data = [];
+                foreach ($modify_fields as $field) {
+                    $data[$field] = $tmp_data[$field];
+                }
+            }
+            $data["checkState"] = $checkState;
+            $data["id"] = $id;
+            $success_msg = "提交成功";
+            $error_msg = "提交失败";
+            if ($checkState == TalentState::SCND_SAVE) {
+                $success_msg = "保存成功";
+                if ($data["id"]) {
+                    //编辑
+                    $data["updateTime"] = date("Y-m-d H:i:s");
+                    TalentModel::update($data);
+                    $last_log = TalentLogApi::getLastLog($data["id"], 1);
+                    if ($last_log["new_state"] != TalentState::SCND_SAVE) {
+                        TalentLogApi::write(1, $data["id"], $checkState, "保存未提交", 1);
+                    } else {
+                        if (!$last_log["companyId"]) {
+                            TalentLogApi::setActive($last_log["id"], 1); //更新修改时间
+                        }
+                    }
+                } else {
+                    //新增
+                    $data["enterprise_id"] = $this->user["uid"];
+                    $data["createTime"] = date("Y-m-d H:i:s");
+                    $id = TalentModel::insertGetId($data);
+                    TalentLogApi::write(1, $id, $checkState, "保存未提交", 1);
+                    $whr = [];
+                    $whr[] = ["fileId", "in", $files];
+                    $upd_checklog["mainId"] = $id;
+                    Db::table("new_talent_checklog")->where($whr)->save($upd_checklog);
+                }
+                $res = ["code" => 200, "msg" => $success_msg, "obj" => ["id" => $id, "checkState" => $checkState]];
+                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                exit();
+            } else if ($checkState == TalentState::SCND_SUBMIT) {
+                if (!$info["first_submit_time"]) {
+                    $data["first_submit_time"] = date("Y-m-d H:i:s");
+                } else {
+                    $data["new_submit_time"] = date("Y-m-d H:i:s");
+                }
+                $data["updateTime"] = date("Y-m-d H:i:s");
+                TalentModel::update($data);
+                TalentLogApi::write(1, $data["id"], $checkState, "确认提交审核", 1);
+                return json(["msg" => $success_msg, "code" => 200]);
+            } else {
+                throw new ValidateException($error_msg);
+            }
+        } catch (ValidateException $e) {
+            if ($checkState == TalentState::SCND_SAVE) {
+                $res = ["msg" => $e->getMessage()];
+                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                exit();
+            } else {
+                return json(["msg" => $e->getMessage()]);
+            }
+        } catch (\think\Exception $e) {
+            $res = ["msg" => "发生预料外错误,请联系管理员处理,错误代码:" . $e->getCode()];
+            $logInfo = [
+                "enterprise_id" => $this->user["uid"],
+                "data" => $data,
+                "controller" => $this->request->controller(),
+                "action" => $this->request->action(),
+                "errCode" => $e->getCode(),
+                "errMsg" => $e->getMessage()
+            ];
+            Log::write($logInfo, "error");
+            if ($checkState == TalentState::SCND_SAVE) {
+                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                exit();
+            } else {
+                return json($res);
+            }
+        }
+    }
+
     public function delete() {
     public function delete() {
         $id = $this->request->param("talentInfoId");
         $id = $this->request->param("talentInfoId");
         $info = Talent::chkIsOwner($id, $this->user["uid"]);
         $info = Talent::chkIsOwner($id, $this->user["uid"]);

+ 52 - 53
app/enterprise/view/talent/school/apply.html

@@ -59,6 +59,11 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$row.name}"/>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$row.name}"/>
                                                         </div>
                                                         </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class="control-label spacing"><span style="color: red">*</span>民族</label>
+                                                            <select class="form-control" id="nation" name="nation" value="{$row.nation}">
+                                                            </select>
+                                                        </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>证件类型</label>
                                                             <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}">
                                                             <select class="form-control" id="card_type" name="card_type" value="{$row.card_type}">
@@ -84,6 +89,11 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
                                                             <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}"/>
                                                             <input type="text" class="form-control date" id="birthday" name="birthday" value="{$row.birthday}"/>
                                                         </div>
                                                         </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
+                                                            <select class="form-control" id="politics" name="politics" value="{$row.politics}">
+                                                            </select>
+                                                        </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
                                                             <select class="form-control" id="nationality" name="nationality" value="{$row.nationality}">
                                                             <select class="form-control" id="nationality" name="nationality" value="{$row.nationality}">
@@ -103,29 +113,25 @@
                                                             <select class="form-control" id="county" name="county" value="{$row.county}"></select>
                                                             <select class="form-control" id="county" name="county" value="{$row.county}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class="control-label spacing"><span style="color: red">*</span>民族</label>
-                                                            <select class="form-control" id="nation" name="nation" value="{$row.nation}">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
+                                                            <select class="form-control" id="talent_type" name="talent_type" value="{$row.talent_type}">
                                                             </select>
                                                             </select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
-                                                            <select class="form-control" id="politics" name="politics" value="{$row.politics}">
-                                                            </select>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>学校名称</label>
+                                                            <input type="text" class="form-control" readonly="readonly" value="{$row.enterprise.name}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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}">
-                                                                <option value="2">否</option>
-                                                                <option value="1">是</option>
-                                                            </select>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>职务</label>
+                                                            <input type="text" class="form-control" id="position" name="position" value="{$row.position}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>手机号码</label>
-                                                            <input type="text" class="form-control" id="phone" name="phone" maxlength="11" value="{$row.phone}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>入职时间</label>
+                                                            <input type="text" class="form-control date" id="cur_entry_time" name="cur_entry_time" value="{$row.cur_entry_time}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>电子邮箱</label>
-                                                            <input type="text" class="form-control" id="email" name="email" value="{$row.email}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>工作合同起止时间</label>
+                                                            <input type="text" class="form-control rangedate" id="labor_contract_rangetime" name="labor_contract_rangetime" value="{$row.labor_contract_rangetime}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>最高学历</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>最高学历</label>
@@ -141,71 +147,64 @@
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class="control-label spacing">是否有留学经历</label>
                                                             <label class="control-label spacing">是否有留学经历</label>
-                                                            <select class="form-control" id="study_abroad" name="study_abroad" value="{$row.study_abroad}">
+                                                            <select class="form-control" id="study_abroad" name="study_abroad" value="{$row.study_abroad}" onchange="TalentInfoInfoDlg.changeStudyAbroad();">
                                                                 <option value="2">否</option>
                                                                 <option value="2">否</option>
                                                                 <option value="1">是</option>
                                                                 <option value="1">是</option>
                                                             </select>
                                                             </select>
                                                         </div>
                                                         </div>
-                                                        <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                                            <input type="text" class="form-control" readonly="readonly" value="{$row.enterprise.name}"/>
+                                                        <div class="rowGroup col-sm-4" {if condition="$row['study_abroad'] eq 2 or !$row['study_abroad']"}style="display:none;"{/if}>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>留学院校</label>
+                                                            <input type="text" class="form-control" id="abroad_school" name="abroad_school" value="{$row.abroad_school}"/>
                                                         </div>
                                                         </div>
-                                                        <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>所属镇街</label>
-                                                            <input type="text" class="form-control" readonly="readonly" value="{$row.enterprise.streetName}"/>
+                                                        <div class="rowGroup col-sm-4" {if condition="$row['study_abroad'] eq 2 or !$row['study_abroad']"}style="display:none;"{/if}>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>留学专业</label>
+                                                            <input type="text" class="form-control" id="abroad_major" name="abroad_major" value="{$row.abroad_major}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>职务</label>
-                                                            <input type="text" class="form-control" id="position" name="position" value="{$row.position}"/>
+                                                            <label class=" control-label spacing">职称</label>
+                                                            <input type="text" class="form-control" id="title" name="title" value="{$row.title}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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="cur_entry_time" name="cur_entry_time" value="{$row.cur_entry_time}"/>
+                                                            <label class=" control-label spacing">国家职业资格</label>
+                                                            <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$row.pro_qua}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>工作合同起止时间</label>
-                                                            <input type="text" class="form-control rangedate" id="labor_contract_rangetime" name="labor_contract_rangetime" value="{$row.labor_contract_rangetime}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>手机号码</label>
+                                                            <input type="text" class="form-control" id="phone" name="phone" maxlength="11" value="{$row.phone}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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()" value="{$row.talent_arrange}"></select>
+                                                            <label class=" control-label spacing">电子邮箱</label>
+                                                            <input type="text" class="form-control" id="email" name="email" value="{$row.email}"/>
                                                         </div>
                                                         </div>
+
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>认定条件</label>
-                                                            <select class="form-control" id="talent_condition" name="talent_condition" value="{$row.talent_condition}"></select>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才层次</label>
+                                                            <select class="form-control" id="talent_arrange" name="talent_arrange" onchange="TalentInfoInfoDlg.getLayerCatdByLayer()" value="{$row.talent_arrange}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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" value="{$row.identifyConditionName}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才条款</label>
+                                                            <select class="form-control" id="talent_arrange_category" name="talent_arrange_category" onchange="TalentInfoInfoDlg.getIdentifyCondition()" value="{$row.talent_arrange_category}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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" value="{$row.identifyGetTime}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>认定条件</label>
+                                                            <select class="form-control" id="talent_condition" name="talent_condition" onchange="TalentInfoInfoDlg.changeIdentifyCondition()" value="{$row.talent_condition}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing">职称</label>
-                                                            <input type="text" class="form-control" id="title" name="title" value="{$row.title}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>开户银行</label>
+                                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank" value="{$row.bank}" placeholder="XX银行"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing">国家职业资格</label>
-                                                            <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$row.pro_qua}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>银行卡号</label>
+                                                            <input type="text" class="form-control" id="bank_account" name="bank_account" value="{$row.bank_account}" onkeyup="value = value.replace(/\s+/g, '')"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>开户银行</label>
-                                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank" value="{$row.bank}" placeholder="XX银行"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>银行行号</label>
+                                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank_number" value="{$row.bank_number}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>开户银行网点</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>开户银行网点</label>
                                                             <input type="text" class="form-control" id="bank_branch_name" name="bank_branch_name" value="{$row.bank_branch_name}" PLACEHOLDER="XX银行XX省XX市XX支行/分行/分理处"/>
                                                             <input type="text" class="form-control" id="bank_branch_name" name="bank_branch_name" value="{$row.bank_branch_name}" PLACEHOLDER="XX银行XX省XX市XX支行/分行/分理处"/>
                                                         </div>
                                                         </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="bank_account" name="bank_account" value="{$row.bank_account}" onkeyup="value = value.replace(/\s+/g, '')"/>
-                                                        </div>
-                                                        <div class="rowGroup col-sm-12">
-                                                            <label class=" control-label spacing">备注</label>
-                                                            <input type="text" class="form-control" id="description" name="description" value="{$row.description}"/>
-                                                        </div>
                                                     </div>
                                                     </div>
                                                     <div class="col-sm-1">
                                                     <div class="col-sm-1">
                                                         <p style="text-align: center;color: red">
                                                         <p style="text-align: center;color: red">
@@ -243,9 +242,9 @@
                                    style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true"
                                    style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true"
                                    data-click-to-select="true">
                                    data-click-to-select="true">
                                 <thead>
                                 <thead>
-                                <tr>
-                                    <th data-field="selectItem" data-checkbox="true"></th>
-                                </tr>
+                                    <tr>
+                                        <th data-field="selectItem" data-checkbox="true"></th>
+                                    </tr>
                                 </thead>
                                 </thead>
                             </table>
                             </table>
                             <label style="padding-top: 15px;color: red">*请根据上传的附件材料,编辑好相应的文件夹名称</label>
                             <label style="padding-top: 15px;color: red">*请根据上传的附件材料,编辑好相应的文件夹名称</label>
@@ -268,7 +267,7 @@
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
 <!--<script src="${ctxPath}/static/modular/gate/talentInfo/talentInfo_ic_info.js"></script>-->
 <!--<script src="${ctxPath}/static/modular/gate/talentInfo/talentInfo_ic_info.js"></script>-->
 <script type="text/javascript">
 <script type="text/javascript">
-    document.write('<script src="/static/modular/gate/talentInfo/talentInfo_ic_info.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/talentInfo/talentInfo_gj_info.js?v=' + (new Date()).getTime() + '"><\/script>');
     document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
     document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 </script>
 {/block}
 {/block}

+ 56 - 57
app/enterprise/view/talent/school/view.html

@@ -45,9 +45,9 @@
                                             <div class="col-sm-12 form-group-sm">                                                
                                             <div class="col-sm-12 form-group-sm">                                                
                                                 <input type="hidden" name="id" id="id" value="{$row.id}">
                                                 <input type="hidden" name="id" id="id" value="{$row.id}">
                                                 <input type="hidden" name="year" id="year" value="{$year}">
                                                 <input type="hidden" name="year" id="year" value="{$year}">
-                                                <input type="hidden" name="enterprise_id" id="enterpriseId" value="{$row.enterpriseId}">
-                                                <input type="hidden" name="enterprise_type" id="type" value="{$row.enterpriseType}">
-                                                <input type="hidden" name="enterprise_tag" id="enterprise_tag" value="{$row.enterpriseTag}">
+                                                <input type="hidden" name="enterprise_id" id="enterpriseId" value="{$row.enterprise.id}">
+                                                <input type="hidden" name="enterprise_type" id="type" value="{$row.enterprise.type}">
+                                                <input type="hidden" name="enterprise_tag" id="enterprise_tag" value="{$row.enterprise.enterpriseTag}">
                                                 <input type="file" name="photo" id="photo" style="display: none">
                                                 <input type="file" name="photo" id="photo" style="display: none">
                                                 <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
                                                 <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
                                                 <input type="hidden" name="realState" id="realState" value="{$row.real_state}">
                                                 <input type="hidden" name="realState" id="realState" value="{$row.real_state}">
@@ -59,6 +59,11 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$row.name}"/>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$row.name}"/>
                                                         </div>
                                                         </div>
+                                                        <div class="rowGroup col-sm-4">
+                                                            <label class="control-label spacing"><span style="color: red">*</span>民族</label>
+                                                            <select class="form-control" id="nation" name="nation" value="{$row.nation}">
+                                                            </select>
+                                                        </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>证件类型</label>
                                                             <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}">
                                                             <select class="form-control" id="card_type" name="card_type" value="{$row.card_type}">
@@ -82,7 +87,12 @@
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
-                                                            <input type="text" class="form-control" id="birthday" name="birthday" value="{$row.birthday}"/>
+                                                            <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="politics" name="politics" value="{$row.politics}">
+                                                            </select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
@@ -103,29 +113,25 @@
                                                             <select class="form-control" id="county" name="county" value="{$row.county}"></select>
                                                             <select class="form-control" id="county" name="county" value="{$row.county}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class="control-label spacing"><span style="color: red">*</span>民族</label>
-                                                            <select class="form-control" id="nation" name="nation" value="{$row.nation}">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
+                                                            <select class="form-control" id="talent_type" name="talent_type" value="{$row.talent_type}">
                                                             </select>
                                                             </select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
-                                                            <select class="form-control" id="politics" name="politics" value="{$row.politics}">
-                                                            </select>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>学校名称</label>
+                                                            <input type="text" class="form-control" readonly="readonly" value="{$row.enterprise.name}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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}">
-                                                                <option value="2">否</option>
-                                                                <option value="1">是</option>
-                                                            </select>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>职务</label>
+                                                            <input type="text" class="form-control" id="position" name="position" value="{$row.position}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>手机号码</label>
-                                                            <input type="text" class="form-control" id="phone" name="phone" maxlength="11" value="{$row.phone}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>入职时间</label>
+                                                            <input type="text" class="form-control date" id="cur_entry_time" name="cur_entry_time" value="{$row.cur_entry_time}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>电子邮箱</label>
-                                                            <input type="text" class="form-control" id="email" name="email" value="{$row.email}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>工作合同起止时间</label>
+                                                            <input type="text" class="form-control rangedate" id="labor_contract_rangetime" name="labor_contract_rangetime" value="{$row.labor_contract_rangetime}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>最高学历</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>最高学历</label>
@@ -146,66 +152,59 @@
                                                                 <option value="1">是</option>
                                                                 <option value="1">是</option>
                                                             </select>
                                                             </select>
                                                         </div>
                                                         </div>
-                                                        <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                                            <input type="text" class="form-control" readonly="readonly" value="{$row.enterpriseName}"/>
+                                                        <div class="rowGroup col-sm-4" {if condition="$row['study_abroad'] eq 2 or !$row['study_abroad']"}style="display:none;"{/if}>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>留学院校</label>
+                                                            <input type="text" class="form-control" id="abroad_school" name="abroad_school" value="{$row.abroad_school}"/>
                                                         </div>
                                                         </div>
-                                                        <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>所属镇街</label>
-                                                            <input type="text" class="form-control" readonly="readonly" value="{$row.streetName}"/>
+                                                        <div class="rowGroup col-sm-4" {if condition="$row['study_abroad'] eq 2 or !$row['study_abroad']"}style="display:none;"{/if}>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>留学专业</label>
+                                                            <input type="text" class="form-control" id="abroad_major" name="abroad_major" value="{$row.abroad_major}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>职务</label>
-                                                            <input type="text" class="form-control" id="position" name="position" value="{$row.position}"/>
+                                                            <label class=" control-label spacing">职称</label>
+                                                            <input type="text" class="form-control" id="title" name="title" value="{$row.title}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>入职时间</label>
-                                                            <input type="text" class="form-control" id="cur_entry_time" name="cur_entry_time" value="{$row.cur_entry_time}"/>
+                                                            <label class=" control-label spacing">国家职业资格</label>
+                                                            <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$row.pro_qua}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>工作合同起止时间</label>
-                                                            <input type="text" class="form-control" id="labor_contract_rangetime" name="labor_contract_rangetime" value="{$row.labor_contract_rangetime}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>手机号码</label>
+                                                            <input type="text" class="form-control" id="phone" name="phone" maxlength="11" value="{$row.phone}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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()" value="{$row.talent_arrange}"></select>
+                                                            <label class=" control-label spacing">电子邮箱</label>
+                                                            <input type="text" class="form-control" id="email" name="email" value="{$row.email}"/>
                                                         </div>
                                                         </div>
+
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>认定条件</label>
-                                                            <select class="form-control" id="talent_condition" name="talent_condition" value="{$row.talent_condition}"></select>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才层次</label>
+                                                            <select class="form-control" id="talent_arrange" name="talent_arrange" onchange="TalentInfoInfoDlg.getLayerCatdByLayer()" value="{$row.talent_arrange}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <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" value="{$row.identifyConditionName}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才条款</label>
+                                                            <select class="form-control" id="talent_arrange_category" name="talent_arrange_category" onchange="TalentInfoInfoDlg.getIdentifyCondition()" value="{$row.talent_arrange_category}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>认定条件取得时间</label>
-                                                            <input type="text" class="form-control" id="identifyGetTime" name="identifyGetTime" value="{$row.identifyGetTime}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>认定条件</label>
+                                                            <select class="form-control" id="talent_condition" name="talent_condition" onchange="TalentInfoInfoDlg.changeIdentifyCondition()" value="{$row.talent_condition}"></select>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing">职称</label>
-                                                            <input type="text" class="form-control" id="title" name="title" value="{$row.title}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>开户银行</label>
+                                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank" value="{$row.bank}" placeholder="XX银行"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing">国家职业资格</label>
-                                                            <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$row.pro_qua}"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>银行卡号</label>
+                                                            <input type="text" class="form-control" id="bank_account" name="bank_account" value="{$row.bank_account}" onkeyup="value = value.replace(/\s+/g, '')"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>开户银行</label>
-                                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank" value="{$row.bank}" placeholder="XX银行"/>
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>银行行号</label>
+                                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank_number" value="{$row.bank_number}"/>
                                                         </div>
                                                         </div>
                                                         <div class="rowGroup col-sm-4">
                                                         <div class="rowGroup col-sm-4">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>开户银行网点</label>
                                                             <label class=" control-label spacing"><span style="color: red">*</span>开户银行网点</label>
                                                             <input type="text" class="form-control" id="bank_branch_name" name="bank_branch_name" value="{$row.bank_branch_name}" PLACEHOLDER="XX银行XX省XX市XX支行/分行/分理处"/>
                                                             <input type="text" class="form-control" id="bank_branch_name" name="bank_branch_name" value="{$row.bank_branch_name}" PLACEHOLDER="XX银行XX省XX市XX支行/分行/分理处"/>
                                                         </div>
                                                         </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="bank_account" name="bank_account" value="{$row.bank_account}"/>
-                                                        </div>
-                                                        <div class="rowGroup col-sm-12">
-                                                            <label class=" control-label spacing">备注</label>
-                                                            <input type="text" class="form-control" id="description" name="description" value="{$row.description}"/>
-                                                        </div>
                                                     </div>
                                                     </div>
                                                     <div class="col-sm-1">
                                                     <div class="col-sm-1">
                                                         <img id="photoImg" {if condition="$row['headimgurl']"} src="{$row.headimgurl|getStoragePath}" {else/} src="/static/img/photo.png" {/if} style="height:147px;width:105px;">                                                        
                                                         <img id="photoImg" {if condition="$row['headimgurl']"} src="{$row.headimgurl|getStoragePath}" {else/} src="/static/img/photo.png" {/if} style="height:147px;width:105px;">                                                        
@@ -240,9 +239,9 @@
                                    style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true"
                                    style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true"
                                    data-click-to-select="true">
                                    data-click-to-select="true">
                                 <thead>
                                 <thead>
-                                <tr>
-                                    <th data-field="selectItem" data-checkbox="true"></th>
-                                </tr>
+                                    <tr>
+                                        <th data-field="selectItem" data-checkbox="true"></th>
+                                    </tr>
                                 </thead>
                                 </thead>
                             </table>
                             </table>
                             <label style="padding-top: 15px;color: red">*请根据上传的附件材料,编辑好相应的文件夹名称</label>
                             <label style="padding-top: 15px;color: red">*请根据上传的附件材料,编辑好相应的文件夹名称</label>
@@ -263,9 +262,9 @@
     </div>
     </div>
 </div>
 </div>
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
-<!--<script src="${ctxPath}/static/modular/gate/talentInfo/talentInfo_ic_info.js"></script>-->
+
 <script type="text/javascript">
 <script type="text/javascript">
-    document.write('<script src="/static/modular/gate/talentInfo/talentInfo_ic_select.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/talentInfo/talentInfo_gj_select.js?v=' + (new Date()).getTime() + '"><\/script>');
     document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
     document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 </script>
 {/block}
 {/block}

+ 1 - 1
public/static/modular/gate/enterprise/hospital/enterprise_edit.js

@@ -77,7 +77,7 @@ Register.enterpriseUserRegister = function () {
         Feng.info("请选择" + enterpriseTypeName + "所在市!");
         Feng.info("请选择" + enterpriseTypeName + "所在市!");
         return;
         return;
     }
     }
-    if ((county == null || county == '') && $("#county option").length > 1 && $("#county option:selected").length == 0) {
+    if ((county == null || county == '') && $("#county option").length > 1 && !$("#county").val()) {
         Feng.info("请选择" + enterpriseTypeName + "所在县\区!");
         Feng.info("请选择" + enterpriseTypeName + "所在县\区!");
         return;
         return;
     }
     }

+ 1 - 1
public/static/modular/gate/enterprise/school/enterprise_edit.js

@@ -64,7 +64,7 @@ Register.enterpriseUserRegister = function () {
         Feng.info("请选择" + enterpriseTypeName + "所在市!");
         Feng.info("请选择" + enterpriseTypeName + "所在市!");
         return;
         return;
     }
     }
-    if ((county == null || county == '') && $("#county option").length > 1 && $("#county option:selected").length == 0) {
+    if ((county == null || county == '') && $("#county option").length > 1 && !$("#county").val()) {
         Feng.info("请选择" + enterpriseTypeName + "所在县\区!");
         Feng.info("请选择" + enterpriseTypeName + "所在县\区!");
         return;
         return;
     }
     }

+ 1 - 1
public/static/modular/gate/talentInfo/new_talentInfo_info.js

@@ -28,7 +28,7 @@ var TalentInfoInfoDlg = {
                 callback: {
                 callback: {
                     message: "户籍县不能为空",
                     message: "户籍县不能为空",
                     callback: function (value, validator) {
                     callback: function (value, validator) {
-                        if ($("#province").val() > 0 && $("#city").val() > 0 && $("#county option").length > 1 && $("#county option:selected").length == 0) {
+                        if ($("#province").val() > 0 && $("#city").val() > 0 && $("#county option").length > 1 && !$("#county").val()) {
                             //当省市都有值时,如果县有列表,必选
                             //当省市都有值时,如果县有列表,必选
                             return false;
                             return false;
                         }
                         }

+ 757 - 0
public/static/modular/gate/talentInfo/talentInfo_gj_info.js

@@ -0,0 +1,757 @@
+/**
+ * 初始化人才认定申报详情对话框
+ */
+var locked = false;
+var TalentInfoInfoDlg = {
+    talentInfoInfoData: {},
+    validateFields: {
+        name: {validators: {notEmpty: {message: '姓名不能为空'}}},
+        nation: {validators: {notEmpty: {message: '民族不能为空'}}},
+        card_type: {validators: {notEmpty: {message: '证件类型不能为空'}}},
+        card_number: {validators: {notEmpty: {message: '证件号码不能为空'}}},
+        sex: {validators: {notEmpty: {message: '性别不能为空'}}},
+        birthday: {validators: {notEmpty: {message: '出生日期不能为空'}}},
+        politics: {validators: {notEmpty: {message: '政治面貌不能为空'}}},
+        nationality: {validators: {notEmpty: {message: '国籍/地区不能为空'}}},
+        province: {validators: {notEmpty: {message: '籍贯省份不能为空'}}},
+        city: {validators: {notEmpty: {message: '籍贯市不能为空'}}},
+        county: {validators: {
+                //notEmpty: {message: '户籍县不能为空'},
+                callback: {
+                    message: "籍贯县不能为空",
+                    callback: function (value, validator) {
+                        if ($("#province").val() > 0 && $("#city").val() > 0 && $("#county option").length > 1 && !$("#county").val()) {
+                            //当省市都有值时,如果县有列表,必选
+                            return false;
+                        }
+                        return true;
+                    }
+                }
+            }
+        },
+        talent_type: {validators: {notEmpty: {message: '人才类型不能为空'}}},
+        position: {validators: {notEmpty: {message: '职务不能为空'}}},
+        cur_entry_time: {validators: {notEmpty: {message: '入职时间不能为空'}}},
+        labor_contract_rangetime: {validators: {notEmpty: {message: '工作合同时间不能为空'}}},
+        highest_degree: {validators: {notEmpty: {message: '最高学历不能为空'}}},
+        graduate_school: {validators: {notEmpty: {message: '毕业学校不能为空'}}},
+        major: {validators: {notEmpty: {message: '专业不能为空'}}},
+        phone: {
+            validators: {
+                notEmpty: {
+                    message: '手机号码不能为空'
+                },
+                regexp: {
+                    regexp: /0?(13|14|15|17|18|19)[0-9]{9}/,
+                    message: "手机号码格式不正确"
+                }
+            }
+        },
+        email: {
+
+            validators: {
+                emailAddress: {
+                    message: "电子邮箱格式不正确"
+                }
+            }
+        },
+        talent_arrange: {validators: {notEmpty: {message: '人才层次不能为空'}}},
+        talent_arrange_category: {validators: {notEmpty: {message: '人才条款不能为空'}}},
+        talent_condition: {validators: {notEmpty: {message: '认定条件不能为空'}}},
+        bank: {
+            validators: {
+                notEmpty: {
+                    message: '开户银行不能为空'
+                },
+                regexp: {
+                    regexp: /^[\u4e00-\u9fa5]*银行$/,
+                    message: "开户银行格式不正确"
+                }
+            }
+        },
+        bank_account: {validators: {notEmpty: {message: '银行卡号不能为空'}}},
+        bank_number: {validators: {notEmpty: {message: '银行行号不能为空'}}},
+        bank_branch_name: {
+            validators: {
+                notEmpty: {
+                    message: '开户银行网点不能为空'
+                },
+                regexp: {
+                    regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*省?[\u4e00-\u9fa5]+市[\u4e00-\u9fa5]*$/,
+                    message: "开户银行格式不正确"
+                }
+            }
+        },
+        experience: {validators: {notEmpty: {message: '主要业绩及取得的荣誉不能为空'}}},
+        education: {validators: {notEmpty: {message: '教育背景及工作简历不能为空'}}}
+    }
+};
+
+/**
+ * 清除数据
+ */
+TalentInfoInfoDlg.clearData = function () {
+    this.talentInfoInfoData = {};
+}
+
+/**
+ * 设置对话框中的数据
+ *
+ * @param key 数据的名称
+ * @param val 数据的具体值
+ */
+TalentInfoInfoDlg.set = function (key, val) {
+    this.talentInfoInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
+    return this;
+}
+
+/**
+ * 设置对话框中的数据
+ *
+ * @param key 数据的名称
+ * @param val 数据的具体值
+ */
+TalentInfoInfoDlg.get = function (key) {
+    return $("#" + key).val();
+}
+
+/**
+ * 关闭此对话框
+ */
+TalentInfoInfoDlg.close = function () {
+    parent.layer.close(window.parent.TalentInfo.layerIndex);
+}
+
+/**
+ * 收集数据
+ */
+TalentInfoInfoDlg.collectData = function () {
+    this
+            .set('id')
+            .set('enterprise_id')
+            .set('type')
+            .set('name')
+            .set('nation')
+            .set('card_number')
+            .set('card_type')
+            .set('sex')
+            .set('birthday')
+            .set('politics')
+            .set('nationality')
+            .set('province')
+            .set('city')
+            .set('county')
+            .set('talent_type')
+            .set('position')
+            .set('cur_entry_time')
+            .set('labor_contract_rangetime')
+            .set('highest_degree')
+            .set('graduate_school')
+            .set('major')
+            .set('study_abroad')
+            .set('abroad_school')
+            .set('abroad_major')
+            .set('title')
+            .set('pro_qua')
+            .set('phone')
+            .set('email')
+            .set('talent_arrange')
+            .set('talent_arrange_category')
+            .set('talent_condition')
+            .set('bank')
+            .set('bank_account')
+            .set('bank_number')
+            .set('bank_branch_name')
+            .set('education')
+            .set('experience');
+    //this.talentInfoInfoData["provinceName"] = $("#province").find("option:selected").text();
+    //this.talentInfoInfoData["cityName"] = $("#city").find("option:selected").text();
+    //this.talentInfoInfoData["countyName"] = $("#county").find("option:selected").text();
+}
+
+/**
+ * 验证数据
+ */
+TalentInfoInfoDlg.validate = function () {
+    $('#talentInfoForm').data("bootstrapValidator").resetForm();
+    $('#talentInfoForm').bootstrapValidator('validate');
+    return $("#talentInfoForm").data('bootstrapValidator').isValid();
+}
+
+
+/**
+ * 提交添加
+ */
+TalentInfoInfoDlg.addSubmit = function () {
+    this.clearData();
+    this.collectData();
+    if (!TalentInfoInfoDlg.validate()) {
+        return;
+    }
+    var id = $('#id').val();
+    if (id != null && id != '') {
+        if (!TalentInfoInfoDlg.validateIsEdit())
+            return;
+    }
+    $("select").each(function () {
+        $(this).removeAttr("disabled");
+    });
+    if (locked) {
+        return;
+    }
+    locked = true;
+    $("#talentInfoForm")[0].submit();
+
+}
+
+//回调
+TalentInfoInfoDlg.infoCallback = function (data) {
+    locked = false;
+    TalentInfoInfoDlg.setNoChangeField();
+    Feng.info(data.msg);
+    if (data.code == 200) {
+        window.parent.TalentInfo.table.refresh();
+        $("#id").val(data.obj.id);
+        $("#fileLi").removeAttr("style");
+        $("#checkState").val(data.obj.checkState);
+    }
+}
+
+/**
+ * 获取人才认定
+ */
+TalentInfoInfoDlg.getIdentifyCondition = function () {
+    $("#talent_condition").html("<option value=''>---请选择---</option>");
+    var level = $("#talent_arrange").val();
+    var cat = $("#talent_arrange_category").val();
+    var id = $('#id').val();
+    if (cat) {
+        Feng.addAjaxSelect({
+            "id": "talent_condition",
+            "displayCode": "id",
+            "displayName": "name",
+            "type": "GET",
+            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat + "/id/" + id
+        });
+    }
+    $("#talent_condition").trigger('chosen:updated');
+}
+
+
+TalentInfoInfoDlg.getLayerCatdByLayer = function () {
+    $("#talent_condition").html("<option value=''>---请选择---</option>");
+
+    var level = $("#talent_arrange").val();
+    Feng.addAjaxSelect({
+        "id": "talent_arrange_category",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/api/getLayerCatsByLayer/level/" + level
+    });
+    $("#talent_condition").trigger("chosen:updated");
+}
+
+TalentInfoInfoDlg.changeIdentifyCondition = function () {
+    if (TalentInfoInfoDlg.initTalentCondtion != $("#talent_condition").val() && $("#talent_condition").val() != "") {
+        $("#fileTable").bootstrapTable("destroy", {});
+        TalentInfoInfoDlg.initFileTable();
+        //$("#fileTable").bootstrapTable("refresh", {});
+        TalentInfoInfoDlg.initTalentCondtion = $("#talent_condition").val();
+    }
+}
+
+TalentInfoInfoDlg.changeStudyAbroad = function () {
+    var is_abroad = $("#study_abroad").val();
+    if (is_abroad == 1) {
+        $("#abroad_school").parent().css("display", "block");
+        $("#abroad_major").parent().css("display", "block");
+        $('#talentInfoForm').bootstrapValidator('addField', "abroad_school", {validators: {notEmpty: {message: '留学毕业院校不能为空'}}});
+        $('#talentInfoForm').bootstrapValidator('addField', "abroad_major", {validators: {notEmpty: {message: '留学专业不能为空'}}});
+    } else {
+        $("#abroad_school").val("").parent().css("display", "none");
+        $("#abroad_major").val("").parent().css("display", "none");
+        $('#talentInfoForm').bootstrapValidator('removeField', "abroad_school");
+        $('#talentInfoForm').bootstrapValidator('removeField', "abroad_major");
+    }
+}
+
+TalentInfoInfoDlg.bankChange = function () {
+    var bank = $("#bank").val();
+    if ($.trim(bank) == '中国工商银行') {
+        $("#bank_number").val('102391050013');
+    } else {
+        $("#bank_number").val('');
+    }
+}
+
+
+/**
+ * 加载市
+ */
+TalentInfoInfoDlg.afterSelectProvince = function () {
+    var province = $("#province").val();
+    $("#city").empty();
+    $("#county").empty();
+    if (province == null || province == '') {
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": "city",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCityByProvinceSelect/code/" + province
+    });
+}
+/**
+ * 加载县
+ */
+TalentInfoInfoDlg.afterSelectCity = function () {
+    var city = $("#city").val();
+    $("#county").empty();
+    if (city == null || city == '') {
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": "county",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCountyByCitySelect/code/" + city
+    });
+}
+//初始化附件类别表单
+TalentInfoInfoDlg.initFileTable = function () {
+    var queryData = {};    
+    queryData['project'] = CONFIG.project_rcrd;
+    queryData['type'] = $("#type").val();
+    queryData["talent_condition"] = $("#talent_condition").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: TalentInfoInfoDlg.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>';
+                var files = $("#files").val();
+                var checkState = $("#checkState").val();
+                var realState = $("#realState").val();
+                for (var key in data) {
+                    var btn = "";
+                    if (Feng.isEmptyStr(checkState) || (checkState == 8 && (realState == 8 || Feng.isEmptyStr(realState))) || (checkState == 11 && realState != 14) || (realState == 11 && files.indexOf(row.id) != -1)) {
+                        btn = "<button type=\'button\' onclick=\"TalentInfoInfoDlg.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>" +
+                                "<button type='button' onclick=\"TalentInfoInfoDlg.deleteFile('" + data[key].id + "','" + row.fState + "')\" class=\"btn btn-xs btn-danger\">" +
+                                "<i class=\"fa fa-times\"></i>删除" +
+                                "</button>";
+                    } else {
+                        btn = "";
+                    }
+                    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;">' + btn + '</li>';
+                }
+                html = html + '</ul>';
+                $detail.html(html);
+                $(".imgs").viewer({fullscreen: false});
+            }, function (data) {
+                Feng.error("查询失败!" + data.responseJSON.message + "!");
+            });
+            var queryData = {};
+            queryData["mainId"] = $("#id").val();
+            queryData["fileTypeId"] = row.id;
+            ajax.set(queryData);
+            ajax.start();
+        }
+    });
+
+}
+
+//校验是否保存基础信息
+TalentInfoInfoDlg.validId = function () {
+    var id = $("#id").val();
+    if (id != null && id != '') {
+        $("#fileLi").removeAttr("style");
+    } else {
+        $("#fileLi").attr("style", "pointer-events: none");
+    }
+}
+//选择附件并显示附件名
+TalentInfoInfoDlg.checkFile = function (content, state, fileTypeId, fileId) {
+    if (!TalentInfoInfoDlg.validateIsEdit())
+        return;
+    $("#upload_file").unbind("change");
+    $("#upload_file").change(function () {
+        if (!Feng.chkFileInvalid(this.files[0], 5, 10))
+            return;
+        TalentInfoInfoDlg.upload(fileTypeId, fileId);
+    });
+    $('#upload_file').val("");
+    $('#upload_file').click();
+}
+//上传附件
+TalentInfoInfoDlg.upload = function (fileTypeId, fileId) {
+    var id = $("#id").val();
+    if (id == null || id == '') {
+        Feng.info("请先添加基本信息并保存后再试");
+        return;
+    }
+    if (!TalentInfoInfoDlg.validateIsEdit())
+        return;
+    if (fileId != null && fileId != 'null') {
+        $("#fileId").val(fileId)
+    } else {
+        $("#fileId").val("");
+    }
+    $("#mainId").val(id);
+    $("#fileTypeId").val(fileTypeId);
+    var index = layer.load(0, {shade: false, time: 0});
+    $("#index").val(index);
+    $("#uploadForm").submit();
+}
+//删除附件
+TalentInfoInfoDlg.deleteFile = function (id, state) {
+    if (!TalentInfoInfoDlg.validateIsEdit())
+        return;
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
+            if (data.code == 200) {
+                Feng.success(data.msg);
+                $("#fileTable").bootstrapTable("refresh", {});
+            } else {
+                Feng.error(data.msg);
+            }
+        }, function (data) {
+            Feng.error("删除失败!" + data.responseJSON.message + "!");
+        });
+        ajax.set("id", id);
+        ajax.set("type", 1);
+        ajax.start();
+    }
+    Feng.confirm("删除后无法恢复,确认删除吗?", operation);
+}
+
+/**
+ * 提交审核
+ */
+TalentInfoInfoDlg.submitToCheck = function () {
+    var id = $("#id").val();
+    if (id == null || id == "") {
+        Feng.info("请先填写基础信息并上传附件");
+        return;
+    }
+    if (!TalentInfoInfoDlg.validateIsEdit())
+        return;
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/talent/submitToCheck", function (data) {
+            if (data.code == 200) {
+                Feng.success(data.msg);
+                // $("#checkState").val(data.obj);
+                window.parent.TalentInfo.table.refresh();
+                TalentInfoInfoDlg.close();
+            } else {
+                Feng.error(data.msg);
+            }
+        }, function (data) {
+            Feng.error("提交审核失败!" + data.responseJSON.message + "!");
+        });
+        ajax.set("id", id);
+        ajax.start();
+    }
+    Feng.confirm("请确认基础信息已核对无误,相应附件已上传,一旦提交,无法修改", operation);
+}
+
+/**
+ * 校验是否可以修改/提交审核
+ */
+TalentInfoInfoDlg.validateIsEdit = function () {
+    var checkState = $("#checkState").val();
+    if (checkState != 0 && checkState != 8) {
+        if (checkState == 16 || checkState == -1 || checkState == -2 || checkState == 7) {
+            Feng.error("您的申报审核不通过,无法再修改");
+            return false;
+        } 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;
+        }
+    }
+    return true;
+}
+
+/**
+ * 初始化表格的列
+ */
+TalentInfoInfoDlg.initFileTypeColumn = function () {
+    return [
+        {field: 'selectItem', checkbox: false, visible: false},
+        {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "30%", '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: '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=\"TalentInfoInfoDlg.downloadFile('" + row.id + "',5)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
+                        "<i class=\"fa fa-download\"></i>下载" +
+                        "</button>";
+            }
+        },
+        {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 files = $("#files").val();
+                var checkState = $("#checkState").val();
+                var realState = $("#realState").val();
+                //if (checkState == 8 || (checkState == 11 && realState != 14) || (realState == 11 && files.indexOf(value) != -1)) {
+                if (Feng.isEmptyStr(checkState) || (checkState == 8 && (realState == 8 || Feng.isEmptyStr(realState))) || (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>";
+                } else {
+                    return "";
+                }
+
+            }
+        }
+    ]
+};
+
+//回调
+TalentInfoInfoDlg.callBack = function (data) {
+    layer.close(data.obj);
+    Feng.info(data.msg);
+    if (data.code == 200) {
+        $("#fileTable").bootstrapTable("refresh", {});
+    }
+}
+TalentInfoInfoDlg.downloadFile = function (id, type) {
+    window.location.href = Feng.ctxPath + "/common/api/downloadFile?id=" + id + "&type=" + type;
+}
+//设置不可修改的字段
+TalentInfoInfoDlg.setNoChangeField = function () {
+    var checkState = $("#checkState").val();
+    var fields = $("#fields").val();
+    var realState = $("#realState").val();
+    if (realState == 11) {
+        $("input,textarea").each(function () {
+            $(this).attr("readonly", "readonly");
+        });
+        $("select,input[type=radio]").each(function () {
+            $(this).attr("disabled", "disabled");
+        });
+        if (fields != null && fields != '') {
+            var arr = fields.split(",");
+            for (var key in arr) {
+                if (arr[key] != "") {
+                    var name = $("#" + arr[key]).prop("tagName");
+                    if (name == 'select' || name == 'SELECT') {
+                        $("#" + arr[key]).removeAttr("disabled");
+                    } else if (name == "input" || name == 'textarea' || name == "INPUT" || name == 'TEXTAREA') {
+                        $("#" + arr[key]).removeAttr("readonly");
+                    } else {
+                        if (typeof name == "undefined") {
+                            $("input[name=" + arr[key] + "]").removeAttr("disabled").removeAttr("readonly");
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+$("#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({
+        feedbackIcons: {
+            valid: 'glyphicon glyphicon-ok',
+            invalid: 'glyphicon glyphicon-remove',
+            validating: 'glyphicon glyphicon-refresh'
+        },
+        container: 'tooltip',
+        group: '.rowGroup',
+        fields: TalentInfoInfoDlg.validateFields,
+        live: 'enabled',
+        message: '该字段不能为空'
+    }).on('error.field.bv', function (e, data) {
+        // Get the tooltip
+        var $parent = data.element.parents('.form-group-sm'),
+                $icon = $parent.find('.form-control-feedback[data-bv-icon-for="' + data.field + '"]'),
+                title = $icon.data('bs.tooltip').getTitle();
+        $icon.tooltip('destroy').tooltip({
+            html: true,
+            placement: 'right',
+            title: title,
+            container: 'body'
+        });
+    });
+    //批量加载字典表数据
+    var arr = [
+        {"name": "nation", "code": "nation"},
+        {"name": "talent_arrange", "code": "talent_arrange"},
+        {"name": "nationality", "code": "nationality"},
+        {"name": "politics", "code": "politics"},
+        {"name": "talent_type", "code": "talent_type"},
+        {"name": "highest_degree", "code": "highest_degree"}];
+    Feng.findChildDictBatch(JSON.stringify(arr));
+    //加载省份
+    Feng.addAjaxSelect({
+        "id": "province",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": "/common/tool/getProvinceSelect"
+    });
+    //批量加载时间控件
+    $(".date").each(function () {
+        laydate.render({
+            elem: this
+            , type: 'date'
+            , trigger: 'click'
+        });
+    });
+    $(".rangedate").each(function () {
+        laydate.render({
+            elem: this,
+            type: "date",
+            range: true,
+            trigger: "click"
+        })
+    })
+    $(".rangemonth").each(function () {
+        laydate.render({
+            elem: this,
+            type: "month",
+            range: true,
+            trigger: "click"
+        })
+    })
+    var id = $("#id").val();
+    if (id != null && id != '') {
+        $("select").each(function () {
+            $(this).val($(this).attr("value")).trigger("change");
+        });
+        Feng.getCheckLog("logTable", {"type": CONFIG.project_rcrd, "mainId": id, "typeFileId": "", "active": 1})
+    }
+    $("#address").val($("#address").attr("value"));
+    $("#province").val($("#province").attr("value"));
+    TalentInfoInfoDlg.afterSelectProvince();
+    $("#city").val($("#city").attr("value"));
+    TalentInfoInfoDlg.afterSelectCity();
+    $("#county").val($("#county").attr("value"));
+    $("#talent_arrange").val($("#talent_arrange").attr("value"));
+    TalentInfoInfoDlg.getIdentifyCondition();
+    $("#talent_arrange").val($("#talent_arrange").attr("value"));
+    $("#talent_condition").val($("#talent_condition").attr("value"));
+    TalentInfoInfoDlg.validId();
+    $("#photo").change(function (e) {
+        var tag = e.target;
+        var file = tag.files[0];
+        var imgSrc;
+        var reader = new FileReader();
+        reader.readAsDataURL(file);
+        reader.onload = function () {
+            imgSrc = this.result;
+            $("#photoImg").attr("src", imgSrc);
+        };
+    });
+    TalentInfoInfoDlg.setNoChangeField();
+    $("#talent_condition").on('chosen:ready', function (e, params) {
+        $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
+    });
+    $("#talent_condition").chosen({
+        no_results_text: "没有找到结果!",
+        width: '100%',
+        search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        disable_search: false,
+        enable_split_word_search: true,
+        rtl: true
+    });
+});
+
+

+ 228 - 0
public/static/modular/gate/talentInfo/talentInfo_gj_select.js

@@ -0,0 +1,228 @@
+/**
+ * 初始化人才认定申报详情对话框
+ */
+var locked = false;
+var TalentInfoInfoDlg = {
+    talentInfoInfoData : {},
+};
+
+
+
+
+/**
+ * 获取人才认定
+ */
+TalentInfoInfoDlg.getIdentifyCondition = function() {
+    var level = $("#talent_arrange").val();
+    var type = $("#type").val();
+    if(level==null||level==''){
+        $("#talent_condition").empty();
+        $("#talent_condition").trigger('chosen:updated');
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": "talent_condition",
+        "displayCode": "id",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level + "&type=" + type
+    });
+    $("#talent_condition").trigger('chosen:updated');
+}
+
+TalentInfoInfoDlg.bankChange = function () {
+    var bank = $("#bank").val();
+    if($.trim(bank)=='中国工商银行'){
+        $("#bank_number").val('102391050013');
+    }else {
+        $("#bank_number").val('');
+    }
+}
+
+
+/**
+ * 加载市
+ */
+TalentInfoInfoDlg.afterSelectProvince = function () {
+    var province = $("#province").val();
+    $("#city").empty();
+    $("#county").empty();
+    if(province==null||province==''){
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": "city",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCityByProvinceSelect/code/" + province
+    });
+}
+/**
+ * 加载县
+ */
+TalentInfoInfoDlg.afterSelectCity = function (){
+    var city = $("#city").val();
+    $("#county").empty();
+    if(city==null||city==''){
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": "county",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCountyByCitySelect/code/" + city
+    });
+}
+//初始化附件类别表单
+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 + "/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: TalentInfoInfoDlg.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>';
+                var files = $("#files").val();
+                var checkState = $("#checkState").val();
+                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';
+                }
+                html = html + '</ul>';
+                $detail.html(html);
+                $(".imgs").viewer({ fullscreen:false});
+            }, function (data) {
+                Feng.error("查询失败!" + data.responseJSON.message + "!");
+            });
+            var queryData = {};
+            queryData["mainId"] = $("#id").val();
+            queryData["fileTypeId"] = row.id;
+            ajax.set(queryData);
+            ajax.start();
+        }
+    });
+
+}
+
+
+/**
+ * 初始化表格的列
+ */
+TalentInfoInfoDlg.initFileTypeColumn = function () {
+    return [
+        {field: 'selectItem', checkbox:false,visible:false},
+        {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:"30%",'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: '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=\"TalentInfoInfoDlg.downloadFile('"+row.id+"',5)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
+                    "<i class=\"fa fa-download\"></i>下载" +
+                    "</button>";
+            }
+        },
+        {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle',width:"52%",'class': 'uitd_showTip'},
+    ]
+};
+
+TalentInfoInfoDlg.downloadFile = function (id,type){
+    window.location.href = Feng.ctxPath + "/common/api/downloadFile?id=" + id + "&type="+type;
+}
+
+$(function() {
+    //批量加载字典表数据
+    var arr = [
+        {"name": "nation", "code": "nation"},
+        {"name": "talent_arrange", "code": "talent_arrange"},
+        {"name": "nationality", "code": "nationality"},
+        {"name": "politics", "code": "politics"},
+        {"name": "highest_degree", "code": "highest_degree"}];
+    Feng.findChildDictBatch(JSON.stringify(arr));
+    //加载省份
+    Feng.addAjaxSelect({
+        "id": "province",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": "/common/tool/getProvinceSelect"
+    });
+    var id = $("#id").val();
+    if(id!=null && id!=''){
+        $("select").each(function () {
+            $(this).val($(this).attr("value")).trigger("change");
+        });
+        Feng.getCheckLog("logTable",{"type":CONFIG.project_rcrd,"mainId":id,"typeFileId":"","active":1})
+    }
+    $("#address").val($("#address").attr("value"));
+    $("#province").val($("#province").attr("value"));
+    TalentInfoInfoDlg.afterSelectProvince();
+    $("#city").val($("#city").attr("value"));
+    TalentInfoInfoDlg.afterSelectCity();
+    $("#county").val($("#county").attr("value"));
+    $("#talent_arrange").val($("#talent_arrange").attr("value"));
+    TalentInfoInfoDlg.getIdentifyCondition();
+    $("#talent_arrange").val($("#talent_arrange").attr("value"));
+    $("#talent_condition").val($("#talent_condition").attr("value"));
+    $("input,select,textarea").not("input[type='hidden']").not("input[type='file']").attr("style","pointer-events: none;background-color: #eee;");
+});
+
+

+ 1 - 1
public/static/modular/gate/talentInfo/talentInfo_ic_info.js

@@ -16,7 +16,7 @@ var TalentInfoInfoDlg = {
                 callback: {
                 callback: {
                     message: "户籍县不能为空",
                     message: "户籍县不能为空",
                     callback: function (value, validator) {
                     callback: function (value, validator) {
-                        if ($("#province").val() > 0 && $("#city").val() > 0 && $("#county option").length > 1 && $("#county option:selected").length == 0) {
+                        if ($("#province").val() > 0 && $("#city").val() > 0 && $("#county option").length > 1 && !$("#county").val()) {
                             //当省市都有值时,如果县有列表,必选
                             //当省市都有值时,如果县有列表,必选
                             return false;
                             return false;
                         }
                         }

+ 1 - 0
public/static/modular/talentIdentify/talentInfo/talentInfo_common_check.js

@@ -186,6 +186,7 @@ TalentInfoInfoDlg.initICFileTable = function () {
     var queryData = {};
     var queryData = {};
     queryData['project'] = CONFIG.project_rcrd;
     queryData['project'] = CONFIG.project_rcrd;
     queryData['type'] = $("#type").val();
     queryData['type'] = $("#type").val();
+    queryData['talent_condition'] = $("#talent_condition").val();
     queryData['checkState'] = $("#checkState").val();
     queryData['checkState'] = $("#checkState").val();
     queryData['isMix'] = 1;
     queryData['isMix'] = 1;
     $("#fileTable").bootstrapTable({
     $("#fileTable").bootstrapTable({