/** * 人才认定申报管理初始化 */ var TalentInfo = { id: "TalentInfoTable", //表格id seItem: null, //选中的条目 table: null, layerIndex: -1 }; /** * 初始化表格的列 */ TalentInfo.initColumn = function () { var type = $("#type").val(); var isShow = true; if (type == 2) { isShow = false; } ; return [ {field: 'selectItem', checkbox: true}, {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: "120px", formatter: function (value, row, index) { if (row.sex == 1) { return value + '【男】'; } if (row.sex == 2) { return value + '【女】'; } } }, {title: '人才类型', field: 'talent_type', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"}, {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: "150px"}, {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', width: "100px", formatter: function (value, row, index) { if (typeof row.deptCheckState != "undefined") { if (row.deptCheckState == 9) { return "部门已通过" } else if (row.deptCheckState == 6) { if (row.lastState == 10) { return "待重新审核" } else { return "部门已驳回" } } else { return "待审核" } } else { if (value == 2) { if (row.lastState == 4) { return "待审核(重新提交)" } return "待审核" } if (value == 7) { return "待审核" } if (value == 6) { if (row.realState == 10) { return "部门驳回" } else if (row.realState == 12) { return "复核驳回" } else { if (row.lastState == 8) { return "待审核(重新提交)" } return "待审核" } } if (value == 13 || value == -1 || value == -2) { return "审核不通过" } if (value == 4) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) { return "上级驳回" } else { return "待审核" } } if (value == 8) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 2) { return "上级驳回" } else { return "待审核" } } if (value == 9) { return "待复审" } if (value == 10) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 3) { return "上级驳回" } else { return "待审核" } } if (value == 11) { return "已通过" } if (value == 12) { if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 4) { 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(); if (this.check()) { var index = layer.open({ type: 2, title: '人才认定' + " - " + title, area: ['800px', '420px'], //宽高 fix: false, //不固定 maxmin: true, content: '/admin/talent/common_check/id/' + TalentInfo.seItem.id + '/1', 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.updateFieldsAndFiles = function () { if (this.check()) { var ajax = new $ax("/admin/talent/findFieldsAndFiles?id=" + TalentInfo.seItem.id, function (data) { var obj = data.obj.obj; 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 fileList = data.obj.fileList; var html = ''; for (var key in fileList) { html = html + '