EvaluationStudentSettingScore.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSettingScore/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgEvaluationStudentSettingScoreList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationStudentSettingScoreList"));
  10. }
  11. //获取选中的数据All
  12. function validChooseAll() {
  13. var d = [];
  14. $.each($("#dgEvaluationStudentSettingScoreList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this);
  16. });
  17. return d;
  18. }
  19. //获取选中的数据
  20. function validChoose() {
  21. var d = [];
  22. $.each($("#dgEvaluationStudentSettingScoreList").cmsXDataTable("getSelections"), function (index) {
  23. d.push(this.EvaluationStudentSettingScoreID);
  24. });
  25. return d;
  26. }
  27. //查看
  28. function edit(rowindex, rowdata) {
  29. var redirectTo = url + "?evaluationStudentSettingScoreID=" + rowdata.EvaluationStudentSettingScoreID + "&MNU=" + mnu + "&type=detail";
  30. $.popupTopWindow('学评评分信息', redirectTo, 720, 500, null, null);
  31. }
  32. //参评人数明细
  33. function editParticipateCount(rowindex, rowdata) {
  34. var d = [];
  35. d.push(rowdata.EvaluationStudentSettingScoreID);
  36. redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSettingScore/EvaluationStudentList?evaluationStudentSettingScoreID=" + rowdata.EvaluationStudentSettingScoreID + "&MNU=" + mnu;
  37. $.popupTopWindow('参评人数明细', redirectTo, 1350, 550, reload, d);
  38. }
  39. //评分生成
  40. function EvaluationStudentSettingScore_Create() {
  41. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSettingScore/Create?MNU=" + mnu;
  42. $.popupTopWindow('评分生成', redirectTo, 750, 325, reload);
  43. }
  44. //新增
  45. function EvaluationStudentSettingScore_Add() {
  46. var d = validChoose();
  47. if (d.length > 0) {
  48. $.popupTopWindow('学评评分复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSettingScore/CopyAdd?evaluationStudentSettingScoreID=' + d[0] + '&MNU=' + mnu, 720, 500, null, null);
  49. }
  50. else {
  51. var redirectTo = url + "?MNU=" + mnu;
  52. $.popupTopWindow('学评评分新增', redirectTo, 720, 500, null, null);
  53. }
  54. }
  55. //修改
  56. function EvaluationStudentSettingScore_Edit() {
  57. var d = validChoose();
  58. if (d.length == 0) {
  59. $.messager.alert("系统信息", "请选择您要修改的信息。");
  60. return;
  61. }
  62. if (d.length > 1) {
  63. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  64. return;
  65. }
  66. var redirectTo = url + "?evaluationStudentSettingScoreID=" + d + "&MNU=" + mnu + "&type=edit";
  67. $.popupTopWindow('学评评分修改', redirectTo, 720, 500, null, null);
  68. }
  69. //删除
  70. function EvaluationStudentSettingScore_Delete() {
  71. var d = validChoose().join(',');
  72. if (d == "") {
  73. $.messager.alert("系统提示", "请选择您要删除的信息。");
  74. return;
  75. }
  76. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  77. if (r) {
  78. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSettingScore/Delete', { evaluationStudentSettingScoreIDs: d }, function (data) {
  79. if (data.IsSuccess) {
  80. $.messager.alert("系统提示", data.Message);
  81. $("#dgEvaluationStudentSettingScoreList").cmsXDataTable('load');
  82. } else {
  83. $.messager.alert("系统提示", data.Message);
  84. }
  85. });
  86. }
  87. });
  88. }
  89. //设置列颜色为红色
  90. function SetRedColumn(index, row, value) {
  91. return " <span style=\"color: red;\">" + value + "</span>";
  92. }
  93. //设置相应的行颜色为红色
  94. function SetRedGrid(rowIndex, rowData) {
  95. if (rowData.OpenState != true) {
  96. return "color: red;";
  97. }
  98. else {
  99. return "";
  100. }
  101. }
  102. //导出Excel
  103. function EvaluationStudentSettingScore_Export() {
  104. $("#formQuery").submit();
  105. }
  106. //联动查询
  107. function queryCampus(data) {
  108. var campusID = $("#CampusDropdown").combogridX("getValue");
  109. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  110. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  111. reload();
  112. }
  113. function queryCollege(data) {
  114. reload();
  115. }
  116. function queryDepartment(data) {
  117. var departmentID = $("#DepartmentDropdown").combogridX("getValue"); //combobox
  118. var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})";
  119. $("#StaffComboGrid").combogridX("reload", eval(jsonString));
  120. reload();
  121. }