var url = CMS_SystemConfig.VirtualDirectoryPath + "/Publisher/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //新增 function Publisd_Add() { var redirectTo = url + '?MNU=' + mnu; $.popupTopWindow('出版单位基本信息新增', redirectTo, 700, 400, null, null); } function reload() { $("#dgPublishList").cmsXDataTable("load", $.getDataGridParams("dgPublishList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgPublishList").cmsXDataTable("getSelections"), function (index) { d.push(this.PublishID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { var redirectTo = url + "?publishID=" + rowdata.PublishID + "&MNU=" + mnu + "&isView=1"; $.popupTopWindow('出版单位基本信息新增', redirectTo, 700, 400, null, null); } //修改按钮 function Publisd_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改的出版单位信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?publishID=" + d + "&MNU=" + mnu; $.popupTopWindow("出版单位基本信息修改", redirectTo, 700, 400, null, null); } //删除 function Publisd_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的出版单位信息!"); return; } $.messager.confirm("系统提示", "您确定要删除该出版单位信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Publisher/Delete', { publishIDs: d }, function (data) { if (data == "删除成功") { $.messager.alert("系统提示", "删除成功!"); $("#dgPublishList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function Publisd_Export() { $("#formQuery").submit(); } //导入 function Publish_Import() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Publisher/Import?MNU=' + mnu; $.popupTopWindow('出版单位信息导入', redirectTo, 400, 300, null, null); } function QueryPublishDropdownList(data) { reload(); } function QueryPrividetmentDropdownList(data) { reload(); } function QueryPrintDropdownList(data) { reload(); }