123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Student/Edit";
- var mnu = "";
- //url个性化配置
- var customerUrl = $(CMS_SystemConfig.GetConfig()).find("configuration>customUrls>add[key='StudentEdit']");
- if (customerUrl.attr("value")) {
- url = CMS_SystemConfig.VirtualDirectoryPath + customerUrl.attr("value");
- }
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- }
- //获取选中的数据UserID
- function validChoose() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- //获取选中的数据LoginID
- function validChooseLoginID() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.StudentNo);
- });
- return d;
- }
- //新增
- function Student_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('学生信息复制新增', url + '?newUserID=' + d[0] + '&MNU=' + mnu + '&type=copyAdd', 680, 550, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu + "&type=add";
- $.popupTopWindow('学生信息新增', redirectTo, 680, 550, null, null);
- }
- }
- //修改按钮
- function Student_Edit() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?newUserID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow('学生信息修改', redirectTo, 680, 550, null, null);
- }
- //明细查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?newUserID=" + rowdata.UserID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('学生信息明细', redirectTo, 680, 550, null, null);
- }
- //班级信息查看
- function editClassmajor(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/Edit" + "?classmajorID=" + rowdata.ClassmajorID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('班级信息', redirectTo, 720, 480, null, null);
- }
- //照片信息查看
- function editPhoto(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Student/PhotoDetail" + "?userID=" + rowdata.UserID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('照片信息', redirectTo, 700, 580, null, null);
- }
- //学籍异动信息查看
- function editChange(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Student/ChangeDetail" + "?userID=" + rowdata.UserID + "&MNU=" + mnu;
- $.popupTopWindow('学籍异动信息', redirectTo, 1200, 540, null, null);
- }
- //学籍注册信息查看
- function editReport(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Student/ReportDetail" + "?userID=" + rowdata.UserID + "&MNU=" + mnu;
- $.popupTopWindow('学籍注册信息', redirectTo, 1024, 540, null, null);
- }
- //删除
- function Student_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Student/Delete', { userIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgStudentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //照片比对
- function Student_PictureComparison() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Student/PicComparison?MNU=" + mnu;
- $.popupTopWindow('照片比对信息', redirectTo, 1250, 600, null, null);
- }
- //删除照片
- function Student_PicDelete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除照片的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息对应的照片?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Student/PicDelete', { userIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgStudentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //模拟登录
- function Student_SimulateLogin() {
- var d = validChooseLoginID();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要模拟登录的学生。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择一个学生进行模拟登录。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要进行模拟登录?", function (r) {
- if (r) {
- var loginID = d.toString();
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SimulateLogin/Login', { LoginID: loginID }, function (data) {
- parent.location.reload();
- });
- }
- });
- }
- //上报导出
- function Student_ReportExport() {
- var userIDs = validChoose().join(',');
- var dgStudentList = $.getDataGridParams("dgStudentList");
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Student/ReportExport?userIDs=" + userIDs + "&MNU=" + mnu;
- $.popupTopWindow('上报导出', redirectTo, 880, 580, null, dgStudentList);
- }
- //操行录入
- function Student_ConductInput() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要进行录入的信息。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Student/ConductInput" + "?MNU=" + mnu;
- $.popupTopWindow('操行录入', redirectTo, 480, 320, null, d);
- }
- //毕业证书编号Excel导入
- function Student_GraduateNoImport() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Student/GraduateNoImport?MNU=' + mnu;
- $.popupTopWindow('证书编号导入', redirectTo, 420, 300, reload);
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function Student_Export() {
- var userIDs = validChoose().join(',');
- if (userIDs == "") {
- document.getElementById("UserIDs").value = "";
- }
- else {
- document.getElementById("UserIDs").value = userIDs;
- }
- $("#formQuery").attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/Student/Excel");
- $("#formQuery").submit();
- }
- //导入学籍照片
- function Student_PicImport() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Student/PicImport?MNU=' + mnu;
- $.popupTopWindow('导入学籍照片', redirectTo, 420, 300, reload);
- }
- //导入学历照片
- function Student_GraPicImport() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Student/GraPicImport?MNU=' + mnu;
- $.popupTopWindow('导入学历照片', redirectTo, 420, 300, reload);
- }
- //导出照片
- function Student_PictureExport() {
- var userIDs = validChoose().join(',');
- var dgStudentList = $.getDataGridParams("dgStudentList");
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Student/PictureExport?userIDs=" + userIDs + "&MNU=" + mnu;
- $.popupTopWindow('导出照片', redirectTo, 400, 280, null, dgStudentList);
- }
- //Excel导入
- function Student_Import() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Student/Import?MNU=' + mnu;
- $.popupTopWindow('学生信息导入', redirectTo, 420, 300, reload);
- }
- //获取列表字段查询对应比较符
- function GetDynamicConditionString() {
- var conditionString = "";
- var attribute = eval('(' + $("[name='Attribute']").val() + ')').Value;
- var condition = $("[name='Condition']").val();
- var value = $.trim($("[name='Condition']").parent().parent().next().find("[name^=" + attribute + "]").val());
- if (document.getElementsByName(attribute + "_QueryDictionaryDropDownList")[0] != null) {
- if (value == "-1") {
- conditionString = "";
- } else {
- conditionString = "WHERE " + attribute + "=" + value;
- }
- } else {
- if (value != "") {
- if (condition == "左") {
- conditionString = "WHERE " + attribute + " LIKE '" + value + "%'";
- } else if (condition == "右") {
- conditionString = "WHERE " + attribute + " LIKE '%" + value + "'";
- } else if (condition == "中") {
- conditionString = "WHERE " + attribute + " LIKE '%" + value + "%'";
- } else {
- conditionString = "WHERE " + attribute + condition + "'" + value + "'";
- }
- } else {
- conditionString = "";
- }
- }
- return conditionString;
- }
- //学生证明报表
- function Student_ProveReport() {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var gradeID = $("#DictionaryGrade").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningformID = $("#DictionaryLearningform").combogridX("getValue");
- var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- var classmajorID = $("#ClassmajorComboGrid").combogridX("getValue");
- var isPhoto = $("#IsPhotoDropdown").combogridX("getValue");
- var reportStatus = $("#DictionaryReportStatus").combogridX("getValue");
- var planningGraduateDate = $("#PlanningGraduateDateDropDown").combogridX("getValue");
- var inSchoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
- var userIDs = validChoose().join(',');
- var conditionString = GetDynamicConditionString();
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Student/ProveReport?MNU=' + mnu;
- var learningProveReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='LearningProveReport']").attr("customName");
- var riseOnlyThisProveReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='RiseOnlyThisProveReport']").attr("customName");
- var graduateProveReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='GraduateProveReport']").attr("customName");
- $.popupTopWindow('证明报表', redirectTo, 680, 550, null, {
- CampusID: campusID,
- CollegeID: collegeID,
- GradeID: gradeID,
- StandardID: standardID,
- EducationID: educationID,
- LearningformID: learningformID,
- LearnSystem: learnSystem,
- ClassmajorID: classmajorID,
- IsPhoto: isPhoto,
- ReportStatus: reportStatus,
- PlanningGraduateDate: planningGraduateDate,
- InSchoolStatus: inSchoolStatus,
- UserIDs: userIDs,
- ConditionString: conditionString,
- LearningProveReportName: learningProveReportName,
- RiseOnlyThisProveReportName: riseOnlyThisProveReportName,
- GraduateProveReportName: graduateProveReportName
- });
- }
- //学生学籍卡报表
- function Student_CradReport() {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var gradeID = $("#DictionaryGrade").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningformID = $("#DictionaryLearningform").combogridX("getValue");
- var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- var classmajorID = $("#ClassmajorComboGrid").combogridX("getValue");
- var isPhoto = $("#IsPhotoDropdown").combogridX("getValue");
- var reportStatus = $("#DictionaryReportStatus").combogridX("getValue");
- var planningGraduateDate = $("#PlanningGraduateDateDropDown").combogridX("getValue");
- var inSchoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
- var userIDs = validChoose().join(',');
- var conditionString = GetDynamicConditionString();
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Student/CradReport?MNU=' + mnu;
- var studentCradReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='StudentCradReport']").attr("customName");
- if (studentCradReportName == "HBGDStudentCard") {
- $.popupTopWindow('学籍报表', redirectTo, 680, 550, null, {
- CampusID: campusID,
- CollegeID: collegeID,
- GradeID: gradeID,
- StandardID: standardID,
- EducationID: educationID,
- LearningformID: learningformID,
- LearnSystem: learnSystem,
- ClassmajorID: classmajorID,
- IsPhoto: isPhoto,
- ReportStatus: reportStatus,
- PlanningGraduateDate: planningGraduateDate,
- InSchoolStatus: inSchoolStatus,
- UserIDs: userIDs,
- ConditionString: conditionString,
- StudentCradReportName: studentCradReportName
- });
- } else {
- $.popupTopWindow('学籍报表', redirectTo, 1124, 550, null, {
- CampusID: campusID,
- CollegeID: collegeID,
- GradeID: gradeID,
- StandardID: standardID,
- EducationID: educationID,
- LearningformID: learningformID,
- LearnSystem: learnSystem,
- ClassmajorID: classmajorID,
- IsPhoto: isPhoto,
- ReportStatus: reportStatus,
- PlanningGraduateDate: planningGraduateDate,
- InSchoolStatus: inSchoolStatus,
- UserIDs: userIDs,
- ConditionString: conditionString,
- StudentCradReportName: studentCradReportName
- });
- }
- }
- //鉴定报表
- function Student_AppraiseReport() {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var gradeID = $("#DictionaryGrade").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningformID = $("#DictionaryLearningform").combogridX("getValue");
- var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- var classmajorID = $("#ClassmajorComboGrid").combogridX("getValue");
- var isPhoto = $("#IsPhotoDropdown").combogridX("getValue");
- var reportStatus = $("#DictionaryReportStatus").combogridX("getValue");
- var planningGraduateDate = $("#PlanningGraduateDateDropDown").combogridX("getValue");
- var inSchoolStatus = $("#DictionaryInschoolStatus").combobox("getValue");
- var userIDs = validChoose().join(',');
- var conditionString = GetDynamicConditionString();
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Student/AppraiseReport?MNU=' + mnu;
- var studentGraAppraiseReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='StudentGraAppraiseReport']").attr("customName");
- var studentPPraAppraiseReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='StudentPPraAppraiseReport']").attr("customName");
- if (studentGraAppraiseReportName == "DefaultGraduateAppraise") {
- $.popupTopWindow('鉴定报表', redirectTo, 680, 550, null, {
- CampusID: campusID,
- CollegeID: collegeID,
- GradeID: gradeID,
- StandardID: standardID,
- EducationID: educationID,
- LearningformID: learningformID,
- LearnSystem: learnSystem,
- ClassmajorID: classmajorID,
- IsPhoto: isPhoto,
- ReportStatus: reportStatus,
- PlanningGraduateDate: planningGraduateDate,
- InSchoolStatus: inSchoolStatus,
- UserIDs: userIDs,
- ConditionString: conditionString,
- StudentGraAppraiseReportName: studentGraAppraiseReportName,
- StudentPPraAppraiseReportName: studentPPraAppraiseReportName
- });
- } else {
- $.popupTopWindow('鉴定报表', redirectTo, 680, 550, null, {
- CampusID: campusID,
- CollegeID: collegeID,
- GradeID: gradeID,
- StandardID: standardID,
- EducationID: educationID,
- LearningformID: learningformID,
- LearnSystem: learnSystem,
- ClassmajorID: classmajorID,
- IsPhoto: isPhoto,
- ReportStatus: reportStatus,
- PlanningGraduateDate: planningGraduateDate,
- InSchoolStatus: inSchoolStatus,
- UserIDs: userIDs,
- ConditionString: conditionString,
- StudentGraAppraiseReportName: studentGraAppraiseReportName,
- StudentPPraAppraiseReportName: studentPPraAppraiseReportName
- });
- }
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- queryClass();
- }
- 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));
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- queryClass();
- }
- function queryGrade(data) {
- queryClass();
- }
- function queryStandard(data) {
- queryClass();
- }
- function queryLearnSystem(data) {
- queryClass();
- }
- function queryGrademajor(data) {
- queryClass();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var gradeID = $("#DictionaryGrade").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningformID = $("#DictionaryLearningform").combogridX("getValue");
- var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- //var grademajorID = $("#GrademajorComboGrid").combogridX("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|";
- if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@|";
- //if (grademajorID != nonSelect) parameterString += "GrademajorComboGrid|*|" + grademajorID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- //$("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
- $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
- }
- else {
- $("#DictionaryStandard").combogridX("reload");
- //$("#GrademajorComboGrid").combogridX("reload");
- $("#ClassmajorComboGrid").combogridX("reload");
- }
- reload();
- }
- function StudentCardReport() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要打印学籍卡的学生信息。");
- return;
- }
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Students/StudentCardReport', { userIDList: d }, function (data) {
- if (data.IsSuccess) {
- var redirectTo = "../../Scripts/pdf.js/web/viewer.html?file=" + data.Message;
- $.popupTopWindow('学籍卡', redirectTo, 850, 480, reload);
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
|