talentInfo_before.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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: 'beforeCheckCompanyName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"},
  22. {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle',width:'80px'},
  23. {title: '企业名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"},
  24. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px",
  25. formatter : function(value,row,index){
  26. if(row.sex==1){
  27. return value+'<span style="color:#6495ED">【男】</span>';
  28. }if(row.sex==2){
  29. return value+'<span style="color:#FF82AB">【女】</span>';
  30. }
  31. }
  32. },
  33. {title: '人才类别', field: 'type', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"140px",
  34. formatter : function (value,row,index){
  35. if(value==1){
  36. return '<span style="color:#6495ED">晋江市现代产业体系人才</span>';
  37. }if(value==2){
  38. return '<span style="color:#FF82AB">集成电路优秀人才</span>';
  39. }
  40. }
  41. },
  42. {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:"100px"},
  43. {title: '人才标签', field: 'talentTypeName', visible: isShow, align: 'center', valign: 'middle',width:"120px",'class': 'uitd_showTip'},
  44. {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"150px"},
  45. {title: '认定条件', field: 'identifyConditionText', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"},
  46. {title: '认定条件名称', field: 'identifyConditionName', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"120px"},
  47. {title: '获得时间', field: 'identifyGetTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
  48. {title: '首次提交时间', field: 'firstSubmitTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
  49. {title: '最新提交时间', field: 'newSubmitTime', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"100px"},
  50. {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle',width:"120px",
  51. formatter : function (value,row,index) {
  52. if(value==-1){
  53. return "<span class='label label-warning-light'>审核不通过</span>";
  54. }
  55. if(row.firstBeforeSubmitTime==null || row.firstBeforeSubmitTime==''){
  56. if(value==1){
  57. return "<span class='label'>待提交</span>"
  58. }if(value==3){
  59. if(row.highProcess!=null && row.highProcess!=''){
  60. return "<span class='label label-success'>重新提交</span>"
  61. }else{
  62. return "<span class='label label-success'>待审核</span>"
  63. }
  64. }if(value==5){
  65. return "<span class='label label-danger'>已驳回</span>"
  66. }
  67. }else{
  68. return "<span class='label label-primary'>已通过</span>"
  69. }
  70. }
  71. },
  72. {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"80px",
  73. formatter : function (value,row,index){
  74. return "<span class='label label-success' onclick=\"TalentInfo.showLog('"+value+"')\" >" +
  75. "<i class=\"fa fa-book\"></i>日志" +
  76. "</span>";
  77. }
  78. }
  79. ];
  80. };
  81. /**
  82. * 检查是否选中
  83. */
  84. TalentInfo.check = function () {
  85. var selected = $('#' + this.id).bootstrapTable('getSelections');
  86. if(selected.length == 0){
  87. Feng.info("请先选中表格中的某一记录!");
  88. return false;
  89. }else{
  90. TalentInfo.seItem = selected[0];
  91. return true;
  92. }
  93. };
  94. TalentInfo.openCheckTalentInfo = function (){
  95. if (this.check()) {
  96. var index = layer.open({
  97. type: 2,
  98. title: '人才认定-初级审核',
  99. area: ['800px', '420px'], //宽高
  100. fix: false, //不固定
  101. maxmin: true,
  102. content: Feng.ctxPath + '/talentInfo/talentInfo_toCommonCheck/' + TalentInfo.seItem.id + '/-1',
  103. btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交','<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交审核' ,'<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  104. btnAlign: 'c',
  105. btn1: function (index, layero) {
  106. var obj = layero.find("iframe")[0].contentWindow;
  107. obj.TalentInfoInfoDlg.showCommonCheckModal();
  108. },btn2: function(index, layero){
  109. var obj = layero.find("iframe")[0].contentWindow;
  110. obj.TalentInfoInfoDlg.submitCheck();
  111. return false;
  112. }
  113. });
  114. layer.full(index);
  115. this.layerIndex = index;
  116. }
  117. }
  118. /**
  119. * 打开查看人才认定-初级审核详情
  120. */
  121. TalentInfo.openTalentInfoDetail = function () {
  122. if (this.check()) {
  123. var index = layer.open({
  124. type: 2,
  125. title: '人才认定申报详情',
  126. area: ['800px', '420px'], //宽高
  127. fix: false, //不固定
  128. maxmin: true,
  129. content: Feng.ctxPath + '/talentInfo/talentInfo_toDetail/' + TalentInfo.seItem.id+'/1'
  130. });
  131. layer.full(index);
  132. this.layerIndex = index;
  133. }
  134. };
  135. $(function () {
  136. var defaultColunms = TalentInfo.initColumn();
  137. var table = new BSTable(TalentInfo.id, "/talentInfo/list/-1", defaultColunms);
  138. table.setPaginationType("server");
  139. table.setOnDblClickRow(function () {
  140. TalentInfo.openCheckTalentInfo();
  141. });
  142. var t = TalentInfo.table = table.init();
  143. TalentInfo.init();
  144. });