/** * 人才认定申报管理初始化 */ var TalentInfo = { id: "TalentInfoTable", //表格id seItem: null, //选中的条目 table: null, layerIndex: -1 }; /** * 初始化表格的列 */ TalentInfo.initColumn = function () { return [ {field: 'selectItem', checkbox: true}, {title: '申报年度', field: 'apply_year', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"}, {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: "100px", formatter: function (value, row, index) { if (row.sex == 1) { return value + '【男】'; } if (row.sex == 2) { return value + '【女】'; } } }, {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: '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) { console.log(value, row.real_state, row.last_state) if (typeof row.deptCheckState != "undefined") { if ((row.deptActive == 0 && row.real_state == 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 == 1) { if (row.real_state == 4) { return "审核驳回" } if (row.real_state == 11) { return "初审驳回" } } if (value == 2) { if (row.last_state == 4) { return "待审核(重新提交)" } if (row.real_state == 6) { return "复审驳回" } return "待审核" } if (value == 3) { return "待初审" } if (value == 5) { return "复审通过" } if (value == 10) { return "待上级审核"; } if (value == 8) { if (row.real_state == 11) { return "初审驳回" } else { return "保存未提交" } } if (value == 9) { if (row.real_state == 13) { return "部门并审驳回"; } else if (row.real_state == 15) { return "复审驳回"; } else { 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) { 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 () { if (this.check()) { var index = layer.open({ type: 2, title: '优秀人才审核', area: ['800px', '420px'], //宽高 fix: false, //不固定 maxmin: true, shade: 0, content: '/enterprise/talent/examinePage/id/' + TalentInfo.seItem.id, 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.creatFieldCheckModal = function () { return '
'; } 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"); } } $(function () { var defaultColunms = TalentInfo.initColumn(); var process = $("#process").val(); var table = new BSTable(TalentInfo.id, "/enterprise/talent/examineList", 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(); });