ChargeStandard.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgChargeStandardList").cmsXDataTable("load", $.getDataGridParams("dgChargeStandardList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgChargeStandardList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.ChargeStandardID);
  16. });
  17. return d;
  18. }
  19. //新增
  20. function ChargeStandard_Add() {
  21. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/AddList" + "?MNU=" + mnu;
  22. $.popupTopWindow('收费标准新增', redirectTo, 850, 550, reload, null);
  23. }
  24. //修改
  25. function ChargeStandard_Update() {
  26. var d = validChoose();
  27. if (d == "") {
  28. $.messager.alert("系统提示", "请选择您要修改的信息。");
  29. return;
  30. }
  31. if (d.length > 1) {
  32. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  33. return;
  34. }
  35. var redirectTo = url + "?chargeStandardID=" + d + "&MNU=" + mnu;
  36. $.popupTopWindow('收费标准修改', redirectTo, 640, 350, null, null);
  37. }
  38. //删除
  39. function ChargeStandard_Delete() {
  40. var d = validChoose().join(',');
  41. if (d == "") {
  42. $.messager.alert("系统提示", "请选择您要删除的信息。");
  43. return;
  44. }
  45. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  46. if (r) {
  47. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChargeStandard/Delete', { chargeStandardIDs: d }, function (data) {
  48. if (data == "删除成功。") {
  49. $.messager.alert("系统提示", data);
  50. $("#dgChargeStandardList").cmsXDataTable('load');
  51. } else {
  52. $.messager.alert("系统提示", data);
  53. }
  54. });
  55. }
  56. });
  57. }
  58. //刷新名单
  59. function ChargeStandard_CreateReceivable() {
  60. var d = validChoose().join(',');
  61. if (d == "") {
  62. $.messager.alert("系统提示", "请选择您要刷新的信息。");
  63. return;
  64. }
  65. //在校状态
  66. var inschoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
  67. $.messager.confirm("系统提示", "您确定要对选择的信息进行刷新名单?", function (r) {
  68. if (r) {
  69. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChargeStandard/CreatChargeList', { chargeStandardIDs: d, inschoolStatus: inschoolStatus }, function (data) {
  70. if (data.IsSuccess == true) {
  71. $.messager.alert("系统提示", data.Message);
  72. $("#dgChargeStandardList").cmsXDataTable('load');
  73. } else {
  74. $.messager.alert("系统提示", data.Message);
  75. }
  76. });
  77. }
  78. });
  79. }
  80. //学生信息明细
  81. function editStudentCount(rowindex, rowdata) {
  82. var inschoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
  83. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/StudentList?inschoolStatus=" + inschoolStatus
  84. + "&grademajorID=" + rowdata.GrademajorID + "&MNU=" + mnu;
  85. $.popupTopWindow('学生信息明细', redirectTo, 750, 420, null, null);
  86. }
  87. //应收名单信息
  88. function editStudentChargeCount(rowindex, rowdata) {
  89. //在校状态暂时不考虑,只传
  90. var inschoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
  91. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/StudentChargeList?grademajorID=" + rowdata.GrademajorID
  92. + "&chargeYearID=" + rowdata.ChargeYear
  93. + "&chargeProjectID=" + rowdata.ChargeProjectID
  94. + "&inschoolStatus=" + inschoolStatus
  95. + "&MNU=" + mnu;
  96. $.popupTopWindow('应收名单信息', redirectTo, 760, 420, null, null);
  97. }
  98. //Excel导出
  99. function ChargeStandard_Excel() {
  100. $("#formQuery").submit();
  101. }
  102. //联动查询
  103. function queryStandard(data) {
  104. queryClass();
  105. reload();
  106. }
  107. function queryCollege(data) {
  108. var campusID = $("#CampusDropdown").combogridX("getValue");
  109. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  110. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  111. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  112. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  113. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  114. queryClass();
  115. reload();
  116. }
  117. function queryClass() {
  118. var jsonString = "";
  119. var parameterString = "";
  120. var campusID = $("#CampusDropdown").combogridX("getValue");
  121. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  122. var educationID = $("#DictionaryEducation").combobox("getValue");
  123. var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  124. var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
  125. var learningFormID = $("#DictionaryLearningform").combobox("getValue");
  126. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  127. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  128. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  129. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  130. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  131. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  132. if (parameterString != "") {
  133. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  134. $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
  135. } else {
  136. $("#StandardDictionaryDropDown").combogridX("reload");
  137. }
  138. reload();
  139. }