Преглед на файлове

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

新疆警官学校中职
dyy преди 2 години
родител
ревизия
60cb17c4aa
променени са 3 файла, в които са добавени 61 реда и са изтрити 3 реда
  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 Целия файл

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



#region 视图功能 #region 视图功能


@@ -362,6 +364,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{ {
return JsonResult(noDataResult); return JsonResult(noDataResult);
} }
//学生课表请假记录
var leaveList = stuAttendanceLeaveIBLL.GetList();
var formatData = from d in timeTables.AsEnumerable() var formatData = from d in timeTables.AsEnumerable()
let tt = d.LessonTime.Split('-')[1] let tt = d.LessonTime.Split('-')[1]
group d by tt into g 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(), classRoomNo = string.IsNullOrEmpty(e.ClassRoomNo) ? "" : e.ClassRoomNo.Trim(),
lessonSortNo = e.LessonSortNo, lessonSortNo = e.LessonSortNo,
e?.OLPEId, 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 Целия файл

@@ -34,6 +34,32 @@ var bootstrap = function ($, learun) {
$('.personT').text(data.schoolName); $('.personT').text(data.schoolName);
$('.perSemester').text(data.semester); $('.perSemester').text(data.semester);
$('.perFestivalsBox table').html(html); $('.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) { function flogs(num, data, obj) {
var flog = false; var flog = false;
@@ -86,8 +112,28 @@ var bootstrap = function ($, learun) {
item.teacher + item.teacher +
'</div>' + '</div>' +
'<div>' + '<div>' +
item.className +
'</div>' +
'<div>' +
item.classRoom + item.classRoom +
'</div>'; '</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>课程:' + //html += '<div>课程:' +
// item.curriculum + // item.curriculum +
// '</div>' + // '</div>' +
@@ -104,7 +150,7 @@ var bootstrap = function ($, learun) {
html += '</td>'; html += '</td>';


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


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

};
}; };

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.js Целия файл

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

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


Зареждане…
Отказ
Запис