@@ -1,4 +1,4 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-06-24 14:40 | |||
@@ -50,7 +50,35 @@ | |||
$header.find('.f-page-title').text('请假'); | |||
$page.find('.lr-form-container').setFormWrite(); | |||
}); | |||
//// 更多 | |||
//$header.find('.lr-form-header-more').on('tap', function () { | |||
// learun.actionsheet({ | |||
// id: 'more', | |||
// data: [ | |||
// { | |||
// text: '删除', | |||
// mark: true, | |||
// event: function () {// 删除当前条信息 | |||
// learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { | |||
// if (_index === '1') { | |||
// learun.layer.loading(true, '正在删除该笔数据'); | |||
// learun.httppost(config.webapi + 'learun/EducationalAdministration/StuAttendanceLeave/delete', keyValue, (data) => { | |||
// learun.layer.loading(false); | |||
// if (data) {// 删除数据成功 | |||
// learun.nav.closeCurrent(); | |||
// var prepage = learun.nav.getpage('EducationalAdministration/StuAttendanceLeave'); | |||
// prepage.grid.reload(); | |||
// } | |||
// }); | |||
// } | |||
// }, '智慧校园提示', ['取消', '确定']); | |||
// } | |||
// } | |||
// ], | |||
// cancel: function () { | |||
// } | |||
// }); | |||
//}); | |||
// 提交 | |||
$header.find('.lr-form-header-submit').on('tap', function () { | |||
// 获取表单数据 | |||
@@ -60,11 +88,8 @@ | |||
var _postData = {} | |||
_postData.keyValue = keyValue; | |||
_postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet()); | |||
console.log($page.find('.lr-form-container').lrformGet()) | |||
console.log(_postData) | |||
return | |||
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); | |||
if (data) {// 表单数据保存成功 | |||
if (keyValue) { | |||
@@ -79,8 +104,8 @@ | |||
else {// 如果是 | |||
learun.nav.closeCurrent(); | |||
} | |||
var prepage = learun.nav.getpage('EducationalAdministration/StuAttendanceLeave'); | |||
prepage.grid.reload(); | |||
var prepage = learun.nav.getpage('timeTable'); | |||
prepage.init($(prepage)); | |||
} | |||
}); | |||
}); | |||
@@ -90,9 +115,10 @@ | |||
$header.find('.lr-form-header-btnlist').show(); | |||
// 获取表单数据 | |||
learun.layer.loading(true, '获取表单数据'); | |||
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuAttendanceLeave/leaveform', {}, (data) => { | |||
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuAttendanceLeave/leaveform', keyValue, (data) => { | |||
console.log(data); | |||
if (data) { | |||
for (var id in data) { | |||
if (data[id]) { | |||
if (data[id].length) { | |||
@@ -121,7 +121,7 @@ li{ | |||
.tSec2List li{ | |||
border-bottom: 1px solid #D5EAF7; | |||
overflow: hidden; | |||
height: 60px; | |||
height: 64px; | |||
} | |||
.tSec2ListL{ | |||
float: left; | |||
@@ -150,7 +150,7 @@ li{ | |||
.tSec2ListT{ | |||
color: #3E3E3E; | |||
font-size: 15px; | |||
margin: 5px 0; | |||
margin: 2px 0; | |||
overflow:hidden; | |||
white-space:nowrap; | |||
text-overflow:ellipsis; | |||
@@ -121,6 +121,9 @@ | |||
k.LessonName + | |||
'</div>' + | |||
'<div class="tSec2ListTxt">' + | |||
k.ClassName + | |||
'</div>' + | |||
'<div class="tSec2ListTxt">' + | |||
'<i class="iconfont icon-addressbook1"></i>' + | |||
k.EmpName + | |||
'</div>' + | |||
@@ -137,6 +137,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
StuAttendanceLeaveEntity entity = strEntity.ToObject<StuAttendanceLeaveEntity>(); | |||
stuAttendanceLeaveIBLL.SaveEntity(keyValue, entity); | |||
entity = stuAttendanceLeaveIBLL.GetStuAttendanceLeaveEntity(entity.ID); | |||
if (!string.IsNullOrEmpty(entity.IsCheck)) | |||
{ | |||
if (entity.IsCheck == "1") | |||
@@ -133,6 +133,7 @@ namespace Learun.Application.WebApi | |||
{ | |||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||
StuAttendanceLeaveEntity entity = parameter.strEntity.ToObject<StuAttendanceLeaveEntity>(); | |||
entity.TeachClassNo = entity.ClassNo; | |||
stuAttendanceLeaveIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | |||
if (!string.IsNullOrEmpty(entity.IsCheck)) | |||
{ | |||
@@ -23,8 +23,8 @@ export default { | |||
oneDayTime () { | |||
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 day = now.getDay(); | |||
//显示周一 | |||
@@ -175,14 +175,14 @@ export default { | |||
this.queryData.StuNo = res.StuNo; | |||
this.queryData.StuName = res.StuName; | |||
this.queryData.Grade = res.Grade; | |||
this.queryData.EmpNo = res.EmpNo; | |||
this.queryData.EmpNo = this.pageInfo.EmpNo; | |||
this.queryData.DeptNo = res.DeptNo; | |||
this.queryData.DeptName = this.displayListItem(res, 'DeptNo'); | |||
this.queryData.MajorNo = res.MajorNo; | |||
this.queryData.MajorName = this.displayListItem(res, 'MajorNo'); | |||
this.queryData.ClassNo = res.ClassNo; | |||
this.queryData.ClassName = this.displayListItem(res, 'ClassNo'); | |||
this.queryData.Remark = res.Remark; | |||
this.queryData.Remark = ''; | |||
this.queryData.LeaveType = '1'; | |||
this.queryData.LessonNo = this.pageInfo.LessonNo; | |||
@@ -208,10 +208,10 @@ export default { | |||
this.LOADING('保存数据中…'); | |||
this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/save', _postData, '加载数据时出错').then(res => { | |||
this.HIDE_LOADING(); | |||
console.log(res) | |||
//console.log(res) | |||
if(res){ | |||
this.TOAST('提交成功!'); | |||
this.EMIT('timeTable'); | |||
this.EMIT('timeTable',this.queryData.LessonDate); | |||
this.NAV_BACK(); | |||
} | |||
}); | |||
@@ -31,6 +31,7 @@ | |||
<view class="tSec2ListR"> | |||
<view class="tSec2ListBox"> | |||
<view class="tSec2ListT">{{ k.LessonName }}</view> | |||
<view class="tSec2ListTxt">{{ k.ClassName }}</view> | |||
<view class="tSec2ListTxt"> | |||
<text class="text-xxl cuIcon cuIcon-profile"></text> | |||
{{ k.EmpName }} | |||
@@ -97,11 +98,12 @@ export default { | |||
this.OFF('timeTable'); | |||
}, | |||
methods: { | |||
async init() { | |||
// console.log(555) | |||
async init(obj) { | |||
//console.log(obj) | |||
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.user = _this.GET_GLOBAL('loginUser'); | |||
_this.loadData(_this.todayWeek.Monday, _this.todayWeek.Sunday); | |||
@@ -208,23 +210,17 @@ export default { | |||
_this.TOAST(msg); | |||
} | |||
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); | |||
} | |||
} | |||
}, | |||
onfun(obj){ | |||
this.init(obj); | |||
} | |||
}, | |||
created() { | |||
this.ON('timeTable', this.init); | |||
//this.ON('timeTable', this.init); | |||
this.ON('timeTable', this.onfun); | |||
this.init() | |||
} | |||
}; | |||
@@ -335,7 +331,7 @@ export default { | |||
.tSec2ListLi { | |||
border-bottom: 1px solid #d5eaf7; | |||
overflow: hidden; | |||
height: 60px; | |||
height: 64px; | |||
} | |||
.tSec2ListL { | |||
float: left; | |||
@@ -364,7 +360,7 @@ export default { | |||
.tSec2ListT { | |||
color: #3e3e3e; | |||
font-size: 15px; | |||
margin: 5px 0; | |||
margin: 2px 0; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||