EducationMissionClassCheck.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClassCheck/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. function reload() {
  8. $("#dgEducationMissionClassCheckList").cmsXDataTable("load", $.getDataGridParams("dgEducationMissionClassCheckList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgEducationMissionClassCheckList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this.EducationMissionClassCheckID);
  15. });
  16. return d;
  17. }
  18. function EducationMissionClassCheck_Update() {
  19. var d = validChoose();
  20. var id = validChoose().join(',');
  21. if (d.length == 0) {
  22. $.messager.alert("系统提示", "请选择您要修改的信息。");
  23. return;
  24. }
  25. else if (d.length > 1) {
  26. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  27. return;
  28. }
  29. var redirectTo = url + "?educationMissionClassCheckID=" + d + "&MNU=" + mnu;
  30. $.popupTopWindow('教学检查修改', redirectTo, 700, 500, null, null);
  31. }
  32. function EducationMissionClassCheck_Add() {
  33. var d = validChoose();
  34. if (d.length > 0) {
  35. $.popupTopWindow('教学检查复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClassCheck/CopyAdd?educationMissionClassCheckID=' + d[0] + '&MNU=' + mnu, 700, 500, null, null);
  36. } else {
  37. var redirectTo = url + "?MNU=" + mnu;
  38. $.popupTopWindow('教学检查新增', redirectTo, 700, 500, null, null);
  39. }
  40. }
  41. //删除
  42. function EducationMissionClassCheck_Delete() {
  43. var d = validChoose().join(',');
  44. if (d == "") {
  45. $.messager.alert("系统提示", "请选择您要删除的信息。");
  46. return;
  47. }
  48. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  49. if (r) {
  50. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClassCheck/Delete', { educationMissionClassCheckIDs: d }, function (data) {
  51. if (data == "删除成功。") {
  52. $.messager.alert("系统提示", data);
  53. $("#dgEducationMissionClassCheckList").cmsXDataTable('load');
  54. } else {
  55. $.messager.alert("系统提示", data);
  56. }
  57. });
  58. }
  59. });
  60. }
  61. function EducationMissionClassCheck_Export() {
  62. var d = validChoose().join(',')
  63. if (d != "") {
  64. document.getElementById("EducationMissionClassCheckID").value = d;
  65. }
  66. else {
  67. document.getElementById("EducationMissionClassCheckID").value = "";
  68. }
  69. $("#formQuery").submit();
  70. }
  71. function queryClass() {
  72. // var jsonString = "";
  73. // var parameterString = "";
  74. // var schoolYearID = $("#SchoolyearDropdown").combobox("getValue");
  75. // var campusID = $("#CampusDropdown").combogridX("getValue");
  76. // var collegeID = $("#CollegeDropdown").combogridX("getValue");
  77. // var educationID = $("#DictionaryEducation").combogridX("getValue");
  78. //
  79. // var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  80. // var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
  81. // if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  82. // if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  83. // if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  84. // if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  85. // if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  86. // if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  87. // if (parameterString != "") {
  88. // jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  89. // $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  90. // } else {
  91. // $("#StandardDictionaryDropDown").combogridX("reload");
  92. // }
  93. reload();
  94. }