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.

Form.js 3.9 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  61. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  62. * 创建人:超级管理员
  63. * 日 期:2022-08-29 16:34
  64. * 描 述:毕业信息统计
  65. */
  66. var acceptClick;
  67. var keyValue = request('keyValue');
  68. var bootstrap = function ($, learun) {
  69. "use strict";
  70. var page = {
  71. init: function () {
  72. $('.lr-form-wrap').lrscroll();
  73. page.bind();
  74. page.initData();
  75. },
  76. bind: function () {
  77. $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
  78. $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
  79. $('#EduSystem').lrDataItemSelect({ code: 'EduSystem' });
  80. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
  81. $('#GraduateGo').lrDataItemSelect({ code: 'GraduateGo' });
  82. $('#UniversityLevel').lrDataItemSelect({ code: 'GraduateLevel' });
  83. $('#EmployerProvince').lrDataSourceSelect({
  84. code: 'DIC_PROVINCE', value: 'pcode', text: 'pname',
  85. select: function (item) {
  86. if (item) {
  87. $('#EmployerCity').lrselectRefresh({
  88. url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode",
  89. param: { ProvinceCode: item.pcode },
  90. value: 'CCODE',
  91. text: 'CNAME'
  92. });
  93. } else {
  94. $('#EmployerCity').lrselectRefresh({
  95. url: "",
  96. data: []
  97. });
  98. }
  99. $('#EmployerCountry').lrselectRefresh({
  100. url: "",
  101. data: []
  102. });
  103. }
  104. });
  105. $('#EmployerCity').lrselect({
  106. value: 'ccode', text: 'cname',
  107. select: function (item) {
  108. if (item) {
  109. $('#EmployerCountry').lrselectRefresh({
  110. url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode",
  111. param: { cityCode: item.CCODE },
  112. value: 'ACODE',
  113. text: 'ANAME'
  114. });
  115. }
  116. }
  117. });
  118. $('#EmployerCountry').lrselect({
  119. value: 'ACODE', text: 'ANAME'
  120. });
  121. },
  122. initData: function () {
  123. if (!!keyValue) {
  124. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuGraduateStatistic/GetFormData?keyValue=' + keyValue, function (data) {
  125. for (var id in data) {
  126. if (!!data[id].length && data[id].length > 0) {
  127. $('#' + id).jfGridSet('refreshdata', data[id]);
  128. }
  129. else {
  130. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  131. }
  132. }
  133. });
  134. }
  135. }
  136. };
  137. // 保存数据
  138. acceptClick = function (callBack) {
  139. if (!$('body').lrValidform()) {
  140. return false;
  141. }
  142. var postData = {
  143. strEntity: JSON.stringify($('body').lrGetFormData())
  144. };
  145. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuGraduateStatistic/SaveForm?keyValue=' + keyValue, postData, function (res) {
  146. // 保存成功后才回调
  147. if (!!callBack) {
  148. callBack();
  149. }
  150. });
  151. };
  152. page.init();
  153. }