SOCDocAdminList.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgSOCDocumentList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this.DocumentID);
  10. });
  11. return d;
  12. }
  13. function SOCDoc_Add() {
  14. $.popupTopWindow('参考文献', CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/Edit?MNU=' + mnu, 1024, 768);
  15. }
  16. function SOCDoc_Edit() {
  17. var d = validChoose();
  18. if (d.length == 0) {
  19. $.messager.alert("系统信息", "请选择您要修改的文献。");
  20. return;
  21. }
  22. if (d.length > 1) {
  23. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  24. return;
  25. }
  26. $.popupTopWindow('参考文献', CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/Edit?MNU=' + mnu + "&documentID=" + d[0], 1024, 768);
  27. }
  28. function SOCDoc_Delete() {
  29. var d = validChoose();
  30. if (d.length == 0) {
  31. $.messager.alert("系统提示", "请选择您要删除的文献。");
  32. return;
  33. }
  34. $.messager.confirm("系统提示", "您确定要删除该文献?", function (r) {
  35. if (r) {
  36. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/Delete', { documentIDs: d.join(',') }, function (data) {
  37. if (data.IsSuccess) {
  38. $.messager.alert("系统提示", "删除成功!");
  39. $("#dgSOCDocumentList").cmsXDataTable('load');
  40. } else {
  41. $.messager.alert("系统提示", data.Message);
  42. }
  43. });
  44. }
  45. });
  46. }
  47. function reload() {
  48. $("#dgSOCDocumentList").cmsXDataTable("load", $.getDataGridParams("dgSOCDocumentList"));
  49. }