talentInfo_dep.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /**
  2. * 人才认定申报管理初始化
  3. */
  4. var TalentInfo = {
  5. id: "TalentInfoTable", //表格id
  6. seItem: null, //选中的条目
  7. table: null,
  8. layerIndex: -1
  9. };
  10. /**
  11. * 初始化表格的列
  12. */
  13. TalentInfo.initColumn = function () {
  14. var type = $("#type").val();
  15. var isShow = true;
  16. if(type==2){
  17. isShow = false;
  18. };
  19. return [
  20. {field: 'selectItem', radio: true},
  21. {title: '审核单位', field: 'companyName', visible: true, align: 'center', valign: 'middle',width:'10%','class': 'uitd_showTip'},
  22. {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle',width:'80px'},
  23. {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle',width:'10%','class': 'uitd_showTip'},
  24. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:'10%','class': 'uitd_showTip',
  25. formatter : function(value,row,index){
  26. if(row.sex==1){
  27. return value+'<span style="color:#6495ED">【男】</span>';
  28. }
  29. if(row.sex==2){
  30. return value+'<span style="color:#FF82AB">【女】</span>';
  31. }
  32. }
  33. },
  34. {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:'','class': 'uitd_showTip'},
  35. {title: '人才标签', field: 'talentTypeName', visible: isShow, align: 'center', valign: 'middle',width:'','class': 'uitd_showTip'},
  36. {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:'','class': 'uitd_showTip'},
  37. {title: '认定条件', field: 'identifyConditionText', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:''},
  38. {title: '认定条件名称', field: 'identifyConditionName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:''},
  39. {title: '获得时间', field: 'identifyGetTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:''},
  40. {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
  41. {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
  42. {title: '审核状态', field: 'depState', visible: true, align: 'center', valign: 'middle',width:'100px',
  43. formatter : function (value,row,index) {
  44. if(value == 1){
  45. if(row.highProcess!=null && row.highProcess!='' && row.highProcess>=2){
  46. return "<span class='label label-success'>重新提交</span>"
  47. }
  48. return "<span class='label label-success'>待审核</span>"
  49. }if(value == 2){
  50. return "<span class='label label-danger'>已驳回</span>"
  51. }if(value == 3){
  52. return "<span class='label label-primary'>已通过</span>"
  53. }if(value == 4){
  54. return "<span class='label label-warm'>上级驳回</span>"
  55. }if(value == 9){
  56. return "<span class='label label-primary'>重新提交</span>"
  57. }
  58. }
  59. },
  60. {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',
  61. formatter : function (value,row,index){
  62. return "<span class='label label-success' onclick=\"TalentInfo.showLog('"+value+"','"+row.companyId+"')\" >" +
  63. "<i class=\"fa fa-book\"></i>日志" +
  64. "</span>";
  65. }
  66. }
  67. ];
  68. };
  69. /**
  70. * 检查是否选中
  71. */
  72. TalentInfo.check = function () {
  73. var selected = $('#' + this.id).bootstrapTable('getSelections');
  74. if(selected.length == 0){
  75. Feng.info("请先选中表格中的某一记录!");
  76. return false;
  77. }else{
  78. TalentInfo.seItem = selected[0];
  79. return true;
  80. }
  81. };
  82. TalentInfo.openCheckTalentInfo = function (){
  83. if (this.check()) {
  84. var index = layer.open({
  85. type: 2,
  86. title: '人才认定-部门审核',
  87. area: ['800px', '420px'], //宽高
  88. fix: false, //不固定
  89. maxmin: true,
  90. content: Feng.ctxPath + '/talentInfo/talentInfo_toDepCheck/' + TalentInfo.seItem.id + '/' + TalentInfo.seItem.companyId,
  91. btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;保存未提交','<i class="fa fa-check"></i>&nbsp;&nbsp;提交审核' ,'<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  92. btnAlign: 'c',
  93. btn1: function (index, layero) {
  94. var obj = layero.find("iframe")[0].contentWindow;
  95. obj.TalentInfoInfoDlg.showCommonCheckModal();
  96. },btn2: function(index, layero){
  97. var obj = layero.find("iframe")[0].contentWindow;
  98. obj.TalentInfoInfoDlg.submitCheck();
  99. return false;
  100. }
  101. });
  102. layer.full(index);
  103. TalentInfo.layerIndex = index;
  104. }
  105. }
  106. /**
  107. * 打开查看人才认定-初级审核详情
  108. */
  109. TalentInfo.openTalentInfoDetail = function () {
  110. if (this.check()) {
  111. var index = layer.open({
  112. type: 2,
  113. title: '部门审核查看',
  114. area: ['800px', '420px'], //宽高
  115. fix: false, //不固定
  116. maxmin: true,
  117. content: Feng.ctxPath + '/talentInfo/talentInfo_toDepDetail/' + TalentInfo.seItem.id+ '/' + TalentInfo.seItem.companyId
  118. });
  119. layer.full(index);
  120. TalentInfo.layerIndex = index;
  121. }
  122. };
  123. $(function () {
  124. var defaultColunms = TalentInfo.initColumn();
  125. var table = new BSTable(TalentInfo.id, "/talentInfo/list/2", defaultColunms);
  126. table.setPaginationType("server");
  127. table.setOnDblClickRow(function () {
  128. TalentInfo.openCheckTalentInfo();
  129. });
  130. var t = TalentInfo.table = table.init();
  131. TalentInfo.init();
  132. });