WorktimeAddition.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function WorktimeAddition_Add() {
  7. $.popupTopWindow('课时补登', CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAddition/Edit?MNU=' + mnu, 600, 450);
  8. }
  9. function WorktimeAddition_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 + '/WorktimeAddition/Edit?MNU=' + mnu + "&WorktimeAdditionID=" + d[0], 600, 450);
  20. }
  21. //删除
  22. function WorktimeAddition_Delete() {
  23. var d = validChoose();
  24. if (d.length == 0) {
  25. $.messager.alert("系统提示", "请选择您要删除的课时补登记录。");
  26. return;
  27. }
  28. $.messager.confirm("系统提示", "您确定要删除该课时补登记录?", function (r) {
  29. if (r) {
  30. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAddition/Delete', { worktimeAdditionIDs: d.join(',') }, function (data) {
  31. if (data.IsSuccess) {
  32. $.messager.alert("系统提示", "删除成功!");
  33. $("#dgWorktimeAdditionList").cmsXDataTable('load');
  34. } else {
  35. $.messager.alert("系统提示", data.Message);
  36. }
  37. });
  38. }
  39. });
  40. }
  41. function WorktimeAddition_Excel() {
  42. $(document.forms[0]).submit();
  43. }
  44. function reload() {
  45. $("#dgWorktimeAdditionList").cmsXDataTable("load", $.getDataGridParams("dgWorktimeAdditionList"));
  46. }
  47. //获取选中的数据
  48. function validChoose() {
  49. var d = [];
  50. $.each($("#dgWorktimeAdditionList").cmsXDataTable("getSelections"), function (index) {
  51. d.push(this.WorktimeAdditionID);
  52. });
  53. return d;
  54. }
  55. function queryUser() {
  56. try {
  57. var collegeID = $("#cgbCollege").combogridX("getValue");
  58. var jsonString = "({'QueryParamsDatas':'";
  59. if (collegeID != nonSelect) {
  60. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  61. }
  62. jsonString += "'})";
  63. $("#cgbUser").combogridX("reload", eval(jsonString));
  64. reload();
  65. } catch (e) {
  66. }
  67. }
  68. function queryStandard() {
  69. try {
  70. var jsonString = "({'QueryParamsDatas':'";
  71. var collegeID = $("#cgbStudentCollege").combogridX("getValue");
  72. var yearID = $("#ddlYear").combobox("getValue");
  73. if (collegeID != nonSelect) {
  74. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  75. }
  76. if (yearID != nonSelect) {
  77. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  78. }
  79. jsonString += "'})";
  80. $("#cgbStandard").combogridX("reload", eval(jsonString));
  81. reload();
  82. } catch (e) {
  83. }
  84. }