EvaluationControl.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationControl/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //新增
  8. function EvaluationControl_Add() {
  9. redirectTo = url + '?MNU=' + mnu;
  10. $.popupTopWindow('评价控制新增', redirectTo, 650, 420, null, null);
  11. }
  12. //
  13. function reload() {
  14. $("#dgEvaluationControlList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationControlList"));
  15. }
  16. //获取选中的数据
  17. function validChoose() {
  18. var d = [];
  19. $.each($("#dgEvaluationControlList").cmsXDataTable("getSelections"), function (index) {
  20. d.push(this.ControlID);
  21. });
  22. return d;
  23. }
  24. //查看评价控制明细
  25. function edit(rowindex, rowdata) {
  26. redirectTo = url + "?controlID=" + rowdata.ControlID + "&MNU=" + mnu;
  27. $.popupTopWindow('评价控制信息', redirectTo, 650, 420, null, null);
  28. }
  29. //修改按钮
  30. function EvaluationControl_Update() {
  31. var d = validChoose();
  32. if (d.length == 0) {
  33. $.messager.alert("系统提示", "请选择您要修改的信息。");
  34. return;
  35. }
  36. if (d.length > 1) {
  37. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  38. return;
  39. }
  40. redirectTo = url + "?controlID=" + rowdata.ControlID + "&MNU=" + mnu;
  41. $.popupTopWindow('评价控制修改', redirectTo, 650, 420, null, null);
  42. }
  43. //删除
  44. function EvaluationControl_Delete() {
  45. var d = validChoose().join(',');
  46. if (d == "") {
  47. $.messager.alert("系统提示", "请选择您要删除的信息。");
  48. return;
  49. }
  50. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  51. if (r) {
  52. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationControl/Delete', { controlIDs: d }, function (data) {
  53. if (data == "删除成功。") {
  54. $.messager.alert("系统提示", data);
  55. $("#dgEvaluationControlList").cmsXDataTable('load');
  56. } else {
  57. $.messager.alert("系统提示", data);
  58. }
  59. });
  60. }
  61. });
  62. }
  63. //Excel导出
  64. function EvaluationControl_Export() {
  65. $("#formQuery").submit();
  66. }
  67. function QueryIsResultDropdownList(data) {
  68. reload();
  69. }
  70. function QueryIsCourseDropdownList(data) {
  71. reload();
  72. }