123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- 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) {
- }
- }
|