ChangeTotal.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChangeTotal/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgChangeTotalList").cmsXDataTable("load", $.getDataGridParams("dgChangeTotalList"));
  10. }
  11. //获取选中的数据All
  12. function validChooseAll() {
  13. var d = [];
  14. $.each($("#dgChangeTotalList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this);
  16. });
  17. return d;
  18. }
  19. //获取选中的数据
  20. function validChoose() {
  21. var d = [];
  22. $.each($("#dgChangeTotalList").cmsXDataTable("getSelections"), function (index) {
  23. d.push(this.CollegeID);
  24. });
  25. return d;
  26. }
  27. //设置列颜色为红色
  28. function SetRedColumn(index, row, value) {
  29. if (value > 0) {
  30. return " <span style=\"color: red;\">" + value + "</span>";
  31. } else {
  32. return " <span>" + value + "</span>";
  33. }
  34. }
  35. //Excel导出
  36. function ChangeTotal_Export() {
  37. $("#formQuery").submit();
  38. }
  39. //联动查询
  40. function queryCampus(data) {
  41. var campusID = $("#CampusDropdown").combogridX("getValue");
  42. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  43. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  44. reload();
  45. }
  46. function queryCollege(data) {
  47. var campusID = $("#CampusDropdown").combogridX("getValue");
  48. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  49. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  50. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  51. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  52. reload();
  53. }