123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/ExecutableMinorPlan/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- function reload() {
- $("#dgExecutableMinorPlanList").cmsXDataTable("load", $.getDataGridParams("dgExecutableMinorPlanList"));
- }
- function ExecutableMinorPlan_Create() {
- $.popupTopWindow('生成执行计划(辅修)', CMS_SystemConfig.VirtualDirectoryPath + "/ExecutableMinorPlan/GenerateExecutablePlan?MNU=" + mnu, 600, 300, null, null);
- }
- function ExecutableMinorPlan_Update() {
- var d = validChoose();
- var state = teachingvalidChoose().join(',');
- if (d == "") {
- $.messager.alert("系统信息", "请选择您要修改的执行计划(辅修)信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- for (var i = 0; i < state.split(',').length; i++) {
- if (state.split(',')[i] != notSubmitStatus) {
- $.messager.alert("系统提示", "只能对未提交的数据进行修改,请检查您选择的记录。");
- return;
- }
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ExecutableMinorPlan/Edit?ExecutableMinorPlanID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('修改执行计划(辅修)', redirectTo, 800, 600, null, null);
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?ExecutableMinorPlanID=" + rowdata.ExecutableMinorPlanID + "&MNU=" + mnu + '&isView=1';
- $.popupTopWindow('执行计划(辅修)详情', redirectTo, 800, 600, null, null);
- }
- function TeachingPlan_Export() {
- $("[name='ExecutablePlanIDs']").val(validChoose().join(","));
- $("#formQuery").submit();
- }
- function ExecutableMinorPlan_Delete() {
- var d = validChoose().join(',');
- var state = teachingvalidChoose().join(',');
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的执行计划(辅修)。");
- return;
- }
- for (var i = 0; i < state.split(',').length; i++) {
- if (state.split(',')[i] != notSubmitStatus) {
- $.messager.alert("系统提示", "只能对未提交的数据进行删除,请检查您选择的记录。");
- return;
- }
- }
- $.messager.confirm("系统提示", "您确定要删除执行计划(辅修)信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExecutableMinorPlan/Delete', { ExecutableMinorPlanIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功。");
- $("#dgExecutableMinorPlanList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- function ExecutableMinorPlan_Submit() {
- var d = validChoose().join(',');
- var state = teachingvalidChoose().join(',');
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要生成的教学任务班数据!");
- return;
- }
- for (var i = 0; i < state.split(',').length; i++) {
- if (state.split(',')[i] != notSubmitStatus) {
- $.messager.alert("系统提示", "您选择教学计划存在已提交的数据!");
- return;
- }
- }
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExecutableMinorPlan/GenerateEducationMissionClassSubminit', { ExecutableMinorPlanIDs: d }, function (data) {
- if (data == "成功") {
- $.messager.alert("系统提示", "生成教学任务班成功!");
- $("#dgExecutableMinorPlanList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgExecutableMinorPlanList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ExecutableMinorPlanID);
- });
- return d;
- }
- //获取选中的数据
- function teachingvalidChoose() {
- var d = [];
- $.each($("#dgExecutableMinorPlanList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.RecordStatus);
- });
- return d;
- }
- function QueryCampusComboGridList() {
- var campusID = $("#ComboGridCampus").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#ComboGridCollege").combogridX("reload", eval(jsonString));
- reload();
- }
- //联动查询
- 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();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- //var educationID = $("#Education").combobox("getValue");
- var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- } else {
- $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- }
- reload();
- }
|