123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/SupDocument/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgSupDocumentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.DocumentID);
- });
- return d;
- }
- function SOCDoc_View(rowIndex, rowData) {
- $.popupTopWindowOutsite('参考文献', CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/View?MNU=' + mnu + "&documentID=" + rowData.DocumentID, 1024, 768);
- }
- function reload() {
- $("#dgSupDocumentList").cmsXDataTable("load", $.getDataGridParams("dgSupDocumentList"));
- }
- function SupDocument_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('督导文档新增', redirectTo, 600, 400, null, null);
- }
- function SupDocument_Edit() {
- var d = validChoose();
- var id = validChoose().join(',');
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- else if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?documentID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('督导文档修改', redirectTo, 600, 400, null, null);
- }
- function SupDocument_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SupDocument/Delete', { documentIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgSupDocumentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- function Download(rowIndex, rowData) {
- window.open(rowData.Url);
- }
|