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.
 
 
 
 
 
 

85 lines
3.5 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-12-16 10:14
  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. $('#IsCYSchool').lrDataItemSelect({ code: 'YesOrNoBit' });
  19. $('#IsPlan').lrDataItemSelect({ code: 'YesOrNoBit' });
  20. $('#Sex').lrDataItemSelect({ code: 'usersex' });
  21. //$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' });
  22. //$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' });
  23. //$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' });
  24. $('#MajorNo').lrselect({
  25. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  26. value: 'majorno',
  27. text: 'majorname',
  28. maxHeight: 200,
  29. select: function (item) {
  30. var classNo = $("#MajorNo").lrselectGet();
  31. if (classNo != null && classNo != "" && classNo != undefined) {
  32. $('#ClassNo').lrselectRefresh({
  33. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  34. param: { strWhere: " 1=1 and majorno in (" + classNo + ")" },
  35. value: "classno",
  36. text: "classname",
  37. maxHeight: 200
  38. });
  39. } else {
  40. $('#ClassNo').lrselectRefresh({
  41. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  42. param: { strWhere: " 1=1 and majorno ='' " },
  43. value: "classno",
  44. text: "classname",
  45. maxHeight: 200
  46. });
  47. }
  48. }
  49. })
  50. $("#ClassNo").lrselect();
  51. },
  52. initData: function () {
  53. if (!!keyValue) {
  54. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetFormData?keyValue=' + keyValue, function (data) {
  55. for (var id in data) {
  56. if (!!data[id].length && data[id].length > 0) {
  57. $('#' + id ).jfGridSet('refreshdata', data[id]);
  58. }
  59. else {
  60. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  61. }
  62. }
  63. });
  64. }
  65. }
  66. };
  67. // 保存数据
  68. acceptClick = function (callBack) {
  69. if (!$('body').lrValidform()) {
  70. return false;
  71. }
  72. var postData = {
  73. strEntity: JSON.stringify($('body').lrGetFormData())
  74. };
  75. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/SaveForm?keyValue=' + keyValue, postData, function (res) {
  76. // 保存成功后才回调
  77. if (!!callBack) {
  78. callBack();
  79. }
  80. });
  81. };
  82. page.init();
  83. }