var url = CMS_SystemConfig.VirtualDirectoryPath + "/PersonalScore/NewList"; var mnu = ""; $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); var jsonString = ""; var parameterString = ""; var resultTypeID = $("#ResultTypeID").combobox("getValue"); var examsStateID = $("#ExamsStateID").combobox("getValue"); //var resultTypeDetailID = $("#rTD").val(); //$("#ResultTypeDetailID").combogridX("setValue", resultTypeDetailID); if (examsStateID == 1 || examsStateID == "-1" || examsStateID == 10) { if (resultTypeID != 100 && resultTypeID != "-1") { $("[name='TotalScore']").attr("disabled", "disabled"); $("[name='TotalScore']").hide(); $("#ResultTypeDetailID").next().show(); } else { $("[name='TotalScore']").removeAttr("disabled"); $("[name='TotalScore']").show(); $("#ResultTypeDetailID").next().hide(); //$("#ResultTypeID").combobox("setValue", 100); } } else { $("[name='TotalScore']").show(); $("#ResultTypeDetailID").next().hide(); $("[name='TotalScore']").attr("disabled", "disabled"); } StudentChange(); }) //$(function () { // debugger; // var resultTypeDetailID = $("#rTD").val(); // $("#ResultTypeDetailID").combogridX("setValue", resultTypeDetailID); //}) function setValue() { // debugger; // var resultTypeDetailID = $("#rTD").val(); // $("#ResultTypeDetailID").combogridX("setValue", resultTypeDetailID); } function ResultTypeChange() { var jsonString = ""; var parameterString = ""; var resultTypeID = $("#ResultTypeID").combobox("getValue"); var examsStateID = $("#ExamsStateID").combobox("getValue"); if (examsStateID == 1 || examsStateID == "-1") { if (resultTypeID != 100 && resultTypeID != "-1") { $("[name='TotalScore']").attr("disabled", "disabled"); $("[name='TotalScore']").hide(); $("#ResultTypeDetailID").next().show(); if (resultTypeID != nonSelect) { $("#ResultTypeDetailID").combobox("setValue", ""); $("#ResultTypeDetailID").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/PersonalScore/GetTypeNameByID?typeID=" + resultTypeID + ""); } else { //$("#ResultTypeDetailID").combobox("reload"); } } else { $("[name='TotalScore']").removeAttr("disabled"); $("[name='TotalScore']").show(); $("[name='TotalScore']").val(""); $("#ResultTypeDetailID").next().hide(); } } } function ExamsStateChange() { var examsStateID = $("#ExamsStateID").combobox("getValue"); //var examsStateName = if (examsStateID != 1 && examsStateID != "-1" && examsStateID != 10) { $("[name='TotalScore']").show(); $("#ResultTypeDetailID").next().hide(); var examsStateName = $("#ExamsStateID").next().find(".combo-text.validatebox-text").val(); $("[name='TotalScore']").val(examsStateName); $("[name='TotalScore']").attr("disabled","disabled"); } else { $("[name='TotalScore']").show(); $("#ResultTypeDetailID").next().hide(); $("[name='TotalScore']").removeAttr("disabled"); $("[name='TotalScore']").val(0); } } function PersonScore_Save() { var userID = $.SystemGeneral.getUrlParam("UserID"); var windowID = $.SystemGeneral.getUrlParam("WindowID"); var coursematerialID = $("#CoursematerialID").combogridX("getValue"); var examsCategoryID = $("#ExamsCategoryID").combobox("getValue"); var startTermID = $("#StarttermID").combobox("getValue"); var changedUserID = $("#UserID").combogridX("getValue"); $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentScore/ValidateDuplicate', { submitedScoreID: $.SystemGeneral.getUrlParam("SubmitedScoreID"), userID: userID, coursematerialID: coursematerialID, examsCategoryID: examsCategoryID, startTermID: startTermID }, function (data) { if (data.IsSuccess) { $(document.forms[0]).submit(); } else { $.messager.confirm('提示', data.Message, function (r) { if (r) { $(document.forms[0]).submit(); } }); } }); } function StudentScore_Save() { var userID = $("#UserID").combogridX("getValue"); var coursematerialID = $("#CoursematerialID").combogridX("getValue"); var examsCategoryID = $("#ExamsCategoryID").combobox("getValue"); var startTermID = $("#StarttermID").combobox("getValue"); $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentScore/ValidateDuplicate', { submitedScoreID: $.SystemGeneral.getUrlParam("submitedScoreID"), userID: userID, coursematerialID: coursematerialID, examsCategoryID: examsCategoryID, startTermID: startTermID }, function (data) { if (data.IsSuccess) { $(document.forms[0]).submit(); } else { $.messager.confirm('提示', data.Message, function (r) { if (r) { $(document.forms[0]).submit(); } }); } }); } function selectSchoolyearNum() { var schoolyearNum = $("#SchoolyearNumID").combobox("getValue"); var startTermObj = $("#StarttermID"); var startTerm = startTermObj.combobox("getValue"); if (startTerm > (schoolyearNum * 2) || startTerm < ((schoolyearNum - 1) * 2)) { startTermObj.combobox("setValue", (schoolyearNum * 2) - 1); } } function selectStartTerm() { var schoolyearNumObj = $("#SchoolyearNumID"); var startTermObj = $("#StarttermID"); var startTerm = startTermObj.combobox("getValue"); schoolyearNumObj.combobox("setValue", Math.ceil(parseFloat(startTerm) / parseFloat(2))); } function StudentChange() { var userID = $("#UserID").combogridX("getValue"); var className = ""; var url = CMS_SystemConfig.VirtualDirectoryPath + '/PersonalScore/GetClassNameByUserID'; if (userID != null && userID != "") { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/PersonalScore/GetClassNameByUserID', { userID: userID }, function (data) { document.getElementById("ClassName").value = data.Message; }); } } function queryClass() { var SchoolyearNumID = $("#SchoolyearNumID").combobox("getValue"); var url = CMS_SystemConfig.VirtualDirectoryPath + "/StudentScore/BindDropdownListBySchoolyearNum?bindType=PleaseSelect&year=" + SchoolyearNumID; $("#StarttermID").combobox("reload", url); }