var url = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreFormula/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //新增 function ScoreFormula_Add() { var redirectTo = url + "?MNU=" + mnu; $.popupTopWindow('公式设置新增', redirectTo, 800, 300, null, null); } function reload() { $("#dgScoreFormulaList").cmsXDataTable("load", $.getDataGridParams("dgScoreFormulaList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgScoreFormulaList").cmsXDataTable("getSelections"), function (index) { d.push(this.ScoreFormulaID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { var redirectTo = url + "?scoreFormulaID=" + rowdata.ScoreFormulaID + "&MNU=" + mnu + "&isView=1"; $.popupTopWindow('公式设置信息详情', redirectTo, 800, 300, null, null); } //修改按钮 function ScoreFormula_Update() { var d = validChoose(); if (d == "") { $.messager.alert("系统提示", "请选择您要修改的公式设置信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?scoreFormulaID=" + d + "&MNU=" + mnu; $.popupTopWindow('公式设置信息修改', redirectTo, 800, 300, null, null); } //删除 function ScoreFormula_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的公式设置信息!!"); return; } $.messager.confirm("系统提示", "您确定要删除该公式设置信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ScoreFormula/Delete', { scoreFormulaIDs: d }, function (data) { if (data == "删除成功") { $.messager.alert("系统提示", "删除成功!"); $("#dgScoreFormulaList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); }