123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- var url = "/Studentreport/Edit?a=1";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- function reload() {
- $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.StudentReportID);
- });
- return d;
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- showDialog([rowdata.StudentReportID]);
- }
- //学籍注册
- function Studentreport_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要注册的学生信息。");
- return;
- }
- //if (d.length > 1) {
- // $.messager.alert("系统信息", "只能选中一位学生进行学期注册。");
- // return;
- //}
- showDialog(d);
- }
- function Studentreport_Refresh() {
- var redirectTo = 'Studentreport/Refresh?a=1';
- redirectTo = redirectTo + '&MNU=' + mnu;
- $.popupTopWindow('生成学籍注册名单', redirectTo, 400, 200, null, null);
- }
- function Studentreport_Report() {
- var redirectTo = 'Studentreport/Report?a=1';
- //var schoolYearID = $("SchoolYearID").combobox("getValue");
- redirectTo = redirectTo + '&MNU=' + mnu;
- $.popupTopWindow('缴费注册刷新', redirectTo, 400, 200, null, null);
- }
- function showDialog(id) {
- var redirectTo = url;
- //if (id) {
- // redirectTo = redirectTo + '&id=' + id;
- //}
- redirectTo = redirectTo + '&MNU=' + mnu;
- $.popupTopWindow('学籍注册', redirectTo, 450, 200, null, id);
- }
- //删除
- function Studentreport_Delete() {
- var selected = $("#dgList").cmsXDataTable("getSelections");
- if (selected.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的学生注册信息!");
- return;
- }
- var ids = [];
- for (var i = 0; i < selected.length; i++) {
- if (selected[i].ReportStatusName != '待注册') {
- $.messager.alert("系统提示", "只能删除待注册状态的学生注册信息。");
- return;
- }
- ids.push(selected[i].StudentReportID);
- }
- $.messager.confirm("系统提示", "您确定要删除该学生注册信息?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Studentreport/Delete', { ids: ids.join(',') }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function Studentreport_Export() {
- $("#formQuery").submit();
- }
- function Studentreport_Import() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Studentreport/Import?MNU=' + mnu;
- $.popupTopWindow('导入学生', redirectTo, 400, 300, null, null);
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combobox("getValue");
- var learningFormID = $("#DictionaryLearningform").combobox("getValue");
- var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- var schoolyearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- if (schoolyearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolyearID + "|@|";
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- 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 (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- } else {
- $("#ClassmajorDropdown").combogridX("reload");
- $("#DictionaryStandard").combogridX("reload");
- }
- reload();
- }
- function QueryCampusComboGridList() {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- queryClass();
- }
- function QueryCollegeComboGridList(data) {
- if (((data.length && data.length > 0) || data)
- && $("#CampusDropdown").length > 0 && $.data($("#CampusDropdown")[0], "combogridX")
- && $("#SchoolyearDictionaryDropDown").length > 0 && $.data($("#SchoolyearDictionaryDropDown")[0], "combobox")
- && $("#DictionaryStandard").length > 0 && $.data($("#DictionaryStandard")[0], "combogridX")
- && $("#ClassmajorDropdown").length > 0 && $.data($("#ClassmajorDropdown")[0], "combogridX")) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var schoolYear = $("#DictionarySchoolyear").combobox("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|CollegeDropdown|*|" + collegeID + "|@|DictionaryGrade|*|" + schoolYear + "|@|DictionaryStandard|*|" + standardID + "|@|'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- }
- queryClass();
- }
- function QuerySchoolyearDictionaryDropdownList(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var schoolYear = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|CollegeDropdown|*|" + collegeID + "|@|DictionaryGrade|*|" + schoolYear + "|@|DictionaryStandard|*|" + standardID + "|@|'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- queryClass();
- }
- function QueryStandardDropdownList(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var schoolYear = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|CollegeDropdown|*|" + collegeID + "|@|DictionaryGrade|*|" + schoolYear + "|@|DictionaryStandard|*|" + standardID + "|@|'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- queryClass();
- }
- function QueryReportStatusDropdownList(data) {
- if (((data.length && data.length > 0) || data)
- && $("#CampusDropdown").length > 0 && $.data($("#CampusDropdown")[0], "combobox")
- && $("#CollegeDropdown").length > 0 && $.data($("#CollegeDropdown")[0], "combobox")
- && $("#ClassmajorDropdown").length > 0 && $.data($("#ClassmajorDropdown")[0], "combobox")
- && $("#SchoolyearDictionaryDropDown").length > 0 && $.data($("#SchoolyearDictionaryDropDown")[0], "combobox")
- && $("#dgList").length > 0 && $.data($("#dgList")[0], "cmsXDataTable")) {
- reload();
- }
- queryClass();
- }
- function QuerySchoolyearDropdownList(data) {
- if (((data.length && data.length > 0) || data)
- && $("#CampusDropdown").length > 0 && $.data($("#CampusDropdown")[0], "combobox")
- && $("#CollegeDropdown").length > 0 && $.data($("#CollegeDropdown")[0], "combobox")
- && $("#ClassmajorDropdown").length > 0 && $.data($("#ClassmajorDropdown")[0], "combobox")
- && $("#ReportStatusDictionaryDropDown").length > 0 && $.data($("#ReportStatusDictionaryDropDown")[0], "combobox")
- && $("#dgList").length > 0 && $.data($("#dgList")[0], "cmsXDataTable")) {
- reload();
- }
- queryClass();
- }
- //联动查询
- function queryStandard(data) {
- queryClass();
- 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));
- // $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- // // if (campusID != nonSelect) {
- // // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- // // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- // // }
- queryClass();
- reload();
- }
|