SupDocumentList.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/SupDocument/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //获取选中的数据
  8. function validChoose() {
  9. var d = [];
  10. $.each($("#dgSupDocumentList").cmsXDataTable("getSelections"), function (index) {
  11. d.push(this.DocumentID);
  12. });
  13. return d;
  14. }
  15. function SOCDoc_View(rowIndex, rowData) {
  16. $.popupTopWindowOutsite('参考文献', CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/View?MNU=' + mnu + "&documentID=" + rowData.DocumentID, 1024, 768);
  17. }
  18. function reload() {
  19. $("#dgSupDocumentList").cmsXDataTable("load", $.getDataGridParams("dgSupDocumentList"));
  20. }
  21. function SupDocument_Add() {
  22. var redirectTo = url + "?MNU=" + mnu;
  23. $.popupTopWindow('督导文档新增', redirectTo, 600, 400, null, null);
  24. }
  25. function SupDocument_Edit() {
  26. var d = validChoose();
  27. var id = validChoose().join(',');
  28. if (d.length == 0) {
  29. $.messager.alert("系统提示", "请选择您要修改的信息。");
  30. return;
  31. }
  32. else if (d.length > 1) {
  33. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  34. return;
  35. }
  36. var redirectTo = url + "?documentID=" + d + "&MNU=" + mnu;
  37. $.popupTopWindow('督导文档修改', redirectTo, 600, 400, null, null);
  38. }
  39. function SupDocument_Delete() {
  40. var d = validChoose().join(',');
  41. if (d == "") {
  42. $.messager.alert("系统提示", "请选择您要删除的信息。");
  43. return;
  44. }
  45. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  46. if (r) {
  47. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SupDocument/Delete', { documentIDs: d }, function (data) {
  48. if (data.IsSuccess) {
  49. $.messager.alert("系统提示", "删除成功!");
  50. $("#dgSupDocumentList").cmsXDataTable('load');
  51. } else {
  52. $.messager.alert("系统提示", data.Message);
  53. }
  54. });
  55. }
  56. });
  57. }
  58. function Download(rowIndex, rowData) {
  59. window.open(rowData.Url);
  60. }