var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function WorktimeAddition_Add() { $.popupTopWindow('课时补登', CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAddition/Edit?MNU=' + mnu, 600, 450); } function WorktimeAddition_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统信息", "请选择您要修改的工作量调整记录。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } $.popupTopWindow('课时补登', CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAddition/Edit?MNU=' + mnu + "&WorktimeAdditionID=" + d[0], 600, 450); } //删除 function WorktimeAddition_Delete() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要删除的课时补登记录。"); return; } $.messager.confirm("系统提示", "您确定要删除该课时补登记录?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/WorktimeAddition/Delete', { worktimeAdditionIDs: d.join(',') }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", "删除成功!"); $("#dgWorktimeAdditionList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } function WorktimeAddition_Excel() { $(document.forms[0]).submit(); } function reload() { $("#dgWorktimeAdditionList").cmsXDataTable("load", $.getDataGridParams("dgWorktimeAdditionList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgWorktimeAdditionList").cmsXDataTable("getSelections"), function (index) { d.push(this.WorktimeAdditionID); }); return d; } function queryUser() { try { var collegeID = $("#cgbCollege").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'"; if (collegeID != nonSelect) { jsonString += "CollegeDropdown|*|" + collegeID + "|@|"; } jsonString += "'})"; $("#cgbUser").combogridX("reload", eval(jsonString)); reload(); } catch (e) { } } function queryStandard() { try { var jsonString = "({'QueryParamsDatas':'"; var collegeID = $("#cgbStudentCollege").combogridX("getValue"); var yearID = $("#ddlYear").combobox("getValue"); if (collegeID != nonSelect) { jsonString += "CollegeDropdown|*|" + collegeID + "|@|"; } if (yearID != nonSelect) { jsonString += "DictionaryGrade|*|" + yearID + "|@|"; } jsonString += "'})"; $("#cgbStandard").combogridX("reload", eval(jsonString)); reload(); } catch (e) { } }