123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/PrintControl/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgPrintControlList").cmsXDataTable("load", $.getDataGridParams("dgPrintControlList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgPrintControlList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.PrintControlID);
- });
- return d;
- }
- function PrintControl_Add() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/PrintControl/Edit?MNU=" + mnu;
- $.popupTopWindow('打印控制设置', redirectTo, 500, 250, null, null);
- }
- function PrintControl_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要进行设置的控制信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行设置。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/PrintControl/Edit?printControlID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('打印控制设置', redirectTo, 500, 250, null, null);
- }
- function PrintControl_Delete() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要删除的控制信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选中的控制信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/PrintControl/Delete', { printControlIDs: d.join(',') }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功。");
- reload();
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
|