@@ -89,7 +89,7 @@ | |||||
_postData.keyValue = keyValue; | _postData.keyValue = keyValue; | ||||
_postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet()); | _postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet()); | ||||
learun.layer.loading(true, '正在提交数据'); | learun.layer.loading(true, '正在提交数据'); | ||||
learun.httppost(config.webapi + 'learun/EducationalAdministration/StuAttendanceLeave/save', _postData, (data) => { | |||||
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/StuAttendanceLeave/save', _postData, (data) => { | |||||
learun.layer.loading(false); | learun.layer.loading(false); | ||||
if (data) {// 表单数据保存成功 | if (data) {// 表单数据保存成功 | ||||
if (keyValue) { | if (keyValue) { | ||||
@@ -104,8 +104,8 @@ | |||||
else {// 如果是 | else {// 如果是 | ||||
learun.nav.closeCurrent(); | learun.nav.closeCurrent(); | ||||
} | } | ||||
var prepage = learun.nav.getpage('EducationalAdministration/StuAttendanceLeave'); | |||||
prepage.grid.reload(); | |||||
var prepage = learun.nav.getpage('timeTable'); | |||||
prepage.init($(prepage)); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -115,7 +115,7 @@ | |||||
$header.find('.lr-form-header-btnlist').show(); | $header.find('.lr-form-header-btnlist').show(); | ||||
// 获取表单数据 | // 获取表单数据 | ||||
learun.layer.loading(true, '获取表单数据'); | learun.layer.loading(true, '获取表单数据'); | ||||
learun.httpget(config.webapi + 'learun/EducationalAdministration/StuAttendanceLeave/leaveform', keyValue, (data) => { | |||||
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuAttendanceLeave/leaveform', keyValue, (data) => { | |||||
console.log(data); | console.log(data); | ||||
if (data) { | if (data) { | ||||
@@ -121,7 +121,7 @@ li{ | |||||
.tSec2List li{ | .tSec2List li{ | ||||
border-bottom: 1px solid #D5EAF7; | border-bottom: 1px solid #D5EAF7; | ||||
overflow: hidden; | overflow: hidden; | ||||
height: 60px; | |||||
height: 64px; | |||||
} | } | ||||
.tSec2ListL{ | .tSec2ListL{ | ||||
float: left; | float: left; | ||||
@@ -150,7 +150,7 @@ li{ | |||||
.tSec2ListT{ | .tSec2ListT{ | ||||
color: #3E3E3E; | color: #3E3E3E; | ||||
font-size: 15px; | font-size: 15px; | ||||
margin: 5px 0; | |||||
margin: 2px 0; | |||||
overflow:hidden; | overflow:hidden; | ||||
white-space:nowrap; | white-space:nowrap; | ||||
text-overflow:ellipsis; | text-overflow:ellipsis; | ||||
@@ -120,6 +120,9 @@ | |||||
k.LessonName + | k.LessonName + | ||||
'</div>' + | '</div>' + | ||||
'<div class="tSec2ListTxt">' + | '<div class="tSec2ListTxt">' + | ||||
k.ClassName + | |||||
'</div>' + | |||||
'<div class="tSec2ListTxt">' + | |||||
'<i class="iconfont icon-addressbook1"></i>' + | '<i class="iconfont icon-addressbook1"></i>' + | ||||
k.EmpName + | k.EmpName + | ||||
'</div>' + | '</div>' + | ||||
@@ -137,6 +137,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
StuAttendanceLeaveEntity entity = strEntity.ToObject<StuAttendanceLeaveEntity>(); | StuAttendanceLeaveEntity entity = strEntity.ToObject<StuAttendanceLeaveEntity>(); | ||||
stuAttendanceLeaveIBLL.SaveEntity(keyValue, entity); | stuAttendanceLeaveIBLL.SaveEntity(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") | ||||
@@ -133,6 +133,7 @@ namespace Learun.Application.WebApi | |||||
{ | { | ||||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | ||||
StuAttendanceLeaveEntity entity = parameter.strEntity.ToObject<StuAttendanceLeaveEntity>(); | StuAttendanceLeaveEntity entity = parameter.strEntity.ToObject<StuAttendanceLeaveEntity>(); | ||||
entity.TeachClassNo = entity.ClassNo; | |||||
stuAttendanceLeaveIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | stuAttendanceLeaveIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | ||||
if (!string.IsNullOrEmpty(entity.IsCheck)) | if (!string.IsNullOrEmpty(entity.IsCheck)) | ||||
{ | { | ||||
@@ -23,8 +23,8 @@ export default { | |||||
oneDayTime () { | oneDayTime () { | ||||
return 24 * 60 * 60 * 1000 //一天时间 | return 24 * 60 * 60 * 1000 //一天时间 | ||||
}, | }, | ||||
weekday() { //根据今天得到周一与周日的时间 | |||||
var now = new Date(); | |||||
weekday(obj) { //根据今天得到周一与周日的时间 | |||||
var now = obj? new Date(obj):new Date(); | |||||
var nowTime = now.getTime(); | var nowTime = now.getTime(); | ||||
var day = now.getDay(); | var day = now.getDay(); | ||||
//显示周一 | //显示周一 | ||||
@@ -175,14 +175,14 @@ export default { | |||||
this.queryData.StuNo = res.StuNo; | this.queryData.StuNo = res.StuNo; | ||||
this.queryData.StuName = res.StuName; | this.queryData.StuName = res.StuName; | ||||
this.queryData.Grade = res.Grade; | this.queryData.Grade = res.Grade; | ||||
this.queryData.EmpNo = res.EmpNo; | |||||
this.queryData.EmpNo = this.pageInfo.EmpNo; | |||||
this.queryData.DeptNo = res.DeptNo; | this.queryData.DeptNo = res.DeptNo; | ||||
this.queryData.DeptName = this.displayListItem(res, 'DeptNo'); | this.queryData.DeptName = this.displayListItem(res, 'DeptNo'); | ||||
this.queryData.MajorNo = res.MajorNo; | this.queryData.MajorNo = res.MajorNo; | ||||
this.queryData.MajorName = this.displayListItem(res, 'MajorNo'); | this.queryData.MajorName = this.displayListItem(res, 'MajorNo'); | ||||
this.queryData.ClassNo = res.ClassNo; | this.queryData.ClassNo = res.ClassNo; | ||||
this.queryData.ClassName = this.displayListItem(res, 'ClassNo'); | this.queryData.ClassName = this.displayListItem(res, 'ClassNo'); | ||||
this.queryData.Remark = res.Remark; | |||||
this.queryData.Remark = ''; | |||||
this.queryData.LeaveType = '1'; | this.queryData.LeaveType = '1'; | ||||
this.queryData.LessonNo = this.pageInfo.LessonNo; | this.queryData.LessonNo = this.pageInfo.LessonNo; | ||||
@@ -208,10 +208,10 @@ export default { | |||||
this.LOADING('保存数据中…'); | this.LOADING('保存数据中…'); | ||||
this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/save', _postData, '加载数据时出错').then(res => { | this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/save', _postData, '加载数据时出错').then(res => { | ||||
this.HIDE_LOADING(); | this.HIDE_LOADING(); | ||||
console.log(res) | |||||
//console.log(res) | |||||
if(res){ | if(res){ | ||||
this.TOAST('提交成功!'); | this.TOAST('提交成功!'); | ||||
this.EMIT('timeTable'); | |||||
this.EMIT('timeTable',this.queryData.LessonDate); | |||||
this.NAV_BACK(); | this.NAV_BACK(); | ||||
} | } | ||||
}); | }); | ||||
@@ -31,6 +31,7 @@ | |||||
<view class="tSec2ListR"> | <view class="tSec2ListR"> | ||||
<view class="tSec2ListBox"> | <view class="tSec2ListBox"> | ||||
<view class="tSec2ListT">{{ k.LessonName }}</view> | <view class="tSec2ListT">{{ k.LessonName }}</view> | ||||
<view class="tSec2ListTxt">{{ k.ClassName }}</view> | |||||
<view class="tSec2ListTxt"> | <view class="tSec2ListTxt"> | ||||
<text class="text-xxl cuIcon cuIcon-profile"></text> | <text class="text-xxl cuIcon cuIcon-profile"></text> | ||||
{{ k.EmpName }} | {{ k.EmpName }} | ||||
@@ -97,11 +98,12 @@ export default { | |||||
this.OFF('timeTable'); | this.OFF('timeTable'); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
async init() { | |||||
// console.log(555) | |||||
async init(obj) { | |||||
//console.log(obj) | |||||
let _this = this; | let _this = this; | ||||
_this.todayWeek = common.weekday(); | |||||
_this.semester = common.judgeDate(); | |||||
_this.todayWeek = common.weekday(obj); | |||||
//console.log(_this.todayWeek) | |||||
_this.semester = common.judgeDate(obj); | |||||
_this.weekDayTime = 7 * common.oneDayTime(); | _this.weekDayTime = 7 * common.oneDayTime(); | ||||
_this.user = _this.GET_GLOBAL('loginUser'); | _this.user = _this.GET_GLOBAL('loginUser'); | ||||
_this.loadData(_this.todayWeek.Monday, _this.todayWeek.Sunday); | _this.loadData(_this.todayWeek.Monday, _this.todayWeek.Sunday); | ||||
@@ -208,23 +210,17 @@ export default { | |||||
_this.TOAST(msg); | _this.TOAST(msg); | ||||
} | } | ||||
else { | else { | ||||
// var param = { | |||||
// AcademicYearNo: data.AcademicYear, | |||||
// ClassRoomNo: data.ClassRoomNo, | |||||
// EmpNo: data.EmpNo, | |||||
// LessonDate: data.LessonDate, | |||||
// LessonNo: data.LessonNo, | |||||
// LessonSortNo: data.LessonSortNo, | |||||
// LessonTime: data.LessonTime, | |||||
// Semester: data.Semester | |||||
// }; | |||||
this.NAV_TO('./leaveFrom', data, true); | this.NAV_TO('./leaveFrom', data, true); | ||||
} | } | ||||
} | } | ||||
}, | |||||
onfun(obj){ | |||||
this.init(obj); | |||||
} | } | ||||
}, | }, | ||||
created() { | created() { | ||||
this.ON('timeTable', this.init); | |||||
//this.ON('timeTable', this.init); | |||||
this.ON('timeTable', this.onfun); | |||||
this.init() | this.init() | ||||
} | } | ||||
}; | }; | ||||
@@ -335,7 +331,7 @@ export default { | |||||
.tSec2ListLi { | .tSec2ListLi { | ||||
border-bottom: 1px solid #d5eaf7; | border-bottom: 1px solid #d5eaf7; | ||||
overflow: hidden; | overflow: hidden; | ||||
height: 60px; | |||||
height: 64px; | |||||
} | } | ||||
.tSec2ListL { | .tSec2ListL { | ||||
float: left; | float: left; | ||||
@@ -364,7 +360,7 @@ export default { | |||||
.tSec2ListT { | .tSec2ListT { | ||||
color: #3e3e3e; | color: #3e3e3e; | ||||
font-size: 15px; | font-size: 15px; | ||||
margin: 5px 0; | |||||
margin: 2px 0; | |||||
overflow: hidden; | overflow: hidden; | ||||
white-space: nowrap; | white-space: nowrap; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||