@@ -135,6 +135,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
StuAttendanceLeaveEntity entity = strEntity.ToObject<StuAttendanceLeaveEntity>(); | StuAttendanceLeaveEntity entity = strEntity.ToObject<StuAttendanceLeaveEntity>(); | ||||
entity.TeachClassNo = entity.ClassNo; | |||||
stuAttendanceLeaveIBLL.SaveEntity(keyValue, entity); | stuAttendanceLeaveIBLL.SaveEntity(keyValue, entity); | ||||
entity = stuAttendanceLeaveIBLL.GetStuAttendanceLeaveEntity(entity.ID); | entity = stuAttendanceLeaveIBLL.GetStuAttendanceLeaveEntity(entity.ID); | ||||
@@ -143,39 +144,53 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
if (entity.IsCheck == "1") | if (entity.IsCheck == "1") | ||||
{ | { | ||||
var gender = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(entity.StuNo)?.GenderNo; | |||||
StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); | |||||
stuAttendanceEntity.AcademicYearNo = entity.AcademicYearNo; | |||||
stuAttendanceEntity.ClassName = entity.ClassName; | |||||
stuAttendanceEntity.ClassNo = entity.ClassNo; | |||||
stuAttendanceEntity.DeptName = entity.DeptName; | |||||
stuAttendanceEntity.DeptNo = entity.DeptNo; | |||||
stuAttendanceEntity.EmpNo = entity.EmpNo; | |||||
stuAttendanceEntity.Grade = entity.Grade; | |||||
stuAttendanceEntity.InertDate = DateTime.Now; | |||||
stuAttendanceEntity.LessonDate = entity.LessonDate; | |||||
stuAttendanceEntity.LessonName = entity.LessonName; | |||||
stuAttendanceEntity.LessonNo = entity.LessonNo; | |||||
stuAttendanceEntity.LessonSortName = entity.LessonSortName; | |||||
stuAttendanceEntity.LessonSortNo = entity.LessonSortNo; | |||||
stuAttendanceEntity.LessonTime = entity.LessonTime; | |||||
stuAttendanceEntity.MajorName = entity.MajorName; | |||||
stuAttendanceEntity.MajorNo = entity.MajorNo; | |||||
stuAttendanceEntity.PlanWeek = null; | |||||
stuAttendanceEntity.Semester = entity.Semester; | |||||
stuAttendanceEntity.StuName = entity.StuName; | |||||
stuAttendanceEntity.StuNo = entity.StuNo; | |||||
stuAttendanceEntity.TeachClassNo = entity.TeachClassNo; | |||||
stuAttendanceEntity.Sort = "请假"; | |||||
stuAttendanceEntity.AttendOrNo = "否"; | |||||
stuAttendanceEntity.ClassRoomName = entity.ClassRoomName; | |||||
stuAttendanceEntity.ClassRoomNo = entity.ClassRoomNo; | |||||
stuAttendanceEntity.Gender = Convert.ToBoolean(gender) ? "男" : "女"; | |||||
stuAttendanceEntity.AcademicYearNo = entity.AcademicYearNo; | |||||
stuAttendanceEntity.CheckMarkDept = ""; | |||||
stuAttendanceEntity.CheckMark = ""; | |||||
//查找是否存在同一门课的考勤信息:存在则修改,不存在则新增; | |||||
var model = stuAttendanceIBLL.GetStuAttendanceEntityByQuery(entity); | |||||
if (model != null) | |||||
{ | |||||
model.AttendOrNo = "否"; | |||||
model.Sort = "请假"; | |||||
model.Remark = "属于PC端的学生课表请假审核"; | |||||
model.InertDate = DateTime.Now; | |||||
stuAttendanceIBLL.SaveEntity(model.ID, model); | |||||
} | |||||
else | |||||
{ | |||||
var gender = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(entity.StuNo)?.GenderNo; | |||||
StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); | |||||
stuAttendanceEntity.AcademicYearNo = entity.AcademicYearNo; | |||||
stuAttendanceEntity.Semester = entity.Semester; | |||||
stuAttendanceEntity.StuNo = entity.StuNo; | |||||
stuAttendanceEntity.StuName = entity.StuName; | |||||
stuAttendanceEntity.Gender = Convert.ToBoolean(gender) ? "男" : "女"; | |||||
stuAttendanceEntity.Grade = entity.Grade; | |||||
stuAttendanceEntity.DeptNo = entity.DeptNo; | |||||
stuAttendanceEntity.DeptName = entity.DeptName; | |||||
stuAttendanceEntity.MajorNo = entity.MajorNo; | |||||
stuAttendanceEntity.MajorName = entity.MajorName; | |||||
stuAttendanceEntity.ClassNo = entity.ClassNo; | |||||
stuAttendanceEntity.ClassName = entity.ClassName; | |||||
stuAttendanceEntity.LessonNo = entity.LessonNo; | |||||
stuAttendanceEntity.LessonName = entity.LessonName; | |||||
stuAttendanceEntity.TeachClassNo = entity.TeachClassNo; | |||||
stuAttendanceEntity.LessonSortNo = entity.LessonSortNo; | |||||
stuAttendanceEntity.LessonSortName = entity.LessonSortName; | |||||
stuAttendanceEntity.LessonDate = entity.LessonDate; | |||||
stuAttendanceEntity.PlanWeek = null; | |||||
stuAttendanceEntity.LessonTime = entity.LessonTime; | |||||
stuAttendanceEntity.AttendOrNo = "否"; | |||||
stuAttendanceEntity.Sort = "请假"; | |||||
stuAttendanceEntity.EmpNo = entity.EmpNo; | |||||
stuAttendanceEntity.Remark = "属于PC端的学生课表请假审核"; | |||||
stuAttendanceEntity.CheckMarkDept = "0"; | |||||
stuAttendanceEntity.CheckMark = "0"; | |||||
stuAttendanceEntity.InertDate = DateTime.Now; | |||||
stuAttendanceEntity.ClassRoomNo = entity.ClassRoomNo; | |||||
stuAttendanceEntity.ClassRoomName = entity.ClassRoomName; | |||||
stuAttendanceIBLL.SaveEntity("", stuAttendanceEntity); | |||||
stuAttendanceIBLL.SaveEntity("", stuAttendanceEntity); | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -39,6 +39,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexCenter() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 银行 | /// 银行 | ||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
@@ -30,6 +30,8 @@ var bootstrap = function ($, learun) { | |||||
$('#Files').attr('isvalid', 'yes'); | $('#Files').attr('isvalid', 'yes'); | ||||
$('#Files').attr('checkexpession', 'NotNull'); | $('#Files').attr('checkexpession', 'NotNull'); | ||||
$('#Files').prev().html('附件<font face="宋体">*</font>'); | $('#Files').prev().html('附件<font face="宋体">*</font>'); | ||||
//学号下拉框取消只显示‘登录用户所带班级的限制’; | |||||
strWhere = ""; | |||||
} else { | } else { | ||||
$('#Files').removeAttr('isvalid'); | $('#Files').removeAttr('isvalid'); | ||||
$('#Files').removeAttr('checkexpession'); | $('#Files').removeAttr('checkexpession'); | ||||
@@ -11,13 +11,13 @@ | |||||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | <div class="lr-form-item-title">学号<font face="宋体">*</font></div> | ||||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic" id="CodeId"> | |||||
<div class="lr-form-item-title">学籍号</div> | <div class="lr-form-item-title">学籍号</div> | ||||
<input id="StuCode" type="text" class="form-control" /> | <input id="StuCode" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">考生号<font face="宋体">*</font></div> | |||||
<input id="ksh" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic" id="KshId"> | |||||
<div class="lr-form-item-title">考生号</div> | |||||
<input id="ksh" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">通知书号<font face="宋体">*</font></div> | <div class="lr-form-item-title">通知书号<font face="宋体">*</font></div> | ||||
@@ -7,6 +7,7 @@ | |||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var isStudent = request('isStudent'); | var isStudent = request('isStudent'); | ||||
var Crowning = request('Crowning'); | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
@@ -53,6 +54,21 @@ var bootstrap = function ($, learun) { | |||||
$("#InSchoolTelephone").parent().hide(); | $("#InSchoolTelephone").parent().hide(); | ||||
$("#JoinLeagueDate").parent().hide(); | $("#JoinLeagueDate").parent().hide(); | ||||
} | } | ||||
if (Crowning == "0") { | |||||
$('#KshId').show(); | |||||
$('#ksh').attr('isvalid', 'yes'); | |||||
$('#ksh').attr('checkexpession', 'NotNull'); | |||||
$('#CodeId').hide(); | |||||
$('#StuCode').removeAttr('isvalid'); | |||||
$('#StuCode').removeAttr('NotNull'); | |||||
} else { | |||||
$('#CodeId').show(); | |||||
$('#StuCode').attr('isvalid', 'yes'); | |||||
$('#StuCode').attr('checkexpession', 'NotNull'); | |||||
$('#KshId').hide(); | |||||
$('#ksh').removeAttr('isvalid'); | |||||
$('#ksh').removeAttr('NotNull'); | |||||
} | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); | $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); | ||||
@@ -199,8 +215,10 @@ var bootstrap = function ($, learun) { | |||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
return false; | return false; | ||||
} | } | ||||
var data = $('body').lrGetFormData(); | |||||
data["Crowning"] = Crowning; | |||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
strEntity: JSON.stringify(data) | |||||
}; | }; | ||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SaveForm?keyValue=' + keyValue, postData, function (res) { | $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SaveForm?keyValue=' + keyValue, postData, function (res) { | ||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
@@ -29,7 +29,7 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?Crowning=' + 0, | |||||
width: 800, | width: 800, | ||||
height: 600, | height: 600, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
@@ -53,7 +53,7 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?keyValue=' + keyValue, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?keyValue=' + keyValue + '&Crowning=' + 0, | |||||
width: 800, | width: 800, | ||||
height: 600, | height: 600, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
@@ -236,7 +236,7 @@ var bootstrap = function ($, learun) { | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | { label: "学号", name: "StuNo", width: 100, align: "left" }, | ||||
{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, | |||||
//{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, | |||||
{ label: "考生号", name: "ksh", width: 100, align: "left" }, | { label: "考生号", name: "ksh", width: 100, align: "left" }, | ||||
{ label: "通知书号", name: "NoticeNo", width: 100, align: "left" }, | { label: "通知书号", name: "NoticeNo", width: 100, align: "left" }, | ||||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | { label: "姓名", name: "StuName", width: 100, align: "left" }, | ||||
@@ -543,6 +543,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.Crowning = 0; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -0,0 +1,272 @@ | |||||
@{ | |||||
ViewBag.Title = "学生学籍"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<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="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学号</div> | |||||
<input id="StuNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="StuName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">系部</div> | |||||
<div id="DeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</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_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
<a id="check" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||||
<a id="uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 去审</a> | |||||
<a id="checkall" class="btn btn-default"><i class="fa fa-print"></i> 审核全部</a> | |||||
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | |||||
<i class="fa fa-reorder"></i> <span class="lrlt">更多</span><span class="caret"></span> | |||||
</a> | |||||
<ul class="dropdown-menu pull-right"> | |||||
<li id="lr_generate"><a><i class="fa fa-linode"></i> 生成帐号</a></li> | |||||
<li id="lr_update"><a><i class="fa fa-braille"></i> 更新帐号</a></li> | |||||
<li id="lr_synPhoto"><a><i class="fa fa-braille"></i> 同步照片</a></li> | |||||
<li id="lr_searchChange"><a><i class="fa fa-search"></i> 查看异动</a></li> | |||||
<li id="lr_photo"><a><i class="fa fa-search"></i> 拍照</a></li> | |||||
<li id="lr_printInfo"><a><i class="fa fa-print"></i> 学生简历表</a></li> | |||||
<li id="lr_syn"><a><i class="fa fa-plus"></i> 同步系部</a></li> | |||||
<li id="lr_synmajor"><a><i class="fa fa-plus"></i> 同步专业</a></li> | |||||
</ul> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
<div style="display: none" class="tailoring-container"> | |||||
<div class="black-cloth" onclick="closeTailor(this)"></div> | |||||
<div class="tailoring-content"> | |||||
<div class="tailoring-content-one"> | |||||
<label title="上传图片" for="chooseImg" class="l2-btn choose-btn"> | |||||
<input type="file" accept="image/jpg,image/jpeg,image/png" name="file" id="chooseImg" class="hidden" onchange="selectImg(this)"> | |||||
本地上传 | |||||
</label> | |||||
<label title="拍照" class="l2-btn choose-btn" id='capture' style="margin-left: 2%;">拍照</label> | |||||
<label title="重拍" class="l2-btn choose-btn" id='takeAgain' style="margin-left: 2%;">重拍</label> | |||||
<div class="close-tailoring" onclick="closeTailor(this)">×</div> | |||||
</div> | |||||
<div class="tailoring-content-two"> | |||||
<div class="tailoring-box-parcel"> | |||||
<video id="video" width="100%" height="100%" style="float: left;"></video> | |||||
<canvas id="canvas" width="482px" height="448px" style="float: left;" hidden="hidden"></canvas> | |||||
<div id="showImg" hidden="hidden" style="width: 100%;height:100%;"> | |||||
<img id="tailoringImg"> | |||||
</div> | |||||
</div> | |||||
<div class="preview-box-parcel"> | |||||
<p>图片预览:</p> | |||||
<div class="square previewImg"></div> | |||||
<div class="circular previewImg"></div> | |||||
</div> | |||||
</div> | |||||
<div class="tailoring-content-three"> | |||||
<button class="l2-btn cropper-reset-btn">复位</button> | |||||
<button class="l2-btn cropper-rotate-btn">旋转</button> | |||||
<button class="l2-btn cropper-scaleX-btn">换向</button> | |||||
<button class="l2-btn sureCut" id="sureCut">确定</button> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic/IndexCenter.js", "/Content/camera/cropper.min.js", | |||||
"/Areas/EducationalAdministration/Views/StuEnroll/LodopFuncs.js") | |||||
@Html.AppendCssFile("/Content/camera/cropper.min.css", "/Content/camera/ImgCropping.css") | |||||
<script> | |||||
//弹出框水平垂直居中 | |||||
(window.onresize = function () { | |||||
var win_height = $(window).height(); | |||||
var win_width = $(window).width(); | |||||
if (win_width <= 768) { | |||||
$(".tailoring-content").css({ | |||||
"top": (win_height - $(".tailoring-content").outerHeight()) / 2, | |||||
"left": 0 | |||||
}); | |||||
} else { | |||||
$(".tailoring-content").css({ | |||||
"top": (win_height - $(".tailoring-content").outerHeight()) / 2, | |||||
"left": (win_width - $(".tailoring-content").outerWidth()) / 2 | |||||
}); | |||||
} | |||||
})(); | |||||
//图像上传 | |||||
function selectImg(file) { | |||||
if (!file.files || !file.files[0]) { | |||||
return; | |||||
} | |||||
var reader = new FileReader(); | |||||
reader.onload = function (evt) { | |||||
var replaceSrc = evt.target.result; | |||||
//更换cropper的图片 | |||||
$('#tailoringImg').cropper('replace', replaceSrc, false);//默认false,适应高度,不失真 | |||||
} | |||||
reader.readAsDataURL(file.files[0]); | |||||
mediaStreamTrack && mediaStreamTrack.stop(); | |||||
$("#video").hide(); | |||||
$("#showImg").show(); | |||||
} | |||||
//cropper图片裁剪 | |||||
$('#tailoringImg').cropper({ | |||||
aspectRatio: 5 / 7,//默认比例 | |||||
preview: '.previewImg',//预览视图 | |||||
guides: false, //裁剪框的虚线(九宫格) | |||||
autoCropArea: 0.5, //0-1之间的数值,定义自动剪裁区域的大小,默认0.8 | |||||
movable: false, //是否允许移动图片 | |||||
dragCrop: true, //是否允许移除当前的剪裁框,并通过拖动来新建一个剪裁框区域 | |||||
movable: true, //是否允许移动剪裁框 | |||||
resizable: true, //是否允许改变裁剪框的大小 | |||||
zoomable: false, //是否允许缩放图片大小 | |||||
mouseWheelZoom: false, //是否允许通过鼠标滚轮来缩放图片 | |||||
touchDragZoom: true, //是否允许通过触摸移动来缩放图片 | |||||
rotatable: true, //是否允许旋转图片 | |||||
crop: function (e) { | |||||
// 输出结果数据裁剪图像。 | |||||
} | |||||
}); | |||||
//旋转 | |||||
$(".cropper-rotate-btn").on("click", function () { | |||||
$('#tailoringImg').cropper("rotate", 45); | |||||
}); | |||||
//复位 | |||||
$(".cropper-reset-btn").on("click", function () { | |||||
$('#tailoringImg').cropper("reset"); | |||||
}); | |||||
//换向 | |||||
var flagX = true; | |||||
$(".cropper-scaleX-btn").on("click", function () { | |||||
if (flagX) { | |||||
$('#tailoringImg').cropper("scaleX", -1); | |||||
flagX = false; | |||||
} else { | |||||
$('#tailoringImg').cropper("scaleX", 1); | |||||
flagX = true; | |||||
} | |||||
flagX != flagX; | |||||
}); | |||||
//裁剪后的处理 | |||||
$("#sureCut").on("click", function () { | |||||
var cas = $('#tailoringImg').cropper('getCroppedCanvas');//获取被裁剪后的canvas | |||||
var base64url = cas.toDataURL('image/png'); //转换为base64地址形式 | |||||
base64url = base64url.replace("\r", ""); | |||||
top.learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsPhoto', { stuId: StuId, base64url: base64url }, | |||||
function (res) { | |||||
//关闭裁剪框 | |||||
StuId = ""; | |||||
closeTailor(); | |||||
refreshGirdData(); | |||||
}); | |||||
}); | |||||
//关闭裁剪框 | |||||
function closeTailor() { | |||||
StuId = ""; | |||||
$(".tailoring-container").toggle(); | |||||
mediaStreamTrack && mediaStreamTrack.stop(); | |||||
} | |||||
let video = document.getElementById('video'); | |||||
let canvas = document.getElementById('canvas'); | |||||
let context = canvas.getContext('2d'); | |||||
var mediaStreamTrack; | |||||
document.getElementById('capture').addEventListener('click', | |||||
function () { | |||||
context.drawImage(video, 0, 0, 518, 420); | |||||
mediaStreamTrack && mediaStreamTrack.stop(); | |||||
$('#tailoringImg').cropper('replace', canvas.toDataURL("image/png"), false); //默认false,适应高度,不失真 | |||||
$("#video").hide(); //隐藏拍照框 | |||||
$("#showImg").show(); //将拍照结果显示 | |||||
}); | |||||
//请求拍照 | |||||
$("#takeAgain").bind("click", function () { | |||||
takePhoto(); | |||||
}); | |||||
//开始拍照 | |||||
function takeImg() { | |||||
$(".tailoring-container").toggle(); | |||||
takePhoto(); | |||||
} | |||||
//请求摄像头 | |||||
function takePhoto() { | |||||
// 老的浏览器可能根本没有实现 mediaDevices,所以我们可以先设置一个空的对象 | |||||
if (navigator.mediaDevices === undefined) { | |||||
navigator.mediaDevices = {}; | |||||
} | |||||
if (navigator.mediaDevices.getUserMedia === undefined) { | |||||
navigator.mediaDevices.getUserMedia = function (constraints) { | |||||
// 首先,如果有getUserMedia的话,就获得它 | |||||
var getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; | |||||
// 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口 | |||||
if (!getUserMedia) { | |||||
return Promise.reject(new Error('不支持此浏览器,请更换Chrome或360浏览器')); | |||||
} | |||||
// 否则,为老的navigator.getUserMedia方法包裹一个Promise | |||||
return new Promise(function (resolve, reject) { | |||||
getUserMedia.call(navigator, constraints, resolve, reject); | |||||
}); | |||||
} | |||||
} | |||||
const constraints = { | |||||
video: true, | |||||
audio: false | |||||
}; | |||||
let videoPlaying = false; | |||||
let promise = navigator.mediaDevices.getUserMedia(constraints); | |||||
promise.then(stream => { | |||||
// 旧的浏览器可能没有srcObject | |||||
if ("srcObject" in video) { | |||||
video.srcObject = stream; | |||||
mediaStreamTrack = stream.getTracks()[0]; | |||||
} else { | |||||
// 防止再新的浏览器里使用它,应为它已经不再支持了 | |||||
video.src = window.URL.createObjectURL(stream); | |||||
} | |||||
video.onloadedmetadata = function (e) { | |||||
video.play(); | |||||
videoPlaying = true; | |||||
}; | |||||
}).catch(err => { | |||||
console.error(err.name + ": " + err.message); | |||||
}); | |||||
$("#showImg").hide();//隐藏拍照结果显示框 | |||||
//$('#showImg').html('<img id="tailoringImg" hidden="hidden">') | |||||
$("#video").show();//开启拍照框 | |||||
} | |||||
</script> |
@@ -0,0 +1,554 @@ | |||||
var refreshGirdData; | |||||
var StuId; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$("#lr_photo").on('click', function () { | |||||
StuId = $("#gridtable").jfGridValue('StuId'); | |||||
if (learun.checkrow(StuId)) { | |||||
takeImg(); | |||||
} | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?Crowning=' + 1, | |||||
width: 800, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||||
return; | |||||
} | |||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||||
if (CheckMark === "1") { | |||||
learun.alert.warning("当前项目已审核不能编辑!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?keyValue=' + keyValue + '&Crowning=' + 1, | |||||
width: 800, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||||
if (CheckMark.indexOf('1') != -1) { | |||||
learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行查看!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/FormView?keyValue=' + keyValue, | |||||
width: 1162, | |||||
height: 600, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
//审核 | |||||
$('#check').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||||
if (CheckMark.indexOf('1') != -1) { | |||||
learun.alert.warning("选中记录中包含已审核项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认审核该项?', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Check', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//去审 | |||||
$('#uncheck').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||||
var CheckMarkArr = CheckMark.split(','); | |||||
if ($.inArray('0', CheckMarkArr) != -1 || $.inArray('', CheckMarkArr) != -1) { | |||||
learun.alert.warning("选中记录中包含未审核项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认取消审核该项?', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/UnCheck', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//审核全部 | |||||
$('#checkall').on('click', function () { | |||||
learun.layerConfirm('是否确认全部审核?', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CheckAll', {}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
}); | |||||
//生成帐号 | |||||
$('#lr_generate').on('click', function () { | |||||
learun.layerConfirm('是否确认生成帐号?', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Generate', {}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
}); | |||||
$('#lr_update').on('click', function () { | |||||
learun.layerConfirm('是否确认更新帐号?', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/UpdateAccount', {}, function () { | |||||
refreshGirdData(); | |||||
}) | |||||
} | |||||
}) | |||||
}) | |||||
//查看异动 | |||||
$("#lr_searchChange").on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '异动记录', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/Index?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 600, | |||||
btn: null | |||||
}); | |||||
} | |||||
}) | |||||
//同步照片 | |||||
$('#lr_synPhoto').on('click', function () { | |||||
learun.loading(true, '正在同步,请稍后') | |||||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SynPhoto', {}, function (res) { | |||||
learun.loading(false) | |||||
}) | |||||
}) | |||||
//打印简历表 | |||||
$('#lr_printInfo').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行查看!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'print', | |||||
title: '学生简历表', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Print?keyValue=' + keyValue, | |||||
width: 1100, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 同步系部 | |||||
$('#lr_syn').on('click', function () { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncDept', function () { | |||||
refreshGirdData(); | |||||
}); | |||||
}); | |||||
// 同步专业 | |||||
$('#lr_synmajor').on('click', function () { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncMajor', function () { | |||||
refreshGirdData(); | |||||
}); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', | |||||
headData: [ | |||||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, | |||||
//{ label: "考生号", name: "ksh", width: 100, align: "left" }, | |||||
{ label: "通知书号", name: "NoticeNo", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ | |||||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "男" : "女"; | |||||
} | |||||
}, | |||||
{ label: "出生日期", name: "Birthday", width: 100, align: "left" }, | |||||
{ label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" }, | |||||
{ | |||||
label: "民族", name: "NationalityNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'National', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'BCdPartyFace', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
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: 100, 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: "ClassNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "年级", name: "Grade", width: 100, align: "left" }, | |||||
{ | |||||
label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'EduSystem', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "学习形式", name: "StudyModality", width: 100, 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: "RegisterDate", width: 100, align: "left" }, | |||||
{ label: "入学年月", name: "EntranceDate", width: 100, align: "left" }, | |||||
//{ label: "余额", name: "Balance", width: 100, align: "left" }, | |||||
{ label: "通讯地址", name: "MailAddress", width: 100, align: "left" }, | |||||
{ label: "联系电话", name: "mobile", width: 100, align: "left" }, | |||||
{ label: "户口所在地", name: "FatherUnit", width: 100, align: "left" }, | |||||
{ label: "档案所在地", name: "MatherUnit", width: 100, align: "left" }, | |||||
{ label: "户籍所在地", name: "Domicile", width: 100, align: "left" }, | |||||
{ | |||||
label: "户口分类", name: "ResidenceNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'ResidenceNo', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "籍贯 (省)", name: "F_ProvinceId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE', | |||||
key: value, | |||||
keyId: 'pcode', | |||||
callback: function (_data) { | |||||
callback(_data['pname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "籍贯 (市)", name: "F_CityId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY', | |||||
key: value, | |||||
keyId: 'ccode', | |||||
callback: function (_data) { | |||||
callback(_data['cname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "籍贯 (县)", name: "F_CountyId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA', | |||||
key: value, | |||||
keyId: 'acode', | |||||
callback: function (_data) { | |||||
callback(_data['aname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
//{ label: "E-mail", name: "E-mail", width: 100, align: "center" }, | |||||
{ | |||||
label: "开户银行", name: "DepositBank", width: 100, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'DepositBank', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "开户卡账号", name: "BankCard", width: 100, align: "center" }, | |||||
{ label: "开户银行位置", name: "BankLocation", width: 100, align: "center" }, | |||||
{ label: "邮政编码", name: "PostalCode", width: 100, align: "center" }, | |||||
{ | |||||
label: "是否单亲", name: "IsSingle", width: 100, align: "left", | |||||
formatter: function (value, row) { | |||||
if (value == true) { | |||||
return '是'; | |||||
} | |||||
else if (value == false) { | |||||
return '否'; | |||||
} | |||||
} | |||||
}, | |||||
{ label: "父亲姓名", name: "FatherName", width: 100, align: "center" }, | |||||
{ label: "身份证号", name: "OneIdCardNo", width: 100, align: "center" }, | |||||
{ label: "父亲电话", name: "FatherPhone", width: 100, align: "center" }, | |||||
{ label: "户籍地址", name: "OneDomicile", width: 100, align: "center" }, | |||||
{ label: "现住址", name: "OneAddress", width: 100, align: "center" }, | |||||
{ label: "母亲姓名", name: "MatherName", width: 100, align: "center" }, | |||||
{ label: "身份证号", name: "TwoIdCardNo", width: 100, align: "center" }, | |||||
{ label: "母亲电话", name: "MatherPhone", width: 100, align: "center" }, | |||||
{ label: "户籍地址", name: "TwoDomicile", width: 100, align: "center" }, | |||||
{ label: "现住址", name: "TwoAddress", width: 100, align: "center" }, | |||||
{ label: "监护人姓名", name: "GuardianName", width: 100, align: "center" }, | |||||
{ label: "身份证号", name: "GuardianIdCardNo", width: 100, align: "center" }, | |||||
{ label: "监护人电话", name: "GuardianPhone", width: 100, align: "center" }, | |||||
{ label: "户籍地址", name: "GuardianDomicile", width: 100, align: "center" }, | |||||
{ label: "现住址", name: "GuardianAddress", width: 100, align: "center" }, | |||||
{ | |||||
label: "家庭出身", name: "FamilyOriginNo", width: 100, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'BCdFamilyOrigin', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "港澳台侨", name: "OverseasChineseNo", width: 100, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'BCdOverseasChinese', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "本专科", name: "GraduateNo", width: 100, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'CollegeType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "毕业证号", name: "DiplomaNo", width: 100, align: "center" }, | |||||
{ | |||||
label: "毕业日期", name: "GraduateYear", width: 100, align: "center", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ label: "毕业证书备注", name: "DiplomaRemark", width: 100, align: "center" }, | |||||
//{ | |||||
// label: "入党时间", name: "BankCard", width: 100, align: "center", | |||||
// formatter: function (cellvalue) { | |||||
// return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
// } | |||||
//}, | |||||
//{ | |||||
// label: "入团时间", name: "BankCard", width: 100, align: "center", | |||||
// formatter: function (cellvalue) { | |||||
// return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
// } | |||||
//}, | |||||
{ label: "校内地址", name: "InSchoolAddress", width: 100, align: "center" }, | |||||
{ label: "校内电话", name: "InSchoolTelephone", width: 100, align: "center" }, | |||||
{ label: "QQ", name: "QQ", width: 100, align: "center" }, | |||||
{ label: "特长", name: "GoodAt", width: 100, align: "center" }, | |||||
{ label: "备注", name: "Remark", width: 200, align: "center" }, | |||||
{ | |||||
label: "异动状态", name: "MoveStatus", width: 80, align: "center", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
}, | |||||
{ | |||||
label: "异动类型", name: "MoveType", width: 100, 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: "CheckMark", width: 80, align: "center", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||||
} | |||||
} | |||||
], | |||||
mainId: 'StuId', | |||||
isPage: true, | |||||
isMultiselect: true, | |||||
//onSelectRow: function (rowdata) { | |||||
// if (rowdata.CheckMark == "1") { | |||||
// $("#check").hide(); | |||||
// $("#uncheck").show(); | |||||
// $("#lr_edit").hide(); | |||||
// $("#lr_delete").hide(); | |||||
// } else { | |||||
// $("#uncheck").hide(); | |||||
// $("#check").show(); | |||||
// $("#lr_edit").show(); | |||||
// $("#lr_delete").show(); | |||||
// } | |||||
//} | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.Crowning = 1; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -3,29 +3,30 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record"> | |||||
<div class="lr-form-item-title">员工名字</div> | <div class="lr-form-item-title">员工名字</div> | ||||
<div id="UserNo" type="text" class="form-control"></div> | <div id="UserNo" type="text" class="form-control"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record"> | |||||
<div class="lr-form-item-title">考勤类型</div> | <div class="lr-form-item-title">考勤类型</div> | ||||
<div id="ADType"></div> | <div id="ADType"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record"> | |||||
<div class="lr-form-item-title">考勤时间</div> | <div class="lr-form-item-title">考勤时间</div> | ||||
<input id="ADTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ADTime').trigger('change'); } })" /> | |||||
<input id="ADTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ADTime').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record"> | |||||
<div class="lr-form-item-title">打卡时间</div> | <div class="lr-form-item-title">打卡时间</div> | ||||
<input id="ClockTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ClockTime').trigger('change'); } })" /> | |||||
<input id="ClockTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ClockTime').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record"> | |||||
<div class="lr-form-item-title">打卡状态</div> | <div class="lr-form-item-title">打卡状态</div> | ||||
<input id="ClockStatus" type="text" class="form-control" /> | |||||
<div id="ClockStatus" > | |||||
</div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record" > | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Record"> | |||||
<div class="lr-form-item-title">打卡地点</div> | <div class="lr-form-item-title">打卡地点</div> | ||||
<input id="ClockPlace" type="text" class="form-control" /> | |||||
<input id="ClockPlace" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ADR_Record/Form.js") | @Html.AppendJsFile("/Areas/LogisticsManagement/Views/ADR_Record/Form.js") |
@@ -22,6 +22,7 @@ var bootstrap = function ($, learun) { | |||||
param: {} | param: {} | ||||
}); | }); | ||||
$('#ADType').lrDataItemSelect({ code: 'ADType' }); | $('#ADType').lrDataItemSelect({ code: 'ADType' }); | ||||
$('#ClockStatus').lrDataItemSelect({ code: 'ADStatus' }); | |||||
$('#UserNo').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' }); | $('#UserNo').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' }); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
@@ -26,6 +26,8 @@ var bootstrap = function ($, learun) { | |||||
$('#Files').attr('isvalid', 'yes'); | $('#Files').attr('isvalid', 'yes'); | ||||
$('#Files').attr('checkexpession', 'NotNull'); | $('#Files').attr('checkexpession', 'NotNull'); | ||||
$('#Files').prev().html('附件<font face="宋体">*</font>'); | $('#Files').prev().html('附件<font face="宋体">*</font>'); | ||||
//学号下拉框取消只显示‘登录用户所带班级的限制’; | |||||
strWhere = ""; | |||||
} else { | } else { | ||||
$('#Files').removeAttr('isvalid'); | $('#Files').removeAttr('isvalid'); | ||||
$('#Files').removeAttr('checkexpession'); | $('#Files').removeAttr('checkexpession'); | ||||
@@ -1029,6 +1029,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfStudent.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfStudent.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfThree.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfThree.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfTwo.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuFellowship\IndexOfTwo.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\IndexCenter.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\SoonGraduateIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\SoonGraduateIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwoOfElective.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwoOfElective.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElectiveInTeacher.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexOfElectiveInTeacher.js" /> | ||||
@@ -8271,6 +8272,7 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\RepairReportTeacher\EvaluateFormView.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\RepairReportTeacher\EvaluateFormView.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\RepairReportStudent\EvaluateFormView.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\RepairReportStudent\EvaluateFormView.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\FormDay.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\FormDay.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\IndexCenter.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -135,44 +135,61 @@ namespace Learun.Application.WebApi | |||||
StuAttendanceLeaveEntity entity = parameter.strEntity.ToObject<StuAttendanceLeaveEntity>(); | StuAttendanceLeaveEntity entity = parameter.strEntity.ToObject<StuAttendanceLeaveEntity>(); | ||||
entity.TeachClassNo = entity.ClassNo; | entity.TeachClassNo = entity.ClassNo; | ||||
stuAttendanceLeaveIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | stuAttendanceLeaveIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | ||||
entity = stuAttendanceLeaveIBLL.GetStuAttendanceLeaveEntity(entity.ID); | |||||
if (!string.IsNullOrEmpty(entity.IsCheck)) | if (!string.IsNullOrEmpty(entity.IsCheck)) | ||||
{ | { | ||||
if (entity.IsCheck == "1") | if (entity.IsCheck == "1") | ||||
{ | { | ||||
var gender = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(entity.StuNo)?.GenderNo; | |||||
StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); | |||||
stuAttendanceEntity.AcademicYearNo = entity.AcademicYearNo; | |||||
stuAttendanceEntity.ClassName = entity.ClassName; | |||||
stuAttendanceEntity.ClassNo = entity.ClassNo; | |||||
stuAttendanceEntity.DeptName = entity.DeptName; | |||||
stuAttendanceEntity.DeptNo = entity.DeptNo; | |||||
stuAttendanceEntity.EmpNo = entity.EmpNo; | |||||
stuAttendanceEntity.Grade = entity.Grade; | |||||
stuAttendanceEntity.InertDate = DateTime.Now; | |||||
stuAttendanceEntity.LessonDate = entity.LessonDate; | |||||
stuAttendanceEntity.LessonName = entity.LessonName; | |||||
stuAttendanceEntity.LessonNo = entity.LessonNo; | |||||
stuAttendanceEntity.LessonSortName = entity.LessonSortName; | |||||
stuAttendanceEntity.LessonSortNo = entity.LessonSortNo; | |||||
stuAttendanceEntity.LessonTime = entity.LessonTime; | |||||
stuAttendanceEntity.MajorName = entity.MajorName; | |||||
stuAttendanceEntity.MajorNo = entity.MajorNo; | |||||
stuAttendanceEntity.PlanWeek = null; | |||||
stuAttendanceEntity.Semester = entity.Semester; | |||||
stuAttendanceEntity.StuName = entity.StuName; | |||||
stuAttendanceEntity.StuNo = entity.StuNo; | |||||
stuAttendanceEntity.TeachClassNo = entity.TeachClassNo; | |||||
stuAttendanceEntity.Sort = "请假"; | |||||
stuAttendanceEntity.AttendOrNo = "否"; | |||||
stuAttendanceEntity.ClassRoomName = entity.ClassRoomName; | |||||
stuAttendanceEntity.ClassRoomNo = entity.ClassRoomNo; | |||||
stuAttendanceEntity.Gender = Convert.ToBoolean(gender) ? "男" : "女"; | |||||
stuAttendanceEntity.AcademicYearNo = entity.AcademicYearNo; | |||||
stuAttendanceEntity.CheckMarkDept = ""; | |||||
stuAttendanceEntity.CheckMark = ""; | |||||
stuAttendanceIBLL.SaveEntity("", stuAttendanceEntity); | |||||
//查找是否存在同一门课的考勤信息:存在则修改,不存在则新增; | |||||
var model = stuAttendanceIBLL.GetStuAttendanceEntityByQuery(entity); | |||||
if (model != null) | |||||
{ | |||||
model.AttendOrNo = "否"; | |||||
model.Sort = "请假"; | |||||
model.Remark = "属于移动端的学生课表请假审核"; | |||||
model.InertDate = DateTime.Now; | |||||
stuAttendanceIBLL.SaveEntity(model.ID, model); | |||||
} | |||||
else | |||||
{ | |||||
var gender = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(entity.StuNo)?.GenderNo; | |||||
StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); | |||||
stuAttendanceEntity.AcademicYearNo = entity.AcademicYearNo; | |||||
stuAttendanceEntity.Semester = entity.Semester; | |||||
stuAttendanceEntity.StuNo = entity.StuNo; | |||||
stuAttendanceEntity.StuName = entity.StuName; | |||||
stuAttendanceEntity.Gender = Convert.ToBoolean(gender) ? "男" : "女"; | |||||
stuAttendanceEntity.Grade = entity.Grade; | |||||
stuAttendanceEntity.DeptNo = entity.DeptNo; | |||||
stuAttendanceEntity.DeptName = entity.DeptName; | |||||
stuAttendanceEntity.MajorNo = entity.MajorNo; | |||||
stuAttendanceEntity.MajorName = entity.MajorName; | |||||
stuAttendanceEntity.ClassNo = entity.ClassNo; | |||||
stuAttendanceEntity.ClassName = entity.ClassName; | |||||
stuAttendanceEntity.LessonNo = entity.LessonNo; | |||||
stuAttendanceEntity.LessonName = entity.LessonName; | |||||
stuAttendanceEntity.TeachClassNo = entity.TeachClassNo; | |||||
stuAttendanceEntity.LessonSortNo = entity.LessonSortNo; | |||||
stuAttendanceEntity.LessonSortName = entity.LessonSortName; | |||||
stuAttendanceEntity.LessonDate = entity.LessonDate; | |||||
stuAttendanceEntity.PlanWeek = null; | |||||
stuAttendanceEntity.LessonTime = entity.LessonTime; | |||||
stuAttendanceEntity.AttendOrNo = "否"; | |||||
stuAttendanceEntity.Sort = "请假"; | |||||
stuAttendanceEntity.EmpNo = entity.EmpNo; | |||||
stuAttendanceEntity.Remark = "属于移动端的学生课表请假审核"; | |||||
stuAttendanceEntity.CheckMarkDept = "0"; | |||||
stuAttendanceEntity.CheckMark = "0"; | |||||
stuAttendanceEntity.InertDate = DateTime.Now; | |||||
stuAttendanceEntity.ClassRoomNo = entity.ClassRoomNo; | |||||
stuAttendanceEntity.ClassRoomName = entity.ClassRoomName; | |||||
stuAttendanceIBLL.SaveEntity("", stuAttendanceEntity); | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -171,6 +171,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[NotMapped] public string StuName { get; set; } | [NotMapped] public string StuName { get; set; } | ||||
[NotMapped] public string Grade { get; set; } | [NotMapped] public string Grade { get; set; } | ||||
[NotMapped] public string GenderNo { get; set; } | [NotMapped] public string GenderNo { get; set; } | ||||
[NotMapped] public string ClassNo { get; set; } | |||||
#endregion | #endregion | ||||
@@ -1217,11 +1217,13 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest | |||||
if (userType == "学生") | if (userType == "学生") | ||||
{ | { | ||||
sql = @"SELECT | sql = @"SELECT | ||||
b.LessonNo,b.AcademicYearNo as AcademicYear,b.LessonName,b.LessonTime,b.LessonDate,b.Empname EmpName,b.EmpNo,c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName,e.EnName from StuSelectLessonList a | |||||
b.LessonNo,b.AcademicYearNo as AcademicYear,b.LessonName,b.LessonTime,b.LessonDate,b.Empname EmpName,b.EmpNo,c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName,e.EnName,sa.AttendOrNo,sa.Sort | |||||
from StuSelectLessonList a | |||||
left join ArrangeLessonTerm b on b.TeachClassNo=RTRIM(a.LessonName) + RTRIM(a.PartCode) + RTRIM(a.TeachClassNo) | left join ArrangeLessonTerm b on b.TeachClassNo=RTRIM(a.LessonName) + RTRIM(a.PartCode) + RTRIM(a.TeachClassNo) | ||||
left join ClassroomInfo c on c.ClassroomNo=b.classroomNo | left join ClassroomInfo c on c.ClassroomNo=b.classroomNo | ||||
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo | left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo | ||||
left join LessonInfo e on a.LessonNo=e.LessonNo | left join LessonInfo e on a.LessonNo=e.LessonNo | ||||
left join StuAttendance sa on sa.StuNo=@userAccount and sa.AcademicYearNo=b.AcademicYearNo and sa.Semester=b.Semester and sa.DeptNo=b.DeptNo and sa.MajorNo=b.MajorNo and sa.LessonNo=b.LessonNo and sa.TeachClassNo=replace(b.TeachClassNo,b.LessonName,'') and sa.LessonSortNo=b.LessonSortNo and sa.LessonTime=b.LessonTime and sa.LessonDate=b.LessonDate and sa.EmpNo=b.EmpNo and sa.ClassroomNo=b.ClassroomNo | |||||
where a.StuNo=@userAccount and a.AcademicYearNo=@strAcademicYear and a.Semester=@strSemester | where a.StuNo=@userAccount and a.AcademicYearNo=@strAcademicYear and a.Semester=@strSemester | ||||
and b.AcademicYearNo=@strAcademicYear and b.Semester=@strSemester | and b.AcademicYearNo=@strAcademicYear and b.Semester=@strSemester | ||||
and b.LessonDate>=@startDate and b.LessonDate<=@endDate and b.CheckMark=1"; | and b.LessonDate>=@startDate and b.LessonDate<=@endDate and b.CheckMark=1"; | ||||
@@ -2242,6 +2244,14 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les | |||||
public string F_SchoolId { get; set; } | public string F_SchoolId { get; set; } | ||||
public string DeptNo { get; set; } | public string DeptNo { get; set; } | ||||
public string MajorNo { get; set; } | public string MajorNo { get; set; } | ||||
/// <summary> | |||||
/// 出勤否(填是、否) | |||||
/// </summary> | |||||
public string AttendOrNo { get; set; } | |||||
/// <summary> | |||||
/// 出勤情况分类:准时、迟到、 | |||||
/// </summary> | |||||
public string Sort { get; set; } | |||||
} | } | ||||
@@ -641,7 +641,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
// and a.AcademicYearNo=@strAcademicYear and a.Semester=@strSemester | // and a.AcademicYearNo=@strAcademicYear and a.Semester=@strSemester | ||||
// and a.LessonDate >= @startDate and a.LessonDate <=@endDate | // and a.LessonDate >= @startDate and a.LessonDate <=@endDate | ||||
// and a.CheckMark='1'"; | // and a.CheckMark='1'"; | ||||
sql = @" select e.EnName,a.LessonDate,a.AcademicYearNo as AcademicYear,a.Semester,a.LessonNo,e.LessonName,a.LessonSection as LessonTime,a.EmpNo,emp.EmpName,cr.ClassroomName,a.ClassRoomNo,a.LessonSortNo,ccc.olpoeid as OLPEId | |||||
sql = @" select e.EnName,a.LessonDate,a.AcademicYearNo as AcademicYear,a.Semester,a.LessonNo,e.LessonName,a.LessonSection as LessonTime,a.EmpNo,emp.EmpName,cr.ClassroomName,a.ClassRoomNo,a.LessonSortNo,ccc.olpoeid as OLPEId | |||||
from | from | ||||
(select olpoeid from ElectiveMergeItem | (select olpoeid from ElectiveMergeItem | ||||
where emid in (select emid from ElectiveMergeItem aa left | where emid in (select emid from ElectiveMergeItem aa left | ||||
@@ -654,18 +654,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
ArrangeLessonTermOfElective a on ccc.olpoeid = a.PaiKeId | ArrangeLessonTermOfElective a on ccc.olpoeid = a.PaiKeId | ||||
left join LessonInfo e on a.LessonNo=e.LessonNo | left join LessonInfo e on a.LessonNo=e.LessonNo | ||||
left join EmpInfo emp on a.EmpNo=emp.EmpNo | left join EmpInfo emp on a.EmpNo=emp.EmpNo | ||||
left join ClassroomInfo cr on a.ClassRoomNo=cr.ClassroomNo | |||||
left join ClassroomInfo cr on a.ClassRoomNo=cr.ClassroomNo | |||||
where | where | ||||
a.AcademicYearNo = @strAcademicYear and a.Semester = @strSemester | a.AcademicYearNo = @strAcademicYear and a.Semester = @strSemester | ||||
and a.LessonDate >= @startDate and a.LessonDate <=@endDate | and a.LessonDate >= @startDate and a.LessonDate <=@endDate | ||||
and a.CheckMark = '1' | and a.CheckMark = '1' | ||||
union | union | ||||
select e.EnName,a.LessonDate,a.AcademicYearNo as AcademicYear,a.Semester,a.LessonNo,e.LessonName,a.LessonSection as LessonTime,a.EmpNo,emp.EmpName,cr.ClassroomName,a.ClassRoomNo,a.LessonSortNo,b.OLPEId | |||||
select e.EnName,a.LessonDate,a.AcademicYearNo as AcademicYear,a.Semester,a.LessonNo,e.LessonName,a.LessonSection as LessonTime,a.EmpNo,emp.EmpName,cr.ClassroomName,a.ClassRoomNo,a.LessonSortNo,b.OLPEId | |||||
from StuSelectLessonListOfElective b | from StuSelectLessonListOfElective b | ||||
left join ArrangeLessonTermOfElective a on b.OLPEId=a.PaiKeId | left join ArrangeLessonTermOfElective a on b.OLPEId=a.PaiKeId | ||||
left join LessonInfo e on a.LessonNo=e.LessonNo | left join LessonInfo e on a.LessonNo=e.LessonNo | ||||
left join EmpInfo emp on a.EmpNo=emp.EmpNo | left join EmpInfo emp on a.EmpNo=emp.EmpNo | ||||
left join ClassroomInfo cr on a.ClassRoomNo=cr.ClassroomNo | |||||
left join ClassroomInfo cr on a.ClassRoomNo=cr.ClassroomNo | |||||
where b.StuNo=@userAccount and b.Status=2 | where b.StuNo=@userAccount and b.Status=2 | ||||
and b.AcademicYearNo=@strAcademicYear and b.Semester=@strSemester | and b.AcademicYearNo=@strAcademicYear and b.Semester=@strSemester | ||||
and a.AcademicYearNo=@strAcademicYear and a.Semester=@strSemester | and a.AcademicYearNo=@strAcademicYear and a.Semester=@strSemester | ||||
@@ -196,6 +196,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 按条件查找同一门课的考勤信息 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuAttendanceEntity GetStuAttendanceEntityByQuery(StuAttendanceLeaveEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
return stuAttendanceService.GetStuAttendanceEntityByQuery(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -170,6 +170,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("INERTDATE")] | [Column("INERTDATE")] | ||||
public DateTime? InertDate { get; set; } | public DateTime? InertDate { get; set; } | ||||
/// <summary> | |||||
/// 必修排课表ID | |||||
/// </summary> | |||||
[Column("ALTID")] | |||||
public string ALTId { get; set; } | |||||
/// <summary> | |||||
/// 选修排课表ID | |||||
/// </summary> | |||||
[Column("ALTOEID")] | |||||
public string ALTOEId { get; set; } | |||||
///// <summary> | ///// <summary> | ||||
///// StuAttendanceNo | ///// StuAttendanceNo | ||||
///// </summary> | ///// </summary> | ||||
@@ -54,6 +54,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<StuAttendanceEntity> GetAttendancePageList(Pagination pagination, string queryJson); | IEnumerable<StuAttendanceEntity> GetAttendancePageList(Pagination pagination, string queryJson); | ||||
/// <summary> | |||||
/// 按条件查找同一门课的考勤信息 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
StuAttendanceEntity GetStuAttendanceEntityByQuery(StuAttendanceLeaveEntity entity); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -426,6 +426,29 @@ where 1=1 "); | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 按条件查找同一门课的考勤信息 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public StuAttendanceEntity GetStuAttendanceEntityByQuery(StuAttendanceLeaveEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuAttendanceEntity>(x => x.StuNo == entity.StuNo && x.AcademicYearNo == entity.AcademicYearNo && x.Semester == entity.Semester && x.DeptNo == entity.DeptNo && x.MajorNo == entity.MajorNo && x.ClassNo == entity.ClassNo && x.LessonNo == entity.LessonNo && x.LessonSortNo == entity.LessonSortNo && x.LessonDate == entity.LessonDate && x.LessonTime == entity.LessonTime && x.EmpNo == entity.EmpNo && x.ClassRoomNo == entity.ClassRoomNo); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -799,6 +799,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("MOVESTATUS")] | [Column("MOVESTATUS")] | ||||
public int? MoveStatus { get; set; } | public int? MoveStatus { get; set; } | ||||
/// <summary> | |||||
/// 中职高职 0 高职 1 中职 | |||||
/// </summary> | |||||
[Column("CROWNING")] | |||||
public string Crowning { get; set; } | |||||
#endregion | #endregion | ||||
@@ -45,6 +45,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["Crowning"].IsEmpty()) | |||||
{ | |||||
dp.Add("Crowning", queryParam["Crowning"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Crowning = @Crowning "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | if (!queryParam["StuNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | ||||
@@ -279,127 +279,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
entity.Modify(keyValue); | entity.Modify(keyValue); | ||||
db.Update(entity); | db.Update(entity); | ||||
// if (entity.CheckStatus.Trim() == "2" && entity.StartTime != null) | |||||
// { | |||||
// //请假审核通过后,该学生的对应日期的课表改为请假 | |||||
// var model = this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>( | |||||
// $"select * from StuLeaveManagement where Id='{keyValue}'").FirstOrDefault(); | |||||
// //请假开始时间和结束时间 | |||||
// var startTime = Convert.ToDateTime(model.StartTime?.ToString("yyyy-MM-dd") + " 00:00:00"); | |||||
// var endTime = Convert.ToDateTime(model.EndTime?.ToString("yyyy-MM-dd") + " 23:59:59"); | |||||
// //排课数据 | |||||
// var arrangeLessonTermList = db.FindList<ArrangeLessonTermEntity>($@"select a.*,b.StuName,b.Grade,b.GenderNo from [dbo].[ArrangeLessonTerm] a | |||||
//join stuinfobasic b on a.teachclassno=b.classno | |||||
//where b.stuno='{model.CreateUserNo}' | |||||
//and a.lessondate between '{startTime}' and '{endTime}'"); | |||||
// var deptList = this.BaseRepository("CollegeMIS").FindList<CdDeptEntity>(); | |||||
// var majorList = this.BaseRepository("CollegeMIS").FindList<CdMajorEntity>(); | |||||
// var classInfoList = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(); | |||||
// var classRoomList = this.BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>().ToList(); | |||||
// var lessonSortList = this.BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList(); | |||||
// foreach (var arrangeLessonTerm in arrangeLessonTermList) | |||||
// { | |||||
// StuAttendanceLeaveEntity stuAttendanceLeave = new StuAttendanceLeaveEntity(); | |||||
// stuAttendanceLeave.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; | |||||
// stuAttendanceLeave.Semester = arrangeLessonTerm.Semester; | |||||
// stuAttendanceLeave.StuNo = model.CreateUserNo; | |||||
// stuAttendanceLeave.StuName = arrangeLessonTerm.StuName; | |||||
// stuAttendanceLeave.Grade = arrangeLessonTerm.Grade; | |||||
// stuAttendanceLeave.DeptNo = arrangeLessonTerm.DeptNo; | |||||
// stuAttendanceLeave.DeptName = deptList.Where(x => x.DeptNo == arrangeLessonTerm.DeptNo) | |||||
// .FirstOrDefault()?.DeptName; | |||||
// stuAttendanceLeave.MajorNo = arrangeLessonTerm.MajorNo; | |||||
// stuAttendanceLeave.MajorName = majorList.Where(x => x.MajorNo == arrangeLessonTerm.MajorNo) | |||||
// .FirstOrDefault()?.MajorName; | |||||
// stuAttendanceLeave.ClassNo = arrangeLessonTerm.TeachClassNo; | |||||
// stuAttendanceLeave.ClassName = classInfoList | |||||
// .Where(x => x.ClassNo == arrangeLessonTerm.TeachClassNo).FirstOrDefault()?.ClassName; | |||||
// stuAttendanceLeave.LessonNo = arrangeLessonTerm.LessonNo; | |||||
// stuAttendanceLeave.LessonName = arrangeLessonTerm.LessonName; | |||||
// stuAttendanceLeave.TeachClassNo = arrangeLessonTerm.TeachClassNo; | |||||
// stuAttendanceLeave.LessonSortNo = arrangeLessonTerm.LessonSortNo; | |||||
// stuAttendanceLeave.LessonSortName = lessonSortList.Find(m => m.LessonSortNo == arrangeLessonTerm.LessonSortNo)?.LessonSortName; | |||||
// stuAttendanceLeave.LessonDate = arrangeLessonTerm.LessonDate; | |||||
// stuAttendanceLeave.LessonTime = arrangeLessonTerm.LessonTime; | |||||
// stuAttendanceLeave.LeaveType = entity.LeaveType; | |||||
// stuAttendanceLeave.EmpNo = arrangeLessonTerm.EmpNo; | |||||
// stuAttendanceLeave.TecRemark = "按天请假"; | |||||
// stuAttendanceLeave.UpdateDate = DateTime.Now; | |||||
// stuAttendanceLeave.IsCheck = "1"; | |||||
// stuAttendanceLeave.ClassRoomNo = arrangeLessonTerm.ClassroomNo; | |||||
// stuAttendanceLeave.ClassRoomName = classRoomList.FirstOrDefault(x => x.ClassroomNo == arrangeLessonTerm.ClassroomNo)?.ClassroomName; | |||||
// //去重 | |||||
// var isExistModel = this.BaseRepository("CollegeMIS").FindEntity<StuAttendanceLeaveEntity>(x => | |||||
// x.AcademicYearNo == stuAttendanceLeave.AcademicYearNo && x.Semester == stuAttendanceLeave.Semester && | |||||
// x.StuNo == stuAttendanceLeave.StuNo && x.LessonNo == stuAttendanceLeave.LessonNo && x.TeachClassNo == stuAttendanceLeave.TeachClassNo && | |||||
// x.LessonSortNo == stuAttendanceLeave.LessonSortNo && x.LessonDate == stuAttendanceLeave.LessonDate && x.LessonTime == stuAttendanceLeave.LessonTime && | |||||
// x.EmpNo == stuAttendanceLeave.EmpNo && x.ClassRoomNo == stuAttendanceLeave.ClassRoomNo | |||||
// ); | |||||
// if (isExistModel != null) | |||||
// { | |||||
// stuAttendanceLeave.Modify(isExistModel.ID); | |||||
// db.Update(stuAttendanceLeave); | |||||
// } | |||||
// else | |||||
// { | |||||
// stuAttendanceLeave.Create(); | |||||
// db.Insert(stuAttendanceLeave); | |||||
// } | |||||
// //学生考勤 | |||||
// StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); | |||||
// stuAttendanceEntity.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; | |||||
// stuAttendanceEntity.Semester = arrangeLessonTerm.Semester; | |||||
// stuAttendanceEntity.StuNo = model.CreateUserNo; | |||||
// stuAttendanceEntity.StuName = arrangeLessonTerm.StuName; | |||||
// stuAttendanceEntity.Gender = arrangeLessonTerm.GenderNo.ToLower() == "true" ? "男" : "女"; | |||||
// stuAttendanceEntity.Grade = arrangeLessonTerm.Grade; | |||||
// stuAttendanceEntity.DeptNo = arrangeLessonTerm.DeptNo; | |||||
// stuAttendanceEntity.DeptName = deptList.Where(x => x.DeptNo == arrangeLessonTerm.DeptNo) | |||||
// .FirstOrDefault()?.DeptName; | |||||
// stuAttendanceEntity.MajorNo = arrangeLessonTerm.MajorNo; | |||||
// stuAttendanceEntity.MajorName = majorList.Where(x => x.MajorNo == arrangeLessonTerm.MajorNo).FirstOrDefault()?.MajorName; | |||||
// stuAttendanceEntity.ClassNo = arrangeLessonTerm.TeachClassNo; | |||||
// stuAttendanceEntity.ClassName = classInfoList | |||||
// .Where(x => x.ClassNo == arrangeLessonTerm.TeachClassNo).FirstOrDefault()?.ClassName; | |||||
// stuAttendanceEntity.LessonNo = arrangeLessonTerm.LessonNo; | |||||
// stuAttendanceEntity.LessonName = arrangeLessonTerm.LessonName; | |||||
// stuAttendanceEntity.TeachClassNo = arrangeLessonTerm.TeachClassNo; | |||||
// stuAttendanceEntity.LessonSortNo = arrangeLessonTerm.LessonSortNo; | |||||
// stuAttendanceEntity.LessonSortName = lessonSortList.Find(m => m.LessonSortNo == arrangeLessonTerm.LessonSortNo)?.LessonSortName; | |||||
// stuAttendanceEntity.LessonDate = arrangeLessonTerm.LessonDate; | |||||
// stuAttendanceEntity.PlanWeek = null; | |||||
// stuAttendanceEntity.LessonTime = arrangeLessonTerm.LessonTime; | |||||
// stuAttendanceEntity.AttendOrNo = "否"; | |||||
// stuAttendanceEntity.Sort = Convert.ToInt32(entity.LeaveType) == 2 ? "病假" : "事假"; | |||||
// stuAttendanceEntity.EmpNo = arrangeLessonTerm.EmpNo; | |||||
// stuAttendanceEntity.Remark = "按天请假"; | |||||
// stuAttendanceEntity.CheckMarkDept = ""; | |||||
// stuAttendanceEntity.CheckMark = ""; | |||||
// stuAttendanceEntity.InertDate = DateTime.Now; | |||||
// stuAttendanceEntity.ClassRoomNo = arrangeLessonTerm.ClassroomNo; | |||||
// stuAttendanceEntity.ClassRoomName = classRoomList.FirstOrDefault(x => x.ClassroomNo == arrangeLessonTerm.ClassroomNo)?.ClassroomName; | |||||
// //去重 | |||||
// var isExistModel2 = this.BaseRepository("CollegeMIS").FindEntity<StuAttendanceEntity>(x => | |||||
// x.AcademicYearNo == stuAttendanceEntity.AcademicYearNo && x.Semester == stuAttendanceEntity.Semester && x.StuNo == stuAttendanceEntity.StuNo && | |||||
// x.LessonNo == stuAttendanceEntity.LessonNo && x.TeachClassNo == stuAttendanceEntity.TeachClassNo && x.LessonSortNo == stuAttendanceEntity.LessonSortNo && | |||||
// x.LessonDate == stuAttendanceEntity.LessonDate && x.LessonTime == stuAttendanceEntity.LessonTime && x.EmpNo == stuAttendanceEntity.EmpNo && x.ClassRoomNo == stuAttendanceEntity.ClassRoomNo); | |||||
// if (isExistModel2 != null) | |||||
// { | |||||
// stuAttendanceEntity.Modify(isExistModel2.ID); | |||||
// db.Update(stuAttendanceEntity); | |||||
// } | |||||
// else | |||||
// { | |||||
// stuAttendanceEntity.Create(); | |||||
// db.Insert(stuAttendanceEntity); | |||||
// } | |||||
// } | |||||
// } | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -476,8 +355,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var endTime = Convert.ToDateTime(model.EndTime?.ToString("yyyy-MM-dd") + " 23:59:59"); | var endTime = Convert.ToDateTime(model.EndTime?.ToString("yyyy-MM-dd") + " 23:59:59"); | ||||
//排课数据 | //排课数据 | ||||
var arrangeLessonTermList = db.FindList<ArrangeLessonTermEntity>($@"select a.*,b.StuName,b.Grade,b.GenderNo from [dbo].[ArrangeLessonTerm] a | |||||
join stuinfobasic b on a.teachclassno=b.classno | |||||
var arrangeLessonTermList = db.FindList<ArrangeLessonTermEntity>($@"select a.*,b.StuName,b.Grade,b.GenderNo,b.ClassNo from [dbo].[ArrangeLessonTerm] a | |||||
join stuinfobasic b on replace(a.TeachClassNo,a.LessonName,'')=b.classno | |||||
where b.stuno='{model.CreateUserNo}' | where b.stuno='{model.CreateUserNo}' | ||||
and a.lessondate between '{startTime}' and '{endTime}'"); | and a.lessondate between '{startTime}' and '{endTime}'"); | ||||
@@ -488,6 +367,7 @@ and a.lessondate between '{startTime}' and '{endTime}'"); | |||||
var lessonSortList = this.BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList(); | var lessonSortList = this.BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList(); | ||||
foreach (var arrangeLessonTerm in arrangeLessonTermList) | foreach (var arrangeLessonTerm in arrangeLessonTermList) | ||||
{ | { | ||||
//学生课表请假表 | |||||
StuAttendanceLeaveEntity stuAttendanceLeave = new StuAttendanceLeaveEntity(); | StuAttendanceLeaveEntity stuAttendanceLeave = new StuAttendanceLeaveEntity(); | ||||
stuAttendanceLeave.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; | stuAttendanceLeave.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; | ||||
stuAttendanceLeave.Semester = arrangeLessonTerm.Semester; | stuAttendanceLeave.Semester = arrangeLessonTerm.Semester; | ||||
@@ -500,12 +380,12 @@ and a.lessondate between '{startTime}' and '{endTime}'"); | |||||
stuAttendanceLeave.MajorNo = arrangeLessonTerm.MajorNo; | stuAttendanceLeave.MajorNo = arrangeLessonTerm.MajorNo; | ||||
stuAttendanceLeave.MajorName = majorList.Where(x => x.MajorNo == arrangeLessonTerm.MajorNo) | stuAttendanceLeave.MajorName = majorList.Where(x => x.MajorNo == arrangeLessonTerm.MajorNo) | ||||
.FirstOrDefault()?.MajorName; | .FirstOrDefault()?.MajorName; | ||||
stuAttendanceLeave.ClassNo = arrangeLessonTerm.TeachClassNo; | |||||
stuAttendanceLeave.ClassNo = arrangeLessonTerm.ClassNo; | |||||
stuAttendanceLeave.ClassName = classInfoList | stuAttendanceLeave.ClassName = classInfoList | ||||
.Where(x => x.ClassNo == arrangeLessonTerm.TeachClassNo).FirstOrDefault()?.ClassName; | |||||
.Where(x => x.ClassNo == arrangeLessonTerm.ClassNo).FirstOrDefault()?.ClassName; | |||||
stuAttendanceLeave.LessonNo = arrangeLessonTerm.LessonNo; | stuAttendanceLeave.LessonNo = arrangeLessonTerm.LessonNo; | ||||
stuAttendanceLeave.LessonName = arrangeLessonTerm.LessonName; | stuAttendanceLeave.LessonName = arrangeLessonTerm.LessonName; | ||||
stuAttendanceLeave.TeachClassNo = arrangeLessonTerm.TeachClassNo; | |||||
stuAttendanceLeave.TeachClassNo = arrangeLessonTerm.ClassNo; | |||||
stuAttendanceLeave.LessonSortNo = arrangeLessonTerm.LessonSortNo; | stuAttendanceLeave.LessonSortNo = arrangeLessonTerm.LessonSortNo; | ||||
stuAttendanceLeave.LessonSortName = lessonSortList.Find(m => m.LessonSortNo == arrangeLessonTerm.LessonSortNo)?.LessonSortName; | stuAttendanceLeave.LessonSortName = lessonSortList.Find(m => m.LessonSortNo == arrangeLessonTerm.LessonSortNo)?.LessonSortName; | ||||
stuAttendanceLeave.LessonDate = arrangeLessonTerm.LessonDate; | stuAttendanceLeave.LessonDate = arrangeLessonTerm.LessonDate; | ||||
@@ -535,7 +415,7 @@ and a.lessondate between '{startTime}' and '{endTime}'"); | |||||
db.Insert(stuAttendanceLeave); | db.Insert(stuAttendanceLeave); | ||||
} | } | ||||
//学生考勤 | |||||
//学生考勤表 | |||||
StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); | StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); | ||||
stuAttendanceEntity.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; | stuAttendanceEntity.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; | ||||
stuAttendanceEntity.Semester = arrangeLessonTerm.Semester; | stuAttendanceEntity.Semester = arrangeLessonTerm.Semester; | ||||
@@ -548,23 +428,23 @@ and a.lessondate between '{startTime}' and '{endTime}'"); | |||||
.FirstOrDefault()?.DeptName; | .FirstOrDefault()?.DeptName; | ||||
stuAttendanceEntity.MajorNo = arrangeLessonTerm.MajorNo; | stuAttendanceEntity.MajorNo = arrangeLessonTerm.MajorNo; | ||||
stuAttendanceEntity.MajorName = majorList.Where(x => x.MajorNo == arrangeLessonTerm.MajorNo).FirstOrDefault()?.MajorName; | stuAttendanceEntity.MajorName = majorList.Where(x => x.MajorNo == arrangeLessonTerm.MajorNo).FirstOrDefault()?.MajorName; | ||||
stuAttendanceEntity.ClassNo = arrangeLessonTerm.TeachClassNo; | |||||
stuAttendanceEntity.ClassNo = arrangeLessonTerm.ClassNo; | |||||
stuAttendanceEntity.ClassName = classInfoList | stuAttendanceEntity.ClassName = classInfoList | ||||
.Where(x => x.ClassNo == arrangeLessonTerm.TeachClassNo).FirstOrDefault()?.ClassName; | |||||
.Where(x => x.ClassNo == arrangeLessonTerm.ClassNo).FirstOrDefault()?.ClassName; | |||||
stuAttendanceEntity.LessonNo = arrangeLessonTerm.LessonNo; | stuAttendanceEntity.LessonNo = arrangeLessonTerm.LessonNo; | ||||
stuAttendanceEntity.LessonName = arrangeLessonTerm.LessonName; | stuAttendanceEntity.LessonName = arrangeLessonTerm.LessonName; | ||||
stuAttendanceEntity.TeachClassNo = arrangeLessonTerm.TeachClassNo; | |||||
stuAttendanceEntity.TeachClassNo = arrangeLessonTerm.ClassNo; | |||||
stuAttendanceEntity.LessonSortNo = arrangeLessonTerm.LessonSortNo; | stuAttendanceEntity.LessonSortNo = arrangeLessonTerm.LessonSortNo; | ||||
stuAttendanceEntity.LessonSortName = lessonSortList.Find(m => m.LessonSortNo == arrangeLessonTerm.LessonSortNo)?.LessonSortName; | stuAttendanceEntity.LessonSortName = lessonSortList.Find(m => m.LessonSortNo == arrangeLessonTerm.LessonSortNo)?.LessonSortName; | ||||
stuAttendanceEntity.LessonDate = arrangeLessonTerm.LessonDate; | stuAttendanceEntity.LessonDate = arrangeLessonTerm.LessonDate; | ||||
stuAttendanceEntity.PlanWeek = null; | stuAttendanceEntity.PlanWeek = null; | ||||
stuAttendanceEntity.LessonTime = arrangeLessonTerm.LessonTime; | stuAttendanceEntity.LessonTime = arrangeLessonTerm.LessonTime; | ||||
stuAttendanceEntity.AttendOrNo = "否"; | stuAttendanceEntity.AttendOrNo = "否"; | ||||
stuAttendanceEntity.Sort = Convert.ToInt32(model.LeaveType) == 2 ? "病假" : "事假"; | |||||
stuAttendanceEntity.Sort = "请假"; | |||||
stuAttendanceEntity.EmpNo = arrangeLessonTerm.EmpNo; | stuAttendanceEntity.EmpNo = arrangeLessonTerm.EmpNo; | ||||
stuAttendanceEntity.Remark = "按天请假"; | |||||
stuAttendanceEntity.CheckMarkDept = ""; | |||||
stuAttendanceEntity.CheckMark = ""; | |||||
stuAttendanceEntity.Remark = "属于学生按天请假的流程审核"; | |||||
stuAttendanceEntity.CheckMarkDept = "0"; | |||||
stuAttendanceEntity.CheckMark = "0"; | |||||
stuAttendanceEntity.InertDate = DateTime.Now; | stuAttendanceEntity.InertDate = DateTime.Now; | ||||
stuAttendanceEntity.ClassRoomNo = arrangeLessonTerm.ClassroomNo; | stuAttendanceEntity.ClassRoomNo = arrangeLessonTerm.ClassroomNo; | ||||
stuAttendanceEntity.ClassRoomName = classRoomList.FirstOrDefault(x => x.ClassroomNo == arrangeLessonTerm.ClassroomNo)?.ClassroomName; | stuAttendanceEntity.ClassRoomName = classRoomList.FirstOrDefault(x => x.ClassroomNo == arrangeLessonTerm.ClassroomNo)?.ClassroomName; | ||||
@@ -169,7 +169,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 考勤打卡 | |||||
/// 考勤打卡教师 | |||||
/// </summary> | /// </summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public bool ClockIn(decimal ALon, decimal ALat, bool AIsOut, string ARemark, string ADPhoto, string ClockPlace) | public bool ClockIn(decimal ALon, decimal ALat, bool AIsOut, string ARemark, string ADPhoto, string ClockPlace) | ||||
@@ -181,7 +181,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
var attendancerulEntity = this.BaseRepository("CollegeMIS").FindEntity<ADR_RestrictionEntity>(m => m.REnable == true); | var attendancerulEntity = this.BaseRepository("CollegeMIS").FindEntity<ADR_RestrictionEntity>(m => m.REnable == true); | ||||
if (attendancerulEntity != null) | if (attendancerulEntity != null) | ||||
{ | { | ||||
var userinfo = LoginUserInfo.Get(); //new UserInfo { account = "System", realName = "超级管理员" }; // | |||||
var userinfo = LoginUserInfo.Get(); | |||||
//员工账号 | //员工账号 | ||||
string EmpNo = userinfo.account; | string EmpNo = userinfo.account; | ||||
@@ -206,12 +206,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
//设备事件时间(在这里,=当前时间) | //设备事件时间(在这里,=当前时间) | ||||
DateTime devicetime = Convert.ToDateTime(strTime); | DateTime devicetime = Convert.ToDateTime(strTime); | ||||
//掉线补传数据时间判断 | |||||
//设备时间小于当前时间,判断为补传历史时间数据 | |||||
//if (devicetime.Date != DateTime.Now.Date) | |||||
//{ | |||||
// datenow = devicetime.ToString("yyyy-MM-dd"); | |||||
//} | |||||
//上班时间 | //上班时间 | ||||
DateTime workDateTime = Convert.ToDateTime(datenow + " " + attendancerulEntity.WorkTime); | DateTime workDateTime = Convert.ToDateTime(datenow + " " + attendancerulEntity.WorkTime); | ||||
//上班考勤时间段 | //上班考勤时间段 | ||||
@@ -223,7 +218,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
//下班考勤时间段 | //下班考勤时间段 | ||||
DateTime signOutStartTime = Convert.ToDateTime(datenow + " " + attendancerulEntity.SignOutStartTime); | DateTime signOutStartTime = Convert.ToDateTime(datenow + " " + attendancerulEntity.SignOutStartTime); | ||||
DateTime signOutEndTime = Convert.ToDateTime(datenow + " " + attendancerulEntity.SignOutEndTime); | DateTime signOutEndTime = Convert.ToDateTime(datenow + " " + attendancerulEntity.SignOutEndTime); | ||||
//2021.12.30 上下班设置时间段打卡 | //2021.12.30 上下班设置时间段打卡 | ||||
#region 二次打卡 | #region 二次打卡 | ||||
@@ -442,7 +437,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql("insert into ADR_Record(ID, UserNo, ADType, ADTime, ClockTime, ClockStatus, ClockPlace, ADYear, ADMonth, ADDay, ADPhoto,ALon,ALat,AIsOut,ARemark) values(" + | this.BaseRepository("CollegeMIS").ExecuteBySql("insert into ADR_Record(ID, UserNo, ADType, ADTime, ClockTime, ClockStatus, ClockPlace, ADYear, ADMonth, ADDay, ADPhoto,ALon,ALat,AIsOut,ARemark) values(" + | ||||
"'" + adrRecordEntity.ID + "','" + adrRecordEntity.UserNo + "','" + adrRecordEntity.ADType + "','" + adrRecordEntity.ADTime + "'," + | "'" + adrRecordEntity.ID + "','" + adrRecordEntity.UserNo + "','" + adrRecordEntity.ADType + "','" + adrRecordEntity.ADTime + "'," + | ||||
"'" + adrRecordEntity.ClockTime + "','" + adrRecordEntity.ClockStatus + "','" + adrRecordEntity.ClockPlace + "','" + adrRecordEntity.ADYear + "'," + | "'" + adrRecordEntity.ClockTime + "','" + adrRecordEntity.ClockStatus + "','" + adrRecordEntity.ClockPlace + "','" + adrRecordEntity.ADYear + "'," + | ||||
"'" + adrRecordEntity.ADMonth + "','" + adrRecordEntity.ADDay + "','" + adrRecordEntity.ADPhoto + "',"+adrRecordEntity.ALon+","+adrRecordEntity.ALat+",'"+adrRecordEntity.AIsOut+"','"+adrRecordEntity.ARemark+"')"); | |||||
"'" + adrRecordEntity.ADMonth + "','" + adrRecordEntity.ADDay + "','" + adrRecordEntity.ADPhoto + "'," + adrRecordEntity.ALon + "," + adrRecordEntity.ALat + ",'" + adrRecordEntity.AIsOut + "','" + adrRecordEntity.ARemark + "')"); | |||||
return true; | return true; | ||||
} | } | ||||
#endregion | #endregion | ||||
@@ -1074,7 +1069,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
var adrresult = new ADR_RestrictionEntity(); | var adrresult = new ADR_RestrictionEntity(); | ||||
var userinfo = LoginUserInfo.Get(); | var userinfo = LoginUserInfo.Get(); | ||||
var empinfo = BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(m=>m.EmpNo==userinfo.account); | |||||
var empinfo = BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(m => m.EmpNo == userinfo.account); | |||||
//当前服务器日期 | //当前服务器日期 | ||||
var datenow = DateTime.Now.ToString("yyyy-MM-dd"); | var datenow = DateTime.Now.ToString("yyyy-MM-dd"); | ||||
@@ -1082,25 +1077,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
var EmpNo = LoginUserInfo.Get().account; | var EmpNo = LoginUserInfo.Get().account; | ||||
//首先获取考勤规则 | //首先获取考勤规则 | ||||
ADR_RestrictionEntity attendancerulEntity =null; | |||||
if (empinfo==null) | |||||
ADR_RestrictionEntity attendancerulEntity = null; | |||||
if (empinfo == null) | |||||
{ | { | ||||
adrresult.AttendanceType = 5; | adrresult.AttendanceType = 5; | ||||
adrresult.AttendanceTypeString = "不在考勤时间范围"; | adrresult.AttendanceTypeString = "不在考勤时间范围"; | ||||
return adrresult; | return adrresult; | ||||
} | } | ||||
//代课老师全天可以考勤 | //代课老师全天可以考勤 | ||||
if (empinfo.IsHasLesson==true) | |||||
if (empinfo.IsHasLesson == true) | |||||
{ | { | ||||
attendancerulEntity = this.BaseRepository("CollegeMIS").FindEntity<ADR_RestrictionEntity>(m => m.REnable == true&&m.AType==2); | |||||
attendancerulEntity = this.BaseRepository("CollegeMIS").FindEntity<ADR_RestrictionEntity>(m => m.REnable == true && m.AType == 2); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
attendancerulEntity = this.BaseRepository("CollegeMIS").FindEntity<ADR_RestrictionEntity>(m => m.REnable == true && m.AType == 1); | attendancerulEntity = this.BaseRepository("CollegeMIS").FindEntity<ADR_RestrictionEntity>(m => m.REnable == true && m.AType == 1); | ||||
} | } | ||||
//获取考勤日期 | //获取考勤日期 | ||||
var listday = this.BaseRepository("CollegeMIS").FindList<ADR_RestrictionDayEntity>(m=>m.RId== attendancerulEntity.ID); | |||||
if (listday==null||listday.Count(m => m.WorkDay.ToString("yyyy-MM-dd")== datenow)==0) | |||||
var listday = this.BaseRepository("CollegeMIS").FindList<ADR_RestrictionDayEntity>(m => m.RId == attendancerulEntity.ID); | |||||
if (listday == null || listday.Count(m => m.WorkDay.ToString("yyyy-MM-dd") == datenow) == 0) | |||||
{ | { | ||||
adrresult.AttendanceType = 5; | adrresult.AttendanceType = 5; | ||||
adrresult.AttendanceTypeString = "不在考勤时间范围"; | adrresult.AttendanceTypeString = "不在考勤时间范围"; | ||||
@@ -1127,8 +1122,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
//小于上班考勤开始时间或大于下班考勤结束时间,(超出打卡时间范围黄色) | //小于上班考勤开始时间或大于下班考勤结束时间,(超出打卡时间范围黄色) | ||||
if (datetimenow < signInStartTime || datetimenow > signOutEndTime) | if (datetimenow < signInStartTime || datetimenow > signOutEndTime) | ||||
{ | { | ||||
adrresult.AttendanceType =5; | |||||
adrresult.AttendanceTypeString= "不在考勤时间范围"; | |||||
adrresult.AttendanceType = 5; | |||||
adrresult.AttendanceTypeString = "不在考勤时间范围"; | |||||
return adrresult; | return adrresult; | ||||
} | } | ||||
string strTimeYear = (datetimenow.Year).ToString(); | string strTimeYear = (datetimenow.Year).ToString(); | ||||
@@ -1163,11 +1158,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
if (datetimenow > signInStartTime && datetimenow < workDateTimeFree && attendancerecordList.Count(x => x.ADType == "1") > 0) | if (datetimenow > signInStartTime && datetimenow < workDateTimeFree && attendancerecordList.Count(x => x.ADType == "1") > 0) | ||||
{ | { | ||||
//存在签退记录,更新下班时间 | //存在签退记录,更新下班时间 | ||||
if (attendancerecordList.Count(x => x.ADType == "2")>0) | |||||
if (attendancerecordList.Count(x => x.ADType == "2") > 0) | |||||
{ | { | ||||
adrresult.AttendanceType = 3; | adrresult.AttendanceType = 3; | ||||
adrresult.AttendanceTypeString = "早退打卡"; | adrresult.AttendanceTypeString = "早退打卡"; | ||||
adrresult.UserWorkTime = attendancerecordList.Where(m=>m.ADType=="1").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | |||||
adrresult.UserWorkTime = attendancerecordList.Where(m => m.ADType == "1").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | |||||
adrresult.UserCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | adrresult.UserCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | ||||
return adrresult; | return adrresult; | ||||
} | } | ||||
@@ -1189,7 +1184,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
//更新最晚下班时间 | //更新最晚下班时间 | ||||
adrresult.AttendanceType = 1; | adrresult.AttendanceType = 1; | ||||
adrresult.AttendanceTypeString = "正常打卡"; | adrresult.AttendanceTypeString = "正常打卡"; | ||||
adrresult.UserWorkTime = attendancerecordList.Where(m=>m.ADType=="1").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | |||||
adrresult.UserWorkTime = attendancerecordList.Where(m => m.ADType == "1").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | |||||
adrresult.UserCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | adrresult.UserCloseTime = attendancerecordList.Where(m => m.ADType == "2").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | ||||
return adrresult; | return adrresult; | ||||
} | } | ||||
@@ -1262,7 +1257,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrresult.AttendanceType = 1; | adrresult.AttendanceType = 1; | ||||
adrresult.AttendanceTypeString = "正常打卡"; | adrresult.AttendanceTypeString = "正常打卡"; | ||||
adrresult.WorkTime = attendancerecordList.Where(m => m.ADType == "7").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | adrresult.WorkTime = attendancerecordList.Where(m => m.ADType == "7").OrderByDescending(m => m.ADTime).First().ADTime.Value.ToString(); | ||||
return adrresult; | return adrresult; | ||||
} | } | ||||
//大于中午上班最晚签到时间 小于下午下班最早签退时间 | //大于中午上班最晚签到时间 小于下午下班最早签退时间 | ||||
@@ -1395,7 +1390,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindList<ADR_RestrictionDayEntity>(m=>m.RId== keyValue); | |||||
return this.BaseRepository("CollegeMIS").FindList<ADR_RestrictionDayEntity>(m => m.RId == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -1414,7 +1409,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").ExecuteBySql("delete from ADR_RestrictionDay where RId='"+keyValue+"'"); | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql("delete from ADR_RestrictionDay where RId='" + keyValue + "'"); | |||||
foreach (var item in entity) | foreach (var item in entity) | ||||
{ | { | ||||
item.Create(); | item.Create(); | ||||
@@ -1447,7 +1442,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
var datetimenow = DateTime.Now; | var datetimenow = DateTime.Now; | ||||
//首先获取考勤规则 | //首先获取考勤规则 | ||||
ADR_RestrictionEntity attendancerulEntity = null; | ADR_RestrictionEntity attendancerulEntity = null; | ||||
if (stuInfoBasic !=null) | |||||
if (stuInfoBasic != null) | |||||
{ | { | ||||
attendancerulEntity = this.BaseRepository("CollegeMIS") | attendancerulEntity = this.BaseRepository("CollegeMIS") | ||||
.FindEntity<ADR_RestrictionEntity>(m => m.REnable == true && m.AType == 2); | .FindEntity<ADR_RestrictionEntity>(m => m.REnable == true && m.AType == 2); | ||||
@@ -1465,19 +1460,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrresult.GPSAddr = attendancerulEntity.GPSAddr; | adrresult.GPSAddr = attendancerulEntity.GPSAddr; | ||||
//获取课表信息 | //获取课表信息 | ||||
//当前学年学期信息 | //当前学年学期信息 | ||||
var say=Common.GetSemesterAndYear(); | |||||
var say = Common.GetSemesterAndYear(); | |||||
//当天课程 | //当天课程 | ||||
//必修课 | //必修课 | ||||
var lessons = BaseRepository("CollegeMIS").FindList<ArrangeLessonTermEntity>(m => m.AcademicYearNo == say.AcademicYearShort && m.Semester == say.Semester | var lessons = BaseRepository("CollegeMIS").FindList<ArrangeLessonTermEntity>(m => m.AcademicYearNo == say.AcademicYearShort && m.Semester == say.Semester | ||||
&& m.DeptNo == stuInfoBasic.DeptNo && m.MajorNo == stuInfoBasic.MajorNo && m.TeachClassNo.Contains(stuInfoBasic.ClassNo) && m.LessonDate.Value== datenowdatetime); | |||||
&& m.DeptNo == stuInfoBasic.DeptNo && m.MajorNo == stuInfoBasic.MajorNo && m.TeachClassNo.Contains(stuInfoBasic.ClassNo) && m.LessonDate.Value == datenowdatetime); | |||||
//当前打卡课程判断 | //当前打卡课程判断 | ||||
foreach (var arrangeLessonTermEntity in lessons) | foreach (var arrangeLessonTermEntity in lessons) | ||||
{ | { | ||||
TimeSpan start = TimeSpan.Parse(arrangeLessonTermEntity.StartTime); | TimeSpan start = TimeSpan.Parse(arrangeLessonTermEntity.StartTime); | ||||
TimeSpan end = TimeSpan.Parse(arrangeLessonTermEntity.EndTime); | TimeSpan end = TimeSpan.Parse(arrangeLessonTermEntity.EndTime); | ||||
int StuAttendanceEarliestMinute=string.IsNullOrEmpty(Util.Config.GetValue("StuAttendanceEarliestMinute"))?Convert.ToInt32(Util.Config.GetValue("StuAttendanceEarliestMinute")) :0; | |||||
int StuAttendanceEarliestMinute = string.IsNullOrEmpty(Util.Config.GetValue("StuAttendanceEarliestMinute")) ? Convert.ToInt32(Util.Config.GetValue("StuAttendanceEarliestMinute")) : 0; | |||||
//当前时间小于等于上课时间,且大于开课前指定分钟 | //当前时间小于等于上课时间,且大于开课前指定分钟 | ||||
if (datetimenow.TimeOfDay<=start && datetimenow.TimeOfDay>= start.Add(-TimeSpan.FromMinutes(StuAttendanceEarliestMinute))) | |||||
if (datetimenow.TimeOfDay <= start && datetimenow.TimeOfDay >= start.Add(-TimeSpan.FromMinutes(StuAttendanceEarliestMinute))) | |||||
{ | { | ||||
adrresult.AttendanceType = 1; | adrresult.AttendanceType = 1; | ||||
adrresult.AttendanceTypeString = "正常签到"; | adrresult.AttendanceTypeString = "正常签到"; | ||||
@@ -1488,6 +1483,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(m => m.ClassroomNo == arrangeLessonTermEntity.ClassroomNo)?.ClassroomName; | adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(m => m.ClassroomNo == arrangeLessonTermEntity.ClassroomNo)?.ClassroomName; | ||||
adrresult.LessonSortNo = "1"; | adrresult.LessonSortNo = "1"; | ||||
adrresult.ALTId = arrangeLessonTermEntity.ALTId; | adrresult.ALTId = arrangeLessonTermEntity.ALTId; | ||||
//签到记录 | |||||
var classnotemp = arrangeLessonTermEntity.TeachClassNo.Replace(arrangeLessonTermEntity.LessonName, ""); | |||||
var attendanceEntity = BaseRepository("CollegeMIS").FindEntity<StuAttendanceEntity>(m => m.AcademicYearNo == say.AcademicYearShort && m.Semester == say.Semester | |||||
&& m.DeptNo == stuInfoBasic.DeptNo && m.MajorNo == stuInfoBasic.MajorNo && | |||||
m.LessonNo == arrangeLessonTermEntity.LessonNo && m.ClassNo == classnotemp && | |||||
m.EmpNo == arrangeLessonTermEntity.EmpNo && m.LessonDate == arrangeLessonTermEntity.LessonDate | |||||
&& m.StuNo == stuInfoBasic.StuNo); | |||||
if (attendanceEntity != null) | |||||
{ | |||||
adrresult.UserWorkTime = attendanceEntity.InertDate.ToString(); | |||||
} | |||||
return adrresult; | return adrresult; | ||||
} | } | ||||
//迟到打卡 | //迟到打卡 | ||||
@@ -1502,17 +1508,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(m => m.ClassroomNo == arrangeLessonTermEntity.ClassroomNo)?.ClassroomName; | adrresult.Classroom = BaseRepository("CollegeMIS").FindEntity<ClassroomInfoEntity>(m => m.ClassroomNo == arrangeLessonTermEntity.ClassroomNo)?.ClassroomName; | ||||
adrresult.LessonSortNo = "1"; | adrresult.LessonSortNo = "1"; | ||||
adrresult.ALTId = arrangeLessonTermEntity.ALTId; | adrresult.ALTId = arrangeLessonTermEntity.ALTId; | ||||
//签到记录 | |||||
var classnotemp = arrangeLessonTermEntity.TeachClassNo.Replace(arrangeLessonTermEntity.LessonName, ""); | |||||
var attendanceEntity = BaseRepository("CollegeMIS").FindEntity<StuAttendanceEntity>(m => m.AcademicYearNo == say.AcademicYearShort && m.Semester == say.Semester | |||||
&& m.DeptNo == stuInfoBasic.DeptNo && m.MajorNo == stuInfoBasic.MajorNo && | |||||
m.LessonNo == arrangeLessonTermEntity.LessonNo && m.ClassNo == classnotemp && | |||||
m.EmpNo == arrangeLessonTermEntity.EmpNo && m.LessonDate == arrangeLessonTermEntity.LessonDate | |||||
&& m.StuNo == stuInfoBasic.StuNo); | |||||
if (attendanceEntity != null) | |||||
{ | |||||
adrresult.UserWorkTime = attendanceEntity.InertDate.ToString(); | |||||
} | |||||
return adrresult; | return adrresult; | ||||
} | } | ||||
} | } | ||||
//选修课 | //选修课 | ||||
var AcademicYearNo = Common.GetSemesterAndYear(); | var AcademicYearNo = Common.GetSemesterAndYear(); | ||||
//当前学年学期选修课数据 | //当前学年学期选修课数据 | ||||
var arrangeLessonTermOfElectiveListOfCurrentSemester =BaseRepository("CollegeMIS").FindList<ArrangeLessonTermOfElectiveEntity>(m=>m.AcademicYearNo==AcademicYearNo.AcademicYearShort&&m.Semester==AcademicYearNo.Semester); | |||||
var arrangeLessonTermOfElectiveListOfCurrentSemester = BaseRepository("CollegeMIS").FindList<ArrangeLessonTermOfElectiveEntity>(m => m.AcademicYearNo == AcademicYearNo.AcademicYearShort && m.Semester == AcademicYearNo.Semester); | |||||
//选课数据 | //选课数据 | ||||
var stuselectlessonofelective = BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveEntity>(m=>m.StuNo== stuInfoBasic.StuNo&&m.AcademicYearNo== AcademicYearNo.AcademicYearShort&&m.Semester== AcademicYearNo.Semester); | |||||
var stuselectlessonofelective = BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveEntity>(m => m.StuNo == stuInfoBasic.StuNo && m.AcademicYearNo == AcademicYearNo.AcademicYearShort && m.Semester == AcademicYearNo.Semester); | |||||
//选修课课表集合 | //选修课课表集合 | ||||
List<ArrangeLessonTermOfElectiveEntity> arrangeLessonTermOfElectiveList =new List<ArrangeLessonTermOfElectiveEntity>(); | |||||
List<ArrangeLessonTermOfElectiveEntity> arrangeLessonTermOfElectiveList = new List<ArrangeLessonTermOfElectiveEntity>(); | |||||
foreach (var electiveEntity in stuselectlessonofelective) | foreach (var electiveEntity in stuselectlessonofelective) | ||||
{ | { | ||||
if (electiveEntity.LessonSection.Contains(",")) | if (electiveEntity.LessonSection.Contains(",")) | ||||
@@ -1520,23 +1537,23 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
string[] lessonsection = electiveEntity.LessonSection.Split(','); | string[] lessonsection = electiveEntity.LessonSection.Split(','); | ||||
//foreach (var s in lessonsection) | //foreach (var s in lessonsection) | ||||
//{ | //{ | ||||
var currentstudentelective = arrangeLessonTermOfElectiveListOfCurrentSemester.Where(m => m.AcademicYearNo == electiveEntity.AcademicYearNo && m.Semester == electiveEntity.Semester | |||||
&& m.LessonNo == electiveEntity.LessonNo && m.EmpNo == electiveEntity.EmpNo && m.ClassRoomNo == electiveEntity.ClassRoomNo && (m.LessonSection==lessonsection[0]||m.LessonSection == lessonsection[1])); | |||||
var currentstudentelective = arrangeLessonTermOfElectiveListOfCurrentSemester.Where(m => m.AcademicYearNo == electiveEntity.AcademicYearNo && m.Semester == electiveEntity.Semester | |||||
&& m.LessonNo == electiveEntity.LessonNo && m.EmpNo == electiveEntity.EmpNo && m.ClassRoomNo == electiveEntity.ClassRoomNo && (m.LessonSection == lessonsection[0] || m.LessonSection == lessonsection[1])); | |||||
//有可能报错?//todo | //有可能报错?//todo | ||||
arrangeLessonTermOfElectiveList.InsertRange(0,currentstudentelective.ToList()); | |||||
arrangeLessonTermOfElectiveList.InsertRange(0, currentstudentelective.ToList()); | |||||
//} | //} | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
var currentstudentelective = arrangeLessonTermOfElectiveListOfCurrentSemester.Where(m => m.AcademicYearNo == electiveEntity.AcademicYearNo && m.Semester == electiveEntity.Semester | var currentstudentelective = arrangeLessonTermOfElectiveListOfCurrentSemester.Where(m => m.AcademicYearNo == electiveEntity.AcademicYearNo && m.Semester == electiveEntity.Semester | ||||
&& m.LessonNo == electiveEntity.LessonNo && m.EmpNo == electiveEntity.EmpNo && m.ClassRoomNo == electiveEntity.ClassRoomNo &&m.LessonSection == electiveEntity.LessonSection); | |||||
&& m.LessonNo == electiveEntity.LessonNo && m.EmpNo == electiveEntity.EmpNo && m.ClassRoomNo == electiveEntity.ClassRoomNo && m.LessonSection == electiveEntity.LessonSection); | |||||
//有可能报错?//todo | //有可能报错?//todo | ||||
arrangeLessonTermOfElectiveList.InsertRange(0, currentstudentelective.ToList()); | arrangeLessonTermOfElectiveList.InsertRange(0, currentstudentelective.ToList()); | ||||
} | } | ||||
} | } | ||||
var lessonelective = arrangeLessonTermOfElectiveList.Where(m=> m.LessonDate.Value.ToString("yyyy-MM-dd") == datenow&&m.LessonTime.Contains("-")); | |||||
var lessonelective = arrangeLessonTermOfElectiveList.Where(m => m.LessonDate.Value.ToString("yyyy-MM-dd") == datenow && m.LessonTime.Contains("-")); | |||||
//当前打卡课程判断 | //当前打卡课程判断 | ||||
foreach (var arrangeLessonTermEntity in lessonelective) | foreach (var arrangeLessonTermEntity in lessonelective) | ||||
{ | { | ||||
@@ -1606,22 +1623,23 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var userinfo=LoginUserInfo.Get(); | |||||
var stuinfo= BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(m => m.StuNo == userinfo.account); | |||||
var userinfo = LoginUserInfo.Get(); | |||||
var stuinfo = BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(m => m.StuNo == userinfo.account); | |||||
var dept = BaseRepository("CollegeMIS").FindList<CdDeptEntity>(); | var dept = BaseRepository("CollegeMIS").FindList<CdDeptEntity>(); | ||||
var major = BaseRepository("CollegeMIS").FindList<CdMajorEntity>(m=>m.CheckMark==true); | |||||
var classinfo = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(m=>m.CheckMark==true); | |||||
var classroom = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>(m=>m.CheckMark==true); | |||||
StuAttendanceEntity attendanceEntity=new StuAttendanceEntity(); | |||||
var major = BaseRepository("CollegeMIS").FindList<CdMajorEntity>(m => m.CheckMark == true); | |||||
var classinfo = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(m => m.CheckMark == true); | |||||
var classroom = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>(m => m.CheckMark == true); | |||||
StuAttendanceEntity attendanceEntity = new StuAttendanceEntity(); | |||||
attendanceEntity.Create(); | attendanceEntity.Create(); | ||||
if (lessonSortNo=="1") | |||||
if (lessonSortNo == "1") | |||||
{ | { | ||||
var arrangelessonterm = base.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonTermEntity>(m=>m.ALTId==altId); | |||||
var arrangelessonterm = base.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonTermEntity>(m => m.ALTId == altId); | |||||
attendanceEntity.ALTId = altId; | |||||
attendanceEntity.AcademicYearNo = arrangelessonterm.AcademicYearNo; | attendanceEntity.AcademicYearNo = arrangelessonterm.AcademicYearNo; | ||||
attendanceEntity.Semester = arrangelessonterm.Semester; | attendanceEntity.Semester = arrangelessonterm.Semester; | ||||
attendanceEntity.StuNo = stuinfo.StuNo; | attendanceEntity.StuNo = stuinfo.StuNo; | ||||
attendanceEntity.StuName = stuinfo.StuName; | attendanceEntity.StuName = stuinfo.StuName; | ||||
attendanceEntity.Gender = stuinfo.GenderNo.Value?"男":"女"; | |||||
attendanceEntity.Gender = stuinfo.GenderNo.Value ? "男" : "女"; | |||||
attendanceEntity.Grade = stuinfo.Grade; | attendanceEntity.Grade = stuinfo.Grade; | ||||
attendanceEntity.DeptNo = stuinfo.DeptNo; | attendanceEntity.DeptNo = stuinfo.DeptNo; | ||||
attendanceEntity.DeptName = dept.FirstOrDefault(m => m.DeptNo == stuinfo.DeptNo)?.DeptName; | attendanceEntity.DeptName = dept.FirstOrDefault(m => m.DeptNo == stuinfo.DeptNo)?.DeptName; | ||||
@@ -1667,6 +1685,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
if (lessonSortNo == "2") | if (lessonSortNo == "2") | ||||
{ | { | ||||
var arrangeLessonTermOfElective = base.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonTermOfElectiveEntity>(m => m.Id == alToeId); | var arrangeLessonTermOfElective = base.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonTermOfElectiveEntity>(m => m.Id == alToeId); | ||||
attendanceEntity.ALTOEId = alToeId; | |||||
attendanceEntity.AcademicYearNo = arrangeLessonTermOfElective.AcademicYearNo; | attendanceEntity.AcademicYearNo = arrangeLessonTermOfElective.AcademicYearNo; | ||||
attendanceEntity.Semester = arrangeLessonTermOfElective.Semester; | attendanceEntity.Semester = arrangeLessonTermOfElective.Semester; | ||||
attendanceEntity.StuNo = stuinfo.StuNo; | attendanceEntity.StuNo = stuinfo.StuNo; | ||||
@@ -620,7 +620,7 @@ | |||||
{ | { | ||||
"path": "pages/EducationalAdministration/StuAttendanceLeave/list", | "path": "pages/EducationalAdministration/StuAttendanceLeave/list", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "请假管理" | |||||
"navigationBarTitleText": "学生课表请假审核" | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -629,6 +629,12 @@ | |||||
"navigationBarTitleText": "审核" | "navigationBarTitleText": "审核" | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
"path": "pages/EducationalAdministration/StuAttendanceLeave/IndexInStudent/list", | |||||
"style": { | |||||
"navigationBarTitleText": "课表请假管理" | |||||
} | |||||
}, | |||||
//疫情详细信息 | //疫情详细信息 | ||||
{ | { | ||||
"path": "pages/PersonnelManagement/ContactsDetails/list", | "path": "pages/PersonnelManagement/ContactsDetails/list", | ||||
@@ -934,13 +940,13 @@ | |||||
{ | { | ||||
"path": "pages/EducationalAdministration/StuLeaveManagement/Check/list", | "path": "pages/EducationalAdministration/StuLeaveManagement/Check/list", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "学生按天请假查看" | |||||
"navigationBarTitleText": "学生按天请假审核" | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"path": "pages/EducationalAdministration/StuLeaveManagement/Check/single", | "path": "pages/EducationalAdministration/StuLeaveManagement/Check/single", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "学生按天请假详情" | |||||
"navigationBarTitleText": "审核" | |||||
} | } | ||||
}, | }, | ||||
//教学工作量 | //教学工作量 | ||||
@@ -0,0 +1,523 @@ | |||||
<template> | |||||
<view class="page"> | |||||
<!-- 主列表页 --> | |||||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;"> | |||||
<!-- 顶部条目/分页信息栏 --> | |||||
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner> | |||||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||||
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> | |||||
<l-customlist :tips="loadState" showTips> | |||||
<!-- 单条记录 --> | |||||
<view class="customlist-item" v-for="item of list" :key="item.Id"> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">申请时间:</text> | |||||
{{ displayListItem(item, 'UpdateDate') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">审核状态:</text> | |||||
{{ LeaveCheckItem(displayListItem(item, 'IsCheck')) }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">审核备注:</text> | |||||
{{ displayListItem(item, 'TecRemark') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">请假类型:</text> | |||||
{{ displayListItem(item, 'LeaveType') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">学年:</text> | |||||
{{ displayListItem(item, 'AcademicYearNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">学期:</text> | |||||
{{ displayListItem(item, 'Semester') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">学号:</text> | |||||
{{ displayListItem(item, 'StuNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">姓名:</text> | |||||
{{ displayListItem(item, 'StuName') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">年级:</text> | |||||
{{ displayListItem(item, 'Grade') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">系所码:</text> | |||||
{{ displayListItem(item, 'DeptNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">系名:</text> | |||||
{{ displayListItem(item, 'DeptName') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">专业码:</text> | |||||
{{ displayListItem(item, 'MajorNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">专业名:</text> | |||||
{{ displayListItem(item, 'MajorName') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">所在行政班号:</text> | |||||
{{ displayListItem(item, 'ClassNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">班级名称:</text> | |||||
{{ displayListItem(item, 'ClassName') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">课程号:</text> | |||||
{{ displayListItem(item, 'LessonNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">课程名称:</text> | |||||
{{ displayListItem(item, 'LessonName') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">课程类别码:</text> | |||||
{{ displayListItem(item, 'LessonSortNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">课程类别:</text> | |||||
{{ displayListItem(item, 'LessonSortName') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">原上课日期:</text> | |||||
{{itmeDel(displayListItem(item, 'LessonDate')) }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">上课时间:</text> | |||||
{{ displayListItem(item, 'LessonTime') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">教师号:</text> | |||||
{{ displayListItem(item, 'EmpNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">备注:</text> | |||||
{{ displayListItem(item, 'Remark') }} | |||||
</view> | |||||
<!-- <l-customlist-action showDelete @delete="action('delete', item.ID)" /> | |||||
--> | |||||
<view class="customlist-banner-action" v-if="!item.IsCheck"> | |||||
<view @click="delaction(item)" class="customlist-banner-action-btn line-red text-sm" | |||||
style="border: currentColor 1px solid"> | |||||
<l-icon type="delete" /> | |||||
删除 | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</l-customlist> | |||||
</l-scroll-list> | |||||
</view> | |||||
<!-- 关闭侧边抽屉按钮 --> | |||||
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose"> | |||||
<l-icon type="pullright" color="blue" /> | |||||
</view> | |||||
<!-- 侧边栏,用于设置查询条件 --> | |||||
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> | |||||
<view v-if="ready" class="padding"> | |||||
<l-input v-model="queryData.LessonName" @change="searchChange" title="课程名称" placeholder="按课程名称查询" /> | |||||
<l-input v-model="queryData.Grade" @change="searchChange" title="年级" placeholder="按年级查询" /> | |||||
<l-input v-model="queryData.StuName" @change="searchChange" title="姓名" placeholder="按姓名查询" /> | |||||
<l-input v-model="queryData.EmpNo" @change="searchChange" title="教师号" placeholder="按教师号查询" /> | |||||
<!-- 重置查询条件按钮 --> | |||||
<view class="padding-tb"> | |||||
<l-button @click="reset" line="orange" class="block" block>重置查询条件</l-button> | |||||
</view> | |||||
</view> | |||||
</scroll-view> | |||||
<!-- <l-customlist-add v-if="!sideOpen" @click="action('add')" /> --> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
/* | |||||
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 上海力软信息技术有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-10-20 15:22 | |||||
* 描 述:aaa | |||||
*/ | |||||
/** | |||||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||||
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录: | |||||
* { "path": "pages/EducationalAdministration/StuAttendanceLeave/list", "style": { "navigationBarTitleText": "表单列表页" } } | |||||
* | |||||
* (navigationBarTitleText 字段为本页面的标题文本,可以修改) | |||||
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件) | |||||
*/ | |||||
import moment from 'moment' | |||||
import get from 'lodash/get' | |||||
import set from 'lodash/set' | |||||
import pickBy from 'lodash/pickBy' | |||||
import mapValues from 'lodash/mapValues' | |||||
export default { | |||||
data() { | |||||
return { | |||||
// 数据项的数据类型、结构 | |||||
scheme: { | |||||
UpdateDate: { | |||||
type: 'text' | |||||
}, | |||||
IsCheck: { | |||||
type: 'text' | |||||
}, | |||||
TecRemark: { | |||||
type: 'text' | |||||
}, | |||||
LeaveType: { | |||||
type: "select",dataSource: '1', dataSourceId: 'LeaveType' | |||||
}, | |||||
AcademicYearNo: { | |||||
type: 'text' | |||||
}, | |||||
Semester: { | |||||
type: 'text' | |||||
}, | |||||
StuNo: { | |||||
type: 'text' | |||||
}, | |||||
StuName: { | |||||
type: 'text' | |||||
}, | |||||
Grade: { | |||||
type: 'text' | |||||
}, | |||||
DeptNo: { | |||||
type: 'text' | |||||
}, | |||||
DeptName: { | |||||
type: 'text' | |||||
}, | |||||
MajorNo: { | |||||
type: 'text' | |||||
}, | |||||
MajorName: { | |||||
type: 'text' | |||||
}, | |||||
ClassNo: { | |||||
type: 'text' | |||||
}, | |||||
ClassName: { | |||||
type: 'text' | |||||
}, | |||||
LessonNo: { | |||||
type: 'text' | |||||
}, | |||||
LessonName: { | |||||
type: 'text' | |||||
}, | |||||
LessonSortNo: { | |||||
type: 'text' | |||||
}, | |||||
LessonSortName: { | |||||
type: 'text' | |||||
}, | |||||
LessonDate: { | |||||
type: 'text' | |||||
}, | |||||
LessonTime: { | |||||
type: 'text' | |||||
}, | |||||
EmpNo: { | |||||
type: 'text' | |||||
}, | |||||
Remark: { | |||||
type: 'text' | |||||
}, | |||||
}, | |||||
// 查询条件 | |||||
searchData: {}, | |||||
defaultQueryData: {}, | |||||
queryData: { | |||||
StuNo: '', | |||||
StuName: '', | |||||
}, | |||||
// 数据源 | |||||
dataSource: { | |||||
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({ | |||||
value: t.value, | |||||
text: t.text | |||||
})), | |||||
}, | |||||
// 页面相关参数 | |||||
ready: false, | |||||
tips: '加载中...', | |||||
loadState: '向下翻以加载更多', | |||||
sideOpen: false, | |||||
// 列表与分页信息 | |||||
page: 1, | |||||
total: 2, | |||||
list: [], | |||||
user: null, | |||||
} | |||||
}, | |||||
async onLoad() { | |||||
await this.init() | |||||
}, | |||||
onUnload() { | |||||
this.OFF('EducationalAdministrationStuAttendanceLeave-list-change') | |||||
}, | |||||
methods: { | |||||
// 页面初始化 | |||||
async init() { | |||||
this.ON('EducationalAdministrationStuAttendanceLeave-list-change', this.refreshList) | |||||
// 拉取加载列表和数据源 | |||||
await Promise.all([ | |||||
() => {} | |||||
]) | |||||
// console.log(this.user) | |||||
await this.fetchList() | |||||
// 初始化查询条件 | |||||
this.defaultQueryData = this.COPY(this.queryData) | |||||
this.ready = true | |||||
}, | |||||
// 拉取列表 | |||||
async fetchList() { | |||||
if (this.page > this.total) { | |||||
return | |||||
} | |||||
const result = await this.HTTP_GET( | |||||
'learun/adms/EducationalAdministration/StuAttendanceLeave/pagelist', { | |||||
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) | |||||
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序 | |||||
pagination: { | |||||
rows: 10, | |||||
page: this.page, | |||||
sidx: 'UpdateDate', | |||||
sord: 'DESC' | |||||
}, | |||||
queryJson: JSON.stringify(Object.assign(this.searchData, { | |||||
StuNo: this.user.account | |||||
})), | |||||
}, | |||||
'加载数据时出错' | |||||
) | |||||
if (!result) { | |||||
return | |||||
} | |||||
this.total = result.total | |||||
this.page = result.page + 1 | |||||
this.list = this.list.concat(result.rows) | |||||
// console.log(this.list) | |||||
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` | |||||
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' | |||||
}, | |||||
// 刷新清空列表 | |||||
async refreshList() { | |||||
this.page = 1 | |||||
this.total = 2 | |||||
this.list = [] | |||||
await this.fetchList() | |||||
}, | |||||
// 列表下拉 | |||||
pullDown() { | |||||
this.refreshList().then(() => { | |||||
this.$refs.list.stopPullDown() | |||||
}) | |||||
}, | |||||
// 设置搜索条件 | |||||
async searchChange() { | |||||
const result = {} | |||||
// 将其他查询项添加到查询 JSON 中 | |||||
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) | |||||
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) | |||||
this.searchData = result | |||||
await this.refreshList() | |||||
}, | |||||
// 点击「清空查询条件」按钮 | |||||
reset() { | |||||
this.queryData = this.COPY(this.defaultQueryData) | |||||
this.searchChange() | |||||
}, | |||||
// 点击「编辑」、「查看」、「添加」、「删除」按钮 | |||||
async action(type, id = '') { | |||||
switch (type) { | |||||
case 'view': | |||||
this.NAV_TO(`./single?type=view&id=${id}`) | |||||
return | |||||
case 'add': | |||||
this.NAV_TO('./single?type=create') | |||||
return | |||||
case 'edit': | |||||
this.NAV_TO(`./single?type=edit&id=${id}`) | |||||
return | |||||
case 'delete': | |||||
if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) { | |||||
return | |||||
} | |||||
this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/delete', id, '删除失败') | |||||
.then(success => { | |||||
if (!success) { | |||||
return | |||||
} | |||||
this.TOAST('删除成功', 'success') | |||||
this.refreshList() | |||||
}) | |||||
return | |||||
default: | |||||
return | |||||
} | |||||
}, | |||||
// 删除 | |||||
delaction(item) { | |||||
// console.log(item) | |||||
if (item.IsCheck == 1 || item.IsCheck == 2) { | |||||
this.TOAST('当前项已审核,无法删除', 'error') | |||||
} else { | |||||
this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/delete', item.ID, '删除失败') | |||||
.then(success => { | |||||
if (!success) { | |||||
return | |||||
} | |||||
this.TOAST('删除成功', 'success') | |||||
this.refreshList() | |||||
}) | |||||
} | |||||
}, | |||||
// 显示列表中的标题项 | |||||
displayListItem(item, field) { | |||||
const fieldItem = this.scheme[field] | |||||
const value = item[field] | |||||
switch (fieldItem.type) { | |||||
case 'currentInfo': | |||||
case 'organize': | |||||
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), | |||||
`${value}.name`, '') | |||||
case 'radio': | |||||
case 'select': | |||||
const selectItem = this.dataSource[field].find(t => t.value === String(value)) | |||||
return get(selectItem, 'text', '') | |||||
case 'checkbox': | |||||
if (!value || value.split(',').length <= 0) { | |||||
return '' | |||||
} | |||||
const checkboxItems = value.split(',') | |||||
return this.dataSource[field].filter(t => checkboxItems.includes(t.value)).map(t => t.text).join( | |||||
',') | |||||
case 'datetime': | |||||
if (!value) { | |||||
return '' | |||||
} | |||||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : | |||||
'YYYY-MM-DD HH:mm') | |||||
default: | |||||
return value === null || value === undefined ? '' : value | |||||
} | |||||
}, | |||||
// 请假审核 | |||||
LeaveCheckItem(data) { | |||||
switch (data) { | |||||
case '1': | |||||
return '同意'; | |||||
break; | |||||
case '2': | |||||
return '不同意'; | |||||
break; | |||||
default: | |||||
return '申请中' | |||||
} | |||||
}, | |||||
itmeDel(data){ | |||||
var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(data) | |||||
return newDate[0] | |||||
} | |||||
}, | |||||
created() { | |||||
this.user = this.GET_GLOBAL('loginUser'); | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="less" scoped> | |||||
@import '~@/common/css/sidepage.less'; | |||||
@import '~@/common/css/customlist.less'; | |||||
.customlist-banner-action { | |||||
margin-top: 20rpx; | |||||
text-align: right; | |||||
.customlist-banner-action-btn { | |||||
display: inline-block; | |||||
padding: 4px 6px; | |||||
margin: 0 3px; | |||||
border-radius: 3px; | |||||
text-align: center; | |||||
} | |||||
} | |||||
</style> |
@@ -10,7 +10,23 @@ | |||||
<l-customlist :tips="loadState" showTips> | <l-customlist :tips="loadState" showTips> | ||||
<!-- 单条记录 --> | <!-- 单条记录 --> | ||||
<view class="customlist-item" v-for="item of list" :key="item.Id"> | <view class="customlist-item" v-for="item of list" :key="item.Id"> | ||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">申请时间:</text> | |||||
{{ displayListItem(item, 'UpdateDate') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">审核状态:</text> | |||||
{{ IsCheckitem(displayListItem(item, 'IsCheck')) }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">原上课时间:</text> | |||||
{{itmeDel(displayListItem(item, 'LessonDate')) }} | |||||
</view> | |||||
<view class="customlist-item-field"> | <view class="customlist-item-field"> | ||||
<text class="customlist-item-field-title">学年度:</text> | <text class="customlist-item-field-title">学年度:</text> | ||||
{{ displayListItem(item, 'AcademicYearNo') }} | {{ displayListItem(item, 'AcademicYearNo') }} | ||||
@@ -62,7 +78,7 @@ | |||||
</view> | </view> | ||||
<l-customlist-action showButton buttonText="审核" @join="action('check',item.Id)" @view="action('view', item.Id)" /> | |||||
<l-customlist-action :showButton="!item.IsCheck" buttonText="审核" @join="action('check',item.ID)" @view="action('view', item.ID)" /> | |||||
</view> | </view> | ||||
</l-customlist> | </l-customlist> | ||||
</l-scroll-list> | </l-scroll-list> | ||||
@@ -131,6 +147,9 @@ export default { | |||||
return { | return { | ||||
// 数据项的数据类型、结构 | // 数据项的数据类型、结构 | ||||
scheme: { | scheme: { | ||||
UpdateDate:{type: 'text'}, | |||||
IsCheck:{type: 'text'}, | |||||
LessonDate:{type: 'text'}, | |||||
AcademicYearNo: { type: 'text' }, | AcademicYearNo: { type: 'text' }, | ||||
Semester: { type: 'text' }, | Semester: { type: 'text' }, | ||||
StuNo: { type: 'text' }, | StuNo: { type: 'text' }, | ||||
@@ -138,8 +157,8 @@ export default { | |||||
Grade: { type: 'text' }, | Grade: { type: 'text' }, | ||||
DeptNo: { type: 'text' }, | DeptNo: { type: 'text' }, | ||||
DeptName: { type: 'text' }, | DeptName: { type: 'text' }, | ||||
MajorNo: { type: 'text' }, | |||||
MajorName: { type: 'text' }, | |||||
MajorNo: { type: "text" }, | |||||
MajorName: { type: "text" }, | |||||
ClassNo: { type: 'text' }, | ClassNo: { type: 'text' }, | ||||
}, | }, | ||||
@@ -153,6 +172,7 @@ export default { | |||||
// 数据源 | // 数据源 | ||||
dataSource: { | dataSource: { | ||||
MajorNo:[] | |||||
}, | }, | ||||
// 页面相关参数 | // 页面相关参数 | ||||
@@ -164,7 +184,8 @@ export default { | |||||
// 列表与分页信息 | // 列表与分页信息 | ||||
page: 1, | page: 1, | ||||
total: 2, | total: 2, | ||||
list: [] | |||||
list: [], | |||||
user: null | |||||
} | } | ||||
}, | }, | ||||
@@ -182,8 +203,9 @@ export default { | |||||
// 拉取加载列表和数据源 | // 拉取加载列表和数据源 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('CdMajorInfo').then(result => { | |||||
this.dataSource.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | |||||
}), | |||||
() => {} | () => {} | ||||
]) | ]) | ||||
await this.fetchList() | await this.fetchList() | ||||
@@ -201,8 +223,8 @@ export default { | |||||
{ | { | ||||
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) | // 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) | ||||
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序 | // 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序 | ||||
pagination: { rows: 10, page: this.page, sidx: 'Id', sord: 'DESC' }, | |||||
queryJson: JSON.stringify(this.searchData) | |||||
pagination: { rows: 10, page: this.page, sidx: 'UpdateDate', sord: 'DESC' }, | |||||
queryJson: JSON.stringify(Object.assign(this.searchData,{ClassManagerNo:this.user.account})) | |||||
}, | }, | ||||
'加载数据时出错' | '加载数据时出错' | ||||
) | ) | ||||
@@ -277,7 +299,11 @@ export default { | |||||
this.refreshList() | this.refreshList() | ||||
}) | }) | ||||
return | return | ||||
case 'check': | |||||
this.NAV_TO(`./single?type=edit&id=${id}`) | |||||
return | |||||
default: | default: | ||||
return | return | ||||
} | } | ||||
@@ -309,9 +335,24 @@ export default { | |||||
default: return value === null || value === undefined ? '' : value | default: return value === null || value === undefined ? '' : value | ||||
} | } | ||||
} | |||||
} | |||||
}, | |||||
IsCheckitem(data){ | |||||
if(data){ | |||||
return data == 1?'同意':'不同意' | |||||
}else{ | |||||
return '待审核' | |||||
} | |||||
}, | |||||
itmeDel(data){ | |||||
var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(data) | |||||
return newDate[0] | |||||
} | |||||
}, | |||||
created() { | |||||
this.user = this.GET_GLOBAL('loginUser'); | |||||
}, | |||||
} | } | ||||
</script> | </script> | ||||
@@ -4,128 +4,128 @@ | |||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.AcademicYearNo', $event)" | @input="setValue('StuAttendanceLeave.AcademicYearNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.AcademicYearNo')" | :value="getValue('StuAttendanceLeave.AcademicYearNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="学年度" | title="学年度" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.Semester', $event)" | @input="setValue('StuAttendanceLeave.Semester', $event)" | ||||
:value="getValue('StuAttendanceLeave.Semester')" | :value="getValue('StuAttendanceLeave.Semester')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="学期" | title="学期" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.StuNo', $event)" | @input="setValue('StuAttendanceLeave.StuNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.StuNo')" | :value="getValue('StuAttendanceLeave.StuNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="学号" | title="学号" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.StuName', $event)" | @input="setValue('StuAttendanceLeave.StuName', $event)" | ||||
:value="getValue('StuAttendanceLeave.StuName')" | :value="getValue('StuAttendanceLeave.StuName')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="姓名" | title="姓名" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.Grade', $event)" | @input="setValue('StuAttendanceLeave.Grade', $event)" | ||||
:value="getValue('StuAttendanceLeave.Grade')" | :value="getValue('StuAttendanceLeave.Grade')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="年级" | title="年级" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.EmpNo', $event)" | @input="setValue('StuAttendanceLeave.EmpNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.EmpNo')" | :value="getValue('StuAttendanceLeave.EmpNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="教师号" | title="教师号" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.DeptNo', $event)" | @input="setValue('StuAttendanceLeave.DeptNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.DeptNo')" | :value="getValue('StuAttendanceLeave.DeptNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="系所码" | title="系所码" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.DeptName', $event)" | @input="setValue('StuAttendanceLeave.DeptName', $event)" | ||||
:value="getValue('StuAttendanceLeave.DeptName')" | :value="getValue('StuAttendanceLeave.DeptName')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="系名" | title="系名" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.MajorNo', $event)" | @input="setValue('StuAttendanceLeave.MajorNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.MajorNo')" | :value="getValue('StuAttendanceLeave.MajorNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="专业码" | title="专业码" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.MajorName', $event)" | @input="setValue('StuAttendanceLeave.MajorName', $event)" | ||||
:value="getValue('StuAttendanceLeave.MajorName')" | :value="getValue('StuAttendanceLeave.MajorName')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="专业名" | title="专业名" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.ClassNo', $event)" | @input="setValue('StuAttendanceLeave.ClassNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.ClassNo')" | :value="getValue('StuAttendanceLeave.ClassNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="所在行政班号" | title="所在行政班号" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.ClassName', $event)" | @input="setValue('StuAttendanceLeave.ClassName', $event)" | ||||
:value="getValue('StuAttendanceLeave.ClassName')" | :value="getValue('StuAttendanceLeave.ClassName')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="班级名称" | title="班级名称" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.LessonNo', $event)" | @input="setValue('StuAttendanceLeave.LessonNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.LessonNo')" | :value="getValue('StuAttendanceLeave.LessonNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="课程号" | title="课程号" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.LessonName', $event)" | @input="setValue('StuAttendanceLeave.LessonName', $event)" | ||||
:value="getValue('StuAttendanceLeave.LessonName')" | :value="getValue('StuAttendanceLeave.LessonName')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="课程名称" | title="课程名称" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.LessonSortNo', $event)" | @input="setValue('StuAttendanceLeave.LessonSortNo', $event)" | ||||
:value="getValue('StuAttendanceLeave.LessonSortNo')" | :value="getValue('StuAttendanceLeave.LessonSortNo')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="课程类别码" | title="课程类别码" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.LessonSortName', $event)" | @input="setValue('StuAttendanceLeave.LessonSortName', $event)" | ||||
:value="getValue('StuAttendanceLeave.LessonSortName')" | :value="getValue('StuAttendanceLeave.LessonSortName')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="课程类别" | title="课程类别" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.LessonDate', $event)" | @input="setValue('StuAttendanceLeave.LessonDate', $event)" | ||||
:value="getValue('StuAttendanceLeave.LessonDate')" | |||||
:disabled="!edit" | |||||
:value="itmeDel(getValue('StuAttendanceLeave.LessonDate'))" | |||||
disabled | |||||
title="原上课日期" | title="原上课日期" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.LessonTime', $event)" | @input="setValue('StuAttendanceLeave.LessonTime', $event)" | ||||
:value="getValue('StuAttendanceLeave.LessonTime')" | :value="getValue('StuAttendanceLeave.LessonTime')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="上课时间" | title="上课时间" | ||||
/> | /> | ||||
<l-input | <l-input | ||||
@input="setValue('StuAttendanceLeave.PlanWeek', $event)" | @input="setValue('StuAttendanceLeave.PlanWeek', $event)" | ||||
:value="getValue('StuAttendanceLeave.PlanWeek')" | :value="getValue('StuAttendanceLeave.PlanWeek')" | ||||
:disabled="!edit" | |||||
disabled | |||||
title="教学周次" | title="教学周次" | ||||
/> | /> | ||||
<l-select | <l-select | ||||
@input="setValue('StuAttendanceLeave.LeaveType', $event)" | @input="setValue('StuAttendanceLeave.LeaveType', $event)" | ||||
:value="getValue('StuAttendanceLeave.LeaveType')" | :value="getValue('StuAttendanceLeave.LeaveType')" | ||||
:disabled="!edit" | |||||
disabled | |||||
:range="dataSource.StuAttendanceLeave.LeaveType" | :range="dataSource.StuAttendanceLeave.LeaveType" | ||||
title="请假类型" | title="请假类型" | ||||
/> | /> | ||||
<l-textarea | <l-textarea | ||||
@input="setValue('StuAttendanceLeave.Remark', $event)" | @input="setValue('StuAttendanceLeave.Remark', $event)" | ||||
:value="getValue('StuAttendanceLeave.Remark')" | :value="getValue('StuAttendanceLeave.Remark')" | ||||
:readonly="!edit" | |||||
readonly | |||||
title="备注" | title="备注" | ||||
/> | /> | ||||
<l-select | <l-select | ||||
@@ -133,7 +133,7 @@ | |||||
:value="getValue('StuAttendanceLeave.IsCheck')" | :value="getValue('StuAttendanceLeave.IsCheck')" | ||||
:disabled="!edit" | :disabled="!edit" | ||||
:range="dataSource.StuAttendanceLeave.IsCheck" | :range="dataSource.StuAttendanceLeave.IsCheck" | ||||
title="下拉框" | |||||
title="审核意见" | |||||
/> | /> | ||||
<l-textarea | <l-textarea | ||||
@input="setValue('StuAttendanceLeave.TecRemark', $event)" | @input="setValue('StuAttendanceLeave.TecRemark', $event)" | ||||
@@ -142,20 +142,20 @@ | |||||
title="备注" | title="备注" | ||||
/> | /> | ||||
</view> | </view> | ||||
<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | |||||
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | |||||
<!-- v-if="ready" --> | |||||
<view v-if="edit" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | |||||
<l-button @click="action('save')" size="lg" color="green" class="block margin-top" block> | |||||
提交保存 | 提交保存 | ||||
</l-button> | </l-button> | ||||
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block> | |||||
<!-- <l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block> | |||||
编辑本页 | 编辑本页 | ||||
</l-button> | </l-button> | ||||
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block> | <l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block> | ||||
取消编辑 | 取消编辑 | ||||
</l-button> | |||||
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block> | |||||
</l-button> --> | |||||
<!-- <l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block> | |||||
删除 | 删除 | ||||
</l-button> | |||||
</l-button> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
@@ -344,7 +344,11 @@ export default { | |||||
// 设置表单值 | // 设置表单值 | ||||
setValue(path, val) { | setValue(path, val) { | ||||
set(this.current, path, val) | set(this.current, path, val) | ||||
} | |||||
}, | |||||
itmeDel(data){ | |||||
var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(data) | |||||
return newDate[0] | |||||
} | |||||
} | } | ||||
} | } | ||||
</script> | </script> |
@@ -48,8 +48,8 @@ | |||||
</view> | </view> | ||||
<view class="timeTableAlert" :class="flag? 'active' : ''"> | <view class="timeTableAlert" :class="flag? 'active' : ''"> | ||||
<view class="timeTableAlertTop"> | <view class="timeTableAlertTop"> | ||||
<view class="timeTableAlertT">{{ weekData.rows[ind].StuName }}</view> | |||||
<view class="timeTableAlertTxt">学号: {{ weekData.rows[ind].StuNo }} </view> | |||||
<view class="timeTableAlertT">{{ weekData.total > 0 ? weekData.rows[ind].StuName : "" }}</view> | |||||
<view class="timeTableAlertTxt">学号: {{ weekData.total > 0 ? weekData.rows[ind].StuNo:"" }} </view> | |||||
</view> | </view> | ||||
<view class="timeTableAlertList"> | <view class="timeTableAlertList"> | ||||
<view | <view | ||||
@@ -47,8 +47,15 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="tSec2Location"> | <view class="tSec2Location"> | ||||
<text class="text-xxl cuIcon cuIcon-location"></text> | |||||
{{ k.ClassroomName }} | |||||
<view class="tSec2ListTxt"> | |||||
<text class="text-xxl cuIcon cuIcon-location"></text> | |||||
{{ k.ClassroomName }} | |||||
</view> | |||||
<view class="tSec2ListTxt"> | |||||
<view v-if="k.Sort == '准时' " class="text-blue">{{ k.Sort }}</view> | |||||
<view v-if="k.Sort == '迟到' " class="text-green">{{ k.Sort }}</view> | |||||
<view v-if="k.Sort == '请假' " class="text-yellow">{{ k.Sort }}</view> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -402,7 +409,6 @@ export default { | |||||
.tSec2Location { | .tSec2Location { | ||||
width: 30%; | width: 30%; | ||||
float: left; | float: left; | ||||
line-height: 44px; | |||||
font-size: 13px; | font-size: 13px; | ||||
color: #888888; | color: #888888; | ||||
} | } | ||||