@@ -92,6 +92,7 @@ | |||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | <a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | ||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | <a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | ||||
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a> | <a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a> | ||||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入</i></a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -15,6 +15,9 @@ var headData; //常规列头 | |||||
var headDataEdit; //可编辑列头 | var headDataEdit; //可编辑列头 | ||||
var headDataNoEdit; //不可编辑列头 | var headDataNoEdit; //不可编辑列头 | ||||
var headDataFinally; //最终列头 | var headDataFinally; //最终列头 | ||||
var rowJson; | |||||
var columnJson; | |||||
var queryJson; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | 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) { }); | 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 () { | bindSelect: function () { | ||||
//校区 | //校区 | ||||
@@ -92,6 +92,7 @@ | |||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | <a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | ||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | <a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | ||||
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a> | <a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a> | ||||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入</i></a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -15,6 +15,9 @@ var headData; //常规列头 | |||||
var headDataEdit; //可编辑列头 | var headDataEdit; //可编辑列头 | ||||
var headDataNoEdit; //不可编辑列头 | var headDataNoEdit; //不可编辑列头 | ||||
var headDataFinally; //最终列头 | var headDataFinally; //最终列头 | ||||
var rowJson; | |||||
var columnJson; | |||||
var queryJson; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | 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) { }); | 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 () { | bindSelect: function () { | ||||
//校区 | //校区 | ||||
@@ -2411,7 +2411,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||||
TermInScore * (stuSelectLessonListOfElectiveEntity.TermInScoreScale / 100) + | TermInScore * (stuSelectLessonListOfElectiveEntity.TermInScoreScale / 100) + | ||||
TermEndScore * (stuSelectLessonListOfElectiveEntity.TermEndScoreScale / 100) + | TermEndScore * (stuSelectLessonListOfElectiveEntity.TermEndScoreScale / 100) + | ||||
OtherScore * (stuSelectLessonListOfElectiveEntity.OtherScoreScale / 100)), MidpointRounding.AwayFromZero); | 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}' "); | db.ExecuteBySql($"update StuScore set OrdinaryScore={OrdinaryScore},TermInScore={TermInScore},TermEndScore={TermEndScore},OtherScore={OtherScore},Score={Score},Remark='{remark}' where ScoreId='{item.ScoreId}' "); | ||||
} | } | ||||
else | else | ||||