Procházet zdrojové kódy

选修课成绩录入导入功能

娄底高职分支
dao před 4 měsíci
rodič
revize
7f871514de
5 změnil soubory, kde provedl 123 přidání a 1 odebrání
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml
  2. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.cshtml
  4. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js
  5. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml Zobrazit soubor

@@ -92,6 +92,7 @@
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock">&nbsp;提交教务处</i></a>
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock">&nbsp;去审核成绩</i></a>
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit">&nbsp;设置成绩比例</i></a>
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit">&nbsp;导入</i></a>
</div>
</div>



+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js Zobrazit soubor

@@ -15,6 +15,9 @@ var headData; //常规列头
var headDataEdit; //可编辑列头
var headDataNoEdit; //不可编辑列头
var headDataFinally; //最终列头
var rowJson;
var columnJson;
var queryJson;
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -467,6 +470,63 @@ var bootstrap = function ($, learun) {
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScore/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { });
}
});
//导入
$("#lr_importScore").on("click", function () {
var query = judgeSelect();
if (query) {
//判断成绩比例是否合理
var OrdinaryScoreScale = $('#OrdinaryScoreScale').html();
var TermInScoreScale = $('#TermInScoreScale').html();
var TermEndScoreScale = $('#TermEndScoreScale').html();
var OtherScoreScale = $('#OtherScoreScale').html();
var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale);
if (totalScale !== 100) {
learun.alert.warning("成绩比例设置不合理!");
return false;
} else {
//判断是否已审核;判断是否被其他教师占用
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark == 1) {
learun.alert.warning("学生成绩已审核!");
return false;
}
if (data.IsEditable == 0) {
if (data.EditUserId == learun.clientdata.get(['userinfo']).account) {
modifyDate = data.ModifyDate;
} else {
learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!");
return false;
}
}
rowJson = $('#gridtable').jfGridGet('showData');
columnJson = $('#gridtable').jfGridGet('settingInfo').headData;

//条件
var $content = $('body').find('.lr-layout-tool-left');
queryJson = $content.lrGetFormData();

learun.layerForm({
id: 'indexImport',
title: "导入学生成绩",
url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=2',
width: 600,
height: 400,
maxmin: true,
btn: null,
end: function () {
refreshGirdData2();
}
});

} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
}
});
},
bindSelect: function () {
//校区


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.cshtml Zobrazit soubor

@@ -92,6 +92,7 @@
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock">&nbsp;提交教务处</i></a>
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock">&nbsp;去审核成绩</i></a>
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit">&nbsp;设置成绩比例</i></a>
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit">&nbsp;导入</i></a>
</div>
</div>



+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js Zobrazit soubor

@@ -15,6 +15,9 @@ var headData; //常规列头
var headDataEdit; //可编辑列头
var headDataNoEdit; //不可编辑列头
var headDataFinally; //最终列头
var rowJson;
var columnJson;
var queryJson;
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -467,6 +470,63 @@ var bootstrap = function ($, learun) {
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScore/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { });
}
});
//导入
$("#lr_importScore").on("click", function () {
var query = judgeSelect();
if (query) {
//判断成绩比例是否合理
var OrdinaryScoreScale = $('#OrdinaryScoreScale').html();
var TermInScoreScale = $('#TermInScoreScale').html();
var TermEndScoreScale = $('#TermEndScoreScale').html();
var OtherScoreScale = $('#OtherScoreScale').html();
var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale);
if (totalScale !== 100) {
learun.alert.warning("成绩比例设置不合理!");
return false;
} else {
//判断是否已审核;判断是否被其他教师占用
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark == 1) {
learun.alert.warning("学生成绩已审核!");
return false;
}
if (data.IsEditable == 0) {
if (data.EditUserId == learun.clientdata.get(['userinfo']).account) {
modifyDate = data.ModifyDate;
} else {
learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!");
return false;
}
}
rowJson = $('#gridtable').jfGridGet('showData');
columnJson = $('#gridtable').jfGridGet('settingInfo').headData;

//条件
var $content = $('body').find('.lr-layout-tool-left');
queryJson = $content.lrGetFormData();

learun.layerForm({
id: 'indexImport',
title: "导入学生成绩",
url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=2',
width: 600,
height: 400,
maxmin: true,
btn: null,
end: function () {
refreshGirdData2();
}
});

} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
}
});
},
bindSelect: function () {
//校区


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs Zobrazit soubor

@@ -2411,7 +2411,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad
TermInScore * (stuSelectLessonListOfElectiveEntity.TermInScoreScale / 100) +
TermEndScore * (stuSelectLessonListOfElectiveEntity.TermEndScoreScale / 100) +
OtherScore * (stuSelectLessonListOfElectiveEntity.OtherScoreScale / 100)), MidpointRounding.AwayFromZero);
var remark = dr["考试类型"].ToString().Trim();
var remark = dr["备注"].ToString().Trim();
db.ExecuteBySql($"update StuScore set OrdinaryScore={OrdinaryScore},TermInScore={TermInScore},TermEndScore={TermEndScore},OtherScore={OtherScore},Score={Score},Remark='{remark}' where ScoreId='{item.ScoreId}' ");
}
else


Načítá se…
Zrušit
Uložit