瀏覽代碼

生活补贴审核端(未全部完成)

sugangqiang 1 年之前
父節點
當前提交
9064b9525f

+ 418 - 2
app/admin/controller/LivingAllowance.php

@@ -5,6 +5,13 @@ namespace app\admin\controller;
 use app\admin\common\AdminController;
 use app\common\api\ChuanglanSmsApi;
 use app\common\api\EnterpriseApi;
+use app\common\api\LivingAllowanceApi;
+use app\common\state\LivingAllowanceState as LaState;
+use app\common\state\CommonConst;
+use app\common\model\TalentLog;
+use app\common\state\ProjectState;
+use app\common\model\LivingAllowance as LaModel;
+use app\common\api\DictApi;
 use think\facade\Db;
 
 /**
@@ -36,8 +43,417 @@ class LivingAllowance extends AdminController {
     }
 
     public function list() {
-        $returnObj = new \stdClass();
-        return json($returnObj);
+        $res = LivingAllowanceApi::getList($this->request->param());
+        return json($res);
+    }
+
+    public function detail() {
+        $id = $this->request->param("id");
+        $process = $this->request->param("process");
+        $info = LivingAllowanceApi::getInfoById($id);
+
+        $info = $this->translateToChinese($info);
+        return view("", ["row" => $info, "process" => $process]);
+    }
+
+    private function translateToChinese($obj) {
+        if ($obj["industryFieldNew"]) {
+            $obj["industryFieldNewName"] = DictApi::findByParentCodeAndCode("industry_field", $obj["industryFieldNew"])["name"];
+        }
+        if ($obj["industryField"]) {
+            $industry_field_type = $obj["industryFieldNew"] ? $obj["industryFieldNew"] . "_field" : "un_industryField";
+            $obj["industryFieldName"] = DictApi::findByParentCodeAndCode($industry_field_type, $obj["industryField"])["name"];
+        }
+        if ($obj["address"]) {
+            $obj["streetName"] = DictApi::findByParentCodeAndCode("address", $obj["address"])["name"];
+        }
+        if ($obj["nationality"]) {
+            $obj["nationalityName"] = DictApi::findByParentCodeAndCode("nationality", $obj["nationality"])["name"];
+        }
+        if ($obj["nation"]) {
+            $obj["nationName"] = DictApi::findByParentCodeAndCode("nation", $obj["nation"])["name"];
+        }
+        if ($obj["politics"]) {
+            $obj["politicsName"] = DictApi::findByParentCodeAndCode("politics", $obj["politics"])["name"];
+        }
+        if ($obj["highEducation"]) {
+            $obj["educationName"] = DictApi::findByParentCodeAndCode("highest_degree", $obj["highEducation"])["name"];
+        }
+        if ($obj["introductionMode"]) {
+            $obj["introductionModeName"] = DictApi::findByParentCodeAndCode("un_introduction_mode", $obj["introductionMode"])["name"];
+        }
+        if ($obj["declareType"]) {
+            $obj["declareTypeName"] = DictApi::findByParentCodeAndCode("un_master_education", $obj["declareType"])["name"];
+        }
+        if ($obj["cardType"] == 1) {
+            $obj["cardTypeName"] = "身份证";
+        } else if ($obj["cardType"] == 2) {
+            $obj["cardTypeName"] = "通行证";
+        } else if ($obj["cardType"] == 3) {
+            $obj["cardTypeName"] = "护照";
+        } else {
+            $obj["cardTypeName"] = "未知";
+        }
+        return $obj;
+    }
+
+    /**
+     * 校验是否在审核范围内
+     * @param type $id
+     * @param type $process
+     * @return type
+     */
+    public function validateIsCheck($id, $process) {
+        $oldInfo = \app\common\api\LivingAllowanceApi::getInfoById($id);
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        switch ($process) {
+            case 1:
+                if ($oldInfo["checkState"] != LaState::LA_NEED_FIRST_CHECK && $oldInfo["checkState"] != LaState::LA_DEP_REJECT) {
+                    $responseObj->msg = "该申报不在审核范围内,无法审核";
+                } else {
+                    $responseObj->code = 200;
+                    $responseObj->msg = "";
+                }
+                break;
+            case 2:
+                $company = getCacheById("Company", $this->user["companyId"]);
+                if ($oldInfo["checkState"] != LaState::LA_NEED_DEP_CHECK && $oldInfo["checkState"] != LaState::LA_THIRD_REJECT) {
+                    $responseObj->msg = "该申报不在审核范围内,无法审核";
+                } else if ($company["code"] != CommonConst::JYJ) {
+                    $responseObj->msg = "部门审核仅教育局能够审核!";
+                } else {
+                    $responseObj->code = 200;
+                    $responseObj->msg = "";
+                }
+                break;
+            case 3:
+                if ($oldInfo["checkState"] != LaState::LA_NEED_THIRD) {
+                    $responseObj->msg = "该申报不在审核范围内,无法审核";
+                } else if ($oldInfo["reditStatus"] == 1) {
+                    $responseObj->msg = "当前申报数据未导入核查数据,无法审核";
+                } else {
+                    $responseObj->code = 200;
+                    $responseObj->msg = "";
+                }
+                break;
+            case 4:
+                break;
+        }
+        if ($responseObj->code == 500) {
+            return json($responseObj);
+        }
+        $where = [];
+        $where[] = ["mainId", "=", $id];
+        $where[] = ["active", "=", 2];
+        $where[] = ["step", "=", $process];
+        $log = TalentLog::where($where)->order("createTime desc")->find();
+
+        if ($log) {
+            $oldInfo["checkState"] = $log["state"];
+            $oldInfo["checkMsg"] = $log["description"];
+        } else {
+            $oldInfo["checkState"] = null;
+            $oldInfo["checkMsg"] = "";
+        }
+        $res = [];
+        $res["obj"] = $oldInfo;
+        if ($responseObj->code == 200) {
+            $where = [];
+            $where[] = ["project", "=", ProjectState::LIVINGALLOWANCE];
+            $where[] = ["active", "=", 1];
+            $where[] = ["type", "=", $oldInfo["type"]];
+            $fileTypeList = \app\common\model\FileType::where($where)->order("sn")->select()->toArray();
+            $res["fileList"] = $fileTypeList;
+        }
+        $responseObj->obj = $res;
+        return json($responseObj);
+    }
+
+    /**
+     * 审核
+     * @return type
+     */
+    public function check() {
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        $obj = $this->request->param();
+        if (!$obj) {
+            $responseObj->msg = "系统错误,请联系管理员";
+            return json($responseObj);
+        }
+        if (!$obj["checkState"]) {
+            $responseObj->msg = "请选择审核状态";
+            return json($responseObj);
+        }
+        Db::startTrans();
+        try {
+            //保存驳回字段
+            $updData["id"] = $obj["id"];
+            $updData["fields"] = $obj["fields"];
+            $updData["files"] = $obj["files"];
+            Db::table("md_living_allowance_info")->save($updData);
+
+            //加入日志
+            $newLog["id"] = getStringId();
+            $newLog["type"] = ProjectState::LIVINGALLOWANCE;
+            $newLog["mainId"] = $obj["id"];
+            $newLog["active"] = 2;
+            $newLog["state"] = $obj["checkState"];
+            $newLog["step"] = $obj["process"];
+            $newLog["stateChange"] = "保存未提交";
+            $newLog["description"] = $obj["checkMsg"];
+            $newLog["createTime"] = date("Y-m-d H:i:s");
+            $newLog["createUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]);
+            Db::table("new_talent_checklog")->insert($newLog);
+            $responseObj->code = 200;
+            $responseObj->msg = "审核成功";
+            Db::commit();
+            return json($responseObj);
+        } catch (\Exception $e) {
+            Db::rollback();
+            $responseObj->msg = $e->getMessage();
+            return json($responseObj);
+        }
+    }
+
+    /**
+     * 审核不通过
+     * @return type
+     */
+    public function setNotPass() {
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        $ids = trim($this->request->param("ids"));
+        $msg = trim($this->request->param("msg"));
+        $ids = array_filter(explode(",", $ids));
+        if (!$ids) {
+            $responseObj->msg = "请选择需要设置审核不通过的数据";
+            return json($responseObj);
+        }
+        if (!$msg) {
+            $responseObj->msg = "请填写审核不通过的原因";
+            return json($responseObj);
+        }
+        $where = [];
+        $where[] = ["id", "in", $ids];
+        $list = LaModel::where($where)->select($where)->toArray();
+        $updates = [];
+        $newLogs = [];
+        $sb = [];
+        Db::startTrans();
+        try {
+            foreach ($list as $obj) {
+                if ($obj["checkState"] != LaState::LA_SAVE && $obj["checkState"] != LaState::LA_FIRST_REJECT) {
+                    $sb[] = $obj["name"];
+                }
+                $oldState = $obj["checkState"];
+                $newState = LaState::LA_NOTPASS;
+                $updates[] = [
+                    "id" => $obj["id"],
+                    "checkState" => $newState,
+                    "checkMsg" => $msg
+                ];
+                $newLog["id"] = getStringId();
+                $newLog["type"] = ProjectState::LIVINGALLOWANCE;
+                $newLog["mainId"] = $obj["id"];
+                $newLog["active"] = 2;
+                $newLog["state"] = $newState;
+                $newLog["step"] = 70; //审核不通过
+                $newLog["stateChange"] = LaState::getStateDesc($oldState) . "->" . LaState::getStateDesc($newState);
+                $newLog["description"] = $msg;
+                $newLog["createTime"] = date("Y-m-d H:i:s");
+                $newLog["createUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]);
+
+                $newLogs[] = $newLog;
+            }
+            if ($sb) {
+                $responseObj->msg = implode(",", $sb) . "的审核状态既不是待提交,也不是初审驳回";
+                return json($responseObj);
+            }
+            if (!$updates || !$newLogs) {
+                $responseObj->msg = "没有待审核项";
+                return json($responseObj);
+            }
+            Db::table("md_living_allowance_info")->saveAll($updates);
+            Db::table("new_talent_checklog")->insertAll($newLogs);
+            Db::commit();
+            $responseObj->code = 200;
+            $responseObj->msg = "设置审核不通过成功";
+            return json($responseObj);
+        } catch (\Exception $e) {
+            Db::rollback();
+            return json(["msg" => "设置审核不通过失败:" . $e->getMessage()]);
+        }
+    }
+
+    public function submitCheck() {
+        $id = $this->request->param("id");
+        $process = $this->request->param("process");
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        if (!$id) {
+            $responseObj->msg = "系统错误,请联系管理员!";
+            return json($responseObj);
+        }
+        $oldInfo = \app\common\api\LivingAllowanceApi::getInfoById($id);
+        $oldState = $oldInfo["checkState"];
+
+        $where = [];
+        $where[] = ["mainId", "=", $id];
+        $where[] = ["active", "=", 2];
+        $where[] = ["step", "=", $process];
+        $oldLog = TalentLog::where($where)->order("createTime desc")->find();
+        if (!$oldLog) {
+            $responseObj->msg = "请先审核后再提交";
+            return json($responseObj);
+        }
+        $company = getCacheById("Company", $this->user["companyId"]);
+        if ($process == 2 && $company["code"] != CommonConst::JYJ) {
+            $responseObj->msg = "部门审核仅教育局能够审核!";
+            return $responseObj;
+        }
+        $updData = [];
+        $updData["id"] = $id;
+        if (!$oldInfo["highProcess"]) {
+            $updData["highProcess"] = $process;
+        } else {
+            $updData["highProcess"] = $oldInfo["process"] < $process ? $process : $oldInfo["highProcess"];
+        }
+        switch ($process) {
+            case 1:
+                if ($oldLog["state"] == -1) {
+                    $updData["checkState"] = LaState::LA_NOTPASS;
+                    $updData["recommendAmount"] = 0;
+                    $updData["isPay"] = -1;
+                    $updData["recommendAmountDesc"] = "审核不通过,不予兑现";
+                    $updData["recommendJudgmentDetails"] = "审核不通过,不予兑现";
+                }
+                if ($oldLog["state"] == 2) {
+                    $updData["checkState"] = LaState::LA_FIRST_REJECT;
+                    //MessageRecord record = new MessageRecord(old.getId(), 2, 2, old.getName(), old.getPhone(), null, SmsProperties.MASTER_ALLOWANCE_REJECT);
+                    //Sms253Util.sendMessage(record);
+                }
+                //审核通过
+                if ($oldLog["state"] == 3) {
+                    $updData["checkState"] = LaState::LA_NEED_DEP_CHECK;
+                    $updData["firstPassTime"] = date("Y-m-d H:i:s");
+                }
+                break;
+            case 2:
+                if ($oldLog["state"] == -1) {
+                    $updData["checkState"] = LaState::LA_NOTPASS;
+                    $updData["recommendAmount"] = 0;
+                    $updData["recommendAmountDesc"] = "审核不通过,不予兑现";
+                    $updData["recommendJudgmentDetails"] = "审核不通过,不予兑现";
+                    $updData["recommendIsPay"] = -1;
+                }
+                if ($oldLog["state"] == 2) {
+                    $updData["checkState"] = LaState::LA_DEP_REJECT;
+                    $updData["creditStatus"] = 1;
+                    $updData["recommendAmount"] = null;
+                    $updData["recommendAmountDesc"] = "";
+                    $updData["recommendJudgmentDetails"] = "";
+                    $updData["recommendIsPay"] = 0;
+                }
+                if ($oldLog["state"] == 3) {
+                    $updData["checkState"] = LaState::LA_NEED_THIRD;
+                    $updData["firstDepPassTime"] = date("Y-m-d H:i:s");
+                    $_updData = $this->calculateAmount($oldInfo);
+                    $updData = array_merge($updData, $_updData);
+                }
+                break;
+            case 3:
+                if ($oldLog["state"] == -1) {
+                    $updData["checkState"] = LaState::LA_NOTPASS;
+                    $updData["recommendAmount"] = 0;
+                    $updData["recommendAmountDesc"] = "审核不通过,不予兑现";
+                    $updData["recommendJudgmentDetails"] = "审核不通过,不予兑现";
+                    $updData["recommendIsPay"] = -1;
+                }
+                if ($oldLog["state"] == 2) {
+                    $updData["checkState"] = LaState::LA_DEP_REJECT;
+                    $updData["creditStatus"] = 1;
+                    $updData["recommendAmount"] = null;
+                    $updData["recommendAmountDesc"] = "";
+                    $updData["recommendJudgmentDetails"] = "";
+                    $updData["recommendIsPay"] = 0;
+                }
+                if ($oldLog["state"] == 3) {
+                    $updData["checkState"] = LaState::LA_PASS;
+                    $updData["isPublic"] = 2;
+                }
+                break;
+        }
+        $newLog["id"] = getStringId();
+        $newLog["type"] = ProjectState::LIVINGALLOWANCE;
+        $newLog["mainId"] = $id;
+        $newLog["active"] = 1;
+        $newLog["state"] = $oldLog["state"];
+        $newLog["step"] = $process;
+        $newLog["stateChange"] = LaState::getStateDesc($oldState) . "->" . LaState::getStateDesc($updData["checkState"]);
+        $newLog["description"] = $oldLog["description"];
+        $newLog["createTime"] = date("Y-m-d H:i:s");
+        $newLog["createUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]);
+        Db::startTrans();
+        try {
+            $where = [];
+            $where[] = ["mainId", "=", $id];
+            $where[] = ["type", "=", ProjectState::LIVINGALLOWANCE];
+            $where[] = ["active", "=", 2];
+            Db::table("new_talent_checklog")->where($where)->delete();
+            Db::table("new_talent_checklog")->insert($newLog);
+            Db::table("md_living_allowance_info")->save($updData);
+            Db::commit();
+            $responseObj->code = 200;
+            $responseObj->msg = "提交审核成功";
+            return json($responseObj);
+        } catch (\think\db\exception\DbException $e) {
+            Db::rollback();
+            $responseObj->msg = $e->getMessage();
+            return json($responseObj);
+        }
+    }
+
+    /**
+     * 计算兑现额度
+     * @param type $oldInfo
+     * @return string
+     */
+    private function calculateAmount($oldInfo) {
+        $return = [];
+        /*         * 硕士研究生补贴 */
+        if ($oldInfo["declareType"] == 1) {
+            //硕士 master_living_allowance_ss_money
+            $moneyInfo = DictApi::findByParentCodeAndCode("master_living_allowance_ss_money", $oldInfo["applyCount"]);
+        } else {
+            //博士 master_living_allowance_bs_money
+            $moneyInfo = DictApi::findByParentCodeAndCode("master_living_allowance_bs_money", $oldInfo["applyCount"]);
+        }
+
+        $moneyStanard = $moneyInfo ? $moneyInfo["name"] : 0;
+        $return["recommendAmount"] = $moneyStanard;
+        $where = [];
+        $where[] = ["cardType", "=", $oldInfo["cardType"]];
+        $where[] = ["idCard", "=", $oldInfo["idCard"]];
+        $where[] = ["year", "=", substr($oldInfo["year"], 0, 4)];
+        $where[] = ["checkState", "=", 30];
+        $where[] = ["publicState", ">=", 4];
+        $talentAllowanceInfo = \app\common\model\TalentAllowance::where($where)->findOrEmpty();
+        if ($talentAllowanceInfo) {
+            $balanceMoney = $oldInfo["amount"] - $talentAllowanceInfo["money"];
+            if (round($balanceMoney, 2) == round(0, 2)) {
+                $return["recommendAmountDesc"] = "当年度存在享受津补贴的记录,津补贴额度为:" . $talentAllowanceInfo["money"] . ",生活补贴额度为:" . $oldInfo["amount"] . ",根据就高原则生活补贴享受额度为0元,因此不予兑现;\n";
+                $return["recommendAmount"] = 0;
+                $return["recommendIsPay"] = -1;
+            } else {
+                $return["recommendAmountDesc"] = "当年度存在享受津补贴的记录,津补贴额度为:" . $talentAllowanceInfo["money"] . ",生活补贴额度为:" . $oldInfo["amount"] . ",需要补充生活补贴额度为:" . round($balanceMoney, 2) . "元,予以兑现;\n";
+                $return["recommendAmount"] = $balanceMoney;
+            }
+        } else {
+            $return["recommendAmountDesc"] = "当年度无享受津补贴的记录,可全额享受,予以兑现;\n";
+        }
+        return $return;
     }
 
 }

+ 1 - 1
app/admin/view/living_allowance/detail.html

@@ -321,7 +321,7 @@
                                                         </div>
                                                     </div>
                                                     <div class="col-sm-1">
-                                                        <img id="photoImg" src="{$row.photo}" onclick="$(this).viewer({fullscreen: false});"  style="height: 110px;width: 76px;padding-bottom: 5px;">
+                                                        <img id="photoImg" src="{$row.photo|getStoragePath}" onclick="$(this).viewer({fullscreen: false});"  style="height: 110px;width: 76px;padding-bottom: 5px;">
                                                     </div>
                                                 </div>
                                                 <div class="bs-callout bs-callout-success" >

+ 1 - 1
app/admin/view/living_allowance/index.html

@@ -20,7 +20,7 @@
     <div class="col-sm-12">
         <div class="ibox float-e-margins">
             <div class="ibox-title">
-                <h5>硕博人才生活补贴审核</h5>
+                <h5>硕博人才生活补贴审核 - {switch name="process"}{case value="1"}初审{/case}{case value="2"}部门审核{/case}{case value="3"}复审{/case}{case value="4"}兑现{/case}{/switch}</h5>
             </div>
             <div class="ibox-content">
                 <div class="row row-lg">

+ 45 - 43
app/admin/view/talent/filesShow.html

@@ -1,4 +1,5 @@
-@layout("/common/_container.html"){
+{extend name="layout/content"}
+{block name="content"}
 <style type="text/css">
     .spacing {
         margin-bottom: 10px;
@@ -29,47 +30,50 @@
         margin-top:1px;
     }
 </style>
-    <#table id="fileTable2"/>
+<table id="fileTable2" 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>
 <script>
-    function downloadFile(id){
-        window.location.href = Feng.ctxPath + "/api/talentInfo/downloadFile?id=" + id;
-    }
-
-    function getFile(project,type,id) {
+    function getFile(project, type, id) {
         var queryData = {};
         queryData['project'] = project;
         queryData['type'] = type;
         $("#fileTable2").bootstrapTable({
-            url: Feng.ctxPath + "/api/talentInfo/findUnCommonFileType",
+            url: Feng.ctxPath + "/common/api/findCommonFileType",
             method: 'POST',
             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-            search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-            showRefresh: false,				// 是否显示刷新按钮
-            clickToSelect: true,			// 是否启用点击选中行
-            singleSelect: true,				// 设置True 将禁止多选
-            striped: true,  				// 是否显示行间隔色
+            search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+            showRefresh: false, // 是否显示刷新按钮
+            clickToSelect: true, // 是否启用点击选中行
+            singleSelect: true, // 设置True 将禁止多选
+            striped: true, // 是否显示行间隔色
             escape: true,
-            pagination: false,   			// 设置为 true 会在表格底部显示分页条
+            pagination: false, // 设置为 true 会在表格底部显示分页条
             paginationHAlign: "left",
             paginationDetailHAlign: "right",
-            sidePagination: "server",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
+            sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
             showColumns: false,
-            detailView: true,               //是否显示父子表
+            detailView: true, //是否显示父子表
             pageList: [10, 30, 50],
             queryParams: function (params) {
-                return $.extend(queryData,params)
+                return $.extend(queryData, params)
             },
             rowStyle: function (row, index) {
-                return {classes:"info"};
+                return {classes: "info"};
             },
             columns: [
-                {field: 'selectItem', checkbox:false,visible:false},
-                {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:"70%",'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;
+                {field: 'selectItem', checkbox: false, visible: false},
+                {title: '名称', field: 'name', visible: true, align: 'center', valign: 'middle', width: "70%", '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;
                         }
                     }
                 }
@@ -84,34 +88,32 @@
                 $("#fileTable2").bootstrapTable('expandAllRows');
             },
             onExpandRow: function (index, row, $detail) {
-                var ajax = new $ax(Feng.ctxPath + "/api/talentInfo/listTalentFile", function (data) {
-                    if(data==null||data.length==0){
+                var ajax = new $ax(Feng.ctxPath + "/common/api/listTalentFile", function (data) {
+                    if (data == null || data.length == 0) {
                         return;
                     }
                     var html = '<ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
-                    for(var key in data){
+                    for (var key in data) {
                         var sn = data[key].url.lastIndexOf(".");
-                        var suffix = data[key].url.substring(sn+1,data[key].url.length);
+                        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;\">';
+                        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=\"downloadFile('"+data[key].id+"')\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button></li>";
+                        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=\"downloadFile('" + data[key].id + "','" + data[key].type + "')\" 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
+                        fullscreen: false
                     });
                 }, function (data) {
                     Feng.error("查询失败!" + data.responseJSON.message + "!");
@@ -125,4 +127,4 @@
         });
     }
 </script>
-@}
+{/block}

+ 179 - 2
app/common/api/LivingAllowanceApi.php

@@ -4,6 +4,7 @@ namespace app\common\api;
 
 use app\common\model\LivingAllowance as LaModel;
 use app\common\state\LivingAllowanceState as LaState;
+use think\facade\Db;
 
 /**
  * Description of LivingAllowanceApi
@@ -12,8 +13,184 @@ use app\common\state\LivingAllowanceState as LaState;
  */
 class LivingAllowanceApi {
 
-    public static function getList($where = []) {
-        return LaModel::where($where)->select()->toArray();
+    public static function getList($params) {
+        $order = trim($params["order"]) ?: "desc";
+        $offset = trim($params["offset"]) ?: 0;
+        $limit = trim($params["limit"]) ?: 10;
+        $where = [];
+        if ($_where = self::setLivingAllowanceCheckStateCondition($params)) {
+            $where = array_merge($where, $_where);
+        }
+        if ($_where = self::getWhereByParams($params)) {
+            $where = array_merge($where, $_where);
+        }
+        $type = session("user")["type"];
+        $where[] = ["type", "=", $type];
+        $count = laModel::where($where)->count();
+        $list = laModel::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray();
+        $masterTypes = DictApi::selectByParentCode("un_master_education"); //申报对象类型
+        $degrees = DictApi::selectByParentCode("highest_degree"); //最高学历
+        foreach ($list as $key => $item) {
+            $list[$key]["declareTypeName"] = $masterTypes[$item["declareType"]];
+            $list[$key]["highEducation"] = $degrees[$item["highEducation"]];
+        }
+        return ["total" => $count, "rows" => $list];
+    }
+
+    private static function setLivingAllowanceCheckStateCondition($params) {
+        $where = [];
+        $checkState = $params["checkState"];
+        $process = $params["process"];
+        if ($checkState) {
+            switch ($process) {
+                case -1:
+                    if ($checkState == 7) {
+                        $where[] = ["checkState", ">=", $checkState];
+                    } else {
+                        $where[] = ["checkState", "=", $checkState];
+                    }
+                    break;
+                case 1:
+                    if ($checkState == LaState::LA_NEED_DEP_CHECK) {
+                        $where[] = ["checkState", "in", [15, 25, 30, 35]];
+                    } else if ($checkState == 5) {
+                        $where[] = ["checkState", "=", LaState::LA_NEED_FIRST_CHECK];
+                        $where[] = ["highProcess", ">=", 1];
+                    } else if ($checkState == LaState::LA_NEED_FIRST_CHECK) {
+                        $where[] = ["checkState", "=", LaState::LA_NEED_FIRST_CHECK];
+                        $where[] = ["highProcess", "<", 1];
+                    } else {
+                        $where[] = ["checkState", "=", $checkState];
+                    }
+                    break;
+                case 2:
+                    if ($checkState == LaState::LA_BEFORE_REJECT) {
+                        $where[] = ["checkState", "=", 15];
+                        $where[] = ["highProcess", ">=", 2];
+                    } else if ($checkState == LaState::LA_NEED_FIRST_CHECK) {
+                        $where[] = ["checkState", "=", 15];
+                        $where[] = ["highProcess", "<", 2];
+                    } else if ($checkState == LaState::LA_FIRST_REJECT) {               //待复核                        
+                        $where[] = ["checkState", "in", [1, 3, 5, 7, 10, 20]];
+                    } else if ($checkState == LaState::LA_NEED_DEP_CHECK) {
+                        $where[] = ["checkState", ">=", 25];
+                    } else {
+                        $where[] = ["checkState", "=", $checkState];
+                    }
+                    break;
+                case 3:
+                    if ($checkState == LaState::LA_THIRD_REJECT) {
+                        $where [] = ["checkState", "in", [7, 10, 15, 20, 30]];
+                    } else if ($checkState == LaState::LA_BEFORE_REJECT) {            //重新提交
+                        $where[] = ["checkState", "=", LaState::LA_NEED_THIRD];
+                        $where[] = ["highProcess", ">=", 3];
+                    } else if ($checkState == StateConst . RCRD_NEED_THIRD) {               //待复核
+                        $where[] = ["checkState", "=", $checkState];
+                        $where[] = ["highProcess", "<", 3];
+                    } else {
+                        $where[] = ["checkState", "=", $checkState];
+                    }
+                    break;
+                case 4:
+                    $where[] = ["checkState", "=", $checkState];
+                    break;
+                case 5:
+                    break;
+            }
+        }
+        return $where;
+    }
+
+    private static function getWhereByParams($params) {
+        foreach ($params as &$param) {
+            $param = trim($param);
+        }unset($param);
+        $where = [];
+        if ($params["name"]) {
+            $where[] = ["name", "like", "%" . $params["name"] . "%"];
+        }
+        if ($params["idCard"]) {
+            $where[] = ["idCard", "like", "%" . $params["idCard"] . "%"];
+        }
+        if ($params["introductionMethod"]) {
+            $where[] = ["introductionMethod", "=", $params["introductionMethod"]];
+        }
+        if ($params["sex"]) {
+            $where[] = ["sex", "=", $params["sex"]];
+        }
+        if ($params["declareType"]) {
+            $where[] = ["declareType", "=", $params["declareType"]];
+        }
+        if ($params["nation"]) {
+            $where[] = ["nation", "=", $params["nation"]];
+        }
+        if ($params["nationality"]) {
+            $where[] = ["nationality", "=", $params["nationality"]];
+        }
+        if ($params["provinceCode"]) {
+            $where[] = ["provinceCode", "=", $params["provinceCode"]];
+        }
+        if ($params["politics"]) {
+            $where[] = ["politics", "=", $params["politics"]];
+        }
+        if (session("user")["usertype"] == 2) {
+            $where[] = ["enterpriseId", "=", session("user")["uid"]];
+        } else {
+            if ($params["enterpriseId"]) {
+                $where[] = ["enterpriseId", "=", $params["enterpriseId"]];
+            }
+        }
+        if ($params["industryFieldNew"]) {
+            $where[] = ["industryFieldNew", "=", $params["industryFieldNew"]];
+        }
+        if ($params["industryField"]) {
+            $where[] = ["industryField", "=", $params["industryField"]];
+        }
+        if ($params["introductionMode"]) {
+            $where[] = ["introductionMode", "=", $params["introductionMode"]];
+        }
+        if ($params["highEducation"]) {
+            $where[] = ["highEducation", "=", $params["highEducation"]];
+        }
+        if ($params["major"]) {
+            $where[] = ["major", "like", "%" . $params["major"] . "%"];
+        }
+        if ($params["title"]) {
+            $where[] = ["title", "like", "%" . $params["title"] . "%"];
+        }
+        if ($params["studyAbroad"]) {
+            $where[] = ["studyAbroad", "=", $params["studyAbroad"]];
+        }
+        if ($params["phone"]) {
+            $where[] = ["phone", "like", "%" . $params["phone"] . "%"];
+        }
+        if ($params["email"]) {
+            $where[] = ["email", "like", "%" . $params["email"] . "%"];
+        }
+        if ($params["address"]) {
+            $where[] = ["address", "=", $params["address"]];
+        }
+        if ($params["isPublic"]) {
+            $where[] = ["isPublic", "=", $params["isPublic"]];
+        }
+        if ($params["year"]) {
+            $where[] = ["year", "=", $params["year"]];
+        }
+        switch ($params["process"]) {
+            case 1:
+                $where[] = ["checkState", "not in", [3, 5]];
+                break;
+            case 2:
+                $where[] = ["firstPassTime", "EXP", Db::raw("is not null")];
+                break;
+            case 3:
+                $where[] = ["firstDepPassTime", "EXP", Db::raw("is not null")];
+                break;
+            case 4:
+                $where[] = ["checkState", "in", [-1, 35]];
+                break;
+        }
+        return $where;
     }
 
     public static function getInfoById($id) {

+ 5 - 0
app/common/controller/Api.php

@@ -560,6 +560,7 @@ class Api extends BaseController {
         $url = "";
         switch ($type) {
             case 1:
+            case 19:
                 $fileinfo = Db::table("new_talent_file")->where($where)->findOrEmpty();
                 $filename = $fileinfo["orignName"];
                 $url = $fileinfo["url"];
@@ -897,4 +898,8 @@ class Api extends BaseController {
         return view("", ["img" => $img]);
     }
 
+    public function gotoFileShow() {
+        return view("admin@talent/filesShow");
+    }
+
 }

+ 16 - 0
app/common/model/TalentAllowance.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\common\model;
+
+use think\model;
+
+/**
+ * Description of TalentAllowance
+ *
+ * @author sgq
+ */
+class TalentAllowance extends model {
+
+    protected $table = "un_talent_allowance_info";
+
+}

+ 37 - 0
app/common/state/CommonConst.php

@@ -15,6 +15,43 @@ namespace app\common\state;
  */
 class CommonConst {
 
+    const RSJ = "rsj";         //人社局code
+    const SBJ = "sbj";         //社保局code
+    const SWJ = "swj";         //税务局code
+    const IC = "ic";           //集成电路code
+    const ZJJ = "zjj";         //住建局
+    const MZJ = "mzj";         //民政局
+    const ZRZYJ = "zrzyj";     //自然资源局
+    const visit = "visitGroup";     //走访核查小组
+    const JYJ = "jyj";         //教育局
+
+    /**
+     * 晋江市优秀人才津补贴审核单位 
+     */
+    public static function JBTLIST() {
+        return [
+            self::RSJ, self::SBJ, self::SWJ
+        ];
+    }
+
+    /**
+     * 集成电路优秀人才津补贴审核单位 
+     */
+    public static function JBTICLIST() {
+        return [
+            self::IC, self::SBJ, self::SWJ
+        ];
+    }
+
+    /**
+     * 晋江市优秀人才购房补贴审核单位 
+     */
+    public static function HOUSELIST() {
+        return [
+            self::ZJJ, self::MZJ, self::ZRZYJ, self::RSJ
+        ];
+    }
+
     /**
      * 通过层次得到层次基础积分
      * @param type $level

+ 1 - 1
public/static/js/common/Feng.js

@@ -613,7 +613,7 @@ var Feng = {
             area: ['800px', '500px'],
             offset: 'rb', //右下角弹出content:
             shift: 2,
-            content: Feng.ctxPath +  "/api/common/gotoFileShow",
+            content: Feng.ctxPath +  "/common/api/gotoFileShow",
             zIndex: layer.zIndex,
             success:function (layero,index) {
                 layer.setTop(layero);

+ 1 - 1
public/static/modular/common/upload.js

@@ -239,7 +239,7 @@ function initNoBtnFileTable(project,tableName){
                     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=\"downloadFile('"+data[key].id+"',1)\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button></li>"
+                        "<li style='width: 10%;padding-top: 2px;'><button type='button' onclick=\"downloadFile('"+data[key].id+"','"+data[key].type+"')\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button></li>"
                 }
                 html = html + '</ul>';
                 $detail.html(html);

+ 166 - 165
public/static/modular/master/livingAllowanceInfo/livingAllowanceInfo.js

@@ -2,8 +2,8 @@
  * 硕博人才生活补贴申报管理初始化
  */
 var LivingAllowanceInfo = {
-    id: "LivingAllowanceInfoTable",	//表格id
-    seItem: null,		//选中的条目
+    id: "LivingAllowanceInfoTable", //表格id
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
@@ -17,13 +17,13 @@ LivingAllowanceInfo.initColumn = function () {
         {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: '80px'},
         {title: '申报补贴年次', field: 'applyCount', visible: true, align: 'center', valign: 'middle', width: '100px',
             formatter: function (value, row, index) {
-                if(value == 1){
+                if (value == 1) {
                     return "首年";
                 }
-                if(value == 2){
+                if (value == 2) {
                     return "第二年";
                 }
-                if(value == 3){
+                if (value == 3) {
                     return "第三年";
                 }
             }
@@ -31,16 +31,16 @@ LivingAllowanceInfo.initColumn = function () {
         {title: '申报类型', field: 'declareTypeName', visible: true, align: 'center', valign: 'middle', width: '80px'},
         {title: '引进方式', field: 'introductionMethod', visible: true, align: 'center', valign: 'middle', width: '80px',
             formatter: function (value, row, index) {
-                if(value == 1){
+                if (value == 1) {
                     return "新引进";
                 }
-                if(value == 2){
+                if (value == 2) {
                     return "其他";
                 }
             }
         },
         {
-            title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "100px",'class': 'uitd_showTip',
+            title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip',
             formatter: function (value, row, index) {
                 return row.sex == 1 ? value + '<span style="color:#6495ED">【男】</span>' : value + '<span style="color:#FF82AB">【女】</span>';
             }
@@ -121,17 +121,17 @@ LivingAllowanceInfo.initColumn = function () {
             valign: 'middle',
             'class': 'uitd_showTip',
             width: "100px",
-            formatter : function (value,row,index) {
-                if(value == -1){
+            formatter: function (value, row, index) {
+                if (value == -1) {
                     return "<span style='color: red'>不予兑现</span>"
                 }
-                if(value == 0){
+                if (value == 0) {
                     return "<span style='color: #2401fd'>未知</span>"
                 }
-                if(value == 1){
+                if (value == 1) {
                     return "<span style='color: green'>待兑现</span>"
                 }
-                if(value == 2){
+                if (value == 2) {
                     return "<span style='color: #6d008b'>已兑现</span>"
                 }
             }
@@ -179,17 +179,17 @@ LivingAllowanceInfo.initColumn = function () {
             valign: 'middle',
             'class': 'uitd_showTip',
             width: "100px",
-            formatter : function (value,row,index) {
-                if(value == -1){
+            formatter: function (value, row, index) {
+                if (value == -1) {
                     return "<span style='color: red'>不予兑现</span>"
                 }
-                if(value == 0){
+                if (value == 0) {
                     return "<span style='color: #2401fd'>未知</span>"
                 }
-                if(value == 1){
+                if (value == 1) {
                     return "<span style='color: green'>待兑现</span>"
                 }
-                if(value == 2){
+                if (value == 2) {
                     return "<span style='color: #6d008b'>已兑现</span>"
                 }
             }
@@ -199,8 +199,8 @@ LivingAllowanceInfo.initColumn = function () {
         },
         {
             title: '实际判定描述', field: 'judgmentDetails', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
-            formatter: function (value,row,index) {
-                if(Feng.isNotEmptyStr(value)){
+            formatter: function (value, row, index) {
+                if (Feng.isNotEmptyStr(value)) {
                     var arr = value.split(";");
                     return arr.join("</br>")
                 }
@@ -209,8 +209,8 @@ LivingAllowanceInfo.initColumn = function () {
         },
         {
             title: '实际计算描述', field: 'amountDesc', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
-            formatter: function (value,row,index) {
-                if(Feng.isNotEmptyStr(value)){
+            formatter: function (value, row, index) {
+                if (Feng.isNotEmptyStr(value)) {
                     var arr = value.split(";");
                     return arr.join("</br>")
                 }
@@ -265,13 +265,13 @@ LivingAllowanceInfo.initColumn = function () {
                     return "<span class='label label-danger'>审核不通过</span>"
                 } else if (value <= 10 || value == 20) {
                     return "<span class='label label-danger'>已驳回</span>"
-                } else if(value == 15){
-                    if(row.highProcess != null && row.highProcess != '' && row.highProcess >= 2){
+                } else if (value == 15) {
+                    if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 2) {
                         return "<span class='label label-success'>重新提交</span>"
-                    }else {
+                    } else {
                         return "<span class='label label-success'>待审核</span>"
                     }
-                }else if(value >= 25){
+                } else if (value >= 25) {
                     return "<span class='label label-primary'>已通过</span>"
                 }
 
@@ -352,8 +352,8 @@ LivingAllowanceInfo.initColumn = function () {
             title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: '80px',
             formatter: function (value, row, index) {
                 return "<span class='label label-success' onclick=\"LivingAllowanceInfo.showLog('" + value + "')\" >" +
-                    "<i class=\"fa fa-book\"></i>日志" +
-                    "</span>";
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
             }
         }
     ];
@@ -385,7 +385,7 @@ LivingAllowanceInfo.openCheckLivingAllowanceInfo = function (process) {
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/livingAllowanceInfo/livingAllowanceInfo_check?id=' + LivingAllowanceInfo.seItem.id+"&process="+process,
+            content: Feng.ctxPath + '/admin/living_allowance/detail?id=' + LivingAllowanceInfo.seItem.id + "&process=" + process,
             btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-save"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
             btnAlign: 'c',
             btn1: function (index, layero) {
@@ -507,49 +507,49 @@ LivingAllowanceInfo.showDataCheckModal = function (type) {
         url: Feng.ctxPath + "/livingAllowanceInfo/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) {
             $("#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: '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>";
+                            }
                         }
-                    }
-                },
-            ]
+                    },
+                ]
 
     });
 }
@@ -571,7 +571,7 @@ LivingAllowanceInfo.checkExport = function () {
     window.location.href = Feng.ctxPath + "/livingAllowanceInfoExport/exportHczx?ids=" + ids;
 }
 
-LivingAllowanceInfo.actalUpload = function (){
+LivingAllowanceInfo.actalUpload = function () {
     $("#file,#fileName").val("");
     $("#importModal").modal("show");
 }
@@ -580,7 +580,7 @@ LivingAllowanceInfo.actalUpload = function (){
 /**
  *
  */
-LivingAllowanceInfo.importSubmit = function (){
+LivingAllowanceInfo.importSubmit = function () {
     $("#import-form")[0].submit();
     // layer.confirm('您需要导入数据并提交吗?', {
     //     btn: ['仅导入','导入并提交','取消'] //按钮
@@ -608,61 +608,61 @@ LivingAllowanceInfo.importCallBack = function (data) {
     }
 }
 
-LivingAllowanceInfo.initCheckFileTable = function (){
+LivingAllowanceInfo.initCheckFileTable = function () {
     $('#checkFileTable').bootstrapTable('destroy');
     $('#checkFileTable').bootstrapTable({
-        url: Feng.ctxPath + "/talentCommonFile/listTalentFile",
+        url: Feng.ctxPath + "/common/api/listTalentFile",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-        search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-        showRefresh: false,				// 是否显示刷新按钮
-        clickToSelect: true,			// 是否启用点击选中行
-        singleSelect: true,				// 设置True 将禁止多选
-        striped: true,  				// 是否显示行间隔色
-        pagination: false,   			// 设置为 true 会在表格底部显示分页条
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
         paginationHAlign: "left",
         paginationDetailHAlign: "right",
-        sidePagination: "server",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
         queryParams: function (params) {
-            return {"mainId":$("#batch").val(),"fileTypeId":"master_living_allowance"};
+            return {"mainId": $("#batch").val(), "fileTypeId": "master_living_allowance"};
         },
-        rowStyle : function(row,index){
+        rowStyle: function (row, index) {
             return {css: {"word-break": "break-word", "white-space": "inherit"}}
         },
         columns:
-        [
-            {title: '附件原名', field: 'orignName', visible: true, align: 'center', valign: 'middle',width:'120px'},
-            {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px",
-                formatter:function (value,row ,index){
-                    var sn = value.lastIndexOf(".");
-                    var suffix = value.substring(sn+1,value.length);
-                    var imgStr = "";
-                    if(suffix=="pdf"||suffix=="PDF"){
-                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('"+value+"','"+row.id+"','"+row.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('"+value+"','"+row.id+"','"+row.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=\"'+value+'\" style=\"width:25px;height:25px;\">';
-                    }
-                    return imgStr;
-                }
-            },
-            {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle',width:'80px',
-                formatter:function (value,row ,index){
-                    return "<button type='button' onclick=\"downloadFile('"+row.id+"',1)\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button>"+
-                        "<button type='button' onclick=\"LivingAllowanceInfo.deleteCheckFile('"+row.id+"','"+CONFIG.project_master_living_allowance+"')\" class=\"btn btn-xs btn-danger\">" +
-                        "<i class=\"fa fa-times\"></i>删除" +
-                        "</button>";
-                }
-            },
-        ],
+                [
+                    {title: '附件原名', field: 'orignName', visible: true, align: 'center', valign: 'middle', width: '120px'},
+                    {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px",
+                        formatter: function (value, row, index) {
+                            var sn = value.lastIndexOf(".");
+                            var suffix = value.substring(sn + 1, value.length);
+                            var imgStr = "";
+                            if (suffix == "pdf" || suffix == "PDF") {
+                                imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.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('" + value + "','" + row.id + "','" + row.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=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                            }
+                            return imgStr;
+                        }
+                    },
+                    {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '80px',
+                        formatter: function (value, row, index) {
+                            return "<button type='button' onclick=\"downloadFile('" + row.id + "','" + row.type + "')\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button>" +
+                                    "<button type='button' onclick=\"LivingAllowanceInfo.deleteCheckFile('" + row.id + "','" + CONFIG.project_master_living_allowance + "')\" class=\"btn btn-xs btn-danger\">" +
+                                    "<i class=\"fa fa-times\"></i>删除" +
+                                    "</button>";
+                        }
+                    },
+                ],
         onPostBody: function () {
-            $('#checkFileTable'+"td.uitd_showTip").bind("mouseover", function () {
+            $('#checkFileTable' + "td.uitd_showTip").bind("mouseover", function () {
                 var htm = $(this).html();
                 $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
             });
-            $(".imgUrl").viewer({ fullscreen:false});
+            $(".imgUrl").viewer({fullscreen: false});
         },
     });
 }
@@ -671,7 +671,7 @@ LivingAllowanceInfo.initCheckFileTable = function (){
 /**
  * 核查材料留存上传
  */
-LivingAllowanceInfo.showCheckFileModal = function (){
+LivingAllowanceInfo.showCheckFileModal = function () {
     Feng.addAjaxSelect({
         "id": "batch",
         "displayCode": "id",
@@ -683,18 +683,19 @@ LivingAllowanceInfo.showCheckFileModal = function (){
     $("#checkFileModal").modal("show");
 }
 
-LivingAllowanceInfo.checkFileUpload = function (){
+LivingAllowanceInfo.checkFileUpload = function () {
     var batch = $("#batch").val();
-    if(Feng.isEmptyStr(batch)){
-        Feng.info("请选择申报批次后再上传!");return;
+    if (Feng.isEmptyStr(batch)) {
+        Feng.info("请选择申报批次后再上传!");
+        return;
     }
     $("#upload_file ").unbind("change");
     $("#upload_file ").change(function () {
         var formData = new FormData();
-        formData.append("fileTypeId","master_living_allowance");
-        formData.append("mainId",batch);
-        formData.append("fileId","");
-        for(var i=0; i<$('#upload_file')[0].files.length;i++){
+        formData.append("fileTypeId", "master_living_allowance");
+        formData.append("mainId", batch);
+        formData.append("fileId", "");
+        for (var i = 0; i < $('#upload_file')[0].files.length; i++) {
             formData.append('file', $('#upload_file')[0].files[i]);
         }
         $.ajax({
@@ -703,10 +704,10 @@ LivingAllowanceInfo.checkFileUpload = function (){
             processData: false,
             contentType: false,
             data: formData,
-            success: function(data){
+            success: function (data) {
                 $("#checkFileTable").bootstrapTable("refresh", {});
                 Feng.info(data.msg);
-            },error: function(data) {
+            }, error: function (data) {
                 Feng.error("上传失败!" + data.responseJSON.message + "!");
             }
         });
@@ -715,20 +716,20 @@ LivingAllowanceInfo.checkFileUpload = function (){
     $('#upload_file').click();
 }
 
-LivingAllowanceInfo.deleteCheckFile = function (id,type){
-    var operation = function() {
-        var ajax = new $ax(Feng.ctxPath + "/talentCommonFile/deleteFile", function (data) {
-            if(data.code=200){
+LivingAllowanceInfo.deleteCheckFile = function (id, type) {
+    var operation = function () {
+        var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
+            if (data.code = 200) {
                 Feng.success(data.msg);
                 $("#checkFileTable").bootstrapTable("refresh", {});
-            }else{
+            } else {
                 Feng.error(data.msg);
             }
         }, function (data) {
             Feng.error("删除失败!" + data.responseJSON.message + "!");
         });
         ajax.set("id", id);
-        ajax.set("type",type);
+        ajax.set("type", type);
         ajax.start();
     }
     Feng.confirm("删除后无法恢复,确认删除吗?", operation);
@@ -738,17 +739,17 @@ LivingAllowanceInfo.deleteCheckFile = function (id,type){
 /**
  * 审核不通过
  */
-LivingAllowanceInfo.setNotPass = function(){
+LivingAllowanceInfo.setNotPass = function () {
     var selecteds = $('#' + this.id).bootstrapTable('getSelections');
-    if(selecteds.length == 0){
+    if (selecteds.length == 0) {
         Feng.info("请选择需要设置审核不通过的行");
-        return ;
+        return;
     }
     var ids = "";
-    for(var key in selecteds){
+    for (var key in selecteds) {
         ids = ids + selecteds[key].id + ",";
     }
-    ids = ids.substring(0,ids.length-1);
+    ids = ids.substring(0, ids.length - 1);
     layer.open({
         type: 1,
         id: "notPassModal",
@@ -758,35 +759,35 @@ LivingAllowanceInfo.setNotPass = function(){
         shade: 0,
         maxmin: true,
         content: '<form id="checkNotPass">\n' +
-            '                    <div class="form-group" style="margin: 10px;">\n' +
-            '                        <label for="checkMsgNotPass" class="control-label" >审核不通过原因</label>\n' +
-            '                        <textarea class="form-control" id="checkMsgNotPass" placeholder="此功能适用于未在申报提交截止时间内提交的数据"  rows="6"></textarea>\n' +
-            '                    </div>\n' +
-            '                </form>',
+                '                    <div class="form-group" style="margin: 10px;">\n' +
+                '                        <label for="checkMsgNotPass" class="control-label" >审核不通过原因</label>\n' +
+                '                        <textarea class="form-control" id="checkMsgNotPass" placeholder="此功能适用于未在申报提交截止时间内提交的数据"  rows="6"></textarea>\n' +
+                '                    </div>\n' +
+                '                </form>',
 
         btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
         btnAlign: 'c',
         zIndex: layer.zIndex,
         yes: function (index, layero) {
             var checkMsg = $("#checkMsgNotPass").val();
-            if(Feng.isEmptyStr(checkMsg)){
+            if (Feng.isEmptyStr(checkMsg)) {
                 Feng.info("请填写审核不通过原因");
-                return ;
+                return;
             }
-            var operation = function(){
-                var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/setNotPass", function (data) {
-                    if(data.code==200){
+            var operation = function () {
+                var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/setNotPass", function (data) {
+                    if (data.code == 200) {
                         Feng.success(data.msg);
                         LivingAllowanceInfo.table.refresh();
                         layer.close(index);
-                    }else{
+                    } else {
                         Feng.error(data.msg);
                     }
                 }, function (data) {
                     Feng.error("设置审核不通过失败!" + data.responseJSON.message + "!");
                 });
-                ajax.set("ids",ids);
-                ajax.set("msg",checkMsg);
+                ajax.set("ids", ids);
+                ajax.set("msg", checkMsg);
                 ajax.start();
             }
             Feng.confirm("一旦提交无法修改,确定设置所选数据为审核不通过?", operation);
@@ -810,7 +811,7 @@ LivingAllowanceInfo.hczxPass = function () {
         ids = ids + selected[i].id + ",";
     }
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/hczxPass", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/hczxPass", function (data) {
             if (data.code == 200) {
                 Feng.success(data.msg);
                 LivingAllowanceInfo.table.refresh();
@@ -919,7 +920,7 @@ LivingAllowanceInfo.public = function () {
                     return;
                 }
                 layer.close(index);
-                var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/publicBatch", function (data) {
+                var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/publicBatch", function (data) {
                     if (data.code == 200) {
                         Feng.success(data.msg);
                         LivingAllowanceInfo.table.refresh();
@@ -966,19 +967,19 @@ LivingAllowanceInfo.publicExport = function (type) {
         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>",
+                "                    <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) {
@@ -1023,13 +1024,13 @@ LivingAllowanceInfo.afterCheck = function () {
         }
         if (LivingAllowanceInfo.seItem.checkState == -1) {
             var html = '<option value="">请选择</option>\n' +
-                '       <option value="2">驳回/恢复</option>';
+                    '       <option value="2">驳回/恢复</option>';
             $("#checkStateAfter").empty().append(html);
         }
         if (LivingAllowanceInfo.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();
@@ -1133,16 +1134,16 @@ LivingAllowanceInfo.issue = function () {
 }
 
 
-LivingAllowanceInfo.showExportModal = function (){
+LivingAllowanceInfo.showExportModal = function () {
     $("#exportForm")[0].reset();
     $("#commonExportModal").modal("show");
 }
-LivingAllowanceInfo.export = function (process){
-    var operation = function() {
+LivingAllowanceInfo.export = function (process) {
+    var operation = function () {
         var names = '';
         var fieldCodes = '';
-        $("#field_info li input").each(function(index){
-            if($(this).is(":checked")){
+        $("#field_info li input").each(function (index) {
+            if ($(this).is(":checked")) {
                 fieldCodes = fieldCodes + $(this).val() + ",";
                 names = names + $(this).next().text() + ",";
             }
@@ -1194,7 +1195,7 @@ LivingAllowanceInfo.callBack = function (data) {
     }
 }
 
-LivingAllowanceInfo.checkAll = function(){
+LivingAllowanceInfo.checkAll = function () {
     $("#field_info input").each(function () {
         this.checked = true;
     })
@@ -1202,11 +1203,11 @@ LivingAllowanceInfo.checkAll = function(){
 /**
  * 反选
  */
-LivingAllowanceInfo.unCheckAll = function(){
+LivingAllowanceInfo.unCheckAll = function () {
     $("#field_info input").each(function () {
-        if(this.checked){
+        if (this.checked) {
             this.checked = false;
-        }else{
+        } else {
             this.checked = true;
         }
     })

+ 152 - 135
public/static/modular/master/livingAllowanceInfo/livingAllowanceInfo_info.js

@@ -17,7 +17,7 @@ LivingAllowanceInfoInfoDlg.close = function () {
  * @param process
  */
 LivingAllowanceInfoInfoDlg.showCheckModal = function (process) {
-    var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/validateIsCheck", function (data) {
+    var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/validateIsCheck", function (data) {
         if (data.code == 200) {
             layer.open({
                 type: 1,
@@ -89,7 +89,7 @@ LivingAllowanceInfoInfoDlg.showCheckModal = function (process) {
                         Feng.info("请选择可修改的字段或附件!");
                         return;
                     }
-                    var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/check", function (data) {
+                    var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/check", function (data) {
                         if (data.code == 200) {
                             layer.close(index);
                             Feng.success(data.msg);
@@ -127,7 +127,7 @@ LivingAllowanceInfoInfoDlg.showCheckModal = function (process) {
  */
 LivingAllowanceInfoInfoDlg.submitCheck = function (process) {
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/submitCheck", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/submitCheck", function (data) {
             if (data.code == 200) {
                 Feng.success(data.msg);
                 window.parent.LivingAllowanceInfo.table.refresh();
@@ -184,31 +184,31 @@ LivingAllowanceInfoInfoDlg.toggleField = function () {
         $("#field").hide();
         $("#field").find("input[type=checkbox]").removeAttr("checked");
         if (Feng.isEmptyStr(checkMsg)) {
-            if(process == 1){
+            if (process == 1) {
                 $("#msg").val("初审通过,待部门审核!");
             }
-            if(process == 2){
+            if (process == 2) {
                 $("#msg").val("部门审核通过,待复核!");
             }
-            if(process == 3){
+            if (process == 3) {
                 $("#msg").val("复核通过,待公示!");
             }
         }
     } else if (checkState == -1) {
         $("#field").hide();
-        if(process == 1){
+        if (process == 1) {
             $("#msg").val("初审不通过!");
         }
-        if(process == 2){
+        if (process == 2) {
             $("#msg").val("部门审核不通过!");
         }
-        if(process == 3){
+        if (process == 3) {
             $("#msg").val("复核不通过!");
         }
     }
 }
 
-LivingAllowanceInfoInfoDlg.showMiniFileModal = function (){
+LivingAllowanceInfoInfoDlg.showMiniFileModal = function () {
     Feng.showMiniFileModal(CONFIG.project_master_living_allowance, $("#type").val(), $("#id").val());
 }
 
@@ -220,168 +220,185 @@ $(function () {
         "active": 1
     });
     $('#identifyTable').bootstrapTable({
-        url: Feng.ctxPath + "/talentInfo/getTalentInfoByIdCard",
+        url: Feng.ctxPath + "/admin/talent/getTalentInfoByIdCard",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-        search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-        showRefresh: false,				// 是否显示刷新按钮
-        clickToSelect: true,			// 是否启用点击选中行
-        singleSelect: true,				// 设置True 将禁止多选
-        striped: true,  				// 是否显示行间隔色
-        pagination: false,   			// 设置为 true 会在表格底部显示分页条
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
         paginationHAlign: "left",
         paginationDetailHAlign: "right",
-        sidePagination: "server",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
         queryParams: function (params) {
-            return {"idCard":$("#idCard").val()};
+            return {"idCard": $("#idCard").val()};
         },
-        rowStyle : function(row,index){
+        rowStyle: function (row, index) {
             return {css: {"word-break": "break-word", "white-space": "inherit"}}
         },
         columns:
-            [
-                {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle',width:'80px'},
-                {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"},
-                {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',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: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:"100px"},
-                {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"150px"},
-                {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>"
-                        }else if(value==1){
-                            return "<span class='label'>待提交</span>"
-                        }else if(value==10){
-                            return "<span class='label label-danger'>已驳回</span>"
-                        }else if(value==35){
-                            return "<span class='label label-primary'>已通过</span>"
-                        }else{
-                            return "<span class='label label-success'>审核中</span>"
+                [
+                    {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: '80px'},
+                    {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
+                    {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', 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: '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){
-                            return "<span class='label label-success'>待公示</span>"
-                        }if(value == 3){
-                            return "<span class='label label-danger'>公示中</span>"
-                        }if(value == 4){
-                            return "<span class='label label-warning'>待公布</span>"
-                        }if(value == 5){
-                            if(row.checkState == -1){
+                    },
+                    {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: "100px"},
+                    {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px"},
+                    {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>"
+                            } else if (value == 1) {
+                                return "<span class='label'>待提交</span>"
+                            } else if (value == 10) {
+                                return "<span class='label label-danger'>已驳回</span>"
+                            } else if (value == 35) {
+                                return "<span class='label label-primary'>已通过</span>"
+                            } else {
+                                return "<span class='label label-success'>审核中</span>"
                             }
-                            return "<span class='label label-primary'>待发证</span>"
-                        }if(value == 6){
-                            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) {
+                                return "<span class='label label-info'>待核查征信</span>"
+                            }
+                            if (value == 2) {
+                                return "<span class='label label-success'>待公示</span>"
+                            }
+                            if (value == 3) {
+                                return "<span class='label label-danger'>公示中</span>"
+                            }
+                            if (value == 4) {
+                                return "<span class='label label-warning'>待公布</span>"
+                            }
+                            if (value == 5) {
+                                if (row.checkState == -1) {
+                                    return "<span class='label label-danger'>审核不通过</span>"
+                                }
+                                return "<span class='label label-primary'>待发证</span>"
+                            }
+                            if (value == 6) {
+                                return "<span class='label label-primary'>已发证</span>"
+                            }
+                        }
+                    },
+                ]
         ,
         onPostBody: function () {
-            $('#identifyTable'+"td.uitd_showTip").bind("mouseover", function () {
+            $('#identifyTable' + "td.uitd_showTip").bind("mouseover", function () {
                 var htm = $(this).html();
                 $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
             });
         }
     });
     $('#allowanceTable').bootstrapTable({
-        url: Feng.ctxPath + "/talentAllowanceInfo/getTalentAllowanceByIdCard",
+        url: Feng.ctxPath + "/admin/talent_allowance/getTalentAllowanceByIdCard",
         method: 'POST',
         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-        search: false,					// 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
-        showRefresh: false,				// 是否显示刷新按钮
-        clickToSelect: true,			// 是否启用点击选中行
-        singleSelect: true,				// 设置True 将禁止多选
-        striped: true,  				// 是否显示行间隔色
-        pagination: false,   			// 设置为 true 会在表格底部显示分页条
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
         paginationHAlign: "left",
         paginationDetailHAlign: "right",
-        sidePagination: "server",   	// 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
         queryParams: function (params) {
-            return {"idCard":$("#idCard").val()};
+            return {"idCard": $("#idCard").val()};
         },
-        rowStyle : function(row,index){
+        rowStyle: function (row, index) {
             return {css: {"word-break": "break-word", "white-space": "inherit"}}
         },
         columns:
-            [
-                {title: '年度', field: 'year', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"60px"},
-                {title: '单位名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"},
-                {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px"},
-                {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"},
-                {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
-                {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle',width:"120px"},
-                {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle',width:"120px"},
-                {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px",
-                    formatter(value,row,index){
-                        if(value==-1){
-                            return "<span class='label label-warning-light'>审核不通过</span>";
-                        }else if(value==1){
-                            return "<span class='label'>待提交</span>"
+                [
+                    {title: '年度', field: 'year', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "60px"},
+                    {title: '单位名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
+                    {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
+                    {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
+                    {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+                    {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle', width: "120px"},
+                    {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle', width: "120px"},
+                    {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
+                        formatter(value, row, index) {
+                            if (value == -1) {
+                                return "<span class='label label-warning-light'>审核不通过</span>";
+                            } else if (value == 1) {
+                                return "<span class='label'>待提交</span>"
+                            } else if (value == 10) {
+                                return "<span class='label label-danger'>已驳回</span>";
+                            } else if (value == 30) {
+                                return "<span class='label label-primary'>已通过</span>"
+                            } else {
+                                return "<span class='label label-success'>审核中</span>";
+                            }
                         }
-                        else if(value==10){
-                            return "<span class='label label-danger'>已驳回</span>";
-                        }else if( value==30){
-                            return "<span class='label label-primary'>已通过</span>"
-                        }else {
-                            return "<span class='label label-success'>审核中</span>";
+                    },
+                    {title: '兑现状态', field: 'publicState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
+                        formatter(value, row, index) {
+                            if (value == 1)
+                                return "<span style='color: #9d8189'>待核查征信</span>";
+                            if (value == 2)
+                                return "<span style='color: #00d3ee'>待公示</span>";
+                            if (value == 3)
+                                return "<span style='color: #af2cc5'>公示中</span>";
+                            if (value == 4) {
+                                return (row.allowanceType == 3) ? "<span style='color: #f55a4e'>不予兑现</span>" : "<span style='color: #ca9fab'>待兑现</span>";
+                            }
+                            if (value == 5)
+                                return "<span style='color: #5cb860'>已兑现</span>";
                         }
-                    }
-                },
-                {title: '兑现状态', field: 'publicState', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px",
-                    formatter(value,row,index){
-                        if(value==1)return "<span style='color: #9d8189'>待核查征信</span>";
-                        if(value==2)return "<span style='color: #00d3ee'>待公示</span>";
-                        if(value==3)return "<span style='color: #af2cc5'>公示中</span>";
-                        if(value==4){
-                            return (row.allowanceType == 3)?"<span style='color: #f55a4e'>不予兑现</span>":"<span style='color: #ca9fab'>待兑现</span>";
+                    },
+                    {title: '推荐津补贴类型', field: 'recommendAllowanceType', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px",
+                        formatter(value, row, index) {
+                            if (value == null || value == "")
+                                return "<span style='color: black'>未判定</span>";
+                            if (value == 1)
+                                return "<span style='color: green'>人才津贴</span>";
+                            if (value == 2)
+                                return "<span style='color: blue'>一次性交通补贴</span>";
+                            if (value == 3)
+                                return "<span style='color: red'>不予兑现</span>";
                         }
-                        if(value==5)return "<span style='color: #5cb860'>已兑现</span>";
-                    }
-                },
-                {title: '推荐津补贴类型', field: 'recommendAllowanceType', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px",
-                    formatter(value,row,index){
-                        if(value==null || value=="")return "<span style='color: black'>未判定</span>";
-                        if(value==1)return "<span style='color: green'>人才津贴</span>";
-                        if(value==2)return "<span style='color: blue'>一次性交通补贴</span>";
-                        if(value==3)return "<span style='color: red'>不予兑现</span>";
-                    }
-                },
-                {title: '推荐兑现月份', field: 'recommendMonths', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
-                {title: '推荐兑现金额', field: 'recommendMoney', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
-                {title: '推荐金额说明', field: 'recommendMoneyDesc', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
-                {title: '津补贴类型', field: 'allowanceType', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px",
-                    formatter(value,row,index){
-                        if(value==null || value=="")return "<span style='color: black'>未判定</span>";
-                        if(value==1)return "<span style='color: green'>人才津贴</span>";
-                        if(value==2)return "<span style='color: blue'>一次性交通补贴</span>";
-                        if(value==3)return "<span style='color: red'>不予兑现</span>";
-                    }
-                },
-                {title: '兑现月份', field: 'months', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
-                {title: '兑现金额', field: 'money', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px"},
-                {title: '金额说明', field: 'moneyDesc', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px"},
-            ]
+                    },
+                    {title: '推荐兑现月份', field: 'recommendMonths', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+                    {title: '推荐兑现金额', field: 'recommendMoney', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+                    {title: '推荐金额说明', field: 'recommendMoneyDesc', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+                    {title: '津补贴类型', field: 'allowanceType', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px",
+                        formatter(value, row, index) {
+                            if (value == null || value == "")
+                                return "<span style='color: black'>未判定</span>";
+                            if (value == 1)
+                                return "<span style='color: green'>人才津贴</span>";
+                            if (value == 2)
+                                return "<span style='color: blue'>一次性交通补贴</span>";
+                            if (value == 3)
+                                return "<span style='color: red'>不予兑现</span>";
+                        }
+                    },
+                    {title: '兑现月份', field: 'months', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
+                    {title: '兑现金额', field: 'money', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
+                    {title: '金额说明', field: 'moneyDesc', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
+                ]
         ,
         onPostBody: function () {
-            $('#allowanceTable'+"td.uitd_showTip").bind("mouseover", function () {
+            $('#allowanceTable' + "td.uitd_showTip").bind("mouseover", function () {
                 var htm = $(this).html();
                 $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
             });