瀏覽代碼

Merge remote-tracking branch 'origin/master'

sandm 1 年之前
父節點
當前提交
adcc4c9b2e

+ 47 - 6
app/admin/controller/Talent.php

@@ -193,7 +193,7 @@ class Talent extends AdminController {
                 TalentLogApi::write(1, $id, TalentState::FST_VERIFY_FAIL, $msg, 1);
                 TalentModel::update($data);
                 $counts++;
-            } else if($ti["checkState"] == TalentState::FST_SAVE || $ti["checkState"] == TalentState::SCND_SAVE) {
+            } else if ($ti["checkState"] == TalentState::FST_SAVE || $ti["checkState"] == TalentState::SCND_SAVE) {
                 $data["checkState"] = TalentState::FST_VERIFY_FAIL;
                 $data['delete'] = 1;
                 TalentLogApi::write(1, $id, TalentState::FST_VERIFY_FAIL, $msg, 1);
@@ -216,6 +216,14 @@ class Talent extends AdminController {
         return json(VerifyApi::getList($params));
     }
 
+    /**
+     * 等初审列表
+     */
+    public function find_fst_list() {
+        $params = $this->request->param();
+        return new \app\common\api\Response(\app\common\api\Response::SUCCESS, "", VerifyApi::getFstList($params));
+    }
+
     public function base_reverify() {
         $enterprises = EnterpriseApi::getSimpleList();
         return view("", ["enterprises" => $enterprises]);
@@ -313,7 +321,7 @@ class Talent extends AdminController {
      * @auth {{/talentInfo/gotoIndex/4}}
      */
     public function pre_list() {
-        switch ($this->user["type"]){
+        switch ($this->user["type"]) {
             case 1:
                 $message = [
                     "typeName" => "晋江市现代产业体系人才认定", "address" => "聚才网/人才晋江微信公众号", "dep" => "中共晋江市委人才办、晋江市纪委监委驻市人力资源和社会保障局纪检监察组或晋江市公共就业和人才服务中心",
@@ -487,7 +495,7 @@ class Talent extends AdminController {
             }
         }
         if ($rows) {
-            switch ($this->user["type"]){
+            switch ($this->user["type"]) {
                 case 1:
                     $filename = "现代产业体系人才公示预览导出";
                     break;
@@ -536,7 +544,7 @@ class Talent extends AdminController {
             $i++;
         }
         if ($rows) {
-            switch ($this->user["type"]){
+            switch ($this->user["type"]) {
                 case 1:
                     $filename = "现代产业体系人才公示预览导出";
                     break;
@@ -711,7 +719,7 @@ class Talent extends AdminController {
             }
         }
         $columns = ["序号", "批次", "姓名", "性别", "工作单位", "本人具备的认定条件", "认定人才层次", "审核状态", "备注"];
-        switch ($this->user["type"]){
+        switch ($this->user["type"]) {
             case 1:
                 $filename = "现代产业体系人才" . date("Ym") . "公布预览名单导出(公示批次-" . $list[0]["publicBatch"] . ")";
                 break;
@@ -760,7 +768,7 @@ class Talent extends AdminController {
         }
 
         $columns = ["序号", "批次", "姓名", "性别", "工作单位", "本人具备的认定条件", "认定人才层次", "审核状态", "备注"];
-        switch ($this->user["type"]){
+        switch ($this->user["type"]) {
             case 1:
                 $filename = "现代产业体系人才" . date("Ym") . "公布名单导出(公示批次-" . $list[0]["publicBatch"] . ")";
                 break;
@@ -1761,6 +1769,39 @@ class Talent extends AdminController {
         }
     }
 
+    public function findFieldsAndFilesForBatch() {
+        $responseObj = new \stdClass();
+
+        if ($this->user["type"] == CommonConst::ENTERPRISE_JC) {
+            $fields = DictApi::getTalentFields_IC();
+        } else if ($this->user["type"] == CommonConst::ENTERPRISE_WJ) {
+            $fields = DictApi::getTalentFields_WJ();
+        } else if ($this->user["type"] == CommonConst::ENTERPRISE_GJ) {
+            $fields = DictApi::getTalentFields_GJ();
+        } else {
+            $fields = DictApi::getTalentFields(4);
+        }
+
+        $field_tmp = [];
+        if ($fields) {
+            foreach ($fields as $key => $field) {
+                $field_tmp[] = ["key" => $key, "value" => $field];
+            }
+        }
+        $where = [];
+        $whr = [];
+        $where[] = ["project", "=", 1];
+        $where[] = ["active", "=", 1];
+        $where[] = ["type", "=", $this->user["type"]];
+        $where[] = ["isConditionFile", "<>", 1];
+        $where[] = ["delete", "=", 0];
+        $files = \think\facade\Db::table("new_common_filetype")->where($where)->order("sn asc")->select();
+        $responseObj->code = 200;
+        $responseObj->fileList = $files;
+        $responseObj->fieldList = $field_tmp;
+        return json($responseObj);
+    }
+
     public function validateIsCheck() {
         $params = $this->request->param();
         $id = $params["id"];

+ 77 - 0
app/admin/view/talent/hospital/fst_verify.html

@@ -250,6 +250,11 @@
                                 <i class="fa fa-check"></i>&nbsp;审核
                             </button>
                             {/if}
+                            {if condition="chkCommission('/admin/talent/fst_batch_check','/talentInfo/firstBatchCheck')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.openBatchCheckModal()" id="">
+                                <i class="fa fa-check-circle-o"></i>&nbsp;批量审核
+                            </button>
+                            {/if}
                             {if condition="chkCommission('/admin/talent/fstVerifyListExport','/talentInfo/firstExport')"}
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentInfo.showExportModal(1)" id="">
                                 <i class="fa fa-file-excel-o"></i>&nbsp;导出
@@ -294,6 +299,78 @@
         </div>
     </div>
 </div>
+<!--批量审核-->
+<div class="modal fade " id="batchCheckModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel2">
+    <div class="modal-dialog modal-lg" role="document" style="min-width: 1200px;">
+        <div class="modal-content animated flipInY">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                <h4 class="modal-title" id="batchCheckModalLable">批量审核</h4>
+            </div>
+            <div class="modal-body">
+                <form class="form-horizontal" style="padding-bottom: 5px;">
+                    <div class="form-group-sm">
+                        <div class="row">
+                            <div class="rowGroup">
+                                <label class="col-sm-1 control-label">申报年度</label>
+                                <div class="col-sm-3 spacing">
+                                    <input type="text" class="form-control input-sm"  id="bc_apply_year" name="apply_year" >
+                                </div>
+                            </div>
+                            <div class="rowGroup">
+                                <label class="col-sm-1 control-label">姓名</label>
+                                <div class="col-sm-3 spacing">
+                                    <input type="text" class="form-control input-sm"  id="bc_name" name="name" >
+                                </div>
+                            </div>
+                            <div class="rowGroup">
+                                <label class="col-sm-1 control-label">医院名称</label>
+                                <div class="col-sm-3 spacing">
+                                    <select  class="form-control input-sm"  id="bc_enterprise_id" name="enterprise_id" >    
+                                        <option value="">请选择</option>
+                                        {volist name="enterprises" id="item"}
+                                        <option value="{$item.id}">{$item.name}</option>
+                                        {/volist}
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="rowGroup">
+                                <label class="col-sm-1 control-label">医共体</label>
+                                <div class="col-sm-3 spacing">
+                                    <select  class="form-control input-sm"  id="bc_medicalCommunityId" name="medicalCommunityId" >
+                                        <option value="">请选择</option>
+                                        {volist name="medicalCommunities" id="item"}
+                                        <option value="{$item.id}">{$item.name}</option>
+                                        {/volist}
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="rowGroup">
+                                <label class="col-sm-1 control-label">人才层次</label>
+                                <div class="col-sm-3 spacing">
+                                    <select  class="form-control input-sm"  id="bc_talent_arrange" name="talent_arrange" >
+                                        <option value="">请选择</option>
+                                    </select>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+                <div class="toolbar" style="padding-bottom: 5px;text-align: center">
+                    <button type="button" class="btn btn-sm btn-info" onclick="TalentInfo.bcSearch()"><i class="fa fa-search"></i>搜索</button>
+                    <button type="button" class="btn btn-sm btn-danger" onclick="TalentInfo.bcReset()"><i class="fa fa-trash"></i>重置</button>
+                    <button id="checkAllBatch" class="btn btn-secondary btn-sm btn-success"><i class="fa fa-check-square-o"></i>全选</button>
+                    <button id="uncheckAllBatch" class="btn btn-secondary btn-sm btn-danger"><i class="fa fa-ban"></i>取消全选</button>
+                </div>
+                <table id="batchCheckTable" class="table-condensed table-sm" style="font-size: 12px;"></table>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" id="batchCheckButton" onclick="TalentInfo.batchCheck()">批量审核</button>
+                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>
 <!--导出模态框-->
 <div class="modal fade " id="commonExportModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
     <div class="modal-dialog modal-lg" role="document" style="min-width: 1000px">

+ 40 - 0
app/common/api/VerifyApi.php

@@ -16,6 +16,46 @@ use app\common\model\TalentCondition;
  */
 class VerifyApi {
 
+    public static function getFstList($params) {
+        $where = [];
+        $order = $params["order"] ?: "desc";
+        $offset = $params["offset"] ?: 0;
+        $limit = $params["limit"] ?: 10;
+        $type = session("user")["type"];
+        if ($params["name"]) {
+            $where[] = ["ti.name", "like", "%{$params["name"]}%"];
+        }
+        if ($params["apply_year"]) {
+            $where[] = ["ti.apply_year", "like", "{$params["apply_year"]}%"];
+        }
+        if ($params["enterprise_id"]) {
+            $where[] = ["ti.enterprise_id", "=", $params["enterprise_id"]];
+        }
+        if ($params["medicalCommunityId"]) {
+            $where[] = ["e.medicalCommunityId", "=", $params["medicalCommunityId"]];
+        }
+        if ($params["talent_arrange"]) {
+            $where[] = ["ti.talent_arrange", "=", $params["talent_arrange"]];
+        }
+        $where[] = ["e.type", "=", $type];
+        $where[] = ["ti.checkState", "=", TalentState::SCND_SUBMIT];
+        $where[] = ["ti.delete", "=", 0];
+        $count = Talent::alias("ti")
+                        ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
+                        ->where($where)->count();
+        $list = Talent::alias("ti")
+                        ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
+                        ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,e.name as enterpriseName,e.isGeneral,e.medicalCommunityId")->select()->toArray();
+
+        $talent_arrange_kvs = DictApi::selectByParentCode("talent_arrange");
+        $medicalCommunity_kvs = Nhc::getMedicalCommunityMap();
+        foreach ($list as &$item) {
+            $item["talentArrangeName"] = $talent_arrange_kvs[$item["talent_arrange"]];
+            $item["medicalCommunityName"] = $item["medicalCommunityId"] ? $medicalCommunity_kvs[$item["medicalCommunityId"]] : null;
+        }unset($item);
+        return ["total" => $count, "rows" => $list];
+    }
+
     public static function getTalentInfoById($id, $isAdmin = false) {//添加admin只为区别导入数据管理端的显示差异
         $info = self::getOne($id);
         if ($info) {

+ 209 - 0
public/static/modular/talentIdentify/talentInfo/hospital/talentInfo_base.js

@@ -253,6 +253,138 @@ TalentInfo.openCheckTalentInfo = function () {
 }
 
 
+TalentInfo.commonColumns = function () {
+    return [
+        {field: "selectItem", checkbox: true},
+        {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', width: "10%"},
+        {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "15%"},
+        {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', width: "15%"},
+        {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: "15%"},
+        {title: '医院名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', width: "30%",
+            formatter: function (value, row, index) {
+                return value + (row.isGeneral == 1 ? "(总院)" : "");
+            }
+        },
+        {title: '所属医共体', field: 'medicalCommunityName', visible: true, align: 'center', valign: 'middle', width: "15%"}
+    ];
+}
+
+TalentInfo.openBatchCheckModal = function (type) {
+    var columns = TalentInfo.commonColumns();
+    $('#batchCheckTable').bootstrapTable('destroy');
+    $('#batchCheckTable').bootstrapTable({
+        url: Feng.ctxPath + "/admin/talent/find_fst_list",
+        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 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "client", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        pageNumber: 1, //初始化加载第一页,默认第一页
+        pageSize: 10, //每页的记录行数(*)
+        pageList: [10, 25, 50, 100, 500, 1000, 1500], //可供选择的每页的行数(*)
+        maintainSelected: true, //全表全选需要开启
+        showColumns: false,
+        responseHandler: function (res) {
+            $("#batchCheckModal").modal("show");
+            return res.obj.rows;
+        },
+        columns: columns
+    });
+}
+
+/**
+ * 刷新检索
+ */
+TalentInfo.bcSearch = function () {
+    var apply_year = $("#bc_apply_year").val();
+    var name = $("#bc_name").val();
+    var enterprise_id = $("#bc_enterprise_id").val();
+    var medicalCommunityId = $("#medicalCommunityId").val();
+    var talent_arrange = $("#bc_talent_arrange").val();
+    $('#batchCheckTable').bootstrapTable("refresh", {"query": {"name": name, "enterprise_id": enterprise_id, "talent_arrange": talent_arrange, "apply_year": apply_year, "medicalCommunityId": medicalCommunityId}});
+}
+
+/**
+ * 重置
+ */
+TalentInfo.bcReset = function () {
+    $("#bc_apply_year").val("");
+    $("#bc_name").val("");
+    $("#bc_enterprise_id").val("");
+    $("#medicalCommunityId").val("");
+    $("#bc_talent_arrange").val("");
+}
+
+$('#checkAllBatch').click(function () {
+    $("#batchCheckTable").bootstrapTable('togglePagination').bootstrapTable('checkAll').bootstrapTable('togglePagination');
+})
+$('#uncheckAllBatch').click(function () {
+    $("#batchCheckTable").bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
+})
+
+
+TalentInfo.batchCheck = function () {
+    var selected = $('#batchCheckTable').bootstrapTable('getSelections');
+    if (!selected || selected.length < 1) {
+        Feng.info("请至少选择一行数据!");
+        return;
+    }
+    var ids = "";
+    var count = 0;
+    for (var i = 0; i < selected.length; i++) {
+        count++;
+        ids = ids + selected[i].id + ",";
+    }
+
+    var ajax = new $ax("/admin/talent/findFieldsAndFilesForBatch", function (data) {
+        if (data.code == 200) {
+            var index = layer.open({
+                type: 1,
+                title: '审核',
+                area: ['800px', '450px'], //宽高
+                fix: false, //不固定
+                maxmin: true,
+                content: TalentInfo.createFirstCheckModal(),
+                btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+                btnAlign: 'c',
+                success: function (layero, index) {
+                    $("#batchCheckModal").modal("hide");
+                    //layer.setTop(layero);
+                    var html1 = '';
+                    if (typeof data.fieldList != "undefined" && data.fieldList.length > 0) {
+                        for (var key in data.fieldList) {
+                            html1 += '<li style="float:left;margin:0 10px 10px 0;"><input type="checkbox" value="' + data.fieldList[key]["key"] + '"><span>' + data.fieldList[key]["value"] + '</span></li>';
+                        }
+                    }
+
+                    var html2 = '';
+                    for (var key in data.fileList) {
+                        html2 = html2 + '<ul><li style="width: 100%"><input type="checkbox" value="' + data.fileList[key].id + '"><span>' + data.fileList[key].name + '</span></li></ul>';
+                    }
+                    $("#batchcount").html(count + "人");
+                    $("#checkMsg").text(data.checkMsg);
+                    $("#firstBatchCheckForm #field_info ul").css("overflow", "hidden").html(html1);
+                    $("#field_file").css("overflow", "hidden").empty().append(html2);
+                },
+                yes: function (index, layero) {
+
+                }
+            });
+        } else {
+            Feng.error(data.msg);
+        }
+    }, function (data) {
+        Feng.error("查询失败!" + data.responseJSON.message + "!");
+    });
+
+    ajax.start();
+}
 
 /**
  * 打开查看人才认定-初级审核详情
@@ -483,6 +615,83 @@ TalentInfo.setNotPass = function () {
 
 }
 
+TalentInfo.createFirstCheckModal = function () {
+    return '<form id="firstBatchCheckForm">\n' +
+            '                    <div class="form-group" style="margin: 10px;">\n' +
+            '                        <label for="checkState" class="control-label">审核人数</label>\n' +
+            '                        <div class="form-control" id="batchcount">\n' +
+            '                        </div>\n' +
+            '                    </div>\n' +
+            '                    <div class="form-group" style="margin: 10px;">\n' +
+            '                        <label for="checkState" class="control-label">审核状态</label>\n' +
+            '                        <select class="form-control" id="checkStateFirstModal" onchange="TalentInfo.toggleField()">\n' +
+            '                            <option value="">请选择</option>\n' +
+            '                            <option value="3">审核通过</option>\n' +
+            '                            <option value="2">审核驳回</option>\n' +
+            '                            <option value="-1">审核不通过</option>\n' +
+            '                        </select>\n' +
+            '                    </div>\n' +
+            '                    <div class="form-group" style="margin: 10px;">\n' +
+            '                        <label for="checkMsg" class="control-label" >审核意见</label>\n' +
+            '                        <textarea class="form-control" id="checkMsgFirst" placeholder="审核状态属“审核通过”的,仅代表此步骤已操作完成,不代表用户提交的信息符合认定条件。若不符合认定条件的,请写明不符合原因。" rows="6"></textarea>\n' +
+            '                        <div id="company_list" style="padding-top:5px;display:none;">\n' +
+            '                            <label for="checkMsg" class="control-label">选择需要再次审核的部门</label>\n' +
+            '                            <div id="companys">' +
+            '                               <ul style="overflow:hidden;list-style:none;"></ul>' +
+            '                            </div>' +
+            '                        </div>\n' +
+            '                        <div id="modify" style="padding-top: 5px;display: none">\n' +
+            '                            <label for="checkMsg" class="control-label">可修改字段</label>\n' +
+            '                            <div id="field_info">\n' +
+            '                                <ul style="overflow:hidden;list-style:none;">\n' +
+            '                                </ul>\n' +
+            '                            </div>\n' +
+            '                            <label for="checkMsg" class="control-label">可修改附件</label>\n' +
+            '                            <div id="field_file">\n' +
+            '                            </div>\n' +
+            '                            <div class="form-group" style="text-align: center">\n' +
+            '                                <button type="button" class="btn btn-primary" onclick="TalentInfo.bcCheckAll(this)">全选</button>\n' +
+            '                                <button type="button" class="btn btn-success" onclick="TalentInfo.bcUnCheckAll(this)">反选</button>\n' +
+            '                            </div>\n' +
+            '                        </div>\n' +
+            '                    </div>\n' +
+            '                </form>';
+
+}
+
+
+TalentInfo.bcCheckAll = function (context) {
+    $("#modify input[type=checkbox]").prop("checked", "checked");
+}
+TalentInfo.bcUnCheckAll = function (context) {
+    $("#modify input[type=checkbox]").removeAttr("checked");
+}
+
+/**
+ * 显示字段或者隐藏字段选择
+ */
+TalentInfo.toggleField = function () {
+    var checkState = $("#checkStateFirstModal").val();
+    var checkMsgFirst = $("#checkMsgFirst").val();
+    $("#company_list").hide();
+    if (checkState == 2 || checkState == 6) {
+        $("#modify").show();
+        $("#checkMsgFirst").val("");
+    } else if (checkState == 3 || checkState == 4 || checkState == 5) {
+        $("#modify").hide();
+        $("#modify").find("input[type=checkbox]").removeAttr("checked");
+        if (checkMsgFirst == null || checkMsgFirst == '' || checkMsgFirst == "等待部门审核") {
+            $("#checkMsgFirst").val("审核通过");
+        }
+        if (checkState == 5) {
+            $("#company_list").show();
+        }
+    } else if (checkState == -1) {
+        $("#modify").hide();
+        $("#checkMsgFirst").val("审核不通过");
+    }
+}
+
 
 TalentInfo.creatFieldCheckModal = function () {
     return '<form id="firstCheckForm">\n' +

+ 3 - 0
public/static/modular/talentIdentify/talentInfo/talentInfo_common.js

@@ -221,6 +221,9 @@ TalentInfo.init = function () {
         {"name": "source", "code": "source"},
         {"name": "street", "code": "street"},
         {"name": "enterprise_tag", "code": "enterprise_tag"}, ];
+    if($("#bc_talent_arrange").length > 0){
+        arr.push({"name": "bc_talent_arrange", "code": "talent_arrange"});
+    }
     Feng.findChildDictBatch(JSON.stringify(arr));
     //TalentInfo.getIdentifyCondition();
     TalentInfo.getProvince();