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
2.1 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-01-04 10:19
  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. //$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' });
  19. $('#StuNo').lrselect({
  20. allowSearch: true,
  21. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',
  22. param: { strWhere: "1=1 order by stuno" },
  23. value: "stuno",
  24. text: "stuname"
  25. });
  26. },
  27. initData: function () {
  28. if (!!keyValue) {
  29. $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/LeagueMember/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 + '/PersonnelManagement/LeagueMember/SaveModifyForm?keyValue=' + keyValue, postData, function (res) {
  51. // 保存成功后才回调
  52. if (!!callBack) {
  53. callBack();
  54. }
  55. });
  56. };
  57. page.init();
  58. }