12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function validChoose() {
- var d = [];
- $.each($("#dgSOCDocumentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.DocumentID);
- });
- return d;
- }
- function SOCDoc_Add() {
- $.popupTopWindow('参考文献', CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/Edit?MNU=' + mnu, 1024, 768);
- }
- function SOCDoc_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的文献。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- $.popupTopWindow('参考文献', CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/Edit?MNU=' + mnu + "&documentID=" + d[0], 1024, 768);
- }
- function SOCDoc_Delete() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的文献。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该文献?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SOCDoc/Delete', { documentIDs: d.join(',') }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgSOCDocumentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- function reload() {
- $("#dgSOCDocumentList").cmsXDataTable("load", $.getDataGridParams("dgSOCDocumentList"));
- }
|