var url = CMS_SystemConfig.VirtualDirectoryPath + "/College/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgCollegeList").cmsXDataTable("load", $.getDataGridParams("dgCollegeList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgCollegeList").cmsXDataTable("getSelections"), function (index) { d.push(this.CollegeID); }); return d; } //新增 function College_Add() { var d = validChoose(); if (d.length > 0) { $.popupTopWindow(EMIS_CollegeLabel + '复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/College/CopyAdd?collegeID=' + d[0] + '&MNU=' + mnu, 600, 350, null, null); } else { var redirectTo = url + "?MNU=" + mnu; $.popupTopWindow(EMIS_CollegeLabel + '新增', redirectTo, 600, 350, null, null); } } //修改按钮 function College_Update() { var d = validChoose(); if (d == "") { $.messager.alert("系统信息", "请选择您要修改的信息。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?collegeID=" + d + "&MNU=" + mnu + "&type=edit"; $.popupTopWindow(EMIS_CollegeLabel + '修改', redirectTo, 600, 350, null, null); } //查看 function edit(rowindex, rowdata) { var redirectTo = url + "?CollegeID=" + rowdata.CollegeID + "&MNU=" + mnu + "&type=detail"; $.popupTopWindow(EMIS_CollegeLabel + '信息', redirectTo, 600, 350, null, null); } //删除 function College_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统信息", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/College/Delete', { collegeIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#dgCollegeList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //院系所对应的教研室明细 function editDepartmentCount(rowindex, rowdata) { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/College/DepartmentList?collegeID=" + rowdata.CollegeID + "&MNU=" + mnu; $.popupTopWindow('教研室明细', redirectTo, 850, 500, null, null); } //院系所对应的教师明细 function editStaffCount(rowindex, rowdata) { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/College/StaffList?collegeID=" + rowdata.CollegeID + "&MNU=" + mnu; $.popupTopWindow('教师信息明细', redirectTo, 1024, 540, null, null); } //院系所对应的院系专业明细 function editFacultymajorCount(rowindex, rowdata) { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/College/FacultymajorList?collegeID=" + rowdata.CollegeID + "&MNU=" + mnu; $.popupTopWindow('院系专业明细', redirectTo, 1024, 550, null, null); } //导出Excel function College_Export() { $("#formQuery").submit(); } //Excel导入 function College_Import() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/College/Import?MNU=' + mnu; $.popupTopWindow(EMIS_CollegeLabel + '信息导入', redirectTo, 420, 300, reload); } //联动 function queryCampus() { reload(); }