123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/StudentMinorRegistApply/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- RetakeOpenTime();
- })
- //刷新
- function StudentMinorRegistApply_Refresh() {
- $("#dgStudentMinorRegistApplyList").cmsXDataTable("load", $.getDataGridParams("dgStudentMinorRegistApplyList"));
- }
- function reload() {
- RetakeOpenTime();
- $("#dgStudentMinorRegistApplyList").cmsXDataTable("load", $.getDataGridParams("dgStudentMinorRegistApplyList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgStudentMinorRegistApplyList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.GrademinorID);
- });
- return d;
- }
- //辅修报名时间
- function RetakeOpenTime() {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + "/StudentMinorRegistApply/MinorOpenControl", $.getDataGridParams("dgStudentMinorRegistApplyList"), function (data) {
- if (data.IsSuccess) {
- $("#labText").text(data.Message);
- }
- });
- }
- function CourseList(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentMinorRegistApply/CourseList" + "?grademinorID=" + rowdata.GrademinorID + "&MNU=" + mnu + '&isView=1';
- $.popupTopWindow('辅修课程信息详情', redirectTo, 800, 600, null, null);
- }
- //操作(可报名及取消)
- function Click(index, row) {
- $(event.srcElement).attr("disabled", "disabled");
- if (row.ApplyStatus) {
- //取消报名
- CancelApply(row.GrademinorID, row.StandardName, $(event.srcElement));
- } else {
- //报名
- Apply(row.GrademinorID, row.StandardName, $(event.srcElement));
- }
- }
- //报名
- function Apply(GrademinorID, StandardName, control) {
- $.messager.defaults = { ok: "立即报名", cancel: "放弃" };
- $.messager.confirm("系统提示", "是否要对此报名信息(" + StandardName + ")进行报名" + "?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentMinorRegistApply/Apply', { GrademinorID: GrademinorID }, function (data) {
- if (data.IsSuccess) {
- //setTimeout("location.reload(true)", 2000);
- }
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- $.messager.alert("系统提示", data.Message);
- control.removeAttr("disabled");
- //刷新
- StudentMinorRegistApply_Refresh();
- });
- } else {
- control.removeAttr("disabled");
- //刷新
- StudentMinorRegistApply_Refresh();
- }
- });
- }
- //取消报名
- function CancelApply(GrademinorID, StandardName, control) {
- $.messager.defaults = { ok: "取消报名", cancel: "放弃" };
- $.messager.confirm("系统提示", "是否要对此报名信息(" + StandardName + ")取消报名" + "?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentMinorRegistApply/CancelApply', { GrademinorID: GrademinorID }, function (data) {
- if (data.IsSuccess) {
- //setTimeout("location.reload(true)", 2000);
- }
- $.messager.defaults = { ok: "确定", cancel: "取消" };
- $.messager.alert("系统提示", data.Message);
- control.removeAttr("disabled");
- //刷新
- StudentMinorRegistApply_Refresh();
- });
- } else {
- control.removeAttr("disabled");
- //刷新
- StudentMinorRegistApply_Refresh();
- }
- });
- }
- //联动查询
- 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));
- queryClass();
- reload();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var yearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (yearID != nonSelect) parameterString += "DictionaryGrade|*|" + yearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- } else {
- $("#StandardDictionaryDropDown").combogridX("reload");
- }
- reload();
- }
|