StudentCountRate.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function StudentCountRate_Add() {
  7. $.popupTopWindow('人数系数', CMS_SystemConfig.VirtualDirectoryPath + '/StudentCountRate/Edit?MNU=' + mnu, 600, 210);
  8. }
  9. function StudentCountRate_Update() {
  10. var d = validChoose();
  11. if (d.length == 0) {
  12. $.messager.alert("系统信息", "请选择您要修改的人数系数。");
  13. return;
  14. }
  15. if (d.length > 1) {
  16. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  17. return;
  18. }
  19. $.popupTopWindow('考试时间', CMS_SystemConfig.VirtualDirectoryPath + '/StudentCountRate/Edit?MNU=' + mnu + "&StudentCountRateID=" + d[0], 600, 210);
  20. }
  21. function StudentCountRate_CommonSave() {
  22. $("#fmCommonStudentCount").submit();
  23. }
  24. //删除
  25. function StudentCountRate_Delete() {
  26. var d = validChoose();
  27. if (d.length == 0) {
  28. $.messager.alert("系统提示", "请选择您要删除的人数系数。");
  29. return;
  30. }
  31. $.messager.confirm("系统提示", "您确定要删除该人数系数?", function (r) {
  32. if (r) {
  33. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentCountRate/Delete', { studentCountRateIDs: d.join(',') }, function (data) {
  34. if (data.IsSuccess) {
  35. $.messager.alert("系统提示", "删除成功!");
  36. $("#dgStudentCountRateList").cmsXDataTable('load');
  37. } else {
  38. $.messager.alert("系统提示", data.Message);
  39. }
  40. });
  41. }
  42. });
  43. }
  44. function reload() {
  45. $("#dgStudentCountRateList").cmsXDataTable("load", $.getDataGridParams("dgStudentCountRateList"));
  46. }
  47. //获取选中的数据
  48. function validChoose() {
  49. var d = [];
  50. $.each($("#dgStudentCountRateList").cmsXDataTable("getSelections"), function (index) {
  51. d.push(this.StudentCountRateID);
  52. });
  53. return d;
  54. }