livingAllowanceInfo.js 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  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. {title: '申报补贴年次', field: 'applyCount', visible: true, align: 'center', valign: 'middle', width: '100px',
  18. formatter: function (value, row, index) {
  19. if (value == 1) {
  20. return "首年";
  21. }
  22. if (value == 2) {
  23. return "第二年";
  24. }
  25. if (value == 3) {
  26. return "第三年";
  27. }
  28. }
  29. },
  30. {title: '申报类型', field: 'declareTypeName', visible: true, align: 'center', valign: 'middle', width: '80px'},
  31. {title: '引进方式', field: 'introductionMethod', visible: true, align: 'center', valign: 'middle', width: '80px',
  32. formatter: function (value, row, index) {
  33. if (value == 1) {
  34. return "新引进";
  35. }
  36. if (value == 2) {
  37. return "其他";
  38. }
  39. }
  40. },
  41. {
  42. title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "100px", 'class': 'uitd_showTip',
  43. formatter: function (value, row, index) {
  44. return row.sex == 1 ? value + '<span style="color:#6495ED">【男】</span>' : value + '<span style="color:#FF82AB">【女】</span>';
  45. }
  46. },
  47. // {title: '人才类别', field: 'type', visible: true, align: 'center', valign: 'middle',width:"100px",
  48. // formatter : function (value,row,index){
  49. // return value == 1?"晋江市优秀人才":"集成电路优秀人才";
  50. // }
  51. // },
  52. {
  53. title: '证件号码',
  54. field: 'idCard',
  55. visible: true,
  56. align: 'center',
  57. valign: 'middle',
  58. 'class': 'uitd_showTip',
  59. width: "150px"
  60. },
  61. {
  62. title: '企业名称',
  63. field: 'enterpriseName',
  64. visible: true,
  65. align: 'center',
  66. valign: 'middle',
  67. 'class': 'uitd_showTip',
  68. width: "100px"
  69. },
  70. {
  71. title: '最高学历',
  72. field: 'highEducation',
  73. visible: true,
  74. align: 'center',
  75. valign: 'middle',
  76. 'class': 'uitd_showTip',
  77. width: "100px"
  78. },
  79. {
  80. title: '毕业学校',
  81. field: 'graduateSchool',
  82. visible: true,
  83. align: 'center',
  84. valign: 'middle',
  85. 'class': 'uitd_showTip',
  86. width: "100px"
  87. },
  88. {
  89. title: '手机号码',
  90. field: 'phone',
  91. visible: true,
  92. align: 'center',
  93. valign: 'middle',
  94. 'class': 'uitd_showTip',
  95. width: "100px"
  96. },
  97. {
  98. title: '本单位入职时间',
  99. field: 'entryTime',
  100. visible: true,
  101. align: 'center',
  102. valign: 'middle',
  103. 'class': 'uitd_showTip',
  104. width: "100px"
  105. },
  106. {
  107. title: '首次来晋工作时间',
  108. field: 'firstInJJTime',
  109. visible: true,
  110. align: 'center',
  111. valign: 'middle',
  112. 'class': 'uitd_showTip',
  113. width: "100px"
  114. },
  115. {
  116. title: '推荐兑现状态',
  117. field: 'recommendIsPay',
  118. visible: $("#process").val() == 4,
  119. align: 'center',
  120. valign: 'middle',
  121. 'class': 'uitd_showTip',
  122. width: "100px",
  123. formatter: function (value, row, index) {
  124. if (value == -1) {
  125. return "<span style='color: red'>不予兑现</span>"
  126. }
  127. if (value == 0) {
  128. return "<span style='color: #2401fd'>未知</span>"
  129. }
  130. if (value == 1) {
  131. return "<span style='color: green'>待兑现</span>"
  132. }
  133. if (value == 2) {
  134. return "<span style='color: #6d008b'>已兑现</span>"
  135. }
  136. }
  137. },
  138. {
  139. title: '推荐兑现金额', field: 'recommendAmount', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  140. },
  141. {
  142. title: '推荐判定描述', field: 'recommendJudgmentDetails', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  143. // formatter: function (value,row,index) {
  144. // if(Feng.isNotEmptyStr(value)){
  145. // var arr = value.split(";");
  146. // var str = "";
  147. // for(var i=0;i<arr.length;i++){
  148. // if(Feng.isNotEmptyStr($.trim(arr[i]))){
  149. // str = str + (i+1) + "." + arr[i]
  150. // }
  151. // }
  152. // return str
  153. // }
  154. // return value;
  155. // }
  156. },
  157. {
  158. title: '推荐计算描述', field: 'recommendAmountDesc', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  159. // formatter: function (value,row,index) {
  160. // if(Feng.isNotEmptyStr(value)){
  161. // var arr = value.split(";");
  162. // var str = "";
  163. // for(var i=0;i<arr.length;i++){
  164. // if(Feng.isNotEmptyStr($.trim(arr[i]))) {
  165. // str = str + (i + 1) + "." + arr[i] +
  166. // }
  167. // }
  168. // return str
  169. // }
  170. // return value;
  171. // }
  172. },
  173. {
  174. title: '实际兑现状态',
  175. field: 'isPay',
  176. visible: $("#process").val() == 4,
  177. align: 'center',
  178. valign: 'middle',
  179. 'class': 'uitd_showTip',
  180. width: "100px",
  181. formatter: function (value, row, index) {
  182. if (value == -1) {
  183. return "<span style='color: red'>不予兑现</span>"
  184. }
  185. if (value == 0) {
  186. return "<span style='color: #2401fd'>未知</span>"
  187. }
  188. if (value == 1) {
  189. return "<span style='color: green'>待兑现</span>"
  190. }
  191. if (value == 2) {
  192. return "<span style='color: #6d008b'>已兑现</span>"
  193. }
  194. }
  195. },
  196. {
  197. title: '实际兑现金额', field: 'amount', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  198. },
  199. {
  200. title: '实际判定描述', field: 'judgmentDetails', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  201. formatter: function (value, row, index) {
  202. if (Feng.isNotEmptyStr(value)) {
  203. var arr = value.split(";");
  204. return arr.join("</br>")
  205. }
  206. return value;
  207. }
  208. },
  209. {
  210. title: '实际计算描述', field: 'amountDesc', visible: $("#process").val() == 4, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  211. formatter: function (value, row, index) {
  212. if (Feng.isNotEmptyStr(value)) {
  213. var arr = value.split(";");
  214. return arr.join("</br>")
  215. }
  216. return value;
  217. }
  218. },
  219. {
  220. title: '审核状态',
  221. field: 'checkState',
  222. visible: $("#process").val() == 1,
  223. align: 'center',
  224. valign: 'middle',
  225. width: "100px",
  226. formatter: function (value, row, index) {
  227. if (value == -1) {
  228. return "<span class='label label-danger'>审核不通过</span>"
  229. }
  230. if (value == 1) {
  231. return "<span class='label'>待提交</span>"
  232. }
  233. if (value == 7) {
  234. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
  235. return "<span class='label label-success'>重新提交</span>"
  236. } else {
  237. return "<span class='label label-success'>待审核</span>"
  238. }
  239. }
  240. if (value == 20) {
  241. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
  242. return "<span class='label label-danger'>上级驳回</span>"
  243. } else {
  244. return "<span class='label label-success'>待审核</span>"
  245. }
  246. }
  247. if (value == 30) {
  248. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 1) {
  249. return "<span class='label label-danger'>复核驳回</span>"
  250. } else {
  251. return "<span class='label label-success'>待审核</span>"
  252. }
  253. }
  254. if (value == 10) {
  255. return "<span class='label label-danger'>已驳回</span>"
  256. }
  257. if (value == 15 || value >= 25) {
  258. return "<span class='label label-primary'>已通过</span>"
  259. }
  260. }
  261. },
  262. {
  263. title: '审核状态',
  264. field: 'checkState',
  265. visible: $("#process").val() == 2,
  266. align: 'center',
  267. valign: 'middle',
  268. width: "100px",
  269. formatter: function (value, row, index) {
  270. if (value == -1) {
  271. return "<span class='label label-danger'>审核不通过</span>"
  272. } else if (value <= 10 || value == 20) {
  273. return "<span class='label label-danger'>已驳回</span>"
  274. } else if (value == 15) {
  275. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 2) {
  276. return "<span class='label label-success'>重新提交</span>"
  277. } else {
  278. return "<span class='label label-success'>待审核</span>"
  279. }
  280. } else if (value >= 25) {
  281. return "<span class='label label-primary'>已通过</span>"
  282. }
  283. }
  284. },
  285. {
  286. title: '审核状态',
  287. field: 'checkState',
  288. visible: $("#process").val() == 3,
  289. align: 'center',
  290. valign: 'middle',
  291. width: "120px",
  292. formatter: function (value, row, index) {
  293. if (value == -1) {
  294. return "<span class='label label-danger'>审核不通过</span>"
  295. }
  296. if (value == 25) {
  297. if (row.highProcess != null && row.highProcess != '' && row.highProcess >= 3) {
  298. return "<span class='label label-success'>重新提交</span>"
  299. } else {
  300. return "<span class='label label-success'>待审核</span>"
  301. }
  302. }
  303. if (value == 30 || value <= 20) {
  304. return "<span class='label label-danger'>已驳回</span>"
  305. }
  306. if (value >= 35) {
  307. return "<span class='label label-primary'>已通过</span>"
  308. }
  309. }
  310. },
  311. {
  312. title: '审核状态',
  313. field: 'checkState',
  314. visible: $("#process").val() == 4,
  315. align: 'center',
  316. valign: 'middle',
  317. width: "120px",
  318. formatter: function (value, row, index) {
  319. if (value == -1) {
  320. return "<span class='label label-danger'>审核不通过</span>"
  321. }
  322. if (value == 35) {
  323. return "<span class='label label-primary'>已通过</span>"
  324. }
  325. }
  326. },
  327. {
  328. title: '公示状态',
  329. field: 'isPublic',
  330. visible: true,
  331. align: 'center',
  332. valign: 'middle',
  333. 'class': 'uitd_showTip',
  334. width: "100px",
  335. formatter: function (value, row, index) {
  336. if (value == 1) {
  337. return "<span class='label label-info'>待核查征信</span>"
  338. }
  339. if (value == 2) {
  340. return "<span class='label label-success'>待公示</span>"
  341. }
  342. if (value == 3) {
  343. return "<span class='label label-danger'>公示中</span>"
  344. }
  345. if (value == 4) {
  346. if (row.checkState == -1) {
  347. return "<span class='label label-danger'>审核不通过</span>"
  348. }
  349. return "<span class='label label-primary'>待兑现</span>"
  350. }
  351. if (value == 5) {
  352. return "<span class='label label-primary'>已兑现</span>"
  353. }
  354. }
  355. },
  356. {
  357. title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: '80px',
  358. formatter: function (value, row, index) {
  359. return "<span class='label label-success' onclick=\"LivingAllowanceInfo.showLog('" + value + "')\" >" +
  360. "<i class=\"fa fa-book\"></i>日志" +
  361. "</span>";
  362. }
  363. }
  364. ];
  365. };
  366. /**
  367. * 检查是否选中
  368. */
  369. LivingAllowanceInfo.check = function () {
  370. var selected = $('#' + this.id).bootstrapTable('getSelections');
  371. if (selected.length == 0) {
  372. Feng.info("请先选中表格中的某一记录!");
  373. return false;
  374. } else {
  375. LivingAllowanceInfo.seItem = selected[0];
  376. return true;
  377. }
  378. };
  379. /**
  380. * 点击审核硕博人才生活补贴申报
  381. * @param process
  382. */
  383. LivingAllowanceInfo.openCheckLivingAllowanceInfo = function (process) {
  384. if (this.check()) {
  385. var index = layer.open({
  386. type: 2,
  387. title: '硕博人才生活补贴审核',
  388. area: ['800px', '420px'], //宽高
  389. fix: false, //不固定
  390. maxmin: true,
  391. content: Feng.ctxPath + '/admin/living_allowance/detail?id=' + LivingAllowanceInfo.seItem.id + "&process=" + process,
  392. 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;关闭'],
  393. btnAlign: 'c',
  394. btn1: function (index, layero) {
  395. var obj = layero.find("iframe")[0].contentWindow;
  396. obj.LivingAllowanceInfoInfoDlg.showCheckModal(process);
  397. }, btn2: function (index, layero) {
  398. var obj = layero.find("iframe")[0].contentWindow;
  399. obj.LivingAllowanceInfoInfoDlg.submitCheck(process);
  400. return false;
  401. }
  402. });
  403. layer.full(index);
  404. LivingAllowanceInfo.layerIndex = index;
  405. }
  406. };
  407. /**
  408. * 打开查看硕博人才生活补贴申报详情
  409. */
  410. LivingAllowanceInfo.openLivingAllowanceInfoDetail = function () {
  411. if (this.check()) {
  412. var index = layer.open({
  413. type: 2,
  414. title: '硕博人才生活补贴申报详情',
  415. area: ['800px', '420px'], //宽高
  416. fix: false, //不固定
  417. maxmin: true,
  418. content: Feng.ctxPath + '/livingAllowanceInfo/livingAllowanceInfo_update/' + LivingAllowanceInfo.seItem.id
  419. });
  420. this.layerIndex = index;
  421. }
  422. };
  423. /**
  424. * 修改驳回的字段及附件
  425. */
  426. LivingAllowanceInfo.updateFieldsAndFiles = function () {
  427. if (this.check()) {
  428. var ajax = new $ax("/admin/living_allowance/findFieldsAndFiles?id=" + LivingAllowanceInfo.seItem.id, function (data) {
  429. if (data.code == 200) {
  430. layer.open({
  431. type: 1,
  432. id: "neewFieldFormModel",
  433. title: '修改',
  434. area: ['800px', '450px'], //宽高
  435. fix: false, //不固定
  436. shade: 0,
  437. maxmin: true,
  438. content: LivingAllowanceInfo.creatFieldCheckModal(),
  439. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  440. btnAlign: 'c',
  441. zIndex: layer.zIndex,
  442. success: function (layero, index) {
  443. var html2 = '';
  444. for (var key in data.fileList) {
  445. html2 = html2 + '<ul><li style="width: 100%"><input type="checkbox" value="' + data.fileList[key].id + '"><span>' + data.fileList[key].name + '</span></li></ul>';
  446. }
  447. $("#firstCheckForm #field_info ul").css("overflow", "hidden");
  448. $("#field_file").css("overflow", "hidden").empty().append(html2);
  449. //$("#field_file").empty().append(html);
  450. if (data.select.fields != null && data.select.fields != '') {
  451. $("#firstCheckForm #field_info li input").each(function () {
  452. if (data.select.fields.indexOf($(this).val()) != -1) {
  453. this.checked = true;
  454. }
  455. });
  456. }
  457. if (data.select.files != null && data.select.files != '') {
  458. $("#field_file input").each(function () {
  459. if (data.select.files.indexOf($(this).val()) != -1) {
  460. this.checked = true;
  461. }
  462. });
  463. }
  464. },
  465. yes: function (index, layero) {
  466. LivingAllowanceInfo.submitFieldsAndFiles(index, data.id);
  467. }
  468. });
  469. } else {
  470. Feng.error(data.msg);
  471. }
  472. }, function (data) {
  473. Feng.error("查询失败!" + data.responseJSON.message + "!");
  474. });
  475. ajax.start();
  476. }
  477. }
  478. /**
  479. * 修改提交
  480. * @param index
  481. * @param id
  482. */
  483. LivingAllowanceInfo.submitFieldsAndFiles = function (index, id) {
  484. var fields = '';
  485. var files = '';
  486. $("#firstCheckForm #field_info li input").each(function (index) {
  487. if ($(this).is(":checked")) {
  488. fields = fields + $(this).val() + ",";
  489. }
  490. });
  491. $("#field_file li input").each(function (index) {
  492. if ($(this).is(":checked")) {
  493. files = files + $(this).val() + ",";
  494. }
  495. });
  496. if (fields == '' && files == '') {
  497. Feng.info("请选择可修改的字段或附件!");
  498. return;
  499. }
  500. var ajax = new $ax("/admin/living_allowance/updateFieldsAndFiles", function (data) {
  501. if (data.code == 200) {
  502. layer.close(index);
  503. Feng.success(data.msg);
  504. } else {
  505. Feng.error(data.msg);
  506. }
  507. }, function (data) {
  508. Feng.error("修改失败!" + data.responseJSON.message + "!");
  509. });
  510. ajax.setData({"id": id, "fields": fields, "files": files})
  511. ajax.start();
  512. }
  513. LivingAllowanceInfo.creatFieldCheckModal = function () {
  514. return '<form id="firstCheckForm">\n' +
  515. ' <div class="form-group" style="margin: 10px;">\n' +
  516. ' <div >\n' +
  517. ' <label for="checkMsg" class="control-label">可修改字段</label>\n' +
  518. ' <div id="field_info">\n' +
  519. ' <ul>\n' +
  520. ' <li style="width:20.5%"><input type="checkbox" value="declareType"><span>申报对象类型</span></li>\n' +
  521. ' <li style="width:10%"><input type="checkbox" value="introductionMethod"><span>引进方式</span></li>\n' +
  522. ' <li style="width:10%"><input type="checkbox" value="name"><span>姓名</span></li>\n' +
  523. ' <li style="width:10%"><input type="checkbox" value="sex"><span>性别</span></li>\n' +
  524. ' <li style="width:10%"><input type="checkbox" value="birthday"><span>出生日期</span></li>\n' +
  525. ' <li style="width:20.5%"><input type="checkbox" value="nationality"><span>国籍/地区</span></li>\n' +
  526. ' <li style="width:10%"><input type="checkbox" value="provinceCode"onchange="LivingAllowanceInfoInfoDlg.fieldCheckd(this)"><span>籍贯省</span></li>\n' +
  527. ' <li style="width:10%"><input type="checkbox" value="cityCode" onchange="LivingAllowanceInfoInfoDlg.fieldCheckd(this)"><span>籍贯市</span></li>\n' +
  528. ' <li style="width:10%"><input type="checkbox" value="countyCode"><span>籍贯县</span></li>\n' +
  529. ' <li style="width:10%"><input type="checkbox" value="nation"><span>民族</span></li>\n' +
  530. ' <li style="width:10%"><input type="checkbox" value="politics"><span>政治面貌</span></li>\n' +
  531. ' <li style="width:10%"><input type="checkbox" value="cardType"><span>证件类型</span></li>\n' +
  532. ' <li style="width:10%"><input type="checkbox" value="idCard"><span>证件号码</span></li>\n' +
  533. ' <li style="width:20.5%"><input type="checkbox" value="firstInJJTime"><span>首次来晋工作时间</span></li>\n' +
  534. ' <li style="width:20.5%"><input type="checkbox" value="backJJBusinessTime"><span>返晋创业时间</span></li>\n' +
  535. ' <li style="width:20.5%"><input type="checkbox" value="entryTime"><span>本单位入职时间</span></li>\n' +
  536. ' <li style="width:10%"><input type="checkbox" value="post"><span>职务</span></li>\n' +
  537. ' <li style="width:20.5%"><input type="checkbox" value="startTime"><span>工作合同开始时间</span></li>\n' +
  538. ' <li style="width:20.5%"><input type="checkbox" value="endTime"><span>工作合同结束时间</span></li>\n' +
  539. ' <li style="width:20.5%"><input type="checkbox" value="firstSocialSecurityTime"><span>首次社保缴纳时间</span></li>\n' +
  540. ' <li style="width:10%"><input type="checkbox" value="highEducation"><span>最高学历</span></li>\n' +
  541. ' <li style="width:10%"><input type="checkbox" value="graduateSchool"><span>毕业院校</span></li>\n' +
  542. ' <li style="width:20.5%"><input type="checkbox" value="studyAbroadTime"><span>学位证书取得时间</span></li>\n' +
  543. ' <li style="width:10%"><input type="checkbox" value="major"><span>专业</span></li>\n' +
  544. ' <li style="width:10%"><input type="checkbox" value="title"><span>职称</span></li>\n' +
  545. ' <li style="width:20.5%"><input type="checkbox" value="professionalQualifications"><span>国家职业资格</span></li>\n' +
  546. ' <li style="width:20.5%"><input type="checkbox" value="studyAbroad"><span>是否有留学经历</span></li>\n' +
  547. ' <li style="width:10%"><input type="checkbox" value="phone"><span>手机号码</span></li>\n' +
  548. ' <li style="width:10%"><input type="checkbox" value="email"><span>电子邮箱</span></li>\n' +
  549. ' <li style="width:10%"><input type="checkbox" value="bank"><span>开户银行</span></li>\n' +
  550. ' <li style="width:20.5%"><input type="checkbox" value="bankNetwork"><span>开户银行网点</span></li>\n' +
  551. ' <li style="width:10%"><input type="checkbox" value="bankNumber"><span>银行行号</span></li>\n' +
  552. ' <li style="width:10%"><input type="checkbox" value="bankAccount"><span>银行账号</span></li>\n' +
  553. ' <li style="width:20.5%"><input type="checkbox" value="educationAndResume"><span>教育背景及工作简历</span></li>\n' +
  554. ' <li style="width:22%"><input type="checkbox" value="mainHonours"><span>主要业绩及取得的荣誉</span></li>\n' +
  555. ' <li style="width:20.5%"><input type="checkbox" value="socialSecurity"><span>社保缴纳情况</span></li>\n' +
  556. ' <li style="width:20.5%"><input type="checkbox" value="personalTax"><span>个税缴纳情况</span></li>\n' +
  557. ' </ul>\n' +
  558. ' </div>\n' +
  559. ' <label for="checkMsg" class="control-label">可修改附件</label>\n' +
  560. ' <div id="field_file">\n' +
  561. ' </div>\n' +
  562. ' <div class="form-group" style="text-align: center">\n' +
  563. ' <button type="button" class="btn btn-primary" onclick="LivingAllowanceInfo.checkAll()">全选</button>\n' +
  564. ' <button type="button" class="btn btn-success" onclick="LivingAllowanceInfo.unCheckAll()">反选</button>\n' +
  565. ' </div>\n' +
  566. ' </div>\n' +
  567. ' </div>\n' +
  568. ' </form>';
  569. }
  570. /**
  571. * 显示核查征信驳回模态框
  572. */
  573. LivingAllowanceInfo.showHczxRejectModal = function () {
  574. if (this.check()) {
  575. if (LivingAllowanceInfo.seItem.isPublic != 1) {
  576. Feng.info("当前记录不是待核查征信状态,无法核查");
  577. return;
  578. }
  579. $("#hczxId").val(LivingAllowanceInfo.seItem.id);
  580. $("#hczxMsg").val("");
  581. $("#hczxRejectModal").modal("show");
  582. }
  583. }
  584. /**
  585. * 核查征信驳回提交
  586. */
  587. LivingAllowanceInfo.hczxReject = function () {
  588. var id = $("#hczxId").val();
  589. var msg = $("#hczxMsg").val();
  590. if (msg == null || msg == '') {
  591. Feng.info("请填写失信原因");
  592. return;
  593. }
  594. var operation = function () {
  595. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/hczxReject", function (data) {
  596. if (data.code == 200) {
  597. Feng.success(data.msg);
  598. LivingAllowanceInfo.table.refresh();
  599. $("#hczxRejectModal").modal("hide");
  600. } else {
  601. Feng.error(data.msg);
  602. }
  603. }, function (data) {
  604. Feng.error("核查征信失败!" + data.responseJSON.message + "!");
  605. });
  606. ajax.setData({"id": id, "outMsg": msg, "creditStatus": 3});
  607. ajax.start();
  608. }
  609. Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
  610. }
  611. LivingAllowanceInfo.showDataCheckModal = function (type) {
  612. $("#hczxForm").css("display", "none");
  613. switch (type) {
  614. case 1: //待核查征信名单-导出
  615. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.checkExport()").text("导出");
  616. $("#exportCommonModalLabel").text("待核查征信名单");
  617. break;
  618. case 2: //待核查征信名单-核查征信通过
  619. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.hczxPass()").text("提交");
  620. $("#exportCommonModalLabel").text("待核查征信名单");
  621. break;
  622. case 3: //公示(批量)
  623. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.public()").text("公示");
  624. $("#exportCommonModalLabel").text("待公示名单");
  625. $("#hczxForm").css("display", "block");
  626. $(".time").each(function () {
  627. laydate.render({
  628. elem: "#" + $(this).attr("id")
  629. , type: 'date'
  630. , format: 'yyyy年MM月dd日'
  631. });
  632. });
  633. break;
  634. case 4: //公示通过(批量)
  635. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.publicPass()").text("提交");
  636. $("#exportCommonModalLabel").text("公示通过名单");
  637. break;
  638. case 5: //待公布名单
  639. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.publish()").text("公布");
  640. $("#exportCommonModalLabel").text("待公布名单");
  641. break;
  642. case 6: //待发证名单
  643. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.issue()").text("提交");
  644. $("#exportCommonModalLabel").text("待发证名单");
  645. break;
  646. case 7: //公示名单预览
  647. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.needPublicExport()").text("导出");
  648. $("#exportCommonModalLabel").text("待公示名单");
  649. break;
  650. }
  651. $('#dataTable').bootstrapTable('destroy');
  652. $('#dataTable').bootstrapTable({
  653. url: Feng.ctxPath + "/admin/living_allowance/selectNeedCheckData?type=" + type,
  654. method: 'POST',
  655. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  656. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  657. showRefresh: false, // 是否显示刷新按钮
  658. clickToSelect: true, // 是否启用点击选中行
  659. singleSelect: false, // 设置True 将禁止多选
  660. striped: true, // 是否显示行间隔色
  661. pagination: true, // 设置为 true 会在表格底部显示分页条
  662. paginationHAlign: "left",
  663. paginationDetailHAlign: "right",
  664. sidePagination: "client", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  665. pageNumber: 1, //初始化加载第一页,默认第一页
  666. pageSize: 10, //每页的记录行数(*)
  667. pageList: [10, 25, 50, 100, 500, 1000, 1500], //可供选择的每页的行数(*)
  668. maintainSelected: true, //全表全选需要开启
  669. showColumns: false,
  670. responseHandler: function (res) {
  671. $("#exportCommonModal").modal("show");
  672. return res.obj.rows;
  673. },
  674. columns:
  675. [
  676. {field: "selectItem", checkbox: true},
  677. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "20%"},
  678. {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "30%"},
  679. {
  680. title: '企业名称',
  681. field: 'enterpriseName',
  682. visible: true,
  683. align: 'center',
  684. valign: 'middle',
  685. width: "40%"
  686. },
  687. {
  688. title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "10%",
  689. formatter: function (value, row, index) {
  690. if (value == -1) {
  691. return "<span style='color: #ed5565;'>审核不通过</span>";
  692. }
  693. if (value == 35) {
  694. return "<span style='color: #1ab394;'>审核通过</span>";
  695. }
  696. }
  697. },
  698. ]
  699. });
  700. }
  701. /**
  702. * 选择导出提交
  703. */
  704. LivingAllowanceInfo.checkExport = function () {
  705. var selected = $('#dataTable').bootstrapTable('getSelections');
  706. if (!selected || selected.length < 1) {
  707. Feng.info("请至少选择一行数据!");
  708. return;
  709. }
  710. var ids = "";
  711. for (var i = 0; i < selected.length; i++) {
  712. ids = ids + selected[i].id + ",";
  713. }
  714. window.location.href = Feng.ctxPath + "/admin/living_allowance/exportHczx?ids=" + ids;
  715. }
  716. LivingAllowanceInfo.actalUpload = function () {
  717. $("#file,#fileName").val("");
  718. $("#importModal").modal("show");
  719. }
  720. /**
  721. *
  722. */
  723. LivingAllowanceInfo.importSubmit = function () {
  724. $("#import-form")[0].submit();
  725. // layer.confirm('您需要导入数据并提交吗?', {
  726. // btn: ['仅导入','导入并提交','取消'] //按钮
  727. // }, function(index){
  728. // $("#importType").val(1);
  729. // $("#import-form")[0].submit();
  730. // layer.close(index);
  731. // }, function(index){
  732. // $("#importType").val(2);
  733. // $("#import-form")[0].submit();
  734. // layer.close(index);
  735. // }, function(index){
  736. // layer.close(index);
  737. // });
  738. }
  739. LivingAllowanceInfo.importCallBack = function (data) {
  740. if (data.code == 200) {
  741. $("#importModal").modal("hide");
  742. LivingAllowanceInfo.table.refresh();
  743. Feng.success(data.msg);
  744. } else {
  745. Feng.error(data.msg);
  746. }
  747. }
  748. LivingAllowanceInfo.initCheckFileTable = function () {
  749. $('#checkFileTable').bootstrapTable('destroy');
  750. $('#checkFileTable').bootstrapTable({
  751. url: Feng.ctxPath + "/common/api/listNonPredefinedFiles",
  752. method: 'POST',
  753. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  754. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  755. showRefresh: false, // 是否显示刷新按钮
  756. clickToSelect: true, // 是否启用点击选中行
  757. singleSelect: true, // 设置True 将禁止多选
  758. striped: true, // 是否显示行间隔色
  759. pagination: false, // 设置为 true 会在表格底部显示分页条
  760. paginationHAlign: "left",
  761. paginationDetailHAlign: "right",
  762. sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  763. showColumns: false,
  764. queryParams: function (params) {
  765. return {"batch": $("#batch").val(), "fileTag": "master_living_allowance"};
  766. },
  767. rowStyle: function (row, index) {
  768. return {css: {"word-break": "break-word", "white-space": "inherit"}}
  769. },
  770. columns:
  771. [
  772. {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', width: '120px'},
  773. {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px",
  774. formatter: function (value, row, index) {
  775. var sn = value.lastIndexOf(".");
  776. var suffix = value.substring(sn + 1, value.length);
  777. var imgStr = "";
  778. if (suffix == "pdf" || suffix == "PDF") {
  779. imgStr = "<button type='button' onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
  780. } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
  781. imgStr = "<button type='button' onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
  782. } else {
  783. imgStr = '<img class=\"imgUrl\" src=\"' + value + '\" style=\"width:25px;height:25px;\">';
  784. }
  785. return imgStr;
  786. }
  787. },
  788. {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '80px',
  789. formatter: function (value, row, index) {
  790. return "<button type='button' onclick=\"downloadFile('" + row.id + "','6')\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button>" +
  791. "<button type='button' onclick=\"LivingAllowanceInfo.deleteCheckFile('" + row.id + "','" + CONFIG.project_master_living_allowance + "')\" class=\"btn btn-xs btn-danger\">" +
  792. "<i class=\"fa fa-times\"></i>删除" +
  793. "</button>";
  794. }
  795. },
  796. ],
  797. onPostBody: function () {
  798. $('#checkFileTable' + "td.uitd_showTip").bind("mouseover", function () {
  799. var htm = $(this).html();
  800. $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
  801. });
  802. $(".imgUrl").viewer({fullscreen: false});
  803. },
  804. });
  805. }
  806. /**
  807. * 核查材料留存上传
  808. */
  809. LivingAllowanceInfo.showCheckFileModal = function () {
  810. Feng.addAjaxSelect({
  811. "id": "batch",
  812. "displayCode": "id",
  813. "displayName": "batch",
  814. "type": "GET",
  815. "url": Feng.ctxPath + "/admin/batch/listBatchByType?type=" + CONFIG.project_master_living_allowance
  816. });
  817. $("#upload_file").val("");
  818. $("#checkFileModal").modal("show");
  819. }
  820. LivingAllowanceInfo.checkFileUpload = function () {
  821. var batch = $("#batch").val();
  822. if (Feng.isEmptyStr(batch)) {
  823. Feng.info("请选择申报批次后再上传!");
  824. return;
  825. }
  826. $("#upload_file ").unbind("change");
  827. $("#upload_file ").change(function () {
  828. var formData = new FormData();
  829. formData.append("fileTag", "master_living_allowance");
  830. formData.append("memo", batch);
  831. for (var i = 0; i < $('#upload_file')[0].files.length; i++) {
  832. formData.append('file', $('#upload_file')[0].files[i]);
  833. }
  834. $.ajax({
  835. url: Feng.ctxPath + "/admin/talentCommonFile/uploadBatch",
  836. type: "POST",
  837. processData: false,
  838. contentType: false,
  839. data: formData,
  840. success: function (data) {
  841. $("#checkFileTable").bootstrapTable("refresh", {});
  842. Feng.info(data.msg);
  843. }, error: function (data) {
  844. Feng.error("上传失败!" + data.responseJSON.message + "!");
  845. }
  846. });
  847. });
  848. $('#upload_file').val("");
  849. $('#upload_file').click();
  850. }
  851. LivingAllowanceInfo.deleteCheckFile = function (id, type) {
  852. var operation = function () {
  853. var ajax = new $ax(Feng.ctxPath + "/common/api/deleteNonPredefinedFile", function (data) {
  854. if (data.code == 200) {
  855. Feng.success(data.msg);
  856. $("#checkFileTable").bootstrapTable("refresh", {});
  857. } else {
  858. Feng.error(data.msg);
  859. }
  860. }, function (data) {
  861. Feng.error("删除失败!" + data.responseJSON.message + "!");
  862. });
  863. ajax.set("id", id);
  864. ajax.set("type", type);
  865. ajax.start();
  866. }
  867. Feng.confirm("删除后无法恢复,确认删除吗?", operation);
  868. }
  869. /**
  870. * 审核不通过
  871. */
  872. LivingAllowanceInfo.setNotPass = function () {
  873. var selecteds = $('#' + this.id).bootstrapTable('getSelections');
  874. if (selecteds.length == 0) {
  875. Feng.info("请选择需要设置审核不通过的行");
  876. return;
  877. }
  878. var ids = "";
  879. for (var key in selecteds) {
  880. ids = ids + selecteds[key].id + ",";
  881. }
  882. ids = ids.substring(0, ids.length - 1);
  883. layer.open({
  884. type: 1,
  885. id: "notPassModal",
  886. title: '修改',
  887. area: ['800px', '450px'], //宽高
  888. fix: false, //不固定
  889. shade: 0,
  890. maxmin: true,
  891. content: '<form id="checkNotPass">\n' +
  892. ' <div class="form-group" style="margin: 10px;">\n' +
  893. ' <label for="checkMsgNotPass" class="control-label" >审核不通过原因</label>\n' +
  894. ' <textarea class="form-control" id="checkMsgNotPass" placeholder="此功能适用于未在申报提交截止时间内提交的数据" rows="6"></textarea>\n' +
  895. ' </div>\n' +
  896. ' </form>',
  897. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  898. btnAlign: 'c',
  899. zIndex: layer.zIndex,
  900. yes: function (index, layero) {
  901. var checkMsg = $("#checkMsgNotPass").val();
  902. if (Feng.isEmptyStr(checkMsg)) {
  903. Feng.info("请填写审核不通过原因");
  904. return;
  905. }
  906. var operation = function () {
  907. var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/setNotPass", function (data) {
  908. if (data.code == 200) {
  909. Feng.success(data.msg);
  910. LivingAllowanceInfo.table.refresh();
  911. layer.close(index);
  912. } else {
  913. Feng.error(data.msg);
  914. }
  915. }, function (data) {
  916. Feng.error("设置审核不通过失败!" + data.responseJSON.message + "!");
  917. });
  918. ajax.set("ids", ids);
  919. ajax.set("msg", checkMsg);
  920. ajax.start();
  921. }
  922. Feng.confirm("一旦提交无法修改,确定设置所选数据为审核不通过?", operation);
  923. }
  924. });
  925. }
  926. /**
  927. * 批量征信通过
  928. */
  929. LivingAllowanceInfo.hczxPass = function () {
  930. var selected = $('#dataTable').bootstrapTable('getSelections');
  931. if (!selected || selected.length < 1) {
  932. Feng.info("请至少选择一行数据!");
  933. return;
  934. }
  935. var ids = "";
  936. for (var i = 0; i < selected.length; i++) {
  937. ids = ids + selected[i].id + ",";
  938. }
  939. var operation = function () {
  940. var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/hczxPass", function (data) {
  941. if (data.code == 200) {
  942. Feng.success(data.msg);
  943. LivingAllowanceInfo.table.refresh();
  944. $("#exportCommonModal").modal("hide");
  945. } else {
  946. Feng.error(data.msg);
  947. }
  948. }, function (data) {
  949. Feng.error("核查征信失败!" + data.responseJSON.message + "!");
  950. });
  951. ajax.set("ids", ids);
  952. ajax.start();
  953. }
  954. Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
  955. }
  956. /**
  957. * 公示预览
  958. */
  959. LivingAllowanceInfo.needPublicExport = function () {
  960. var selected = $('#dataTable').bootstrapTable('getSelections');
  961. if (!selected || selected.length < 1) {
  962. Feng.info("请至少选择一行数据!");
  963. return;
  964. }
  965. var ids = "";
  966. for (var i = 0; i < selected.length; i++) {
  967. ids = ids + selected[i].id + ",";
  968. }
  969. var operation = function () {
  970. $("#exportCommonModal").modal("hide");
  971. window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/admin/living_allowance/exportPublic?ids=" + ids));
  972. }
  973. Feng.confirm("确定要公示预览吗?", operation);
  974. }
  975. /**
  976. * 公示
  977. */
  978. LivingAllowanceInfo.public = function () {
  979. var selected = $('#dataTable').bootstrapTable('getSelections');
  980. if (!selected || selected.length < 1) {
  981. Feng.info("请至少选择一行数据!");
  982. return;
  983. }
  984. var ids = "";
  985. for (var i = 0; i < selected.length; i++) {
  986. ids = ids + selected[i].id + ",";
  987. }
  988. var isMessage = $("input[name='isSend']:checked").val();
  989. var typeName = $("#typeName").val();
  990. var address = $("#web").val();
  991. var publicStartTime = $("#publicStartTime").val();
  992. var publicEndTime = $("#publicEndTime").val();
  993. var dep = $("#dep").val();
  994. var phone = $("#fyphone").val();
  995. var email = $("#fyemail").val();
  996. if (isMessage == 1) {
  997. if (typeName == null || typeName == '') {
  998. Feng.info("请填写公示类型");
  999. return;
  1000. }
  1001. if (address == null || address == '') {
  1002. Feng.info("请填写公示平台");
  1003. return;
  1004. }
  1005. if (publicStartTime == null || publicStartTime == '') {
  1006. Feng.info("请填写公示开始时间");
  1007. return;
  1008. }
  1009. if (publicEndTime == null || publicEndTime == '') {
  1010. Feng.info("请填写公示截止时间");
  1011. return;
  1012. }
  1013. if (dep == null || dep == '') {
  1014. Feng.info("请填写反映单位");
  1015. return;
  1016. }
  1017. if (phone == null || phone == '') {
  1018. Feng.info("请填写联系电话");
  1019. return;
  1020. }
  1021. if (email == null || email == '') {
  1022. Feng.info("请填写联系邮箱");
  1023. return;
  1024. }
  1025. }
  1026. var operation = function () {
  1027. var index = layer.open({
  1028. type: 1,
  1029. title: '公示',
  1030. area: ['300px', '220px'], //宽高
  1031. fix: false, //不固定
  1032. maxmin: true,
  1033. content: "<input class='form-control' id='publicBatchId' style='width:90%;margin: 10px' placeholder='请输入公示批次'>",
  1034. btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  1035. btnAlign: 'c',
  1036. success: function () {
  1037. laydate.render({elem: "#publicBatchId", type: 'month', trigger: 'click', format: "yyyyMM"});
  1038. },
  1039. yes: function (index, layero) {
  1040. var month = $("#publicBatchId").val();
  1041. if (Feng.isEmptyStr(month)) {
  1042. Feng.info("请填写公示批次");
  1043. return;
  1044. }
  1045. layer.close(index);
  1046. var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/publicBatch", function (data) {
  1047. if (data.code == 200) {
  1048. Feng.success(data.msg);
  1049. LivingAllowanceInfo.table.refresh();
  1050. $("#exportCommonModal").modal("hide");
  1051. } else {
  1052. Feng.error(data.msg);
  1053. }
  1054. }, function (data) {
  1055. Feng.error("公示失败!" + data.responseJSON.message + "!");
  1056. });
  1057. ajax.set("ids", ids);
  1058. ajax.set("typeName", typeName);
  1059. ajax.set("address", address);
  1060. ajax.set("publicStartTime", publicStartTime);
  1061. ajax.set("publicEndTime", publicEndTime);
  1062. ajax.set("dep", dep);
  1063. ajax.set("phone", phone);
  1064. ajax.set("email", email);
  1065. ajax.set("isMessage", isMessage);
  1066. ajax.set("batch", month);
  1067. ajax.start();
  1068. }
  1069. });
  1070. }
  1071. Feng.confirm("确定要公示吗?", operation);
  1072. }
  1073. //已公示的数据根据公示批次公示导出
  1074. LivingAllowanceInfo.publicExport = function (type) {
  1075. var url = "", dateType = '', format = '';
  1076. if (type == 1) { //公示导出
  1077. url = Feng.ctxPath + "/admin/living_allowance/publicExport";
  1078. dateType = 'month';
  1079. format = "yyyyMM";
  1080. } else if (type == 2) { //公布导出
  1081. url = Feng.ctxPath + "/admin/living_allowance/publishExport";
  1082. dateType = 'date';
  1083. format = "yyyy-MM-dd";
  1084. }
  1085. layer.open({
  1086. type: 1,
  1087. title: type == 1 ? '公示导出' : "公布导出",
  1088. area: ['800px', '300px'], //宽高
  1089. fix: false, //不固定
  1090. maxmin: true,
  1091. content: "<form id=\"publicExportForm\" action=\"" + url + "\" target=\"hiddenIframe\" class=\"form-horizontal \" style='padding-top: 10px;'>\n" +
  1092. " <div class=\"form-group col-sm-12\">\n" +
  1093. " <div class=\"row\">\n" +
  1094. " <label class=\"col-sm-2 control-label\">开始时间</label>\n" +
  1095. " <div class=\"col-sm-4\">\n" +
  1096. " <input type=\"text\" id=\"startTime\" name=\"startTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
  1097. " </div>\n" +
  1098. " <label class=\"col-sm-2 control-label\">截止时间</label>\n" +
  1099. " <div class=\"col-sm-4\">\n" +
  1100. " <input type=\"text\" id=\"endTime\" name=\"endTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
  1101. " </div>\n" +
  1102. " </div>\n" +
  1103. " </div>\n" +
  1104. " </form>",
  1105. btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  1106. btnAlign: 'c',
  1107. success: function (index, layero) {
  1108. $("#publicExportForm")[0].reset();
  1109. $("input[time='time']").each(function () {
  1110. laydate.render({
  1111. elem: "#" + $(this).attr("id")
  1112. , type: dateType
  1113. , format: format
  1114. , trigger: 'click'
  1115. });
  1116. });
  1117. },
  1118. yes: function (index) {
  1119. var startTime = $("#startTime").val();
  1120. var endTime = $("#endTime").val();
  1121. if (startTime == null || startTime == '') {
  1122. Feng.info("请选择开始时间");
  1123. return;
  1124. }
  1125. if (endTime == null || endTime == '') {
  1126. Feng.info("请选择结束时间");
  1127. return;
  1128. }
  1129. $("#publicExportForm")[0].submit();
  1130. layer.close(index)
  1131. }
  1132. });
  1133. }
  1134. /**
  1135. * 公示再审核
  1136. */
  1137. LivingAllowanceInfo.afterCheck = function () {
  1138. if (this.check()) {
  1139. if (LivingAllowanceInfo.seItem.isPublic != 3) {
  1140. Feng.info("当前记录不是公示中状态,无法审核");
  1141. return;
  1142. }
  1143. if (LivingAllowanceInfo.seItem.creditStatus == 3) {
  1144. $("#zxNotice").text("当前申请人核查征信不通过,请谨慎选择审核状态!征信意见为:" + LivingAllowanceInfo.seItem.outMsg);
  1145. }
  1146. if (LivingAllowanceInfo.seItem.checkState == -1) {
  1147. var html = '<option value="">请选择</option>\n' +
  1148. ' <option value="2">驳回/恢复</option>';
  1149. $("#checkStateAfter").empty().append(html);
  1150. }
  1151. if (LivingAllowanceInfo.seItem.checkState == 35) {
  1152. var html = '<option value="">请选择</option>\n' +
  1153. ' <option value="-1">审核不通过</option>' +
  1154. ' <option value="2">驳回</option>';
  1155. $("#checkStateAfter").empty().append(html);
  1156. }
  1157. $("#checkForm")[0].reset();
  1158. $("#mainId").val(LivingAllowanceInfo.seItem.id);
  1159. $("#checkModal").modal("show");
  1160. }
  1161. }
  1162. /**
  1163. * 公示后审核提交
  1164. */
  1165. LivingAllowanceInfo.afterCheckSubmit = function () {
  1166. var checkState = $("#checkStateAfter").val();
  1167. var msg = $("#msg").val();
  1168. if (checkState == null || checkState == '') {
  1169. Feng.info("请选择审核状态");
  1170. return;
  1171. }
  1172. if (msg == null || msg == '') {
  1173. Feng.info("请填写审核意见");
  1174. return;
  1175. }
  1176. var operation = function () {
  1177. var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/afterCheck", function (data) {
  1178. if (data.code == 200) {
  1179. Feng.success(data.msg);
  1180. LivingAllowanceInfo.table.refresh();
  1181. $("#checkModal").modal("hide");
  1182. } else {
  1183. Feng.error(data.msg);
  1184. }
  1185. }, function (data) {
  1186. Feng.error("审核失败!" + data.responseJSON.message + "!");
  1187. });
  1188. ajax.setData({"id": $("#mainId").val(), "checkState": $("#checkStateAfter").val(), "checkMsg": msg});
  1189. ajax.start();
  1190. }
  1191. Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
  1192. }
  1193. /**
  1194. * 批量公示通过
  1195. * @param type
  1196. */
  1197. LivingAllowanceInfo.publicPass = function () {
  1198. var selected = $('#dataTable').bootstrapTable('getSelections');
  1199. if (!selected || selected.length < 1) {
  1200. Feng.info("请至少选择一行数据!");
  1201. return;
  1202. }
  1203. var ids = "";
  1204. for (var i = 0; i < selected.length; i++) {
  1205. ids = ids + selected[i].id + ",";
  1206. }
  1207. var operation = function () {
  1208. var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/publicPass", function (data) {
  1209. if (data.code == 200) {
  1210. Feng.success(data.msg);
  1211. LivingAllowanceInfo.table.refresh();
  1212. $("#exportCommonModal").modal("hide");
  1213. } else {
  1214. Feng.error(data.msg);
  1215. }
  1216. }, function (data) {
  1217. Feng.error("公示通过失败!" + data.responseJSON.message + "!");
  1218. });
  1219. ajax.set("ids", ids);
  1220. ajax.start();
  1221. }
  1222. Feng.confirm("一旦提交无法修改,确定公示通过吗?", operation);
  1223. }
  1224. /**
  1225. * 兑现
  1226. */
  1227. LivingAllowanceInfo.issue = function () {
  1228. var selected = $('#dataTable').bootstrapTable('getSelections');
  1229. if (!selected || selected.length < 1) {
  1230. Feng.info("请至少选择一行数据!");
  1231. return;
  1232. }
  1233. var ids = "";
  1234. for (var i = 0; i < selected.length; i++) {
  1235. ids = ids + selected[i].id + ",";
  1236. }
  1237. var operation = function () {
  1238. var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/issue", function (data) {
  1239. if (data.code == 200) {
  1240. Feng.success(data.msg);
  1241. LivingAllowanceInfo.table.refresh();
  1242. $("#exportCommonModal").modal("hide");
  1243. } else {
  1244. Feng.error(data.msg);
  1245. }
  1246. }, function (data) {
  1247. Feng.error("兑现失败!" + data.responseJSON.message + "!");
  1248. });
  1249. ajax.set("ids", ids);
  1250. ajax.start();
  1251. }
  1252. Feng.confirm("一旦兑现无法修改,确定要兑现吗?", operation);
  1253. }
  1254. LivingAllowanceInfo.showExportModal = function () {
  1255. $("#exportForm")[0].reset();
  1256. $("#commonExportModal").modal("show");
  1257. }
  1258. LivingAllowanceInfo.export = function (process) {
  1259. var operation = function () {
  1260. var names = '';
  1261. var fieldCodes = '';
  1262. $("#field_info li input").each(function (index) {
  1263. if ($(this).is(":checked")) {
  1264. fieldCodes = fieldCodes + $(this).val() + ",";
  1265. names = names + $(this).next().text() + ",";
  1266. }
  1267. });
  1268. var param = LivingAllowanceInfo.formParams();
  1269. param.names = names;
  1270. param.values = fieldCodes;
  1271. param.process = process;
  1272. window.location.href = Feng.setUrlParam(Feng.ctxPath + "/admin/living_allowance/commonExport", param);
  1273. // window.location.href = Feng.ctxPath + "/api/talentInfoExport/export?names=" + names + "&fieldCodes=" + fieldCodes + "&name=" + $("#name").val() + "&idCard=" + $("#idCard").val()
  1274. // + "&sex=" + $("#sex").val()+ "&nation=" + $("#nation").val()+ "&nationality=" + $("#nationality").val()+ "&talentType=" + $("#talentType").val()+ "&talentArrange=" + $("#talentArrange").val();
  1275. };
  1276. Feng.confirm("确定要导出数据吗?", operation);
  1277. }
  1278. LivingAllowanceInfo.prepareSearch = function () {
  1279. var sex = $("#pub_sex").val();
  1280. var checkState = $("#pub_checkState").val();
  1281. var name = $("#pub_name").val();
  1282. $('#dataTable').bootstrapTable("refresh", {"query": {"sex": sex, "checkState": checkState, "name": name}});
  1283. }
  1284. LivingAllowanceInfo.prepareReset = function () {
  1285. $("#pub_sex").val("");
  1286. $("#pub_checkState").val("");
  1287. $("#pub_name").val("");
  1288. }
  1289. /**
  1290. * 是否发送短信
  1291. */
  1292. LivingAllowanceInfo.toggleMessage = function () {
  1293. var isMessage = $("input[name='isSend']:checked").val();
  1294. if (isMessage == 1) {
  1295. $("#messageEdit").css("display", "block");
  1296. } else if (isMessage == 2) {
  1297. $("#messageEdit").css("display", "none");
  1298. }
  1299. }
  1300. //回调
  1301. LivingAllowanceInfo.callBack = function (data) {
  1302. Feng.info(data.msg);
  1303. if (data.code == 200) {
  1304. $("#hczxModal").modal("hide");
  1305. LivingAllowanceInfo.table.refresh();
  1306. }
  1307. }
  1308. LivingAllowanceInfo.checkAll = function () {
  1309. $("#field_info input").each(function () {
  1310. this.checked = true;
  1311. })
  1312. }
  1313. /**
  1314. * 反选
  1315. */
  1316. LivingAllowanceInfo.unCheckAll = function () {
  1317. $("#field_info input").each(function () {
  1318. if (this.checked) {
  1319. this.checked = false;
  1320. } else {
  1321. this.checked = true;
  1322. }
  1323. })
  1324. }
  1325. LivingAllowanceInfo.showLog = function (id) {
  1326. layer.open({
  1327. type: 1,
  1328. title: "日志",
  1329. fixed: false,
  1330. content: '<table id="' + id + '"></table>',
  1331. area: ['80%', '80%'],
  1332. maxmin: true,
  1333. success: function (layero, index) {
  1334. Feng.getCheckLog(id, {
  1335. "type": CONFIG.project_master_living_allowance,
  1336. "mainId": id,
  1337. "typeFileId": "",
  1338. "active": 1
  1339. })
  1340. }
  1341. });
  1342. }
  1343. /**
  1344. * 查询表单提交参数对象
  1345. * @returns {{}}
  1346. */
  1347. LivingAllowanceInfo.formParams = function () {
  1348. var queryData = {};
  1349. queryData['name'] = $("#name").val();
  1350. queryData['idCard'] = $("#idCard").val();
  1351. queryData['sex'] = $("#sex").val();
  1352. queryData['nation'] = $("#nation").val();
  1353. queryData['nationality'] = $("#nationality").val();
  1354. queryData['provinceCode'] = $("#provinceCode").val();
  1355. queryData['politics'] = $("#politics").val();
  1356. queryData['enterpriseId'] = $("#enterpriseId").val();
  1357. queryData['industryField'] = $("#industryField").val();
  1358. queryData['introductionMode'] = $("#introductionMode").val();
  1359. queryData['highEducation'] = $("#highEducation").val();
  1360. queryData['major'] = $("#major").val();
  1361. queryData['title'] = $("#title").val();
  1362. queryData['studyAbroad'] = $("#studyAbroad").val();
  1363. queryData['phone'] = $("#phone").val();
  1364. queryData['email'] = $("#email").val();
  1365. queryData['address'] = $("#address").val();
  1366. queryData['checkState'] = $("#checkState").val();
  1367. queryData['isPublic'] = $("#isPublic").val();
  1368. queryData['year'] = $("#year").val();
  1369. queryData['declareType'] = $("#declareType").val();
  1370. queryData['introductionMethod'] = $("#introductionMethod").val();
  1371. return queryData;
  1372. }
  1373. /**
  1374. * 查询硕博人才生活补贴申报列表
  1375. */
  1376. LivingAllowanceInfo.search = function () {
  1377. LivingAllowanceInfo.table.refresh({query: LivingAllowanceInfo.formParams()});
  1378. };
  1379. /**
  1380. * 重置查询参数
  1381. */
  1382. LivingAllowanceInfo.reset = function () {
  1383. $("#name").val("");
  1384. $("#idCard").val("");
  1385. $("#sex").val("");
  1386. $("#nation").val("");
  1387. $("#nationality").val("");
  1388. $("#provinceCode").val("");
  1389. $("#politics").val("");
  1390. $("#enterpriseId").val("").trigger("chosen:updated");
  1391. $("#industryField").val("");
  1392. // $("#introductionMode").val("");
  1393. $("#highEducation").val("");
  1394. $("#major").val("");
  1395. $("#title").val("");
  1396. $("#studyAbroad").val("");
  1397. $("#phone").val("");
  1398. $("#email").val("");
  1399. $("#address").val("");
  1400. $("#checkState").val("");
  1401. $("#isPublic").val("");
  1402. $("#year").val("");
  1403. $("#declareType").val("");
  1404. $("#introductionMethod").val("");
  1405. }
  1406. $(function () {
  1407. var defaultColunms = LivingAllowanceInfo.initColumn();
  1408. var table = new BSTable(LivingAllowanceInfo.id, "/admin/living_allowance/list?process=" + $("#process").val(), defaultColunms);
  1409. table.setPaginationType("server");
  1410. table.setOnDblClickRow(function () {
  1411. LivingAllowanceInfo.openCheckLivingAllowanceInfo($("#process").val());
  1412. });
  1413. LivingAllowanceInfo.table = table.init();
  1414. //批量加载字典表数据
  1415. var arr = [
  1416. {"name": "nation", "code": "un_nation"},
  1417. {"name": "nationality", "code": "un_nationality"},
  1418. {"name": "politics", "code": "un_political"},
  1419. {"name": "industryField", "code": "un_industryField"},
  1420. {"name": "introductionMode", "code": "un_introduction_mode"},
  1421. {"name": "highEducation", "code": "un_education"},
  1422. {"name": "declareType", "code": "un_master_education"},
  1423. {"name": "address", "code": "un_street"}];
  1424. Feng.findChildDictBatch(JSON.stringify(arr));
  1425. $("#enterpriseId").on('chosen:ready', function (e, params) {
  1426. $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
  1427. });
  1428. $("#enterpriseId").chosen({
  1429. search_contains: true,    //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
  1430. disable_search: false,
  1431. width: "100%",
  1432. enable_split_word_search: true
  1433. });
  1434. $('#checkAll').click(function () {
  1435. $("#dataTable").bootstrapTable('togglePagination').bootstrapTable('checkAll').bootstrapTable('togglePagination');
  1436. })
  1437. $('#uncheckAll').click(function () {
  1438. $("#dataTable").bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
  1439. })
  1440. });