var url = CMS_SystemConfig.VirtualDirectoryPath + "/CompletionList/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgCompletionList").cmsXDataTable("load", $.getDataGridParams("dgCompletionList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgCompletionList").cmsXDataTable("getSelections"), function (index) { d.push(this.GraduationApplyID); }); return d; } //修改 function CompletionList_Edit() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统信息", "请选择您要修改的信息。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?graduationApplyID=" + d + "&MNU=" + mnu; $.popupTopWindow('结业名单修改', redirectTo, 680, 320, null, null); } //删除 function CompletionList_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/CompletionList/Delete', { graduationApplyIDs: d }, function (data) { if (data == "删除成功。") { $.messager.alert("系统提示", data); $("#dgCompletionList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } //获取列表字段查询对应比较符 function GetDynamicCondition() { var attribute = eval('(' + $("[name='Attribute']").val() + ')').Value; var conditionString = $("[name='Condition']").val(); var value = $("[name='Condition']").parent().parent().next().find("[name^=" + attribute + "]").val(); value = $.trim(value); var sql = ""; if (conditionString == "=" || conditionString == ">" || conditionString == "<" || conditionString == "<>") { sql = attribute + conditionString + value; } else if (conditionString == "左") { sql = attribute + " like '" + value + "%'"; } else if (conditionString == "右") { sql = attribute + " like '%" + value + "'"; } else if (conditionString == "中") { sql = attribute + " like '%" + value + "%'"; } return sql; } //结业证书打印(结业) function CompletionList_Certificate() { var d = []; $.each($("#dgCompletionList").cmsXDataTable("getSelections"), function (index) { d.push(this.UserID); }); var SchoolyearID = $("#GradSchoolyearDropdown").combobox("getValue"); var CollegeID = $("#CollegeDropdown").combogridX("getValue"); var Year = $("#DictionarySchoolyear").combobox("getValue"); var StandardID = $("#DictionaryStandard").combogridX("getValue"); var EducationID = $("#DictionaryEducation").combogridX("getValue"); var LearningformID = $("#DictionaryLearningform").combogridX("getValue"); var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue"); var IsDreamProject = "-1"; var GraduationTypeID = $("#DictionaryGraduationType").combobox("getValue"); var sql = GetDynamicCondition(); var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/CompletionList/Certificate?MNU=' + mnu; var id = d.join(","); var windowDiv = $.popupTopWindow('结业证书打印', redirectTo, 1000, 750, null, { schoolyearID: SchoolyearID, collegeID: CollegeID, standardID: StandardID, year: (Year == nonSelect) ? null : Year, educationID: EducationID, learningformID: LearningformID, isDreamProject: (IsDreamProject == nonSelect) ? null : IsDreamProject, learnSystem: LearnSystem, conditionString: sql, graduationTypeID: (GraduationTypeID == nonSelect) ? null : GraduationTypeID, ids: id }); } //学生最终成绩明细 function editFinallyScore(rowindex, rowdata) { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduationApply/FinallyScoreList?graduationApplyID=" + rowdata.GraduationApplyID + "&MNU=" + mnu; $.popupTopWindow('学生最终成绩明细', redirectTo, 1200, 540, null, null); } //设置列颜色为红色 function SetRedColumn(index, row, value) { return " " + value + ""; } //Excel导出 function CompletionList_Export() { $("#formQuery").submit(); } //结业证书编号Excel导入 function CompletionNo_Import() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/CompletionList/CompletionNoImport?MNU=' + mnu; $.popupTopWindow('结业证书编号导入', redirectTo, 420, 300, reload); } //联动查询 function queryCampus(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); if (campusID != nonSelect) { 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 querySchoolyear(data) { queryClass(); } function queryStandard(data) { queryClass(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var schoolYearID = $("#DictionarySchoolyear").combobox("getValue"); var standardID = $("#DictionaryStandard").combogridX("getValue"); var educationID = $("#DictionaryEducation").combogridX("getValue"); var learningFormID = $("#DictionaryLearningform").combogridX("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#DictionaryStandard").combogridX("reload", eval(jsonString)); } else { $("#DictionaryStandard").combogridX("reload"); } reload(); }