浏览代码

人才层次变更

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

+ 111 - 13
app/admin/controller/TalentTypeChange.php

@@ -19,6 +19,7 @@ class TalentTypeChange extends AdminController {
         $tpl = null;
         $process = $this->request->param('process');
         $assigns = [];
+        $assigns["enterprises"] = \app\common\api\EnterpriseApi::getSimpleList();
         switch ($process) {
             case -1:
                 $tpl = "dept_before"; //移除部门初审
@@ -171,6 +172,89 @@ class TalentTypeChange extends AdminController {
         return view("", ["info" => $info]);
     }
 
+    public function findFieldsAndFiles() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $params = $this->request->param();
+        $id = $params["id"];
+        $info = ttcModel::find($id);
+        if (!$info) {
+            $response->msg = "请选择需要修改的对象";
+            return $response;
+        }
+        if ($info["checkState"] != MainState::FIRST_REJECT) {
+            $response->msg = "只能修改初审驳回的数据";
+            return $response;
+        }
+        $talentInfo = \app\common\api\VerifyApi::getOne($info["talentId"]);
+        if (!$talentInfo || $talentInfo["checkState"] != \app\common\api\TalentState::CERTIFICATED || $talentInfo["delete"] == 1) {
+            $response->msg = "系统错误,请联系管理员";
+            return $response;
+        }
+        $fields = DictApi::getTalentTypeChangeFields($this->user["type"]);
+
+        $field_tmp = [];
+        if ($fields) {
+            foreach ($fields as $key => $field) {
+                $field_tmp[] = ["key" => $key, "value" => $field];
+            }
+        }
+        $condition = TalentConditionApi::getOne($info["newIdentifyCondition"]);
+        $where = [];
+        $whr = [];
+        $where[] = ["project", "=", ProjectState::LEVELCHANGE];
+        $where[] = ["active", "=", 1];
+        $where[] = ["type", "=", $info["type"]];
+        $where[] = ["isConditionFile", "<>", 1];
+        $where[] = ["delete", "=", 0];
+        if ($condition && $condition["bindFileTypes"]) {
+            $whr[] = ["id", "in", explode(",", $condition["bindFileTypes"])];
+            $files = Db::table("new_common_filetype")->whereOr([$where, $whr])->order("sn asc")->select();
+        } else {
+            $files = Db::table("new_common_filetype")->where($where)->order("sn asc")->select();
+        }
+        $response->code = 200;
+        $response->id = $id;
+        $response->fileList = $files;
+        $response->fieldList = $field_tmp;
+        $response->select = [
+            "files" => array_filter(explode(",", $info["files"])),
+            "fields" => array_filter(explode(",", $info["fields"]))
+        ];
+        return $response;
+    }
+
+    public function updateFieldsAndFiles() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $params = $this->request->param();
+        $info = ttcModel::find($params["id"]);
+        if (!$info) {
+            $response->msg = "请选择需要修改的对象";
+            return $response;
+        }
+        if ($info["checkState"] != MainState::FIRST_REJECT) {
+            $response->msg = "只能修改初审驳回的数据";
+            return $response;
+        }
+        $fields = array_filter(explode(",", $params["fields"]));
+        $files = array_filter(explode(",", $params["files"]));
+        if (!$fields && !$files) {
+            $response->msg = "请选择驳回的字段或者附件";
+            return $response;
+        }
+        $data["id"] = $params["id"];
+        $data["fields"] = $fields ? implode(",", $fields) : "";
+        $data["files"] = $files ? implode(",", $files) : "";
+        if (ttcModel::update($data)) {
+            $response->msg = "修改成功";
+            $response->code = 200;
+        } else {
+            $response->msg = "修改失败";
+        }
+        return $response;
+    }
+
     public function validateIsCheck() {
         $id = $this->request->param("id");
         $companyId = $this->request->param("companyId");
@@ -1269,8 +1353,11 @@ class TalentTypeChange extends AdminController {
     }
 
     public function commonExport() {
+        $response = new \stdClass();
+        $response->code = 500;
         $where = [];
         $where[] = ["type", "=", $this->user["type"]];
+        $whereRaw = "length(talentId) <> 19";
         $request = $this->request;
         $talentName = \StrUtil::getRequestDecodeParam($request, "talentName");
         $idCard = \StrUtil::getRequestDecodeParam($request, "idCard");
@@ -1338,23 +1425,34 @@ class TalentTypeChange extends AdminController {
                 $where[] = ["isPublic", "=", 6];
                 break;
         }
-        $list = ttcModel::where($where)->select()->toArray();
+        $list = ttcModel::where($where)->whereRaw($whereRaw)->select()->toArray();
         $list = $this->translateToChinese($list, $process);
-        $column = [
-            "姓名", "证件号码", "工作单位", "所属街道", "原申报年度", "原申报来源", "原公布入选来源", "原入选来源县市", "原入选名单批次", "原人才层次", "原认定条件", "原认定条件证书取得时间", "原认定条件过期时间", "原认定条件名称",
-            "原泉州高层次人才证书发证日期", "原泉州高层次人才证书的有效期", "原引进方式", "原公布入选月份", "原人才编号", "新申报年度", "新申报来源", "新公布入选来源", "新入选来源县市", "新入选名单批次",
+        $columns = [
+            "姓名", "证件号码", "工作单位", "所属街道", "原申报年度", "原申报来源", "原入选来源地级市", "原入选来源县市区", "原人才层次", "原认定条件", "原认定条件证书取得时间", "原认定条件过期时间", "原认定条件名称",
+            "原泉州高层次人才证书发证日期", "原泉州高层次人才证书的有效期", "原引进方式", "原公布入选月份", "原人才编号", "新申报年度", "新申报来源", "新入选来源地级市", "新入选来源县市区",
             "新人才层次", "新认定条件", "新认定条件证书取得时间", "新认定条件过期时间", "新认定条件名称",
             "新泉州高层次人才证书发证日期", "新泉州高层次人才证书的有效期", "新引进方式", "新公布入选月份", "新人才编号",
             "审核状态", "公示状态"
         ];
-        $title = [
-            "talentName", "idCard", "enterpriseName", "streetName", "oldYear", "oldSourceName", "oldOurCitySourceName", "oldFromCityName", "newQzBath", "oldTalentArrangeName", "oldIdentifyConditionCH", "oldIdentifyGetTime", "oldIdentifyOutTime", "oldIdentifyConditionName",
-            "oldCertificateStartTime", "oldCertificateOutTime", "oldIntroductionModeName", "oldIdentifyMonth", "oldCertificateNO", "newYear", "newSourceName", "newOurCitySourceName", "newFromCityName", "newQzBath",
-            "newTalentArrangeName", "newIdentifyConditionCH", "newIdentifyGetTime", "newIdentifyOutTime", "newIdentifyConditionName",
-            "newCertificateStartTime", "newCertificateOutTime", "newIntroductionModeName", "newIdentifyMonth", "newCertificateNO",
-            "checkStateName", "isPublicName"
-        ];
-        $fileName = "人才层次变更导出";
+        $rows = [];
+        foreach ($list as $item) {
+            $rows[] = [
+                $item["talentName"], $item["idCard"], $item["enterpriseName"], $item["streetName"], $item["oldYear"], $item["oldSourceName"], $item["oldFromCityName"], $item["oldFromCountyName"],
+                $item["oldTalentArrangeName"], $item["oldIdentifyConditionCH"], $item["oldIdentifyGetTime"], $item["oldIdentifyOutTime"], $item["oldIdentifyConditionName"],
+                $item["oldCertificateStartTime"], $item["oldCertificateOutTime"], $item["oldIntroductionModeName"], $item["oldIdentifyMonth"], $item["oldCertificateNO"],
+                $item["newYear"], $item["newSourceName"], $item["newFromCityName"], $item["newFromCountyName"],
+                $item["newTalentArrangeName"], $item["newIdentifyConditionCH"], $item["newIdentifyGetTime"], $item["newIdentifyOutTime"], $item["newIdentifyConditionName"],
+                $item["newCertificateStartTime"], $item["newCertificateOutTime"], $item["newIntroductionModeName"], $item["newIdentifyMonth"], $item["newCertificateNO"],
+                $item["checkStateName"], $item["isPublicName"]
+            ];
+        }
+        $filename = "人才层次变更导出";
+        if ($rows) {
+            export($columns, $rows, $filename);
+            exit();
+        } else {
+            echo "<script>parent.layer.alert('没有可以导出的数据');window.history.go(-1);</script>";
+        }
     }
 
     private function setTalentTypeChange(&$where, $data) {
@@ -1362,7 +1460,7 @@ class TalentTypeChange extends AdminController {
             $where[] = ["talentName", "like", "%{$data["talentName"]}%"];
         }
         if (\StrUtil::isNotEmpAndNull($data["enterpriseName"])) {
-            $where[] = ["enterpriseName", "like", "%{$data["enterpriseName"]}%"];
+            $where[] = ["enterpriseId", "=", $data["enterpriseName"]];
         }
         if (\StrUtil::isNotEmpAndNull($data["idCard"])) {
             $where[] = ["idCard", "like", "%{$data["idCard"]}%"];

+ 7 - 12
app/admin/view/talent_type_change/fst_verify.html

@@ -52,6 +52,7 @@
                                         </button>
                                     </div>
                                     <select class="form-control" id="enterpriseName">
+                                        <option></option>
                                         {volist name="enterprises" id="item"}
                                         <option value="{$item.id}">{$item.name}</option>
                                         {/volist}
@@ -74,7 +75,7 @@
                                             原人才层次
                                         </button>
                                     </div>
-                                    <select class="form-control" id="oldTalentArrange">
+                                    <select class="form-control" id="oldTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('old')">
                                     </select>
                                 </div>
                             </div>
@@ -87,9 +88,6 @@
                                     </div>
                                     <select class="form-control" id="oldIdentifyCondition">
                                         <option value="">--请选择--</option>
-                                        {volist name="talent_conditions" id="condition"}
-                                        <option value="{$condition.id}">{$condition.name}</option>
-                                        {/volist}
                                     </select>
                                 </div>
                             </div>
@@ -118,7 +116,7 @@
                                             新人才层次
                                         </button>
                                     </div>
-                                    <select class="form-control" id="newTalentArrange">
+                                    <select class="form-control" id="newTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('new')">
                                     </select>
                                 </div>
                             </div>
@@ -131,9 +129,6 @@
                                     </div>
                                     <select class="form-control" id="newIdentifyCondition">
                                         <option value="">--请选择--</option>
-                                        {volist name="talent_conditions" id="condition"}
-                                        <option value="{$condition.id}">{$condition.name}</option>
-                                        {/volist}
                                     </select>
                                 </div>
                             </div>
@@ -209,14 +204,14 @@
                             </button>
                             {/if}
                             {if condition="chkCommission('/admin/talent/getPhones','')"}
-                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentTypeChange.getPhones()" id="">
+                            <!--<button type="button" class="btn btn-sm btn-primary " onclick="TalentTypeChange.getPhones()" id="">
                                 <i class="fa fa-mobile"></i>&nbsp;获取人才手机号
-                            </button>
+                            </button>-->
                             {/if}
                             {if condition="chkCommission('/admin/talent/getEnterprisePhones','')"}
-                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentTypeChange.getEnterprisePhones()" id="">
+                            <!--<button type="button" class="btn btn-sm btn-primary " onclick="TalentTypeChange.getEnterprisePhones()" id="">
                                 <i class="fa fa-phone"></i>&nbsp;获取人才联络员手机号
-                            </button>
+                            </button>-->
                             {/if}
                         </div>
                         <table id="TalentTypeChangeTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;" data-mobile-responsive="true" data-click-to-select="true">

+ 3 - 8
app/admin/view/talent_type_change/prepare.html

@@ -43,6 +43,7 @@
                                         </button>
                                     </div>
                                     <select class="form-control" id="enterpriseName">
+                                        <option></option>
                                         {volist name="enterprises" id="item"}
                                         <option value="{$item.id}">{$item.name}</option>
                                         {/volist}
@@ -65,7 +66,7 @@
                                             原人才层次
                                         </button>
                                     </div>
-                                    <select class="form-control" id="oldTalentArrange">
+                                    <select class="form-control" id="oldTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('old')">
                                     </select>
                                 </div>
                             </div>
@@ -78,9 +79,6 @@
                                     </div>
                                     <select class="form-control" id="oldIdentifyCondition">
                                         <option value="">--请选择--</option>
-                                        {volist name="talent_conditions" id="condition"}
-                                        <option value="{$condition.id}">{$condition.name}</option>
-                                        {/volist}
                                     </select>
                                 </div>
                             </div>
@@ -109,7 +107,7 @@
                                             新人才层次
                                         </button>
                                     </div>
-                                    <select class="form-control" id="newTalentArrange">
+                                    <select class="form-control" id="newTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('new')">
                                     </select>
                                 </div>
                             </div>
@@ -122,9 +120,6 @@
                                     </div>
                                     <select class="form-control" id="newIdentifyCondition">
                                         <option value="">--请选择--</option>
-                                        {volist name="talent_conditions" id="condition"}
-                                        <option value="{$condition.id}">{$condition.name}</option>
-                                        {/volist}
                                     </select>
                                 </div>
                             </div>

+ 3 - 8
app/admin/view/talent_type_change/re_verify.html

@@ -43,6 +43,7 @@
                                         </button>
                                     </div>
                                     <select class="form-control" id="enterpriseName">
+                                        <option></option>
                                         {volist name="enterprises" id="item"}
                                         <option value="{$item.id}">{$item.name}</option>
                                         {/volist}
@@ -65,7 +66,7 @@
                                             原人才层次
                                         </button>
                                     </div>
-                                    <select class="form-control" id="oldTalentArrange">
+                                    <select class="form-control" id="oldTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('old')">
                                     </select>
                                 </div>
                             </div>
@@ -78,9 +79,6 @@
                                     </div>
                                     <select class="form-control" id="oldIdentifyCondition">
                                         <option value="">--请选择--</option>
-                                        {volist name="talent_conditions" id="condition"}
-                                        <option value="{$condition.id}">{$condition.name}</option>
-                                        {/volist}
                                     </select>
                                 </div>
                             </div>
@@ -109,7 +107,7 @@
                                             新人才层次
                                         </button>
                                     </div>
-                                    <select class="form-control" id="newTalentArrange">
+                                    <select class="form-control" id="newTalentArrange" onchange="TalentTypeChange.getIdentifyCondition('new')">
                                     </select>
                                 </div>
                             </div>
@@ -122,9 +120,6 @@
                                     </div>
                                     <select class="form-control" id="newIdentifyCondition">
                                         <option value="">--请选择--</option>
-                                        {volist name="talent_conditions" id="condition"}
-                                        <option value="{$condition.id}">{$condition.name}</option>
-                                        {/volist}
                                     </select>
                                 </div>
                             </div>

+ 4 - 2
app/common/controller/Api.php

@@ -708,8 +708,10 @@ class Api extends BaseController {
         $where[] = ["mainId", "=", $id];
         if (!$files)
             $files = Db::table($table)->where($where)->select()->toArray();
-        if (!$files)
-            die("没有附件不能打包下载");
+        if (!$files){
+            //die("没有附件不能打包下载");
+            echo "<script>parent.layer.alert('没有附件不能打包下载');window.history.go(-1);</script>";
+        }
 
         $tmp_path = "storage/temp/";
         $tmp_file_path = $tmp_path . $zip_filename;

+ 1 - 1
app/enterprise/controller/TalentTypeChange.php

@@ -57,11 +57,11 @@ class TalentTypeChange extends EnterpriseController {
         if ($res !== true) {
             return $res;
         }
+        $data = $this->request->param();
         $talentInfo = TalentApi::getOne($data["talentId"]);
         if (!$talentInfo || $talentInfo["checkState"] != TalentState::CERTIFICATED || $talentInfo["delete"] == 1) {
             return json(["msg" => "人才库中匹配不到该人才", "code" => 500]);
         }
-        $data = $this->request->param();
         $data['checkState'] = MainState::SAVE;
         $data['basicState'] = MainState::BASIC_NEED;
         $data['isPublic'] = 1;

+ 56 - 63
public/static/modular/talentLibrary/talentTypeChange/talentTypeChange_common.js

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

+ 1 - 1
public/static/modular/talentLibrary/talentTypeChange/talentTypeChange_common_check.js

@@ -499,7 +499,7 @@ TalentTypeChangeInfoDlg.submitCheck = function () {
 
 
 TalentTypeChangeInfoDlg.download = function () {
-    window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=2&id=" + $("#id").val()));
+    window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=8&id=" + $("#id").val()));
 }
 
 $(function () {

+ 43 - 18
public/static/modular/talentLibrary/talentTypeChange/talentTypeChange_first.js

@@ -91,7 +91,6 @@ TalentTypeChange.check = function () {
 TalentTypeChange.updateFieldsAndFiles = function () {
     if (this.check()) {
         var ajax = new $ax(Feng.ctxPath + "/admin/talentTypeChange/findFieldsAndFiles?id=" + TalentTypeChange.seItem.id, function (data) {
-            var obj = data.obj.obj;
             if (data.code == 200) {
                 layer.open({
                     type: 1,
@@ -101,30 +100,35 @@ TalentTypeChange.updateFieldsAndFiles = function () {
                     fix: false, //不固定
                     shade: 0,
                     maxmin: true,
-                    content: TalentTypeChange.creatFieldCheckModal(data.obj.obj),
+                    content: TalentTypeChange.creatFieldCheckModal(data),
                     btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
                     btnAlign: 'c',
                     zIndex: layer.zIndex,
                     success: function (layero, index) {
-                        var fileList = data.obj.fileList;
-                        var html = '';
-                        for (var key in fileList) {
-                            html = html + '<ul><li style="width: 100%"><input type="checkbox" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
+                        var html1 = '';
+                        if (typeof data.fieldList != "undefined" && data.fieldList.length > 0) {
+                            for (var key in data.fieldList) {
+                                html1 += '<li style="float:left;margin:0 10px 10px 0;"><input type="checkbox" value="' + data.fieldList[key]["key"] + '"><span>' + data.fieldList[key]["value"] + '</span></li>';
+                            }
+                        }
+
+                        var html2 = '';
+                        for (var key in data.fileList) {
+                            html2 = html2 + '<ul><li style="width: 100%"><input type="checkbox" value="' + data.fileList[key].id + '"><span>' + data.fileList[key].name + '</span></li></ul>';
                         }
-                        $("#field_file").empty().append(html);
-                        if (obj.fields != null && obj.fields != '') {
-                            $("#field_info input").each(function () {
-                                var arr = obj.fields.split(",");
-                                for (var key in arr) {
-                                    if ($(this).val() == arr[key]) {
-                                        this.checked = true;
-                                    }
+                        $("#firstCheckForm #field_info ul").css("overflow", "hidden").html(html1);
+                        $("#field_file").css("overflow", "hidden").empty().append(html2);
+                        //$("#field_file").empty().append(html);
+                        if (data.select.fields != null && data.select.fields != '') {
+                            $("#firstCheckForm #field_info li input").each(function () {
+                                if (data.select.fields.indexOf($(this).val()) != -1) {
+                                    this.checked = true;
                                 }
                             });
                         }
-                        if (obj.files != null && obj.files != '') {
+                        if (data.select.files != null && data.select.files != '') {
                             $("#field_file input").each(function () {
-                                if (obj.files.indexOf($(this).val()) != -1) {
+                                if (data.select.files.indexOf($(this).val()) != -1) {
                                     this.checked = true;
                                 }
                             });
@@ -202,14 +206,35 @@ TalentTypeChange.creatFieldCheckModal = function (obj) {
             '                            <div id="field_file">\n' +
             '                            </div>\n' +
             '                            <div class="form-group" style="text-align: center">\n' +
-            '                                <button type="button" class="btn btn-primary" onclick="Feng.checkAll("field")">全选</button>\n' +
-            '                                <button type="button" class="btn btn-success" onclick="Feng.unCheckAll("field")">反选</button>\n' +
+            '                                <button type="button" class="btn btn-primary" onclick="TalentTypeChange.checkAll()">全选</button>\n' +
+            '                                <button type="button" class="btn btn-success" onclick="TalentTypeChange.unCheckAll()">反选</button>\n' +
             '                            </div>\n' +
             '                        </div>\n' +
             '                    </div>\n' +
             '                </form>';
 }
 
+/**
+ * 全选
+ */
+TalentTypeChange.checkAll = function () {
+    $("#field input").each(function () {
+        this.checked = true;
+    })
+}
+/**
+ * 反选
+ */
+TalentTypeChange.unCheckAll = function () {
+    $("#field input").each(function () {
+        if (this.checked) {
+            this.checked = false;
+        } else {
+            this.checked = true;
+        }
+    })
+}
+
 /**
  * 点击人才类别审核
  */