SOCDetailStudentScoreList.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. //获取选中的数据
  7. function validChoose() {
  8. var d = [];
  9. $.each($("#dgSOCDetailStudentScoreList").cmsXDataTable("getSelections"), function (index) {
  10. d.push(this);
  11. });
  12. return d;
  13. }
  14. //获取选中的数据
  15. function validChooseID() {
  16. var d = [];
  17. $.each($("#dgSOCDetailStudentScoreList").cmsXDataTable("getSelections"), function (index) {
  18. d.push(this.UserID);
  19. });
  20. return d;
  21. }
  22. function SOCDetailStudentScore_Excel() {
  23. $("[name='SOCDetailID']").val(socDetailID);
  24. var d = validChooseID().join(',');
  25. if (d != "") {
  26. $("[name='SelectIDs']").val(d);
  27. }
  28. //("#SOCDetailID").val(socDetailID);
  29. $(document.forms[0]).submit();
  30. }
  31. function SOCDetailStudentScore_Download() {
  32. var d = validChooseID().join(',');
  33. document.getElementById("isGroupList").value = 0;
  34. document.getElementById("IDs").value = d;
  35. $("#formQuery").attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/SOCDetailScore/Download");
  36. $(document.forms[0]).submit();
  37. }
  38. function SOCDetailStudentScore_Save() {
  39. $(document.forms[1]).submit();
  40. }
  41. function SOCDetailStudentScore_Cancel() {
  42. var d = validChoose();
  43. if (d.length == 0) {
  44. $.messager.alert("系统提示", "请选择要退回的记录。");
  45. return;
  46. }
  47. var noValueList = $.grep(d, function (x) { return !x.SOCDetailStudentID });
  48. if (noValueList.length > 0) {
  49. $.messager.alert("系统提示", "只能退回已提交的记录。");
  50. return;
  51. }
  52. var errorStatusList = $.grep(d, function (x) { return (x.RecordStatus == startStatusID || x.RecordStatus == cancelStatusID); });
  53. if (errorStatusList.length > 0) {
  54. $.messager.alert("系统提示", "只能退回已提交的记录。");
  55. return;
  56. }
  57. var socDetailStudentIDList = $.map(d, function (x) { return x.SOCDetailStudentID; }).join(',');
  58. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetailScore/StudentCancel?socDetailStudentIDs=' + socDetailStudentIDList + '&MNU=' + mnu;
  59. $.popupTopWindow('退回', redirectTo, 400, 300, null, reload);
  60. // $.messager.confirm("系统提示", "您确定要退回这些学生的成果上传?", function (r) {
  61. // if (r) {
  62. // $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetailScore/StudentCancel', { socDetailStudentIDs: $.map(d, function (x) { return x.SOCDetailStudentID; }).join(',') }, function (data) {
  63. // $.messager.alert("系统提示", data.Message);
  64. // if (data.IsSuccess) {
  65. // reload();
  66. // }
  67. // });
  68. // }
  69. // });
  70. }
  71. function reload() {
  72. $("#dgSOCDetailStudentScoreList").cmsXDataTable("load", $.getDataGridParams("dgSOCDetailStudentScoreList"));
  73. }
  74. function queryCourse() {
  75. try {
  76. var schoolyearID = $("#ddlSchoolyear").combobox("getValue");
  77. var jsonString = "({'QueryParamsDatas':'";
  78. if (schoolyearID != "" && schoolyearID != nonSelect) {
  79. jsonString += "Schoolyear|*|" + schoolyearID + "|@|";
  80. }
  81. jsonString += "'})";
  82. $("#cgbCourse").combogridX("reload", eval(jsonString));
  83. } catch (e) {
  84. }
  85. }
  86. function queryStandard() {
  87. try {
  88. var collegeID = $("#cgbCollege").combogridX("getValue");
  89. var yearID = $("#ddlYear").combobox("getValue");
  90. var jsonString = "({'QueryParamsDatas':'";
  91. if (collegeID != "" && collegeID != nonSelect) {
  92. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  93. }
  94. if (yearID != nonSelect) {
  95. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  96. }
  97. jsonString += "'})";
  98. $("#cbgStandard").combogridX("reload", eval(jsonString));
  99. } catch (e) {
  100. }
  101. }
  102. function queryClass() {
  103. try {
  104. var collegeID = $("#cgbCollege").combogridX("getValue");
  105. var yearID = $("#ddlYear").combobox("getValue");
  106. var standardID = $("#cbgStandard").combogridX("getValue");
  107. var jsonString = "({'QueryParamsDatas':'";
  108. if (collegeID != "" && collegeID != nonSelect) {
  109. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  110. }
  111. if (yearID != nonSelect) {
  112. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  113. }
  114. if (standardID != "" && standardID != nonSelect) {
  115. jsonString += "DictionaryStandard|*|" + standardID + "|@|";
  116. }
  117. jsonString += "'})";
  118. $("#cbgClassmajor").combogridX("reload", eval(jsonString));
  119. } catch (e) {
  120. }
  121. }
  122. function showAttachment(rowIndex, rowValue) {
  123. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetailScore/AttachmentList?detailID=' + rowValue.SOCDetailID + '&userID=' + rowValue.UserID + '&MNU=' + mnu;
  124. $.popupTopWindow('成果列表', redirectTo, 500, 350, null, null);
  125. }
  126. function remark(rowIndex, rowValue) {
  127. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetailScore/Remark?MNU=' + mnu;
  128. $.popupTopWindow('修改意见', redirectTo, 500, 350, null, rowValue.Remark);
  129. }
  130. function SOCDetailStudentScore_Send() {
  131. var d = validChoose();
  132. if (d.length == 0) {
  133. $.messager.alert("系统提示", "请选择要发送信息的记录。");
  134. return;
  135. }
  136. var userIDList = $.map(d, function (x) { return x.UserID; }).join(',');
  137. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetailScore/SendMessage?studentUserIDLists=' + userIDList + '&MNU=' + mnu;
  138. $.popupTopWindow('发送信息', redirectTo, 800, 800, null, null);
  139. }