medicalSubsidy.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. /**
  2. * 医疗补助管理初始化
  3. */
  4. var MedicalSubsidy = {
  5. id: "MedicalSubsidyTable", //表格id
  6. seItem: null, //选中的条目
  7. table: null,
  8. layerIndex: -1
  9. };
  10. /**
  11. * 初始化表格的列
  12. */
  13. MedicalSubsidy.initColumn = function () {
  14. return [
  15. {field: 'selectItem', radio: true},
  16. {
  17. title: '申报年度',
  18. field: 'year',
  19. visible: true,
  20. align: 'center',
  21. valign: 'middle',
  22. width: "80px",
  23. 'class': 'uitd_showTip'
  24. },
  25. {
  26. title: '企业名称',
  27. field: 'enterpriseName',
  28. visible: true,
  29. align: 'center',
  30. valign: 'middle',
  31. width: "120px",
  32. 'class': 'uitd_showTip'
  33. },
  34. {
  35. title: '姓名',
  36. field: 'name',
  37. visible: true,
  38. align: 'center',
  39. valign: 'middle',
  40. width: "120px",
  41. 'class': 'uitd_showTip',
  42. formatter: function (value, row, index) {
  43. if (row.sex == 1) {
  44. return value + '<span style="color:#6495ED">【男】</span>';
  45. }
  46. if (row.sex == 2) {
  47. return value + '<span style="color:#FF82AB">【女】</span>';
  48. }
  49. }
  50. },
  51. {
  52. title: '证件类型',
  53. field: 'cardTypeName',
  54. visible: true,
  55. align: 'center',
  56. valign: 'middle',
  57. width: "80px",
  58. 'class': 'uitd_showTip'
  59. },
  60. {
  61. title: '证件号码',
  62. field: 'idCard',
  63. visible: true,
  64. align: 'center',
  65. valign: 'middle',
  66. width: "150px",
  67. 'class': 'uitd_showTip'
  68. },
  69. {
  70. title: '人才层次',
  71. field: 'talentArrangeName',
  72. visible: true,
  73. align: 'center',
  74. valign: 'middle',
  75. width: "100px",
  76. 'class': 'uitd_showTip'
  77. },
  78. {
  79. title: '籍贯',
  80. field: 'nativePlace',
  81. visible: true,
  82. align: 'center',
  83. valign: 'middle',
  84. width: "100px",
  85. 'class': 'uitd_showTip'
  86. },
  87. {
  88. title: '现居地址',
  89. field: 'address',
  90. visible: true,
  91. align: 'center',
  92. valign: 'middle',
  93. width: "120px",
  94. 'class': 'uitd_showTip'
  95. },
  96. {
  97. title: '联系电话',
  98. field: 'phone',
  99. visible: true,
  100. align: 'center',
  101. valign: 'middle',
  102. width: "120px",
  103. 'class': 'uitd_showTip'
  104. },
  105. {
  106. title: '开户银行网点',
  107. field: 'bankAddress',
  108. visible: true,
  109. align: 'center',
  110. valign: 'middle',
  111. width: "130px",
  112. 'class': 'uitd_showTip'
  113. },
  114. {
  115. title: '银行账号',
  116. field: 'bankNumber',
  117. visible: true,
  118. align: 'center',
  119. valign: 'middle',
  120. width: "120px",
  121. 'class': 'uitd_showTip'
  122. },
  123. {
  124. title: '兑现金额',
  125. field: 'cashMoney',
  126. visible: true,
  127. align: 'center',
  128. valign: 'middle',
  129. width: "100px",
  130. 'class': 'uitd_showTip'
  131. },
  132. {
  133. title: '首次提交时间',
  134. field: 'firstSubmitTime',
  135. visible: true,
  136. align: 'center',
  137. valign: 'middle',
  138. width: "100px",
  139. 'class': 'uitd_showTip'
  140. },
  141. {
  142. title: '最新提交时间',
  143. field: 'newSubmitTime',
  144. visible: true,
  145. align: 'center',
  146. valign: 'middle',
  147. width: "100px",
  148. 'class': 'uitd_showTip'
  149. },
  150. {
  151. title: '审核状态',
  152. field: 'checkState',
  153. visible: true,
  154. align: 'center',
  155. valign: 'middle',
  156. width: "120px",
  157. 'class': 'uitd_showTip',
  158. formatter: function (value, row, index) {
  159. if (value == -1) {
  160. return '<span class=\'label label-danger\'>审核不通过</span>';
  161. }
  162. if (value == 1) {
  163. return '<span class=\'label\'>待提交</span>';
  164. }
  165. if (value == 2) {
  166. return '<span class=\'label label-info\'>待审核</span>';
  167. }
  168. if (value == 3) {
  169. return '<span class=\'label label-success\'>重新提交</span>';
  170. }
  171. if (value == 4) {
  172. return '<span class=\'label label-danger\'>审核驳回</span>';
  173. }
  174. if (value == 5) {
  175. return '<span class=\'label label-primary\'>审核通过</span>';
  176. }
  177. }
  178. },
  179. {
  180. title: '公示状态',
  181. field: 'publicState',
  182. visible: true,
  183. align: 'center',
  184. valign: 'middle',
  185. width: "100px",
  186. 'class': 'uitd_showTip',
  187. formatter: function (value, row, index) {
  188. if (value == 1) {
  189. return '<span class=\'label label-success\'>待公示</span>';
  190. }
  191. if (value == 2) {
  192. return '<span class=\'label label-danger\'>公示中</span>';
  193. }
  194. if (value == 3) {
  195. return '<span class=\'label label-info\'>待兑现</span>';
  196. }
  197. if (value == 4) {
  198. return '<span class=\'label label-primary\'>已兑现</span>';
  199. }
  200. }
  201. },
  202. {
  203. title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
  204. formatter: function (value, row, index) {
  205. return "<span class='label label-success' onclick=\"MedicalSubsidy.showLog('" + value + "')\" >" +
  206. "<i class=\"fa fa-book\"></i>日志" +
  207. "</span>";
  208. }
  209. }
  210. ];
  211. };
  212. /**
  213. * 检查是否选中
  214. */
  215. MedicalSubsidy.check = function () {
  216. var selected = $('#' + this.id).bootstrapTable('getSelections');
  217. if (selected.length == 0) {
  218. Feng.info("请先选中表格中的某一记录!");
  219. return false;
  220. } else {
  221. MedicalSubsidy.seItem = selected[0];
  222. return true;
  223. }
  224. };
  225. MedicalSubsidy.formParams = function () {
  226. var queryData = {};
  227. queryData['year'] = $("#year").val();
  228. queryData['enterpriseName'] = $("#enterpriseName").val();
  229. queryData['name'] = $("#name").val();
  230. queryData['sex'] = $("#sex").val();
  231. queryData['cardType'] = $("#cardType").val();
  232. queryData['idcard'] = $("#idcard").val();
  233. queryData['talentArrange'] = $("#talentArrange").val();
  234. queryData['certificateNo'] = $("#certificateNo").val();
  235. queryData['address'] = $("#address").val();
  236. queryData['phone'] = $("#phone").val();
  237. queryData['checkState'] = $("#checkState").val();
  238. return queryData;
  239. }
  240. /**
  241. * 查询医疗补助列表
  242. */
  243. MedicalSubsidy.search = function () {
  244. MedicalSubsidy.table.refresh({query: MedicalSubsidy.formParams()});
  245. };
  246. /**
  247. * 重置
  248. */
  249. MedicalSubsidy.reset = function () {
  250. $("#year").val("");
  251. $("#enterpriseName").val("");
  252. $("#name").val("");
  253. $("#sex").val("");
  254. $("#cardType").val("");
  255. $("#idcard").val("");
  256. $("#talentArrange").val("");
  257. $("#certificateNo").val("");
  258. $("#address").val("");
  259. $("#phone").val("");
  260. $("#checkState").val("");
  261. }
  262. /**
  263. * 显示审核日志
  264. */
  265. MedicalSubsidy.showLog = function (id) {
  266. layer.open({
  267. type: 1,
  268. title: "日志",
  269. fixed: false,
  270. content: '<table id="' + id + '"></table>',
  271. area: ['80%', '80%'],
  272. maxmin: true,
  273. success: function (layero, index) {
  274. Feng.getCheckLog(id, {"type": CONFIG.project_medical, "mainId": id, "typeFileId": "", "active": 1})
  275. }
  276. });
  277. }
  278. MedicalSubsidy.openCheckMedicalSubsidy = function () {
  279. if (this.check()) {
  280. var index = layer.open({
  281. type: 2,
  282. title: '医疗补助审核',
  283. area: 'auto', //宽高
  284. fix: false, //不固定
  285. maxmin: true,
  286. content: Feng.ctxPath + '/medicalSubsidy/toCheckPage/' + MedicalSubsidy.seItem.id,
  287. btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
  288. btnAlign: 'c',
  289. btn1: function (index, layero) {
  290. var obj = layero.find("iframe")[0].contentWindow;
  291. obj.MedicalSubsidyInfoDlg.showCheckModal();
  292. }, btn2: function (index, layero) {
  293. var obj = layero.find("iframe")[0].contentWindow;
  294. obj.MedicalSubsidyInfoDlg.submitCheck();
  295. return false;
  296. },
  297. success: function (layero, index) {
  298. layer.tips('审核完成并确认无误后点击', '.layui-layer-btn1', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
  299. },
  300. end: function () {
  301. layer.closeAll('tips');
  302. }
  303. });
  304. MedicalSubsidy.layerIndex = index;
  305. layer.full(index);
  306. }
  307. }
  308. /**
  309. * 显示需要处理的数据
  310. * @param type
  311. */
  312. MedicalSubsidy.showDataCheckModal = function (type) {
  313. $("#hczxForm").css("display", "none");
  314. switch (type) {
  315. case 1: //公式预览
  316. $("#hczxButton").attr("onclick", "MedicalSubsidy.publicExport()").text("导出");
  317. $("#exportCommonModalLabel").text("公式预览");
  318. break;
  319. case 2: //待核查征信名单-核查征信通过
  320. $("#hczxButton").attr("onclick", "MedicalSubsidy.public()").text("提交");
  321. $("#exportCommonModalLabel").text("公示");
  322. $("#hczxForm").css("display", "block");
  323. $(".time").each(function () {
  324. laydate.render({
  325. elem: "#" + $(this).attr("id")
  326. , type: 'date'
  327. , format: 'yyyy年MM月dd日'
  328. });
  329. });
  330. break;
  331. case 3: //公示通过
  332. $("#hczxButton").attr("onclick", "MedicalSubsidy.publicPass()").text("提交");
  333. $("#exportCommonModalLabel").text("批量公示通过");
  334. break;
  335. case 4: //兑现
  336. $("#hczxButton").attr("onclick", "MedicalSubsidy.cash()").text("兑现");
  337. $("#exportCommonModalLabel").text("兑现");
  338. break;
  339. }
  340. $('#dataTable').bootstrapTable('destroy');
  341. $('#dataTable').bootstrapTable({
  342. url: Feng.ctxPath + "/medicalSubsidy/selectNeedCheckData?type=" + type,
  343. method: 'POST',
  344. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  345. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  346. showRefresh: false, // 是否显示刷新按钮
  347. clickToSelect: true, // 是否启用点击选中行
  348. singleSelect: false, // 设置True 将禁止多选
  349. striped: true, // 是否显示行间隔色
  350. pagination: true, // 设置为 true 会在表格底部显示分页条
  351. paginationHAlign: "left",
  352. paginationDetailHAlign: "right",
  353. sidePagination: "client", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  354. pageNumber: 1, //初始化加载第一页,默认第一页
  355. pageSize: 10, //每页的记录行数(*)
  356. pageList: [10, 25, 50, 100, 500, 1000, 1500], //可供选择的每页的行数(*)
  357. maintainSelected: true, //全表全选需要开启
  358. showColumns: false,
  359. responseHandler: function (res) {
  360. $("#exportCommonModal").modal("show");
  361. return res.obj.rows;
  362. },
  363. columns:
  364. [
  365. {field: "selectItem", checkbox: true},
  366. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "10%"},
  367. {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "30%"},
  368. {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: "10%"},
  369. {
  370. title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "10%",
  371. formatter: function (value, row, index) {
  372. if (value == -1) {
  373. return "<span style='color: #ed5565;'>审核不通过</span>";
  374. }
  375. if (value == 5) {
  376. return "<span style='color: #1ab394;'>审核通过</span>";
  377. }
  378. }
  379. },
  380. ]
  381. });
  382. }
  383. /**
  384. * 是否发送短信
  385. */
  386. MedicalSubsidy.toggleMessage = function () {
  387. var isMessage = $("input[name='isSend']:checked").val();
  388. if (isMessage == 1) {
  389. $("#messageEdit").css("display", "block");
  390. } else if (isMessage == 2) {
  391. $("#messageEdit").css("display", "none");
  392. }
  393. }
  394. MedicalSubsidy.prepareSearch = function () {
  395. var sex = $("#pub_sex").val();
  396. var checkState = $("#pub_checkState").val();
  397. var name = $("#pub_name").val();
  398. $('#dataTable').bootstrapTable("refresh", {"query": {"sex": sex, "checkState": checkState, "name": name}});
  399. }
  400. MedicalSubsidy.prepareReset = function () {
  401. $("#pub_sex").val("");
  402. $("#pub_checkState").val("");
  403. $("#pub_name").val("");
  404. }
  405. /**
  406. * 公式预览
  407. */
  408. MedicalSubsidy.publicExport = function () {
  409. var selected = $('#dataTable').bootstrapTable('getSelections');
  410. if (!selected || selected.length < 1) {
  411. Feng.info("请至少选择一行数据!");
  412. return;
  413. }
  414. var ids = "";
  415. for (var i = 0; i < selected.length; i++) {
  416. ids = ids + selected[i].id + ",";
  417. }
  418. var operation = function () {
  419. $("#exportCommonModal").modal("hide");
  420. window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/medicalSubsidy/exportPublic?ids=" + ids));
  421. }
  422. Feng.confirm("确定要公示预览吗?", operation);
  423. }
  424. /**
  425. * 公示
  426. */
  427. MedicalSubsidy.public = function () {
  428. var selected = $('#dataTable').bootstrapTable('getSelections');
  429. if (!selected || selected.length < 1) {
  430. Feng.info("请至少选择一行数据!");
  431. return;
  432. }
  433. var ids = "";
  434. for (var i = 0; i < selected.length; i++) {
  435. ids = ids + selected[i].id + ",";
  436. }
  437. var isMessage = $("input[name='isSend']:checked").val();
  438. var typeName = $("#typeName").val();
  439. var address = $("#web").val();
  440. var publicStartTime = $("#publicStartTime").val();
  441. var publicEndTime = $("#publicEndTime").val();
  442. var dep = $("#dep").val();
  443. var phone = $("#fyphone").val();
  444. var email = $("#fyemail").val();
  445. if (isMessage == 1) {
  446. if (typeName == null || typeName == '') {
  447. Feng.info("请填写公示类型");
  448. return;
  449. }
  450. if (address == null || address == '') {
  451. Feng.info("请填写公示平台");
  452. return;
  453. }
  454. if (publicStartTime == null || publicStartTime == '') {
  455. Feng.info("请填写公示开始时间");
  456. return;
  457. }
  458. if (publicEndTime == null || publicEndTime == '') {
  459. Feng.info("请填写公示截止时间");
  460. return;
  461. }
  462. if (dep == null || dep == '') {
  463. Feng.info("请填写反映单位");
  464. return;
  465. }
  466. if (phone == null || phone == '') {
  467. Feng.info("请填写联系电话");
  468. return;
  469. }
  470. if (email == null || email == '') {
  471. Feng.info("请填写联系邮箱");
  472. return;
  473. }
  474. }
  475. var operation = function () {
  476. var ajax = new $ax(Feng.ctxPath + "/medicalSubsidy/publicBatch", function (data) {
  477. if (data.code == 200) {
  478. Feng.success(data.msg);
  479. MedicalSubsidy.table.refresh();
  480. $("#exportCommonModal").modal("hide");
  481. } else {
  482. Feng.error(data.msg);
  483. }
  484. }, function (data) {
  485. Feng.error("公示失败!" + data.responseJSON.message + "!");
  486. });
  487. ajax.set("ids", ids);
  488. ajax.set("typeName", typeName);
  489. ajax.set("address", address);
  490. ajax.set("publicStartTime", publicStartTime);
  491. ajax.set("publicEndTime", publicEndTime);
  492. ajax.set("dep", dep);
  493. ajax.set("phone", phone);
  494. ajax.set("email", email);
  495. ajax.set("isMessage", isMessage);
  496. ajax.start();
  497. }
  498. Feng.confirm("确定要公示吗?", operation);
  499. }
  500. /**
  501. * 公示后审核
  502. */
  503. MedicalSubsidy.afterCheck = function () {
  504. if (this.check()) {
  505. var ajax = new $ax(Feng.ctxPath + "/medicalSubsidy/validateIsCheck", function (data) {
  506. if (data.code == 200) {
  507. layer.open({
  508. type: 1,
  509. id: "neewFieldFormModel",
  510. title: '公示再审核',
  511. area: ['800px', '450px'], //宽高
  512. fix: false, //不固定
  513. shade: 0,
  514. maxmin: true,
  515. content: MedicalSubsidy.creatFieldCheckModal(),
  516. btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  517. btnAlign: 'c',
  518. zIndex: layer.zIndex,
  519. success: function (layero, index) {
  520. layer.setTop(layero);
  521. },
  522. yes: function (index, layero) {
  523. var checkState = $("#checkStateModel").val();
  524. var checkMsg = $("#checkMsg").val();
  525. if (checkState == null || checkState == '') {
  526. Feng.info("请选择审核状态");
  527. return;
  528. }
  529. if (checkMsg == null || checkMsg == '') {
  530. Feng.info("请填写审核意见");
  531. return;
  532. }
  533. var ajax = new $ax(Feng.ctxPath + "/medicalSubsidy/afterCheck", function (data) {
  534. if (data.code == 200) {
  535. layer.close(index);
  536. MedicalSubsidy.table.refresh();
  537. Feng.success(data.msg);
  538. } else {
  539. Feng.error(data.msg);
  540. }
  541. }, function (data) {
  542. Feng.error("审核失败!" + data.responseJSON.message + "!");
  543. });
  544. ajax.setData({"id": MedicalSubsidy.seItem.id, "checkState": checkState, "checkMsg": checkMsg});
  545. ajax.start();
  546. }
  547. });
  548. } else {
  549. Feng.error(data.msg);
  550. }
  551. }, function (data) {
  552. Feng.error("校验失败!" + data.responseJSON.message + "!");
  553. });
  554. ajax.set("id", MedicalSubsidy.seItem.id);
  555. ajax.set("process", 2);
  556. ajax.start();
  557. }
  558. }
  559. /**
  560. *
  561. */
  562. MedicalSubsidy.creatFieldCheckModal = function () {
  563. return '<form id="checkForm">\n' +
  564. ' <div class="form-group" style="margin: 10px;">\n' +
  565. ' <label for="checkState" class="control-label">审核状态</label>\n' +
  566. ' <select class="form-control" id="checkStateModel" >\n' +
  567. ' <option value="">请选择</option>\n' +
  568. ' <option value="4">审核驳回</option>\n' +
  569. ' <option value="-1">审核不通过</option>\n' +
  570. ' </select>\n' +
  571. ' </div>\n' +
  572. ' <div class="form-group" style="margin: 10px;">\n' +
  573. ' <label for="checkMsg" class="control-label" >审核意见</label>\n' +
  574. ' <textarea class="form-control" id="checkMsg" rows="6"></textarea>\n' +
  575. ' </div>\n' +
  576. ' </form>';
  577. }
  578. /**
  579. * 公示通过
  580. */
  581. MedicalSubsidy.publicPass = function () {
  582. var selected = $('#dataTable').bootstrapTable('getSelections');
  583. if (!selected || selected.length < 1) {
  584. Feng.info("请至少选择一行数据!");
  585. return;
  586. }
  587. var ids = "";
  588. for (var i = 0; i < selected.length; i++) {
  589. ids = ids + selected[i].id + ",";
  590. }
  591. var operation = function () {
  592. var ajax = new $ax(Feng.ctxPath + "/medicalSubsidy/publicPass", function (data) {
  593. if (data.code == 200) {
  594. Feng.success(data.msg);
  595. MedicalSubsidy.table.refresh();
  596. $("#exportCommonModal").modal("hide");
  597. } else {
  598. Feng.error(data.msg);
  599. }
  600. }, function (data) {
  601. Feng.error("公示通过失败!" + data.responseJSON.message + "!");
  602. });
  603. ajax.set("ids", ids);
  604. ajax.start();
  605. }
  606. Feng.confirm("一旦提交无法修改,确定公示通过吗?", operation);
  607. }
  608. /**
  609. * 兑现
  610. */
  611. MedicalSubsidy.cash = function () {
  612. var selected = $('#dataTable').bootstrapTable('getSelections');
  613. if (!selected || selected.length < 1) {
  614. Feng.info("请至少选择一行数据!");
  615. return;
  616. }
  617. var ids = "";
  618. for (var i = 0; i < selected.length; i++) {
  619. ids = ids + selected[i].id + ",";
  620. }
  621. var operation = function () {
  622. var ajax = new $ax(Feng.ctxPath + "/medicalSubsidy/cash", function (data) {
  623. if (data.code == 200) {
  624. Feng.success(data.msg);
  625. MedicalSubsidy.table.refresh();
  626. $("#exportCommonModal").modal("hide");
  627. } else {
  628. Feng.error(data.msg);
  629. }
  630. }, function (data) {
  631. Feng.error("兑现失败!" + data.responseJSON.message + "!");
  632. });
  633. ajax.set("ids", ids);
  634. ajax.start();
  635. }
  636. Feng.confirm("一旦兑现无法修改,确定兑现吗?", operation);
  637. }
  638. /**
  639. * 显示导出模态框
  640. */
  641. MedicalSubsidy.showExportModel = function(){
  642. $("#exportForm")[0].reset();
  643. $("#basicExportModal").modal("show");
  644. }
  645. /**
  646. * 导出基础信息
  647. */
  648. MedicalSubsidy.export = function(){
  649. var names = '';
  650. var values = '';
  651. $("#field_info li input").each(function(index){
  652. if($(this).is(":checked")){
  653. values = values + $(this).val() + ",";
  654. names = names + $(this).next().text() + ",";
  655. }
  656. });
  657. var queryData = MedicalSubsidy.formParams();
  658. queryData['names'] = names;
  659. queryData['values'] = values;
  660. var url = Feng.setUrlParam(Feng.ctxPath + "/medicalSubsidy/exportBasicInfo",queryData);
  661. $("#basicExportModal").modal('hide');
  662. window.location.href = url;
  663. }
  664. $(function () {
  665. var defaultColunms = MedicalSubsidy.initColumn();
  666. var table = new BSTable(MedicalSubsidy.id, "/medicalSubsidy/list", defaultColunms);
  667. table.setPaginationType("server");
  668. table.setOnDblClickRow(function () {
  669. MedicalSubsidy.openCheckMedicalSubsidy();
  670. });
  671. MedicalSubsidy.table = table.init();
  672. var arr = [
  673. {"name": "talentArrange", "code": "un_talentLevel"},
  674. {"name": "cardType", "code": "un_cardType"}];
  675. Feng.findChildDictBatch(JSON.stringify(arr));
  676. $('#checkAll').click(function () {
  677. $("#dataTable").bootstrapTable('togglePagination').bootstrapTable('checkAll').bootstrapTable('togglePagination');
  678. })
  679. $('#uncheckAll').click(function () {
  680. $("#dataTable").bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
  681. })
  682. });