livingAllowanceInfo.js 62 KB

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