CustomStandardSetting.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/CustomStandardSetting/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgCustomStandardSettingList").cmsXDataTable("load", $.getDataGridParams("dgCustomStandardSettingList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgCustomStandardSettingList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.CustomStandardSettingID);
  16. });
  17. return d;
  18. }
  19. //新增
  20. function CustomStandardSetting_Add() {
  21. var d = validChoose();
  22. var redirectTo = url + "?MNU=" + mnu;
  23. if (d.length > 0) {
  24. $.popupTopWindow('省招专业复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/CustomStandardSetting/CopyAdd?customStandardSettingID=' + d[0] + '&MNU=' + mnu, 650, 320, null, null);
  25. } else {
  26. $.popupTopWindow('省招专业新增', redirectTo, 650, 320, null, null);
  27. }
  28. }
  29. //修改
  30. function CustomStandardSetting_Edit() {
  31. var d = validChoose();
  32. if (d == "") {
  33. $.messager.alert("系统提示", "请选择您要修改的信息。");
  34. return;
  35. }
  36. if (d.length > 1) {
  37. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  38. return;
  39. }
  40. var redirectTo = url + "?CustomStandardSettingID=" + d + "&MNU=" + mnu + "&type=edit";
  41. $.popupTopWindow('省招专业修改', redirectTo, 650, 320, null, null);
  42. }
  43. //查看
  44. function edit(rowindex, rowdata) {
  45. var redirectTo = url + "?customStandardSettingID=" + rowdata.CustomStandardSettingID + "&MNU=" + mnu + "&type=detail";
  46. $.popupTopWindow('省招专业信息', redirectTo, 650, 320, null, null);
  47. }
  48. //删除
  49. function CustomStandardSetting_Delete() {
  50. var d = validChoose().join(',');
  51. if (d == "") {
  52. $.messager.alert("系统提示", "请选择您要删除的信息。");
  53. return;
  54. }
  55. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  56. if (r) {
  57. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/CustomStandardSetting/Delete', { CustomStandardSettingIDs: d }, function (data) {
  58. if (data.IsSuccess) {
  59. $.messager.alert("系统提示", data.Message);
  60. $("#dgCustomStandardSettingList").cmsXDataTable('load');
  61. } else {
  62. $.messager.alert("系统提示", data.Message);
  63. }
  64. });
  65. }
  66. });
  67. }
  68. //Excel导出
  69. function CustomStandardSetting_Export() {
  70. $("#formQuery").submit();
  71. }
  72. //Excel导入
  73. function CustomStandardSetting_Import() {
  74. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/CustomStandardSetting/Import?MNU=' + mnu;
  75. $.popupTopWindow('省招专业导入', redirectTo, 420, 300, reload);
  76. }
  77. //联动查询
  78. function queryCampus(data) {
  79. var campusID = $("#CampusDropdown").combogridX("getValue");
  80. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  81. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  82. reload();
  83. }
  84. function queryCollege(data) {
  85. var campusID = $("#CampusDropdown").combogridX("getValue");
  86. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  87. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  88. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  89. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  90. reload();
  91. }
  92. function queryYear(data) {
  93. reload();
  94. }
  95. function queryStandard(data) {
  96. reload();
  97. }