Ver código fonte

【修改】学子在线-我的课表:10周课表,增加请假申请;

新疆警官学校中职
dyy 2 anos atrás
pai
commit
60cb17c4aa
3 arquivos alterados com 61 adições e 3 exclusões
  1. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
  2. +51
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js
  3. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.js

+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs Ver arquivo

@@ -34,6 +34,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
private SchoolCalendarIBLL schoolCalendarIbll = new SchoolCalendarBLL();
private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL();
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL();
private StuAttendanceLeaveIBLL stuAttendanceLeaveIBLL = new StuAttendanceLeaveBLL();


#region 视图功能

@@ -362,6 +364,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return JsonResult(noDataResult);
}
//学生课表请假记录
var leaveList = stuAttendanceLeaveIBLL.GetList();
var formatData = from d in timeTables.AsEnumerable()
let tt = d.LessonTime.Split('-')[1]
group d by tt into g
@@ -389,7 +393,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
classRoomNo = string.IsNullOrEmpty(e.ClassRoomNo) ? "" : e.ClassRoomNo.Trim(),
lessonSortNo = e.LessonSortNo,
e?.OLPEId,
className = string.IsNullOrEmpty(e.ClassName) ? "" : e.ClassName
className = string.IsNullOrEmpty(e.ClassName) ? "" : e.ClassName,
leaveType = leaveList.Any(c => c.LessonNo == e?.LessonNo && c.StuNo == userInfo.account && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime) ? 1 : 0,
checkType = leaveList.FirstOrDefault(c => c.LessonNo == e?.LessonNo && c.StuNo == userInfo.account && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime)?.IsCheck,

}
}
;


+ 51
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js Ver arquivo

@@ -34,6 +34,32 @@ var bootstrap = function ($, learun) {
$('.personT').text(data.schoolName);
$('.perSemester').text(data.semester);
$('.perFestivalsBox table').html(html);
$(".leave").on('click', function () {
var $this = $(this);
var lessonNo = $this.attr("lessonno");
var lessonTime = $this.attr("lessonTime");
var lessonDate = $this.attr("lessonDate");
//var lessonName = $this.attr("lessonName");
var academicyear = $this.attr("academicyear");
var semester = $this.attr("semester");
var empNo = $this.attr("empNo");
var classRoomNo = $this.attr("classRoomNo");
var lessonSortNo = $this.attr("lessonSortNo");
var teachClassNo = $this.attr("teachClassNo");

learun.layerForm({
id: 'form',
title: '请假申请',
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/Leave?lessonNo=' + lessonNo + '&lessonTime=' + lessonTime + '&lessonDate=' + lessonDate + '&empNo=' + empNo + '&academicyear=' + academicyear + '&semester=' + semester + '&classRoomNo=' + classRoomNo + '&lessonSortNo=' + lessonSortNo + '&teachClassNo=' + teachClassNo,
width: 600,
height: 600,
callBack: function (id) {
return top[id].acceptClick(change($this));
}.bind(this)
});

});

function flogs(num, data, obj) {
var flog = false;
@@ -86,8 +112,28 @@ var bootstrap = function ($, learun) {
item.teacher +
'</div>' +
'<div>' +
item.className +
'</div>' +
'<div>' +
item.classRoom +
'</div>';

var loginInfo = learun.clientdata.get(['userinfo']);
if (loginInfo.Description == "学生") {
if (item.leaveType == 1) {
if (item.checkType == 1) {
html += '<div><span>请假通过</span></div>';
} else if (item.checkType == 2) {
html += '<div><span>请假未通过</span></div>';
} else {
html += '<div><span>请假申请中</span></div>';
}

} else {
html += '<div><span class="leave" lessonNo="' + item.lessonNo + '" lessonTime="' + item.lessonTime + '" lessonDate="' + item.lessonDate + '" lessonName="' + item.curriculum + '" empNo="' + item.empno + '" academicyear="' + item.academicyear + '" semester="' + item.semester + '" lessonSortNo="' + item.lessonSortNo + '" classRoomNo="' + item.classRoomNo + '" teachClassNo="' + item.teachClassNo + '">请假</span></div>';
}
}

//html += '<div>课程:' +
// item.curriculum +
// '</div>' +
@@ -104,7 +150,7 @@ var bootstrap = function ($, learun) {
html += '</td>';

} else {
html += '<td class="active" id="" num="' + k + '"><div></div><div></div><div></div><div></div></td>';
html += '<td class="active" id="" num="' + k + '"><div></div><div></div><div></div><div></div><div></div></td>';
}

})(k);
@@ -196,7 +242,6 @@ var bootstrap = function ($, learun) {
//当前第几周
param.curWeek = curWeek;
//班级
console.log("ClassNo:", classNo)
param.classNo = ClassNo;//'202010';//
page.loadData(param);

@@ -215,4 +260,8 @@ var bootstrap = function ($, learun) {
page.search();
};
page.init();
change = function (obj) {
obj.off("click");

};
};

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.js Ver arquivo

@@ -8,6 +8,7 @@ var acceptClick;
var lessonNo = request('lessonNo');
var lessonTime = request('lessonTime');
var lessonDate = request('lessonDate');
//var lessonName = request('lessonName');
var empNo = request('empNo');
var academicyear = request('academicyear');
var semester = request('semester');
@@ -114,6 +115,7 @@ var bootstrap = function ($, learun) {
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};

$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/TimeTable/SaveForm?keyValue=', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {


Carregando…
Cancelar
Salvar