/** * 人才认定申报管理初始化 */ var TalentInfo = { id: "TalentInfoTable", //表格id seItem: null, //选中的条目 table: null, layerIndex: -1 }; /** * 初始化表格的列 */ TalentInfo.initColumn = function () { var type = $("#type").val(); var superpriv = $("#superpriv").val(); var process = $("#process").val(); var isShow = true; var isShowVerifyDept = false; if (type == 2) { isShow = false; } isShowVerifyDept = process == 4 && superpriv ? true : false; return [ {field: 'selectItem', checkbox: true}, {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"}, {title: '企业名称', field: 'enterprise_name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"}, {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px", formatter: function (value, row, index) { if (row.sex == 1) { return value + '【男】'; } if (row.sex == 2) { return value + '【女】'; } } }, {title: '单位标签', field: 'enterprise_tag', visible: isShow, align: 'center', valign: 'middle', width: "120px", 'class': 'uitd_showTip'}, {title: '证件号码', field: 'card_number', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"}, {title: '认定层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"}, {title: '认定条件', field: 'talentConditionName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px"}, {title: '审核部门', field: 'verifyDepts', visible: isShowVerifyDept, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "150px", formatter: function (value, row, index) { var html = ""; for (var i in value) { let checkState = ""; if (value[i].active == 1) { if (value[i].checkState == 9) { checkState = "审核驳回"; } if (value[i].checkState == 12) { checkState = "审核通过"; } } else { checkState = "待审核"; } html += "

" + value[i].name + "(" + checkState + ")

" } return html } }, {title: '首次提交时间', field: 'first_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"}, {title: '最新提交时间', field: 'new_submit_time', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"}, {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px", formatter: function (value, row, index) { if (typeof row.deptCheckState != "undefined") { if ((row.deptActive == 0 && row.realState == 10) || !row.deptActive) { if (row.resubmit) { return "待部门并审(重新提交)"; } else { return "待部门并审(首次提交)"; } } if (row.deptActive == 1 && row.newState == 12) { return "部门并审通过"; } if (row.deptActive == 1 && row.newState == 9) { return "部门并审驳回"; } } else { if (value == 2) { if (row.lastState == 4) { return "待审核(重新提交)" } if (row.realState == 6) { return "复审驳回" } return "待审核" } if (value == 3) { return "待复审" } if (value == 5) { return "复审通过" } if (value == 10) { if (process == 3) { if (row.pass_dept_check == 1) { return "初审通过(待复审)" } return "初审通过(待部门并审)" } if (process == 4) { if (row.resubmit) { return "待部门并审(重新提交)"; } else { return "待部门并审(首次提交)"; } } if (row.resubmit) { return "待复审(重新提交)"; } else { return "待复审(首次提交)"; } } if (value == 8) { if (row.realState == 11) { return "初审驳回" } else { return "保存未提交" } } if (value == 9) { if (row.realState == 13) { if (process == 3) { return "待初审(部门并审驳回)"; } return "部门并审驳回"; } else if (row.realState == 15) { if (process == 3) { return "待初审(复审驳回)"; } return "复审驳回"; } else { if (row.lastState == 11) { return "待初审(重新提交)" } return "待初审(首次提交)" } } if (value == -2) { return "初审不通过" } if (value == 16) { return "复审不通过" } if (value == -1 || value == 7) { return "审核不通过" } if (value == 4) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) { return "上级驳回" } else { return "待审核" } } if (value == 11) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 3) { return "上级驳回" } else { return "待审核" } } if (value == 12) { if (process == 4) { return "部门并审通过"; } if (process == 3) { return "待复审(部门并审通过)"; } if (row.resubmit) { return "待复审(重新提交)"; } else { return "待复审(首次提交)"; } } if (value == 13) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 4) { return "上级驳回" } else { return "待审核" } } if (value == 14) { return "复审通过" } if (value == 15) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 5) { return "上级驳回" } else { return "待审核" } } } } }, {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px", formatter: function (value, row, index) { return "" + "日志" + ""; } } ]; }; /** * 检查是否选中 */ TalentInfo.check = function () { var selected = $('#' + this.id).bootstrapTable('getSelections'); if (selected.length != 1) { Feng.info("请先选中表格中的某一记录!"); return false; } else { TalentInfo.seItem = selected[0]; return true; } }; TalentInfo.openCheckTalentInfo = function () { var title = $("#title").val(); var process = $("#process").val(); if (this.check()) { var index = layer.open({ type: 2, title: '人才认定' + " - " + title, area: ['800px', '420px'], //宽高 fix: false, //不固定 maxmin: true, shade: 0, content: '/admin/talent/common_check/id/' + TalentInfo.seItem.id + '/process/' + process, btn: ['  保存未提交', '  提交审核', '  关闭'], btnAlign: 'c', btn1: function (index, layero) { var obj = layero.find("iframe")[0].contentWindow; obj.TalentInfoInfoDlg.showFirstCheckModal(); }, btn2: function (index, layero) { var obj = layero.find("iframe")[0].contentWindow; obj.TalentInfoInfoDlg.submitCheck(); return false; } }); layer.full(index); TalentInfo.layerIndex = index; } } /** * 打开查看人才认定-初级审核详情 */ TalentInfo.openTalentInfoDetail = function () { if (this.check()) { var index = layer.open({ type: 2, title: '人才认定申报详情', area: ['800px', '420px'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/talentInfo/talentInfo_toDetail/' + TalentInfo.seItem.id + '/1' }); layer.full(index); TalentInfo.layerIndex = index; } }; TalentInfo.cancleThirdCheck = function () { if (this.check()) { var index = layer.open({ type: 1, title: '撤销复核', area: ['800px', '420px'], //宽高 fix: false, //不固定 maxmin: true, content: '
\n' + '
\n' + ' \n' + ' \n' + '
\n' + '
', btn: ['  提交', '  关闭'], yes: function (index, layero) { var cancleMsg = $("#msg").val(); if (Feng.isEmptyStr(cancleMsg)) { Feng.error("撤销原因不能为空"); return; } var operation = function () { var ajax = new $ax(Feng.ctxPath + "/admin/talent/cancleThirdCheck", function (data) { if (data.code == 200) { Feng.success(data.msg); TalentInfo.table.refresh(); layer.close(index); } else { Feng.error(data.msg); } locked = false; }, function (data) { Feng.error("撤销复核失败!" + data.responseJSON.message + "!"); locked = false; }); ajax.setData({"id": TalentInfo.seItem.id, "checkMsg": cancleMsg}) ajax.start(); }; Feng.confirm("一旦提交无法修改,确定要撤销吗?", operation); } }); } } /** * 修改驳回的字段及附件 */ TalentInfo.updateFieldsAndFiles = function () { if (this.check()) { var ajax = new $ax("/admin/talent/findFieldsAndFiles?id=" + TalentInfo.seItem.id, function (data) { if (data.code == 200) { layer.open({ type: 1, id: "neewFieldFormModel", title: '修改', area: ['800px', '450px'], //宽高 fix: false, //不固定 shade: 0, maxmin: true, content: TalentInfo.creatFieldCheckModal(), btn: ['  提交', '  关闭'], btnAlign: 'c', zIndex: layer.zIndex, success: function (layero, index) { var html1 = ''; if (typeof data.fieldList != "undefined" && data.fieldList.length > 0) { for (var key in data.fieldList) { html1 += '
  • ' + data.fieldList[key]["value"] + '
  • '; } } var html2 = ''; for (var key in data.fileList) { html2 = html2 + ''; } $("#firstCheckForm #field_info ul").css("overflow", "hidden").html(html1); $("#field_file").css("overflow", "hidden").empty().append(html2); //$("#field_file").empty().append(html); if (data.select.fields != null && data.select.fields != '') { $("#firstCheckForm #field_info li input").each(function () { if (data.select.fields.indexOf($(this).val()) != -1) { this.checked = true; } }); } if (data.select.files != null && data.select.files != '') { $("#field_file input").each(function () { if (data.select.files.indexOf($(this).val()) != -1) { this.checked = true; } }); } }, yes: function (index, layero) { TalentInfo.submitFieldsAndFiles(index, data.id); } }); } else { Feng.error(data.msg); } }, function (data) { Feng.error("查询失败!" + data.responseJSON.message + "!"); }); ajax.start(); } } /** * 修改提交 * @param index * @param id */ TalentInfo.submitFieldsAndFiles = function (index, id) { var fields = ''; var files = ''; $("#firstCheckForm #field_info li input").each(function (index) { if ($(this).is(":checked")) { fields = fields + $(this).val() + ","; } }); $("#field_file li input").each(function (index) { if ($(this).is(":checked")) { files = files + $(this).val() + ","; } }); if (fields == '' && files == '') { Feng.info("请选择可修改的字段或附件!"); return; } var ajax = new $ax("/admin/talent/updateFieldsAndFiles", function (data) { if (data.code == 200) { layer.close(index); Feng.success(data.msg); } else { Feng.error(data.msg); } }, function (data) { Feng.error("修改失败!" + data.responseJSON.message + "!"); }); ajax.setData({"id": id, "fields": fields, "files": files}) ajax.start(); } /** * 审核不通过 */ TalentInfo.setNotPass = function () { var selecteds = $('#' + this.id).bootstrapTable('getSelections'); if (selecteds.length == 0) { Feng.info("请选择需要设置审核不通过的行"); return; } var ids = ""; for (var key in selecteds) { ids = ids + selecteds[key].id + ","; } ids = ids.substring(0, ids.length - 1); layer.open({ type: 1, id: "notPassModal", title: '修改', area: ['800px', '450px'], //宽高 fix: false, //不固定 shade: 0, maxmin: true, content: '
    \n' + '
    \n' + ' \n' + ' \n' + '
    \n' + '
    ', btn: ['  提交', '  关闭'], btnAlign: 'c', zIndex: layer.zIndex, yes: function (index, layero) { var checkMsg = $("#checkMsgNotPass").val(); if (Feng.isEmptyStr(checkMsg)) { Feng.info("请填写审核不通过原因"); return; } var operation = function () { var ajax = new $ax("/admin/talent/cancel_verify", function (data) { if (data.code == 200) { Feng.success(data.msg); TalentInfo.table.refresh(); layer.close(index); } else { Feng.error(data.msg); } }, function (data) { Feng.error("设置审核不通过失败!" + data.responseJSON.message + "!"); }); ajax.set("ids", ids); ajax.set("msg", checkMsg); ajax.start(); } Feng.confirm("一旦提交无法修改,确定设置所选数据为审核不通过?", operation); } }); } TalentInfo.creatFieldCheckModal = function () { return '
    \n' + '
    \n' + '
    \n' + ' \n' + '
    \n' + '
      \n' + '
    • 姓名
    • \n' + '
    • 性别
    • \n' + '
    • 出生日期
    • \n' + '
    • 国籍/地区
    • \n' + '
    • 籍贯省
    • \n' + '
    • 籍贯市
    • \n' + '
    • 籍贯县
    • \n' + '
    • 民族
    • \n' + '
    • 政治面貌
    • \n' + '
    • 证件类型
    • \n' + '
    • 证件号码
    • \n' + '
    • 首次来晋工作时间
    • \n' + '
    • 申报来源
    • \n' + '
    • 公布入选来源
    • \n' + '
    • 入选来源县市
    • \n' + '
    • 入选名单的文件号及批次
    • \n' + '
    • 泉州高层次人才证书发证日期
    • \n' + '
    • 泉州高层次人才证书的有效期
    • \n' + '
    • 人才层次
    • \n' + '
    • 认定条件
    • \n' + '
    • 认定条件名称
    • \n' + '
    • 认定条件证书取得时间
    • \n' + '
    • 人才标签
    • \n' + '
    • 首次来晋行政介绍信时间
    • \n' + '
    • 引进方式
    • \n' + '
    • 本单位入职时间
    • \n' + '
    • 职务
    • \n' + '
    • 工作合同开始时间
    • \n' + '
    • 工作合同结束时间
    • \n' + '
    • 上一年度年薪
    • \n' + '
    • 最高学历
    • \n' + '
    • 毕业院校
    • \n' + '
    • 专业
    • \n' + '
    • 职称
    • \n' + '
    • 国家职业资格
    • \n' + '
    • 是否有留学经历
    • \n' + '
    • 手机号码
    • \n' + '
    • 电子邮箱
    • \n' + '
    • 开户银行
    • \n' + '
    • 开户银行网点
    • \n' + '
    • 银行行号
    • \n' + '
    • 银行账号
    • \n' + '
    • 曾被相关主管部门列为失信个人
    • \n' + '
    • 教育背景及工作简历
    • \n' + '
    • 主要业绩及取得的荣誉
    • \n' + '
    \n' + '
    \n' + ' \n' + '
    \n' + '
    \n' + '
    \n' + ' \n' + ' \n' + '
    \n' + '
    \n' + '
    \n' + '
    '; } TalentInfo.fieldCheckd = function (context) { if ($(context).get(0).checked) { $(context).parent().next().children()[0].checked = true; $(context).parent().next().children().eq(0).trigger("change"); } } TalentInfo.sourceCheckd = function (context) { if ($(context).get(0).checked) { $("#talentArrangeCheckBox").attr("checked", true); $("#talentArrangeCheckBox").trigger("change"); } } TalentInfo.getPhones = function () { var process = $("#process").val(); var ajax = new $ax("/admin/talent/getPhones/process/" + process, function (data) { if (data.code == 200) { layer.open({ type: 1, title: "手机号码", area: ['830px', '300px'], //宽高 fix: false, //不固定 maxmin: true, content: "" + data.obj + "" }); } else { Feng.info(data.msg); } }, function (data) { Feng.error("操作失败!"); }); ajax.setData(TalentInfo.formParams()); ajax.start(); } TalentInfo.getEnterprisePhones = function () { var process = $("#process").val(); var ajax = new $ax("/admin/talent/getEnterprisePhones/process/" + process, function (data) { if (data.code == 200) { layer.open({ type: 1, title: "手机号码", area: ['830px', '300px'], //宽高 fix: false, //不固定 maxmin: true, content: "" + data.obj + "" }); } else { Feng.info(data.msg); } }, function (data) { Feng.error("操作失败!"); }); ajax.setData(TalentInfo.formParams()); ajax.start(); } $(function () { var defaultColunms = TalentInfo.initColumn(); var process = $("#process").val(); var table = new BSTable(TalentInfo.id, "/admin/talent/base_verify_list/process/" + process, defaultColunms); table.setPaginationType("server"); table.setSingleSelect(false); table.setOnDblClickRow(function () { TalentInfo.openCheckTalentInfo(); }); TalentInfo.table = table.init(); TalentInfo.init(); // var defaultColunms = TalentInfo.initColumn(); // var table = new KDTable(TalentInfo.id, "/talentInfo/list/1", defaultColunms); // table.setPaginationType("server"); // TalentInfo.table = table.init(); });