/** * 人才认定申报管理初始化 */ 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', radio: true}, {title: '审核单位', field: 'beforeCheckCompanyName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"}, {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+'【男】'; }if(row.sex==2){ return value+'【女】'; } } }, {title: '人才类别', field: 'type', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"140px", formatter : function (value,row,index){ if(value==1){ return '晋江市现代产业体系人才'; }if(value==2){ return '集成电路优秀人才'; } } }, {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:"100px"}, {title: '人才标签', field: 'talentTypeName', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'}, {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"150px"}, {title: '认定条件', field: 'identifyConditionText', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"}, {title: '认定条件名称', field: 'identifyConditionName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"}, {title: '获得时间', field: 'identifyGetTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"}, {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:"120px", formatter : function (value,row,index) { if(value==-1){ return "审核不通过"; } if(row.firstBeforeSubmitTime==null || row.firstBeforeSubmitTime==''){ if(value==1){ return "待提交" }if(value==3){ if(row.highProcess!=null && row.highProcess!=''){ return "重新提交" }else{ return "待审核" } }if(value==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 == 0){ 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, content: Feng.ctxPath + '/talentInfo/talentInfo_toCommonCheck/' + TalentInfo.seItem.id + '/-1', btn: ['  保存未提交','  提交审核' ,'  关闭'], btnAlign: 'c', btn1: function (index, layero) { var obj = layero.find("iframe")[0].contentWindow; obj.TalentInfoInfoDlg.showCommonCheckModal(); },btn2: function(index, layero){ var obj = layero.find("iframe")[0].contentWindow; obj.TalentInfoInfoDlg.submitCheck(); return false; } }); layer.full(index); this.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); this.layerIndex = index; } }; $(function () { var defaultColunms = TalentInfo.initColumn(); var table = new BSTable(TalentInfo.id, "/talentInfo/list/-1", defaultColunms); table.setPaginationType("server"); table.setOnDblClickRow(function () { TalentInfo.openCheckTalentInfo(); }); var t = TalentInfo.table = table.init(); TalentInfo.init(); });