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.
 
 
 
 
 
 

59 lines
1.9 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-05-24 15:40
  5. * 描 述:学生请假记录
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. $('.lr-form-wrap').lrscroll();
  14. page.bind();
  15. page.initData();
  16. },
  17. bind: function () {
  18. $('#IsCheck').lrRadioCheckbox({
  19. type: 'radio',
  20. code: 'LeaveCheck',
  21. });
  22. $('#LeaveType').lrRadioCheckbox({
  23. type: 'radio',
  24. code: 'LeaveType',
  25. });
  26. },
  27. initData: function () {
  28. if (!!keyValue) {
  29. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuAttendanceLeave/GetFormData?keyValue=' + keyValue, function (data) {
  30. for (var id in data) {
  31. if (!!data[id].length && data[id].length > 0) {
  32. $('#' + id).jfGridSet('refreshdata', data[id]);
  33. }
  34. else {
  35. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  36. }
  37. }
  38. });
  39. }
  40. }
  41. };
  42. // 保存数据
  43. acceptClick = function (callBack) {
  44. if (!$('body').lrValidform()) {
  45. return false;
  46. }
  47. var postData = {
  48. strEntity: JSON.stringify($('body').lrGetFormData())
  49. };
  50. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuAttendanceLeave/SaveForm?keyValue=' + keyValue, postData, function (res) {
  51. // 保存成功后才回调
  52. if (!!callBack) {
  53. callBack();
  54. }
  55. });
  56. };
  57. page.init();
  58. }