소스 검색

commit

Signed-off-by: sugangqiang <sugangqiang@foxmail.com>
sugangqiang 2 년 전
부모
커밋
a030beb69d

+ 60 - 51
app/admin/controller/Talent.php

@@ -21,7 +21,7 @@ class Talent extends AdminController {
         $params = $request->param();
         $id = $params["id"];
         $info = VerifyApi::getTalentInfoById($id);
-        if ($info["checkState"] == 3) {
+        if ($info["checkState"] == 2) {
             return view("talentInfo_base_check", ["info" => $info]);
         } else {
             return view("talentInfo_common_check", ["info" => $info]);
@@ -135,7 +135,7 @@ class Talent extends AdminController {
      * @auth {{/talentInfo/gotoIndex/4}}
      */
     public function pre_list() {
-        $this->common_verify(4);
+        return view();
     }
 
     /**
@@ -303,7 +303,22 @@ class Talent extends AdminController {
      * @return type json
      */
     private function fstSubmitCheck($talent_info) {
-        return $this->commonSubmitCheck($talent_info, 2);
+        $nowProcess = 2;
+        $log = TalentLogApi::getLastLog($talent_info["id"], 1);
+        if (!$log || $log["active"] == 1)
+            return json(["msg" => "日志数据异常,审核失败"]);
+        if (in_array($log["new_state"], [TalentState::BASE_VERIFY_PASS, TalentState::FST_VERIFY_PASS, TalentState::REVERIFY_PASS])) {
+            $data["highProcess"] = $nowProcess > $talent_info["highProcess"] ? $nowProcess : $talent_info["highProcess"];
+        }
+        $data["id"] = $talent_info["id"];
+        $data["checkState"] = $log["new_state"];
+        $data["first_dept_check_time"] = date("Y-m-d H:i:s");
+        TalentModel::update($data);
+        TalentLogApi::setActive($log["id"], 1);
+        $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
+        $companyIds = array_filter(explode(",", $condition["companyIds"]));
+        TalentLogApi::writeDeptLogs($talent_info["id"], $companyIds, TalentState::FST_VERIFY_PASS);
+        return json(["code" => 200, "msg" => "审核成功"]);
     }
 
     /**
@@ -316,40 +331,26 @@ class Talent extends AdminController {
         $params = $request->param();
         if ($params["checkState"] == 3) {
             //审核成功
-            $log_checkState = $checkState = TalentState::DEPT_VERIFY_PASS; //初审成功
+            $log_checkState = TalentState::FST_VERIFY_PASS; //当前状态不变
+            $checkState = TalentState::DEPT_VERIFY_PASS; //审核成功
         } else {
             //审核驳回并记录需要修改的字段和上传文件
             $checkState = TalentState::SCND_SUBMIT; //退回待初审
-            $log_checkState = TalentState::DEPT_VERIFY_REJECT; //日志记录拒绝状态
+            $log_checkState = TalentState::FST_VERIFY_PASS; //当前状态不变
         }
 
         $fst_dept_check_time = $talent_info["first_dept_check_time"];
-        if (!$fst_dept_check_time) {
-            //第一次部门审核
-            $data["first_dept_check_time"] = date("Y-m-d H:i:s");
-            TalentLogApi::write(1, $talent_info["id"], [$log_checkState, $checkState], $params["checkMsg"]);
-        } else {
-            $dept_logs = TalentLogApi::getListLogByTime($talent_info["id"], $fst_dept_check_time);
-            $tmp_log = null;
-            foreach ($dept_logs as $dept_log) {
-                if ($dept_log["companyId"] == $this->user["companyId"]) {
-                    //检察在第一次部门审核后产生的日志记录中是否存在当前部门记录,有就修改,没有就新增
-                    $tmp_log = $dept_log;
-                    break;
-                }
-            }
-            if ($tmp_log) {
-                //修改
-                TalentLogApi::rewrite($tmp_log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
-            } else {
-                //新增
-                TalentLogApi::write(1, $talent_info["id"], [$log_checkState, $checkState], $params["checkMsg"]);
-            }
-        }
+        $dept_log = TalentLogApi::getLogByCompanyId($talent_info["id"], $this->user["companyId"], $fst_dept_check_time);
+        if (!$dept_log)
+            return json(["msg" => "未匹配日志,审核失败"]);
+        if ($dept_log["active"] == 1)
+            return json(["msg" => "您的部门已经审核过了"]);
         $data["id"] = $talent_info["id"];
         $data["modify_files"] = $params["files"];
         $data["modify_fields"] = $params["fields"];
         TalentModel::update($data);
+        //修改日志
+        TalentLogApi::rewrite($dept_log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
         return json(["code" => 200, "msg" => "保存成功"]);
     }
 
@@ -359,33 +360,41 @@ class Talent extends AdminController {
      * @return type json
      */
     private function deptSubmitCheck($talent_info, $companys) {
-        $dept_logs = TalentLogApi::getListLogByTime($talent_info["id"], $talent_info["first_dept_check_time"]);
-        $tmp_log = null;
-        $succeed = 0;
-        foreach ($dept_logs as $dept_log) {
-            $succeed += $dept_log["active"] == 1 ? 1 : 0;
-            if ($dept_log["companyId"] == $this->user["companyId"]) {
-                $tmp_log = $dept_log;
-            }
+        $dept_log = TalentLogApi::getLogByCompanyId($talent_info["id"], $this->user["companyId"], $talent_info["first_dept_check_time"]);
+
+        $over = 0; //完成度
+        $error = 0; //失败数
+        $nowProcess = 3;
+        if (!$dept_log)
+            return json(["msg" => "未匹配日志,审核失败"]);
+        if ($dept_log["active"] == 1)
+            return json(["msg" => "您的部门已经审核过了"]);
+
+        $over++;
+        if ($dept_log["new_state"] == TalentState::DEPT_VERIFY_REJECT) {
+            $error++;
         }
-        if (!$tmp_log || $tmp_log["active"] == 1)
-            return json(["msg" => "日志数据异常,审核失败"]);
-        $refused = false;
-        if ($dept_log["new_state"] == TalentState::DEPT_VERIFY_PASS) {
-            $succeed++;
-            $data["highProcess"] = $nowProcess > $talent_info["highProcess"] ? $nowProcess : $talent_info["highProcess"];
-        } else {
-            //有一个审核失败就结束
-            $refused = true;
+        $logs = TalentLogApi::getListLogByTime($talent_info["id"], $talent_info["first_dept_check_time"]);
+        for ($i = 0; $i < count($logs); $i++) {
+            $over += $logs[$i]["active"] == 1 ? 1 : 0;
+            if ($logs["new_state"] == TalentState::DEPT_VERIFY_REJECT) {
+                $error++;
+            }
         }
-        if ($refused || ($succeed == count($companys))) {
-            $nowProcess = 1;
+        if ($over == count($companys)) {
+            //全部已审核
+            $checkState = TalentState::DEPT_VERIFY_REJECT;
+            if ($error == 0) {
+                $checkState = TalentState::DEPT_VERIFY_PASS;
+                $data["highProcess"] = $nowProcess > $talent_info["highProcess"] ? $nowProcess : $talent_info["highProcess"];
+            }
             $data["id"] = $talent_info["id"];
-            $data["checkState"] = $dept_log["new_state"];
+            $data["checkState"] = $checkState;
             $data["first_dept_check_time"] = null;
             TalentModel::update($data);
+            TalentLogApi::write(1, $talent_info["id"], $checkState, "部门审核结束", 1);
         }
-        TalentLogApi::setActive($tmp_log["id"], 1);
+        TalentLogApi::setActive($dept_log["id"], 1);
         return json(["code" => 200, "msg" => "审核成功"]);
     }
 
@@ -435,7 +444,7 @@ class Talent extends AdminController {
         $log = TalentLogApi::getLastLog($talent_info["id"], 1);
         if (!$log || $log["active"] == 1)
             return json(["msg" => "日志数据异常,审核失败"]);
-        if (in_array($log["checkState"], [TalentState::BASE_VERIFY_PASS, TalentState::FST_VERIFY_PASS, TalentState::REVERIFY_PASS])) {
+        if (in_array($log["new_state"], [TalentState::BASE_VERIFY_PASS, TalentState::FST_VERIFY_PASS, TalentState::REVERIFY_PASS])) {
             $data["highProcess"] = $nowProcess > $talent_info["highProcess"] ? $nowProcess : $talent_info["highProcess"];
         }
         $data["id"] = $talent_info["id"];
@@ -473,7 +482,7 @@ class Talent extends AdminController {
             $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
             $companys = array_filter(explode(",", $condition["companyIds"]));
             if ($companys) {
-                if (in_array($this->user["companyId"], $companys))
+                if (!in_array($this->user["companyId"], $companys))
                     return json(["msg" => "你的部门不在并审部门列表"]);
                 return $this->deptCheck($request, $talent_info, $companys);
             } else {
@@ -502,7 +511,7 @@ class Talent extends AdminController {
             $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
             $companys = array_filter(explode(",", $condition["companyIds"]));
             if ($companys) {
-                if (in_array($this->user["companyId"], $companys))
+                if (!in_array($this->user["companyId"], $companys))
                     return json(["msg" => "你的部门不在并审部门列表"]);
                 return $this->deptSubmitCheck($talent_info, $companys);
             } else {

+ 288 - 0
app/admin/view/talent/dept_verify.html

@@ -0,0 +1,288 @@
+{extend name="layout/content"}
+{block name="content"}
+<style type="text/css">
+    .layui-layer-btn .layui-layer-btn1 {
+        border-color: #009688;
+        background-color: #009688;
+        color: #fff;
+    }
+    ul li{
+        list-style: none;
+        display:inline-block;
+        margin-bottom: 5px;
+    }
+    #field ul li input{
+        vertical-align:middle;
+        margin-top:1px;
+    }
+</style>
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <h5>人才认定申报 - 部门审核</h5>
+            </div>
+            <div class="ibox-content">
+                <div class="row row-lg">
+                    <div class="col-sm-12">
+                        <div class="row">
+                            <input type="hidden" id="type" value="${user.type}">
+                            <input type="hidden" id="process" value="3">
+                            <input type="hidden" id="title" value="部门审核">
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                                type="button">姓名
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="name" placeholder="" />
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                                type="button">证件号码
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="idCard" placeholder="" />
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            性别
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="sex">
+                                        <option value=""></option>
+                                        <option value="1">男</option>
+                                        <option value="2">女</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            民族
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="nation">
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="row highSearch" style="display: none">
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            国籍/地区
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="nationality">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            籍贯省
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="provinceCode">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            政治面貌
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="politics">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            单位名称
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="enterpriseId">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            产业领域
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="industryField">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            申报来源
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="source">
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3">
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">申报年度
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="year" placeholder="">
+                                </div>                            </div>
+                            <div class="col-sm-3" style="display: none">
+                                <div class="input-group ">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">公布入选月份
+                                        </button>
+                                    </div>
+                                    <input type="text"  class="form-control time" id="identifyMonth" name="identifyMonth"/>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="row">
+                            <div class="col-sm-12" style="text-align: center">
+                                <button type="button" style="cursor:pointer;" id="openSearch" onclick="$('.highSearch,#closeSearch').show();
+                                        $(this).hide();" class="btn btn-sm btn-primary glyphicon glyphicon-eye-open" id="open-but">打开高级搜索</button>
+                                <button type="button" style="cursor:pointer;display: none;" id="closeSearch" onclick="$('#openSearch').show();
+                                        $('.highSearch').hide();
+                                        $(this).hide();"  class="btn btn-sm btn-danger glyphicon glyphicon-eye-close" id="close-but">关闭高级搜索</button>
+                                <button type="button" style="cursor:pointer;"  class="btn btn-sm btn-info  glyphicon glyphicon-search" onclick="TalentInfo.search()">搜索</button>
+                                <button type="button" style="cursor:pointer;"  class="btn btn-sm btn-warning glyphicon glyphicon-repeat" onclick="TalentInfo.reset()">重置</button>
+                            </div>
+                        </div>
+                        <div class="hidden-xs" id="TalentInfoTableToolbar" role="group">
+                            <if condition="chkCommission('/admin/talent/deptCheck','/talentInfo/depCheck')">
+                                <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openCheckTalentInfo()" id="">
+                                    <i class="fa fa-check"></i>&nbsp;审核
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/depExport','/talentInfo/depExport')">
+                                <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.showExportModal(1)" id="">
+                                    <i class="fa fa-file-excel-o"></i>&nbsp;导出
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/depDownloadZip','/talentInfo/depDownload')">
+                                <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.download()" id="">
+                                    <i class="fa fa-download"></i>&nbsp;下载
+                                </button>
+                            </if>
+                        </div>
+                        <table id="TalentInfoTable" 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 class="modal fade " id="commonExportModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
+    <div class="modal-dialog modal-lg" role="document" style="min-width: 1000px">
+        <div class="modal-content animated flipInY">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                <h4 class="modal-title" id="firstModalLabel">导出</h4>
+            </div>
+            <div class="modal-body">
+                <form id="exportForm" action="/talentInfoExport/publicExport" target="hiddenIframe" class="form-horizontal">
+                    <div class="form-group" id="field">
+                        <div id="field_info">
+                            <ul>
+                                <li style="width:24%"><input type="checkbox" value="year"><span>申报年度</span></li>
+                                <li style="width:24%"><input type="checkbox" value="name"><span>姓名</span></li>
+                                <li style="width:24%"><input type="checkbox" value="sexName"><span>性别</span></li>
+                                <li style="width:24%"><input type="checkbox" value="birthday"><span>出生日期</span></li>
+                                <li style="width:24%"><input type="checkbox" value="nationalityName"><span>国籍/地区</span></li>
+                                <li style="width:24%"><input type="checkbox" value="provinceName"><span>籍贯省</span></li>
+                                <li style="width:24%"><input type="checkbox" value="cityName"><span>籍贯市</span></li>
+                                <li style="width:24%"><input type="checkbox" value="countyName"><span>籍贯县</span></li>
+                                <li style="width:24%"><input type="checkbox" value="nationName"><span>民族</span></li>
+                                <li style="width:24%"><input type="checkbox" value="politicsName"><span>政治面貌</span></li>
+                                <li style="width:24%"><input type="checkbox" value="cardTypeName"><span>证件类型</span></li>
+                                <li style="width:24%"><input type="checkbox" value="idCard"><span>证件号码</span></li>
+                                <li style="width:24%"><input type="checkbox" value="firstInJJTime"><span>首次来晋工作时间</span></li>
+                                <li style="width:24%"><input type="checkbox" value="enterpriseName"><span>企业名称</span></li>
+                                <li style="width:24%"><input type="checkbox" value="industryFieldName"><span>产业领域</span></li>
+                                <li style="width:24%"><input type="checkbox" value="streetName"><span>所属镇街</span></li>
+                                <li style="width:24%"><input type="checkbox" value="sourceName"><span>申报来源</span></li>
+                                <li style="width:24%"><input type="checkbox" value="qzBatch"><span>入选名单批次</span></li>
+                                <li style="width:24%"><input type="checkbox" value="certificateStartTime"><span>泉州高层次人才证书发证日期</span></li>
+                                <li style="width:24%"><input type="checkbox" value="qzgccrcActiveTime"><span>泉州高层次人才证书的有效期</span></li>
+                                <li style="width:24%"><input type="checkbox" value="talentArrangeName"><span>人才层次</span></li>
+                                <li style="width:24%"><input type="checkbox" value="identifyConditionText"><span>认定条件</span></li>
+                                <li style="width:24%"><input type="checkbox" value="identifyConditionName"><span>认定条件名称</span></li>
+                                <li style="width:24%"><input type="checkbox" value="enterpriseTalentTypeName"><span>企业标签</span></li>
+                                <li style="width:24%"><input type="checkbox" value="letterTime"><span>首次来晋行政介绍信时间</span></li>
+                                <li style="width:24%"><input type="checkbox" value="introductionModeName"><span>引进方式</span></li>
+                                <li style="width:24%"><input type="checkbox" value="entryTime"><span>本单位入职时间</span></li>
+                                <li style="width:24%"><input type="checkbox" value="post"><span>职务</span></li>
+                                <li style="width:24%"><input type="checkbox" value="startTime"><span>工作合同开始时间</span></li>
+                                <li style="width:24%"><input type="checkbox" value="endTime"><span>工作合同结束时间</span></li>
+                                <li style="width:12%"><input type="checkbox" value="educationName"><span>最高学历</span></li>
+                                <li style="width:24%"><input type="checkbox" value="graduateSchool"><span>毕业院校)</span></li>
+                                <li style="width:24%"><input type="checkbox" value="major"><span>专业</span></li>
+                                <li style="width:24%"><input type="checkbox" value="title"><span>职称</span></li>
+                                <li style="width:24%"><input type="checkbox" value="studyAbroadName"><span>是否有留学经历</span></li>
+                                <li style="width:24%"><input type="checkbox" value="studyAbroadName"><span>留学毕业院校</span></li>
+                                <li style="width:24%"><input type="checkbox" value="studyAbroadName"><span>留学专业</span></li>
+                                <li style="width:24%"><input type="checkbox" value="phone"><span>手机号码</span></li>
+                                <li style="width:24%"><input type="checkbox" value="email"><span>电子邮箱</span></li>
+                                <li style="width:24%"><input type="checkbox" value="bank"><span>开户银行</span></li>
+                                <li style="width:24%"><input type="checkbox" value="bankNetwork"><span>开户银行网点</span></li>
+                                <li style="width:24%"><input type="checkbox" value="bankNumber"><span>银行行号</span></li>
+                                <li style="width:24%"><input type="checkbox" value="bankAccount"><span>银行账号</span></li>
+                                <li style="width:24%"><input type="checkbox" value="certificateNO"><span>人才编号</span></li>
+                                <li style="width:24%"><input type="checkbox" value="firstSubmitTime"><span>首次确认提交时间</span></li>
+                                <li style="width:24%"><input type="checkbox" value="newSubmitTime"><span>最新确认提交时间</span></li>
+                                <li style="width:24%"><input type="checkbox" value="checkStateName"><span>审核状态</span></li>
+                                <li style="width:24%"><input type="checkbox" value="checkMsg"><span>审核意见</span></li>
+                            </ul>
+                        </div>
+                        <div class="form-group" style="text-align: center">
+                            <button type="button" class="btn btn-primary" onclick="TalentInfo.checkAll()">全选</button>
+                            <button type="button" class="btn btn-success" onclick="TalentInfo.unCheckAll()">反选</button>
+                        </div>
+                    </div>
+                </form>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" onclick="TalentInfo.export(1)">导出</button>
+                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>
+<iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
+<!--<script src="${ctxPath}/static/modular/talentIdentify/talentInfo/talentInfo_first.js"></script>-->
+<!--<script src="${ctxPath}/static/modular/talentIdentify/talentInfo/talentInfo_common.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/talentIdentify/talentInfo/talentInfo_base.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/talentIdentify/talentInfo/talentInfo_common.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 346 - 227
app/admin/view/talent/pre_list.html

@@ -1,4 +1,5 @@
-@layout("/common/_container.html"){
+{extend name="layout/content"}
+{block name="content"}
 <style type="text/css">
     #talentInfoForm label {
         font-size: xx-small;
@@ -26,239 +27,402 @@
                         <input type="hidden" id="usertype" value="${user.type}">
                         <div class="row">
                             <div class="col-sm-3">
-                                <#NameCon id="name" name="姓名" />
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                                type="button">姓名
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="name" placeholder="" />
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#NameCon id="idCard" name="证件号码" />
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">证件号码
+                                        </button>
+                                    </div>
+                                    <input type="text" class="form-control" id="card_number" placeholder="" />
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="sex" name="性别" >
-                                    <option value=""></option>
-                                    <option value="1">男</option>
-                                    <option value="2">女</option>
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            性别
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="sex">
+                                        <option value=""></option>
+                                        <option value="1">男</option>
+                                        <option value="2">女</option>
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="nation" name="民族" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            民族
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="nation">
+                                    </select>
+                                </div>
                             </div>
                         </div>
                         <div class="row highSearch" style="display: none">
                             <div class="col-sm-3">
-                                <#SelectCon id="nationality" name="国籍/地区" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            国籍/地区
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="nationality">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="provinceCode" name="籍贯省" >
-                                    <option value="">请选择</option>
-                                    @for(item in provinceList){
-                                    <option value="${item.code}">${item.name}</option>
-                                    @}
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            籍贯省
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="province">
+                                        <option value="">请选择</option>
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="politics" name="政治面貌" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            政治面貌
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="politics">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="enterpriseId" name="单位名称" >
-                                    <option value="">请选择</option>
-                                    @for(item in enterpriseList){
-                                    <option value="${item.id}">${item.name}</option>
-                                    @}
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            单位名称
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="enterprise_id">
+                                        <option value="">请选择</option>
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="industryField" name="行业领域" >
-                                </#SelectCon>
-                            </div>
-                            <div class="col-sm-3"
-                                 @if(user.type==2){
-                                    style="display: none"
-                                 @}
-                                >
-                                <#SelectCon id="source" name="申报来源">
-                                <option value=""></option>
-                                <option value="1">经我市申报并已经成功入选的泉州高层次人才</option>
-                                <option value="2">从我市以外的其他县(市、区)变动到我市工作的泉州市高层次人才</option>
-                                <option value="3">依据《晋江市优秀人才补充认定标准》申报认定</option>
-                            </#SelectCon>
-                            </div>
-                            <div class="col-sm-3"
-                                 @if(user.type==2){
-                                    style="display: none"
-                                 @}
-                                >
-                                <#SelectCon id="fromCity" name="入选来源县市">
-                                    <option value="">请选择</option>
-                                    @for(item in fromCityList){
-                                    <option value="${item.code}">${item.name}</option>
-                                    @}
-                                </#SelectCon>
-                            </div>
-                            <div class="col-sm-3"
-                                 @if(user.type==2){
-                                    style="display: none"
-                                 @}
-                                >
-                                <#SelectCon id="introductionMode" name="引进方式">
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            产业领域
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="industry_field">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="highEducation" name="最高学历" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            最高学历
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="highest_degree">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#NameCon id="major" name="专业" />
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">专业</button>
+                                    </div>
+                                    <input type="text" class="form-control" id="major" placeholder="" />
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#NameCon id="title" name="职称" />
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">职称</button>
+                                    </div>
+                                    <input type="text" class="form-control" id="professional" placeholder="" />
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="studyAbroad" name="是否有留学经历" >
-                                    <option value="">请选择</option>
-                                    <option value="2">否</option>
-                                    <option value="1">是</option>
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            是否有留学经历
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="study_abroad">
+                                        <option value="">请选择</option>
+                                        <option value="2">否</option>
+                                        <option value="1">是</option>
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#NameCon id="phone" name="手机号码" />
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">手机号码</button>
+                                    </div>
+                                    <input type="text" class="form-control" id="phone" placeholder="" />
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#NameCon id="email" name="电子邮箱" />
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">电子邮箱</button>
+                                    </div>
+                                    <input type="text" class="form-control" id="email" placeholder="" />
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="talentType" name="人才标签" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            人才标签
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="talent_type">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="talentArrange" name="人才层次" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            人才层次
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="talent_arrange">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="identifyCondition" name="认定条件" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            认定条件
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="talent_condition">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="address" name="所属镇街" >
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            所属镇街
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="address">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="active" name="离职状态" >
-                                    <option value="">请选择</option>
-                                    <option value="1">在职</option>
-                                    <option value="2">离职</option>
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            离职状态
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="active">
+                                        <option value="">请选择</option>
+                                        <option value="1">在职</option>
+                                        <option value="2">离职</option>
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="checkState" name="审核状态">
-                                    <option value="">请选择</option>
-                                    <option value="-1">审核不通过</option>
-                                    <option value="35">已通过</option>
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            审核状态
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="checkState">
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="isPublic" name="公示状态" >
-                                    <option value="">请选择</option>
-                                    <option value="1">待核查征信</option>
-                                    <option value="2">待公示</option>
-                                    <option value="3">公示中</option>
-                                    <option value="4">待公布</option>
-                                    <option value="5">待发证</option>
-                                    <option value="6">已发证</option>
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            公示状态
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="isPublic">
+                                        <option value="">请选择</option>
+                                        <option value="1">待核查征信</option>
+                                        <option value="2">待公示</option>
+                                        <option value="3">公示中</option>
+                                        <option value="4">待公布</option>
+                                        <option value="5">待发证</option>
+                                        <option value="6">已发证</option>
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#SelectCon id="breakFaith" name="是否失信" >
-                                    <option value="">请选择</option>
-                                    <option value="2">否</option>
-                                    <option value="1">是</option>
-                                </#SelectCon>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            是否失信
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="breakFaith">
+                                        <option value="">请选择</option>
+                                        <option value="2">否</option>
+                                        <option value="1">是</option>
+                                    </select>
+                                </div>
                             </div>
                             <div class="col-sm-3">
-                                <#NameCon id="year" name="申报年度" />
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">申报年度</button>
+                                    </div>
+                                    <input type="text" class="form-control" id="apply_year" placeholder="" />
+                                </div>
                             </div>
                             <div class="col-sm-3" style="display: none">
-                                <#SelectCon id="isEffect" name="是否有效">
-                                    <option value="">请选择</option>
-                                    <option value="1">有效</option>
-                                    <option value="3">人才证书过期</option>
-                                    <option value="4">已取消</option>
-                                </#SelectCon>
-                            </div>
-<div class="col-sm-3" style="display: none">
-    <div class="input-group ">
-        <div class="input-group-btn">
-            <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">公布入选月份
-            </button>
-        </div>
-        <input type="text"  class="form-control time" id="identifyMonth" name="identifyMonth"/>
-    </div>
-</div>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            是否有效
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="isEffect">
+                                        <option value="">请选择</option>
+                                        <option value="1">有效</option>
+                                        <option value="3">人才证书过期</option>
+                                        <option value="4">已取消</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="col-sm-3" style="display: none">
+                                <div class="input-group ">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">公布入选月份
+                                        </button>
+                                    </div>
+                                    <input type="text"  class="form-control time" id="identifyMonth" name="identifyMonth"/>
+                                </div>
+                            </div>
                         </div>
                         <div class="row">
                             <div class="col-sm-12" style="text-align: center">
-                                <button type="button" style="cursor:pointer;" id="openSearch" onclick="$('.highSearch,#closeSearch').show();$(this).hide();" class="btn btn-sm btn-primary glyphicon glyphicon-eye-open" id="open-but">打开高级搜索</button>
-                                <button type="button" style="cursor:pointer;display: none;" id="closeSearch" onclick="$('#openSearch').show();$('.highSearch').hide();$(this).hide();"  class="btn btn-sm btn-danger glyphicon glyphicon-eye-close" id="close-but">关闭高级搜索</button>
+                                <button type="button" style="cursor:pointer;" id="openSearch" onclick="$('.highSearch,#closeSearch').show(); $(this).hide();" class="btn btn-sm btn-primary glyphicon glyphicon-eye-open" id="open-but">打开高级搜索</button>
+                                <button type="button" style="cursor:pointer;display: none;" id="closeSearch" onclick="$('#openSearch').show(); $('.highSearch').hide(); $(this).hide();"  class="btn btn-sm btn-danger glyphicon glyphicon-eye-close" id="close-but">关闭高级搜索</button>
                                 <button type="button" style="cursor:pointer;"  class="btn btn-sm btn-info  glyphicon glyphicon-search" onclick="TalentInfo.search()">搜索</button>
                                 <button type="button" style="cursor:pointer;"  class="btn btn-sm btn-warning glyphicon glyphicon-repeat" onclick="TalentInfo.reset()">重置</button>
                             </div>
                         </div>
                         <div class="hidden-xs" id="TalentInfoTableToolbar" role="group">
-                            @if(shiro.hasPermission("/talentInfo/prepareHczx")){
-                            <#button name="导出核查征信" icon="fa-file-excel-o" clickFun="TalentInfo.showDataCheckModal(1)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/hczxReject")){
-                            <#button name="征信失信" icon="fa-warning" clickFun="TalentInfo.showHczxRejectModal()" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/hczxPass")){
-                            <#button name="征信通过" icon="fa-check" clickFun="TalentInfo.showDataCheckModal(2)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/publicExportBefore")){
-                                <#button name="公示预览" icon="fa-file-excel-o" clickFun="TalentInfo.showDataCheckModal(7)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/preparePublic")){
-                            <#button name="公示" icon="fa-opencart" btnCss="danger" clickFun="TalentInfo.showDataCheckModal(3)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/preparePublicExport")){
-                            <#button name="公示导出" icon="fa-file-excel-o" clickFun="TalentInfo.publicExport(1)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/prepareCheck")){
-                            <#button name="公示再审核" icon="fa-check-square-o" clickFun="TalentInfo.afterCheck()" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/publicPass")){
-                            <#button name="公示通过" icon="fa-compass" clickFun="TalentInfo.showDataCheckModal(4)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/publishExportBefore")){
-                            <#button name="公布预览" icon="fa-television"  clickFun="TalentInfo.showDataCheckModal(8)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/preparePublish")){
-                            <#button name="公布" icon="fa-television" btnCss="danger" clickFun="TalentInfo.showDataCheckModal(5)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/preparePublishExport")){
-                            <#button name="公布导出" icon="fa-file-excel-o" clickFun="TalentInfo.publicExport(2)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/prepareCanclePublish")){
-                            <#button name="撤销公布" icon="fa-reply" clickFun="TalentInfo.canclePublish()" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/prepareCertification")){
-                            <#button name="发证" icon="fa-newspaper-o" clickFun="TalentInfo.showDataCheckModal(6)" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/prepareExport")){
-                            <#button name="导出" icon="fa-file-excel-o" clickFun="TalentInfo.showExportModal()" space="false"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/prepareDownload")){
-                            <#button name="下载" icon="fa-download" clickFun="TalentInfo.download()"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/prepareDownload")){
-                            <#button name="批量下载头像" icon="fa-cloud-download" clickFun="TalentInfo.downloadPhoto()"/>
-                            @}
-                            @if(shiro.hasPermission("/talentInfo/libraryDetail")){
-                            <#button name="查看" icon="fa-eye" clickFun="TalentInfo.openTalentInfoDetail()" space="false"/>
-                            @}
+                            <if condition="chkCommission('/admin/talent/prepareHczx','/talentInfo/prepareHczx')">
+                                <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.showDataCheckModal(1)">
+                                    <i class="fa fa-file-excel-o"></i>&nbsp;导出核查征信
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/hczxReject','/talentInfo/hczxReject')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.showHczxRejectModal()">
+                                    <i class="fa fa-warning"></i>&nbsp;征信失信
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/hczxPass','/talentInfo/hczxPass')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.showDataCheckModal(2)">
+                                    <i class="fa fa-check"></i>&nbsp;征信通过
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/publicExportBefore','/talentInfo/publicExportBefore')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.showDataCheckModal(7)">
+                                    <i class="fa fa-file-excel-o"></i>&nbsp;公示预览
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/preparePublic','/talentInfo/preparePublic')">
+                                <button type="button" class="btn btn-sm btn-danger " onclick="TalentInfo.showDataCheckModal(3)">
+                                    <i class="fa fa-file-excel-o"></i>&nbsp;公示
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/preparePublicExport','/talentInfo/preparePublicExport')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.publicExport(1)">
+                                    <i class="fa fa-file-excel-o"></i>&nbsp;公示导出
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/prepareCheck','/talentInfo/prepareCheck')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.afterCheck()">
+                                    <i class="fa fa-check-square-o"></i>&nbsp;公示再审核
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/publicPass','/talentInfo/publicPass')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.showDataCheckModal(4)">
+                                    <i class="fa fa-compass"></i>&nbsp;公示通过
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/publishExportBefore','/talentInfo/publishExportBefore')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.showDataCheckModal(8)">
+                                    <i class="fa fa-television"></i>&nbsp;公布预览
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/preparePublish','/talentInfo/preparePublish')">
+                                <button type="button" class="btn btn-sm btn-danger" onclick="TalentInfo.showDataCheckModal(5)">
+                                    <i class="fa fa-television"></i>&nbsp;公布
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/preparePublishExport','/talentInfo/preparePublishExport')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.publicExport(2)">
+                                    <i class="fa fa-file-excel-o"></i>&nbsp;公布导出
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/prepareCanclePublish','/talentInfo/prepareCanclePublish')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.canclePublish()">
+                                    <i class="fa fa-reply"></i>&nbsp;撤销公布
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/prepareCertification','/talentInfo/prepareCertification')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.showDataCheckModal(6)">
+                                    <i class="fa fa-newspaper-o"></i>&nbsp;发证
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/prepareExport','/talentInfo/prepareExport')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.showExportModal()">
+                                    <i class="fa fa-file-excel-o"></i>&nbsp;导出
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/prepareDownload','/talentInfo/prepareDownload')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.download()">
+                                    <i class="fa fa-download"></i>&nbsp;下载
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/prepareDownload','/talentInfo/prepareDownload')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.downloadPhoto()">
+                                    <i class="fa fa-cloud-download"></i>&nbsp;批量下载头像
+                                </button>
+                            </if>
+                            <if condition="chkCommission('/admin/talent/libraryDetail','/talentInfo/libraryDetail')">
+                                <button type="button" class="btn btn-sm btn-primary" onclick="TalentInfo.openTalentInfoDetail()">
+                                    <i class="fa fa-eye"></i>&nbsp;查看
+                                </button>
+                            </if>
                         </div>
-                        <#table id="TalentInfoTable"/>
-                        <form id="publicForm" action="${ctxPath}/talentInfo/talentInfoPublic" target="hiddenIframe" style="display: none">
+                        <table id="TalentInfoTable" 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>
+                        <form id="publicForm" action="/admin/talent/talentInfoPublic" target="hiddenIframe" style="display: none">
                             <input name="type" id="type">
                         </form>
                     </div>
@@ -276,7 +440,7 @@
                 <h4 class="modal-title" id="hczxModalLabel">导入核查征信结果文件</h4>
             </div>
             <div class="modal-body">
-                <form id="importHczx-form" action="${ctxPath}/talentInfoImport/importHczx" method="post" enctype="multipart/form-data" target="hiddenIframe">
+                <form id="importHczx-form" action="/admin/talent/importHczx" method="post" enctype="multipart/form-data" target="hiddenIframe">
                     <input type="file" id="file" name="file" onchange="$('#fileName').val($('#file').val());" class="hidden">
                     <div class="form-group row">
                         <div class="col-sm-1"></div>
@@ -284,8 +448,8 @@
                             <div class="input-group">
                                 <input type="text" class="form-control" id="fileName" name="fileName" placeholder="请选择需要上传的附件" readonly="readonly" >
                                 <span class="input-group-btn">
-						        	<button class="btn btn-secondary" type="button" onclick="$('#file').click()"><i class="fa fa-search"></i>选择文件</button>
-						      	</span>
+                                    <button class="btn btn-secondary" type="button" onclick="$('#file').click()"><i class="fa fa-search"></i>选择文件</button>
+                                </span>
                             </div>
                         </div>
                     </div>
@@ -445,11 +609,10 @@
                 <h4 class="modal-title" id="firstModalLabel">导出</h4>
             </div>
             <div class="modal-body">
-                <form id="exportForm" action="${ctxPath}/talentInfoExport/publicExport" target="hiddenIframe" class="form-horizontal">
+                <form id="exportForm" action="/admin/talent/publicExport" target="hiddenIframe" class="form-horizontal">
                     <div class="form-group" id="field">
                         <div id="field_info">
                             <ul>
-                                @if(user.type==1){
                                 <li style="width:24%"><input type="checkbox" value="year"><span>申报年度</span></li>
                                 <li style="width:24%"><input type="checkbox" value="name"><span>姓名</span></li>
                                 <li style="width:24%"><input type="checkbox" value="sexName"><span>性别</span></li>
@@ -505,50 +668,6 @@
                                 <li style="width:24%"><input type="checkbox" value="checkStateName"><span>审核状态</span></li>
                                 <li style="width:24%"><input type="checkbox" value="isPublicName"><span>公示状态</span></li>
                                 <li style="width:24%"><input type="checkbox" value="checkMsg"><span>审核意见</span></li>
-                                @}
-                                @if(user.type==2){
-                                <li style="width:24%"><input type="checkbox" value="year"><span>申报年度</span></li>
-                                <li style="width:24%"><input type="checkbox" value="enterpriseName"><span>企业名称</span></li>
-                                <li style="width:24%"><input type="checkbox" value="name"><span>姓名</span></li>
-                                <li style="width:24%"><input type="checkbox" value="sexName"><span>性别</span></li>
-                                <li style="width:24%"><input type="checkbox" value="birthday"><span>出生日期</span></li>
-                                <li style="width:24%"><input type="checkbox" value="nationName"><span>民族</span></li>
-                                <li style="width:24%"><input type="checkbox" value="cardTypeName"><span>证件类型</span></li>
-                                <li style="width:24%"><input type="checkbox" value="idCard"><span>证件号码</span></li>
-                                <li style="width:24%"><input type="checkbox" value="nationalityName"><span>国籍/地区</span></li>
-                                <li style="width:24%"><input type="checkbox" value="politicsName"><span>政治面貌</span></li>
-                                <li style="width:24%"><input type="checkbox" value="streetName"><span>所属镇街</span></li>
-                                <li style="width:24%"><input type="checkbox" value="provinceName"><span>籍贯省</span></li>
-                                <li style="width:24%"><input type="checkbox" value="cityName"><span>籍贯市</span></li>
-                                <li style="width:24%"><input type="checkbox" value="countyName"><span>籍贯县</span></li>
-                                <li style="width:24%"><input type="checkbox" value="educationName"><span>最高学历</span></li>
-                                <li style="width:24%"><input type="checkbox" value="graduateSchool"><span>毕业学校</span></li>
-                                <li style="width:24%"><input type="checkbox" value="major"><span>专业</span></li>
-                                <li style="width:24%"><input type="checkbox" value="post"><span>职务</span></li>
-                                <li style="width:24%"><input type="checkbox" value="phone"><span>手机号码</span></li>
-                                <li style="width:24%"><input type="checkbox" value="email"><span>电子邮箱</span></li>
-                                <li style="width:24%"><input type="checkbox" value="bank"><span>开户银行</span></li>
-                                <li style="width:24%"><input type="checkbox" value="bankNetwork"><span>开户银行网点</span></li>
-                                <li style="width:24%"><input type="checkbox" value="bankAccount"><span>银行账号</span></li>
-                                <li style="width:24%"><input type="checkbox" value="startTime"><span>工作合同开始时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="endTime"><span>工作合同结束时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="entryTime"><span>本单位入职时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="talentArrangeName"><span>人才层次</span></li>
-                                <li style="width:24%"><input type="checkbox" value="identifyConditionText"><span>认定条件</span></li>
-                                <li style="width:24%"><input type="checkbox" value="identifyConditionName"><span>认定条件名称</span></li>
-                                <li style="width:24%"><input type="checkbox" value="identifyGetTime"><span>认定条件证书取得时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="title"><span>职称</span></li>
-                                <li style="width:24%"><input type="checkbox" value="professionalQualifications"><span>国家职业资格</span></li>
-                                <li style="width:24%"><input type="checkbox" value="studyAbroadName"><span>是否有留学经历</span></li>
-                                <li style="width:24%"><input type="checkbox" value="breakFaithName"><span>曾被相关主管部门列为失信个人</span></li>
-                                <li style="width:24%"><input type="checkbox" value="identifyMonth"><span>公布入选月份</span></li>
-                                <li style="width:24%"><input type="checkbox" value="certificateNO"><span>人才编号</span></li>
-                                <li style="width:24%"><input type="checkbox" value="firstSubmitTime"><span>首次确认提交时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="newSubmitTime"><span>最新确认提交时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="checkStateName"><span>审核状态</span></li>
-                                <li style="width:24%"><input type="checkbox" value="isPublicName"><span>公示状态</span></li>
-                                <li style="width:24%"><input type="checkbox" value="checkMsg"><span>审核意见</span></li>
-                                @}
                             </ul>
                         </div>
                         <div class="form-group" style="text-align: center">
@@ -569,7 +688,7 @@
 <!--<script src="${ctxPath}/static/modular/talentIdentify/talentInfo/talentInfo_prepare.js"></script>-->
 <!--<script src="${ctxPath}/static/modular/talentIdentify/talentInfo/talentInfo_common.js"></script>-->
 <script type="text/javascript">
-    document.write('<script src="${ctxPath}/static/modular/talentIdentify/talentInfo/talentInfo_prepare.js?v='+(new Date()).getTime()+'"><\/script>');
-    document.write('<script src="${ctxPath}/static/modular/talentIdentify/talentInfo/talentInfo_common.js?v='+(new Date()).getTime()+'"><\/script>');
+    document.write('<script src="/static/modular/talentIdentify/talentInfo/talentInfo_prepare.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/talentIdentify/talentInfo/talentInfo_common.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
-@}
+{/block}

+ 87 - 84
app/admin/view/talent/talentInfo_base_check.html

@@ -1,6 +1,11 @@
 {extend name="layout/content"}
 {block name="content"}
 <style type="text/css">
+    .panel-heading{
+        color:#333;
+        background-color:#f5f5f5;
+        border-color:#ddd
+    }
     .spacing {
         margin-bottom: 10px;
         padding-right:4px;
@@ -12,37 +17,23 @@
     .has-feedback .form-control {
         padding-right: 5px;
     }
-    ul li {
-        list-style: none;
-        display: inline-block;
-    }
-    .imgs li{
-        float: left;
-        border: 1px solid #d8d1d1;
-        text-align: center;
-        height: 30px;
-    }
-    #field ul li input{
-        vertical-align:middle;
-        margin-right:5px;
-        margin-top:1px;
-    }
     .control-label{
         color: #337ab7;
     }
-    .layui-layer-btn .layui-layer-btn1 {
-        border-color: #1E9FFF;
-        background-color: #1E9FFF;
-        color: #fff;
+    .rowGroup{
+        padding-bottom: 5px;
     }
-    .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
-        background-color: #ddd;
-        opacity: 1;
-    }
-    #fileTable td{
-        word-break: break-word;
-        white-space: inherit;
+    .imgs>li{
+        list-style: none;
+        float: left;
+        border: 1px solid #d8d1d1;
+        text-align: center;
+        height: 35px;
+        width:100%;
+        padding:5px 0;
     }
+    .imgs li>div{float:left;}
+    .info td{background:#f5f5f5 !important;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -57,7 +48,7 @@
                                 </button>
                             </li>
                             <li  class="" style="float: right;">
-                                <button type="button" class="btn btn-sm btn-info " onclick="$('#fileTable').bootstrapTable('expandAllRows');" >
+                                <button type="button" class="btn btn-sm btn-info " onclick="$('.fileTable').bootstrapTable('expandAllRows');" >
                                     <i class="fa fa-caret-square-o-down"></i>&nbsp;显示附件
                                 </button>
                             </li>
@@ -67,7 +58,7 @@
                         <div id="tab-1" class="tab-pane active">
                             <div class="panel-body" >
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">申报信息</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">个人信息</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">
@@ -75,46 +66,13 @@
                                                 <input type="hidden" name="type" id="type" value="1">
                                                 <input type="hidden" name="checkState" id="checkState" value="{$info.checkState}">
                                                 <div class="row">
-                                                    <div class="col-sm-11">
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
-                                                            <select class="form-control" id="talent_type" name="talent_type" value="{$info.card_type}">
-                                                                <option value="" data-value="{$info.talent_type}" selected="">{$info.talentTypeName}</option>
-                                                            </select>
-                                                        </div>
-                                                        {if condition="in_array($info['talent_type'],[1,2])"}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                            <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$info.tax_insurance_month}" />
-                                                        </div>
-                                                        {else/}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <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="{$info.labor_contract_rangetime}" />
-                                                        </div>
-                                                        {/if}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                                            <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$info.enterpriseName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
-                                                            <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$info.enterpriseTagName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
-                                                            <input type="text" class="form-control" id="street" name="street" value="{$info.streetName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>行业领域</label>
-                                                            <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$info.industryFieldName}">
-                                                        </div>
+                                                    <div class="col-sm-10">
                                                         <div class="rowGroup col-sm-3">
                                                             <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-3">
-                                                            <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="cardType" name="cardType" 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}
@@ -133,14 +91,6 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
                                                             <input type="text" class="form-control" id="birthday" name="birthday" value="{$info.birthday}"/>
                                                         </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <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-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
-                                                            <input class="form-control" id="province" name="province" value="{$info.provinceName}{$info.cityName}{$info.countyName}"/>
-                                                        </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>民族</label>
                                                             <input class="form-control" id="nation" name="nation" value="{$info.nationName}"/>
@@ -149,29 +99,82 @@
                                                             <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-3">
+                                                            <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-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
+                                                            <input class="form-control" id="province" name="province" value="{$info.provinceName}{$info.cityName}{$info.countyName}"/>
+                                                        </div>
                                                     </div>
-                                                    <div class="col-sm-1">
-                                                        <img id="photoImg" src="{$info.headimgurl}"  style="height: 110px;width: 76px;padding-bottom: 5px;">
+                                                    <div class="col-sm-2">
+                                                        <img id="photoImg" src="{$info.headimgurl}"  style="height:147px;width:105px;margin:0 auto;display:block;">
                                                     </div>
                                                 </div>
-                                                <div class="row">
-                                                    <label class="col-sm-12 control-label spacing" style="text-align: left"><span style="color: red">声明:本人对输入材料的真实性负全部责任</span></label>
+                                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                    附件:                                      
+                                                    <table class="fileTable"></table>
                                                 </div>
                                             </div>
                                         </form>
                                     </div>
                                 </div>
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">附件</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
                                     <div class="panel-body">
-                                        <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 class="col-sm-12 form-group-sm">
+                                            <div class="row">
+                                                <div class="col-sm-10">
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
+                                                        <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$info.enterpriseTagName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
+                                                        <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$info.enterpriseName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
+                                                        <input type="text" class="form-control" id="street" name="street" value="{$info.streetName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>产业领域</label>
+                                                        <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$info.industryFieldName}">
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
+                                                        <select class="form-control" id="talent_type" name="talent_type" >
+                                                            <option value="" selected="true">{$info.talentTypeName}</option>
+                                                        </select>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-9" id="tipsBlock">
+                                                        <label class=" control-label spacing">说明</label>
+                                                        {switch name="info.talent_type"}
+                                                        {case value="1"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。"/>{/case}
+                                                        {case value="2"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业(不含企业集团内部人员调动)的人才。"/>{/case}
+                                                        {case value="3"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。"/>{/case}
+                                                        {/switch}
+                                                    </div>
+                                                    {if condition="in_array($info['talent_type'],[1,2])"}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
+                                                        <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$info.tax_insurance_month}" />
+                                                    </div>
+                                                    {else/}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <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="{$info.labor_contract_rangetime}" />
+                                                    </div>
+                                                    {/if}
+                                                </div>
+                                            </div>
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                        </div>
+                                    </div> 
                                 </div>
                                 <div class="panel panel-default">
                                     <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>

+ 174 - 139
app/admin/view/talent/talentInfo_common_check.html

@@ -1,6 +1,11 @@
 {extend name="layout/content"}
 {block name="content"}
 <style type="text/css">
+    .panel-heading{
+        color:#333;
+        background-color:#f5f5f5;
+        border-color:#ddd
+    }
     .spacing {
         margin-bottom: 10px;
         padding-right:4px;
@@ -12,42 +17,23 @@
     .has-feedback .form-control {
         padding-right: 5px;
     }
-    ul li {
-        list-style: none;
-        display: inline-block;
-    }
-    .imgs li{
-        float: left;
-        border: 1px solid #d8d1d1;
-        text-align: center;
-        height: 30px;
-    }
-    #field ul li input{
-        vertical-align:middle;
-        margin-right:5px;
-        margin-top:1px;
-    }
     .control-label{
         color: #337ab7;
     }
-    .layui-layer-btn .layui-layer-btn1 {
-        border-color: #1E9FFF;
-        background-color: #1E9FFF;
-        color: #fff;
-    }
-    .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
-        background-color: #ddd;
-        opacity: 1;
+    .rowGroup{
+        padding-bottom: 5px;
     }
-    #fileTable td{
-        word-break: break-word;
-        white-space: inherit;
-    }
-    .panel-default>.panel-heading {
-        color:#333;
-        background-color:#f5f5f5;
-        border-color:#ddd
+    .imgs>li{
+        list-style: none;
+        float: left;
+        border: 1px solid #d8d1d1;
+        text-align: center;
+        height: 35px;
+        width:100%;
+        padding:5px 0;
     }
+    .imgs li>div{float:left;}
+    .info td{background:#f5f5f5 !important;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -72,49 +58,15 @@
                         <div id="tab-1" class="tab-pane active">
                             <div class="panel-body" >
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">申报信息</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">个人信息</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="1">
                                                 <input type="hidden" name="checkState" id="checkState" value="{$info.checkState}">
-                                                <input type="hidden" name="talent_condition" id="talent_condition" value="{$info.talent_condition}">
                                                 <div class="row">
-                                                    <div class="col-sm-11">
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
-                                                            <select class="form-control">
-                                                                <option>{$info.talentTypeName}</option>
-                                                            </select>
-                                                        </div>
-                                                        {if condition="in_array($info['talent_type'],[1,2])"}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                            <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$info.tax_insurance_month}" />
-                                                        </div>
-                                                        {else/}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <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="{$info.labor_contract_rangetime}" />
-                                                        </div>
-                                                        {/if}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                                            <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$info.enterpriseName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
-                                                            <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$info.enterpriseTagName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
-                                                            <input type="text" class="form-control" id="street" name="street" value="{$info.streetName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>行业领域</label>
-                                                            <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$info.industryFieldName}">
-                                                        </div>
+                                                    <div class="col-sm-10">
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$info.name}" />
@@ -139,14 +91,6 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
                                                             <input type="text" class="form-control" id="birthday" name="birthday" value="{$info.birthday}"/>
                                                         </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <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-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
-                                                            <input class="form-control" id="province" name="province" value="{$info.provinceName}{$info.cityName}{$info.countyName}"/>
-                                                        </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>民族</label>
                                                             <input class="form-control" id="nation" name="nation" value="{$info.nationName}"/>
@@ -155,22 +99,89 @@
                                                             <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-3">
+                                                            <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-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
+                                                            <input class="form-control" id="province" name="province" value="{$info.provinceName}{$info.cityName}{$info.countyName}"/>
+                                                        </div>
                                                     </div>
-                                                    <div class="col-sm-1">
-                                                        <img id="photoImg" src="{$info.headimgurl}"  style="height: 110px;width: 76px;padding-bottom: 5px;">
+                                                    <div class="col-sm-2">
+                                                        <img id="photoImg" src="{$info.headimgurl}"  style="height:147px;width:105px;margin:0 auto;display:block;">
                                                     </div>
                                                 </div>
+                                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                    附件:                                      
+                                                    <table class="fileTable"></table>
+                                                </div>
                                             </div>
                                         </form>
                                     </div>
-
                                 </div>
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">个人信息填报及人才认定申请</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
+                                    <div class="panel-body">
+                                        <div class="col-sm-12 form-group-sm">
+                                            <div class="row">
+                                                <div class="col-sm-10">
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
+                                                        <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$info.enterpriseTagName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
+                                                        <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$info.enterpriseName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
+                                                        <input type="text" class="form-control" id="street" name="street" value="{$info.streetName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>产业领域</label>
+                                                        <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$info.industryFieldName}">
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
+                                                        <select class="form-control" id="talent_type" name="talent_type" >
+                                                            <option value="" selected="true">{$info.talentTypeName}</option>
+                                                        </select>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-9" id="tipsBlock">
+                                                        <label class=" control-label spacing">说明</label>
+                                                        {switch name="info.talent_type"}
+                                                        {case value="1"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。"/>{/case}
+                                                        {case value="2"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业(不含企业集团内部人员调动)的人才。"/>{/case}
+                                                        {case value="3"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。"/>{/case}
+                                                        {/switch}
+                                                    </div>
+                                                    {if condition="in_array($info['talent_type'],[1,2])"}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
+                                                        <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$info.tax_insurance_month}" />
+                                                    </div>
+                                                    {else/}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <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="{$info.labor_contract_rangetime}" />
+                                                    </div>
+                                                    {/if}
+                                                </div>
+                                            </div>
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                        </div>
+                                    </div> 
+                                </div>
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">人才认定申请</div>
                                     <div class="panel-body">
                                         <div class="col-sm-12 form-group-sm">
                                             <div class="row">
-                                                <div class="col-sm-11">                          
+                                                <div class="col-sm-10">                          
                                                     <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>申报年度</label>
                                                         <input type="text" class="form-control" name="apply_year" id="apply_year" value="{$info.apply_year}" readonly disabled>
@@ -180,11 +191,53 @@
                                                         <input type="text" class="form-control date" id="fst_work_time" value="{$info.fst_work_time}"/>
                                                     </div>
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing"><span style="color: red">*</span>引进方式</label>
-                                                        <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式">
-                                                            <option>{$info.importWayName}</option>
+                                                        <label class="control-label spacing"><span style="color: red">*</span>手机号码</label>
+                                                        <input type="text" class="form-control" id="phone" value="{$info.phone}" maxlength="11"/>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>电子邮箱</label>
+                                                        <input type="text" class="form-control" id="email" value="{$info.email}"/>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>最高学历</label>
+                                                        <select class="form-control" id="highest_degree">
+                                                            <option value="">{$info.highestDegreeName}</option>
                                                         </select>
                                                     </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
+                                                        <input type="text" class="form-control" id="graduate_school" value="{$info.graduate_school}">
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
+                                                        <input type="text" class="form-control" id="major" value="{$info.major}"/>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing">是否有留学经历</label>
+                                                        <select class="form-control" id="study_abroad" >
+                                                            <option value="">{eq name="study_abroad" value="2"}否{else/}是{/eq}</option>
+                                                        </select>
+                                                    </div>                                                
+                                                    {if condition="$info['abroad_school']"}   
+                                                    <div class="rowGroup col-sm-3 abroad_need_this">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
+                                                        <input type="text" class="form-control" id="abroad_school" value="{$info.abroad_school}" maxlength="11"/>
+                                                    </div>
+                                                    {/if}                                                
+                                                    {if condition="$info['abroad_major']"}   
+                                                    <div class="rowGroup col-sm-3 abroad_need_this">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
+                                                        <input type="text" class="form-control" id="abroad_major" value="{$info.abroad_major}" maxlength="11"/>
+                                                    </div>
+                                                    {/if}
+                                                </div>
+                                            </div>                     
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                            <div class="row">
+                                                <div class="col-sm-10">                                                    
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>本单位入职时间</label>
                                                         <input type="text" class="form-control date" id="cur_entry_time" value="{$info.cur_entry_time}"/>
@@ -193,25 +246,44 @@
                                                         <label class="control-label spacing"><span style="color: red">*</span>本单位现任职务</label>
                                                         <input type="text" class="form-control" id="position" value="{$info.position}"/>
                                                     </div>
+                                                    {if condition="$info['professional']"}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing">专业技术职称</label>
+                                                        <input type="text" class="form-control" id="professional" value="{$info.professional}"/>
+                                                    </div>{/if}
+                                                </div>
+                                            </div>               
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                            <div class="row">
+                                                <div class="col-sm-10">
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>引进方式</label>
+                                                        <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式">
+                                                            <option value="">{$info.importWayName}</option>
+                                                        </select>
+                                                    </div>
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>申报来源</label>
                                                         <select class="form-control" id="source" >
-                                                            <option>{$info.sourceName}</option>
+                                                            <option value="">{$info.sourceName}</option>
                                                         </select>
                                                     </div>
                                                     {if condition="$info['source_city']"}
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
                                                         <select class="form-control" id="source_city" name="source_city">
-                                                            <option>{$info.sourceCityName}</option>
+                                                            <option value="">{$info.sourceCityName}</option>
                                                         </select>
                                                     </div>
                                                     {/if}
                                                     {if condition="$info['source_county']"}
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
-                                                        <select class="form-control" id="source_county" name="source_county">                                                            
-                                                            <option>{$info.sourceCountyName}</option>
+                                                        <select class="form-control" id="source_county" name="source_county">
+                                                            <option value="">{$info.sourceCountyName}</option>
                                                         </select>
                                                     </div>
                                                     {/if}
@@ -248,34 +320,23 @@
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>人才层次</label>
                                                         <select class="form-control" id="talent_arrange" name="talent_arrange">
-                                                            <option>{$info.talentArrangeName}</option>
+                                                            <option value="">{$info.talentArrangeName}</option>
                                                         </select>
                                                     </div>
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>认定条件</label>
-                                                        <select class="form-control" >
-                                                            <option>{$info.talentConditionName}</option>
+                                                        <select class="form-control" id="talent_condition">
+                                                            <option value="{$info.talent_condition}">{$info.talentConditionName}</option>
                                                         </select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>最高学历</label>
-                                                        <select class="form-control" >
-                                                            <option>{$info.highestDegreeName}</option>
-                                                        </select>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
-                                                        <input type="text" class="form-control" id="graduate_school" value="{$info.graduate_school}">
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
-                                                        <input type="text" class="form-control" id="major" value="{$info.major}"/>
-                                                    </div>
-                                                    {if condition="$info['professional']"}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing">专业技术职称</label>
-                                                        <input type="text" class="form-control" id="professional" value="{$info.professional}"/>
-                                                    </div>{/if}
+                                                </div>
+                                            </div>                    
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                            <div class="row">
+                                                <div class="col-sm-10">
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>开户银行</label>
                                                         <input type="text" class="form-control" onchange="" id="bank" value="{$info.bank}" placeholder="XX银行"/>
@@ -292,37 +353,11 @@
                                                         <label class="control-label spacing"><span style="color: red">*</span>银行账号</label>
                                                         <input type="text" class="form-control" id="bank_account" value="{$info.bank_account}" />
                                                     </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing">是否有留学经历</label>
-                                                        <select class="form-control" id="study_abroad" >
-                                                            <option value="2" {eq name="study_abroad" value="2"}selected{/eq} >否</option>
-                                                            <option value="1" {eq name="study_abroad" value="1"}selected{/eq} >是</option>
-                                                        </select>
-                                                    </div>                                                
-                                                    {if condition="$info['abroad_school']"}   
-                                                    <div class="rowGroup col-sm-3 abroad_need_this">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
-                                                        <input type="text" class="form-control" id="abroad_school" value="{$info.abroad_school}" maxlength="11"/>
-                                                    </div>
-                                                    {/if}                                                
-                                                    {if condition="$info['abroad_major']"}   
-                                                    <div class="rowGroup col-sm-3 abroad_need_this">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
-                                                        <input type="text" class="form-control" id="abroad_major" value="{$info.abroad_major}" maxlength="11"/>
-                                                    </div>
-                                                    {/if}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>手机号码</label>
-                                                        <input type="text" class="form-control" id="phone" value="{$info.phone}" maxlength="11"/>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>电子邮箱</label>
-                                                        <input type="text" class="form-control" id="email" value="{$info.email}"/>
-                                                    </div>
                                                 </div>
-                                            </div>
-                                            <div class="row">
-                                                <label class="col-sm-12 control-label spacing" style="text-align: left"><span style="color: red">声明:本人对输入材料的真实性负全部责任</span></label>
+                                            </div>                    
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
                                             </div>
                                         </div>
                                     </div> 

+ 21 - 9
app/common/api/DictApi.php

@@ -193,7 +193,7 @@ class DictApi {
         }
         return array_merge($dict1, $dict2);
     }
-    
+
     // 1保存未提交 2已提交未审核 3已审核 4驳回 5保存补充材料未提交 6提交补充材料进入初审 7初审通过 8初审驳回 9部门审核通过 10部门审核驳回 11复核通过 12复核驳回 13复核失败
     public static function getTalentInfoStepByState($state) {
         $stepName = "";
@@ -224,7 +224,7 @@ class DictApi {
         return $stepName;
     }
 
-    public static function getTalentInfoStateName($state) {
+    public static function getTalentInfoStateName($state, $step = 0, $needDeptVerify = false) {
         $str = "";
         switch ($state) {
             case 1:
@@ -246,16 +246,28 @@ class DictApi {
                 $str = '<span class="label label-success">待初审</span>';
                 break;
             case 7:
-                $str = '<span class="label label-success">待复核</span>';
+                if ($needDeptVerify) {
+                    $str = '<span class="label label-success">待部门审核</span>';
+                } else {
+                    $str = '<span class="label label-success">待复核</span>';
+                }
                 break;
             case 8:
                 $str = '<span class="label label-success">待初审</span>';
                 break;
             case 9:
-                $str = '<span class="label label-success">待复核</span>';
+                if ($step == 3) {
+                    $str = '<span class="label label-primary">部门通过</span>';
+                } else {
+                    $str = '<span class="label label-success">待复核</span>';
+                }
                 break;
             case 10:
-                $str = '<span class="label label-success">待初审</span>';
+                if ($step == 3) {
+                    $str = '<span class="label label-danger">部门驳回</span>';
+                } else {
+                    $str = '<span class="label label-success">待初审</span>';
+                }
                 break;
             case 11:
                 $str = '<span class="label label-primary">复核通过</span>';
@@ -270,10 +282,10 @@ class DictApi {
         return $str;
     }
 
-    public static function findByParentCodeAndCode($parentCode, $code){
-        $parent_info = Dict::where('code',$parentCode)->findOrEmpty();
-        if($parent_info){
-            return Dict::where('pid',$parent_info['id'])->where('code',$code)->findOrEmpty();
+    public static function findByParentCodeAndCode($parentCode, $code) {
+        $parent_info = Dict::where('code', $parentCode)->findOrEmpty();
+        if ($parent_info) {
+            return Dict::where('pid', $parent_info['id'])->where('code', $code)->findOrEmpty();
         }
         return false;
     }

+ 42 - 4
app/common/api/TalentLogApi.php

@@ -15,7 +15,10 @@ class TalentLogApi {
         $where[] = ["type", "=", $type];
         $where[] = ["mainId", "=", $mainId];
         $where[] = ["active", "=", $active];
-        return $list = TalentLog::where($where)->order("createTime desc")->select()->toArray();
+        $whr[] = ["step", "=", 3];
+        $whr[] = ["type", "=", $type];
+        $whr[] = ["mainId", "=", $mainId];
+        return $list = TalentLog::whereOr([$where, $whr])->order("createTime desc")->select()->toArray();
     }
 
     public static function getLastLog($mainId, $type, $companyId = 0) {
@@ -30,15 +33,49 @@ class TalentLogApi {
         return $last_log;
     }
 
-    public static function getListLogByTime($id, $time) {
+    public static function getLogByCompanyId($mainId, $companyId, $fst_dept_check_time) {
+        $where = [];
+        $where[] = ["mainId", "=", $mainId];
+        $where[] = ["companyId", "=", $companyId];
+        $where[] = ["createTime", ">=", $fst_dept_check_time];
+        $one = TalentLog::where($where)->findOrEmpty();
+        return $one;
+    }
+
+    public static function getListLogByTime($id, $time, $type = 1) {
         $where = [];
         $where[] = ["mainId", "=", $id];
+        $where[] = ["type", "=", $type];
         $where[] = ["createTime", ">=", $time];
+        $where[] = ["typeFileId", "null"];
         $list = TalentLog::where($where)->order("createTime desc")->select()->toArray();
         return $list;
     }
 
-    public static function write($type, $mainId, $state = [], $description = "", $active = 0, $fileType = null) {
+    public static function writeDeptLogs($mainId, $companyIds, $state = []) {
+        $user = session("user");
+        $last_log = self::getLastLog($mainId, 1);
+        for ($i = 0; $i < count($companyIds); $i++) {
+            $log["last_state"] = $last_log["state"] ?: 0;
+            $log["id"] = getStringId();
+            if (is_array($state)) {
+                $log["state"] = $state[0];
+                $log["new_state"] = $state[1];
+            } else {
+                $log["state"] = $log["new_state"] = $state;
+            }
+            $log["type"] = 1;
+            $log["mainId"] = $mainId;
+            $log["companyId"] = $companyIds[$i];
+            $log["description"] = "等待部门审核";
+            $log["step"] = 3; //部门审核阶段
+            $log["createUser"] = sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]);
+            $log["createTime"] = date("Y-m-d H:i:s");
+            TalentLog::create($log);
+        }
+    }
+
+    public static function write($type, $mainId, $state = [], $description = "", $active = 0, $fileType = null, $fileId = null) {
         $user = session("user");
         $last_log = self::getLastLog($mainId, $type);
         $log["last_state"] = $last_log["state"] ?: 0;
@@ -52,6 +89,7 @@ class TalentLogApi {
         $log["type"] = $type;
         $log["mainId"] = $mainId;
         $log["typeFileId"] = $fileType;
+        $log["fileId"] = $fileId;
         $log["companyId"] = $user["companyId"];
         $log["active"] = $active;
         $log["description"] = $description;
@@ -81,7 +119,7 @@ class TalentLogApi {
         $user = session("user");
         $data["id"] = $id;
         $data["active"] = $value;
-        $data["updateUser"] = sprintf("%s(%s)", $user["account"], $user["rolename"]);
+        $data["updateUser"] = sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]);
         $data["updateTime"] = date("Y-m-d H:i:s");
         return TalentLog::update($data);
     }

+ 49 - 2
app/common/api/VerifyApi.php

@@ -65,7 +65,7 @@ class VerifyApi {
                 $info["sourceName"] = DictApi::selectByParentCode("source")[$info["source"]];
             }
             if ($info["source_city"]) {
-                $info["sourceCityName"] = Db::table("un_common_location")->where("code", "=", $info["source_county"])->findOrEmpty()["name"];
+                $info["sourceCityName"] = Db::table("un_common_location")->where("code", "=", $info["source_city"])->findOrEmpty()["name"];
             }
             if ($info["source_county"]) {
                 $info["sourceCountyName"] = Db::table("un_common_location")->where("code", "=", $info["source_county"])->findOrEmpty()["name"];
@@ -84,6 +84,50 @@ class VerifyApi {
         return Talent::findOrEmpty($id);
     }
 
+    public static function getDeptList($request) {
+        $where = [];
+        $order = trim($request->param("order")) ?: "desc";
+        $offset = trim($request->param("offset")) ?: 0;
+        $limit = trim($request->param("limit")) ?: 10;
+
+        $process = $request->param("process");
+        switch ($process) {
+            case 1:
+                $where[] = ["ti.checkState", "=", 2];
+                break;
+            case 2:
+                $where[] = ["ti.checkState", "=", 6];
+                break;
+            case 3:
+                $where[] = ["ti.checkState", "=", 7];
+                break;
+            case 4:
+                $where[] = ["ti.checkState", "=", 9];
+                break;
+        }
+        $companyId = session("user")["companyId"];
+        $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
+        $count = Talent::alias("ti")
+                        ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
+                        ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->where($where)
+                        ->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])->count();
+        $list = Talent::alias("ti")
+                        ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
+                        ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->where($where)
+                        ->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])
+                        ->field("ti.*,e.agentName,e.type as enterprise_type,enterpriseTag")
+                        ->limit($offset, $limit)->order("ti.createTime " . $order)
+                        ->select()->toArray();
+        foreach ($list as &$item) {
+            $item["enterprise_name"] = $item["agentName"];
+            $item["talent_type"] = $item["enterprise_type"] == 1 ? "晋江优秀人才" : "集成电路优秀人才";
+            $item["enterprise_tag"] = $enterprise_tag_kvs[$item["enterpriseTag"]];
+        }unset($item);
+        return ["total" => $count, "rows" => $list];
+    }
+
     public static function getList($request) {
         $where = [];
         $order = trim($request->param("order")) ?: "desc";
@@ -91,6 +135,9 @@ class VerifyApi {
         $limit = trim($request->param("limit")) ?: 10;
 
         $process = $request->param("process");
+        if ($process == 3) {
+            return self::getDeptList($request);
+        }
         switch ($process) {
             case 1:
                 $where[] = ["ti.checkState", "=", 2];
@@ -108,7 +155,7 @@ class VerifyApi {
         $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
         $count = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->where($where)->count();
         $list = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
-                ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.agentName,e.type as enterprise_type,enterpriseTag")->select()->toArray();
+                        ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.agentName,e.type as enterprise_type,enterpriseTag")->select()->toArray();
         foreach ($list as &$item) {
             $item["enterprise_name"] = $item["agentName"];
             $item["talent_type"] = $item["enterprise_type"] == 1 ? "晋江优秀人才" : "集成电路优秀人才";

+ 117 - 33
app/common/controller/Api.php

@@ -11,6 +11,8 @@ use app\common\api\DictApi;
 use app\common\model\CurrentcyFileType;
 use app\common\model\TalentCommonFile;
 use app\common\api\UploadApi;
+use app\common\api\TalentConditionApi;
+use app\common\api\CompanyApi;
 
 /**
  * 需要权限的公共方法放这
@@ -38,18 +40,53 @@ class Api extends BaseController {
             $enterprise = \app\common\model\Enterprise::findOrEmpty($talentInfo["enterprise_id"]);
             $type = $enterprise["type"];
         }
-        $list = \app\common\api\TalentConditionApi::getList($params["level"], $type);
+        $list = TalentConditionApi::getList($params["level"], $type);
         return json($list, 200);
     }
 
+    public function getTalentCondtionUploadFile() {
+        $param = $this->request->param();
+        $id = $param["mainId"];
+        $order = $param["order"];
+        $project = $param["project"];
+        $type = $param["type"];
+        $talent_condition = $param["talent_condition"];
+
+        $condition_info = Db::table("new_talent_condition")->findOrEmpty($talent_condition);
+
+        if (!$condition_info["bindFileTypes"])
+            return json(["rows" => null]);
+
+        $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
+        $rows = Db::table("new_common_filetype")->where($whr)->order("sn " . $order)->select()->toArray();
+        if ($id) {
+            foreach ($rows as $key => $row) {
+                $where = [];
+                $where[] = ["mainId", "=", $id];
+                $where[] = ["typeId", "=", $row["id"]];
+                $files = Db::table("new_talent_file")->where($where)->field("id,typeId,orignName,url")->order("sn asc")->select()->toArray();
+                foreach ($files as &$file) {
+                    $file["url"] = "/storage/" . $file["url"];
+                }
+                $rows[$key]["files"] = $files;
+            }
+        }
+        return json(["rows" => $rows]);
+    }
+
     public function getCheckLog() {
         $params = $this->request->param();
         $mainId = $params["mainId"];
         $type = $params["type"];
+        $talentInfo = TalentApi::getOne($mainId);
+        $condition = TalentConditionApi::getOne($talentInfo["talent_condition"]);
+        $needDeptVerify = false;
+        if ($condition["companyIds"])
+            $needDeptVerify = true;
         $list = TalentLogApi::getList($type, $mainId);
         $new_list = [];
         foreach ($list as $item) {
-            $new_item["stepName"] = DictApi::getTalentInfoStepByState($item["state"]);
+            $new_item["stepName"] = DictApi::getTalentInfoStepByState($item["new_state"]);
             if ($item["state"] == 13) {
                 $new_item["stateName"] = '<span class="label label-success">审核不通过</span>';
             } else if (in_array($item["state"], [3, 7, 9, 11])) {
@@ -59,14 +96,23 @@ class Api extends BaseController {
             } else {
                 $new_item["stateName"] = '<span class="label label-success">待审核</span>';
             }
-            if ($item["last_state"] && $item["state"]) {
-                $new_item["stateChange"] = sprintf("%s -> %s", DictApi::getTalentInfoStateName($item["last_state"]), DictApi::getTalentInfoStateName($item["state"]));
+            if ($item["step"] == 3) {
+                $company = CompanyApi::getOne($item["companyId"]);
+                if ($item["active"] == 0) {
+                    $new_item["stateChange"] = str_replace("部门", '"' . $company["name"] . '"', DictApi::getTalentInfoStateName($item["last_state"], $item["step"], $needDeptVerify));
+                } else {
+                    $new_item["stateChange"] = sprintf("%s -> %s", str_replace("部门", '"' . $company["name"] . '"', DictApi::getTalentInfoStateName($item["last_state"], $item["step"], $needDeptVerify)), DictApi::getTalentInfoStateName($item["new_state"], $item["step"], $needDeptVerify));
+                }
             } else {
-                $new_item["stateChange"] = "";
+                if ($item["last_state"] && $item["new_state"]) {
+                    $new_item["stateChange"] = sprintf("%s -> %s", DictApi::getTalentInfoStateName($item["last_state"], $item["step"], $needDeptVerify), DictApi::getTalentInfoStateName($item["new_state"], $item["step"], $needDeptVerify));
+                } else {
+                    $new_item["stateChange"] = "";
+                }
             }
             $new_item["description"] = $item["description"];
-            $new_item["createUser"] = $item["createUser"];
-            $new_item["createTime"] = $item["createTime"];
+            $new_item["createUser"] = $item["updateUser"] ?: $item["createUser"];
+            $new_item["createTime"] = $item["updateTime"] ?: $item["createTime"];
             $new_list[] = $new_item;
         }
         return json(["rows" => $new_list]);
@@ -74,6 +120,7 @@ class Api extends BaseController {
 
     public function findCommonFileType() {
         $param = $this->request->param();
+        $id = $param["mainId"];
         $order = $param["order"];
         $project = $param["project"];
         $type = $param["type"];
@@ -93,9 +140,21 @@ class Api extends BaseController {
             }
         }
         if ($whr) {
-            $rows = Db::table("new_common_filetype")->whereOr([$where, $whr])->order("sn " . $order)->select();
+            $rows = Db::table("new_common_filetype")->whereOr([$where, $whr])->order("sn " . $order)->select()->toArray();
         } else {
-            $rows = Db::table("new_common_filetype")->where($where)->order("sn " . $order)->select();
+            $rows = Db::table("new_common_filetype")->where($where)->order("sn " . $order)->select()->toArray();
+        }
+        if ($id) {
+            foreach ($rows as $key => $row) {
+                $where = [];
+                $where[] = ["mainId", "=", $id];
+                $where[] = ["typeId", "=", $row["id"]];
+                $files = Db::table("new_talent_file")->where($where)->field("id,typeId,orignName,url")->order("sn asc")->select()->toArray();
+                foreach ($files as &$file) {
+                    $file["url"] = "/storage/" . $file["url"];
+                }
+                $rows[$key]["files"] = $files;
+            }
         }
         return json(["rows" => $rows]);
     }
@@ -126,7 +185,26 @@ class Api extends BaseController {
             echo sprintf("<script>parent.%s(%s);</script>", $backName, json_encode($res));
             exit();
         }
-        $filestd = $upload->uploadOne($file, "image", "talent_files");
+        $mime = $file->getMime();
+        switch ($mime) {
+            case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"://xlsx
+            case "application/pdf"://pdf
+            case "application/vnd.ms-excel"://xls
+                $filestd = $upload->uploadOne($file, "file", "talent_files");
+                break;
+            case "image/jpg":
+            case "image/jpeg":
+            case "image/png":
+            case "image/gif":
+                $filestd = $upload->uploadOne($file, "image", "talent_files");
+                break;
+            default:
+                $res = ["msg" => "不支持的附件类型", "obj" => $index];
+                echo sprintf("<script>parent.%s(%s);</script>", $backName, json_encode($res));
+                exit();
+                break;
+        }
+        $change = false;
         if ($fileId) {
             if (!$this->chkIsFileOwner($mainId, $type)) {
                 $res = ["msg" => "删除失败", "obj" => $index];
@@ -138,6 +216,7 @@ class Api extends BaseController {
             if (file_exists($old_filepath))
                 unlink($old_filepath);
             $data["id"] = $fileId;
+            $change = true;
         }
         $data["mainId"] = $mainId;
         $data["type"] = $type;
@@ -146,9 +225,13 @@ class Api extends BaseController {
         $data["url"] = $filestd->filepath;
         $data["sn"] = $index;
         $data["createTime"] = time();
-        Db::table("new_talent_file")->save($data);
-        TalentLogApi::write($type, $mainId, 0, sprintf("添加附件,附件名为:%s", $data["orignName"]), 1, $fileTypeId);
-        $res = ["code" => 200, "msg" => "上传附件成功", "obj" => $index, "info" => $url];
+        if ($fileId) {
+            Db::table("new_talent_file")->save($data);
+        } else {
+            $fileId = Db::table("new_talent_file")->insertGetId($data);
+        }
+        TalentLogApi::write($type, $mainId, 0, sprintf("%s附件,附件名为:%s", $change ? "修改" : "添加", $data["orignName"]), 1, $fileTypeId, $fileId);
+        $res = ["code" => 200, "msg" => "上传附件成功", "obj" => $index, "info" => "/storage/" . $filestd->filepath, "typeId" => $fileTypeId, "id" => $fileId, "orignName" => $data["orignName"]];
         echo sprintf("<script>parent.%s(%s);</script>", $backName, json_encode($res));
     }
 
@@ -165,7 +248,7 @@ class Api extends BaseController {
                 unlink($filepath);
             }
             Db::table("new_talent_file")->delete($file["id"]);
-            TalentLogApi::write($file["type"], $file["mainId"], 0, sprintf("删除附件,附件名为:%s", $file["orignName"]), 1, $file["typeId"]);
+            TalentLogApi::write($file["type"], $file["mainId"], 0, sprintf("删除附件,附件名为:%s", $file["orignName"]), 1, $file["typeId"], $param["id"]);
             return json(["code" => 200, "msg" => "删除成功"]);
         }
         return json(["msg" => "不能删除"]);
@@ -248,6 +331,8 @@ class Api extends BaseController {
     }
 
     private function chkIsFileOwner($mainId, $type) {
+        if (!$mainId)
+            return true;
         switch ($type) {
             case 1:
                 if ($this->user["usertype"] == 2) {
@@ -283,7 +368,7 @@ class Api extends BaseController {
         return json($list);
     }
 
-    public function listCurrencyFileType(){
+    public function listCurrencyFileType() {
         $where = [
             'type' => $this->request['type'],
             'active' => 1
@@ -292,31 +377,31 @@ class Api extends BaseController {
         return json(["rows" => $rows, 'total' => count($rows)]);
     }
 
-    public function listTalentCommonFile(){
+    public function listTalentCommonFile() {
         $where = [];
-        if(\StrUtil::isNotEmpAndNull($this->request['mainId'])){
-            $where[] = ['mainId','=',$this->request['mainId']];
+        if (\StrUtil::isNotEmpAndNull($this->request['mainId'])) {
+            $where[] = ['mainId', '=', $this->request['mainId']];
         }
-        if(\StrUtil::isNotEmpAndNull($this->request['typeId'])){
-            $where[] = ['typeId','=',$this->request['typeId']];
+        if (\StrUtil::isNotEmpAndNull($this->request['typeId'])) {
+            $where[] = ['typeId', '=', $this->request['typeId']];
         }
         $res = TalentCommonFile::where($where)->order('sn')->select();
-        if($res){
-            foreach ($res as $k => &$v){
+        if ($res) {
+            foreach ($res as $k => &$v) {
                 $v['url'] = "/storage/" . $v['url'];
             }
         }
         return json($res);
     }
 
-    public function addTalentCommonFile(){
-        $backName = \StrUtil::getRequestDecodeParam($this->request,'backName');
+    public function addTalentCommonFile() {
+        $backName = \StrUtil::getRequestDecodeParam($this->request, 'backName');
         $id = \StrUtil::getRequestDecodeParam($this->request, "fileId");
         $mainId = \StrUtil::getRequestDecodeParam($this->request, "mainId");
         $typeId = \StrUtil::getRequestDecodeParam($this->request, "typeId");
         $index = \StrUtil::getRequestDecodeParam($this->request, "index");
 
-        if($backName == "EpChangeEdit.callBack"){
+        if ($backName == "EpChangeEdit.callBack") {
             $type = 1;
             $error = "文件格式不正确,只能上传图片";
         } else {
@@ -324,9 +409,9 @@ class Api extends BaseController {
             $error = "文件格式不正确,只能上传pdf和图片";
         }
         $uploadapi = new UploadApi();
-        $file_check_res = $uploadapi->uploadOne($this->request->file('fileUrl'),'system');
-        if($file_check_res->code == 500){
-            return \StrUtil::back($file_check_res,"Register.epCallBack");
+        $file_check_res = $uploadapi->uploadOne($this->request->file('fileUrl'), 'system');
+        if ($file_check_res->code == 500) {
+            return \StrUtil::back($file_check_res, "Register.epCallBack");
         }
 
         $file_data = [
@@ -337,11 +422,11 @@ class Api extends BaseController {
             'url' => $file_check_res->filepath
         ];
 
-        if(\StrUtil::isEmpOrNull($id)){
-            $tc = TalentCommonFile::where('mainId',$mainId)->where('typeId',$typeId)->order('sn','desc')->findOrEmpty();
-            if($tc){
+        if (\StrUtil::isEmpOrNull($id)) {
+            $tc = TalentCommonFile::where('mainId', $mainId)->where('typeId', $typeId)->order('sn', 'desc')->findOrEmpty();
+            if ($tc) {
                 $file_data['sn'] = $tc['sn'] + 1;
-            }else{
+            } else {
                 $file_data['sn'] = 1;
             }
             $file_data['createTime'] = date("y-m-d H:i:s");
@@ -365,5 +450,4 @@ class Api extends BaseController {
         }
     }
 
-
 }

+ 7 - 2
app/enterprise/api/TalentApi.php

@@ -30,7 +30,7 @@ class TalentApi {
         return Talent::findOrEmpty($id);
     }
 
-    public static function getList($request) {
+    public static function getList($request, $checkStates = []) {
         $order = trim($request->param("order")) ?: "desc";
         $offset = trim($request->param("offset")) ?: 0;
         $limit = trim($request->param("limit")) ?: 10;
@@ -47,6 +47,9 @@ class TalentApi {
         if (session("user")["usertype"] == 2) {
             $where[] = ["enterprise_id", "=", session("user")["uid"]];
         }
+        if ($checkStates) {
+            $where[] = ["checkState", "in", $checkStates];
+        }
         if ($name) {
             $where[] = ["name", "like", "%" . $name . "%"];
         }
@@ -91,14 +94,16 @@ class TalentApi {
         $list = Talent::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
         $talentTagList = DictApi::selectByParentCode("enterprise_tag"); //单位标签
         $talentArangeList = DictApi::selectByParentCode("talent_arrange"); //人才层次
+        $industries = DictApi::selectByParentCode("industry_field"); //产业
         $enterprise = \app\common\model\Enterprise::find(session("user")["uid"]);
-        //DictApi::selectByParentCode($code);
         foreach ($list as $key => $item) {
             $condition = TalentConditionApi::getOne($item["talent_condition"]);
             $list[$key]["talentArrangeName"] = isset($talentArangeList[$item["talent_arrange"]]) ? $talentArangeList[$item["talent_arrange"]] : "";
             $list[$key]["identifyConditionText"] = $condition["name"];
             $list[$key]["companyIds"] = $condition["companyIds"];
             $list[$key]["type"] = $enterprise["type"];
+            $list[$key]["enterpriseName"] = $enterprise["name"];
+            $list[$key]["industryName"] = $industries[$enterprise["industryFieldNew"]];
             $list[$key]["enterpriseTagName"] = $talentTagList[$enterprise["enterpriseTag"]];
             $last_log = TalentLogApi::getLastLog($item["id"], 1);
             $list[$key]["real_state"] = $last_log["state"];

+ 64 - 163
app/enterprise/controller/Base.php

@@ -23,7 +23,7 @@ class Base extends EnterpriseController {
     }
 
     public function list() {
-        $res = TalentApi::getList($this->request);
+        $res = TalentApi::getList($this->request, [TalentState::FST_SAVE, TalentState::FST_SUBMIT]);
         return json($res);
     }
 
@@ -59,22 +59,10 @@ class Base extends EnterpriseController {
                     exit;
                 }
             }
+            $files = $param["uploadFiles"];
 
-            $data["enterprise_id"] = $this->user["uid"];
-            $data["talent_type"] = $param["talent_type"];
-            $data["tax_insurance_month"] = $param["tax_insurance_month"];
-            $data["labor_contract_rangetime"] = $param["labor_contract_rangetime"];
-            $data["name"] = $param["name"];
-            $data["card_type"] = $param["card_type"];
-            $data["card_number"] = $param["card_number"];
-            $data["sex"] = $param["sex"];
-            $data["birthday"] = $param["birthday"];
-            $data["nationality"] = $param["nationality"];
-            $data["province"] = $param["province"];
-            $data["city"] = $param["city"];
-            $data["county"] = $param["county"];
-            $data["nation"] = $param["nation"];
-            $data["politics"] = $param["politics"];
+            $filed_dict = \app\common\api\DictApi::getTalentFields(1);
+            $data["headimgurl"] = $info["headimgurl"];
             if ($request->file()) {
                 $headimg = $request->file("photo");
                 if ($info && $info["headimgurl"]) {
@@ -86,81 +74,21 @@ class Base extends EnterpriseController {
                 $result = $upload->uploadOne($headimg, "image", "talent/photo");
                 $data["headimgurl"] = $result->filepath;
             }
-            if ($id > 0) {
-                TalentModel::update($data);
-            } else {
-                $data["checkState"] = TalentState::FST_SAVE;
-                $id = TalentModel::insertGetId($data);
-                TalentLogApi::write(1, $id, TalentState::FST_SAVE, "添加人才认定申报", 1);
-            }
-            if ($id) {
-                $res = ["code" => 200, "msg" => "保存成功", "obj" => ["id" => $id, "checkState" => TalentState::FST_SAVE]];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-            } else {
-                $res = ["msg" => "保存失败"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-            }
-            exit();
-        }
-        $checkState = $info["checkState"] ?: 0;
-        $enterprise_info = \app\common\model\Enterprise::find($this->user["uid"]);
-        $info["enterprise"] = $enterprise_info;
-        $info["talent_type_list"] = \app\common\api\DictApi::findChildDictByCode("talent_type");
-        return view("first", ["year" => date("Y"), "checkState" => $checkState, "row" => $info]);
-    }
-
-    private function second(\think\Request $request) {
-        $params = $request->param();
-        $id = $params["id"];
-        if ($request->isPost()) {
-            $batch = \app\common\api\BatchApi::getValidBatch(1, $this->user["type"]);
-            if (!$batch) {
-                $res = ["msg" => "不在人才认定申报申请时间内"];
+            if (!$data["headimgurl"]) {
+                $res = ["msg" => "请上传头像"];
                 echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
                 exit;
             }
+            $no_empty = ["talent_type", "name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "nation", "politics"];
 
-            $field_dict = \app\common\api\DictApi::getTalentFields(2);
-            //可以用匹配键的方式,可以少很多代码。。先这样吧。
-            $all_valid_keys = ["applay_year", "fst_work_time", "import_way", "cur_entry_time", "position",
-                "source", "source_batch", "fujian_highcert_pubtime", "fujian_highcert_exptime", "quanzhou_highcert_pubtime", "quanzhou_highcert_exptime", "source_city", "source_county",
-                "talent_arrange", "talent_condition", "highest_degree", "graduate_school", "major", "professional", "bank", "bank_number", "bank_branch_name", "bank_account",
-                "study_abroad", "abroad_school", "abroad_major", "phone", "email"];
-            foreach ($all_valid_keys as $key) {
-                $data[$key] = trim($params[$key]);
-                if (strpos($key, "time") !== false && strtotime($params[$key]) === false) {
-                    unset($data[$key]); //时间格式的验证不通过就清掉,下面判断是否为空如果赫然在列就不能通过
-                }
-            }
-
-            $no_empty = ["talent_arrange", "talent_condition", "highest_degree", "graduate_school", "major", "professional", "bank", "bank_number", "bank_branch_name",
-                "bank_account", "study_abroad", "phone", "email", "import_way", "fst_work_time", "cur_entry_time", "cur_entry_time", "position", "source"];
-
-            if ($data["study_abroad"] == 1) {
-                $no_empty[] = "abroad_school";
-                $no_empty[] = "abroad_major";
-            }
-            if (in_array($data["source"], [1, 3])) {
-                $no_empty[] = "source_batch";
-                $no_empty[] = "fujian_highcert_pubtime";
-                $no_empty[] = "fujian_highcert_exptime";
-                if ($data["source"] == 3) {
-                    $no_empty[] = "source_city";
-                }
-            }
-            if (in_array($data["source"], [2, 4])) {
-                $no_empty[] = "source_batch";
-                $no_empty[] = "quanzhou_highcert_pubtime";
-                $no_empty[] = "quanzhou_highcert_exptime";
-                if ($data["source"] == 4) {
-                    $no_empty[] = "source_county";
-                }
-            }
-            $no_empty = array_filter($no_empty);
+            if (in_array($param["talent_type"], [1, 2]))
+                $no_empty[] = "tax_insurance_month";
+            if ($param["talent_type"] == 3)
+                $no_empty[] = "labor_contract_rangetime";
             $return = [];
             foreach ($no_empty as $key) {
-                if (!$data[$key]) {
-                    $return[] = sprintf("请填写“%s”", $field_dict[$key]);
+                if (!$param[$key]) {
+                    $return[] = sprintf("请填写“%s”", $filed_dict[$key]);
                 }
             }
             if (count($return) > 0) {
@@ -168,71 +96,66 @@ class Base extends EnterpriseController {
                 echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
                 exit;
             }
-            if (!preg_match("/^(13|14|15|17|18|19)[\d]{9}$/", $data["phone"])) {
-                $res = ["msg" => "手机号码格式错误"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-            if (!filter_var($data["email"], FILTER_VALIDATE_EMAIL)) {
-                $res = ["msg" => "电子邮箱格式错误"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-
-            if (!in_array($data["talent_arrange"], [1, 2, 3, 4, 5, 6, 7])) {
-                $res = ["msg" => "人才层次只能在预设范围内选择"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-            if (!in_array($data["source"], [1, 2, 3, 4, 5])) {
-                $res = ["msg" => "来源只能在预设范围内选择"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                exit;
-            }
-
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($params["talent_condition"]);
-
-            if ($condition_info["bindFileTypes"]) {
-                $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
-                $whr[] = ["must", "=", 1];
-            }
             $where = [];
-            $where[] = ["step", "=", 2];
+            $where[] = ["step", "=", 1];
             $where[] = ["project", "=", 1];
             $where[] = ["type", "=", $this->user["type"]];
             $where[] = ["must", "=", 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();
-            }
+            $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];
-            $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
-
+            $upload_type_counts = 0;
+            if ($files) {
+                $whr[] = ["typeId", "in", $ft_ids];
+                $whr[] = ["id", "in", $files];
+                $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
+            }
             if ($upload_type_counts != count($ft_ids)) {
                 $res = ["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
                 echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
                 exit;
             }
-            $data["apply_year"] = $batch["batch"];
-            $data["id"] = $id;
-            $data["checkState"] = TalentState::SCND_SAVE;
-            if (TalentModel::update($data)) {
-                $res = ["code" => 200, "msg" => "保存成功", "obj" => ["id" => $id, "checkState" => TalentState::SCND_SAVE]];
+
+            $data["enterprise_id"] = $this->user["uid"];
+            $data["talent_type"] = $param["talent_type"];
+            $data["tax_insurance_month"] = $param["tax_insurance_month"];
+            $data["labor_contract_rangetime"] = $param["labor_contract_rangetime"];
+            $data["name"] = $param["name"];
+            $data["card_type"] = $param["card_type"];
+            $data["card_number"] = $param["card_number"];
+            $data["sex"] = $param["sex"];
+            $data["birthday"] = $param["birthday"];
+            $data["nationality"] = $param["nationality"];
+            $data["province"] = $param["province"];
+            $data["city"] = $param["city"];
+            $data["county"] = $param["county"];
+            $data["nation"] = $param["nation"];
+            $data["politics"] = $param["politics"];
+            if ($id > 0) {
+                TalentModel::update($data);
+            } else {
+                $data["checkState"] = TalentState::FST_SAVE;
+                $id = TalentModel::insertGetId($data);
+                TalentLogApi::write(1, $id, TalentState::FST_SAVE, "添加人才认定申报", 1);
+            }
+            if ($id) {
+                $whr = [];
+                $whr[] = ["id", "in", $files];
+                Db::table("new_talent_file")->where($whr)->save(["mainId" => $id]);
+                $res = ["code" => 200, "msg" => "保存成功", "obj" => ["id" => $id, "checkState" => TalentState::FST_SAVE]];
                 echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
             } else {
-                $res = ["code" => 500, "msg" => "保存失败"];
+                $res = ["msg" => "保存失败"];
                 echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
             }
+            exit();
         }
-        $info = \app\common\api\VerifyApi::getTalentInfoById($id);
+        $checkState = $info["checkState"] ?: 0;
         $enterprise_info = \app\common\model\Enterprise::find($this->user["uid"]);
         $info["enterprise"] = $enterprise_info;
-        $batch = \app\common\api\BatchApi::getValidBatch(1, $enterprise_info["type"]);
-        return view("second", ["year" => $batch["batch"], "row" => $info]);
+        $info["talent_type_list"] = \app\common\api\DictApi::findChildDictByCode("talent_type");
+        return view("first", ["year" => date("Y"), "checkState" => $checkState, "row" => $info]);
     }
 
     public function view(\think\Request $request) {
@@ -250,25 +173,7 @@ class Base extends EnterpriseController {
         if ($checkState == TalentState::BASE_VERIFY_PASS || $checkState == 0) {
             return json(["msg" => '请先保存资料并上传相应附件后再点击提交审核']);
         } else if ($checkState == TalentState::FST_SAVE) {
-            $filed_dict = \app\common\api\DictApi::getTalentFields(1);
             //初次提交材料
-            $change_state = TalentState::FST_SUBMIT; //等待审核
-            if (!$info["headimgurl"])
-                return json(["msg" => "请上传头像"]);
-            $no_empty = ["talent_type", "name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "nation", "politics"];
-
-            if (in_array($info["talent_type"], [1, 2]))
-                $no_empty[] = "tax_insurance_month";
-            if ($info["talent_type"] == 3)
-                $no_empty[] = "labor_contract_rangetime";
-            $return = [];
-            foreach ($no_empty as $key) {
-                if (!$info[$key]) {
-                    $return[] = sprintf("请填写“%s”", $filed_dict[$key]);
-                }
-            }
-            if (count($return) > 0)
-                return json(["msg" => implode("<br>", $return)]);
             $where = [];
             $where[] = ["step", "=", 1];
             $where[] = ["project", "=", 1];
@@ -278,12 +183,17 @@ class Base extends EnterpriseController {
 
             $ft_ids = array_column($filetypes, "id");
             $whr = [];
-            $whr[] = ["typeId", "in", $ft_ids];
-            $whr[] = ["mainId", "=", $info["id"]];
-            $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
-            if ($upload_type_counts != count($ft_ids))
+            $upload_type_counts = 0;
+            if ($ft_ids) {
+                $whr[] = ["typeId", "in", $ft_ids];
+                $whr[] = ["mainId", "=", $id];
+                $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
+            }
+            if ($upload_type_counts != count($ft_ids)) {
                 return json(["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"]);
+            }
 
+            $change_state = TalentState::FST_SUBMIT; //等待审核
             $data["id"] = $id;
             $data["checkState"] = $change_state;
             $data["first_submit_time"] = date("Y-m-d H:i:s");
@@ -291,15 +201,6 @@ class Base extends EnterpriseController {
             TalentModel::update($data);
             TalentLogApi::write(1, $id, $change_state, "提交基础判定材料待审核", 1);
             return json(["code" => 200, "msg" => "提交成功"]);
-        } else if ($checkState == TalentState::SCND_SAVE) {
-            $change_state = TalentState::SCND_SUBMIT; //等待初审
-            $data["id"] = $id;
-            $data["checkState"] = $change_state;
-            $data["active"] = 1;
-            $data["new_submit_time"] = date("Y-m-d H:i:s");
-            TalentModel::update($data);
-            TalentLogApi::write(1, $id, $change_state, "确认提交审核", 1);
-            return json(["code" => 200, "msg" => "提交成功"]);
         } else if ($checkState == TalentState::REVERIFY_FAIL) {
             return ["msg" => "审核失败,不能再提交审核"];
         }

+ 17 - 115
app/enterprise/controller/Talent.php

@@ -27,89 +27,7 @@ class Talent extends EnterpriseController {
         return json($res);
     }
 
-    public function add() {
-        $request = $this->request;
-        $param = $request->param();
-        $id = isset($param["id"]) ? $param["id"] : 0;
-        $info = self::chkIsOwner($id, $this->user["uid"]);
-        if ($info && in_array($info["checkState"], [TalentState::BASE_VERIFY_PASS, TalentState::SCND_SAVE])) {
-            return $this->second($request);
-            exit();
-        }
-        if ($info && in_array($info["checkState"], [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS, TalentState::REVERIFY_PASS, TalentState::REVERIFY_FAIL])) {
-            return $this->view($request);
-            exit();
-        }
-        if ($request->isPost()) {
-            if ($id) {
-                $data["id"] = $id;
-                if (!$info) {
-                    $res = ["msg" => "没有对应的人才认定申报信息"];
-                    echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                    exit;
-                }
-                if ($info["checkState"] == TalentState::REVERIFY_FAIL) {
-                    $res = ["msg" => "审核失败,不能再修改"];
-                    echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                    exit;
-                }
-                if (!in_array($info["checkState"], [TalentState::FST_SAVE, TalentState::BASE_VERIFY_PASS, TalentState::SCND_SAVE])) {
-                    $res = ["msg" => "审核中,不能修改"];
-                    echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-                    exit;
-                }
-            }
-
-            $data["enterprise_id"] = $this->user["uid"];
-            $data["talent_type"] = $param["talent_type"];
-            $data["tax_insurance_month"] = $param["tax_insurance_month"];
-            $data["labor_contract_rangetime"] = $param["labor_contract_rangetime"];
-            $data["name"] = $param["name"];
-            $data["card_type"] = $param["card_type"];
-            $data["card_number"] = $param["card_number"];
-            $data["sex"] = $param["sex"];
-            $data["birthday"] = $param["birthday"];
-            $data["nationality"] = $param["nationality"];
-            $data["province"] = $param["province"];
-            $data["city"] = $param["city"];
-            $data["county"] = $param["county"];
-            $data["nation"] = $param["nation"];
-            $data["politics"] = $param["politics"];
-            if ($request->file()) {
-                $headimg = $request->file("photo");
-                if ($info && $info["headimgurl"]) {
-                    $old_head_url = "storage/" . $info["headimgurl"];
-                    if (file_exists($old_head_url))
-                        unlink($old_head_url);
-                }
-                $upload = new \app\common\api\UploadApi();
-                $result = $upload->uploadOne($headimg, "image", "talent/photo");
-                $data["headimgurl"] = $result->filepath;
-            }
-            if ($id > 0) {
-                TalentModel::update($data);
-            } else {
-                $data["checkState"] = TalentState::FST_SAVE;
-                $id = TalentModel::insertGetId($data);
-                TalentLogApi::write(1, $id, TalentState::FST_SAVE, "添加人才认定申报", 1);
-            }
-            if ($id) {
-                $res = ["code" => 200, "msg" => "保存成功", "obj" => ["id" => $id, "checkState" => TalentState::FST_SAVE]];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-            } else {
-                $res = ["msg" => "保存失败"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
-            }
-            exit();
-        }
-        $checkState = $info["checkState"] ?: 0;
-        $enterprise_info = \app\common\model\Enterprise::find($this->user["uid"]);
-        $info["enterprise"] = $enterprise_info;
-        $info["talent_type_list"] = \app\common\api\DictApi::findChildDictByCode("talent_type");
-        return view("first", ["year" => date("Y"), "checkState" => $checkState, "row" => $info]);
-    }
-
-    private function second(\think\Request $request) {
+    public function second(\think\Request $request) {
         $params = $request->param();
         $id = $params["id"];
         if ($request->isPost()) {
@@ -232,7 +150,7 @@ class Talent extends EnterpriseController {
         $enterprise_info = \app\common\model\Enterprise::find($this->user["uid"]);
         $info["enterprise"] = $enterprise_info;
         $batch = \app\common\api\BatchApi::getValidBatch(1, $enterprise_info["type"]);
-        return view("second", ["year" => $batch["batch"], "row" => $info]);
+        return view("second", ["year" => $info["apply_year"] ?: $batch["batch"], "row" => $info]);
     }
 
     public function view(\think\Request $request) {
@@ -249,49 +167,33 @@ class Talent extends EnterpriseController {
         $checkState = $info["checkState"];
         if ($checkState == TalentState::BASE_VERIFY_PASS || $checkState == 0) {
             return json(["msg" => '请先保存资料并上传相应附件后再点击提交审核']);
-        } else if ($checkState == TalentState::FST_SAVE) {
-            $filed_dict = \app\common\api\DictApi::getTalentFields(1);
-            //初次提交材料
-            $change_state = TalentState::FST_SUBMIT; //等待审核
-            if (!$info["headimgurl"])
-                return json(["msg" => "请上传头像"]);
-            $no_empty = ["talent_type", "name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "nation", "politics"];
+        } else if ($checkState == TalentState::SCND_SAVE) {
+            $condition_info = Db::table("new_talent_condition")->findOrEmpty($info["talent_condition"]);
 
-            if (in_array($info["talent_type"], [1, 2]))
-                $no_empty[] = "tax_insurance_month";
-            if ($info["talent_type"] == 3)
-                $no_empty[] = "labor_contract_rangetime";
-            $return = [];
-            foreach ($no_empty as $key) {
-                if (!$info[$key]) {
-                    $return[] = sprintf("请填写“%s”", $filed_dict[$key]);
-                }
+            if ($condition_info["bindFileTypes"]) {
+                $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
+                $whr[] = ["must", "=", 1];
             }
-            if (count($return) > 0)
-                return json(["msg" => implode("<br>", $return)]);
             $where = [];
-            $where[] = ["step", "=", 1];
+            $where[] = ["step", "=", 2];
             $where[] = ["project", "=", 1];
             $where[] = ["type", "=", $this->user["type"]];
             $where[] = ["must", "=", 1];
-            $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
-
+            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", "=", $info["id"]];
+            $whr[] = ["mainId", "=", $id];
             $upload_type_counts = Db::table("new_talent_file")->where($whr)->distinct(true)->field("typeId")->count();
-            if ($upload_type_counts != count($ft_ids))
+
+            if ($upload_type_counts != count($ft_ids)) {
                 return json(["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"]);
+            }
 
-            $data["id"] = $id;
-            $data["checkState"] = $change_state;
-            $data["first_submit_time"] = date("Y-m-d H:i:s");
-            $data["active"] = 1;
-            TalentModel::update($data);
-            TalentLogApi::write(1, $id, $change_state, "提交基础判定材料待审核", 1);
-            return json(["code" => 200, "msg" => "提交成功"]);
-        } else if ($checkState == TalentState::SCND_SAVE) {
             $change_state = TalentState::SCND_SUBMIT; //等待初审
             $data["id"] = $id;
             $data["checkState"] = $change_state;

+ 36 - 34
app/enterprise/view/base/first.html

@@ -23,13 +23,17 @@
     .rowGroup{
         padding-bottom: 5px;
     }
-    .imgs li{
+    .imgs>li{
         list-style: none;
         float: left;
         border: 1px solid #d8d1d1;
         text-align: center;
-        height: 30px;
+        height: 35px;
+        width:100%;
+        padding:5px 0;
     }
+    .imgs li>div{float:left;}
+    .info td{background:#f5f5f5 !important;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -38,7 +42,7 @@
                 <div class="col-sm-12" >
                     <div class="tab-content">
                         <div id="tab-1" class="tab-pane active">
-                            <form id="talentInfoForm" action="/enterprise/talent/add" method="post" enctype="multipart/form-data" target="hiddenIframe">
+                            <form id="talentInfoForm" action="/enterprise/base/add" method="post" enctype="multipart/form-data" target="hiddenIframe">
                                 <div class="panel panel-default">
                                     <div class="panel-heading" onclick="$(this).next().toggle()">个人信息</div>
                                     <div class="panel-body">
@@ -58,12 +62,12 @@
                                                 <input type="hidden" name="step" id="step" value="1">                                                
                                                 <input type="hidden" name="files" id="files" value="{$row.modify_files}">
                                                 <input type="hidden" name="fields" id="fields" value="{$row.modify_fields}">
-                                                <div class="col-sm-11">
-                                                    <div class="rowGroup col-sm-4">
+                                                <div class="col-sm-10">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                         <input type="text" class="form-control" id="name" name="name"  value='{$row.name}'/>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>证件类型</label>
                                                         <select class="form-control" id="card_type" name="card_type" value='{$row.card_type}'>
                                                             <option value="">请选择</option>
@@ -72,11 +76,11 @@
                                                             <option value="3">护照</option>
                                                         </select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>证件号码</label>
                                                         <input class="form-control" id="card_number" name="card_number" value='{$row.card_number}'>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>性别</label>
                                                         <select class="form-control" id="sex" name="sex" value='{$row.sex}'>
                                                             <option value="">请选择</option>
@@ -84,15 +88,20 @@
                                                             <option value="2">女</option>
                                                         </select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
                                                         <input type="text" class="form-control date" id="birthday" name="birthday" value='{$row.birthday}'/>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <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-3">
+                                                        <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-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
                                                         <select class="form-control" id="nationality" name="nationality" value="{$row.nationality}">
@@ -111,26 +120,15 @@
                                                         <label class="control-label spacing"><span style="color: red">*</span>籍贯县</label>
                                                         <select class="form-control" id="county" name="county" value='{$row.county}'></select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <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="col-sm-1">
-                                                    <img id="photoImg" {if condition="$row['headimgurl']"} src="/storage/{$row.headimgurl}" {else/} src="/static/img/photo.png" {/if} onclick="$('#photo').click()" style="height: 110px;width: 76px;padding-bottom: 5px;">
+                                                <div class="col-sm-2">
+                                                    <img id="photoImg" {if condition="$row['headimgurl']"} src="/storage/{$row.headimgurl}" {else/} src="/static/img/photo.png" {/if} onclick="$('#photo').click();" style="height:147px;width:105px;margin:0 auto;display:block;">
                                                 </div>
                                             </div>
                                         </div>
-                                        <div class="row" style="border-top:1px solid #ddd;margin-top:20px;">
-                                            <ul class="list-unstyled">
-                                                <li style="margin:10px 0;overflow:hidden;">
-                                                    <div style="float:left;margin-left:25px;">身份证或护照上传</div>
-                                                    <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
-                                                        <i class="fa fa-upload"></i>上传
-                                                    </button>
-                                                </li>
-                                            </ul>
+                                        <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                            上传附件:                                      
+                                            <table class="fileTable"></table>
                                         </div>
                                     </div>
                                 </div>
@@ -138,7 +136,7 @@
                                     <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
                                     <div class="panel-body">
                                         <div class="row">
-                                            <div class="col-sm-12 form-group-sm">
+                                            <div class="col-sm-10 form-group-sm">
                                                 <div class="rowGroup col-sm-3">
                                                     <label class="control-label spacing"><span style="color: red">*</span>单位标签</label>
                                                     <select class="form-control" id="enterprise_tag"  value="{$row.enterprise.talentType}" disabled="disabled">
@@ -162,7 +160,7 @@
                                                     <select class="form-control" id="talent_type" name="talent_type" value="{$row.talent_type}" onchange="TalentInfoInfoDlg.talentTypeChange()">
                                                         <option value="">请选择</option>  
                                                         {volist name="row.talent_type_list" id="item"}
-                                                        <option value="{$item.id}">{$item.name}</option>        
+                                                        <option value="{$item.code}">{$item.name}</option>        
                                                         {/volist}
                                                     </select>
                                                 </div>
@@ -179,7 +177,7 @@
                                                 {else/}
                                                 <div class="rowGroup col-sm-3" style="display:none;">
                                                     <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                    <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
+                                                    <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value=""/>
                                                 </div>
                                                 {/if}                                                        
                                                 {if condition="$row['talent_type'] eq 3"}  
@@ -190,20 +188,22 @@
                                                 {else/}
                                                 <div class="rowGroup col-sm-3" style="display:none;">
                                                     <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}" />
+                                                    <input type="text" class="form-control rangedate" id="labor_contract_rangetime" name="labor_contract_rangetime" value="" />
                                                 </div> 
                                                 {/if}  
                                             </div>
                                         </div>
-                                        <div class="row" style="border-top:1px solid #ddd;margin-top:20px;">
-                                            <ul class="list-unstyled">
+                                        <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                            上传附件:
+                                            <table class="fileTable"></table>
+                                            <!--<ul class="list-unstyled">
                                                 <li style="margin:10px 0;overflow:hidden;">
                                                     <div style="float:left;margin-left:25px;" id="material_name">社保或所得税缴费记录</div>
                                                     <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
                                                         <i class="fa fa-upload"></i>上传
                                                     </button>
                                                 </li>
-                                            </ul>
+                                            </ul>-->
                                         </div>
                                     </div>
                                 </div>
@@ -214,6 +214,8 @@
                                 <input type='hidden' id="mainId" name="mainId" >
                                 <input type='hidden' id="fileTypeId" name="fileTypeId" >
                                 <input type='hidden' id="index" name="index" >
+                                <input type='hidden' id="tableIndex" name="tableIndex" >
+                                <input type='hidden' id="trIndex" name="trIndex" >
                                 <input type="hidden" name="backName" value="TalentInfoInfoDlg.callBack">
                                 <input type="type" name="type" value="1">
                             </form>
@@ -232,7 +234,7 @@
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
 <!--<script src="${ctxPath}/static/modular/gate/talentInfo/talentInfo_info.js"></script>-->
 <script type="text/javascript">
-    document.write('<script src="/static/modular/gate/talentInfo/talentInfo_info.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/talentBase/talentInfo_info.js?v=' + (new Date()).getTime() + '"><\/script>');
     document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 {/block}

+ 5 - 5
app/enterprise/view/base/index.html

@@ -11,7 +11,7 @@
     <div class="col-sm-12">
         <div class="ibox float-e-margins">
             <div class="ibox-title">
-                <h5>人才认定申报</h5>
+                <h5>基础条件申报</h5>
             </div>
             <div class="ibox-content">
                 <div class="row row-lg">
@@ -110,16 +110,16 @@
                         </div>
                         <div class="hidden-xs" id="TalentInfoTableToolbar" role="group">
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openAddTalentInfo()" id="">
-                                <i class="fa fa-plus"></i>&nbsp;添加
+                                <i class="fa fa-plus"></i>&nbsp;添加申报
                             </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openTalentInfoDetail()" id="">
-                                <i class="fa fa-edit"></i>&nbsp;修改
+                                <i class="fa fa-edit"></i>&nbsp;修改申报
                             </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openTalentInfoSelect()" id="">
-                                <i class="fa fa-book"></i>&nbsp;查看
+                                <i class="fa fa-book"></i>&nbsp;查看申报
                             </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.delete()" id="">
-                                <i class="fa fa-remove"></i>&nbsp;删除
+                                <i class="fa fa-remove"></i>&nbsp;删除申报
                             </button>
                         </div>
                         <table id="TalentInfoTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">

+ 51 - 200
app/enterprise/view/base/view.html

@@ -23,13 +23,17 @@
     .rowGroup{
         padding-bottom: 5px;
     }
-    .imgs li{
+    .imgs>li{
         list-style: none;
         float: left;
         border: 1px solid #d8d1d1;
         text-align: center;
-        height: 30px;
+        height: 35px;
+        width:100%;
+        padding:5px 0;
     }
+    .imgs li>div{float:left;}
+    .info td{background:#f5f5f5 !important;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -37,11 +41,10 @@
             <div class="row">
                 <div class="col-sm-12" >
                     <div class="tab-content">
-                        
                         <div id="tab-1" class="tab-pane active">
                             <div class="panel-body" >
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">申报信息</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">个人信息</div>
                                     <div class="panel-body">
                                         <form id="talentInfoForm" class="form-horizontal" autocomplete="off">
                                             <div class="col-sm-12 form-group-sm">
@@ -50,40 +53,7 @@
                                                 <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
                                                 <input type="hidden" name="talent_condition" id="talent_condition" value="{$row.talent_condition}">
                                                 <div class="row">
-                                                    <div class="col-sm-11">
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
-                                                            <select class="form-control" id="talent_type" name="talent_type" >
-                                                                <option value="" selected="true">{$row.talentTypeName}</option>
-                                                            </select>
-                                                        </div>
-                                                        {if condition="in_array($row['talent_type'],[1,2])"}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                            <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}" />
-                                                        </div>
-                                                        {else/}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <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}" />
-                                                        </div>
-                                                        {/if}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                                            <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$row.enterpriseName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
-                                                            <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$row.enterpriseTagName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
-                                                            <input type="text" class="form-control" id="street" name="street" value="{$row.streetName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>行业领域</label>
-                                                            <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$row.industryFieldName}">
-                                                        </div>
+                                                    <div class="col-sm-10">
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$row.name}" />
@@ -109,14 +79,6 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
                                                             <input type="text" class="form-control" id="birthday" name="birthday" value="{$row.birthday}"/>
                                                         </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
-                                                            <input class="form-control" id="nationality" name="nationality" value="{$row.nationalityName}">
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
-                                                            <input class="form-control" id="province" name="province" value="{$row.provinceName}{$row.cityName}{$row.countyName}"/>
-                                                        </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>民族</label>
                                                             <input class="form-control" id="nation" name="nation" value="{$row.nationName}"/>
@@ -125,191 +87,83 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
                                                             <input class="form-control" id="politics" name="politics" value="{$row.politicsName}"/>
                                                         </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
+                                                            <input class="form-control" id="nationality" name="nationality" value="{$row.nationalityName}">
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
+                                                            <input class="form-control" id="province" name="province" value="{$row.provinceName}{$row.cityName}{$row.countyName}"/>
+                                                        </div>
                                                     </div>
-                                                    <div class="col-sm-1">
-                                                        <img id="photoImg" src="{$row.headimgurl}"  style="height: 110px;width: 76px;padding-bottom: 5px;">
+                                                    <div class="col-sm-2">
+                                                        <img id="photoImg" src="{$row.headimgurl}"  style="height:147px;width:105px;margin:0 auto;display:block;">
                                                     </div>
                                                 </div>
-                                                <div class="row">
-                                                    <label class="col-sm-12 control-label spacing" style="text-align: left"><span style="color: red">声明:本人对输入材料的真实性负全部责任</span></label>
+                                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                    附件:                                      
+                                                    <table class="fileTable"></table>
                                                 </div>
                                             </div>
                                         </form>
                                     </div>
                                 </div>
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">个人信息填报及人才认定申请</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
                                     <div class="panel-body">
                                         <div class="col-sm-12 form-group-sm">
                                             <div class="row">
-                                                <div class="col-sm-11">                          
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing"><span style="color: red">*</span>申报年度</label>
-                                                        <input type="text" class="form-control" name="apply_year" id="apply_year" value="{$row.apply_year}" readonly disabled>
-                                                    </div>
+                                                <div class="col-sm-10">
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>首次来晋工作时间</label>
-                                                        <input type="text" class="form-control date" id="fst_work_time" value="{$row.fst_work_time}"/>
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
+                                                        <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$row.enterpriseTagName}" />
                                                     </div>
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing"><span style="color: red">*</span>引进方式</label>
-                                                        <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式">
-                                                            <option value="">{$row.importWayName}</option>
-                                                        </select>
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
+                                                        <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$row.enterpriseName}" />
                                                     </div>
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>本单位入职时间</label>
-                                                        <input type="text" class="form-control date" id="cur_entry_time" value="{$row.cur_entry_time}"/>
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
+                                                        <input type="text" class="form-control" id="street" name="street" value="{$row.streetName}" />
                                                     </div>
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>本单位现任职务</label>
-                                                        <input type="text" class="form-control" id="position" value="{$row.position}"/>
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>产业领域</label>
+                                                        <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$row.industryFieldName}">
                                                     </div>
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>申报来源</label>
-                                                        <select class="form-control" id="source" >
-                                                            <option value="">{$row.sourceName}</option>
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
+                                                        <select class="form-control" id="talent_type" name="talent_type" >
+                                                            <option value="" selected="true">{$row.talentTypeName}</option>
                                                         </select>
                                                     </div>
-                                                    {if condition="$row['source_city']"}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
-                                                        <select class="form-control" id="source_city" name="source_city">
-                                                            <option value="">{$row.sourceCityName}</option>
-                                                        </select>
+                                                    <div class="rowGroup col-sm-9" id="tipsBlock">
+                                                        <label class=" control-label spacing">说明</label>
+                                                        {switch name="row.talent_type"}
+                                                        {case value="1"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。"/>{/case}
+                                                        {case value="2"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业(不含企业集团内部人员调动)的人才。"/>{/case}
+                                                        {case value="3"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。"/>{/case}
+                                                        {/switch}
                                                     </div>
-                                                    {/if}
-                                                    {if condition="$row['source_county']"}
+                                                    {if condition="in_array($row['talent_type'],[1,2])"}
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
-                                                        <select class="form-control" id="source_county" name="source_county">
-                                                            <option value="">{$row.sourceCountyName}</option>
-                                                        </select>
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
+                                                        <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}" />
                                                     </div>
-                                                    {/if}
-                                                    {if condition="$row['source_batch']"}                                                
+                                                    {else/}
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing" ><span style="color: red">*</span>入选名单批次</label>
-                                                        <input type="text" class="form-control" id="source_batch" value="{$row.source_batch}"/>
+                                                        <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}" />
                                                     </div>
                                                     {/if}
-                                                    {if condition="$row['fujian_highcert_pubtime']"}                                                
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing" ><span style="color: red">*</span>福建省高层次人才证书发证日期</label>
-                                                        <input type="text" class="form-control date" id="fujian_highcert_pubtime" value="{$row.fujian_highcert_pubtime}"/>
-                                                    </div>
-                                                    {/if}
-                                                    {if condition="$row['fujian_highcert_exptime']"}                                                
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing" ><span style="color: red">*</span>福建省高层次人才证书有效期</label>
-                                                        <input type="text" class="form-control date" id="fujian_highcert_exptime" value="{$row.fujian_highcert_exptime}"/>
-                                                    </div>
-                                                    {/if}
-                                                    {if condition="$row['quanzhou_highcert_pubtime']"}    
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing" ><span style="color: red">*</span>泉州高层次人才证书发证日期</label>
-                                                        <input type="text" class="form-control date" id="quanzhou_highcert_pubtime" value="{$row.quanzhou_highcert_pubtime}"/>
-                                                    </div>
-                                                    {/if}
-                                                    {if condition="$row['quanzhou_highcert_exptime']"}    
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing" ><span style="color: red">*</span>泉州高层次人才证书有效期</label>
-                                                        <input type="text" class="form-control date" id="quanzhou_highcert_exptime" value="{$row.quanzhou_highcert_exptime}"/>
-                                                    </div>
-                                                    {/if}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>人才层次</label>
-                                                        <select class="form-control" id="talent_arrange" name="talent_arrange">
-                                                            <option value="">{$row.talentArrangeName}</option>
-                                                        </select>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>认定条件</label>
-                                                        <select class="form-control" >
-                                                            <option value="">{$row.talentConditionName}</option>
-                                                        </select>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>最高学历</label>
-                                                        <select class="form-control" >
-                                                            <option value="">{$row.highestDegreeName}</option>
-                                                        </select>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
-                                                        <input type="text" class="form-control" id="graduate_school" value="{$row.graduate_school}">
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
-                                                        <input type="text" class="form-control" id="major" value="{$row.major}"/>
-                                                    </div>
-                                                    {if condition="$row['professional']"}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing">专业技术职称</label>
-                                                        <input type="text" class="form-control" id="professional" value="{$row.professional}"/>
-                                                    </div>{/if}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>开户银行</label>
-                                                        <input type="text" class="form-control" onchange="" id="bank" value="{$row.bank}" placeholder="XX银行"/>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>银行行号</label>
-                                                        <input type="text" class="form-control" id="bank_number" value="{$row.bank_number}"/>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>开户银行网点</label>
-                                                        <input type="text" class="form-control" id="bank_branch_name" value="{$row.bank_branch_name}" placeholder="XX银行XX省XX市XX支行/分行/分理处"/>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>银行账号</label>
-                                                        <input type="text" class="form-control" id="bank_account" value="{$row.bank_account}" />
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing">是否有留学经历</label>
-                                                        <select class="form-control" id="study_abroad" >
-                                                            <option value="">{eq name="study_abroad" value="2"}否{else/}是{/eq}</option>
-                                                        </select>
-                                                    </div>                                                
-                                                    {if condition="$row['abroad_school']"}   
-                                                    <div class="rowGroup col-sm-3 abroad_need_this">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
-                                                        <input type="text" class="form-control" id="abroad_school" value="{$row.abroad_school}" maxlength="11"/>
-                                                    </div>
-                                                    {/if}                                                
-                                                    {if condition="$row['abroad_major']"}   
-                                                    <div class="rowGroup col-sm-3 abroad_need_this">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
-                                                        <input type="text" class="form-control" id="abroad_major" value="{$row.abroad_major}" maxlength="11"/>
-                                                    </div>
-                                                    {/if}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>手机号码</label>
-                                                        <input type="text" class="form-control" id="phone" value="{$row.phone}" maxlength="11"/>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>电子邮箱</label>
-                                                        <input type="text" class="form-control" id="email" value="{$row.email}"/>
-                                                    </div>
                                                 </div>
                                             </div>
-                                            <div class="row">
-                                                <label class="col-sm-12 control-label spacing" style="text-align: left"><span style="color: red">声明:本人对输入材料的真实性负全部责任</span></label>
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                附件:                                      
+                                                <table class="fileTable"></table>
                                             </div>
                                         </div>
                                     </div> 
                                 </div>
-                                <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">附件</div>
-                                    <div class="panel-body">
-                                        <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 class="panel panel-default">
                                     <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
                                     <table id="logTable">
@@ -317,9 +171,6 @@
                                 </div>
                             </div>
                         </div>
-                        <div id="tab-2" class="tab-pane ">
-                            <label style="padding-top: 15px;color: red">*请根据上传的附件材料,编辑好相应的文件夹名称</label>
-                        </div>
                     </div>
                 </div>
             </div>
@@ -327,7 +178,7 @@
     </div>
 </div>
 <script type="text/javascript">
-    document.write('<script src="/static/modular/gate/talentInfo/talentInfo_select.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/talentBase/talentInfo_select.js?v=' + (new Date()).getTime() + '"><\/script>');
     document.write('<script src="/static/modular/common/config.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 {/block}

+ 3 - 6
app/enterprise/view/talent/index.html

@@ -121,17 +121,14 @@
                             </div>
                         </div>
                         <div class="hidden-xs" id="TalentInfoTableToolbar" role="group">
-                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openAddTalentInfo()" id="">
-                                <i class="fa fa-plus"></i>&nbsp;添加
-                            </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openTalentInfoDetail()" id="">
-                                <i class="fa fa-edit"></i>&nbsp;修改
+                                <i class="fa fa-edit"></i>&nbsp;继续申报
                             </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openTalentInfoSelect()" id="">
-                                <i class="fa fa-book"></i>&nbsp;查看
+                                <i class="fa fa-book"></i>&nbsp;查看申报
                             </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.delete()" id="">
-                                <i class="fa fa-remove"></i>&nbsp;删除
+                                <i class="fa fa-remove"></i>&nbsp;删除申报
                             </button>
                         </div>
                         <table id="TalentInfoTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">

+ 158 - 166
app/enterprise/view/talent/second.html

@@ -23,13 +23,17 @@
     .rowGroup{
         padding-bottom: 5px;
     }
-    .imgs li{
+    .imgs>li{
         list-style: none;
         float: left;
         border: 1px solid #d8d1d1;
         text-align: center;
-        height: 30px;
+        height: 35px;
+        width:100%;
+        padding:5px 0;
     }
+    .imgs li>div{float:left;}
+    .info td{background:#f5f5f5 !important;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -38,10 +42,10 @@
                 <div class="col-sm-12" >
                     <div class="tab-content">
                         <div id="tab-1" class="tab-pane active">
-                            <form id="talentInfoForm" action="/enterprise/talent/add" method="post" enctype="multipart/form-data" target="hiddenIframe">
+                            <form id="talentInfoForm" action="/enterprise/talent/second" method="post" enctype="multipart/form-data" target="hiddenIframe">
                                 <div class="panel panel-default">
                                     <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
-                                    <div class="panel-body" style="display:none;">
+                                    <div class="panel-body">
                                         <div class="row">
                                             <div class="col-sm-12 form-group-sm">
                                                 <input type="hidden" name="id" id="id" value="{$row.id}">
@@ -49,114 +53,112 @@
                                                 <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="checkState" id="checkState" value="{$row.checkState}">
-                                                <div class="col-sm-11">
-                                                    <div class="rowGroup col-sm-4">
+                                                <div class="col-sm-10">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
-                                                        <input type="text" class="form-control" value="{$row.name}"  readonly disabled/>
+                                                        <input type="text" class="form-control" id="name" value="{$row.name}"  readonly disabled/>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>证件类型</label>
-                                                        <select class="form-control" value="{$row.card_type}" readonly disabled>
+                                                        <select class="form-control" value="{$row.card_type}" readonly disabled  id="card_type">
                                                             <option value="">请选择</option>
                                                             <option value="1" {eq name="row.card_type" value="1"} selected="" {/eq}>身份证</option>
                                                             <option value="2" {eq name="row.card_type" value="2"} selected="" {/eq}>通行证</option>
                                                             <option value="3" {eq name="row.card_type" value="3"} selected="" {/eq}>护照</option>
                                                         </select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*证件号码</span></label>
-                                                        <input class="form-control" value="{$row.card_number}" readonly disabled>
+                                                        <input class="form-control" value="{$row.card_number}" readonly disabled  id="card_number">
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <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}"  readonly disabled/>
+                                                        <input type="text" class="form-control" value="{eq name='info.sex' value='1'}男{else/}女{/eq}"  readonly disabled  id="sex"/>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
-                                                        <input type="text" class="form-control" value="{$row.birthday}" readonly disabled/>
+                                                        <input type="text" class="form-control" value="{$row.birthday}" readonly disabled  id="birthday"/>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
+                                                        <input class="form-control" value="{$row.politicsName}" readonly disabled  id="politics"/>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>民族</label>
-                                                        <input class="form-control" value="{$row.nationName}" readonly disabled/>
+                                                        <input class="form-control" value="{$row.nationName}" readonly disabled id="nation"/>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
-                                                        <input class="form-control" value="{$row.nationalityName}" readonly disabled>
+                                                        <input class="form-control" value="{$row.nationalityName}" readonly disabled id="nationality">
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
+                                                    <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
-                                                        <input class="form-control" value="{$row.provinceName}{$row.cityName}{$row.countyName}" readonly disabled/>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-4">
-                                                        <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
-                                                        <input class="form-control" value="{$row.politicsName}" readonly disabled/>
+                                                        <input class="form-control" value="{$row.provinceName}{$row.cityName}{$row.countyName}" readonly disabled id="province"/>
                                                     </div>
                                                 </div>
-                                                <div class="col-sm-1">
-                                                    <img id="photoImg" src="{$row.headimgurl}"  style="height: 110px;width: 76px;padding-bottom: 5px;">
+                                                <div class="col-sm-2">
+                                                    <img id="photoImg" src="{$row.headimgurl}"  style="height:147px;width:105px;margin:0 auto;display:block;">
                                                 </div>
                                             </div>
                                         </div>
-                                        <div class="row" style="border-top:1px solid #ddd;margin-top:20px;">
-                                            <ul class="list-unstyled">
-                                                <li style="margin:10px 0;overflow:hidden;">
-                                                    <div style="float:left;margin-left:25px;">身份证或护照上传</div>
-                                                    <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
-                                                        <i class="fa fa-upload"></i>上传
-                                                    </button>
-                                                </li>
-                                            </ul>
+                                        <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                            上传附件:                                      
+                                            <table class="fileTable"></table>
                                         </div>
                                     </div>
                                 </div>
                         </div>
                         <div class="panel panel-default">
                             <div class="panel-heading" onclick="$(this).next().toggle()">人才基础信息</div>
-                            <div class="panel-body" style="display:none;">
+                            <div class="panel-body">
                                 <div class="row">
-                                    <div class="rowGroup col-sm-3">
-                                        <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                        <input type="text" class="form-control" value="{$row.enterpriseName}"  readonly disabled/>
-                                    </div>
-                                    <div class="rowGroup col-sm-3">
-                                        <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
-                                        <input type="text" class="form-control" value="{$row.enterpriseTagName}"  readonly disabled/>
-                                    </div>
-                                    <div class="rowGroup col-sm-3">
-                                        <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
-                                        <input type="text" class="form-control" value="{$row.streetName}"  readonly disabled/>
-                                    </div>
-                                    <div class="rowGroup col-sm-3">
-                                        <label class=" control-label spacing"><span style="color: red">*</span>行业领域</label>
-                                        <input type="text" class="form-control" value="{$row.industryFieldName}" readonly disabled>
-                                    </div>
-                                    <div class="rowGroup col-sm-3">
-                                        <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
-                                        <select class="form-control" readonly disabled>
-                                            <option value="" selected="true">{$row.talentTypeName}</option>
-                                        </select>
-                                    </div>
-                                    {if condition="in_array($row['talent_type'],[1,2])"}
-                                    <div class="rowGroup col-sm-3">
-                                        <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                        <input type="text" class="form-control" value="{$row.tax_insurance_month}"  readonly disabled/>
-                                    </div>
-                                    {else/}
-                                    <div class="rowGroup col-sm-3">
-                                        <label class=" control-label spacing"><span style="color: red">*</span>劳动合同起止时间</label>
-                                        <input type="text" class="form-control" value="{$row.labor_contract_rangetime}"  readonly disabled/>
+                                    <div class="col-sm-10 form-group-sm">
+                                        <div class="rowGroup col-sm-3">
+                                            <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
+                                            <input type="text" class="form-control" value="{$row.enterpriseName}"  readonly disabled id="enterprise"/>
+                                        </div>
+                                        <div class="rowGroup col-sm-3">
+                                            <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
+                                            <input type="text" class="form-control" value="{$row.enterpriseTagName}"  readonly disabled id="enterprise_tag"/>
+                                        </div>
+                                        <div class="rowGroup col-sm-3">
+                                            <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
+                                            <input type="text" class="form-control" value="{$row.streetName}"  readonly disabled id="street"/>
+                                        </div>
+                                        <div class="rowGroup col-sm-3">
+                                            <label class=" control-label spacing"><span style="color: red">*</span>行业领域</label>
+                                            <input type="text" class="form-control" value="{$row.industryFieldName}" readonly disabled id="industry_field">
+                                        </div>
+                                        <div class="rowGroup col-sm-3">
+                                            <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
+                                            <select class="form-control" readonly disabled id="talent_type">
+                                                <option value="" selected="true">{$row.talentTypeName}</option>
+                                            </select>
+                                        </div>
+                                        <div class="rowGroup col-sm-9" id="tipsBlock">
+                                            <label class=" control-label spacing">说明</label>
+                                            {switch name="row.talent_type"}
+                                            {case value="1"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。"/>{/case}
+                                            {case value="2"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业(不含企业集团内部人员调动)的人才。"/>{/case}
+                                            {case value="3"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。"/>{/case}
+                                            {/switch}
+                                        </div>
+                                        {if condition="in_array($row['talent_type'],[1,2])"}
+                                        <div class="rowGroup col-sm-3">
+                                            <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
+                                            <input type="text" class="form-control" value="{$row.tax_insurance_month}"  readonly disabled id="tax_insurance_month"/>
+                                        </div>
+                                        {else/}
+                                        <div class="rowGroup col-sm-3">
+                                            <label class=" control-label spacing"><span style="color: red">*</span>劳动合同起止时间</label>
+                                            <input type="text" class="form-control" value="{$row.labor_contract_rangetime}"  readonly disabled id="labor_contract_rangetime"/>
+                                        </div>
+                                        {/if}
                                     </div>
-                                    {/if}
                                 </div>
-                                <div class="row" style="border-top:1px solid #ddd;margin-top:20px;">
-                                    <ul class="list-unstyled">
-                                        <li style="margin:10px 0;overflow:hidden;">
-                                            <div style="float:left;margin-left:25px;">社保或所得税缴费记录</div>
-                                            <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
-                                                <i class="fa fa-upload"></i>上传
-                                            </button>
-                                        </li>
-                                    </ul>
+                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                    上传附件:                                      
+                                    <table class="fileTable"></table>
                                 </div>
                             </div>
                         </div>
@@ -164,184 +166,174 @@
                             <div class="panel-heading" onclick="$(this).next().toggle()">人才认定申请</div>
                             <div class="panel-body">
                                 <div class="row">
-                                    <div class="col-sm-12">                          
+                                    <div class="col-sm-10">                          
                                         <div class="rowGroup col-sm-3">
                                             <label class=" control-label spacing"><span style="color: red">*</span>申报年度</label>
                                             <input type="text" class="form-control" name="apply_year" id="apply_year" value="{$year}" readonly disabled>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>首次来晋工作时间</label>
-                                            <input type="text" class="form-control date" id="fst_work_time" name="fst_work_time"/>
+                                            <input type="text" class="form-control date" id="fst_work_time" name="fst_work_time" value="{$row.fst_work_time}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>手机号码</label>
-                                            <input type="text" class="form-control" id="phone" name="phone" maxlength="11"/>
+                                            <input type="text" class="form-control" id="phone" name="phone" maxlength="11" value="{$row.phone}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>电子邮箱</label>
-                                            <input type="text" class="form-control" id="email" name="email"/>
+                                            <input type="text" class="form-control" id="email" name="email"  value="{$row.email}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>最高学历</label>
-                                            <select class="form-control" id="highest_degree" name="highest_degree"></select>
+                                            <select class="form-control" id="highest_degree" name="highest_degree" value="{$row.highest_degree}"></select>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
-                                            <input type="text" class="form-control" id="graduate_school" name="graduate_school">
+                                            <input type="text" class="form-control" id="graduate_school" name="graduate_school" value="{$row.graduate_school}">
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>专业</label>
-                                            <input type="text" class="form-control" id="major" name="major"/>
+                                            <input type="text" class="form-control" id="major" name="major" value="{$row.major}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing">是否有留学经历</label>
-                                            <select class="form-control" id="study_abroad" name="study_abroad" onchange="TalentInfoInfoDlg.changeStudyAbroad()">
-                                                <option value="2">否</option>
-                                                <option value="1">是</option>
+                                            <select class="form-control" id="study_abroad" name="study_abroad" onchange="TalentInfoInfoDlg.changeStudyAbroad()" autocomplete='off'>
+                                                <option value="2" {eq name='row.study_abroad' value='2'}selected="selected"{/eq}>否</option>
+                                                <option value="1" {eq name='row.study_abroad' value='1'}selected="selected"{/eq}>是</option>
                                             </select>
                                         </div>
-                                        <div class="rowGroup col-sm-3 abroad_need_this" style="display:none;">
+                                        <div class="rowGroup col-sm-3 abroad_need_this" {if condition='!$row["study_abroad"] or $row["study_abroad"] eq 2'}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" maxlength="11"/>
+                                            <input type="text" class="form-control" id="abroad_school" name="abroad_school" value="{$row.abroad_school}"/>
                                         </div>
-                                        <div class="rowGroup col-sm-3 abroad_need_this" style="display:none;">
+                                        <div class="rowGroup col-sm-3 abroad_need_this" {if condition='!$row["study_abroad"] or $row["study_abroad"] eq 2'}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" maxlength="11"/>
+                                            <input type="text" class="form-control" id="abroad_major" name="abroad_major" value="{$row.abroad_major}"/>
                                         </div>
                                     </div>
-                                </div>
-                                <div class="row" style="border-top:1px solid #ddd;margin-top:20px;border-bottom:1px solid #ddd;">
-                                    <ul class="list-unstyled">
-                                        <li style="margin:10px 0;overflow:hidden;">
-                                            <div style="float:left;margin-left:25px;">上传上述佐证材料</div>
-                                            <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
-                                                <i class="fa fa-upload"></i>上传
-                                            </button>
-                                        </li>
-                                    </ul>
+                                </div>                                
+                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                    上传附件:                                      
+                                    <table class="fileTable"></table>
                                 </div>
                                 <div class="row">
-                                    <div class="col-sm-12">
+                                    <div class="col-sm-10">
                                         <div class="rowGroup col-sm-3">
                                             <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"/>
+                                            <input type="text" class="form-control date" id="cur_entry_time" name="cur_entry_time" value="{$row.cur_entry_time}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>本单位现任职务</label>
-                                            <input type="text" class="form-control" id="position" name="position"/>
+                                            <input type="text" class="form-control" id="position" name="position" value="{$row.position}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing">专业技术职称</label>
-                                            <input type="text" class="form-control" id="professional" name="professional"/>
+                                            <input type="text" class="form-control" id="professional" name="professional" value="{$row.professional}"/>
                                         </div>
                                     </div>
-                                </div>
-                                <div class="row" style="border-top:1px solid #ddd;margin-top:20px;border-bottom:1px solid #ddd;">
-                                    <ul class="list-unstyled">
-                                        <li style="margin:10px 0;overflow:hidden;">
-                                            <div style="float:left;margin-left:25px;">上传上述佐证材料</div>
-                                            <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
-                                                <i class="fa fa-upload"></i>上传
-                                            </button>
-                                        </li>
-                                    </ul>
+                                </div>                        
+                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                    上传附件:                                      
+                                    <table class="fileTable"></table>
                                 </div>
                                 <div class="row">
-                                    <div class="col-sm-12">
+                                    <div class="col-sm-10">
                                         <div class="rowGroup col-sm-3">
                                             <label class=" control-label spacing"><span style="color: red">*</span>引进方式</label>
-                                            <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式">
+                                            <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式" value="{$row.import_way}">
                                             </select>
                                         </div>   
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>申报来源</label>
-                                            <select class="form-control" id="source" name="source" onchange="TalentInfoInfoDlg.sourceChange()">
+                                            <select class="form-control" id="source" name="source" onchange="TalentInfoInfoDlg.sourceChange()" value="{$row.source}">
                                             </select>
                                         </div>
-                                        <div class="rowGroup col-sm-3" style="display:none;">
+
+
+                                        <div class="rowGroup col-sm-3" {if condition="!$row['source_city']"}style="display:none;"{/if}>
                                             <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
-                                            <select class="form-control" id="source_city" name="source_city"></select>
+                                            <select class="form-control" id="source_city" name="source_city" value="{$row['source_city']}">
+                                                <option value="">{$row.sourceCityName}</option>
+                                            </select>
                                         </div>
-                                        <div class="rowGroup col-sm-3" style="display:none;">
+                                        <div class="rowGroup col-sm-3" {if condition="!$row['source_county']"}style="display:none;"{/if}>
                                             <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
-                                            <select class="form-control" id="source_county" name="source_county"></select>
-                                        </div>
-                                        <div class="rowGroup col-sm-3" style="display:none;">
+                                            <select class="form-control" id="source_county" name="source_county" value="{$row['source_county']}">
+                                                <option value="">{$row.sourceCountyName}</option>
+                                            </select>
+                                        </div>                                              
+                                        <div class="rowGroup col-sm-3" {if condition="!$row['source_batch']"}style="display:none;"{/if}>
                                             <label class=" control-label spacing" ><span style="color: red">*</span>入选名单批次</label>
-                                            <input type="text" class="form-control" id="source_batch" name="source_batch"/>
-                                        </div>
-                                        <div class="rowGroup col-sm-3" style="display:none;">
+                                            <input type="text" class="form-control" id="source_batch" name="source_batch" value="{$row.source_batch}"/>
+                                        </div>                                       
+                                        <div class="rowGroup col-sm-3" {if condition="!$row['fujian_highcert_pubtime']"}style="display:none;"{/if}>
                                             <label class=" control-label spacing" ><span style="color: red">*</span>福建省高层次人才证书发证日期</label>
-                                            <input type="text" class="form-control date" id="fujian_highcert_pubtime" name="fujian_highcert_pubtime"/>
-                                        </div>
-                                        <div class="rowGroup col-sm-3" style="display:none;">
+                                            <input type="text" class="form-control date" id="fujian_highcert_pubtime" name="fujian_highcert_pubtime" value="{$row.fujian_highcert_pubtime}"/>
+                                        </div>                                      
+                                        <div class="rowGroup col-sm-3" {if condition="!$row['fujian_highcert_exptime']"}style="display:none;"{/if}>
                                             <label class=" control-label spacing" ><span style="color: red">*</span>福建省高层次人才证书有效期</label>
-                                            <input type="text" class="form-control date" id="fujian_highcert_exptime" name="fujian_highcert_exptime"/>
+                                            <input type="text" class="form-control date" id="fujian_highcert_exptime" name="fujian_highcert_exptime" value="{$row.fujian_highcert_exptime}"/>
                                         </div>
-                                        <div class="rowGroup col-sm-3" style="display:none;">
+                                        <div class="rowGroup col-sm-3" {if condition="!$row['quanzhou_highcert_pubtime']"}style="display:none;"{/if}>
                                             <label class=" control-label spacing" ><span style="color: red">*</span>泉州高层次人才证书发证日期</label>
-                                            <input type="text" class="form-control date" id="quanzhou_highcert_pubtime" name="quanzhou_highcert_pubtime"/>
+                                            <input type="text" class="form-control date" id="quanzhou_highcert_pubtime" name="quanzhou_highcert_pubtime" value="{$row.quanzhou_highcert_pubtime}"/>
                                         </div>
-                                        <div class="rowGroup col-sm-3" style="display:none;">
+                                        <div class="rowGroup col-sm-3" {if condition="!$row['quanzhou_highcert_exptime']"}style="display:none;"{/if}>
                                             <label class=" control-label spacing" ><span style="color: red">*</span>泉州高层次人才证书有效期</label>
-                                            <input type="text" class="form-control date" id="quanzhou_highcert_exptime" name="quanzhou_highcert_exptime"/>
+                                            <input type="text" class="form-control date" id="quanzhou_highcert_exptime" name="quanzhou_highcert_exptime" value="{$row.quanzhou_highcert_exptime}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>人才层次</label>
-                                            <select class="form-control" id="talent_arrange" name="talent_arrange" onchange="TalentInfoInfoDlg.getIdentifyCondition()"></select>
+                                            <select class="form-control" id="talent_arrange" name="talent_arrange" onchange="TalentInfoInfoDlg.getIdentifyCondition()" value="{$row.talent_arrange}"></select>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>认定条件</label>
-                                            <select class="chosen" id="talent_condition" name="talent_condition" onchange="TalentInfoInfoDlg.getIdentifyNeedsFileTypes()"></select>
+                                            <select class="chosen" id="talent_condition" name="talent_condition" onchange="TalentInfoInfoDlg.getIdentifyNeedsFileTypes()" value="{$row.talent_condition}"></select>
                                         </div>
                                     </div>
-                                </div>
-                                <div class="row" style="border-top:1px solid #ddd;margin-top:20px;border-bottom:1px solid #ddd;">
-                                    <ul class="list-unstyled">
-                                        <li style="margin:10px 0;overflow:hidden;">
-                                            <div style="float:left;margin-left:25px;">上传上述认定条件佐证材料</div>
-                                            <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
-                                                <i class="fa fa-upload"></i>上传
-                                            </button>
-                                        </li>
-                                    </ul>
+                                </div>                        
+                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                    上传附件:                                      
+                                    <table class="fileTable"></table>
                                 </div>
                                 <div class="row">
-                                    <div class="col-sm-12">
+                                    <div class="col-sm-10">
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>开户银行</label>
-                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank" placeholder="XX银行"/>
+                                            <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank" placeholder="XX银行" value="{$row.bank}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>银行行号</label>
-                                            <input type="text" class="form-control" id="bank_number" name="bank_number"/>
+                                            <input type="text" class="form-control" id="bank_number" name="bank_number" value="{$row.bank_number}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <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" placeholder="XX银行XX省XX市XX支行/分行/分理处"/>
+                                            <input type="text" class="form-control" id="bank_branch_name" name="bank_branch_name" placeholder="XX银行XX省XX市XX支行/分行/分理处" value="{$row.bank_branch_name}"/>
                                         </div>
                                         <div class="rowGroup col-sm-3">
                                             <label class="control-label spacing"><span style="color: red">*</span>银行账号</label>
-                                            <input type="text" class="form-control" id="bank_account" name="bank_account" />
+                                            <input type="text" class="form-control" id="bank_account" name="bank_account"  value="{$row.bank_account}"/>
                                         </div>
                                     </div>
-                                </div>
-                                <div class="row" style="border-top:1px solid #ddd;margin-top:20px;border-bottom:1px solid #ddd;">
-                                    <ul class="list-unstyled">
-                                        <li style="margin:10px 0;overflow:hidden;">
-                                            <div style="float:left;margin-left:25px;">上传上述佐证材料</div>
-                                            <button type='button' onclick="TalentInfoInfoDlg.checkFile(this)" style='margin-right: 10px;float:right;' class="btn btn-xs btn-info">
-                                                <i class="fa fa-upload"></i>上传
-                                            </button>
-                                        </li>
-                                    </ul>
+                                </div>                        
+                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                    上传附件:                                      
+                                    <table class="fileTable"></table>
                                 </div>
                             </div>
                         </div>
                         </form>
-                        <div class="panel panel-default">
-                            <div class="panel-heading" onclick="$(this).next().toggle()">附件上传</div>
-                        </div>
+                        <form id="uploadForm" action="/common/api/addTalentFile" method="post" class="form-horizontal" enctype="multipart/form-data" target="hiddenIframe" style="display: none">
+                            <input type='hidden' id="fileId" name="fileId" >
+                            <input type='file' id="upload_file" name="fileUrl" style='display: none'>
+                            <input type='hidden' id="mainId" name="mainId" >
+                            <input type='hidden' id="fileTypeId" name="fileTypeId" >
+                            <input type='hidden' id="index" name="index" >
+                            <input type='hidden' id="tableIndex" name="tableIndex" >
+                            <input type='hidden' id="trIndex" name="trIndex" >
+                            <input type="hidden" name="backName" value="TalentInfoInfoDlg.callBack">
+                            <input type="type" name="type" value="1">
+                        </form>
                         <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
                         <table id="logTable">
                         </table>

+ 156 - 118
app/enterprise/view/talent/view.html

@@ -23,13 +23,17 @@
     .rowGroup{
         padding-bottom: 5px;
     }
-    .imgs li{
+    .imgs>li{
         list-style: none;
         float: left;
         border: 1px solid #d8d1d1;
         text-align: center;
-        height: 30px;
+        height: 35px;
+        width:100%;
+        padding:5px 0;
     }
+    .imgs li>div{float:left;}
+    .info td{background:#f5f5f5 !important;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -37,11 +41,11 @@
             <div class="row">
                 <div class="col-sm-12" >
                     <div class="tab-content">
-                        
+
                         <div id="tab-1" class="tab-pane active">
                             <div class="panel-body" >
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">申报信息</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">个人信息</div>
                                     <div class="panel-body">
                                         <form id="talentInfoForm" class="form-horizontal" autocomplete="off">
                                             <div class="col-sm-12 form-group-sm">
@@ -50,40 +54,7 @@
                                                 <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
                                                 <input type="hidden" name="talent_condition" id="talent_condition" value="{$row.talent_condition}">
                                                 <div class="row">
-                                                    <div class="col-sm-11">
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
-                                                            <select class="form-control" id="talent_type" name="talent_type" >
-                                                                <option value="" selected="true">{$row.talentTypeName}</option>
-                                                            </select>
-                                                        </div>
-                                                        {if condition="in_array($row['talent_type'],[1,2])"}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
-                                                            <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}" />
-                                                        </div>
-                                                        {else/}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <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}" />
-                                                        </div>
-                                                        {/if}
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
-                                                            <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$row.enterpriseName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
-                                                            <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$row.enterpriseTagName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
-                                                            <input type="text" class="form-control" id="street" name="street" value="{$row.streetName}" />
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>行业领域</label>
-                                                            <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$row.industryFieldName}">
-                                                        </div>
+                                                    <div class="col-sm-10">
                                                         <div class="rowGroup col-sm-3">
                                                             <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
                                                             <input type="text" class="form-control" id="name" name="name" value="{$row.name}" />
@@ -109,14 +80,6 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>出生日期</label>
                                                             <input type="text" class="form-control" id="birthday" name="birthday" value="{$row.birthday}"/>
                                                         </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
-                                                            <input class="form-control" id="nationality" name="nationality" value="{$row.nationalityName}">
-                                                        </div>
-                                                        <div class="rowGroup col-sm-3">
-                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
-                                                            <input class="form-control" id="province" name="province" value="{$row.provinceName}{$row.cityName}{$row.countyName}"/>
-                                                        </div>
                                                         <div class="rowGroup col-sm-3">
                                                             <label class="control-label spacing"><span style="color: red">*</span>民族</label>
                                                             <input class="form-control" id="nation" name="nation" value="{$row.nationName}"/>
@@ -125,24 +88,89 @@
                                                             <label class=" control-label spacing"><span style="color: red">*</span>政治面貌</label>
                                                             <input class="form-control" id="politics" name="politics" value="{$row.politicsName}"/>
                                                         </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>国籍/地区</label>
+                                                            <input class="form-control" id="nationality" name="nationality" value="{$row.nationalityName}">
+                                                        </div>
+                                                        <div class="rowGroup col-sm-3">
+                                                            <label class=" control-label spacing"><span style="color: red">*</span>籍贯</label>
+                                                            <input class="form-control" id="province" name="province" value="{$row.provinceName}{$row.cityName}{$row.countyName}"/>
+                                                        </div>
                                                     </div>
-                                                    <div class="col-sm-1">
-                                                        <img id="photoImg" src="{$row.headimgurl}"  style="height: 110px;width: 76px;padding-bottom: 5px;">
+                                                    <div class="col-sm-2">
+                                                        <img id="photoImg" src="{$row.headimgurl}"  style="height:147px;width:105px;margin:0 auto;display:block;">
                                                     </div>
                                                 </div>
-                                                <div class="row">
-                                                    <label class="col-sm-12 control-label spacing" style="text-align: left"><span style="color: red">声明:本人对输入材料的真实性负全部责任</span></label>
+                                                <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                    附件:                                      
+                                                    <table class="fileTable"></table>
                                                 </div>
                                             </div>
                                         </form>
                                     </div>
                                 </div>
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">个人信息填报及人才认定申请</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
+                                    <div class="panel-body">
+                                        <div class="col-sm-12 form-group-sm">
+                                            <div class="row">
+                                                <div class="col-sm-10">
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位标签</label>
+                                                        <input type="text" class="form-control" id="enterprise_tag" name="enterprise_tag" value="{$row.enterpriseTagName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>单位名称</label>
+                                                        <input type="text" class="form-control" id="enterprise_name" name="enterprise_name" value="{$row.enterpriseName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>所属街道</label>
+                                                        <input type="text" class="form-control" id="street" name="street" value="{$row.streetName}" />
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>产业领域</label>
+                                                        <input type="text" class="form-control" id="industry_field" name="industry_field" value="{$row.industryFieldName}">
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>人才类型</label>
+                                                        <select class="form-control" id="talent_type" name="talent_type" >
+                                                            <option value="" selected="true">{$row.talentTypeName}</option>
+                                                        </select>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-9" id="tipsBlock">
+                                                        <label class=" control-label spacing">说明</label>
+                                                        {switch name="row.talent_type"}
+                                                        {case value="1"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。"/>{/case}
+                                                        {case value="2"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业(不含企业集团内部人员调动)的人才。"/>{/case}
+                                                        {case value="3"}<input type="text" class="form-control" id="typeTips" disabled readonly value="含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。"/>{/case}
+                                                        {/switch}
+                                                    </div>
+                                                    {if condition="in_array($row['talent_type'],[1,2])"}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>在我市缴交社会保险或个人所得税月份</label>
+                                                        <input type="text" class="form-control" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}" />
+                                                    </div>
+                                                    {else/}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <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}" />
+                                                    </div>
+                                                    {/if}
+                                                </div>
+                                            </div>
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                        </div>
+                                    </div> 
+                                </div>
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">人才认定申请</div>
                                     <div class="panel-body">
                                         <div class="col-sm-12 form-group-sm">
                                             <div class="row">
-                                                <div class="col-sm-11">                          
+                                                <div class="col-sm-10">                          
                                                     <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>申报年度</label>
                                                         <input type="text" class="form-control" name="apply_year" id="apply_year" value="{$row.apply_year}" readonly disabled>
@@ -152,11 +180,53 @@
                                                         <input type="text" class="form-control date" id="fst_work_time" value="{$row.fst_work_time}"/>
                                                     </div>
                                                     <div class="rowGroup col-sm-3">
-                                                        <label class=" control-label spacing"><span style="color: red">*</span>引进方式</label>
-                                                        <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式">
-                                                            <option value="">{$row.importWayName}</option>
+                                                        <label class="control-label spacing"><span style="color: red">*</span>手机号码</label>
+                                                        <input type="text" class="form-control" id="phone" value="{$row.phone}" maxlength="11"/>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>电子邮箱</label>
+                                                        <input type="text" class="form-control" id="email" value="{$row.email}"/>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>最高学历</label>
+                                                        <select class="form-control" >
+                                                            <option value="">{$row.highestDegreeName}</option>
                                                         </select>
                                                     </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
+                                                        <input type="text" class="form-control" id="graduate_school" value="{$row.graduate_school}">
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
+                                                        <input type="text" class="form-control" id="major" value="{$row.major}"/>
+                                                    </div>
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing">是否有留学经历</label>
+                                                        <select class="form-control" id="study_abroad" >
+                                                            <option value="">{eq name="study_abroad" value="2"}否{else/}是{/eq}</option>
+                                                        </select>
+                                                    </div>                                                
+                                                    {if condition="$row['abroad_school']"}   
+                                                    <div class="rowGroup col-sm-3 abroad_need_this">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
+                                                        <input type="text" class="form-control" id="abroad_school" value="{$row.abroad_school}" maxlength="11"/>
+                                                    </div>
+                                                    {/if}                                                
+                                                    {if condition="$row['abroad_major']"}   
+                                                    <div class="rowGroup col-sm-3 abroad_need_this">
+                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
+                                                        <input type="text" class="form-control" id="abroad_major" value="{$row.abroad_major}" maxlength="11"/>
+                                                    </div>
+                                                    {/if}
+                                                </div>
+                                            </div>                     
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                            <div class="row">
+                                                <div class="col-sm-10">                                                    
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>本单位入职时间</label>
                                                         <input type="text" class="form-control date" id="cur_entry_time" value="{$row.cur_entry_time}"/>
@@ -165,6 +235,25 @@
                                                         <label class="control-label spacing"><span style="color: red">*</span>本单位现任职务</label>
                                                         <input type="text" class="form-control" id="position" value="{$row.position}"/>
                                                     </div>
+                                                    {if condition="$row['professional']"}
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class="control-label spacing">专业技术职称</label>
+                                                        <input type="text" class="form-control" id="professional" value="{$row.professional}"/>
+                                                    </div>{/if}
+                                                </div>
+                                            </div>               
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                            <div class="row">
+                                                <div class="col-sm-10">
+                                                    <div class="rowGroup col-sm-3">
+                                                        <label class=" control-label spacing"><span style="color: red">*</span>引进方式</label>
+                                                        <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式">
+                                                            <option value="">{$row.importWayName}</option>
+                                                        </select>
+                                                    </div>
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>申报来源</label>
                                                         <select class="form-control" id="source" >
@@ -229,25 +318,14 @@
                                                             <option value="">{$row.talentConditionName}</option>
                                                         </select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>最高学历</label>
-                                                        <select class="form-control" >
-                                                            <option value="">{$row.highestDegreeName}</option>
-                                                        </select>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
-                                                        <input type="text" class="form-control" id="graduate_school" value="{$row.graduate_school}">
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
-                                                        <input type="text" class="form-control" id="major" value="{$row.major}"/>
-                                                    </div>
-                                                    {if condition="$row['professional']"}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing">专业技术职称</label>
-                                                        <input type="text" class="form-control" id="professional" value="{$row.professional}"/>
-                                                    </div>{/if}
+                                                </div>
+                                            </div>                    
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
+                                            </div>
+                                            <div class="row">
+                                                <div class="col-sm-10">
                                                     <div class="rowGroup col-sm-3">
                                                         <label class="control-label spacing"><span style="color: red">*</span>开户银行</label>
                                                         <input type="text" class="form-control" onchange="" id="bank" value="{$row.bank}" placeholder="XX银行"/>
@@ -264,52 +342,15 @@
                                                         <label class="control-label spacing"><span style="color: red">*</span>银行账号</label>
                                                         <input type="text" class="form-control" id="bank_account" value="{$row.bank_account}" />
                                                     </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing">是否有留学经历</label>
-                                                        <select class="form-control" id="study_abroad" >
-                                                            <option value="">{eq name="study_abroad" value="2"}否{else/}是{/eq}</option>
-                                                        </select>
-                                                    </div>                                                
-                                                    {if condition="$row['abroad_school']"}   
-                                                    <div class="rowGroup col-sm-3 abroad_need_this">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>毕业院校</label>
-                                                        <input type="text" class="form-control" id="abroad_school" value="{$row.abroad_school}" maxlength="11"/>
-                                                    </div>
-                                                    {/if}                                                
-                                                    {if condition="$row['abroad_major']"}   
-                                                    <div class="rowGroup col-sm-3 abroad_need_this">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>专业</label>
-                                                        <input type="text" class="form-control" id="abroad_major" value="{$row.abroad_major}" maxlength="11"/>
-                                                    </div>
-                                                    {/if}
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>手机号码</label>
-                                                        <input type="text" class="form-control" id="phone" value="{$row.phone}" maxlength="11"/>
-                                                    </div>
-                                                    <div class="rowGroup col-sm-3">
-                                                        <label class="control-label spacing"><span style="color: red">*</span>电子邮箱</label>
-                                                        <input type="text" class="form-control" id="email" value="{$row.email}"/>
-                                                    </div>
                                                 </div>
-                                            </div>
-                                            <div class="row">
-                                                <label class="col-sm-12 control-label spacing" style="text-align: left"><span style="color: red">声明:本人对输入材料的真实性负全部责任</span></label>
+                                            </div>                    
+                                            <div class="row" style="margin-top:20px;padding:10px 25px;">
+                                                上传附件:                                      
+                                                <table class="fileTable"></table>
                                             </div>
                                         </div>
                                     </div> 
                                 </div>
-                                <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">附件</div>
-                                    <div class="panel-body">
-                                        <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 class="panel panel-default">
                                     <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
                                     <table id="logTable">
@@ -317,9 +358,6 @@
                                 </div>
                             </div>
                         </div>
-                        <div id="tab-2" class="tab-pane ">
-                            <label style="padding-top: 15px;color: red">*请根据上传的附件材料,编辑好相应的文件夹名称</label>
-                        </div>
                     </div>
                 </div>
             </div>

+ 1 - 1
public/static/modular/gate/talentBase/talentBase.js

@@ -41,7 +41,7 @@ TalentInfo.initColumn = function () {
         {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
         {title: '单位名称', field: 'enterpriseName', visible: isShow, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
         {title: '单位标签', field: 'enterpriseTagName', visible: isShow, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
-        {title: '产业领域', field: 'identifyConditionText', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
+        {title: '产业领域', field: 'industryName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
         {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "100px",
             formatter: function (value, row, index) {
                 if (row.real_state != row.checkState) {

+ 184 - 139
public/static/modular/gate/talentBase/talentInfo_info.js

@@ -296,13 +296,13 @@ TalentInfoInfoDlg.getIdentifyCondition = function () {
     $("#talent_condition").trigger('chosen:updated');
 }
 
-TalentInfoInfoDlg.getIdentifyNeedsFileTypes = function () {    
+TalentInfoInfoDlg.getIdentifyNeedsFileTypes = function () {
     var queryData = {};
     queryData['project'] = CONFIG.project_rcrd;
     queryData['type'] = $("#type").val();
     queryData["talent_condition"] = $("#talent_condition").val();
     queryData['checkState'] = $("#checkState").val();
-    $("#fileTable").bootstrapTable("refresh", {query:queryData});
+    $("#fileTable").bootstrapTable("refresh", {query: queryData});
 }
 
 TalentInfoInfoDlg.bankChange = function () {
@@ -366,7 +366,6 @@ TalentInfoInfoDlg.afterSelectCity = function () {
     });
 }
 
-
 TalentInfoInfoDlg.talentTypeChange = function () {
     var talent_type = $("#talent_type").val();
     $("#tax_insurance_month").val("").parent().css("display", "none");
@@ -375,7 +374,24 @@ TalentInfoInfoDlg.talentTypeChange = function () {
     $('#talentInfoForm').bootstrapValidator('removeField', "tax_insurance_month");
     switch (talent_type) {
         case "1":
+            $("#tipsBlock").css('display', 'block');
+            $("#typeTips").val("含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。");
+            $("#material_name").html("社保或个税的缴交记录");
+            $("#tax_insurance_month").removeAttr("disabled").parent().css("display", "block");
+            $('#talentInfoForm').bootstrapValidator('addField', "tax_insurance_month", {
+                validators: {
+                    notEmpty: {message: '在我市缴交社会保险或个人所得税月份不能为空'},
+                    regexp: {
+                        regexp: /^\d+$/,
+                        message: "在我市缴交社会保险或个人所得税月份格式不正确"
+                    }
+                }
+            });
+            break;
         case "2":
+            $("#tipsBlock").css('display', 'block');
+            $("#typeTips").val("含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业(不含企业集团内部人员调动)的人才。")
+            $("#material_name").html("社保或个税的缴交记录");
             $("#tax_insurance_month").removeAttr("disabled").parent().css("display", "block");
             $('#talentInfoForm').bootstrapValidator('addField', "tax_insurance_month", {
                 validators: {
@@ -388,9 +404,15 @@ TalentInfoInfoDlg.talentTypeChange = function () {
             });
             break;
         case "3":
+            $("#tipsBlock").css('display', 'block');
+            $("#typeTips").val("含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。")
+            $("#material_name").html("社保或个税的缴交记录");
             $("#labor_contract_rangetime").removeAttr("disabled").parent().css("display", "block");
             $('#talentInfoForm').bootstrapValidator('addField', "labor_contract_rangetime", {validators: {notEmpty: {message: '劳动合同起止时间'}}});
             break;
+        default:
+            $("#tipsBlock").css('display', 'none');
+            break;
     }
 }
 
@@ -456,97 +478,126 @@ TalentInfoInfoDlg.sourceChange = function () {
     }
 }
 
-
-//初始化附件类别表单
-TalentInfoInfoDlg.initFileTable = function () {
-    var queryData = {};
-    queryData['project'] = CONFIG.project_rcrd;
-    queryData['type'] = $("#type").val();
-    queryData["talent_condition"] = $("#talent_condition option:selected").val();
-    queryData['checkState'] = $("#checkState").val();
-    $("#fileTable").bootstrapTable({
-        url: "/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');
+/**
+ * 初始化表格的列
+ */
+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;
+                }
+            }
         },
-        onExpandRow: function (index, row, $detail) {
-            var ajax = new $ax("/common/api/listTalentFile", function (data) {
-                if (data == null || data.length == 0) {
-                    return;
+        {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle', width: "8%",
+            formatter: function (value, row, index) {
+                if (value == null || value == '' || value == 'null') {
+                    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();
-                for (var key in data) {
-                    var btn = TalentInfoInfoDlg.validUploadButton(2, row, row.id, data[key].id);
-                    // if(checkState!=10 || (checkState==10 && 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;\">';
-                    }
+                return "<button type='button' onclick=\"TalentInfoInfoDlg.downloadFile('" + row.id + "',3)\" 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) {
+                return TalentInfoInfoDlg.validUploadButton(1, value, '', row.tableIndex, row.trIndex);
+            }
+        }
+    ]
+};
 
-                    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>';
+TalentInfoInfoDlg.initFile = function () {
+    var ajax = new $ax("/common/api/findCommonFileType", function (data) {
+        if (data == null || data.length == 0) {
+            return;
+        }
+        var datas = new Array();
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            datas.push([]);//创建空的多维数组,等下用来存每个附件表的各自的列
+        }
+        for (var k in data["rows"]) {
+            var rel = data["rows"][k].rel;
+            if ($("#" + rel).length > 0) {
+                var tableIndex = $("#" + rel).parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                data["rows"][k].tableIndex = tableIndex;
+                data["rows"][k].trIndex = datas[tableIndex].length;
+                datas[tableIndex].push(data["rows"][k]);
+            } else {                
+                if (data["rows"][k].isConditionFile) {
+                    var tableIndex = $("#talent_condition").parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[tableIndex].push(data["rows"][k]);//放入人才条件后面的附件表
+                } else {
+                    var tableIndex = $(".fileTable").length - 1;
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[$(".fileTable").length - 1].push(data["rows"][k]);//没有归属,放入最后一个附件表
                 }
-                html = html + '</ul>';
-                $detail.html(html);
-                $(".imgs").viewer({fullscreen: false});
-            }, function (data) {
-                Feng.error("查询失败!" + data.responseJSON.message + "!");
+            }
+        }
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            var that = $(".fileTable").eq(i);
+            that.bootstrapTable({
+                columns: TalentInfoInfoDlg._initFileTypeColumn(),
+                data: datas[i],
+                showHeader: false,
+                rowStyle: function (row, index) {
+                    return {classes: ""};
+                },
+                onPostBody: function (data) {
+                    for (var k in data) {
+                        var files = data[k].files;
+                        var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+                        for (var key in files) {
+                            var btn = TalentInfoInfoDlg.validUploadButton(2, data[k].id, files[key].id, i, k);
+                            var sn = files[key].url.lastIndexOf(".");
+                            var suffix = files[key].url.substring(sn + 1, files[key].url.length);
+                            var imgStr = "";
+                            if (suffix == "pdf" || suffix == "PDF") {
+                                imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + files[key].url + "','" + files[key].id + "','" + files[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('" + files[key].url + "','" + files[key].id + "','" + files[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=\"' + files[key].url + '\" style=\"width:25px;height:25px;\">';
+                            }
+
+                            html += '<li data-id="' + files[key].id + '">\n\
+                                    <div><input type="hidden" name="uploadFiles[]" value="' + files[key].id + '"></div>\n' +
+                                    '<div style="width: 80%;">' + files[key].orignName + '</div>\n' +
+                                    '<div style="width: 10%;">' + imgStr + '</div>\n' +
+                                    '<div style="width: 10%;">' + btn + '</div>\n\
+                                    </li>';
+                        }
+                        html = html + '</ul>';
+                        that.find("tr[data-index='" + k + "']").after('<tr class="detail-view"><td colspan="5">' + html + '</td></tr>');
+                    }
+                    $("td.uitd_showTip").bind("mouseover", function () {
+                        //var htm = $(this).html();
+                        //$(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+                    });
+                },
             });
-            var queryData = {};
-            queryData["mainId"] = $("#id").val();
-            queryData["fileTypeId"] = row.id;
-            ajax.set(queryData);
-            ajax.start();
         }
+        //$(".ibox-content").viewer({fullscreen: false});
+    }, function (data) {
+        Feng.error("查询失败!" + data.responseJSON.message + "!");
     });
-
+    var queryData = {};
+    queryData["mainId"] = $("#id").val();
+    queryData['project'] = CONFIG.project_rcrd;
+    queryData['type'] = $("#type").val();
+    queryData["talent_condition"] = $("#talent_condition option:selected").val();
+    queryData['checkState'] = $("#checkState").val();
+    ajax.set(queryData);
+    ajax.start();
 }
 
 //校验是否保存基础信息
@@ -559,23 +610,19 @@ TalentInfoInfoDlg.validId = function () {
     }
 }
 //选择附件并显示附件名
-TalentInfoInfoDlg.checkFile = function (content, state, fileTypeId, fileId) {
+TalentInfoInfoDlg.checkFile = function (content, fileTypeId, fileId, tableIndex, trIndex) {
     if (!TalentInfoInfoDlg.validateIsEdit())
         return;
     $("#upload_file ").unbind("change");
     $("#upload_file ").change(function () {
-        TalentInfoInfoDlg.upload(fileTypeId, fileId);
+        TalentInfoInfoDlg.upload(fileTypeId, fileId, tableIndex, trIndex);
     });
     $('#upload_file').val("");
     $('#upload_file').click();
 }
 //上传附件
-TalentInfoInfoDlg.upload = function (fileTypeId, fileId) {
+TalentInfoInfoDlg.upload = function (fileTypeId, fileId, tableIndex, trIndex) {
     var id = $("#id").val();
-    if (id == null || id == '') {
-        //Feng.info("请先添加基本信息并保存后再试");
-        //return;
-    }
     if (!TalentInfoInfoDlg.validateIsEdit())
         return;
     if (fileId != null && fileId != 'null') {
@@ -585,9 +632,11 @@ TalentInfoInfoDlg.upload = function (fileTypeId, fileId) {
     }
     $("#mainId").val(id);
     $("#fileTypeId").val(fileTypeId);
+    $("#tableIndex").val(tableIndex);
+    $("#trIndex").val(trIndex);
     var index = layer.load(0, {shade: false, time: 0});
     $("#index").val(index);
-    //$("#uploadForm").submit();
+    $("#uploadForm").submit();
 }
 //删除附件
 TalentInfoInfoDlg.deleteFile = function (id, state) {
@@ -597,7 +646,8 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
             if (data.code = 200) {
                 Feng.success(data.msg);
-                $("#fileTable").bootstrapTable("refresh", {});
+                $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
+                //$("#fileTable").bootstrapTable("refresh", {});
             } else {
                 Feng.error(data.msg);
             }
@@ -623,7 +673,7 @@ TalentInfoInfoDlg.submitToCheck = function () {
     if (!TalentInfoInfoDlg.validateIsEdit())
         return;
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/enterprise/talent/submit", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/base/submit", function (data) {
             if (data.code == 200) {
                 Feng.success(data.msg);
                 // $("#checkState").val(data.obj);
@@ -661,40 +711,6 @@ TalentInfoInfoDlg.validateIsEdit = function () {
     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 + "',3)\" 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) {
-                return TalentInfoInfoDlg.validUploadButton(1, row, value);
-            }
-        }
-    ]
-};
 
 /**
  * 校验是否显示按钮
@@ -702,21 +718,21 @@ TalentInfoInfoDlg.initFileTypeColumn = function () {
  * @param row
  * @returns {string}
  */
-TalentInfoInfoDlg.validUploadButton = function (type, row, fileTypeId, fileId) {
+TalentInfoInfoDlg.validUploadButton = function (type, fileTypeId, fileId, tableIndex, trIndex) {
     var files = $("#files").val();
     var checkState = $("#checkState").val();
     if (Feng.isEmptyStr(checkState) || checkState == 0 || checkState == 1 || checkState == 3 || checkState == 5) {
-        if ((checkState == 3 || checkState == 5) && row.step == 1)
+        if ((checkState == 3 || checkState == 5))
             return "";
         if (type == 1) {          //上传
-            return "<button type='button' onclick=\"TalentInfoInfoDlg.checkFile(this,'" + row.fState + "','" + fileTypeId + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
+            return "<button type='button' onclick=\"TalentInfoInfoDlg.checkFile(this," + fileTypeId + "," + null + "," + tableIndex + "," + trIndex + ")\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
                     "<i class=\"fa fa-upload\"></i>上传" +
                     "</button>";
         } else {
-            return "<button type=\'button\' onclick=\"TalentInfoInfoDlg.checkFile(this,'" + row.fState + "','" + row.id + "','" + fileId + "')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
+            return "<button type=\'button\' onclick=\"TalentInfoInfoDlg.checkFile(this," + fileTypeId + "," + fileId + "," + tableIndex + "," + trIndex + ")\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
                     "<i class=\"fa fa-paste\"></i>修改" +
                     "</button>" +
-                    "<button type='button' onclick=\"TalentInfoInfoDlg.deleteFile('" + fileId + "','" + row.fState + "')\" class=\"btn btn-xs btn-danger\">" +
+                    "<button type='button' onclick=\"TalentInfoInfoDlg.deleteFile(" + fileId + ")\" class=\"btn btn-xs btn-danger\">" +
                     "<i class=\"fa fa-times\"></i>删除" +
                     "</button>";
         }
@@ -731,7 +747,35 @@ TalentInfoInfoDlg.callBack = function (data) {
     layer.close(data.obj);
     Feng.info(data.msg);
     if (data.code == 200) {
-        $("#fileTable").bootstrapTable("refresh", {});
+        var tableIndex = $("#tableIndex").val();
+        var trIndex = $("#trIndex").val();
+        var sn = data.info.lastIndexOf(".");
+        var suffix = data.info.substring(sn + 1, data.info.length);
+        var imgStr = "";
+        if (suffix == "pdf" || suffix == "PDF") {
+            imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data.info + "','" + data.id + "','" + data.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.info + "','" + data.id + "','" + data.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.info + '" style="width:25px;height:25px;">';
+        }
+        var li = $("input[name='uploadFiles[]'][value='" + data.id + "'").parents("li");
+        if (li.length > 0) {
+            li.find("div").eq(1).html(data.orignName);
+            li.find("div").eq(2).html(imgStr);
+        } else {
+            var html = '<li data-id="' + data.id + '">\n\
+<div><input type="hidden" name="uploadFiles[]" value="' + data.id + '"></div>\n\
+<div style="width: 80%;">' + data.orignName + '</div>\n\
+<div style="width: 10%;">' + imgStr + '</div>\n\
+<div style="width: 10%;">\n\
+<button type="button" onclick="TalentInfoInfoDlg.checkFile(this,' + data.typeId + ',' + data.id + ',' + tableIndex + ',' + trIndex + ')" style="margin-right: 10px" class="btn btn-xs btn-info"><i class="fa fa-paste"></i>修改</button>\n\
+<button type="button" onclick="TalentInfoInfoDlg.deleteFile(' + data.id + ')" class="btn btn-xs btn-danger"><i class="fa fa-times"></i>删除</button>\n\
+</div></li></ul>';
+            $(".fileTable").eq(tableIndex).find("tr[data-index='" + trIndex + "']").next("tr.detail-view").find(".imgs").append(html);
+        }
+
+        //$(".fileTable").eq(tableIndex).find("tr[data-index='" + trIndex + "']").next("tr.detail-view").find(".imgs").viewer({fullscreen: false});
     }
 }
 TalentInfoInfoDlg.downloadFile = function (id, type) {
@@ -952,11 +996,12 @@ $(function () {
     $("#politics").val($("#politics").attr("value"));
     $("#talent_arrange").val($("#talent_arrange").attr("value"));
     $("#talent_condition").val($("#talent_condition").attr("value"));
+    $("#tax_insurance_month").val($("#tax_insurance_month").attr("value"));
+    $("#labor_contract_rangetime").val($("#labor_contract_rangetime").attr("value"));
     TalentInfoInfoDlg.validId();
     $("#photo").change(function (e) {
         var tag = e.target;
         var file = tag.files[0];
-        console.log(file);
         var imgSrc;
         var reader = new FileReader();
         reader.readAsDataURL(file);
@@ -976,7 +1021,7 @@ $(function () {
         enable_split_word_search: true,
         rtl: true
     });
-    TalentInfoInfoDlg.initFileTable();
+    TalentInfoInfoDlg.initFile();
 });
 
 

+ 91 - 81
public/static/modular/gate/talentBase/talentInfo_select.js

@@ -4,87 +4,6 @@
 var TalentInfoInfoDlg = {
     talentInfoInfoData: {},
 };
-
-
-//初始化附件类别表单
-TalentInfoInfoDlg.initFileTable = function () {
-    var queryData = {};
-    queryData['project'] = CONFIG.project_rcrd;
-    queryData['type'] = $("#type").val();
-    queryData["talent_condition"] = $("#talent_condition").val();
-    queryData['checkState'] = $("#checkState").val();
-    $("#fileTable").bootstrapTable({
-        url: "/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("/common/api/listTalentFile", function (data) {
-                loadFiles = true;
-                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>';
-                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();
-        }
-    });
-
-}
-
 /**
  * 初始化表格的列
  */
@@ -112,9 +31,100 @@ TalentInfoInfoDlg.initFileTypeColumn = function () {
             }
         },
         {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "52%", 'class': 'uitd_showTip'},
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "10%",
+            formatter: function (value, row, index) {
+                return "";
+            }
+        }
     ]
 };
 
+TalentInfoInfoDlg.initFileTable = function () {
+    var ajax = new $ax("/common/api/findCommonFileType", function (data) {
+        if (data == null || data.length == 0) {
+            return;
+        }
+        var datas = new Array();
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            datas.push([]);//创建空的多维数组,等下用来存每个附件表的各自的列
+        }
+        for (var k in data["rows"]) {
+            var rel = data["rows"][k].rel;
+            if ($("#" + rel).length > 0) {
+                var tableIndex = $("#" + rel).parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                data["rows"][k].tableIndex = tableIndex;
+                data["rows"][k].trIndex = datas[tableIndex].length;
+                datas[tableIndex].push(data["rows"][k]);
+            } else {
+                if (data["rows"][k].isConditionFile) {
+                    var tableIndex = $("#talent_condition").parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[tableIndex].push(data["rows"][k]);//放入人才条件后面的附件表
+                } else {
+                    var tableIndex = $(".fileTable").length - 1;
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[$(".fileTable").length - 1].push(data["rows"][k]);//没有归属,放入最后一个附件表
+                }
+            }
+        }
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            var that = $(".fileTable").eq(i);
+            that.bootstrapTable({
+                columns: TalentInfoInfoDlg.initFileTypeColumn(),
+                data: datas[i],
+                showHeader: false,
+                rowStyle: function (row, index) {
+                    return {classes: ""};
+                },
+                onPostBody: function (data) {
+                    for (var k in data) {
+                        var files = data[k].files;
+                        var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+                        for (var key in files) {
+                            var sn = files[key].url.lastIndexOf(".");
+                            var suffix = files[key].url.substring(sn + 1, files[key].url.length);
+                            var imgStr = "";
+                            if (suffix == "pdf" || suffix == "PDF") {
+                                imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + files[key].url + "','" + files[key].id + "','" + files[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('" + files[key].url + "','" + files[key].id + "','" + files[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=\"' + files[key].url + '\" style=\"width:25px;height:25px;\">';
+                            }
+
+                            html += '<li data-id="' + files[key].id + '">\n\
+                                    <div><input type="hidden" name="uploadFiles[]" value="' + files[key].id + '"></div>\n' +
+                                    '<div style="width: 80%;">' + files[key].orignName + '</div>\n' +
+                                    '<div style="width: 10%;">' + imgStr + '</div>\n' +
+                                    '<div style="width: 10%;"></div>\n\
+                                    </li>';
+                        }
+                        html = html + '</ul>';
+                        that.find("tr[data-index='" + k + "']").after('<tr class="detail-view"><td colspan="5">' + html + '</td></tr>');
+                    }
+                    $("td.uitd_showTip").bind("mouseover", function () {
+                        //var htm = $(this).html();
+                        //$(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+                    });
+                },
+            });
+        }
+        //$(".ibox-content").viewer({fullscreen: false});
+    }, function (data) {
+        Feng.error("查询失败!" + data.responseJSON.message + "!");
+    });
+    var queryData = {};
+    queryData["mainId"] = $("#id").val();
+    queryData['project'] = CONFIG.project_rcrd;
+    queryData['type'] = $("#type").val();
+    queryData["talent_condition"] = $("#talent_condition option:selected").val();
+    queryData['checkState'] = $("#checkState").val();
+    ajax.set(queryData);
+    ajax.start();
+}
+
 TalentInfoInfoDlg.downloadFile = function (id, type) {
     window.location.href = Feng.ctxPath + "/api/common/downloadFile?id=" + id + "&type=" + type;
 }

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

@@ -79,6 +79,7 @@ TalentInfo.initColumn = function () {
                             return "<span class='label label-success'>待初审</span>";
                             break;
                         case 7:
+                            console.log(2);
                             if (row.companyIds) {
                                 return "<span class='label label-success'>待部门审核</span>";
                             } else {
@@ -216,7 +217,7 @@ TalentInfo.openTalentInfoDetail = function () {
                     area: ['800px', '420px'], //宽高
                     fix: false, //不固定
                     maxmin: true,
-                    content: '/enterprise/talent/add/id/' + TalentInfo.seItem.id,
+                    content: '/enterprise/talent/second/id/' + TalentInfo.seItem.id,
                     btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
                     btnAlign: 'c',
                     btn1: function (index, layero) {

+ 236 - 259
public/static/modular/gate/talentInfo/talentInfo_info.js

@@ -229,7 +229,130 @@ TalentInfoInfoDlg.validate = function () {
     $('#talentInfoForm').bootstrapValidator('validate');
     return $("#talentInfoForm").data('bootstrapValidator').isValid();
 }
+/**
+ * 初始化表格的列
+ */
+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 + "',3)\" 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) {
+                return row.step == 1 ? "" : TalentInfoInfoDlg.validUploadButton(1, value, '', row.tableIndex, row.trIndex);
+            }
+        }
+    ]
+};
 
+TalentInfoInfoDlg.initFileTable = function () {
+    var ajax = new $ax("/common/api/findCommonFileType", function (data) {
+        if (data == null || data.length == 0) {
+            return;
+        }
+        var datas = new Array();
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            datas.push([]);//创建空的多维数组,等下用来存每个附件表的各自的列
+        }
+        for (var k in data["rows"]) {
+            var rel = data["rows"][k].rel;
+            if ($("#" + rel).length > 0) {
+                var tableIndex = $("#" + rel).parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                data["rows"][k].tableIndex = tableIndex;
+                data["rows"][k].trIndex = datas[tableIndex].length;
+                datas[tableIndex].push(data["rows"][k]);
+            } else {
+                if (data["rows"][k].isConditionFile) {
+                    var tableIndex = $("#talent_condition").parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[tableIndex].push(data["rows"][k]);//放入人才条件后面的附件表
+                } else {
+                    var tableIndex = $(".fileTable").length - 1;
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[$(".fileTable").length - 1].push(data["rows"][k]);//没有归属,放入最后一个附件表
+                }
+            }
+        }
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            var that = $(".fileTable").eq(i);
+            that.bootstrapTable({
+                columns: TalentInfoInfoDlg.initFileTypeColumn(),
+                data: datas[i],
+                showHeader: false,
+                rowStyle: function (row, index) {
+                    return {classes: ""};
+                },
+                onPostBody: function (data) {
+                    for (var k in data) {
+                        var files = data[k].files;
+                        var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+                        for (var key in files) {
+                            var btn = "";
+                            if (data[k].step != 1) {
+                                btn = TalentInfoInfoDlg.validUploadButton(2, data[k].id, files[key].id, i, k);
+                            }
+                            var sn = files[key].url.lastIndexOf(".");
+                            var suffix = files[key].url.substring(sn + 1, files[key].url.length);
+                            var imgStr = "";
+                            if (suffix == "pdf" || suffix == "PDF") {
+                                imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + files[key].url + "','" + files[key].id + "','" + files[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('" + files[key].url + "','" + files[key].id + "','" + files[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=\"' + files[key].url + '\" style=\"width:25px;height:25px;\">';
+                            }
+
+                            html += '<li data-id="' + files[key].id + '">\n\
+                                    <div>' + (data[k].step != 1 ? '<input type="hidden" name="uploadFiles[]" value="' + files[key].id + '">' : "") + '</div>\n' +
+                                    '<div style="width: 80%;">' + files[key].orignName + '</div>\n' +
+                                    '<div style="width: 10%;">' + imgStr + '</div>\n' +
+                                    '<div style="width: 10%;">' + btn + '</div>\n\
+                                    </li>';
+                        }
+                        html = html + '</ul>';
+                        that.find("tr[data-index='" + k + "']").after('<tr class="detail-view"><td colspan="5">' + html + '</td></tr>');
+                    }
+                    $("td.uitd_showTip").bind("mouseover", function () {
+                        var htm = $(this).html();
+                        $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+                    });
+                },
+            });
+        }
+        //$(".ibox-content").viewer({fullscreen: false});
+    }, function (data) {
+        Feng.error("查询失败!" + data.responseJSON.message + "!");
+    });
+    var queryData = {};
+    queryData["mainId"] = $("#id").val();
+    queryData['project'] = CONFIG.project_rcrd;
+    queryData['type'] = $("#type").val();
+    queryData["talent_condition"] = $("#talent_condition option:selected").val();
+    queryData['checkState'] = $("#checkState").val();
+    ajax.set(queryData);
+    ajax.start();
+}
 
 /**
  * 提交添加
@@ -296,13 +419,69 @@ TalentInfoInfoDlg.getIdentifyCondition = function () {
     $("#talent_condition").trigger('chosen:updated');
 }
 
-TalentInfoInfoDlg.getIdentifyNeedsFileTypes = function () {    
+
+TalentInfoInfoDlg.getIdentifyNeedsFileTypes = function () {
+    var ajax = new $ax("/common/api/getTalentCondtionUploadFile", function (data) {
+        if (data == null || data.length == 0) {
+            return;
+        }
+        var conditionFileTable = $("#talent_condition").parents(".row").next(".row").find(".fileTable");
+        var tableIndex = conditionFileTable.index(".fileTable");
+        var tbody = conditionFileTable.find("tbody");
+        var html = "";
+        for (var key in data.rows) {
+            var filetype = data.rows[key];
+            var name = "";
+            if (filetype.must == 1) {
+                name = '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> ' + filetype.name;
+            }
+            if (filetype.must == 2) {
+                name = '<i class="fa fa-paste"></i>' + filetype.name;
+            }
+            var uploadbtn = TalentInfoInfoDlg.validUploadButton(1, filetype.id, '', tableIndex, key);
+            var templateUrl = '<button type="button" onclick="TalentInfoInfoDlg.downloadFile("' + filetype.id + '",3)" style="margin-right: 10px" class="btn btn-xs btn-primary">\n\
+<i class=\"fa fa-download\"></i>下载""</button>"';
+            html += '<tr data-index="' + key + '">\n\
+                                <td class="uitd_showTip" style="text-align: center; vertical-align: middle; width: 30%; ">' + name + '</td> \n\
+                                <td style="text-align: center; vertical-align: middle; width: 8%; ">' + (filetype.templateUrl ? templateUrl : "无") + '</td> \n\
+                                <td class="uitd_showTip" style="text-align: center; vertical-align: middle; width: 52%; ">' + filetype.description + '</td> \n\
+                                <td style="text-align: center; vertical-align: middle; width: 10%; ">' + uploadbtn + '</td> </tr></tr>';
+            html += '<tr class="detail-view"><td colspan="5"><ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+
+            for (var k in filetype.files) {
+                var file = filetype.files[k];
+                var btn = TalentInfoInfoDlg.validUploadButton(2, filetype.id, file.id, tableIndex, key);
+                var sn = file.url.lastIndexOf(".");
+                var suffix = file.url.substring(sn + 1, file.url.length);
+                var imgStr = "";
+                if (suffix == "pdf" || suffix == "PDF") {
+                    imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + file.url + "','" + file.id + "','" + file.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('" + file.url + "','" + file.id + "','" + file.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=\"' + file.url + '\" style=\"width:25px;height:25px;\">';
+                }
+
+                html += '<li data-id="' + file.id + '">\n\
+                                    <div>' + (filetype.step != 1 ? '<input type="hidden" name="uploadFiles[]" value="' + file.id + '">' : "") + '</div>\n' +
+                        '<div style="width: 80%;">' + file.orignName + '</div>\n' +
+                        '<div style="width: 10%;">' + imgStr + '</div>\n' +
+                        '<div style="width: 10%;">' + btn + '</div>\n\
+                                    </li>';
+            }
+            html += '</ul></td></tr>';
+        }
+        tbody.html(html);
+    }, function (data) {
+        Feng.error("查询失败!" + data.responseJSON.message + "!");
+    });
     var queryData = {};
+    queryData["mainId"] = $("#id").val();
     queryData['project'] = CONFIG.project_rcrd;
     queryData['type'] = $("#type").val();
-    queryData["talent_condition"] = $("#talent_condition").val();
-    queryData['checkState'] = $("#checkState").val();
-    $("#fileTable").bootstrapTable("refresh", {query:queryData});
+    queryData["talent_condition"] = $("#talent_condition option:selected").val();
+    ajax.set(queryData);
+    ajax.start();
 }
 
 TalentInfoInfoDlg.bankChange = function () {
@@ -330,94 +509,6 @@ TalentInfoInfoDlg.changeStudyAbroad = function () {
 }
 
 
-/**
- * 加载市
- */
-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.talentTypeChange = function () {
-    var talent_type = $("#talent_type").val();
-    $("#tax_insurance_month").val("").parent().css("display", "none");
-    $("#labor_contract_rangetime").val("").parent().css("display", "none");
-    $('#talentInfoForm').bootstrapValidator('removeField', "labor_contract_rangetime");
-    $('#talentInfoForm').bootstrapValidator('removeField', "tax_insurance_month");
-    switch (talent_type) {
-        case "1":
-        case "2":
-            $("#tipsBlock").css('display','block');
-            $("#typeTips").val("含经晋江市认定且还在晋江市就业创业的人才,或在晋江市就业创业但未曾申报过晋江市优秀人才的人才。");
-            $("#material_name").html("社保或个税的缴交记录");
-            $("#tax_insurance_month").removeAttr("disabled").parent().css("display", "block");
-            $('#talentInfoForm').bootstrapValidator('addField', "tax_insurance_month", {
-                validators: {
-                    notEmpty: {message: '在我市缴交社会保险或个人所得税月份不能为空'},
-                    regexp: {
-                        regexp: /^\d+$/,
-                        message: "在我市缴交社会保险或个人所得税月份格式不正确"
-                    }
-                }
-            });
-            break;
-        case "3":
-            $("#tipsBlock").css('display','block');
-            $("#typeTips").val("含本办法出台后首次从晋江市以外引进认定的人才,或者流出晋江市满3年后又返回晋江市就业创业(不含企业集团内部人员调动)的人才。")
-            $("#material_name").html("社保或个税的缴交记录");
-            $("#tax_insurance_month").removeAttr("disabled").parent().css("display", "block");
-            $('#talentInfoForm').bootstrapValidator('addField', "tax_insurance_month", {
-                validators: {
-                    notEmpty: {message: '在我市缴交社会保险或个人所得税月份不能为空'},
-                    regexp: {
-                        regexp: /^\d+$/,
-                        message: "在我市缴交社会保险或个人所得税月份格式不正确"
-                    }
-                }
-            });
-            break;
-        case "4":
-            $("#tipsBlock").css('display','block');
-            $("#typeTips").val("含已经与晋江市用人单位达成就业意向且签订预引进意向合作协议(合同)的人才,或拟来我市创业且提交企业名称预先核准的人才。")
-            $("#material_name").html("社保或个税的缴交记录");
-            $("#labor_contract_rangetime").removeAttr("disabled").parent().css("display", "block");
-            $('#talentInfoForm').bootstrapValidator('addField', "labor_contract_rangetime", {validators: {notEmpty: {message: '劳动合同起止时间'}}});
-            break;
-        default:
-            $("#tipsBlock").css('display','none');
-            break;
-    }
-}
-
 TalentInfoInfoDlg.sourceChange = function () {
     var source = $("#source").val();
     $("#source_batch").val("").parent().css("display", "none");
@@ -480,99 +571,6 @@ TalentInfoInfoDlg.sourceChange = function () {
     }
 }
 
-
-//初始化附件类别表单
-TalentInfoInfoDlg.initFileTable = function () {
-    var queryData = {};
-    queryData['project'] = CONFIG.project_rcrd;
-    queryData['type'] = $("#type").val();
-    queryData["talent_condition"] = $("#talent_condition option:selected").val();
-    queryData['checkState'] = $("#checkState").val();
-    $("#fileTable").bootstrapTable({
-        url: "/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("/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();
-                for (var key in data) {
-                    var btn = TalentInfoInfoDlg.validUploadButton(2, row, row.id, data[key].id);
-                    // if(checkState!=10 || (checkState==10 && 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();
@@ -583,23 +581,19 @@ TalentInfoInfoDlg.validId = function () {
     }
 }
 //选择附件并显示附件名
-TalentInfoInfoDlg.checkFile = function (content, state, fileTypeId, fileId) {
+TalentInfoInfoDlg.checkFile = function (content, fileTypeId, fileId, tableIndex, trIndex) {
     if (!TalentInfoInfoDlg.validateIsEdit())
         return;
-    $("#upload_file ").unbind("change");
-    $("#upload_file ").change(function () {
-        TalentInfoInfoDlg.upload(fileTypeId, fileId);
+    $("#upload_file").unbind("change");
+    $("#upload_file").change(function () {
+        TalentInfoInfoDlg.upload(fileTypeId, fileId, tableIndex, trIndex);
     });
     $('#upload_file').val("");
     $('#upload_file').click();
 }
 //上传附件
-TalentInfoInfoDlg.upload = function (fileTypeId, fileId) {
+TalentInfoInfoDlg.upload = function (fileTypeId, fileId, tableIndex, trIndex) {
     var id = $("#id").val();
-    if (id == null || id == '') {
-        Feng.info("请先添加基本信息并保存后再试");
-        return;
-    }
     if (!TalentInfoInfoDlg.validateIsEdit())
         return;
     if (fileId != null && fileId != 'null') {
@@ -609,6 +603,8 @@ TalentInfoInfoDlg.upload = function (fileTypeId, fileId) {
     }
     $("#mainId").val(id);
     $("#fileTypeId").val(fileTypeId);
+    $("#tableIndex").val(tableIndex);
+    $("#trIndex").val(trIndex);
     var index = layer.load(0, {shade: false, time: 0});
     $("#index").val(index);
     $("#uploadForm").submit();
@@ -621,7 +617,8 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
             if (data.code = 200) {
                 Feng.success(data.msg);
-                $("#fileTable").bootstrapTable("refresh", {});
+                $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
+                //$("#fileTable").bootstrapTable("refresh", {});
             } else {
                 Feng.error(data.msg);
             }
@@ -685,62 +682,25 @@ TalentInfoInfoDlg.validateIsEdit = function () {
     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 + "',3)\" 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) {
-                return TalentInfoInfoDlg.validUploadButton(1, row, value);
-            }
-        }
-    ]
-};
-
 /**
  * 校验是否显示按钮
  * @param type      类型  1-上传按钮,2-修改删除按钮
  * @param row
  * @returns {string}
  */
-TalentInfoInfoDlg.validUploadButton = function (type, row, fileTypeId, fileId) {
+TalentInfoInfoDlg.validUploadButton = function (type, fileTypeId, fileId, tableIndex, trIndex) {
     var files = $("#files").val();
     var checkState = $("#checkState").val();
     if (Feng.isEmptyStr(checkState) || checkState == 0 || checkState == 1 || checkState == 3 || checkState == 5) {
-        if ((checkState == 3 || checkState == 5) && row.step == 1)
-            return "";
         if (type == 1) {          //上传
-            return "<button type='button' onclick=\"TalentInfoInfoDlg.checkFile(this,'" + row.fState + "','" + fileTypeId + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
+            return "<button type='button' onclick=\"TalentInfoInfoDlg.checkFile(this," + fileTypeId + "," + null + "," + tableIndex + "," + trIndex + ")\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
                     "<i class=\"fa fa-upload\"></i>上传" +
                     "</button>";
         } else {
-            return "<button type=\'button\' onclick=\"TalentInfoInfoDlg.checkFile(this,'" + row.fState + "','" + row.id + "','" + fileId + "')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
+            return "<button type=\'button\' onclick=\"TalentInfoInfoDlg.checkFile(this," + fileTypeId + "," + fileId + "," + tableIndex + "," + trIndex + ")\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
                     "<i class=\"fa fa-paste\"></i>修改" +
                     "</button>" +
-                    "<button type='button' onclick=\"TalentInfoInfoDlg.deleteFile('" + fileId + "','" + row.fState + "')\" class=\"btn btn-xs btn-danger\">" +
+                    "<button type='button' onclick=\"TalentInfoInfoDlg.deleteFile(" + fileId + ")\" class=\"btn btn-xs btn-danger\">" +
                     "<i class=\"fa fa-times\"></i>删除" +
                     "</button>";
         }
@@ -755,7 +715,33 @@ TalentInfoInfoDlg.callBack = function (data) {
     layer.close(data.obj);
     Feng.info(data.msg);
     if (data.code == 200) {
-        $("#fileTable").bootstrapTable("refresh", {});
+        var tableIndex = $("#tableIndex").val();
+        var trIndex = $("#trIndex").val();
+        var sn = data.info.lastIndexOf(".");
+        var suffix = data.info.substring(sn + 1, data.info.length);
+        var imgStr = "";
+        if (suffix == "pdf" || suffix == "PDF") {
+            imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data.info + "','" + data.id + "','" + data.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.info + "','" + data.id + "','" + data.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.info + '" style="width:25px;height:25px;">';
+        }
+        var li = $("input[name='uploadFiles[]'][value='" + data.id + "'").parents("li");
+        if (li.length > 0) {
+            li.find("div").eq(1).html(data.orignName);
+            li.find("div").eq(2).html(imgStr);
+        } else {
+            var html = '<li data-id="' + data.id + '">\n\
+<div><input type="hidden" name="uploadFiles[]" value="' + data.id + '"></div>\n\
+<div style="width: 80%;">' + data.orignName + '</div>\n\
+<div style="width: 10%;">' + imgStr + '</div>\n\
+<div style="width: 10%;">\n\
+<button type="button" onclick="TalentInfoInfoDlg.checkFile(this,' + data.typeId + ',' + data.id + ',' + tableIndex + ',' + trIndex + ')" style="margin-right: 10px" class="btn btn-xs btn-info"><i class="fa fa-paste"></i>修改</button>\n\
+<button type="button" onclick="TalentInfoInfoDlg.deleteFile(' + data.id + ')" class="btn btn-xs btn-danger"><i class="fa fa-times"></i>删除</button>\n\
+</div></li></ul>';
+            $(".fileTable").eq(tableIndex).find("tr[data-index='" + trIndex + "']").next("tr.detail-view").find(".imgs").append(html);
+        }
     }
 }
 TalentInfoInfoDlg.downloadFile = function (id, type) {
@@ -917,25 +903,11 @@ $(function () {
     var checkState = $("#checkState").val();
     //批量加载字典表数据
     var arr = [
-        {"name": "enterprise_tag", "code": "enterprise_tag"},
-        {"name": "nation", "code": "nation"},
         {"name": "talent_arrange", "code": "talent_arrange"},
-        {"name": "nationality", "code": "nationality"},
-        {"name": "politics", "code": "politics"},
         {"name": "highest_degree", "code": "highest_degree"},
-        {"name": "industry_field", "code": "industry_field"},
         {"name": "source", "code": "source"},
-        {"name": "import_way", "code": "import_way"},
-        {"name": "address", "code": "street"}];
+        {"name": "import_way", "code": "import_way"}];
     Feng.findChildDictBatch(JSON.stringify(arr))
-    //加载省份
-    Feng.addAjaxSelect({
-        "id": "province",
-        "displayCode": "code",
-        "displayName": "name",
-        "type": "GET",
-        "url": "/common/tool/getProvinceSelect"
-    });
     //批量加载时间控件
     $(".date").each(function () {
         laydate.render({
@@ -954,11 +926,18 @@ $(function () {
     })
     if (id != null && id != '') {
         //select初始化
-        $("select").each(function () {
-            $(this).val($(this).attr("value")).trigger("change");
-        });
+        $("#highest_degree").val($("#highest_degree").attr("value")).trigger("change");
+        $("#import_way").val($("#import_way").attr("value")).trigger("change");
+        $("#source").val($("#source").attr("value")).trigger("change");
         Feng.getCheckLog("logTable", {"type": CONFIG.project_rcrd, "mainId": id, "typeFileId": "", "active": 1})
     }
+    $("#source_batch").val($("#source_batch").attr("value"));
+    $("#source_city").val($("#source_city").attr("value"));
+    $("#source_county").val($("#source_county").attr("value"));
+    $("#quanzhou_highcert_pubtime").val($("#quanzhou_highcert_pubtime").attr("value"));
+    $("#quanzhou_highcert_exptime").val($("#quanzhou_highcert_exptime").attr("value"));
+    $("#fujian_highcert_pubtime").val($("#fujian_highcert_pubtime").attr("value"));
+    $("#fujian_highcert_exptime").val($("#fujian_highcert_exptime").attr("value"));
     $("#talent_type").val($("#talent_type").attr("value"));
     $("#card_type").val($("#card_type").attr("value"));
     $("#sex").val($("#sex").attr("value"));
@@ -968,14 +947,11 @@ $(function () {
     $("#nationality").val($("#nationality").attr("value"));
     $("#industry_field").val($("#industry_field").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();
     $("#politics").val($("#politics").attr("value"));
-    $("#talent_arrange").val($("#talent_arrange").attr("value"));
-    $("#talent_condition").val($("#talent_condition").attr("value"));
     TalentInfoInfoDlg.validId();
     $("#photo").change(function (e) {
         var tag = e.target;
@@ -992,6 +968,7 @@ $(function () {
     $("#talent_condition").on('chosen:ready', function (e, params) {
         $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
     });
+    $("#talent_condition").val($("#talent_condition").attr("value"));
     $("#talent_condition").chosen({
         search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
         disable_search: false,

+ 91 - 80
public/static/modular/gate/talentInfo/talentInfo_select.js

@@ -5,86 +5,6 @@ var TalentInfoInfoDlg = {
     talentInfoInfoData: {},
 };
 
-
-//初始化附件类别表单
-TalentInfoInfoDlg.initFileTable = function () {
-    var queryData = {};
-    queryData['project'] = CONFIG.project_rcrd;
-    queryData['type'] = $("#type").val();
-    queryData["talent_condition"] = $("#talent_condition").val();
-    queryData['checkState'] = $("#checkState").val();
-    $("#fileTable").bootstrapTable({
-        url: "/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("/common/api/listTalentFile", function (data) {
-                loadFiles = true;
-                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>';
-                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();
-        }
-    });
-
-}
-
 /**
  * 初始化表格的列
  */
@@ -112,9 +32,99 @@ TalentInfoInfoDlg.initFileTypeColumn = function () {
             }
         },
         {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "52%", 'class': 'uitd_showTip'},
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "10%",
+            formatter: function (value, row, index) {
+                return "";
+            }
+        }
     ]
 };
 
+TalentInfoInfoDlg.initFileTable = function () {
+    var ajax = new $ax("/common/api/findCommonFileType", function (data) {
+        if (data == null || data.length == 0) {
+            return;
+        }
+        var datas = new Array();
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            datas.push([]);//创建空的多维数组,等下用来存每个附件表的各自的列
+        }
+        for (var k in data["rows"]) {
+            var rel = data["rows"][k].rel;
+            if ($("#" + rel).length > 0) {
+                var tableIndex = $("#" + rel).parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                data["rows"][k].tableIndex = tableIndex;
+                data["rows"][k].trIndex = datas[tableIndex].length;
+                datas[tableIndex].push(data["rows"][k]);
+            } else {
+                if (data["rows"][k].isConditionFile) {
+                    var tableIndex = $("#talent_condition").parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[tableIndex].push(data["rows"][k]);//放入人才条件后面的附件表
+                } else {
+                    var tableIndex = $(".fileTable").length - 1;
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[$(".fileTable").length - 1].push(data["rows"][k]);//没有归属,放入最后一个附件表
+                }
+            }
+        }
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            var that = $(".fileTable").eq(i);
+            that.bootstrapTable({
+                columns: TalentInfoInfoDlg.initFileTypeColumn(),
+                data: datas[i],
+                showHeader: false,
+                rowStyle: function (row, index) {
+                    return {classes: ""};
+                },
+                onPostBody: function (data) {
+                    for (var k in data) {
+                        var files = data[k].files;
+                        var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+                        for (var key in files) {
+                            var sn = files[key].url.lastIndexOf(".");
+                            var suffix = files[key].url.substring(sn + 1, files[key].url.length);
+                            var imgStr = "";
+                            if (suffix == "pdf" || suffix == "PDF") {
+                                imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + files[key].url + "','" + files[key].id + "','" + files[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('" + files[key].url + "','" + files[key].id + "','" + files[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=\"' + files[key].url + '\" style=\"width:25px;height:25px;\">';
+                            }
+
+                            html += '<li data-id="' + files[key].id + '">\n\
+                                    <div><input type="hidden" name="uploadFiles[]" value="' + files[key].id + '"></div>\n' +
+                                    '<div style="width: 80%;">' + files[key].orignName + '</div>\n' +
+                                    '<div style="width: 10%;">' + imgStr + '</div>\n' +
+                                    '<div style="width: 10%;"></div>\n\
+                                    </li>';
+                        }
+                        html = html + '</ul>';
+                        that.find("tr[data-index='" + k + "']").after('<tr class="detail-view"><td colspan="5">' + html + '</td></tr>');
+                    }
+                    $("td.uitd_showTip").bind("mouseover", function () {
+                        var htm = $(this).html();
+                        $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+                    });
+                },
+            });
+        }
+    }, function (data) {
+        Feng.error("查询失败!" + data.responseJSON.message + "!");
+    });
+    var queryData = {};
+    queryData["mainId"] = $("#id").val();
+    queryData['project'] = CONFIG.project_rcrd;
+    queryData['type'] = $("#type").val();
+    queryData["talent_condition"] = $("#talent_condition option:selected").val();
+    queryData['checkState'] = $("#checkState").val();
+    ajax.set(queryData);
+    ajax.start();
+}
+
 TalentInfoInfoDlg.downloadFile = function (id, type) {
     window.location.href = Feng.ctxPath + "/api/common/downloadFile?id=" + id + "&type=" + type;
 }
@@ -126,6 +136,7 @@ $(function () {
     var id = $("#id").val();
     var checkState = $("#checkState").val();
     TalentInfoInfoDlg.initFileTable();
+    $(".ibox-content").viewer({fullscreen: false});
     if (id != null && id != '') {
         //select初始化
         $("select").each(function () {

+ 122 - 114
public/static/modular/talentIdentify/talentInfo/talentInfo_common_check.js

@@ -7,6 +7,126 @@ var TalentInfoInfoDlg = {
 
 };
 
+/**
+ * 初始化表格的列
+ */
+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 + "',3)\" 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) {
+                return "";
+            }
+        }
+    ]
+};
+
+TalentInfoInfoDlg.initFileTable = function () {
+    var ajax = new $ax("/common/api/findCommonFileType", function (data) {
+        if (data == null || data.length == 0) {
+            return;
+        }
+        var datas = new Array();
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            datas.push([]);//创建空的多维数组,等下用来存每个附件表的各自的列
+        }
+        for (var k in data["rows"]) {
+            var rel = data["rows"][k].rel;
+            if ($("#" + rel).length > 0) {
+                var tableIndex = $("#" + rel).parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                data["rows"][k].tableIndex = tableIndex;
+                data["rows"][k].trIndex = datas[tableIndex].length;
+                datas[tableIndex].push(data["rows"][k]);
+            } else {
+                if (data["rows"][k].isConditionFile) {
+                    var tableIndex = $("#talent_condition").parents(".row").next(".row").find("table.fileTable").index(".fileTable");
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[tableIndex].push(data["rows"][k]);//放入人才条件后面的附件表
+                } else {
+                    var tableIndex = $(".fileTable").length - 1;
+                    data["rows"][k].tableIndex = tableIndex;
+                    data["rows"][k].trIndex = datas[tableIndex].length;
+                    datas[$(".fileTable").length - 1].push(data["rows"][k]);//没有归属,放入最后一个附件表
+                }
+            }
+        }
+        for (var i = 0; i < $(".fileTable").length; i++) {
+            var that = $(".fileTable").eq(i);
+            that.bootstrapTable({
+                columns: TalentInfoInfoDlg.initFileTypeColumn(),
+                data: datas[i],
+                showHeader: false,
+                rowStyle: function (row, index) {
+                    return {classes: ""};
+                },
+                onPostBody: function (data) {
+                    for (var k in data) {
+                        var files = data[k].files;
+                        var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+                        for (var key in files) {
+                            var sn = files[key].url.lastIndexOf(".");
+                            var suffix = files[key].url.substring(sn + 1, files[key].url.length);
+                            var imgStr = "";
+                            if (suffix == "pdf" || suffix == "PDF") {
+                                imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + files[key].url + "','" + files[key].id + "','" + files[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('" + files[key].url + "','" + files[key].id + "','" + files[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=\"' + files[key].url + '\" style=\"width:25px;height:25px;\">';
+                            }
+
+                            html += '<li data-id="' + files[key].id + '">\n\
+                                    <div><input type="hidden" name="uploadFiles[]" value="' + files[key].id + '"></div>\n' +
+                                    '<div style="width: 80%;">' + files[key].orignName + '</div>\n' +
+                                    '<div style="width: 10%;">' + imgStr + '</div>\n' +
+                                    '<div style="width: 10%;"></div>\n\
+                                    </li>';
+                        }
+                        html = html + '</ul>';
+                        that.find("tr[data-index='" + k + "']").after('<tr class="detail-view"><td colspan="5">' + html + '</td></tr>');
+                    }
+                    $("td.uitd_showTip").bind("mouseover", function () {
+                        var htm = $(this).html();
+                        $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+                    });
+                },
+            });
+        }
+    }, function (data) {
+        Feng.error("查询失败!" + data.responseJSON.message + "!");
+    });
+    var queryData = {};
+    queryData["mainId"] = $("#id").val();
+    queryData['project'] = CONFIG.project_rcrd;
+    queryData['type'] = $("#type").val();
+    queryData["talent_condition"] = $("#talent_condition option:selected").val();
+    queryData['checkState'] = $("#checkState").val();
+    ajax.set(queryData);
+    ajax.start();
+}
+
 
 /**
  * 关闭此对话框
@@ -51,85 +171,6 @@ TalentInfoInfoDlg.sourceChange = function () {
     }
 }
 
-//初始化附件类别表单
-TalentInfoInfoDlg.initFileTable = function () {
-    var queryData = {};
-    queryData['project'] = CONFIG.project_rcrd;
-    queryData['type'] = $("#type").val();
-    queryData["checkState"] = $("#checkState").val();
-    $("#fileTable").bootstrapTable({
-        url: "/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("/common/api/listTalentFile", function (data) {
-                if (data == null || data.length == 0) {
-                    return;
-                }
-                var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
-                for (var key in data) {
-                    var sn = data[key].url.lastIndexOf(".");
-                    var suffix = data[key].url.substring(sn + 1, data[key].url.length);
-                    var imgStr = "";
-                    if (suffix == "pdf" || suffix == "PDF") {
-                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
-                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
-                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
-                    } else {
-                        imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
-                    }
-                    html = html + '<li style="display: none">' + data[key].id + '</li>\n' +
-                            '<li style="width: 80%;padding-top: 5px;">' + data[key].orignName + '</li>\n' +
-                            '<li style="width: 10%;">' + imgStr + '</li>\n' +
-                            "<li style='width: 10%;padding-top: 2px;'><button type='button' onclick=\"TalentInfoInfoDlg.downloadFile('" + data[key].id + "',1)\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button></li>";
-                }
-                html = html + '</ul>';
-                $detail.html(html);
-                $(".imgs").viewer({
-                    // toolbar:false,
-                    fullscreen: false
-                });
-            }, function (data) {
-                Feng.error("查询失败!" + data.responseJSON.message + "!");
-            });
-            var queryData = {};
-            queryData["mainId"] = $("#id").val();
-            queryData["fileTypeId"] = row.id;
-            ajax.set(queryData);
-            ajax.start();
-        }
-    });
-}
-
 
 TalentInfoInfoDlg.callback = function (data) {
     Feng.info(data.msg);
@@ -144,40 +185,9 @@ TalentInfoInfoDlg.downloadFile = function (id, type) {
 }
 
 TalentInfoInfoDlg.expandRows = function () {
-    $("#fileTable").bootstrapTable('expandAllRows')
+    $(".fileTable").bootstrapTable('expandAllRows')
 }
 
-/**
- * 初始化表格的列
- */
-TalentInfoInfoDlg.initFileTypeColumn = function () {
-    return [
-        {field: 'selectItem', checkbox: false, visible: false},
-        {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "20%", 'class': 'uitd_showTip',
-            formatter: function (value, row, index) {
-                if (row.must == 1) {
-                    return '<i class="fa fa-paste"></i><span style="font-weight:bold;color:red;font-size:14px;font-family:宋体"> * </span> ' + value;
-                }
-                if (row.must == 2) {
-                    return '<i class="fa fa-paste"></i>' + value;
-                }
-            }
-        },
-        {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "68%", 'class': 'uitd_showTip'},
-        {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle', width: "10%",
-            formatter: function (value, row, index) {
-                if (value == null || value == '' || value == 'null') {
-                    return '无';
-                }
-                return "<button type='button' onclick=\"TalentInfoInfoDlg.downloadFile('" + row.id + "',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
-                        "<i class=\"fa fa-download\"></i>下载" +
-                        "</button>";
-            }
-        }
-    ]
-};
-
-
 /**
  * 显示审核模态框
  */
@@ -652,7 +662,6 @@ TalentInfoInfoDlg.createNoFieldCheckModal = function () {
 }
 
 
-
 $(function () {
     $("select:not(#checkStateModal,#checkStateFirstModal)").each(function () {
         //$(this).attr("disabled", "disabled");
@@ -660,12 +669,11 @@ $(function () {
     $("input,textarea").not("#checkMsg,#checkMsgFirst").each(function () {
         $(this).attr("readonly", "readonly");
     });
-    // TalentInfoInfoDlg.initFileTable();
     TalentInfoInfoDlg.typeChange();
     TalentInfoInfoDlg.sourceChange();
-    $("#photoImg").viewer();
     $('[data-toggle="tooltip"]').tooltip();
     TalentInfoInfoDlg.initFileTable();
+    $(".ibox-content").viewer({fullscreen: false});
     Feng.getCheckLog("logTable", {"type": CONFIG.project_rcrd, "mainId": $("#id").val(), "typeFileId": "", "active": 1})
 });
 

+ 274 - 249
public/static/modular/talentIdentify/talentInfo/talentInfo_prepare.js

@@ -2,9 +2,9 @@
  * 人才认定申报管理初始化
  */
 var TalentInfo = {
-    id: "TalentInfoTable",	//表格id
-    checkAll:false,
-    seItem: null,		//选中的条目
+    id: "TalentInfoTable", //表格id
+    checkAll: false,
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
@@ -15,28 +15,31 @@ var TalentInfo = {
 TalentInfo.initColumn = function () {
     var type = $("#usertype").val();
     var isShow = true;
-    if(type==2){
+    if (type == 2) {
         isShow = false;
-    };
+    }
+    ;
     return [
         {field: 'selectItem', checkbox: true},
-        {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle',width:'80px'},
-        {title: '离职状态', field: 'active', visible: true, align: 'center', valign: 'middle',width:'80px',
-            formatter : function (value,row,index) {
-                if(value==1){
+        {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: '80px'},
+        {title: '离职状态', field: 'active', visible: true, align: 'center', valign: 'middle', width: '80px',
+            formatter: function (value, row, index) {
+                if (value == 1) {
                     return '<span style="color:#6495ED">在职</span>';
-                }if(value==2){
+                }
+                if (value == 2) {
                     return '<span style="color:#FF82AB">离职</span>';
                 }
             }
         },
-        {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle',width:'150px'},
-        {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:'120px',
-            formatter : function(value,row,index){
-                if(row.sex==1){
-                    return value+'<span style="color:#6495ED">【男】</span>';
-                }if(row.sex==2){
-                    return value+'<span style="color:#FF82AB">【女】</span>';
+        {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: '150px'},
+        {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: '120px',
+            formatter: function (value, row, index) {
+                if (row.sex == 1) {
+                    return value + '<span style="color:#6495ED">【男】</span>';
+                }
+                if (row.sex == 2) {
+                    return value + '<span style="color:#FF82AB">【女】</span>';
                 }
             }
         },
@@ -49,53 +52,59 @@ TalentInfo.initColumn = function () {
         //         }
         //     }
         // },
-        {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:'100px'},
-        {title: '人才标签', field: 'talentTypeName', visible: isShow, align: 'center', valign: 'middle',width:'100px'},
-        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:'150px','class': 'uitd_showTip'},
-        {title: '认定条件', field: 'identifyConditionText', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:'150px'},
-        {title: '认定条件名称', field: 'identifyConditionName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:'100px'},
-        {title: '获得时间', field: 'identifyGetTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:'100px'},
-        {title: '人才证书有效期', field: 'certificateStartTime', visible: isShow, align: 'center', valign: 'middle','class': 'uitd_showTip',width:'150px',
-            formatter : function (value,row,index) {
-                return Feng.isNotEmptyStr(row.certificateStartTime) && Feng.isNotEmptyStr(row.qzgccrcActiveTime)?row.certificateStartTime +"至"+ row.qzgccrcActiveTime:"";
+        {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: '100px'},
+        {title: '人才标签', field: 'talentTypeName', visible: isShow, align: 'center', valign: 'middle', width: '100px'},
+        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: '150px', 'class': 'uitd_showTip'},
+        {title: '认定条件', field: 'identifyConditionText', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: '150px'},
+        {title: '认定条件名称', field: 'identifyConditionName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: '100px'},
+        {title: '获得时间', field: 'identifyGetTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: '100px'},
+        {title: '人才证书有效期', field: 'certificateStartTime', visible: isShow, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: '150px',
+            formatter: function (value, row, index) {
+                return Feng.isNotEmptyStr(row.certificateStartTime) && Feng.isNotEmptyStr(row.qzgccrcActiveTime) ? row.certificateStartTime + "至" + row.qzgccrcActiveTime : "";
             }
         },
-        {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
-        {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
-        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle',width:"100px",
-            formatter : function (value,row,index) {
-                if(value == -1){
+        {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "100px",
+            formatter: function (value, row, index) {
+                if (value == -1) {
                     return "<span class='label label-danger'>审核不通过</span>"
-                }if(value == 35){
+                }
+                if (value == 35) {
                     return "<span class='label label-primary'>已通过</span>"
                 }
             }
         },
-        {title: '公示状态', field: 'isPublic', visible: true, align: 'center', valign: 'middle',width:'120px',
-            formatter : function (value,row,index) {
-                if(value == 1){
+        {title: '公示状态', field: 'isPublic', visible: true, align: 'center', valign: 'middle', width: '120px',
+            formatter: function (value, row, index) {
+                if (value == 1) {
                     return "<span class='label label-info'>待核查征信</span>"
-                }if(value == 2){
+                }
+                if (value == 2) {
                     return "<span class='label label-success'>待公示</span>"
-                }if(value == 3){
+                }
+                if (value == 3) {
                     return "<span class='label label-danger'>公示中</span>"
-                }if(value == 4){
+                }
+                if (value == 4) {
                     return "<span class='label label-warning'>待公布</span>"
-                }if(value == 5){
-                    if(row.checkState == -1){
+                }
+                if (value == 5) {
+                    if (row.checkState == -1) {
                         return "<span class='label label-danger'>审核不通过</span>"
                     }
                     return "<span class='label label-primary'>待发证</span>"
-                }if(value == 6){
+                }
+                if (value == 6) {
                     return "<span class='label label-primary'>已发证</span>"
                 }
             }
         },
-        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:'80px',
-            formatter : function (value,row,index){
-                return "<span class='label label-success' onclick=\"TalentInfo.showLog('"+value+"')\" >" +
-                    "<i class=\"fa fa-book\"></i>日志" +
-                    "</span>";
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: '80px',
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"TalentInfo.showLog('" + value + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
             }
         }
     ];
@@ -105,10 +114,10 @@ TalentInfo.initColumn = function () {
  */
 TalentInfo.check = function () {
     var selected = $('#' + this.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的某一记录!");
         return false;
-    }else{
+    } else {
         TalentInfo.seItem = selected[0];
         return true;
     }
@@ -126,21 +135,21 @@ TalentInfo.openTalentInfoDetail = function () {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/talentInfo/talentInfo_toCommonCheck/' + TalentInfo.seItem.id+'/4'
+            content: Feng.ctxPath + '/talentInfo/talentInfo_toCommonCheck/' + TalentInfo.seItem.id + '/4'
         });
         layer.full(index);
         TalentInfo.layerIndex = index;
     }
 };
 
-TalentInfo.prepareSearch = function(){
+TalentInfo.prepareSearch = function () {
     var sex = $("#pub_sex").val();
     var checkState = $("#pub_checkState").val();
     var name = $("#pub_name").val();
-    $('#dataTable').bootstrapTable("refresh",{"query":{"sex":sex,"checkState":checkState,"name":name}});
+    $('#dataTable').bootstrapTable("refresh", {"query": {"sex": sex, "checkState": checkState, "name": name}});
 }
 
-TalentInfo.prepareReset = function(){
+TalentInfo.prepareReset = function () {
     $("#pub_sex").val("");
     $("#pub_checkState").val("");
     $("#pub_name").val("");
@@ -151,89 +160,90 @@ TalentInfo.prepareReset = function(){
  * 查询需要处理的数据
  * @param type
  */
-TalentInfo.showDataCheckModal = function(type){
-    $("#hczxForm").css("display","none");
+TalentInfo.showDataCheckModal = function (type) {
+    $("#hczxForm").css("display", "none");
     switch (type) {
         case 1:                     //待核查征信名单-导出
-            $("#hczxButton").attr("onclick","TalentInfo.checkExport()").text("导出");
+            $("#hczxButton").attr("onclick", "TalentInfo.checkExport()").text("导出");
             $("#exportCommonModalLabel").text("待核查征信名单");
             break;
         case 2:                     //待核查征信名单-核查征信通过
-            $("#hczxButton").attr("onclick","TalentInfo.hczxPass()").text("提交");
+            $("#hczxButton").attr("onclick", "TalentInfo.hczxPass()").text("提交");
             $("#exportCommonModalLabel").text("待核查征信名单");
             break;
         case 3:                     //公示(批量)
-            $("#hczxButton").attr("onclick","TalentInfo.public()").text("公示");
+            $("#hczxButton").attr("onclick", "TalentInfo.public()").text("公示");
             $("#exportCommonModalLabel").text("待公示名单");
-            $("#hczxForm").css("display","block");
-            $(".time").each(function(){
+            $("#hczxForm").css("display", "block");
+            $(".time").each(function () {
                 laydate.render({
-                    elem: "#"+$(this).attr("id")
-                    ,type: 'date'
-                    ,format:'yyyy年MM月dd日'
+                    elem: "#" + $(this).attr("id")
+                    , type: 'date'
+                    , format: 'yyyy年MM月dd日'
                 });
             });
             break;
         case 4:                     //公示通过(批量)
-            $("#hczxButton").attr("onclick","TalentInfo.publicPass()").text("提交");
+            $("#hczxButton").attr("onclick", "TalentInfo.publicPass()").text("提交");
             $("#exportCommonModalLabel").text("公示通过名单");
             break;
         case 5:                     //待公布名单
-            $("#hczxButton").attr("onclick","TalentInfo.publish()").text("公布");
+            $("#hczxButton").attr("onclick", "TalentInfo.publish()").text("公布");
             $("#exportCommonModalLabel").text("待公布名单");
             break;
         case 6:                     //待发证名单
-            $("#hczxButton").attr("onclick","TalentInfo.sendCard()").text("提交");
+            $("#hczxButton").attr("onclick", "TalentInfo.sendCard()").text("提交");
             $("#exportCommonModalLabel").text("待发证名单");
             break;
         case 7:                     //公示名单预览
-            $("#hczxButton").attr("onclick","TalentInfo.needPublicExport()").text("导出");
+            $("#hczxButton").attr("onclick", "TalentInfo.needPublicExport()").text("导出");
             $("#exportCommonModalLabel").text("待公示名单");
             break;
         case 8:                     //公布预览
-            $("#hczxButton").attr("onclick","TalentInfo.publishExportBefore()").text("导出");
+            $("#hczxButton").attr("onclick", "TalentInfo.publishExportBefore()").text("导出");
             $("#exportCommonModalLabel").text("待公布名单");
             break;
     }
     $('#dataTable').bootstrapTable('destroy');
     $('#dataTable').bootstrapTable({
-        url: Feng.ctxPath + "/talentInfo/selectNeedCheckData?type="+type,
+        url: "/admin/talent/selectNeedCheckData?type=" + type,
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-        search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-        showRefresh: false,				// 是否显示刷新按钮
-        clickToSelect: true,			// 是否启用点击选中行
-        singleSelect: false,				// 设置True 将禁止多选
-        striped: true,  				// 是否显示行间隔色
-        pagination: true,   			// 设置为 true 会在表格底部显示分页条
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: false, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: true, // 设置为 true 会在表格底部显示分页条
         paginationHAlign: "left",
         paginationDetailHAlign: "right",
-        sidePagination: "client",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
-        pageNumber:1,                       //初始化加载第一页,默认第一页
-        pageSize: 10,                       //每页的记录行数(*)
-        pageList: [10, 25, 50, 100,500,1000,1500],        //可供选择的每页的行数(*)
-        maintainSelected:true,              //全表全选需要开启
+        sidePagination: "client", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        pageNumber: 1, //初始化加载第一页,默认第一页
+        pageSize: 10, //每页的记录行数(*)
+        pageList: [10, 25, 50, 100, 500, 1000, 1500], //可供选择的每页的行数(*)
+        maintainSelected: true, //全表全选需要开启
         showColumns: false,
-        responseHandler : function(res){
+        responseHandler: function (res) {
             $("#exportCommonModal").modal("show");
             return res.obj.rows;
         },
         columns:
-            [
-                {field:"selectItem",checkbox:true},
-                {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:"20%"},
-                {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:"30%"},
-                {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle',width:"40%"},
-                {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle',width:"10%",
-                    formatter:function (value,row,index) {
-                        if(value==-1){
-                            return "<span style='color: #ed5565;'>审核不通过</span>";
-                        }if(value== 35){
-                            return "<span style='color: #1ab394;'>审核通过</span>";
+                [
+                    {field: "selectItem", checkbox: true},
+                    {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "20%"},
+                    {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', width: "30%"},
+                    {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: "40%"},
+                    {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "10%",
+                        formatter: function (value, row, index) {
+                            if (value == 13) {
+                                return "<span style='color: #ed5565;'>审核不通过</span>";
+                            }
+                            if (value == 12) {
+                                return "<span style='color: #1ab394;'>审核通过</span>";
+                            }
                         }
-                    }
-                },
-            ]
+                    },
+                ]
 
     });
 }
@@ -241,45 +251,45 @@ TalentInfo.showDataCheckModal = function(type){
 /**
  * 选择导出提交
  */
-TalentInfo.checkExport = function(){
+TalentInfo.checkExport = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    window.location.href = Feng.ctxPath + "/talentInfo/exportHczx?ids="+ids;
+    window.location.href = Feng.ctxPath + "/talentInfo/exportHczx?ids=" + ids;
 }
 
 /**
  * 核查征信批量通过提交
  */
-TalentInfo.hczxPass = function(){
+TalentInfo.hczxPass = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    var operation = function(){
+    var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/talentInfo/hczxPass", function (data) {
-            if(data.code==200){
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 TalentInfo.table.refresh();
                 $("#exportCommonModal").modal("hide");
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
             Feng.error("核查征信失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("ids",ids);
+        ajax.set("ids", ids);
         ajax.start();
     }
     Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
@@ -288,9 +298,9 @@ TalentInfo.hczxPass = function(){
 /**
  * 显示核查征信驳回模态框
  */
-TalentInfo.showHczxRejectModal = function(){
+TalentInfo.showHczxRejectModal = function () {
     if (this.check()) {
-        if(TalentInfo.seItem.isPublic!=1){
+        if (TalentInfo.seItem.isPublic != 1) {
             Feng.info("当前记录不是待核查征信状态,无法核查");
             return;
         }
@@ -303,26 +313,26 @@ TalentInfo.showHczxRejectModal = function(){
 /**
  * 核查征信驳回提交
  */
-TalentInfo.hczxReject = function(){
+TalentInfo.hczxReject = function () {
     var id = $("#hczxId").val();
     var msg = $("#hczxMsg").val();
-    if(msg==null || msg==''){
+    if (msg == null || msg == '') {
         Feng.info("请填写失信原因");
         return;
     }
-    var operation = function(){
+    var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/talentInfo/hczxReject", function (data) {
-            if(data.code==200){
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 TalentInfo.table.refresh();
                 $("#hczxRejectModal").modal("hide");
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
             Feng.error("核查征信失败!" + data.responseJSON.message + "!");
         });
-        ajax.setData({"id":id,"outMsg":msg});
+        ajax.setData({"id": id, "outMsg": msg});
         ajax.start();
     }
     Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
@@ -347,12 +357,12 @@ TalentInfo.hczxReject = function(){
 /**
  * 是否发送短信
  */
-TalentInfo.toggleMessage = function(){
+TalentInfo.toggleMessage = function () {
     var isMessage = $("input[name='isSend']:checked").val();
-    if (isMessage==1) {
-        $("#messageEdit").css("display","block");
-    } else if ( isMessage == 2){
-        $("#messageEdit").css("display","none");
+    if (isMessage == 1) {
+        $("#messageEdit").css("display", "block");
+    } else if (isMessage == 2) {
+        $("#messageEdit").css("display", "none");
     }
 }
 
@@ -360,19 +370,19 @@ TalentInfo.toggleMessage = function(){
 /**
  * 公示预览
  */
-TalentInfo.needPublicExport = function(){
+TalentInfo.needPublicExport = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    var operation = function(){
+    var operation = function () {
         $("#exportCommonModal").modal("hide");
-        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/talentInfo/exportPublic?ids="+ids));
+        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/talentInfo/exportPublic?ids=" + ids));
     }
     Feng.confirm("确定要公示预览吗?", operation);
 }
@@ -380,14 +390,14 @@ TalentInfo.needPublicExport = function(){
 /**
  * 公示
  */
-TalentInfo.public = function(){
+TalentInfo.public = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
     var isMessage = $("input[name='isSend']:checked").val();
@@ -398,24 +408,37 @@ TalentInfo.public = function(){
     var dep = $("#dep").val();
     var phone = $("#fyphone").val();
     var email = $("#fyemail").val();
-    if(isMessage == 1){
-        if(typeName == null || typeName == ''){
-            Feng.info("请填写公示类型");return ;
-        }if(address == null || address == ''){
-            Feng.info("请填写公示平台");return ;
-        }if(publicStartTime == null || publicStartTime == ''){
-            Feng.info("请填写公示开始时间");return ;
-        }if(publicEndTime == null || publicEndTime == ''){
-            Feng.info("请填写公示截止时间");return ;
-        }if(dep == null || dep == ''){
-            Feng.info("请填写反映单位");return ;
-        }if(phone == null || phone == ''){
-            Feng.info("请填写联系电话");return ;
-        }if(email == null || email == ''){
-            Feng.info("请填写联系邮箱");return ;
+    if (isMessage == 1) {
+        if (typeName == null || typeName == '') {
+            Feng.info("请填写公示类型");
+            return;
+        }
+        if (address == null || address == '') {
+            Feng.info("请填写公示平台");
+            return;
+        }
+        if (publicStartTime == null || publicStartTime == '') {
+            Feng.info("请填写公示开始时间");
+            return;
+        }
+        if (publicEndTime == null || publicEndTime == '') {
+            Feng.info("请填写公示截止时间");
+            return;
+        }
+        if (dep == null || dep == '') {
+            Feng.info("请填写反映单位");
+            return;
+        }
+        if (phone == null || phone == '') {
+            Feng.info("请填写联系电话");
+            return;
+        }
+        if (email == null || email == '') {
+            Feng.info("请填写联系邮箱");
+            return;
         }
     }
-    var operation = function(){
+    var operation = function () {
         var index = layer.open({
             type: 1,
             title: '公示',
@@ -423,38 +446,39 @@ TalentInfo.public = function(){
             fix: false, //不固定
             maxmin: true,
             content: "<input class='form-control' id='publicBatchId' style='width:90%;margin: 10px' placeholder='请输入公示批次'>",
-            btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交' ,'<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+            btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
             btnAlign: 'c',
-            success:function(){
-                laydate.render({elem: "#publicBatchId",type: 'month',trigger: 'click',format :"yyyyMM"});
+            success: function () {
+                laydate.render({elem: "#publicBatchId", type: 'month', trigger: 'click', format: "yyyyMM"});
             },
             yes: function (index, layero) {
                 var month = $("#publicBatchId").val();
-                if(Feng.isEmptyStr(month)){
-                    Feng.info("请填写公示批次");return ;
+                if (Feng.isEmptyStr(month)) {
+                    Feng.info("请填写公示批次");
+                    return;
                 }
                 layer.close(index);
                 var ajax = new $ax(Feng.ctxPath + "/talentInfo/publicBatch", function (data) {
-                    if(data.code==200){
+                    if (data.code == 200) {
                         Feng.success(data.msg);
                         TalentInfo.table.refresh();
                         $("#exportCommonModal").modal("hide");
-                    }else{
+                    } else {
                         Feng.error(data.msg);
                     }
                 }, function (data) {
                     Feng.error("公示失败!" + data.responseJSON.message + "!");
                 });
-                ajax.set("ids",ids);
-                ajax.set("typeName",typeName);
-                ajax.set("address",address);
-                ajax.set("publicStartTime",publicStartTime);
-                ajax.set("publicEndTime",publicEndTime);
-                ajax.set("dep",dep);
-                ajax.set("phone",phone);
-                ajax.set("email",email);
-                ajax.set("isMessage",isMessage);
-                ajax.set("batch",month);
+                ajax.set("ids", ids);
+                ajax.set("typeName", typeName);
+                ajax.set("address", address);
+                ajax.set("publicStartTime", publicStartTime);
+                ajax.set("publicEndTime", publicEndTime);
+                ajax.set("dep", dep);
+                ajax.set("phone", phone);
+                ajax.set("email", email);
+                ajax.set("isMessage", isMessage);
+                ajax.set("batch", month);
                 ajax.start();
             }
         });
@@ -465,60 +489,60 @@ TalentInfo.public = function(){
 
 
 //已公示的数据根据公示批次公示导出
-TalentInfo.publicExport = function(type){
-    var url = "",dateType='',format='';
-    if( type==1 ) {         //公示导出
-        url = Feng.ctxPath+"/talentInfoExport/publicExport";
-        dateType='month';
-        format="yyyyMM";
-    }else if(type==2) {     //公布导出
-        url = Feng.ctxPath+"/talentInfoExport/publishExport";
-        dateType='date';
-        format="yyyy-MM-dd";
+TalentInfo.publicExport = function (type) {
+    var url = "", dateType = '', format = '';
+    if (type == 1) {         //公示导出
+        url = Feng.ctxPath + "/talentInfoExport/publicExport";
+        dateType = 'month';
+        format = "yyyyMM";
+    } else if (type == 2) {     //公布导出
+        url = Feng.ctxPath + "/talentInfoExport/publishExport";
+        dateType = 'date';
+        format = "yyyy-MM-dd";
     }
     layer.open({
         type: 1,
-        title: type==1?'公示导出':"公布导出",
+        title: type == 1 ? '公示导出' : "公布导出",
         area: ['800px', '300px'], //宽高
         fix: false, //不固定
         maxmin: true,
-        content: "<form id=\"publicExportForm\" action=\""+url+"\" target=\"hiddenIframe\" class=\"form-horizontal \" style='padding-top: 10px;'>\n" +
-            "                    <div class=\"form-group col-sm-12\">\n" +
-            "                        <div class=\"row\">\n" +
-            "                            <label class=\"col-sm-2 control-label\">开始时间</label>\n" +
-            "                            <div class=\"col-sm-4\">\n" +
-            "                                <input type=\"text\" id=\"startTime\" name=\"startTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
-            "                            </div>\n" +
-            "                            <label class=\"col-sm-2 control-label\">截止时间</label>\n" +
-            "                            <div class=\"col-sm-4\">\n" +
-            "                                <input type=\"text\" id=\"endTime\" name=\"endTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
-            "                            </div>\n" +
-            "                        </div>\n" +
-            "                    </div>\n" +
-            "                </form>",
+        content: "<form id=\"publicExportForm\" action=\"" + url + "\" target=\"hiddenIframe\" class=\"form-horizontal \" style='padding-top: 10px;'>\n" +
+                "                    <div class=\"form-group col-sm-12\">\n" +
+                "                        <div class=\"row\">\n" +
+                "                            <label class=\"col-sm-2 control-label\">开始时间</label>\n" +
+                "                            <div class=\"col-sm-4\">\n" +
+                "                                <input type=\"text\" id=\"startTime\" name=\"startTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
+                "                            </div>\n" +
+                "                            <label class=\"col-sm-2 control-label\">截止时间</label>\n" +
+                "                            <div class=\"col-sm-4\">\n" +
+                "                                <input type=\"text\" id=\"endTime\" name=\"endTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
+                "                            </div>\n" +
+                "                        </div>\n" +
+                "                    </div>\n" +
+                "                </form>",
         btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
         btnAlign: 'c',
         success: function (index, layero) {
             $("#publicExportForm")[0].reset();
-            $("input[time='time']").each(function(){
+            $("input[time='time']").each(function () {
                 laydate.render({
-                    elem: "#"+$(this).attr("id")
-                    ,type: dateType
-                    ,format:format
-                    ,trigger: 'click'
+                    elem: "#" + $(this).attr("id")
+                    , type: dateType
+                    , format: format
+                    , trigger: 'click'
                 });
             });
         },
-        yes:function (index) {
+        yes: function (index) {
             var startTime = $("#startTime").val();
             var endTime = $("#endTime").val();
-            if(startTime==null || startTime==''){
+            if (startTime == null || startTime == '') {
                 Feng.info("请选择开始时间");
-                return ;
+                return;
             }
-            if(endTime==null || endTime==''){
+            if (endTime == null || endTime == '') {
                 Feng.info("请选择结束时间");
-                return ;
+                return;
             }
             $("#publicExportForm")[0].submit();
             layer.close(index)
@@ -528,24 +552,24 @@ TalentInfo.publicExport = function(type){
 /**
  * 公示再审核
  */
-TalentInfo.afterCheck= function(){
+TalentInfo.afterCheck = function () {
     if (this.check()) {
-        if(TalentInfo.seItem.isPublic!=3){
+        if (TalentInfo.seItem.isPublic != 3) {
             Feng.info("当前记录不是公示中状态,无法审核");
-            return ;
+            return;
         }
-        if(TalentInfo.seItem.outMsg!=null && TalentInfo.seItem.outMsg!=''){
+        if (TalentInfo.seItem.outMsg != null && TalentInfo.seItem.outMsg != '') {
             Feng.info("当前申请人核查征信不通过,请谨慎选择审核状态!");
         }
-        if(TalentInfo.seItem.checkState==-1){
+        if (TalentInfo.seItem.checkState == -1) {
             var html = '<option value="">请选择</option>\n' +
-                '       <option value="2">驳回/恢复</option>';
+                    '       <option value="2">驳回/恢复</option>';
             $("#checkStateAfter").empty().append(html);
         }
-        if(TalentInfo.seItem.checkState==35){
+        if (TalentInfo.seItem.checkState == 35) {
             var html = '<option value="">请选择</option>\n' +
-                '       <option value="-1">审核不通过</option>'+
-                '       <option value="2">驳回</option>';
+                    '       <option value="-1">审核不通过</option>' +
+                    '       <option value="2">驳回</option>';
             $("#checkStateAfter").empty().append(html);
         }
         $("#checkForm")[0].reset();
@@ -556,29 +580,29 @@ TalentInfo.afterCheck= function(){
 /**
  * 公示后审核提交
  */
-TalentInfo.afterCheckSubmit = function(){
+TalentInfo.afterCheckSubmit = function () {
     var checkState = $("#checkStateAfter").val();
     var msg = $("#msg").val();
-    if(checkState == null || checkState =='') {
+    if (checkState == null || checkState == '') {
         Feng.info("请选择审核状态");
     }
-    if(msg == null || msg ==''){
+    if (msg == null || msg == '') {
         Feng.info("请填写审核意见");
         return;
     }
-    var operation = function(){
+    var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/talentInfo/afterCheck", function (data) {
-            if(data.code==200){
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 TalentInfo.table.refresh();
                 $("#checkModal").modal("hide");
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
             Feng.error("审核失败!" + data.responseJSON.message + "!");
         });
-        ajax.setData({"id":$("#mainId").val(),"checkState":$("#checkStateAfter").val(),"checkMsg":msg});
+        ajax.setData({"id": $("#mainId").val(), "checkState": $("#checkStateAfter").val(), "checkMsg": msg});
         ajax.start();
     }
     Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
@@ -588,29 +612,29 @@ TalentInfo.afterCheckSubmit = function(){
  * 批量公示通过
  * @param type
  */
-TalentInfo.publicPass = function(){
+TalentInfo.publicPass = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    var operation = function(){
+    var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/talentInfo/publicPass", function (data) {
-            if(data.code==200){
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 TalentInfo.table.refresh();
                 $("#exportCommonModal").modal("hide");
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
             Feng.error("公示通过失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("ids",ids);
+        ajax.set("ids", ids);
         ajax.start();
     }
     Feng.confirm("一旦提交无法修改,确定公示通过吗?", operation);
@@ -619,19 +643,19 @@ TalentInfo.publicPass = function(){
 /**
  * 公布预览
  */
-TalentInfo.publishExportBefore = function(){
+TalentInfo.publishExportBefore = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    var operation = function(){
+    var operation = function () {
         $("#exportCommonModal").modal("hide");
-        window.location.href = Feng.ctxPath + "/talentInfo/publishExportBefore?ids="+ids;
+        window.location.href = Feng.ctxPath + "/talentInfo/publishExportBefore?ids=" + ids;
     }
     Feng.confirm("确定要导出吗?", operation);
 }
@@ -640,17 +664,17 @@ TalentInfo.publishExportBefore = function(){
 /**
  * 公布
  */
-TalentInfo.publish = function(){
+TalentInfo.publish = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    var operation = function(){
+    var operation = function () {
         var index = layer.open({
             type: 1,
             title: '公布',
@@ -658,30 +682,31 @@ TalentInfo.publish = function(){
             fix: false, //不固定
             maxmin: true,
             content: "<input class='form-control' id='publicBatchId' style='width:90%;margin: 10px' placeholder='请输入公布日期(公布入选月份)'>",
-            btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交' ,'<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+            btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
             btnAlign: 'c',
-            success:function(){
-                laydate.render({elem: "#publicBatchId",type: 'date',trigger: 'click',format :"yyyy-MM-dd"});
+            success: function () {
+                laydate.render({elem: "#publicBatchId", type: 'date', trigger: 'click', format: "yyyy-MM-dd"});
             },
             yes: function (index, layero) {
                 var month = $("#publicBatchId").val();
-                if(Feng.isEmptyStr(month)){
-                    Feng.info("请填写公布批次");return ;
+                if (Feng.isEmptyStr(month)) {
+                    Feng.info("请填写公布批次");
+                    return;
                 }
                 layer.close(index);
                 var ajax = new $ax(Feng.ctxPath + "/talentInfo/publish", function (data) {
-                    if(data.code==200){
+                    if (data.code == 200) {
                         Feng.success(data.msg);
                         TalentInfo.table.refresh();
                         $("#exportCommonModal").modal("hide");
-                    }else{
+                    } else {
                         Feng.error(data.msg);
                     }
                 }, function (data) {
                     Feng.error("公布失败!" + data.responseJSON.message + "!");
                 });
-                ajax.set("ids",ids);
-                ajax.set("batch",month);
+                ajax.set("ids", ids);
+                ajax.set("batch", month);
                 ajax.start();
             }
         });
@@ -691,20 +716,20 @@ TalentInfo.publish = function(){
 /**
  * 撤销公布
  */
-TalentInfo.canclePublish = function(){
+TalentInfo.canclePublish = function () {
     if (this.check()) {
-        var operation = function(){
+        var operation = function () {
             var ajax = new $ax(Feng.ctxPath + "/talentInfo/canclePublish", function (data) {
-                if(data.code==200){
+                if (data.code == 200) {
                     Feng.success(data.msg);
                     TalentInfo.table.refresh();
-                }else{
+                } else {
                     Feng.error(data.msg);
                 }
             }, function (data) {
                 Feng.error("撤销公布失败!" + data.responseJSON.message + "!");
             });
-            ajax.set("id",TalentInfo.seItem.id);
+            ajax.set("id", TalentInfo.seItem.id);
             ajax.start();
         }
         Feng.confirm("一旦撤销无法修改,确定要撤销公布吗?", operation);
@@ -712,38 +737,38 @@ TalentInfo.canclePublish = function(){
 }
 
 //发证
-TalentInfo.sendCard = function(){
+TalentInfo.sendCard = function () {
     var selected = $('#dataTable').bootstrapTable('getSelections');
-    if(!selected || selected.length<1){
+    if (!selected || selected.length < 1) {
         Feng.info("请至少选择一行数据!");
         return;
     }
     var ids = "";
-    for(var i=0; i<selected.length; i++){
+    for (var i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    var operation = function(){
+    var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/talentInfo/sendCard", function (data) {
-            if(data.code==200){
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 TalentInfo.table.refresh();
                 $("#exportCommonModal").modal("hide");
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
             Feng.error("发证失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("ids",ids);
+        ajax.set("ids", ids);
         ajax.start();
     }
     Feng.confirm("一旦发证无法修改,确定要发证吗?", operation);
 }
 
 //回调
-TalentInfo.callBack = function (data){
+TalentInfo.callBack = function (data) {
     Feng.info(data.msg);
-    if(data.code==200){
+    if (data.code == 200) {
         $("#hczxModal").modal("hide");
         TalentInfo.table.refresh();
     }