houseRentingPurchaseFees.js 25 KB

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