123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- //刷新
- function reload() {
- $("#dgStudentPicComparisonList").cmsXDataTable("load", $.getDataGridParams("dgStudentPicComparisonList"));
- }
- //获取选中的数据IsPicComparison
- function validChooseIsPicComparison() {
- var d = [];
- $.each($("#dgStudentPicComparisonList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.IsPhotoComparison);
- });
- return d;
- }
- //获取选中的数据UserID
- function validChoose() {
- var d = [];
- $.each($("#dgStudentPicComparisonList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- //确定生成成功后不关闭弹出页面
- function formSuccessReloadNoClose(data) {
- if (data.IsSuccess == true) {
- reload();
- }
- $.messager.alert("系统提示", data.Message);
- }
- //通过
- function Student_PicComparisonPass() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要比对通过的信息。");
- return;
- }
- var r = validChooseIsPicComparison();
- if ($.grep(r, function (v, i) { return v == true; }).length > 0) {
- $.messager.alert("系统提示", "选择比对通过的信息中,存在已比对的信息,无法再次比对通过。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息进行比对通过?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Student/PicComparisonPass', { userIDs: d }, function (data) {
- if (data.IsSuccess = true) {
- $.messager.alert("系统提示", data.Message);
- $("#dgStudentPicComparisonList").cmsXDataTable('load');
- }
- else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //驳回
- function Student_PicComparisonUndo() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要比对驳回的信息。");
- return;
- }
- var r = validChooseIsPicComparison();
- if ($.grep(r, function (v, i) { return v == false; }).length > 0) {
- $.messager.alert("系统提示", "选择比对驳回的信息中,存在未比对的信息,无法再次比对驳回。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息进行比对驳回?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Student/PicComparisonUndo', { userIDs: d }, function (data) {
- if (data.IsSuccess = true) {
- $.messager.alert("系统提示", data.Message);
- $("#dgStudentPicComparisonList").cmsXDataTable('load');
- }
- else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function Student_PicComparisonExport() {
- var userIDs = validChoose().join(',');
- if (userIDs == "") {
- document.getElementById("UserIDs").value = "";
- }
- else {
- document.getElementById("UserIDs").value = userIDs;
- }
- $("#formQuery").attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/Student/PicComparison_Excel");
- $("#formQuery").submit();
- }
- //联动查询
- 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();
- }
|