TeacherEvaluation.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/StudentEvaluation/Edit?a=1";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. });
  7. //新增
  8. function EvaluationStudent_Add() {
  9. showDialog();
  10. }
  11. function reload() {
  12. $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
  13. }
  14. //获取选中的数据
  15. function validChoose() {
  16. var d = [];
  17. $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
  18. d.push(this.EntityID);
  19. });
  20. return d;
  21. }
  22. //点击列表更新
  23. function edit(rowindex, rowdata) {
  24. showDialog(rowdata.EntityID);
  25. }
  26. //修改按钮
  27. function EvaluationStudent_Update() {
  28. var d = validChoose();
  29. if (d.length == 0) {
  30. $.messager.alert("系统提示", "请选择您要修改的学生评价信息!");
  31. return;
  32. }
  33. if (d.length > 1) {
  34. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  35. return;
  36. }
  37. showDialog(d);
  38. }
  39. function showDialog(id) {
  40. var redirectTo = url;
  41. if (id) {
  42. redirectTo = redirectTo + '&id=' + id;
  43. }
  44. $.popupTopWindow('学生评价信息', redirectTo, 800, 500, null, null);
  45. }
  46. //删除
  47. function EvaluationStudent_Delete() {
  48. var selected = $("#dgList").cmsXDataTable("getSelections");
  49. if (selected.length == 0) {
  50. $.messager.alert("系统提示", "请选择您要删除的学生评价信息!");
  51. return;
  52. }
  53. var ids = [];
  54. for (var i = 0; i < selected.length; i++) {
  55. // if (selected[i].EntityApprovalStatus != 0 && selected[i].EntityApprovalStatus != 100) {
  56. // $.messager.alert("系统提示", "只能删除未提交、已退回状态的异动申请信息!");
  57. // return;
  58. // }
  59. ids.push(selected[i].EntityID);
  60. }
  61. $.messager.confirm("系统提示", "您确定要删除该学生评价信息?", function (r) {
  62. if (r) {
  63. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentEvaluation/Delete', { ids: ids.join(',') }, function (data) {
  64. if (data == "删除成功") {
  65. $.messager.alert("系统提示", "删除成功!");
  66. $("#dgList").cmsXDataTable('load');
  67. } else {
  68. $.messager.alert("系统提示", data);
  69. }
  70. });
  71. }
  72. });
  73. }
  74. function EvaluationStudent_Export() {
  75. $("#formQuery").submit();
  76. }
  77. function QueryCampusDropdownList(data) {
  78. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  79. reload();
  80. }
  81. function QueryCollegeDropdownList(data) {
  82. reload();
  83. }