123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- 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);
- }
|