var url = CMS_SystemConfig.VirtualDirectoryPath + "/NewStudentCollege/Edit"; var mnu = ""; //url个性化配置 var customerUrl = $(CMS_SystemConfig.GetConfig()).find("configuration>customUrls>add[key='NewStudentCollegeEdit']"); if (customerUrl.attr("value")) { url = CMS_SystemConfig.VirtualDirectoryPath + customerUrl.attr("value"); } //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgNewStudentCollegeList").cmsXDataTable("load", $.getDataGridParams("dgNewStudentCollegeList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgNewStudentCollegeList").cmsXDataTable("getSelections"), function (index) { d.push(this.NewStudentID); }); return d; } //查看 function detail(rowindex, rowdata) { var redirectTo = url + "?newStudentID=" + rowdata.NewStudentID + "&MNU=" + mnu + "&type=detail"; $.popupTopWindow('新生分配信息', redirectTo, 650, 540, null, null); } //导入分配 function NewStudentCollege_AssignCollegeImport() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/NewStudentCollege/AssignCollegeImport?MNU=' + mnu; $.popupTopWindow('导入分配', redirectTo, 420, 300, reload); } //名单分配 function NewStudentCollege_AssignCollege() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/NewStudentCollege/AssignCollegeBatchAdd" + "?MNU=" + mnu;; $.popupTopWindow('名单分配', redirectTo, 900, 550, reload); } //删除照片 function NewStudentCollege_PicDelete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除照片的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息对应的照片?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudentCollege/PicDelete', { newStudentIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#dgNewStudentCollegeList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //取消分配 function NewStudentCollege_CancleAssign() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要取消分配的信息。"); return; } $.messager.confirm("系统提示", "您确定要对选择的信息取消分配?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudentCollege/CancleAssign', { newStudentIDs: d }, function (data) { if (data.IsSuccess = true) { $.messager.alert("系统提示", data.Message); $("#dgNewStudentCollegeList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //提交分配 function NewStudentCollege_SubmitAssign() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要提交的信息。"); return; } $.messager.confirm("系统提示", "您确定要对选择的信息进行提交?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudentCollege/SubmitAssign', { newStudentIDs: d }, function (data) { if (data.IsSuccess = true) { $.messager.alert("系统提示", data.Message); $("#dgNewStudentCollegeList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //设置列颜色为红色 function SetRedColumn(index, row, value) { return " " + value + ""; } //Excel导出 function NewStudentCollege_Export() { $("#formQuery").submit(); } //Excel导入新生(匹配相应的配置表,个性化配置) function NewStudentCollege_Import() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/NewStudentCollege/Import?MNU=' + mnu; $.popupTopWindow('招生信息导入', redirectTo, 420, 300, reload); } //导入照片(个性化配置,默认照片以“F”或“Z”+考生号命名) function NewStudentCollege_PicImport() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/NewStudentCollege/PicImport?MNU=' + mnu; $.popupTopWindow('导入照片', redirectTo, 420, 300, reload); } //联动查询 function queryCampus(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); reload(); } function queryCollege(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); reload(); } function queryGrade(data) { reload(); } function queryStandard(data) { reload(); }