Переглянути джерело

【增加】教师:选修二次补考成绩录入;

新疆体育高职分支
dyy 1 рік тому
джерело
коміт
c905ac15cc
3 змінених файлів з 667 додано та 0 видалено
  1. +118
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElectiveInTeacher.cshtml
  2. +547
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElectiveInTeacher.js
  3. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj

+ 118
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElectiveInTeacher.cshtml Переглянути файл

@@ -0,0 +1,118 @@
@{ ViewBag.Title = "全院学生选修二次补考成绩录入(新)"; Layout = "~/Views/Shared/_Index.cshtml"; }
<style>
.lr-select {
width: 150px;
}

#LessonNo {
width: 180px;
}

.lr-selectLittle {
width: 80px;
}

.lr-layout-tool {
height: 80px;
}

.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle {
padding-top: 80px;
}

.divRow {
position: absolute;
width: 100%;
height: 55px;
top: 0;
left: 0;
}

.scaleRow {
top: 55px;
padding: 2px 10px;
height: 25px;
}

.scaleRow .timeBox {
float: right;
padding-right: 30px;
}
.scaleRow .tipBox{
display:inline-block;
color:#ff0000;
margin-left:10px;
}

#addMinutesBtn {
display: inline-block;
cursor: pointer;
background-color: blue;
color: #fff;
padding: 1px 5px;
border-radius: 4px;
}
</style>
<div class="lr-layout">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="selectRow divRow">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="F_SchoolId" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle"></div>
</div>
<div class="lr-layout-tool-item">
<div id="LessonNo" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="ClassRoomNo" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="LessonSection" type="lrselect" class="lr-select"></div>
</div>

<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class="btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit">&nbsp;开始录入</i></a>
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit">&nbsp;提交成绩</i></a>
<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>
</div>
</div>

</div>
<div class="scaleRow divRow">
<div class="tipBox">提示:录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!</div>
<div class="timeBox" style="display:none;">
倒计时:
<span id="minutes" data-minutes="30"></span>分钟(<span id="seconds" data-seconds="60"></span>秒)
<div id="addMinutesBtn" data-minutes="30">续时</div>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElectiveInTeacher.js")
<script>
var CanInputFlag = "@ViewBag.CanInputFlag";
if (CanInputFlag != "True") {
top.learun.layerConfirm('当前时间不是选修重考成绩录入时间!', function (res) {});
}
</script>

+ 547
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndexOfElectiveInTeacher.js Переглянути файл

@@ -0,0 +1,547 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-06-14 11:02
* 描 述:全院学生选修二次补考成绩录入(新)
*/
var selectedRow;
var refreshGirdData;
var refreshGirdData2;
var judgeSelect; //判断下拉框是否选择
var modifyDate; //成绩被占用,且是登录用户时,成绩表中的编辑时间;
var timer; //计时器
var submitScoreTimer; //五分钟提交成绩计时器
var headData; //常规列头
var headDataEdit; //可编辑列头
var headDataNoEdit; //不可编辑列头
var headDataFinally; //最终列头
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
headData = [
{
label: "审核状态", name: "CheckMark", width: 80, align: "center",
formatter: function (cellvalue) {
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
}
},
{ label: '学号', name: 'StuNo', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 150, align: "left" },
{
label: "性别", name: "GenderNo", width: 35, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "男" : "女";
}
},
{
label: "学习形式", name: "StudyModality", width: 75, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StudyModality',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "异动类型", name: "MoveType", width: 55, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StuChangeType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "校区", name: "F_SchoolId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
{
label: "系所", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{ label: "年级", name: "Grade", width: 35, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" },
{ label: '学期', name: 'Semester', width: 35, align: "left" },
{ label: '课程名称', name: 'LessonName', width: 150, align: "left" },
//{
// label: '课程名称', name: 'LessonNo', width: 150, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
// key: value,
// keyId: 'lessonno',
// callback: function (_data) {
// callback(_data['lessonname']);
// }
// });
// }
//},
{
label: '教室名称', name: 'ClassRoomNo', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo',
key: value,
keyId: 'classroomno',
callback: function (_data) {
callback(_data['classroomname']);
}
});
}
},
{ label: '节次', name: 'LessonSection', width: 60, align: "left" },
];
headDataEdit = [
{
label: '补考成绩', name: 'TermEndScore', width: 80, align: "left",
edit: {
type: 'input',
inputType: 'number',
change: function (row, rownum) {
row.Score = (parseFloat(row.TermEndScore || '0') * 1) >= 60 ? 60 : (parseFloat(row.TermEndScore || '0') * 1).toFixed(0);
$('#gridtable').jfGridSet('updateRow', rownum);
},
}
},
{ label: '总成绩', name: 'Score', width: 80, align: "left" },
{
label: '备注', name: 'Remark', width: 100, align: "left",
edit: {
type: 'input',
}
},
];
headDataNoEdit = [
{
label: '期末成绩', name: 'TermEndScore', width: 80, align: "left"
},
{ label: '总成绩', name: 'Score', width: 80, align: "left" },
{
label: '备注', name: 'Remark', width: 100, align: "left"
},
];
headDataFinally = headData.concat(headDataNoEdit);

page.initGird();
page.bind();
page.bindSelect();
},
bind: function () {
//多条件选择
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 500);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
//查询
$('#btn_Search').on('click', function () {
refreshGirdData2();
});
// 开始录入
$('#lr_input').on('click', function () {
//提示弹框
learun.layerConfirm('录入完成后,请务必点击“提交成绩”按钮,避免成绩丢失!', function (res) {
if (res) {

var query = judgeSelect();
if (query) {
//判断是否已审核;判断是否被其他教师占用
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/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;
}
} else {
//占用成绩
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/StartInputScore', { queryJson: JSON.stringify(query) }, function (res) { });
}
//显示可编辑列头
headDataFinally = headData.concat(headDataEdit);
$("#gridtable")[0].dfop = undefined;
page.initGird();
page.search(query);
//显示“提交成绩”按钮
$('#lr_save').show();
//隐藏“开始录入”按钮
$('#lr_input').hide();
//显示“倒计时”
$('.timeBox').show();
$('#minutes').html($('#minutes').attr('data-minutes'));
//开始倒计时
page.countDown();
//五分钟提交成绩
page.submitScore();
} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}

}
});
});
//提交成绩
$('#lr_save').on('click', function () {
var query = judgeSelect();
if (query) {
//成绩被占用,且是登录用户时,根据编辑时间判断是否是本人;
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/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) {
if (modifyDate != null && modifyDate != data.ModifyDate) {
learun.alert.warning("当前班级成绩被修改,请重新获取!");
return false;
}
} else {
learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!");
return false;
}
} else if (data.IsEditable == 1) {
learun.alert.warning("学生成绩已提交!");
return false;
}
//提交成绩
var rowdatas = $('#gridtable').jfGridGet('rowdatas');
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) {
if (res.code == 200) {
//提交成绩:取消占用
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/SaveInputScoreStatus', { queryJson: JSON.stringify(query) }, function (res) {
if (res.code == 200) {
refreshGirdData2();
modifyDate = null;
//隐藏“提交成绩”按钮
$('#lr_save').hide();
//显示“开始录入”按钮
$('#lr_input').show();
//隐藏“倒计时”
$('.timeBox').hide();
//停止倒计时
clearInterval(timer);
//停止五分钟提交成绩
clearInterval(submitScoreTimer);
} else {
learun.alert.warning("提交成绩:取消占用失败!");
return false;
}
});
} else {
learun.alert.warning("提交成绩失败!");
return false;
}
});

} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
});
// 审核
$('#lr_check').on('click', function () {
var query = judgeSelect();
if (query) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark == 1) {
learun.alert.warning("学生成绩已审核!");
return false;
}
learun.layerConfirm('是否确认审核当前班级的学生成绩!', function (res) {
if (res) {
//审核成绩
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 1 }, function (res) {
if (res.code == 200) {
refreshGirdData2();
} else {
learun.alert.warning("审核成绩失败!");
return false;
}
});
}
});
} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
});
// 去审核
$('#lr_uncheck').on('click', function () {
var query = judgeSelect();
if (query) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) {
if (data != null) {
if (data.CheckMark != 1) {
learun.alert.warning("学生成绩未审核!");
return false;
}
learun.layerConfirm('是否确认去审核当前班级的学生成绩!', function (res) {
if (res) {
//去审核成绩
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/DoCheckScore', { queryJson: JSON.stringify(query), checkMark: 0 }, function (res) {
if (res.code == 200) {
refreshGirdData2();
} else {
learun.alert.warning("去审核成绩失败!");
return false;
}
});
}
});
} else {
learun.alert.warning("学生成绩不存在!");
return false;
}
});
}
});
//续时
$('#addMinutesBtn').on('click', function () {
var query = judgeSelect();
if (query) {
clearInterval(timer);
var addMinutes = $('#addMinutesBtn').attr('data-minutes');
var newMinutes = addMinutes;
var minutes = $('#minutes').html();
if (minutes > 0) {
newMinutes = Number(newMinutes) + Number(minutes);
}
$('#minutes').html(newMinutes);
page.countDown();
//修改服务时间
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { });
}
});
},
bindSelect: function () {
//校区
$('#F_SchoolId').lrDataSourceSelect({
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { }
});
$('#F_SchoolId').lrselectSet(learun.clientdata.get(['userinfo']).companyId);
//学年
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetAcademicYearNoData',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$("#LessonNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonNoDataWithNo?AcademicYearShort=' + item.value + '&Semester=' + $('#Semester').lrselectGet(),
});
}
}
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$("#LessonNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonNoDataWithNo?AcademicYearShort=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + item.value,
});
}
}
});
//课程
$('#LessonNo').lrselect({
placeholder: "请选择课程",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonNoDataWithNo',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$("#ClassRoomNo").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveClassRoomNoData?lessonNo=' + item.value,
});
}
}
});
//教室
$('#ClassRoomNo').lrselect({
placeholder: "请选择教室",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveClassRoomNoData',
value: 'value',
text: 'text',
select: function (item) {
if (!!item) {
$("#LessonSection").lrselectRefresh({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonSectionData?classRoomNo=' + item.value,
});
}
}
});
//节次
$('#LessonSection').lrselect({
placeholder: "请选择节次",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetElectiveLessonSectionData',
value: 'value',
text: 'text'
});
//绑定学年、学期
$.get('/Home/GetYearAndSemesteResult', function (ref) {
if (ref.code == "200") {
$('#AcademicYearNo').lrselectSet(ref.data.Item1);
$('#Semester').lrselectSet(ref.data.Item3);
}
}.bind(this), "json");
},
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetList',
headData: headDataFinally,
mainId: 'ScoreId',
isPage: false,
sidx: 'StuNo',
sord: 'asc'
});
//page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
},
countDown: function () {
var minutes = $('#minutes').html();
var minutesTemp = minutes;
var seconds = $('#seconds').attr('data-seconds');
$('#seconds').html(seconds);
var secondsTemp = seconds;
timer = setInterval(function () {
secondsTemp--;
$('#seconds').html(secondsTemp);
if (secondsTemp == 0) {
secondsTemp = seconds;
minutesTemp--;
$('#minutes').html(minutesTemp);
if (minutesTemp == 0) {
//停止倒计时
clearInterval(timer);
//自动提交成绩
$('#lr_save').trigger("click");
}
}
}, 1000);
},
submitScore: function () {
submitScoreTimer = setInterval(function () {
var rowdatas = $('#gridtable').jfGridGet('rowdatas');
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/SaveInputScore', { data: JSON.stringify(rowdatas) }, function (res) {
});
}, 300000);
},
};
refreshGirdData = function () {
page.search();
};
refreshGirdData2 = function () {
var query = judgeSelect();
if (query) {
//显示不可编辑列头
headDataFinally = headData.concat(headDataNoEdit);
$("#gridtable")[0].dfop = undefined;
page.initGird();

page.search(query);
}
};
judgeSelect = function () {
if (CanInputFlag != "True") {
top.learun.layerConfirm('当前时间不是选修重考成绩录入时间!', function (res) { });
return false;
}

var $content = $('body').find('.lr-layout-tool-left');
var query = $content.lrGetFormData();
if (query.F_SchoolId == null || query.F_SchoolId == "") {
learun.alert.warning("请选择校区!");
return false;
}
if (query.AcademicYearNo == null || query.AcademicYearNo == "") {
learun.alert.warning("请选择学年!");
return false;
}
if (query.Semester == null || query.Semester == "") {
learun.alert.warning("请选择学期!");
return false;
}
if (query.LessonNo == null || query.LessonNo == "") {
learun.alert.warning("请选择课程!");
return false;
}
if (query.ClassRoomNo == null || query.ClassRoomNo == "") {
learun.alert.warning("请选择教室!");
return false;
}
if (query.LessonSection == null || query.LessonSection == "") {
learun.alert.warning("请选择节次!");
return false;
}
return query;
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Переглянути файл

@@ -1004,6 +1004,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfTwo.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\SoonGraduateIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwoOfElective.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElectiveInTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElective.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\IndexUnpassOfElective.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElectiveInTeacher.js" />
@@ -8146,6 +8147,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\InputScoreIndexOfElectiveInTeacher.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwoOfElective.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElective.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElectiveInTeacher.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


Завантаження…
Відмінити
Зберегти