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.
 
 
 
 
 
 

224 lines
9.7 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. $("#GuardianType").parent().hide();
  23. $("#IdentityCardNo").parent().hide();
  24. $("#StuNo").parent().hide();
  25. $("#ClassNo").parent().hide();
  26. $("#MajorNo").parent().hide();
  27. $("#EduSystem").parent().hide();
  28. $("#F_SchoolId").parent().hide();
  29. $("#StuCode").parent().hide();
  30. $("#ksh").parent().hide();
  31. $("#NoticeNo").parent().hide();
  32. $("#HealthStatusNo").parent().hide();
  33. $("#ResidenceNo").parent().hide();
  34. $("#F_ProvinceId").parent().parent().hide();
  35. $("#Photo").parent().hide();
  36. $("#DeptNo").parent().hide();
  37. $("#FamilyOriginNo").parent().hide();
  38. $("#OverseasChineseNo").parent().hide();
  39. $("#Grade").parent().hide();
  40. $("#GraduateNo").parent().hide();
  41. $("#EduSystem").parent().hide();
  42. $("#RegisterDate").parent().hide();
  43. $("#StudyModality").parent().hide();
  44. $("#GraduateYear").parent().hide();
  45. $("#EntranceDate").parent().hide();
  46. $("#JoinPartyDate").parent().hide();
  47. $("#JoinLeagueDate").parent().hide();
  48. $("#InSchoolAddress").parent().hide();
  49. $("#InSchoolTelephone").parent().hide();
  50. $("#Remark").parent().hide();
  51. $("#DiplomaRemark").parent().hide();
  52. $("#GoodAt").parent().hide();
  53. $("#InSchoolAddress").parent().hide();
  54. $("#InSchoolTelephone").parent().hide();
  55. $("#JoinLeagueDate").parent().hide();
  56. }
  57. },
  58. bind: function () {
  59. $('#F_ProvinceId').lrDataSourceSelect({
  60. code: 'DIC_PROVINCE', value: 'pcode', text: 'pname',
  61. select: function (item) {
  62. if (item) {
  63. $('#F_CityId').lrselectRefresh({
  64. url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode",
  65. param: { ProvinceCode: item.pcode },
  66. value: 'CCODE',
  67. text: 'CNAME'
  68. });
  69. } else {
  70. $('#F_CityId').lrselectRefresh({
  71. url: "",
  72. data: []
  73. });
  74. }
  75. $('#F_CountyId').lrselectRefresh({
  76. url: "",
  77. data: []
  78. });
  79. }
  80. });
  81. $('#F_CityId').lrselect({
  82. value: 'ccode', text: 'cname',
  83. select: function (item) {
  84. if (item) {
  85. $('#F_CountyId').lrselectRefresh({
  86. url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode",
  87. param: { cityCode: item.CCODE },
  88. value: 'ACODE',
  89. text: 'ANAME'
  90. });
  91. }
  92. }
  93. });
  94. $('#F_CountyId').lrselect({
  95. value: 'ACODE', text: 'ANAME'
  96. });
  97. $('#ClassNo').lrselect({
  98. value: "classno",
  99. text: "classname"
  100. });
  101. $('#Grade').lrselect({
  102. url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
  103. value: 'value',
  104. text: 'text'
  105. });
  106. $('#GuardianType').lrDataItemSelect({ code: 'GuardianType' });
  107. $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' });
  108. $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
  109. $('#NationalityNo').lrDataItemSelect({ code: 'National' });
  110. $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
  111. $('#PartyFaceNo').lrDataItemSelect({ code: 'PolityStatus' });
  112. $('#HealthStatusNo').lrDataItemSelect({ code: 'StuHealthType' });
  113. $('#Photo').lrUploader();
  114. $('#FamilyOriginNo').lrDataItemSelect({ code: 'BCdFamilyOrigin' });
  115. $('#OverseasChineseNo').lrDataItemSelect({ code: 'BCdOverseasChinese' });
  116. $('#GraduateNo').lrDataItemSelect({ code: 'CollegeType' });
  117. $('#EduSystem').lrDataItemSelect({ code: 'EduSystem' });
  118. $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' });
  119. $('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' });
  120. $('#DeptNo').lrselect({
  121. value: "deptno",
  122. text: "deptname",
  123. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  124. select: function (item) {
  125. if (item) {
  126. $('#MajorNo').lrselectRefresh({
  127. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
  128. param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" }
  129. });
  130. }
  131. else {
  132. $('#MajorNo').lrselectRefresh({
  133. url: "",
  134. data: []
  135. });
  136. }
  137. $('#ClassNo').lrselectRefresh({
  138. url: "",
  139. data: []
  140. });
  141. }
  142. });
  143. $('#MajorNo').lrselect({
  144. value: "majorno",
  145. text: "majorname",
  146. select: function (item) {
  147. if (item) {
  148. $('#ClassNo').lrselectRefresh({
  149. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
  150. param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" }
  151. });
  152. }
  153. }
  154. });
  155. $('#MajorNo').on("click",
  156. function () {
  157. var data = $('#DeptNo').lrselectGet();
  158. if (!data) {
  159. learun.alert.error('请先选择系');
  160. }
  161. });
  162. $('#ClassNo').on("click",
  163. function () {
  164. var data1 = $('#DeptNo').lrselectGet();
  165. var data2 = $('#MajorNo').lrselectGet();
  166. if (!data1 || !data2) {
  167. learun.alert.error('请先选择系和专业');
  168. }
  169. });
  170. $('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' });
  171. $('#IsLeft').lrDataItemSelect({ code: 'YesOrNoBit' });
  172. $('#IsDisability').lrDataItemSelect({ code: 'YesOrNoBit' });
  173. $('#IsRunSchool').lrDataItemSelect({ code: 'YesOrNoBit' });
  174. $('#IsDdifficulty').lrDataItemSelect({ code: 'YesOrNoBit' });
  175. $('#FiveYear').lrDataItemSelect({ code: 'PieceCultivateWay' });
  176. $('#InternshipStatus').lrDataItemSelect({ code: 'InternshipStatus' });
  177. $('#IsRestudy').lrDataItemSelect({ code: 'YesOrNoInt' });
  178. $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' });
  179. $('#RecruitObject').lrDataItemSelect({ code: 'RecruitObject' });
  180. $('#RecruitWay').lrDataItemSelect({ code: 'RecruitWay' });
  181. $('#RecruitCooperateType').lrDataItemSelect({ code: 'RecruitCooperateType' });
  182. //$('#StuOrigin').lrDataItemSelect({ code: 'AdmissionsDataSource' });
  183. $('#EntranceWay').lrDataItemSelect({ code: 'EntranceWay' });
  184. $('#RecruitCooperateForm').lrDataItemSelect({ code: 'RecruitCooperateForm' });
  185. $('#MajorDetailNo').lrDataItemSelect({ code: 'MajorDetail' });
  186. $('#CountryNo').lrDataItemSelect({ code: 'BCdCountry' });
  187. },
  188. initData: function () {
  189. if (!!keyValue) {
  190. $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetFormData?keyValue=' + keyValue, function (data) {
  191. for (var id in data) {
  192. if (!!data[id].length && data[id].length > 0) {
  193. $('#' + id).jfGridSet('refreshdata', data[id]);
  194. }
  195. else {
  196. $('[data-table="' + id + '"]').lrSetFormData(data[id]);
  197. }
  198. }
  199. });
  200. }
  201. }
  202. };
  203. // 保存数据
  204. acceptClick = function (callBack) {
  205. if (!$('body').lrValidform()) {
  206. return false;
  207. }
  208. var postData = {
  209. strEntity: JSON.stringify($('body').lrGetFormData())
  210. };
  211. $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SaveForm?keyValue=' + keyValue, postData, function (res) {
  212. // 保存成功后才回调
  213. if (!!callBack) {
  214. callBack();
  215. }
  216. });
  217. };
  218. page.init();
  219. }