livingAllowanceInfo.js 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339
  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 + '/livingAllowanceInfo/livingAllowanceInfo_check?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.showHczxRejectModal = function () {
  420. if (this.check()) {
  421. if (LivingAllowanceInfo.seItem.isPublic != 1) {
  422. Feng.info("当前记录不是待核查征信状态,无法核查");
  423. return;
  424. }
  425. $("#hczxId").val(LivingAllowanceInfo.seItem.id);
  426. $("#hczxMsg").val("");
  427. $("#hczxRejectModal").modal("show");
  428. }
  429. }
  430. /**
  431. * 核查征信驳回提交
  432. */
  433. LivingAllowanceInfo.hczxReject = function () {
  434. var id = $("#hczxId").val();
  435. var msg = $("#hczxMsg").val();
  436. if (msg == null || msg == '') {
  437. Feng.info("请填写失信原因");
  438. return;
  439. }
  440. var operation = function () {
  441. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/hczxReject", function (data) {
  442. if (data.code == 200) {
  443. Feng.success(data.msg);
  444. LivingAllowanceInfo.table.refresh();
  445. $("#hczxRejectModal").modal("hide");
  446. } else {
  447. Feng.error(data.msg);
  448. }
  449. }, function (data) {
  450. Feng.error("核查征信失败!" + data.responseJSON.message + "!");
  451. });
  452. ajax.setData({"id": id, "outMsg": msg, "creditStatus": 3});
  453. ajax.start();
  454. }
  455. Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
  456. }
  457. LivingAllowanceInfo.showDataCheckModal = function (type) {
  458. $("#hczxForm").css("display", "none");
  459. switch (type) {
  460. case 1: //待核查征信名单-导出
  461. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.checkExport()").text("导出");
  462. $("#exportCommonModalLabel").text("待核查征信名单");
  463. break;
  464. case 2: //待核查征信名单-核查征信通过
  465. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.hczxPass()").text("提交");
  466. $("#exportCommonModalLabel").text("待核查征信名单");
  467. break;
  468. case 3: //公示(批量)
  469. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.public()").text("公示");
  470. $("#exportCommonModalLabel").text("待公示名单");
  471. $("#hczxForm").css("display", "block");
  472. $(".time").each(function () {
  473. laydate.render({
  474. elem: "#" + $(this).attr("id")
  475. , type: 'date'
  476. , format: 'yyyy年MM月dd日'
  477. });
  478. });
  479. break;
  480. case 4: //公示通过(批量)
  481. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.publicPass()").text("提交");
  482. $("#exportCommonModalLabel").text("公示通过名单");
  483. break;
  484. case 5: //待公布名单
  485. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.publish()").text("公布");
  486. $("#exportCommonModalLabel").text("待公布名单");
  487. break;
  488. case 6: //待发证名单
  489. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.issue()").text("提交");
  490. $("#exportCommonModalLabel").text("待发证名单");
  491. break;
  492. case 7: //公示名单预览
  493. $("#hczxButton").attr("onclick", "LivingAllowanceInfo.needPublicExport()").text("导出");
  494. $("#exportCommonModalLabel").text("待公示名单");
  495. break;
  496. }
  497. $('#dataTable').bootstrapTable('destroy');
  498. $('#dataTable').bootstrapTable({
  499. url: Feng.ctxPath + "/livingAllowanceInfo/selectNeedCheckData?type=" + type,
  500. method: 'POST',
  501. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  502. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  503. showRefresh: false, // 是否显示刷新按钮
  504. clickToSelect: true, // 是否启用点击选中行
  505. singleSelect: false, // 设置True 将禁止多选
  506. striped: true, // 是否显示行间隔色
  507. pagination: true, // 设置为 true 会在表格底部显示分页条
  508. paginationHAlign: "left",
  509. paginationDetailHAlign: "right",
  510. sidePagination: "client", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  511. pageNumber: 1, //初始化加载第一页,默认第一页
  512. pageSize: 10, //每页的记录行数(*)
  513. pageList: [10, 25, 50, 100, 500, 1000, 1500], //可供选择的每页的行数(*)
  514. maintainSelected: true, //全表全选需要开启
  515. showColumns: false,
  516. responseHandler: function (res) {
  517. $("#exportCommonModal").modal("show");
  518. return res.obj.rows;
  519. },
  520. columns:
  521. [
  522. {field: "selectItem", checkbox: true},
  523. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "20%"},
  524. {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "30%"},
  525. {
  526. title: '企业名称',
  527. field: 'enterpriseName',
  528. visible: true,
  529. align: 'center',
  530. valign: 'middle',
  531. width: "40%"
  532. },
  533. {
  534. title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "10%",
  535. formatter: function (value, row, index) {
  536. if (value == -1) {
  537. return "<span style='color: #ed5565;'>审核不通过</span>";
  538. }
  539. if (value == 35) {
  540. return "<span style='color: #1ab394;'>审核通过</span>";
  541. }
  542. }
  543. },
  544. ]
  545. });
  546. }
  547. /**
  548. * 选择导出提交
  549. */
  550. LivingAllowanceInfo.checkExport = function () {
  551. var selected = $('#dataTable').bootstrapTable('getSelections');
  552. if (!selected || selected.length < 1) {
  553. Feng.info("请至少选择一行数据!");
  554. return;
  555. }
  556. var ids = "";
  557. for (var i = 0; i < selected.length; i++) {
  558. ids = ids + selected[i].id + ",";
  559. }
  560. window.location.href = Feng.ctxPath + "/livingAllowanceInfoExport/exportHczx?ids=" + ids;
  561. }
  562. LivingAllowanceInfo.actalUpload = function (){
  563. $("#file,#fileName").val("");
  564. $("#importModal").modal("show");
  565. }
  566. /**
  567. *
  568. */
  569. LivingAllowanceInfo.importSubmit = function (){
  570. $("#import-form")[0].submit();
  571. // layer.confirm('您需要导入数据并提交吗?', {
  572. // btn: ['仅导入','导入并提交','取消'] //按钮
  573. // }, function(index){
  574. // $("#importType").val(1);
  575. // $("#import-form")[0].submit();
  576. // layer.close(index);
  577. // }, function(index){
  578. // $("#importType").val(2);
  579. // $("#import-form")[0].submit();
  580. // layer.close(index);
  581. // }, function(index){
  582. // layer.close(index);
  583. // });
  584. }
  585. LivingAllowanceInfo.importCallBack = function (data) {
  586. if (data.code == 200) {
  587. $("#importModal").modal("hide");
  588. LivingAllowanceInfo.table.refresh();
  589. Feng.success(data.msg);
  590. } else {
  591. Feng.error(data.msg);
  592. }
  593. }
  594. LivingAllowanceInfo.initCheckFileTable = function (){
  595. $('#checkFileTable').bootstrapTable('destroy');
  596. $('#checkFileTable').bootstrapTable({
  597. url: Feng.ctxPath + "/talentCommonFile/listTalentFile",
  598. method: 'POST',
  599. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  600. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  601. showRefresh: false, // 是否显示刷新按钮
  602. clickToSelect: true, // 是否启用点击选中行
  603. singleSelect: true, // 设置True 将禁止多选
  604. striped: true, // 是否显示行间隔色
  605. pagination: false, // 设置为 true 会在表格底部显示分页条
  606. paginationHAlign: "left",
  607. paginationDetailHAlign: "right",
  608. sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  609. showColumns: false,
  610. queryParams: function (params) {
  611. return {"mainId":$("#batch").val(),"fileTypeId":"master_living_allowance"};
  612. },
  613. rowStyle : function(row,index){
  614. return {css: {"word-break": "break-word", "white-space": "inherit"}}
  615. },
  616. columns:
  617. [
  618. {title: '附件原名', field: 'orignName', visible: true, align: 'center', valign: 'middle',width:'120px'},
  619. {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px",
  620. formatter:function (value,row ,index){
  621. var sn = value.lastIndexOf(".");
  622. var suffix = value.substring(sn+1,value.length);
  623. var imgStr = "";
  624. if(suffix=="pdf"||suffix=="PDF"){
  625. imgStr = "<button type='button' onclick=\"Feng.showPdf('"+value+"','"+row.id+"','"+row.orignName+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
  626. }else if(suffix == "xlsx" || suffix=="XLSX" || suffix == 'xls' || suffix == 'XLS'){
  627. imgStr = "<button type='button' onclick=\"Feng.showExcel('"+value+"','"+row.id+"','"+row.orignName+"')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
  628. }else{
  629. imgStr = '<img class=\"imgUrl\" src=\"'+value+'\" style=\"width:25px;height:25px;\">';
  630. }
  631. return imgStr;
  632. }
  633. },
  634. {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle',width:'80px',
  635. formatter:function (value,row ,index){
  636. return "<button type='button' onclick=\"downloadFile('"+row.id+"',1)\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button>"+
  637. "<button type='button' onclick=\"LivingAllowanceInfo.deleteCheckFile('"+row.id+"','"+CONFIG.project_master_living_allowance+"')\" class=\"btn btn-xs btn-danger\">" +
  638. "<i class=\"fa fa-times\"></i>删除" +
  639. "</button>";
  640. }
  641. },
  642. ],
  643. onPostBody: function () {
  644. $('#checkFileTable'+"td.uitd_showTip").bind("mouseover", function () {
  645. var htm = $(this).html();
  646. $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
  647. });
  648. $(".imgUrl").viewer({ fullscreen:false});
  649. },
  650. });
  651. }
  652. /**
  653. * 核查材料留存上传
  654. */
  655. LivingAllowanceInfo.showCheckFileModal = function (){
  656. Feng.addAjaxSelect({
  657. "id": "batch",
  658. "displayCode": "id",
  659. "displayName": "batch",
  660. "type": "GET",
  661. "url": Feng.ctxPath + "/batch/listBatchByType?type=" + CONFIG.project_master_living_allowance
  662. });
  663. $("#upload_file").val("");
  664. $("#checkFileModal").modal("show");
  665. }
  666. LivingAllowanceInfo.checkFileUpload = function (){
  667. var batch = $("#batch").val();
  668. if(Feng.isEmptyStr(batch)){
  669. Feng.info("请选择申报批次后再上传!");return;
  670. }
  671. $("#upload_file ").unbind("change");
  672. $("#upload_file ").change(function () {
  673. var formData = new FormData();
  674. formData.append("fileTypeId","master_living_allowance");
  675. formData.append("mainId",batch);
  676. formData.append("fileId","");
  677. for(var i=0; i<$('#upload_file')[0].files.length;i++){
  678. formData.append('file', $('#upload_file')[0].files[i]);
  679. }
  680. $.ajax({
  681. url: Feng.ctxPath + "/talentCommonFile/uploadBatch",
  682. type: "POST",
  683. processData: false,
  684. contentType: false,
  685. data: formData,
  686. success: function(data){
  687. $("#checkFileTable").bootstrapTable("refresh", {});
  688. Feng.info(data.msg);
  689. },error: function(data) {
  690. Feng.error("上传失败!" + data.responseJSON.message + "!");
  691. }
  692. });
  693. });
  694. $('#upload_file').val("");
  695. $('#upload_file').click();
  696. }
  697. LivingAllowanceInfo.deleteCheckFile = function (id,type){
  698. var operation = function() {
  699. var ajax = new $ax(Feng.ctxPath + "/talentCommonFile/deleteFile", function (data) {
  700. if(data.code=200){
  701. Feng.success(data.msg);
  702. $("#checkFileTable").bootstrapTable("refresh", {});
  703. }else{
  704. Feng.error(data.msg);
  705. }
  706. }, function (data) {
  707. Feng.error("删除失败!" + data.responseJSON.message + "!");
  708. });
  709. ajax.set("id", id);
  710. ajax.set("type",type);
  711. ajax.start();
  712. }
  713. Feng.confirm("删除后无法恢复,确认删除吗?", operation);
  714. }
  715. /**
  716. * 审核不通过
  717. */
  718. LivingAllowanceInfo.setNotPass = function(){
  719. var selecteds = $('#' + this.id).bootstrapTable('getSelections');
  720. if(selecteds.length == 0){
  721. Feng.info("请选择需要设置审核不通过的行");
  722. return ;
  723. }
  724. var ids = "";
  725. for(var key in selecteds){
  726. ids = ids + selecteds[key].id + ",";
  727. }
  728. ids = ids.substring(0,ids.length-1);
  729. layer.open({
  730. type: 1,
  731. id: "notPassModal",
  732. title: '修改',
  733. area: ['800px', '450px'], //宽高
  734. fix: false, //不固定
  735. shade: 0,
  736. maxmin: true,
  737. content: '<form id="checkNotPass">\n' +
  738. ' <div class="form-group" style="margin: 10px;">\n' +
  739. ' <label for="checkMsgNotPass" class="control-label" >审核不通过原因</label>\n' +
  740. ' <textarea class="form-control" id="checkMsgNotPass" placeholder="此功能适用于未在申报提交截止时间内提交的数据" rows="6"></textarea>\n' +
  741. ' </div>\n' +
  742. ' </form>',
  743. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  744. btnAlign: 'c',
  745. zIndex: layer.zIndex,
  746. yes: function (index, layero) {
  747. var checkMsg = $("#checkMsgNotPass").val();
  748. if(Feng.isEmptyStr(checkMsg)){
  749. Feng.info("请填写审核不通过原因");
  750. return ;
  751. }
  752. var operation = function(){
  753. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/setNotPass", function (data) {
  754. if(data.code==200){
  755. Feng.success(data.msg);
  756. LivingAllowanceInfo.table.refresh();
  757. layer.close(index);
  758. }else{
  759. Feng.error(data.msg);
  760. }
  761. }, function (data) {
  762. Feng.error("设置审核不通过失败!" + data.responseJSON.message + "!");
  763. });
  764. ajax.set("ids",ids);
  765. ajax.set("msg",checkMsg);
  766. ajax.start();
  767. }
  768. Feng.confirm("一旦提交无法修改,确定设置所选数据为审核不通过?", operation);
  769. }
  770. });
  771. }
  772. /**
  773. * 批量征信通过
  774. */
  775. LivingAllowanceInfo.hczxPass = function () {
  776. var selected = $('#dataTable').bootstrapTable('getSelections');
  777. if (!selected || selected.length < 1) {
  778. Feng.info("请至少选择一行数据!");
  779. return;
  780. }
  781. var ids = "";
  782. for (var i = 0; i < selected.length; i++) {
  783. ids = ids + selected[i].id + ",";
  784. }
  785. var operation = function () {
  786. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/hczxPass", function (data) {
  787. if (data.code == 200) {
  788. Feng.success(data.msg);
  789. LivingAllowanceInfo.table.refresh();
  790. $("#exportCommonModal").modal("hide");
  791. } else {
  792. Feng.error(data.msg);
  793. }
  794. }, function (data) {
  795. Feng.error("核查征信失败!" + data.responseJSON.message + "!");
  796. });
  797. ajax.set("ids", ids);
  798. ajax.start();
  799. }
  800. Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
  801. }
  802. /**
  803. * 公示预览
  804. */
  805. LivingAllowanceInfo.needPublicExport = function () {
  806. var selected = $('#dataTable').bootstrapTable('getSelections');
  807. if (!selected || selected.length < 1) {
  808. Feng.info("请至少选择一行数据!");
  809. return;
  810. }
  811. var ids = "";
  812. for (var i = 0; i < selected.length; i++) {
  813. ids = ids + selected[i].id + ",";
  814. }
  815. var operation = function () {
  816. $("#exportCommonModal").modal("hide");
  817. window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/livingAllowanceInfoExport/exportPublic?ids=" + ids));
  818. }
  819. Feng.confirm("确定要公示预览吗?", operation);
  820. }
  821. /**
  822. * 公示
  823. */
  824. LivingAllowanceInfo.public = function () {
  825. var selected = $('#dataTable').bootstrapTable('getSelections');
  826. if (!selected || selected.length < 1) {
  827. Feng.info("请至少选择一行数据!");
  828. return;
  829. }
  830. var ids = "";
  831. for (var i = 0; i < selected.length; i++) {
  832. ids = ids + selected[i].id + ",";
  833. }
  834. var isMessage = $("input[name='isSend']:checked").val();
  835. var typeName = $("#typeName").val();
  836. var address = $("#web").val();
  837. var publicStartTime = $("#publicStartTime").val();
  838. var publicEndTime = $("#publicEndTime").val();
  839. var dep = $("#dep").val();
  840. var phone = $("#fyphone").val();
  841. var email = $("#fyemail").val();
  842. if (isMessage == 1) {
  843. if (typeName == null || typeName == '') {
  844. Feng.info("请填写公示类型");
  845. return;
  846. }
  847. if (address == null || address == '') {
  848. Feng.info("请填写公示平台");
  849. return;
  850. }
  851. if (publicStartTime == null || publicStartTime == '') {
  852. Feng.info("请填写公示开始时间");
  853. return;
  854. }
  855. if (publicEndTime == null || publicEndTime == '') {
  856. Feng.info("请填写公示截止时间");
  857. return;
  858. }
  859. if (dep == null || dep == '') {
  860. Feng.info("请填写反映单位");
  861. return;
  862. }
  863. if (phone == null || phone == '') {
  864. Feng.info("请填写联系电话");
  865. return;
  866. }
  867. if (email == null || email == '') {
  868. Feng.info("请填写联系邮箱");
  869. return;
  870. }
  871. }
  872. var operation = function () {
  873. var index = layer.open({
  874. type: 1,
  875. title: '公示',
  876. area: ['300px', '220px'], //宽高
  877. fix: false, //不固定
  878. maxmin: true,
  879. content: "<input class='form-control' id='publicBatchId' style='width:90%;margin: 10px' placeholder='请输入公示批次'>",
  880. btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  881. btnAlign: 'c',
  882. success: function () {
  883. laydate.render({elem: "#publicBatchId", type: 'month', trigger: 'click', format: "yyyyMM"});
  884. },
  885. yes: function (index, layero) {
  886. var month = $("#publicBatchId").val();
  887. if (Feng.isEmptyStr(month)) {
  888. Feng.info("请填写公示批次");
  889. return;
  890. }
  891. layer.close(index);
  892. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/publicBatch", function (data) {
  893. if (data.code == 200) {
  894. Feng.success(data.msg);
  895. LivingAllowanceInfo.table.refresh();
  896. $("#exportCommonModal").modal("hide");
  897. } else {
  898. Feng.error(data.msg);
  899. }
  900. }, function (data) {
  901. Feng.error("公示失败!" + data.responseJSON.message + "!");
  902. });
  903. ajax.set("ids", ids);
  904. ajax.set("typeName", typeName);
  905. ajax.set("address", address);
  906. ajax.set("publicStartTime", publicStartTime);
  907. ajax.set("publicEndTime", publicEndTime);
  908. ajax.set("dep", dep);
  909. ajax.set("phone", phone);
  910. ajax.set("email", email);
  911. ajax.set("isMessage", isMessage);
  912. ajax.set("batch", month);
  913. ajax.start();
  914. }
  915. });
  916. }
  917. Feng.confirm("确定要公示吗?", operation);
  918. }
  919. //已公示的数据根据公示批次公示导出
  920. LivingAllowanceInfo.publicExport = function (type) {
  921. var url = "", dateType = '', format = '';
  922. if (type == 1) { //公示导出
  923. url = Feng.ctxPath + "/livingAllowanceInfoExport/publicExport";
  924. dateType = 'month';
  925. format = "yyyyMM";
  926. } else if (type == 2) { //公布导出
  927. url = Feng.ctxPath + "/livingAllowanceInfoExport/publishExport";
  928. dateType = 'date';
  929. format = "yyyy-MM-dd";
  930. }
  931. layer.open({
  932. type: 1,
  933. title: type == 1 ? '公示导出' : "公布导出",
  934. area: ['800px', '300px'], //宽高
  935. fix: false, //不固定
  936. maxmin: true,
  937. content: "<form id=\"publicExportForm\" action=\"" + url + "\" target=\"hiddenIframe\" class=\"form-horizontal \" style='padding-top: 10px;'>\n" +
  938. " <div class=\"form-group col-sm-12\">\n" +
  939. " <div class=\"row\">\n" +
  940. " <label class=\"col-sm-2 control-label\">开始时间</label>\n" +
  941. " <div class=\"col-sm-4\">\n" +
  942. " <input type=\"text\" id=\"startTime\" name=\"startTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
  943. " </div>\n" +
  944. " <label class=\"col-sm-2 control-label\">截止时间</label>\n" +
  945. " <div class=\"col-sm-4\">\n" +
  946. " <input type=\"text\" id=\"endTime\" name=\"endTime\" time=\"time\" format=\"month\" class=\"form-control\">\n" +
  947. " </div>\n" +
  948. " </div>\n" +
  949. " </div>\n" +
  950. " </form>",
  951. btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  952. btnAlign: 'c',
  953. success: function (index, layero) {
  954. $("#publicExportForm")[0].reset();
  955. $("input[time='time']").each(function () {
  956. laydate.render({
  957. elem: "#" + $(this).attr("id")
  958. , type: dateType
  959. , format: format
  960. , trigger: 'click'
  961. });
  962. });
  963. },
  964. yes: function (index) {
  965. var startTime = $("#startTime").val();
  966. var endTime = $("#endTime").val();
  967. if (startTime == null || startTime == '') {
  968. Feng.info("请选择开始时间");
  969. return;
  970. }
  971. if (endTime == null || endTime == '') {
  972. Feng.info("请选择结束时间");
  973. return;
  974. }
  975. $("#publicExportForm")[0].submit();
  976. layer.close(index)
  977. }
  978. });
  979. }
  980. /**
  981. * 公示再审核
  982. */
  983. LivingAllowanceInfo.afterCheck = function () {
  984. if (this.check()) {
  985. if (LivingAllowanceInfo.seItem.isPublic != 3) {
  986. Feng.info("当前记录不是公示中状态,无法审核");
  987. return;
  988. }
  989. if (LivingAllowanceInfo.seItem.creditStatus == 3) {
  990. $("#zxNotice").text("当前申请人核查征信不通过,请谨慎选择审核状态!征信意见为:" + LivingAllowanceInfo.seItem.outMsg);
  991. }
  992. if (LivingAllowanceInfo.seItem.checkState == -1) {
  993. var html = '<option value="">请选择</option>\n' +
  994. ' <option value="2">驳回/恢复</option>';
  995. $("#checkStateAfter").empty().append(html);
  996. }
  997. if (LivingAllowanceInfo.seItem.checkState == 35) {
  998. var html = '<option value="">请选择</option>\n' +
  999. ' <option value="-1">审核不通过</option>' +
  1000. ' <option value="2">驳回</option>';
  1001. $("#checkStateAfter").empty().append(html);
  1002. }
  1003. $("#checkForm")[0].reset();
  1004. $("#mainId").val(LivingAllowanceInfo.seItem.id);
  1005. $("#checkModal").modal("show");
  1006. }
  1007. }
  1008. /**
  1009. * 公示后审核提交
  1010. */
  1011. LivingAllowanceInfo.afterCheckSubmit = function () {
  1012. var checkState = $("#checkStateAfter").val();
  1013. var msg = $("#msg").val();
  1014. if (checkState == null || checkState == '') {
  1015. Feng.info("请选择审核状态");
  1016. return;
  1017. }
  1018. if (msg == null || msg == '') {
  1019. Feng.info("请填写审核意见");
  1020. return;
  1021. }
  1022. var operation = function () {
  1023. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/afterCheck", function (data) {
  1024. if (data.code == 200) {
  1025. Feng.success(data.msg);
  1026. LivingAllowanceInfo.table.refresh();
  1027. $("#checkModal").modal("hide");
  1028. } else {
  1029. Feng.error(data.msg);
  1030. }
  1031. }, function (data) {
  1032. Feng.error("审核失败!" + data.responseJSON.message + "!");
  1033. });
  1034. ajax.setData({"id": $("#mainId").val(), "checkState": $("#checkStateAfter").val(), "checkMsg": msg});
  1035. ajax.start();
  1036. }
  1037. Feng.confirm("一旦提交无法修改,确定提交吗?", operation);
  1038. }
  1039. /**
  1040. * 批量公示通过
  1041. * @param type
  1042. */
  1043. LivingAllowanceInfo.publicPass = function () {
  1044. var selected = $('#dataTable').bootstrapTable('getSelections');
  1045. if (!selected || selected.length < 1) {
  1046. Feng.info("请至少选择一行数据!");
  1047. return;
  1048. }
  1049. var ids = "";
  1050. for (var i = 0; i < selected.length; i++) {
  1051. ids = ids + selected[i].id + ",";
  1052. }
  1053. var operation = function () {
  1054. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/publicPass", function (data) {
  1055. if (data.code == 200) {
  1056. Feng.success(data.msg);
  1057. LivingAllowanceInfo.table.refresh();
  1058. $("#exportCommonModal").modal("hide");
  1059. } else {
  1060. Feng.error(data.msg);
  1061. }
  1062. }, function (data) {
  1063. Feng.error("公示通过失败!" + data.responseJSON.message + "!");
  1064. });
  1065. ajax.set("ids", ids);
  1066. ajax.start();
  1067. }
  1068. Feng.confirm("一旦提交无法修改,确定公示通过吗?", operation);
  1069. }
  1070. /**
  1071. * 兑现
  1072. */
  1073. LivingAllowanceInfo.issue = function () {
  1074. var selected = $('#dataTable').bootstrapTable('getSelections');
  1075. if (!selected || selected.length < 1) {
  1076. Feng.info("请至少选择一行数据!");
  1077. return;
  1078. }
  1079. var ids = "";
  1080. for (var i = 0; i < selected.length; i++) {
  1081. ids = ids + selected[i].id + ",";
  1082. }
  1083. var operation = function () {
  1084. var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/issue", function (data) {
  1085. if (data.code == 200) {
  1086. Feng.success(data.msg);
  1087. LivingAllowanceInfo.table.refresh();
  1088. $("#exportCommonModal").modal("hide");
  1089. } else {
  1090. Feng.error(data.msg);
  1091. }
  1092. }, function (data) {
  1093. Feng.error("兑现失败!" + data.responseJSON.message + "!");
  1094. });
  1095. ajax.set("ids", ids);
  1096. ajax.start();
  1097. }
  1098. Feng.confirm("一旦兑现无法修改,确定要兑现吗?", operation);
  1099. }
  1100. LivingAllowanceInfo.showExportModal = function (){
  1101. $("#exportForm")[0].reset();
  1102. $("#commonExportModal").modal("show");
  1103. }
  1104. LivingAllowanceInfo.export = function (process){
  1105. var operation = function() {
  1106. var names = '';
  1107. var fieldCodes = '';
  1108. $("#field_info li input").each(function(index){
  1109. if($(this).is(":checked")){
  1110. fieldCodes = fieldCodes + $(this).val() + ",";
  1111. names = names + $(this).next().text() + ",";
  1112. }
  1113. });
  1114. var param = LivingAllowanceInfo.formParams();
  1115. param.names = names;
  1116. param.values = fieldCodes;
  1117. param.process = process;
  1118. window.location.href = Feng.setUrlParam(Feng.ctxPath + "/livingAllowanceInfoExport/commonExport", param);
  1119. // window.location.href = Feng.ctxPath + "/api/talentInfoExport/export?names=" + names + "&fieldCodes=" + fieldCodes + "&name=" + $("#name").val() + "&idCard=" + $("#idCard").val()
  1120. // + "&sex=" + $("#sex").val()+ "&nation=" + $("#nation").val()+ "&nationality=" + $("#nationality").val()+ "&talentType=" + $("#talentType").val()+ "&talentArrange=" + $("#talentArrange").val();
  1121. };
  1122. Feng.confirm("确定要导出数据吗?", operation);
  1123. }
  1124. LivingAllowanceInfo.prepareSearch = function () {
  1125. var sex = $("#pub_sex").val();
  1126. var checkState = $("#pub_checkState").val();
  1127. var name = $("#pub_name").val();
  1128. $('#dataTable').bootstrapTable("refresh", {"query": {"sex": sex, "checkState": checkState, "name": name}});
  1129. }
  1130. LivingAllowanceInfo.prepareReset = function () {
  1131. $("#pub_sex").val("");
  1132. $("#pub_checkState").val("");
  1133. $("#pub_name").val("");
  1134. }
  1135. /**
  1136. * 是否发送短信
  1137. */
  1138. LivingAllowanceInfo.toggleMessage = function () {
  1139. var isMessage = $("input[name='isSend']:checked").val();
  1140. if (isMessage == 1) {
  1141. $("#messageEdit").css("display", "block");
  1142. } else if (isMessage == 2) {
  1143. $("#messageEdit").css("display", "none");
  1144. }
  1145. }
  1146. //回调
  1147. LivingAllowanceInfo.callBack = function (data) {
  1148. Feng.info(data.msg);
  1149. if (data.code == 200) {
  1150. $("#hczxModal").modal("hide");
  1151. LivingAllowanceInfo.table.refresh();
  1152. }
  1153. }
  1154. LivingAllowanceInfo.checkAll = function(){
  1155. $("#field_info input").each(function () {
  1156. this.checked = true;
  1157. })
  1158. }
  1159. /**
  1160. * 反选
  1161. */
  1162. LivingAllowanceInfo.unCheckAll = function(){
  1163. $("#field_info input").each(function () {
  1164. if(this.checked){
  1165. this.checked = false;
  1166. }else{
  1167. this.checked = true;
  1168. }
  1169. })
  1170. }
  1171. LivingAllowanceInfo.showLog = function (id) {
  1172. layer.open({
  1173. type: 1,
  1174. title: "日志",
  1175. fixed: false,
  1176. content: '<table id="' + id + '"></table>',
  1177. area: ['80%', '80%'],
  1178. maxmin: true,
  1179. success: function (layero, index) {
  1180. Feng.getCheckLog(id, {
  1181. "type": CONFIG.project_master_living_allowance,
  1182. "mainId": id,
  1183. "typeFileId": "",
  1184. "active": 1
  1185. })
  1186. }
  1187. });
  1188. }
  1189. /**
  1190. * 查询表单提交参数对象
  1191. * @returns {{}}
  1192. */
  1193. LivingAllowanceInfo.formParams = function () {
  1194. var queryData = {};
  1195. queryData['name'] = $("#name").val();
  1196. queryData['idCard'] = $("#idCard").val();
  1197. queryData['sex'] = $("#sex").val();
  1198. queryData['nation'] = $("#nation").val();
  1199. queryData['nationality'] = $("#nationality").val();
  1200. queryData['provinceCode'] = $("#provinceCode").val();
  1201. queryData['politics'] = $("#politics").val();
  1202. queryData['enterpriseId'] = $("#enterpriseId").val();
  1203. queryData['industryField'] = $("#industryField").val();
  1204. queryData['introductionMode'] = $("#introductionMode").val();
  1205. queryData['highEducation'] = $("#highEducation").val();
  1206. queryData['major'] = $("#major").val();
  1207. queryData['title'] = $("#title").val();
  1208. queryData['studyAbroad'] = $("#studyAbroad").val();
  1209. queryData['phone'] = $("#phone").val();
  1210. queryData['email'] = $("#email").val();
  1211. queryData['address'] = $("#address").val();
  1212. queryData['checkState'] = $("#checkState").val();
  1213. queryData['isPublic'] = $("#isPublic").val();
  1214. queryData['year'] = $("#year").val();
  1215. queryData['declareType'] = $("#declareType").val();
  1216. queryData['introductionMethod'] = $("#introductionMethod").val();
  1217. return queryData;
  1218. }
  1219. /**
  1220. * 查询硕博人才生活补贴申报列表
  1221. */
  1222. LivingAllowanceInfo.search = function () {
  1223. LivingAllowanceInfo.table.refresh({query: LivingAllowanceInfo.formParams()});
  1224. };
  1225. /**
  1226. * 重置查询参数
  1227. */
  1228. LivingAllowanceInfo.reset = function () {
  1229. $("#name").val("");
  1230. $("#idCard").val("");
  1231. $("#sex").val("");
  1232. $("#nation").val("");
  1233. $("#nationality").val("");
  1234. $("#provinceCode").val("");
  1235. $("#politics").val("");
  1236. $("#enterpriseId").val("").trigger("chosen:updated");
  1237. $("#industryField").val("");
  1238. // $("#introductionMode").val("");
  1239. $("#highEducation").val("");
  1240. $("#major").val("");
  1241. $("#title").val("");
  1242. $("#studyAbroad").val("");
  1243. $("#phone").val("");
  1244. $("#email").val("");
  1245. $("#address").val("");
  1246. $("#checkState").val("");
  1247. $("#isPublic").val("");
  1248. $("#year").val("");
  1249. $("#declareType").val("");
  1250. $("#introductionMethod").val("");
  1251. }
  1252. $(function () {
  1253. var defaultColunms = LivingAllowanceInfo.initColumn();
  1254. var table = new BSTable(LivingAllowanceInfo.id, "/livingAllowanceInfo/list?process=" + $("#process").val(), defaultColunms);
  1255. table.setPaginationType("server");
  1256. table.setOnDblClickRow(function () {
  1257. LivingAllowanceInfo.openCheckLivingAllowanceInfo($("#process").val());
  1258. });
  1259. LivingAllowanceInfo.table = table.init();
  1260. //批量加载字典表数据
  1261. var arr = [
  1262. {"name": "nation", "code": "un_nation"},
  1263. {"name": "nationality", "code": "un_nationality"},
  1264. {"name": "politics", "code": "un_political"},
  1265. {"name": "industryField", "code": "un_industryField"},
  1266. {"name": "introductionMode", "code": "un_introduction_mode"},
  1267. {"name": "highEducation", "code": "un_education"},
  1268. {"name": "declareType", "code": "un_master_education"},
  1269. {"name": "address", "code": "un_street"}];
  1270. Feng.findChildDictBatch(JSON.stringify(arr));
  1271. $("#enterpriseId").on('chosen:ready', function (e, params) {
  1272. $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
  1273. });
  1274. $("#enterpriseId").chosen({
  1275. search_contains: true,    //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
  1276. disable_search: false,
  1277. width: "100%",
  1278. enable_split_word_search: true
  1279. });
  1280. $('#checkAll').click(function () {
  1281. $("#dataTable").bootstrapTable('togglePagination').bootstrapTable('checkAll').bootstrapTable('togglePagination');
  1282. })
  1283. $('#uncheckAll').click(function () {
  1284. $("#dataTable").bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
  1285. })
  1286. });