talentAllowanceInfoIC.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. /**
  2. * 优秀人才津补贴管理初始化
  3. */
  4. var TalentAllowanceInfo = {
  5. id: "TalentAllowanceInfoTable", //表格id
  6. seItem: null, //选中的条目
  7. table: null,
  8. layerIndex: -1
  9. };
  10. /**
  11. * 初始化表格的列
  12. */
  13. TalentAllowanceInfo.initColumn = function () {
  14. return [
  15. {field: 'selectItem', radio: true},
  16. {title: '年度', field: 'year', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "60px"},
  17. {title: '单位名称', field: 'enterpriseName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  18. {title: '所属镇街', field: 'addressName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  19. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  20. {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "60px",
  21. formatter(value, row, index) {
  22. if (value == 1) {
  23. return "男";
  24. }
  25. if (value == 2) {
  26. return "女";
  27. }
  28. }
  29. },
  30. {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  31. {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  32. {title: '认定条件', field: 'identifyConditionText', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px"},
  33. {title: '认定条件证书取得时间', field: 'identifyGetTime', visible: true, align: 'center', valign: 'middle', width: "150px"},
  34. {title: '认定条件名称', field: 'identifyConditionName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  35. {title: '公布入选月份', field: 'identifyMonth', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  36. {title: '津补贴类型', field: 'allowanceType', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "120px",
  37. formatter(value, row, index) {
  38. if (value == null || value == "")
  39. return "未判定";
  40. if (value == 1)
  41. return "工作津贴";
  42. if (value == 2)
  43. return "一次性交通补贴";
  44. if (value == 3)
  45. return "不予兑现";
  46. }
  47. },
  48. {title: '兑现月份', field: 'months', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px"},
  49. {title: '兑现金额', field: 'money', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
  50. {title: '金额说明', field: 'moneyDesc', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px"},
  51. {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
  52. formatter(value, row, index) {
  53. var html = "";
  54. switch (value) {
  55. case 1:
  56. html = "<span class='label'>待提交</span>"
  57. break;
  58. case 5:
  59. case 13:
  60. case 15:
  61. case 20:
  62. case 25:
  63. case 35:
  64. html = "<span class='label label-success'>审核中</span>";
  65. break;
  66. case 10:
  67. html = "<span class='label label-danger'>已驳回</span>"
  68. break;
  69. case - 1:
  70. if (row.publicState >= 3) {
  71. html = "<span class='label label-danger'>审核不通过</span>";
  72. } else {
  73. html = "<span class='label label-success'>审核中</span>";
  74. }
  75. break;
  76. case 30:
  77. if (row.publicState == 3) {
  78. html = "<span class='label label-primary'>公示中</span>"
  79. } else if (row.publicState == 4) {
  80. html = row.allowanceType != 3 ? "<span class='label label-success'>待兑现</span>" : "<span class='label label-danger'>不予兑现</span>";
  81. } else if (row.publicState == 5) {
  82. html = "<span class='label label-primary'>已兑现</span>"
  83. }
  84. break;
  85. }
  86. return html;
  87. }
  88. },
  89. {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
  90. formatter: function (value, row, index) {
  91. return "<span class='label label-success' onclick=\"TalentAllowanceInfo.showLog('" + value + "')\" >" +
  92. "<i class=\"fa fa-book\"></i>日志" +
  93. "</span>";
  94. }
  95. }
  96. ];
  97. };
  98. /**
  99. * 检查是否选中
  100. */
  101. TalentAllowanceInfo.check = function () {
  102. var selected = $('#' + this.id).bootstrapTable('getSelections');
  103. if (selected.length == 0) {
  104. Feng.info("请先选中表格中的某一记录!");
  105. return false;
  106. } else {
  107. TalentAllowanceInfo.seItem = selected[0];
  108. return true;
  109. }
  110. };
  111. /**
  112. * 点击添加优秀人才津补贴
  113. */
  114. TalentAllowanceInfo.openAddTalentAllowanceInfo = function () {
  115. var ajax = new $ax("/common/batch/checkBatchValid", function (data) {
  116. if (data.code == 200) {
  117. var index = layer.open({
  118. type: 2,
  119. title: '津补贴申报',
  120. fix: false, //不固定
  121. maxmin: true,
  122. content: '/enterprise/talentAllowance/apply?year=' + data.batch,
  123. 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;取消'],
  124. btnAlign: 'c',
  125. btn1: function (index, layero) {
  126. var obj = layero.find("iframe")[0].contentWindow;
  127. obj.TalentAllowanceInfoDlg.addSubmit();
  128. }, btn2: function (index, layero) {
  129. var obj = layero.find("iframe")[0].contentWindow;
  130. obj.TalentAllowanceInfoDlg.submitToCheck();
  131. return false;
  132. },
  133. success: function (layero, index) {
  134. layer.tips('添加基本信息并上传附件后点击', '.layui-layer-btn1', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
  135. },
  136. end: function () {
  137. layer.closeAll('tips');
  138. TalentAllowanceInfo.table.refresh();
  139. }
  140. });
  141. layer.full(index);
  142. TalentAllowanceInfo.layerIndex = index;
  143. } else {
  144. Feng.error(data.msg);
  145. }
  146. }, function (data) {
  147. Feng.error("查询失败!" + data.responseJSON.message + "!");
  148. });
  149. ajax.set("type", CONFIG.project_jbt);
  150. ajax.start();
  151. };
  152. /**
  153. * 打开查看优秀人才津补贴详情
  154. */
  155. TalentAllowanceInfo.openTalentAllowanceInfoDetail = function () {
  156. if (this.check()) {
  157. var ajax = new $ax("/common/batch/checkBatchValid", function (data) {
  158. if (data.code == 200) {
  159. var index = layer.open({
  160. type: 2,
  161. title: '津补贴申报',
  162. fix: false, //不固定
  163. maxmin: true,
  164. content: Feng.ctxPath + '/enterprise/talentAllowance/apply/id/' + TalentAllowanceInfo.seItem.id,
  165. btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
  166. btnAlign: 'c',
  167. yes: function (index, layero) {
  168. var obj = layero.find("iframe")[0].contentWindow;
  169. obj.TalentAllowanceInfoDlg.submitToCheck();
  170. },
  171. success: function (layero, index) {
  172. layer.tips('添加基本信息并上传附件后点击', '.layui-layer-btn0', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
  173. },
  174. end: function () {
  175. layer.closeAll('tips');
  176. }
  177. });
  178. layer.full(index);
  179. TalentAllowanceInfo.layerIndex = index;
  180. } else {
  181. Feng.info(data.msg);
  182. }
  183. }, function (data) {
  184. Feng.error("校验失败!" + data.responseJSON.message + "!");
  185. });
  186. ajax.set("type", CONFIG.project_jbt);
  187. ajax.set("year", TalentAllowanceInfo.seItem.year);
  188. ajax.set("first_submit_time", TalentAllowanceInfo.seItem.firstSubmitTime);
  189. ajax.start();
  190. }
  191. };
  192. TalentAllowanceInfo.openTalentAllowanceInfoSelect = function () {
  193. if (this.check()) {
  194. var index = layer.open({
  195. type: 2,
  196. title: '津补贴查看',
  197. fix: false, //不固定
  198. maxmin: true,
  199. content: Feng.ctxPath + '/enterprise/talentAllowance/detail/id/' + TalentAllowanceInfo.seItem.id,
  200. btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
  201. btnAlign: 'c',
  202. });
  203. layer.full(index);
  204. TalentAllowanceInfo.layerIndex = index;
  205. }
  206. }
  207. /**
  208. * 删除优秀人才津补贴
  209. */
  210. TalentAllowanceInfo.delete = function () {
  211. if (this.check()) {
  212. var operation = function () {
  213. var ajax = new $ax(Feng.ctxPath + "/enterpirse/talentAllowance/delete", function (data) {
  214. if (data.code == 200) {
  215. Feng.success(data.msg);
  216. TalentAllowanceInfo.table.refresh();
  217. } else {
  218. Feng.info(data.msg);
  219. }
  220. }, function (data) {
  221. Feng.error("删除失败!" + data.responseJSON.message + "!");
  222. });
  223. ajax.set("id", TalentAllowanceInfo.seItem.id);
  224. ajax.start();
  225. }
  226. Feng.confirm("删除后无法恢复,确认删除吗?", operation);
  227. }
  228. };
  229. /**
  230. * 查询表单提交参数对象
  231. * @returns {{}}
  232. */
  233. TalentAllowanceInfo.formParams = function () {
  234. var queryData = {};
  235. queryData['year'] = $("#year").val();
  236. queryData['enterpriseName'] = $("#enterpriseName").val();
  237. queryData['name'] = $("#name").val();
  238. queryData['idCard'] = $("#idCard").val();
  239. queryData['talentType'] = $("#talentType").val();
  240. queryData['talentArrange'] = $("#talentArrange").val();
  241. queryData['address'] = $("#address").val();
  242. queryData['identifyCondition'] = $("#identifyCondition").val();
  243. return queryData;
  244. }
  245. /**
  246. * 查询人才认定申报列表
  247. */
  248. TalentAllowanceInfo.search = function () {
  249. TalentAllowanceInfo.table.refresh({query: TalentAllowanceInfo.formParams()});
  250. };
  251. /**
  252. * 重置
  253. */
  254. TalentAllowanceInfo.reset = function () {
  255. $("#year").val("");
  256. $("#enterpriseName").val("");
  257. $("#name").val("");
  258. $("#idCard").val("");
  259. $("#talentType").val("");
  260. $("#talentArrange").val("");
  261. $("#address").val("");
  262. $("#identifyCondition").val("");
  263. }
  264. /**
  265. * 获取人才认定
  266. */
  267. TalentAllowanceInfo.getIdentifyCondition = function () {
  268. var level = $("#talentArrange").val();
  269. if (level == null || level == '') {
  270. $("#identifyCondition").empty();
  271. $("#identifyCondition").trigger('chosen:updated');
  272. return;
  273. }
  274. Feng.addAjaxSelect({
  275. "id": "identifyCondition",
  276. "displayCode": "id",
  277. "displayName": "name",
  278. "type": "GET",
  279. "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level
  280. });
  281. $("#identifyCondition").trigger('chosen:updated');
  282. }
  283. TalentAllowanceInfo.initCheckFileTable = function () {
  284. $('#checkFileTable').bootstrapTable('destroy');
  285. $('#checkFileTable').bootstrapTable({
  286. url: Feng.ctxPath + "/enterprise/talentAllowance/listCommonFile",
  287. method: 'POST',
  288. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  289. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  290. showRefresh: false, // 是否显示刷新按钮
  291. clickToSelect: true, // 是否启用点击选中行
  292. singleSelect: true, // 设置True 将禁止多选
  293. striped: true, // 是否显示行间隔色
  294. pagination: false, // 设置为 true 会在表格底部显示分页条
  295. paginationHAlign: "left",
  296. paginationDetailHAlign: "right",
  297. sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  298. showColumns: false,
  299. queryParams: function (params) {
  300. return {"batch": $("#batch").val()};
  301. },
  302. rowStyle: function (row, index) {
  303. return {css: {"word-break": "break-word", "white-space": "inherit"}}
  304. },
  305. columns:
  306. [
  307. {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', width: '120px'},
  308. {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px",
  309. formatter: function (value, row, index) {
  310. var sn = value.lastIndexOf(".");
  311. var suffix = value.substring(sn + 1, value.length);
  312. var imgStr = "";
  313. if (suffix == "pdf" || suffix == "PDF") {
  314. imgStr = "<button type='button' onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
  315. } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
  316. imgStr = "<button type='button' onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
  317. } else {
  318. imgStr = '<img class=\"imgUrl\" src=\"' + value + '\" style=\"width:25px;height:25px;\">';
  319. }
  320. return imgStr;
  321. }
  322. },
  323. {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '80px',
  324. formatter: function (value, row, index) {
  325. return "<button type='button' onclick=\"downloadFile('" + row.id + "','6')\" class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\" aria-hidden=\"true\"></i>下载</button>" +
  326. "<button type='button' onclick=\"TalentAllowanceInfo.deleteCheckFile('" + row.id + "','" + CONFIG.project_jbt + "')\" class=\"btn btn-xs btn-danger\">" +
  327. "<i class=\"fa fa-times\"></i>删除" +
  328. "</button>";
  329. }
  330. },
  331. ],
  332. onPostBody: function () {
  333. $('#checkFileTable' + "td.uitd_showTip").bind("mouseover", function () {
  334. var htm = $(this).html();
  335. $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
  336. });
  337. $(".imgUrl").viewer({fullscreen: false});
  338. },
  339. });
  340. }
  341. TalentAllowanceInfo.commonColumns = function () {
  342. return [
  343. {field: "selectItem", checkbox: true},
  344. {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "30%"},
  345. {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "70%"}
  346. ];
  347. }
  348. TalentAllowanceInfo.openBatchApplyModal = function (type) {
  349. var columns = TalentAllowanceInfo.commonColumns();
  350. $('#batchApplyTable').bootstrapTable('destroy');
  351. $('#batchApplyTable').bootstrapTable({
  352. url: Feng.ctxPath + "/enterprise/talentAllowance/findTalentAllowance",
  353. method: 'POST',
  354. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  355. search: true, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  356. showRefresh: false, // 是否显示刷新按钮
  357. clickToSelect: true, // 是否启用点击选中行
  358. singleSelect: false, // 设置True 将禁止多选
  359. striped: true, // 是否显示行间隔色
  360. pagination: true, // 设置为 true 会在表格底部显示分页条
  361. paginationHAlign: "left",
  362. paginationDetailHAlign: "right",
  363. sidePagination: "client", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  364. pageNumber: 1, //初始化加载第一页,默认第一页
  365. pageSize: 10, //每页的记录行数(*)
  366. pageList: [10, 25, 50, 100, 500, 1000, 1500], //可供选择的每页的行数(*)
  367. maintainSelected: true, //全表全选需要开启
  368. showColumns: false,
  369. responseHandler: function (res) {
  370. $(".time").each(function () {
  371. laydate.render({
  372. elem: "#" + $(this).attr("id")
  373. , type: 'date'
  374. , format: 'yyyy年MM月dd日'
  375. });
  376. });
  377. $("#batchApplyModal").modal("show");
  378. return res.obj.rows;
  379. },
  380. columns: columns
  381. });
  382. }
  383. TalentAllowanceInfo.batchApply = function () {
  384. var selected = $('#batchApplyTable').bootstrapTable('getSelections');
  385. if (!selected || selected.length < 1) {
  386. Feng.info("请至少选择一行数据!");
  387. return;
  388. }
  389. var ids = "";
  390. var count = 0;
  391. for (var i = 0; i < selected.length; i++) {
  392. count++;
  393. ids = ids + selected[i].id + ",";
  394. }
  395. var operation = function () {
  396. var index = layer.open({
  397. type: 1,
  398. title: '请确认补贴类型',
  399. area: ['300px', '220px'], //宽高
  400. fix: false, //不固定
  401. maxmin: true,
  402. content: '<div class="rowGroup" style="padding:20px;"><label class="control-label spacing"><span style="color: red">*</span>补贴类型</label><br><input type="radio" name="batchAllowanceType" value="1"/><label for="batchAllowanceType">工作津贴</label>&nbsp;&nbsp;<input type="radio" name="batchAllowanceType" value="2"/><label for="batchAllowanceType">一次性交通补贴</label></div>',
  403. btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;确定', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
  404. btnAlign: 'c',
  405. success: function () {
  406. },
  407. yes: function (index, layero) {
  408. var allowanceType = $("input[name=batchAllowanceType]:checked").val();
  409. if (Feng.isEmptyStr(allowanceType) || typeof allowanceType == "undefined") {
  410. Feng.info("请选择补贴类型");
  411. return;
  412. }
  413. layer.close(index);
  414. var allowanceTypeStr = allowanceType == 1 ? "工作津贴" : "一次性交通补贴";
  415. Feng.confirm("已选<span style='color:#ff0000;'>" + count + "</span>人,确定要批量申请<span style='color:#ff0000;'>" + allowanceTypeStr + "</span>吗?<br><span style='color:#ff0000;'>*此方法不能撤销,请谨慎操作</span>", function () {
  416. var ajax = new $ax("/enterprise/talentAllowance/batchApply", function (data) {
  417. if (data.code == 200) {
  418. Feng.success(data.msg);
  419. TalentInfo.table.refresh();
  420. $("#batchApplyModal").modal("hide");
  421. } else {
  422. Feng.error(data.msg);
  423. }
  424. }, function (data) {
  425. Feng.error("公示失败!" + data.responseJSON.message + "!");
  426. });
  427. ajax.set("ids", ids);
  428. ajax.set("allowanceType", allowanceType);
  429. ajax.start();
  430. });
  431. }
  432. });
  433. }
  434. Feng.confirm("确定进入下一步选择补贴类型吗?", operation);
  435. }
  436. $('#checkAllBatch').click(function () {
  437. $("#batchApplyTable").bootstrapTable('togglePagination').bootstrapTable('checkAll').bootstrapTable('togglePagination');
  438. })
  439. $('#uncheckAllBatch').click(function () {
  440. $("#batchApplyTable").bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
  441. })
  442. /**
  443. * 核查材料留存上传
  444. */
  445. TalentAllowanceInfo.showCheckFileModal = function () {
  446. Feng.addAjaxSelect({
  447. "id": "batch",
  448. "displayCode": "id",
  449. "displayName": "batch",
  450. "type": "GET",
  451. "url": "/common/batch/listBatchByType?type=" + CONFIG.project_jbt + "&source=" + $("#type").val()
  452. });
  453. $("#upload_file").val("");
  454. $("#checkFileModal").modal("show");
  455. }
  456. TalentAllowanceInfo.checkFileUpload = function () {
  457. var batch = $("#batch").val();
  458. if (Feng.isEmptyStr(batch)) {
  459. Feng.info("请选择申报批次后再上传!");
  460. return;
  461. }
  462. $("#upload_file ").unbind("change");
  463. $("#upload_file ").change(function () {
  464. var formData = new FormData();
  465. formData.append("batch", batch);
  466. for (var i = 0; i < $('#upload_file')[0].files.length; i++) {
  467. formData.append('file', $('#upload_file')[0].files[i]);
  468. }
  469. $.ajax({
  470. url: Feng.ctxPath + "/enterprise/talentAllowance/uploadCommonFile",
  471. type: "POST",
  472. processData: false,
  473. contentType: false,
  474. data: formData,
  475. success: function (data) {
  476. $("#checkFileTable").bootstrapTable("refresh", {});
  477. Feng.info(data.msg);
  478. }, error: function (data) {
  479. Feng.error("上传失败!" + data.responseJSON.message + "!");
  480. }
  481. });
  482. });
  483. $('#upload_file').val("");
  484. $('#upload_file').click();
  485. }
  486. TalentAllowanceInfo.deleteCheckFile = function (id, type) {
  487. var operation = function () {
  488. var ajax = new $ax(Feng.ctxPath + "/enterprise/talentAllowance/deleteCommonFile", function (data) {
  489. if (data.code == 200) {
  490. Feng.success(data.msg);
  491. $("#checkFileTable").bootstrapTable("refresh", {});
  492. } else {
  493. Feng.error(data.msg);
  494. }
  495. }, function (data) {
  496. Feng.error("删除失败!" + data.responseJSON.message + "!");
  497. });
  498. ajax.set("id", id);
  499. ajax.set("type", type);
  500. ajax.start();
  501. }
  502. Feng.confirm("删除后无法恢复,确认删除吗?", operation);
  503. }
  504. /**
  505. * 显示审核日志
  506. */
  507. TalentAllowanceInfo.showLog = function (id) {
  508. layer.open({
  509. type: 1,
  510. title: "日志",
  511. fixed: false,
  512. content: '<table id="' + id + '"></table>',
  513. area: ['80%', '80%'],
  514. maxmin: true,
  515. success: function (layero, index) {
  516. $('#' + id).bootstrapTable({
  517. url: Feng.ctxPath + "/common/api/getCheckLog",
  518. method: 'POST',
  519. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  520. search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
  521. showRefresh: false, // 是否显示刷新按钮
  522. clickToSelect: true, // 是否启用点击选中行
  523. singleSelect: true, // 设置True 将禁止多选
  524. striped: true, // 是否显示行间隔色
  525. pagination: false, // 设置为 true 会在表格底部显示分页条
  526. paginationHAlign: "left",
  527. paginationDetailHAlign: "right",
  528. sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
  529. showColumns: false,
  530. queryParams: function (params) {
  531. return {"type": CONFIG.project_jbt, "mainId": id, "typeFileId": "", "active": 1}
  532. },
  533. rowStyle: function (row, index) {
  534. return {
  535. css: {
  536. "word-break": "break-word",
  537. "white-space": "inherit"
  538. }
  539. }
  540. },
  541. columns:
  542. [
  543. {title: '步骤', field: 'stepName', visible: true, align: 'center', valign: 'middle', width: "10%",
  544. formatter: function (value, row, index) {
  545. return "" + value;
  546. }
  547. },
  548. {title: '描述', field: 'description', visible: true, align: 'center', valign: 'middle', width: "65%",
  549. formatter: function (value, row, index) {
  550. return '<span data-toggle="tooltip" title="' + value + '">"' + value + '"</span>';
  551. }
  552. },
  553. {title: '操作人', field: 'createUser', visible: false, align: 'center', valign: 'middle', width: "15%"},
  554. {title: '操作时间', field: 'createTime', visible: true, align: 'center', valign: 'middle', width: "20%"},
  555. ]
  556. ,
  557. onPostBody: function () {
  558. $('#' + id + "td.uitd_showTip").bind("mouseover", function () {
  559. var htm = $(this).html();
  560. $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
  561. });
  562. }
  563. });
  564. }
  565. });
  566. }
  567. $(function () {
  568. var defaultColunms = TalentAllowanceInfo.initColumn();
  569. var table = new BSTable(TalentAllowanceInfo.id, "/enterprise/talentAllowance/list", defaultColunms);
  570. table.setPaginationType("server");
  571. table.setOnDblClickRow(function () {
  572. TalentAllowanceInfo.openTalentAllowanceInfoDetail();
  573. });
  574. TalentAllowanceInfo.table = table.init();
  575. //批量加载字典表数据
  576. var arr = [
  577. {"name": "address", "code": "street"},
  578. {"name": "talentArrange", "code": "talent_arrange"},
  579. {"name": "nationality", "code": "nationality"}];
  580. Feng.findChildDictBatch(JSON.stringify(arr));
  581. $("#identifyCondition").chosen({
  582. search_contains: true,    //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
  583. disable_search: false,
  584. width: "100%",
  585. enable_split_word_search: true
  586. });
  587. });