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.
 
 
 
 
 
 

173 line
7.3 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-02-21 16:53
  5. * 描 述:学生学籍
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var isStudent = request('isStudent');
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. var page = {
  13. init: function () {
  14. $('.lr-form-wrap').lrscroll();
  15. page.bind();
  16. page.initData();
  17. page.hide();
  18. },
  19. hide: function () {
  20. if (isStudent == "1") {
  21. $("#StuName").parent().hide();
  22. $("#IdentityCardNo").parent().hide();
  23. $("#StuNo").parent().hide();
  24. $("#ClassNo").parent().hide();
  25. $("#MajorNo").parent().hide();
  26. $("#EduSystem").parent().hide();
  27. $("#F_SchoolId").parent().hide();
  28. $("#StuCode").parent().hide();
  29. $("#ksh").parent().hide();
  30. $("#NoticeNo").parent().hide();
  31. $("#HealthStatusNo").parent().hide();
  32. $("#ResidenceNo").parent().hide();
  33. $("#F_ProvinceId").parent().parent().hide();
  34. $("#Photo").parent().hide();
  35. $("#FamilyOriginNo").parent().hide();
  36. $("#OverseasChineseNo").parent().hide();
  37. $("#Grade").parent().hide();
  38. $("#GraduateNo").parent().hide();
  39. $("#EduSystem").parent().hide();
  40. $("#RegisterDate").parent().hide();
  41. $("#StudyModality").parent().hide();
  42. $("#GraduateYear").parent().hide();
  43. $("#EntranceDate").parent().hide();
  44. $("#JoinPartyDate").parent().hide();
  45. $("#JoinLeagueDate").parent().hide();
  46. $("#InSchoolAddress").parent().hide();
  47. $("#InSchoolTelephone").parent().hide();
  48. $("#Remark").parent().hide();
  49. $("#DiplomaRemark").parent().hide();
  50. $("#GoodAt").parent().hide();
  51. $("#InSchoolAddress").parent().hide();
  52. $("#InSchoolTelephone").parent().hide();
  53. $("#JoinLeagueDate").parent().hide();
  54. }
  55. },
  56. bind: function () {
  57. $('#F_ProvinceId').lrDataSourceSelect({
  58. code: 'DIC_PROVINCE', value: 'pcode', text: 'pname',
  59. select: function (item) {
  60. if (item) {
  61. $('#F_CityId').lrselectRefresh({
  62. url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode",
  63. param: { ProvinceCode: item.pcode },
  64. value: 'CCODE',
  65. text: 'CNAME'
  66. });
  67. } else {
  68. $('#F_CityId').lrselectRefresh({
  69. url: "",
  70. data: []
  71. });
  72. }
  73. $('#F_CountyId').lrselectRefresh({
  74. url: "",
  75. data: []
  76. });
  77. }
  78. });
  79. $('#F_CityId').lrselect({
  80. value: 'ccode', text: 'cname',
  81. select: function (item) {
  82. if (item) {
  83. $('#F_CountyId').lrselectRefresh({
  84. url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode",
  85. param: { cityCode: item.CCODE },
  86. value: 'ACODE',
  87. text: 'ANAME'
  88. });
  89. }
  90. }
  91. });
  92. $('#F_CountyId').lrselect({
  93. value: 'ACODE', text: 'ANAME'
  94. });
  95. $('#ClassNo').lrselect({
  96. value: "classno",
  97. text: "classname"
  98. });
  99. $('#Grade').lrselect({
  100. url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
  101. value: 'value',
  102. text: 'text'
  103. });
  104. $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' });
  105. $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
  106. $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' });
  107. $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
  108. $('#PartyFaceNo').lrDataSourceSelect({ code: 'BCdPartyFace', value: 'partyfaceno', text: 'partyface' });
  109. $('#HealthStatusNo').lrDataSourceSelect({ code: 'BCdHealthStatus', value: 'healthstatusno', text: 'healthstatus' });
  110. $('#Photo').lrUploader();
  111. $('#FamilyOriginNo').lrDataSourceSelect({ code: 'BCdFamilyOrigin', value: 'familyoriginno', text: 'familyorigin' });
  112. $('#OverseasChineseNo').lrDataSourceSelect({ code: 'BCdOverseasChinese', value: 'overseaschineseno', text: 'overseaschinesename' });
  113. $('#GraduateNo').lrDataItemSelect({ code: 'CollegeType' });
  114. $('#EduSystem').lrDataItemSelect({ code: 'EduSystem' });
  115. $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' });
  116. $('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' });
  117. $('#MajorNo').lrselect({
  118. value: "majorno",
  119. text: "majorname",
  120. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  121. select: function (item) {
  122. if (item) {
  123. $('#ClassNo').lrselectRefresh({
  124. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
  125. param: { code: "bjsj", strWhere: "majorno='" + item.majorno + "'" }
  126. });
  127. }
  128. }
  129. });
  130. $('#ClassNo').on("click",
  131. function () {
  132. var data2 = $('#MajorNo').lrselectGet();
  133. if (!data2) {
  134. learun.alert.error('请先选择专业');
  135. }
  136. });
  137. },
  138. initData: function () {
  139. if (!!keyValue) {
  140. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetFormData?keyValue=' + keyValue, function (data) {
  141. for (var id in data) {
  142. if (!!data[id].length && data[id].length > 0) {
  143. $('#' + id).jfGridSet('refreshdata', data[id]);
  144. }
  145. else {
  146. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  147. }
  148. }
  149. });
  150. }
  151. }
  152. };
  153. // 保存数据
  154. acceptClick = function (callBack) {
  155. if (!$('body').lrValidform()) {
  156. return false;
  157. }
  158. var postData = {
  159. strEntity: JSON.stringify($('body').lrGetFormData())
  160. };
  161. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SaveForm?keyValue=' + keyValue, postData, function (res) {
  162. // 保存成功后才回调
  163. if (!!callBack) {
  164. callBack();
  165. }
  166. });
  167. };
  168. page.init();
  169. }