SOCDetailGroupScoreList.js 6.2 KB

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