From 971c233b7720c344b9b58cb5f4105077b6df1463 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Wed, 11 Jan 2023 11:54:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E7=BB=A9=E5=BD=95=E5=85=A5=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuScore/InputScoreIndexInTeacher.js | 12 ++++++++++++ .../StuScore/InputScoreIndexOfElectiveInTeacher.js | 12 ++++++++++++ .../StuScoreNotPass/InputScoreIndexInTeacher.js | 3 +++ .../StuScoreNotPassTwo/InputScoreIndexInTeacher.js | 5 ++++- 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js index 68b017efa..add8ff5d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js @@ -140,6 +140,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore < 0) { + row.OrdinaryScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -151,6 +154,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore < 0) { + row.TermInScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -162,6 +168,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -173,6 +182,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore < 0) { + row.OtherScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js index 8c713eeaa..fd6eeeb11 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js @@ -138,6 +138,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OrdinaryScore < 0) { + row.OrdinaryScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -149,6 +152,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermInScore < 0) { + row.TermInScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -160,6 +166,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -171,6 +180,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.OtherScore < 0) { + row.OtherScore = '0'; + } row.Score = Math.round(parseFloat(row.OrdinaryScore || '0') * (Number($('#OrdinaryScoreScale').html()) / 100) + parseFloat(row.TermInScore || '0') * (Number($('#TermInScoreScale').html()) / 100) + parseFloat(row.TermEndScore || '0') * (Number($('#TermEndScoreScale').html()) / 100) + parseFloat(row.OtherScore || '0') * (Number($('#OtherScoreScale').html()) / 100)); $('#gridtable').jfGridSet('updateRow', rownum); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js index bb935d524..30ad1b905 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndexInTeacher.js @@ -139,6 +139,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js index 8c113964a..ebcbcd69e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexInTeacher.js @@ -139,6 +139,9 @@ var bootstrap = function ($, learun) { type: 'input', inputType: 'number', change: function (row, rownum) { + if (row.TermEndScore < 0) { + row.TermEndScore = '0'; + } row.Score = (parseFloat(row.TermEndScore || '0') * 1).toFixed(0); $('#gridtable').jfGridSet('updateRow', rownum); }, @@ -377,7 +380,7 @@ var bootstrap = function ($, learun) { learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); } }); - + //导入 $('#lr_importScore').on('click', function () { var query = judgeSelect();