var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function PracticeRate_Add() { $.popupTopWindow('实践系数', CMS_SystemConfig.VirtualDirectoryPath + '/PracticeRate/Edit?MNU=' + mnu, 600, 210); } function PracticeRate_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统信息", "请选择您要修改的实践系数。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } $.popupTopWindow('考试时间', CMS_SystemConfig.VirtualDirectoryPath + '/PracticeRate/Edit?MNU=' + mnu + "&PracticeRateID=" + d[0], 600, 210); } //删除 function PracticeRate_Delete() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要删除的实践系数。"); return; } $.messager.confirm("系统提示", "您确定要删除该实践系数?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/PracticeRate/Delete', { practiceRateIDs: d.join(',') }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", "删除成功!"); $("#dgPracticeRateList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } function reload() { $("#dgPracticeRateList").cmsXDataTable("load", $.getDataGridParams("dgPracticeRateList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgPracticeRateList").cmsXDataTable("getSelections"), function (index) { d.push(this.PracticeRateID); }); return d; }