var mnu = ""; var windowID = ""; //保存数据 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); windowID = $.SystemGeneral.getUrlParam("WindowID"); var errorFile = '@ViewBag.ErrorFile'; if (errorFile != '') { $('#error').show(); } }); function ExaminationScore_ImportSave() { var filepath = $("input[name='file']").val(); if (filepath == "") { $.messager.alert("系统提示", "请选择你要导入的Excel文件"); return; } var schoolyearID = $("#ddlSchoolyear").combobox('getValue'); var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue'); var examinationTypeID = $("#ddlExaminationType").combobox('getValue'); var examinationProjectID = $("#ddlExaminationProject").combobox('getValue'); if (schoolyearID == nonSelect || examinationBatchID == nonSelect || examinationTypeID == nonSelect || examinationProjectID == nonSelect) { $.messager.alert("系统提示", "请选择需要导入模板对应的项目"); return; } else { //加载中。。。 //$(document.forms[0]).attr("action", "Import?MNU=" + mnu + "&WindowID=" + windowID + "&schoolyearID=" + schoolyearID + "&examinationBatchID=" + examinationBatchID + "&examinationTypeID=" + examinationTypeID + "&examinationProjectID=" + examinationProjectID); $(document.forms[0]).submitWithLoading(); //$(document.forms[0]).attr("action", "GetTemplateByProject?schoolyearID=" + schoolyearID + "&examinationBatchID=" + examinationBatchID + "&examinationTypeID=" + examinationTypeID + "&examinationProjectID=" + examinationProjectID); //$(document.forms[0]).submit(); } } function ExaminationScore_TemplateExport() { var schoolyearID = $("#ddlSchoolyear").combobox('getValue'); var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue'); var examinationTypeID = $("#ddlExaminationType").combobox('getValue'); var examinationProjectID = $("#ddlExaminationProject").combobox('getValue'); //$.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationScore/GetTemplateByProject', { schoolyearID: schoolyearID, // examinationBatchID: examinationBatchID, examinationTypeID: examinationTypeID, examinationProjectID: examinationProjectID //},function (data) { // if (data.IsSuccess) { // $.messager.alert("系统提示", data.Message); // } else { // $.messager.alert("系统提示", data.Message); // } //}); if (schoolyearID == nonSelect || examinationBatchID == nonSelect || examinationTypeID == nonSelect || examinationProjectID == nonSelect) { $.messager.alert("系统提示", "请选择需要导出模板的项目"); return; } else { $(document.forms[0]).attr("action", "GetTemplateByProject?MNU=" + mnu + "&schoolyearID=" + schoolyearID + "&examinationBatchID=" + examinationBatchID + "&examinationTypeID=" + examinationTypeID + "&examinationProjectID=" + examinationProjectID); $(document.forms[0]).submit(); } } 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); 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); 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); reload(); } catch (e) { } }