123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- var jsonString = "";
- var parameterString = "";
- var schoolyearID = $("#ddlSchoolyear").combobox("getValue");
- if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationBatch").combogridX("reload", eval(jsonString));
- }
- })
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#cgCollege").combogridX("getValue");
- //var educationID = $("#Education").combobox("getValue");
- var schoolYearID = $("#ddlYear").combobox("getValue");
- //var standardID = $("#ddlStandard").combogridX("getValue");
- //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionarySchoolyear|*|" + schoolYearID + "|@|";
- //if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
- //if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- //$("#ddlStandard").combogridX("reload", eval(jsonString));
- $("#cgCollege").combogridX("reload", eval(jsonString));
- $("#cgClassmajor").combogridX("reload", eval(jsonString));
- //} else {
- // //$("#ddlStandard").combogridX("reload");
- // $("#cgClassmajor").combogridX("reload");
- //}
- reload();
- }
- function schoolyearSelect() {
- try {
- schoolyearChange();
- reload();
- } catch (e) {
- }
- }
- function schoolyearChange() {
- try {
- var examinationBatchUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationBatch/DropDownList?bindType=0';
- var schoolyearID = $("#ddlSchoolyear").combobox('getValue');
- if (schoolyearID != nonSelect) {
- examinationBatchUrl += "&schoolyearID=" + schoolyearID;
- }
- $("#ddlExaminationBatch").combobox('reload', examinationBatchUrl);
- } catch (e) {
- }
- }
- function examinationBatchSelect() {
- try {
- examinationBatchChange();
- reload();
- } catch (e) {
- }
- }
- function examinationBatchChange() {
- try {
- var examinationTypeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/TypeDropDownList?bindType=0';
- var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
- if (examinationBatchID != nonSelect) {
- examinationTypeUrl += "&examinationBatchID=" + examinationBatchID;
- }
- $("#ddlExaminationType").combobox('reload', examinationTypeUrl);
- } catch (e) {
- }
- }
- function examinationTypeSelect() {
- try {
- examinationTypeChange();
- reload();
- } catch (e) {
- }
- }
- function examinationTypeChange() {
- try {
- var examinationProjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/DropDownList?bindType=0';
- var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
- var examinationTypeID = $("#ddlExaminationType").combobox('getValue');
- if (examinationBatchID != nonSelect) {
- examinationProjectUrl += "&examinationBatchID=" + examinationBatchID;
- }
- if (examinationTypeID != nonSelect) {
- examinationProjectUrl += "&examinationTypeID=" + examinationTypeID;
- }
- $("#ddlExaminationProject").combobox('reload', examinationProjectUrl);
- } catch (e) {
- }
- }
- function querySchoolYear() {
- var jsonString = "";
- var parameterString = "";
- var schoolyearID = $("#ddlSchoolyear").combobox("getValue");
- if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationBatch").combogridX("reload", eval(jsonString));
- }
- reload();
- }
- function queryBatch() {
- var jsonString = "";
- var parameterString = "";
- var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue");
- var examinationTypeID = $("#cgExaminationType").combogridX("getValue");
- if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|";
- if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|";
- var schoolyearID = $("#ddlSchoolyear").combobox("getValue");
- if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationType").combogridX("reload", eval(jsonString));
- $("#cgExaminationProject").combogridX("reload", eval(jsonString));
- }
- reload();
- }
- function queryType() {
- var jsonString = "";
- var parameterString = "";
- var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue");
- var examinationTypeID = $("#cgExaminationType").combogridX("getValue");
- if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|";
- if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationProject").combogridX("reload", eval(jsonString));
- }
- reload();
- }
- //function reloadClassmajor() {
- // if ($("#cgClassmajor").length > 0 && $.data($("#cgClassmajor")[0], "combogridX")) {
- // var collegeID = null;
- // var yearID = null;
- // //var standardID = null;
- // if ($("#cgCollege").length > 0 && $.data($("#cgCollege")[0], "combogridX")) {
- // collegeID = $("#cgCollege").combogridX("getValue");
- // }
- // if ($("#ddlYear").length > 0 && $.data($("#ddlYear")[0], "combobox")) {
- // yearID = $("#ddlYear").combobox("getValue");
- // }
- // //if ($("#ddlStandard").length > 0 && $.data($("#ddlStandard")[0], "combogridX")) {
- // // standardID = $("#ddlStandard").combogridX("getValue");
- // //}
- // if (collegeID == nonSelect) {
- // collegeID = null;
- // }
- // if (yearID == nonSelect) {
- // yearID = null;
- // }
- // //if (standardID == nonSelect) {
- // // standardID = null;
- // //}
- // var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID
- // + "|@|DictionarySchoolyear|*|" + yearID + "|@|'})";
- // $("#cgClassmajor").combogridX("reload", eval(jsonString));
- // }
- // //queryClass();
- //}
- function queryCollege() {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- //var collegeID = $("#cgCollege").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':";
- jsonString += "'CollegeDropdown|*|" + campusID + "|@|'})";
- //$("#cgCollege").combogridX("reload", eval(jsonString));
- //$("#ddlStandard").combogridX("reload", eval(jsonString));
- if (campusID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- }
- queryClass();
- //reload();
- }
- function queryGrademajor() {
- queryClass();
- }
- function reload() {
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- }
- function StudentList_Add() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationApplayStudentList/Edit" + "?MNU=" + mnu;
- $.popupTopWindow('报名名单新增', redirectTo, 860, 530, reload, null);
- }
- function StudentList_Edit() {
- var d = validChoose().join(',');
- //var status = validChoosedata().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择你要修改的信息!");
- return;
- }
- if (validChoose().length > 1) {
- $.messager.alert("系统提示", "只能选择单条记录进行修改!");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationApplayStudentList/FeeTypeEdit" + "?MNU=" + mnu + "&examinationRegistrationID=" + d;
- $.popupTopWindow('修改', redirectTo, 860, 530, reload, null);
- }
- function StudentList_Export() {
- var d = validChoose().join(',');
- $("[name='SelectedID']").val(d);
- $("#formQuery").attr("action", "Excel");
- $(document.forms[0]).submit();
- }
- function StudentList_Delete() {
- var d = validChoose().join(',');
- //var status = validChoosedata().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择你要删除的信息!");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/Delete', { examinationRegistrationIDs: d }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", data);
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function StudentList_Change() {
- var d = validChoose().join(',');
- var data = validChooseAll();
- if (d == "") {
- $.messager.alert("系统提示", "请选择你要调整费用的信息!");
- return;
- }
- if ($.grep(data, function (v, i) { return v.ExaminationRegistrationConfirmNo != null && v.ExaminationRegistrationConfirmNo != ""; }).length > 0) {
- $.messager.alert("系统提示", "选择的数据有已打包数据,不能调整费用。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/ChangeFee?MNU=' + mnu + '&examinationRegistrationIDs=' + d;
- $.popupTopWindow('费用调整', redirectTo, 400, 300, null, null);
- }
- function StudentList_PicExport() {
- var d = validChoose().join(',');
- $("[name='SelectedID']").val(d);
- $("#formQuery").attr("action", "ExportPictures?MNU=" + mnu);
- $("#formQuery").submit();
- }
- function StudentList_Confirm() {
- var d = validChoose().join(',');
- //var status = validChoosedata().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择你要打包确认的信息!");
- return;
- }
- var selectCount = validChoose().length;
- $.messager.confirm("系统提示", "您确定要打包确认选中的" + selectCount + "条记录?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/Confirm', { examinationRegistrationIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "打包成功");
- StudentList_Print(data.Message);
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- //$("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- function StudentList_CancelConfirm() {
- var d = validChoose().join(',');
- //var status = validChoosedata().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择你要取消确认的信息!");
- return;
- }
- $.messager.confirm("系统提示", "取消打包确认时将取消确认单上的所有学生,取消后可重新进行打包,是否确认要取消?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/CancelConfirm', { examinationRegistrationIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- function GetDynamicCondition() {
- var reg = "/(^/s*)|(/s*$)/g";
- 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 StudentList_Print(id) {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.LoginID);
- });
- var s = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- s.push(this.ExaminationRegistrationConfirmID);
- });
- var sql = GetDynamicCondition();
- var attribute = document.getElementsByName("Attribute")[0].value.split("\"Value\":\"")[1].split("\"")[0]; //获取自定义查询的当前字段
- var schoolYearID = $("#ddlSchoolyear").combobox("getValue");
- var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue");
- var examinationTypeID = $("#cgExaminationType").combogridX("getValue");
- var examinationProjectID = $("#cgExaminationProject").combogridX("getValue");
- var collegeID = $("#cgCollege").combogridX("getValue");
- var year = $("#ddlYear").combobox("getValue");
- var classmajorID = $("#cgClassmajor").combogridX("getValue");
- var isPay = $("#PayRecordStatus").combobox("getValue");
- var isConfirm = $("#IsConfirm").combobox("getValue");
- var loginID = d;
- var conditionString = sql;
- var condition = document.getElementsByName("Condition")[0].value;
- var value = (document.getElementsByName(attribute + "_QueryTextBox")[0] != null ? document.getElementsByName(attribute + "_QueryTextBox")[0].value : document.getElementsByName(attribute + "_QueryDictionaryDropDownList")[0].value)
- var ids = id;
- if (id == "" || id == null || typeof (id) == "undefined")
- {
- if (s[0] != null)
- {
- ids = s.join(',');
- } else {
- ids = null;
- }
-
- }
-
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/RegistrationConfirmReport?MNU=' + mnu;
- $.popupTopWindow('报名确认单', redirectTo, 1100, 700, null, {
- Attribute: attribute,
- SchoolYearID: schoolYearID,
- ExaminationBatchID: examinationBatchID,
- ExaminationTypeID: examinationTypeID,
- ExaminationProjectID: examinationProjectID,
- CollegeID: collegeID,
- Year: year,
- ClassmajorID: classmajorID,
- IsPay: isPay,
- ConditionString: conditionString,
- Condition: condition,
- Value: value,
- Ids: ids
- });
- }
- //function StudentList_Import() {
- // var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/Import?MNU=' + mnu;
- // $.popupTopWindow('学生名单导入', redirectTo, 300, 300, null, null);
- //}
- function validChoose() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ExaminationRegistrationID);
- });
- return d;
- }
- function validChooseUserIDs() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- function validChooseAll() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- function SelectExaminationSubjectDropdown(data) {
-
- var jsonString = "({'QueryParamsDatas':'ExaminationTypeDropdown|*|" + data.ExaminationTypeID + "|@|'})";
- $("#ddlExaminationSubject").combogridX("reload", eval(jsonString));
- reload();
- }
- function ExamineApply_Cancel() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要撤销报名的考试科目。");
- return;
- }
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/ApplyCancel?ExaminationRegistrationIDs=' + $.map(d, function (x) { return x.ExaminationRegistrationID; }).join(','), function (data) {
- if (data == "撤销成功") {
- $.messager.alert("系统提示", "撤销成功!");
- $("#dgStudentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- function queryProject() {
- var jsonString = "";
- var parameterString = "";
- var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue");
- var examinationTypeID = $("#cgExaminationType").combogridX("getValue");
- if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|";
- if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|";
- //if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationProject").combogridX("reload", eval(jsonString));
- //}
- reload();
- }
- function StudentList_Send() {
- var userIDs = validChooseUserIDs();
- if (userIDs.length == 0) {
- $.messager.alert("系统提示", "请选择您要发送信息的学生报名数据。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Common/UserAnnouncementSend";
- $.popupTopWindow('信息发送', redirectTo, 1024, 768, null, userIDs);
- }
- //function queryProjectFee() {
- // var jsonString = "";
- // var parameterString = "";
- // var examinationProjectID = $("#cgExaminationProject").combogridX("getValue");
- // if (examinationProjectID != nonSelect && examinationProjectID != "") parameterString += "cgExaminationProject|*|" + examinationProjectID + "|@|";
- // if (parameterString != "") {
- // jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- // $("#ExaminationProjectFeeID").combogridX("reload", eval(jsonString));
- // }
- // reload();
- //}
|