StudentList.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. //获取选中的数据
  7. function validChoose() {
  8. var d = [];
  9. $.each($("#dgRetakePlanList").cmsXDataTable("getSelections"), function (index) {
  10. d.push(this);
  11. });
  12. return d;
  13. }
  14. function reload() {
  15. $("#dgRetakePlanList").cmsXDataTable("load", $.getDataGridParams("dgRetakePlanList"));
  16. }
  17. function RetakePlan_Apply(rowIndex, rowData) {
  18. var coursematerialID = rowData.CoursematerialID;
  19. var retakePlanStudentID = rowData.RetakePlanStudentID;
  20. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakPlan/CheckCanSubmit', { retakePlanStudentID: retakePlanStudentID },
  21. function (data) {
  22. if (data.IsSuccess) {
  23. $.popupTopWindow('重修申请', CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlan/SelectMission?MNU=' + mnu + '&coursematerialID=' + coursematerialID, 800, 600, RetakePlan_Apply_Confirm, retakePlanStudentID);
  24. } else {
  25. $.messager.alert("系统提示", data.Message);
  26. }
  27. });
  28. }
  29. function RetakePlan_Apply_Confirm(data) {
  30. var retakePlanStudentID = data.retakePlanStudentID;
  31. var educationMission = data.educationMission;
  32. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlan/Submit', { retakePlanStudentID: retakePlanStudentID, educationMissionID: educationMission.EducationMissionID }, function (data) {
  33. if (data.IsSuccess) {
  34. $.messager.alert("系统提示", "提交成功。");
  35. reload();
  36. } else {
  37. $.messager.alert("系统提示", data.Message);
  38. }
  39. });
  40. }