Approval.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/DifferentDynamicApproval/Edit?a=1";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. });
  7. //新增
  8. function DifferentDynamicApply_Add() {
  9. showDialog();
  10. }
  11. //联动查询
  12. function queryStandard(data) {
  13. queryClass();
  14. reload();
  15. }
  16. function queryCollege(data) {
  17. var campusID = $("#CampusDropdown").combogridX("getValue");
  18. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  19. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  20. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  21. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  22. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  23. // if (campusID != nonSelect) {
  24. // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  25. // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  26. // }
  27. queryClass();
  28. reload();
  29. }
  30. function queryClass() {
  31. var jsonString = "";
  32. var parameterString = "";
  33. var campusID = $("#CampusDropdown").combogridX("getValue");
  34. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  35. //var educationID = $("#Education").combobox("getValue");
  36. var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  37. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  38. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  39. //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  40. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  41. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  42. //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  43. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  44. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  45. //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  46. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  47. if (parameterString != "") {
  48. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  49. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  50. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  51. } else {
  52. $("#ClassmajorDropdown").combogridX("reload");
  53. $("#StandardDictionaryDropDown").combogridX("reload");
  54. }
  55. reload();
  56. }
  57. function reload() {
  58. $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
  59. }
  60. //获取选中的数据
  61. function validChoose() {
  62. var d = [];
  63. $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
  64. d.push(this.EntityID);
  65. });
  66. return d;
  67. }
  68. //点击列表更新
  69. function edit(rowindex, rowdata) {
  70. showDialog(rowdata.EntityID,"look");
  71. }
  72. //修改按钮
  73. function DifferentDynamicApproval_Approve() {
  74. var d = validChoose();
  75. if (d.length == 0) {
  76. $.messager.alert("系统提示", "请选择您要审核的异动申请信息!");
  77. return;
  78. }
  79. if (d.length > 1) {
  80. $.messager.alert("系统信息", "只能选择单个记录进行审核。");
  81. return;
  82. }
  83. showDialog(d,"update");
  84. }
  85. function showDialog(id,type) {
  86. var redirectTo = url;
  87. if (id) {
  88. redirectTo = redirectTo + '&id=' + id;
  89. }
  90. if (type == "look") {
  91. redirectTo = redirectTo + '&MNU=' + mnu + '&isView=1';
  92. }
  93. else {
  94. redirectTo = redirectTo + '&MNU=' + mnu
  95. }
  96. $.popupTopWindow('异动申请信息', redirectTo, 800, 590, null, null);
  97. }
  98. function DifferentDynamicApproval_Export() {
  99. $("#formQuery").submit();
  100. }
  101. function QueryCampusDropdownList(data) {
  102. $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
  103. reload();
  104. }
  105. function QueryCollegeDropdownList(data) {
  106. reload();
  107. }