PersonalInfo.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/PersonalInfo/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. //非负浮点数(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/)
  7. var reg = /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/;
  8. var learnSystem = $("#LearnSystem").val();
  9. if (learnSystem == "" || learnSystem == null) {
  10. $("#LearnSystem").val("");
  11. }
  12. else {
  13. if (!reg.test(learnSystem)) {
  14. $("#LearnSystem").val("");
  15. }
  16. else {
  17. $("#LearnSystem").val(parseFloat(learnSystem).toFixed(1));
  18. }
  19. }
  20. var score = $("#Score").val();
  21. if (score == "" || score == null) {
  22. $("#Score").val("");
  23. }
  24. else {
  25. if (!reg.test(score)) {
  26. $("#Score").val("");
  27. }
  28. else {
  29. $("#Score").val(parseFloat(score).toFixed(1));
  30. }
  31. }
  32. $("#specialtyExpander").closest("tr")
  33. .next().css("display", "")
  34. .next().css("display", "")
  35. .next().css("display", "")
  36. .next().css("display", "");
  37. $("#specialtyExpander").attr("expanded", "1");
  38. $("#profileExpander").closest("tr")
  39. .next().css("display", "")
  40. .next().css("display", "")
  41. .next().css("display", "")
  42. .next().css("display", "")
  43. .next().css("display", "")
  44. .next().css("display", "")
  45. .next().css("display", "")
  46. .next().css("display", "")
  47. .next().css("display", "")
  48. .next().css("display", "");
  49. $("#profileExpander").attr("expanded", "1");
  50. $("#contactExpander").closest("tr")
  51. .next().css("display", "")
  52. .next().css("display", "")
  53. .next().css("display", "")
  54. .next().css("display", "")
  55. .next().css("display", "")
  56. .next().css("display", "")
  57. .next().css("display", "");
  58. $("#contactExpander").attr("expanded", "1");
  59. $("#accountExpander").closest("tr")
  60. .next().css("display", "");
  61. $("#accountExpander").attr("expanded", "1");
  62. $("#recruitExpander").closest("tr")
  63. .next().css("display", "")
  64. .next().css("display", "")
  65. .next().css("display", "")
  66. .next().css("display", "")
  67. .next().css("display", "");
  68. $("#recruitExpander").attr("expanded", "1");
  69. $("#otherExpander").closest("tr")
  70. .next().css("display", "")
  71. .next().css("display", "");
  72. $("#otherExpander").attr("expanded", "1");
  73. });
  74. //刷新
  75. function reload() {
  76. $("#dgPersonalInfoList").cmsXDataTable("load", $.getDataGridParams("dgPersonalInfoList"));
  77. }
  78. //获取选中的数据
  79. function validChoose() {
  80. var d = [];
  81. $.each($("#dgPersonalInfoList").cmsXDataTable("getSelections"), function (index) {
  82. d.push(this.UserID);
  83. });
  84. return d;
  85. }
  86. //点击收缩(专业班级信息)
  87. function swapSpecialty() {
  88. if ($("#specialtyExpander").attr("expanded") == "1") {
  89. $("#specialtyExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0");
  90. $("#specialtyExpander").closest("tr")
  91. .next().css("display", "none")
  92. .next().css("display", "none")
  93. .next().css("display", "none")
  94. .next().css("display", "none");
  95. $("#specialtyExpander").attr("expanded", "0");
  96. } else {
  97. $("#specialtyExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0");
  98. $("#specialtyExpander").closest("tr")
  99. .next().css("display", "")
  100. .next().css("display", "")
  101. .next().css("display", "")
  102. .next().css("display", "");
  103. $("#specialtyExpander").attr("expanded", "1");
  104. }
  105. }
  106. //点击收缩(学生扩展信息)
  107. function swapProfile() {
  108. if ($("#profileExpander").attr("expanded") == "1") {
  109. $("#profileExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0");
  110. $("#profileExpander").closest("tr")
  111. .next().css("display", "none")
  112. .next().css("display", "none")
  113. .next().css("display", "none")
  114. .next().css("display", "none")
  115. .next().css("display", "none")
  116. .next().css("display", "none")
  117. .next().css("display", "none")
  118. .next().css("display", "none")
  119. .next().css("display", "none")
  120. .next().css("display", "none");
  121. $("#profileExpander").attr("expanded", "0");
  122. } else {
  123. $("#profileExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0");
  124. $("#profileExpander").closest("tr")
  125. .next().css("display", "")
  126. .next().css("display", "")
  127. .next().css("display", "")
  128. .next().css("display", "")
  129. .next().css("display", "")
  130. .next().css("display", "")
  131. .next().css("display", "")
  132. .next().css("display", "")
  133. .next().css("display", "")
  134. .next().css("display", "none");
  135. $("#profileExpander").attr("expanded", "1");
  136. }
  137. }
  138. //点击收缩(学生联系信息)
  139. function swapContact() {
  140. if ($("#contactExpander").attr("expanded") == "1") {
  141. $("#contactExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0");
  142. $("#contactExpander").closest("tr")
  143. .next().css("display", "none")
  144. .next().css("display", "none")
  145. .next().css("display", "none")
  146. .next().css("display", "none")
  147. .next().css("display", "none")
  148. .next().css("display", "none")
  149. .next().css("display", "none");
  150. $("#contactExpander").attr("expanded", "0");
  151. } else {
  152. $("#contactExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0");
  153. $("#contactExpander").closest("tr")
  154. .next().css("display", "")
  155. .next().css("display", "")
  156. .next().css("display", "")
  157. .next().css("display", "")
  158. .next().css("display", "")
  159. .next().css("display", "")
  160. .next().css("display", "");
  161. $("#contactExpander").attr("expanded", "1");
  162. }
  163. }
  164. //点击收缩(学生缴费信息)
  165. function swapAccount() {
  166. if ($("#accountExpander").attr("expanded") == "1") {
  167. $("#accountExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0");
  168. $("#accountExpander").closest("tr")
  169. .next().css("display", "none");
  170. $("#accountExpander").attr("expanded", "0");
  171. } else {
  172. $("#accountExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0");
  173. $("#accountExpander").closest("tr")
  174. .next().css("display", "");
  175. $("#accountExpander").attr("expanded", "1");
  176. }
  177. }
  178. //点击收缩(高考招生信息)
  179. function swapRecruit() {
  180. if ($("#recruitExpander").attr("expanded") == "1") {
  181. $("#recruitExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0");
  182. $("#recruitExpander").closest("tr")
  183. .next().css("display", "none")
  184. .next().css("display", "none")
  185. .next().css("display", "none")
  186. .next().css("display", "none")
  187. .next().css("display", "none");
  188. $("#recruitExpander").attr("expanded", "0");
  189. } else {
  190. $("#recruitExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0");
  191. $("#recruitExpander").closest("tr")
  192. .next().css("display", "")
  193. .next().css("display", "")
  194. .next().css("display", "")
  195. .next().css("display", "")
  196. .next().css("display", "");
  197. $("#recruitExpander").attr("expanded", "1");
  198. }
  199. }
  200. //点击收缩(其它信息)
  201. function swapOther() {
  202. if ($("#otherExpander").attr("expanded") == "1") {
  203. $("#otherExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0");
  204. $("#otherExpander").closest("tr")
  205. .next().css("display", "none")
  206. .next().css("display", "none");
  207. $("#otherExpander").attr("expanded", "0");
  208. } else {
  209. $("#otherExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0");
  210. $("#otherExpander").closest("tr")
  211. .next().css("display", "")
  212. .next().css("display", "");
  213. $("#otherExpander").attr("expanded", "1");
  214. }
  215. }
  216. //校对
  217. function PersonalInfo_Check() {
  218. var userID = $("#UserID").val();
  219. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/PersonalInfo/CheckOpenObject', { userID: userID }, function (data) {
  220. if (data.IsSuccess) {
  221. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/PersonalInfo/CheckEdit?MNU=' + mnu;
  222. $.popupTopWindow('个人信息校对', redirectTo, 750, 550, null, null);
  223. } else {
  224. $.messager.alert("系统提示", data.Message);
  225. }
  226. });
  227. }
  228. //核对
  229. function PersonalInfo_Proofread() {
  230. var userID = $("#UserID").val();
  231. if (userID != null && userID != "") {
  232. $.messager.confirm("系统提示", "是否对当前个人信息进行确认核对?", function (r) {
  233. if (r) {
  234. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/PersonalInfo/Proofread', { userID: userID }, function (data) {
  235. if (data.IsSuccess) {
  236. $.messager.alert("系统提示", data.Message);
  237. } else {
  238. $.messager.alert("系统提示", data.Message);
  239. }
  240. });
  241. }
  242. });
  243. } else {
  244. $.messager.alert("系统提示", "数据有误,请刷新页面重新加载。");
  245. }
  246. }
  247. //学籍报表
  248. function PersonalInfo_CradReport() {
  249. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/PersonalInfo/CradReport?MNU=' + mnu;
  250. var personalCradReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='PersonalCradReport']").attr("customName");
  251. if (personalCradReportName == "HBGDPersonalCard") {
  252. $.popupTopWindow('学籍报表', redirectTo, 680, 550, null, {
  253. PersonalCradReportName: personalCradReportName
  254. });
  255. } else {
  256. $.popupTopWindow('学籍报表', redirectTo, 1124, 550, null, {
  257. PersonalCradReportName: personalCradReportName
  258. });
  259. }
  260. }
  261. //Excel导出
  262. function PersonalInfo_Export() {
  263. }