StudentUser.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/User/StudentEdit";
  2. var bathval = "";
  3. var mnu;
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. });
  7. function User_Export() {
  8. $(document.forms[0]).submit();
  9. }
  10. function reload() {
  11. $("#dgUserList").cmsXDataTable("load", $.getDataGridParams("dgUserList"));
  12. }
  13. //获取选中的数据
  14. function validChoose() {
  15. var d = [];
  16. $.each($("#dgUserList").cmsXDataTable("getSelections"), function (index) {
  17. d.push(this.UserID);
  18. });
  19. return d;
  20. }
  21. //修改角色
  22. function User_ModifyRole() {
  23. var d = validChoose();
  24. if (d.length == 0) {
  25. $.messager.alert("系统提示", "请选择您要修改角色的用户信息。");
  26. return;
  27. }
  28. if (d.length > 1) {
  29. $.messager.alert("系统提示", "只能选择单个用户进行修改角色。");
  30. return;
  31. }
  32. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/User/StudentModifyRole?UserID=" + d + "&MNU=" + mnu;
  33. $.popupTopWindow('修改角色', redirectTo, 650, 350, null, null);
  34. }
  35. //修改密码
  36. function User_BatchInitPassword() {
  37. var d = validChoose().join(',');
  38. if (d == "") {
  39. $.messager.alert("系统提示", "请选择您要修改密码的用户。");
  40. return;
  41. }
  42. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/User/BatchInitPassword?userID=+' + d + '&type=1&MNU=' + mnu + '&isView=3';
  43. $.popupTopWindow('修改密码', redirectTo, 450, 200, null, null);
  44. }
  45. //密码规则
  46. function User_BatchSetPassword() {
  47. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/User/BatchInitPassword?userID=student&type=1&MNU=' + mnu + '&isView=4';
  48. $.popupTopWindow('密码规则', redirectTo, 450, 200, null, null);
  49. }
  50. //启用
  51. function User_USABLE() {
  52. var d = validChoose().join(',');
  53. if (d == "") {
  54. $.messager.alert("系统提示", "请选择您要启用的用户。");
  55. return;
  56. }
  57. $.messager.confirm("系统提示", "您确定对选择的用户启用?", function (r) {
  58. if (r) {
  59. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/User/Usable', { userIDList: d }, function (data) {
  60. $.messager.alert("系统提示", data.Message, 'info', function () {
  61. if (data.IsSuccess) {
  62. $("#dgUserList").cmsXDataTable('load');
  63. }
  64. });
  65. });
  66. }
  67. });
  68. }
  69. //禁用
  70. function User_UNUSABLE() {
  71. var d = validChoose().join(',');
  72. if (d == "") {
  73. $.messager.alert("系统提示", "请选择您要禁用的用户。");
  74. return;
  75. }
  76. $.messager.confirm("系统提示", "您确定对选择的用户禁用?", function (r) {
  77. if (r) {
  78. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/User/UnUsable', { userIDList: d }, function (data) {
  79. $.messager.alert("系统提示", data.Message, 'info', function () {
  80. if (data.IsSuccess) {
  81. $("#dgUserList").cmsXDataTable('load');
  82. }
  83. });
  84. });
  85. }
  86. });
  87. }
  88. function queryCollege(data) {
  89. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  90. }
  91. function queryStandard() {
  92. var jsonString = "";
  93. var parameterString = "";
  94. var collegeID = $("#CollegeDropdown").combobox("getValue");
  95. var year = $("#SchoolYear").combobox("getValue");
  96. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  97. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|";
  98. if (parameterString != "") {
  99. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  100. $("#Standard").combogridX("reload", eval(jsonString));
  101. } else {
  102. $("#Standard").combogridX("reload");
  103. }
  104. reload();
  105. }
  106. function queryClass() {
  107. var jsonString = "";
  108. var parameterString = "";
  109. var campusID = $("#CampusDropdown").combobox("getValue");
  110. var collegeID = $("#CollegeDropdown").combobox("getValue");
  111. var educationID = $("#Education").combobox("getValue");
  112. var schoolYearID = $("#SchoolYear").combobox("getValue");
  113. var standardID = $("#Standard").combogridX("getValue");
  114. var learningFormID = $("#Learningform").combobox("getValue");
  115. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  116. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  117. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  118. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  119. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  120. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  121. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  122. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  123. if (parameterString != "") {
  124. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  125. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  126. } else {
  127. $("#ClassmajorDropdown").combogridX("reload");
  128. }
  129. reload();
  130. }
  131. //function queryCollege(data) {
  132. // $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  133. //}
  134. ////function queryCollege(data) {
  135. //// queryClass();
  136. ////}
  137. //function queryStandard(data) {
  138. // queryClass();
  139. //}
  140. //function queryClass() {
  141. // var jsonString = "";
  142. // var parameterString = "";
  143. // //var campusID = $("#CampusDropdown").combogridX("getValue");
  144. // var collegeID = $("#CollegeDropdown").combogridX("getValue");
  145. // //var educationID = $("#Education").combobox("getValue");
  146. // var schoolYearID = $("#SchoolYear").combobox("getValue");
  147. // var standardID = $("#Standard").combogridX("getValue");
  148. // //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  149. // if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  150. // //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  151. // if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  152. // if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  153. // if (parameterString != "") {
  154. // jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  155. // $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  156. // $("#Standard").combogridX("reload", eval(jsonString));
  157. // } else {
  158. // $("#ClassmajorDropdown").combogridX("reload");
  159. // $("#DictionaryStandard").combogridX("reload");
  160. // }
  161. // reload();
  162. //}