livingAllowanceInfo.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /**
  2. * 硕博人才生活补贴申报管理初始化
  3. */
  4. var LivingAllowanceInfo = {
  5. id: "LivingAllowanceInfoTable", //表格id
  6. seItem: null, //选中的条目
  7. table: null,
  8. layerIndex: -1
  9. };
  10. /**
  11. * 初始化表格的列
  12. */
  13. LivingAllowanceInfo.initColumn = function () {
  14. return [
  15. {field: 'selectItem', radio: true},
  16. {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: '80px'},
  17. {
  18. title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "100px",
  19. formatter: function (value, row, index) {
  20. return row.sex == 1 ? value + '<span style="color:#6495ED">【男】</span>' : value + '<span style="color:#FF82AB">【女】</span>';
  21. }
  22. },
  23. // {title: '人才类别', field: 'type', visible: true, align: 'center', valign: 'middle',width:"100px",
  24. // formatter : function (value,row,index){
  25. // return value == 1?"晋江市现代产业体系人才":"集成电路优秀人才";
  26. // }
  27. // },
  28. {
  29. title: '人才标签',
  30. field: 'talentTypeName',
  31. visible: true,
  32. align: 'center',
  33. valign: 'middle',
  34. 'class': 'uitd_showTip',
  35. width: "100px"
  36. },
  37. {
  38. title: '证件号码',
  39. field: 'idCard',
  40. visible: true,
  41. align: 'center',
  42. valign: 'middle',
  43. 'class': 'uitd_showTip',
  44. width: "150px"
  45. },
  46. {
  47. title: '企业名称',
  48. field: 'enterpriseName',
  49. visible: true,
  50. align: 'center',
  51. valign: 'middle',
  52. 'class': 'uitd_showTip',
  53. width: "100px"
  54. },
  55. {
  56. title: '最高学历',
  57. field: 'highEducation',
  58. visible: true,
  59. align: 'center',
  60. valign: 'middle',
  61. 'class': 'uitd_showTip',
  62. width: "100px"
  63. },
  64. {
  65. title: '毕业学校',
  66. field: 'graduateSchool',
  67. visible: true,
  68. align: 'center',
  69. valign: 'middle',
  70. 'class': 'uitd_showTip',
  71. width: "100px"
  72. },
  73. {
  74. title: '手机号码',
  75. field: 'phone',
  76. visible: true,
  77. align: 'center',
  78. valign: 'middle',
  79. 'class': 'uitd_showTip',
  80. width: "100px"
  81. },
  82. {
  83. title: '本单位入职时间',
  84. field: 'entryTime',
  85. visible: true,
  86. align: 'center',
  87. valign: 'middle',
  88. 'class': 'uitd_showTip',
  89. width: "100px"
  90. },
  91. {
  92. title: '首次来晋工作时间',
  93. field: 'firstInJJTime',
  94. visible: true,
  95. align: 'center',
  96. valign: 'middle',
  97. 'class': 'uitd_showTip',
  98. width: "100px"
  99. },
  100. {
  101. title: '申请次数',
  102. field: 'applyCount',
  103. visible: true,
  104. align: 'center',
  105. valign: 'middle',
  106. 'class': 'uitd_showTip',
  107. width: "100px"
  108. },
  109. {
  110. title: '审核状态',
  111. field: 'checkStateName',
  112. visible: true,
  113. align: 'center',
  114. valign: 'middle',
  115. 'class': 'uitd_showTip',
  116. width: "100px"
  117. },
  118. {
  119. title: '公示状态',
  120. field: 'isPublicName',
  121. visible: true,
  122. align: 'center',
  123. valign: 'middle',
  124. 'class': 'uitd_showTip',
  125. width: "100px"
  126. },
  127. ];
  128. };
  129. /**
  130. * 检查是否选中
  131. */
  132. LivingAllowanceInfo.check = function () {
  133. var selected = $('#' + this.id).bootstrapTable('getSelections');
  134. if(selected.length == 0){
  135. Feng.info("请先选中表格中的某一记录!");
  136. return false;
  137. }else{
  138. LivingAllowanceInfo.seItem = selected[0];
  139. return true;
  140. }
  141. };
  142. /**
  143. * 点击添加硕博人才生活补贴申报
  144. */
  145. LivingAllowanceInfo.openCheckLivingAllowanceInfo = function () {
  146. if (this.check()) {
  147. var index = layer.open({
  148. type: 2,
  149. title: '硕博人才生活补贴审核',
  150. area: ['800px', '420px'], //宽高
  151. fix: false, //不固定
  152. maxmin: true,
  153. content: Feng.ctxPath + '/livingAllowanceInfo/livingAllowanceInfo_check/' + LivingAllowanceInfo.seItem.id ,
  154. btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交','<i class="fa fa-save"></i>&nbsp;&nbsp;提交审核' ,'<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  155. btnAlign: 'c',
  156. btn1: function (index, layero) {
  157. var obj = layero.find("iframe")[0].contentWindow;
  158. obj.TalentInfoInfoDlg.showFirstCheckModal();
  159. },btn2: function(index, layero){
  160. var obj = layero.find("iframe")[0].contentWindow;
  161. obj.TalentInfoInfoDlg.submitCheck();
  162. return false;
  163. }
  164. });
  165. layer.full(index);
  166. LivingAllowanceInfo.layerIndex = index;
  167. }
  168. };
  169. /**
  170. * 打开查看硕博人才生活补贴申报详情
  171. */
  172. LivingAllowanceInfo.openLivingAllowanceInfoDetail = function () {
  173. if (this.check()) {
  174. var index = layer.open({
  175. type: 2,
  176. title: '硕博人才生活补贴申报详情',
  177. area: ['800px', '420px'], //宽高
  178. fix: false, //不固定
  179. maxmin: true,
  180. content: Feng.ctxPath + '/livingAllowanceInfo/livingAllowanceInfo_update/' + LivingAllowanceInfo.seItem.id
  181. });
  182. this.layerIndex = index;
  183. }
  184. };
  185. /**
  186. * 查询硕博人才生活补贴申报列表
  187. */
  188. LivingAllowanceInfo.search = function () {
  189. var queryData = {};
  190. queryData['condition'] = $("#condition").val();
  191. LivingAllowanceInfo.table.refresh({query: queryData});
  192. };
  193. $(function () {
  194. var defaultColunms = LivingAllowanceInfo.initColumn();
  195. var table = new BSTable(LivingAllowanceInfo.id, "/livingAllowanceInfo/list", defaultColunms);
  196. table.setPaginationType("server");
  197. LivingAllowanceInfo.table = table.init();
  198. });