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.
 
 
 
 
 
 

68 lines
2.3 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. if (!!keyValue) {
  17. $("#StuNo").attr("readonly", "readonly");
  18. } else {
  19. $("#StuNo").removeAttr("readonly");
  20. }
  21. },
  22. bind: function () {
  23. //$('#StuNo').lrselect({
  24. // allowSearch: true,
  25. // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',
  26. // param: { strWhere: "1=1 order by stuno" },
  27. // value: "stuno",
  28. // text: "stuname"
  29. //});
  30. $('#Gender').lrDataItemSelect({ code: 'usersex' });
  31. $('#IsInJob').lrDataItemSelect({ code: 'YesOrNoInt' });
  32. $('#Nation').lrDataItemSelect({ code: 'National' });
  33. },
  34. initData: function () {
  35. if (!!keyValue) {
  36. $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/LeagueMember/GetFormData?keyValue=' + keyValue, function (data) {
  37. for (var id in data) {
  38. if (!!data[id].length && data[id].length > 0) {
  39. $('#' + id ).jfGridSet('refreshdata', data[id]);
  40. }
  41. else {
  42. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  43. }
  44. }
  45. });
  46. }
  47. }
  48. };
  49. // 保存数据
  50. acceptClick = function (callBack) {
  51. if (!$('body').lrValidform()) {
  52. return false;
  53. }
  54. var postData = {
  55. strEntity: JSON.stringify($('body').lrGetFormData())
  56. };
  57. $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/LeagueMember/SaveForm?keyValue=' + keyValue, postData, function (res) {
  58. // 保存成功后才回调
  59. if (!!callBack) {
  60. callBack();
  61. }
  62. });
  63. };
  64. page.init();
  65. }