You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

108 lines
4.2 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-01-10 23:59
  5. * 描 述:打卡提醒
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. $('#IsUse').lrRadioCheckbox({
  20. type: 'radio',
  21. code: 'YesOrNoBit',
  22. });
  23. // 刷新
  24. $('#lr_refresh').on('click', function () {
  25. location.reload();
  26. });
  27. // 新增
  28. $('#lr_add').on('click', function () {
  29. learun.layerForm({
  30. id: 'form',
  31. title: '新增',
  32. url: top.$.rootUrl + '/PersonnelManagement/PunchReminder/Form',
  33. width: 600,
  34. height: 400,
  35. callBack: function (id) {
  36. return top[id].acceptClick(refreshGirdData);
  37. }
  38. });
  39. });
  40. // 编辑
  41. $('#lr_edit').on('click', function () {
  42. var keyValue = $('#gridtable').jfGridValue('Id');
  43. if (learun.checkrow(keyValue)) {
  44. learun.layerForm({
  45. id: 'form',
  46. title: '编辑',
  47. url: top.$.rootUrl + '/PersonnelManagement/PunchReminder/Form?keyValue=' + keyValue,
  48. width: 600,
  49. height: 400,
  50. callBack: function (id) {
  51. return top[id].acceptClick(refreshGirdData);
  52. }
  53. });
  54. }
  55. });
  56. // 删除
  57. $('#lr_delete').on('click', function () {
  58. var keyValue = $('#gridtable').jfGridValue('Id');
  59. if (learun.checkrow(keyValue)) {
  60. learun.layerConfirm('是否确认删除该项!', function (res) {
  61. if (res) {
  62. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/PunchReminder/DeleteForm', { keyValue: keyValue}, function () {
  63. refreshGirdData();
  64. });
  65. }
  66. });
  67. }
  68. });
  69. // 打印
  70. $('#lr_print').on('click', function () {
  71. $('#gridtable').jqprintTable();
  72. });
  73. },
  74. // 初始化列表
  75. initGird: function () {
  76. $('#gridtable').lrAuthorizeJfGrid({
  77. url: top.$.rootUrl + '/PersonnelManagement/PunchReminder/GetPageList',
  78. headData: [
  79. { label: "提醒时间点", name: "ReminderTime", width: 100, align: "left"},
  80. { label: "提醒方式", name: "ReminderType", width: 100, align: "left"},
  81. { label: "启用", name: "IsUse", width: 100, align: "left",
  82. formatterAsync: function (callback, value, row, op,$cell) {
  83. learun.clientdata.getAsync('dataItem', {
  84. key: value,
  85. code: 'YesOrNoBit',
  86. callback: function (_data) {
  87. callback(_data.text);
  88. }
  89. });
  90. }},
  91. { label: "备注", name: "Remark", width: 100, align: "left"},
  92. ],
  93. mainId:'Id',
  94. isPage: true
  95. });
  96. page.search();
  97. },
  98. search: function (param) {
  99. param = param || {};
  100. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  101. }
  102. };
  103. refreshGirdData = function () {
  104. $('#gridtable').jfGridSet('reload');
  105. };
  106. page.init();
  107. }