StudentSynch.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. var windowID;
  2. //加载
  3. $(function () {
  4. windowID = $.SystemGeneral.getUrlParam("WindowID");
  5. })
  6. function Student_Synchr() {
  7. var selectedColumns = "";
  8. $("[name='SynchColumn']:checked").each(function(){
  9. if (selectedColumns != "") {
  10. selectedColumns += ",";
  11. }
  12. selectedColumns += $(this).val();
  13. });
  14. if (selectedColumns == "") {
  15. $.messager.alert("系统提示", "请选择需要同步的项。");
  16. return;
  17. }
  18. var collegeID = $("#ddlCollege").combobox('getValue');
  19. var year = $("#ddlYear").combobox('getValue');
  20. var schoolAreaID = $("#ddlSchoolArea").combobox('getValue');
  21. if (collegeID == nonSelect) {
  22. collegeID = null;
  23. }
  24. if (year == nonSelect) {
  25. year = null;
  26. }
  27. if (schoolAreaID == nonSelect) {
  28. schoolAreaID = null;
  29. }
  30. $.messager.confirm("系统提示", "您确定要从数据中心同步学籍信息?", function (r) {
  31. if (r) {
  32. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Students/Synchr', { collegeID: collegeID, year: year, schoolAreaID: schoolAreaID, selectedColumns: selectedColumns }, function (ret) {
  33. $.messager.alert("系统提示", ret.Message);
  34. if (ret.IsSuccess) {
  35. top.$("#" + windowID).data("resultData", true);
  36. top.$("#" + windowID).dialog("close");
  37. }
  38. });
  39. }
  40. });
  41. }