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