var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function StaffStandard_Add() { $.popupTopWindow('教师标准课酬', CMS_SystemConfig.VirtualDirectoryPath + '/StaffStandard/Edit?MNU=' + mnu, 600, 210); } function StaffStandard_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统信息", "请选择您要修改的标准课酬。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } $.popupTopWindow('标准课酬', CMS_SystemConfig.VirtualDirectoryPath + '/StaffStandard/Edit?MNU=' + mnu + "&StaffStandardID=" + d[0], 600, 210); } //删除 function StaffStandard_Delete() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要删除的标准课酬。"); return; } $.messager.confirm("系统提示", "您确定要删除该标准课酬?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StaffStandard/Delete', { staffStandardIDs: d.join(',') }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", "删除成功!"); $("#dgStaffStandardList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } function reload() { $("#dgStaffStandardList").cmsXDataTable("load", $.getDataGridParams("dgStaffStandardList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgStaffStandardList").cmsXDataTable("getSelections"), function (index) { d.push(this.StaffStandardID); }); return d; } function queryDepartment() { var collegeID = $("#cgbCollege").combogridX("getValue"); if (collegeID != nonSelect) { var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})"; $("#cgbDepartment").combogridX("reload", eval(jsonString)); } reload(); } function queryUser() { var departmentID = $("#cgbDepartment").combobox("getValue"); if (departmentID != nonSelect) { var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})"; $("#cgbUser").combogridX("reload", eval(jsonString)); } reload(); }