TeachingMateriaInventory.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/TeachingMateriaInventory/List";
  2. var EditUrl = CMS_SystemConfig.VirtualDirectoryPath + "/TeachingMateriaInventory/Edit";
  3. var mnu = "";
  4. //加载
  5. $(function () {
  6. mnu = $.SystemGeneral.getUrlParam("MNU");
  7. })
  8. function reload() {
  9. $("#dgTeachingMateriaInventoryList").cmsXDataTable("load", $.getDataGridParams("dgTeachingMateriaInventoryList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgTeachingMateriaInventoryList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.TeachingMaterialPoolID);
  16. });
  17. return d;
  18. }
  19. //Excel导出
  20. function TeachingMateriaInventory_Export() {
  21. $("#formQuery").submit();
  22. }
  23. //修改按钮
  24. function TeachingMateriaInventory_Update() {
  25. var d = validChoose();
  26. if (d.length == 0) {
  27. $.messager.alert("系统提示", "请选择您要修改的教材信息。");
  28. return;
  29. }
  30. if (d.length > 1) {
  31. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  32. return;
  33. }
  34. var redirectTo = EditUrl + '?teachingMaterialPoolID=' + d + '&MNU=' + mnu;
  35. $.popupTopWindow('教材基本信息', redirectTo, 800, 600, null, null);
  36. }
  37. //选中学年事件
  38. function QueryLibraryDropdownList(data) {
  39. reload();
  40. }
  41. function QueryPublishDropdownList(data) {
  42. reload();
  43. }
  44. function QueryCourseDropdownList(data) {
  45. reload();
  46. }
  47. function QueryLateDropdownList(data) {
  48. reload();
  49. }
  50. function QueryTeachingMaterialDropdownList(data) {
  51. reload();
  52. }
  53. function QueryTeachingMaterialTypeDropdownList()
  54. {
  55. reload();
  56. }