diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.css
new file mode 100644
index 000000000..5f282702b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.css
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.html
new file mode 100644
index 000000000..c7d49f2b8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.html
@@ -0,0 +1,24 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.js
new file mode 100644
index 000000000..d02813aa9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/Check.js
@@ -0,0 +1,170 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-12-25 10:39
+ * 描 述:学生请假管理
+ */
+(function () {
+ var begin = '';
+ var end = '';
+ var multipleData = null;
+ var page = {
+ grid: null,
+ init: function ($page) {
+ begin = '';
+ end = '';
+ multipleData = null;
+ page.grid = $page.find('#lr_EducationalAdministrationStuLeaveManagement_list').lrpagination({
+ lclass: page.lclass,
+ rows: 10, // 每页行数
+ getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
+ param.multipleData = multipleData;
+ page.loadData(param, callback, $page);
+ },
+ renderData: function (_index, _item, _$item) {// 渲染数据模板
+ return page.rowRender(_index, _item, _$item, $page);
+ },
+ click: function (item, $item, $et) {// 列表行点击事件
+ if ($et.hasClass('lr-btn-danger')) {
+ page.btnClick(item, $item, $page);
+ }
+ else {
+ page.rowClick(item, $item, $page);
+ }
+ },
+ btns: page.rowBtns
+ });
+ // 多条件查询
+ var $multiple = $page.find('.lr_multiple_search').multiplequery({
+ callback: function (data) {
+ begin = '';
+ end = '';
+ multipleData = data || {};
+ page.grid.reload();
+ }
+ });
+ $multiple.find('#LeaveType').lrpickerex({
+ type: 'dataItem',
+ code: 'LeaveType'
+ });
+ $multiple.find('#CheckStatus').lrpickerex({
+ type: 'dataItem',
+ code: 'LeaveCheck'
+ });
+ },
+ lclass: 'lr-list',
+ loadData: function (param, callback, $page) {// 列表加载后台数据
+ var _postParam = {
+ pagination: {
+ rows: param.rows,
+ page: param.page,
+ sidx: 'CreateTime desc',
+ sord: 'DESC'
+ },
+ queryJson: JSON.stringify({ ClassManagerNo: learun.storage.get('userinfo').baseinfo.account })
+ };
+ if (param.multipleData) {
+ multipleData.ClassManagerNo = learun.storage.get('userinfo').baseinfo.account;
+ _postParam.queryJson = JSON.stringify(multipleData);
+ }
+ if (param.begin && param.end) {
+ _postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, ClassManagerNo: learun.storage.get('userinfo').baseinfo.account });
+ }
+ learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/pagelist', _postParam, (data) => {
+ $page.find('.lr-badge').text('0');
+ if (data) {
+ $page.find('.lr-badge').text(data.records);
+ callback(data.rows, parseInt(data.records));
+ }
+ else {
+ callback([], 0);
+ }
+ });
+ },
+ rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据
+ _$item.addClass('lr-list-item lr-list-item-multi');
+ _$item.append($('审核状态:
').dataFormatter({
+ value: _item.CheckStatus == "1" ? "同意" : _item.CheckStatus == "2" ? "不同意" : "申请中"
+ }));
+ _$item.append($('审核备注:
').dataFormatter({ value: _item.CheckRemark }));
+ _$item.append($('审核时间:
').dataFormatter({ value: _item.CheckTime }));
+ _$item.append($('审核人:
').dataFormatter({
+ value: _item.CheckUserNo,
+ type: 'dataSource',
+ code: 'EmpInfo',
+ keyId: 'empno',
+ text: 'empname'
+ }));
+ _$item.append($('请假类型:
').dataFormatter({
+ value: _item.LeaveType,
+ type: 'dataItem',
+ code: 'LeaveType'
+ }));
+ _$item.append($('开始时间:
').dataFormatter({ value: _item.StartTime }));
+ _$item.append($('结束时间:
').dataFormatter({ value: _item.EndTime }));
+ _$item.append($('请假天数:
').dataFormatter({ value: _item.LeaveDay }));
+ _$item.append($('请假事由:
').dataFormatter({ value: _item.LeaveReason }));
+ _$item.append($('学号:
').dataFormatter({ value: _item.CreateUserNo }));
+ _$item.append($('姓名:
').dataFormatter({ value: _item.CreateUserName }));
+ _$item.append($('申请时间:
').dataFormatter({ value: _item.CreateTime }));
+ _$item.append($('班级:
').dataFormatter({
+ value: _item.ClassNo,
+ type: 'dataSource',
+ code: 'bjsj',
+ keyId: 'classno',
+ text: 'classname'
+ }));
+ _$item.append($('系部:
').dataFormatter({
+ value: _item.DeptNo,
+ type: 'dataSource',
+ code: 'CdDeptInfo',
+ keyId: 'deptno',
+ text: 'deptname'
+ }));
+ _$item.append($('专业:
').dataFormatter({
+ value: _item.MajorNo,
+ type: 'dataSource',
+ code: 'CdMajorInfo',
+ keyId: 'majorno',
+ text: 'majorname'
+ }));
+ _$item.append($('班主任:
').dataFormatter({
+ value: _item.ClassDiredctorNo,
+ type: 'dataSource',
+ code: 'EmpInfo',
+ keyId: 'empno',
+ text: 'empname'
+ }));
+ _$item.append($('辅导员:
').dataFormatter({
+ value: _item.ClassTutorNo,
+ type: 'dataSource',
+ code: 'EmpInfo',
+ keyId: 'empno',
+ text: 'empname'
+ }));
+ return '';
+ },
+ rowClick: function (item, $item, $page) {// 列表行点击触发方法
+ learun.nav.go({ path: 'EducationalAdministration/StuLeaveManagement/Check/form', title: '详情', type: 'right', param: { keyValue: item.Id, LeaveDay: item.LeaveDay } });
+ },
+ btnClick: function (item, $item, $page) {// 左滑按钮点击事件
+ if (item.CheckStatus == "1") {
+ learun.layer.warning("该项已审核通过无法删除!");
+ return false;
+ }
+ learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
+ if (_index === '1') {
+ learun.layer.loading(true, '正在删除该笔数据');
+ learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/delete', item.Id, (data) => {
+ if (data) {// 删除数据成功
+ page.grid.reload();
+ }
+ learun.layer.loading(false);
+ });
+ }
+ }, '智慧校园提示', ['取消', '确定']);
+ },
+ rowBtns: [] // 列表行左滑按钮
+ };
+ return page;
+})();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.css
new file mode 100644
index 000000000..5f282702b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.css
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.html
new file mode 100644
index 000000000..15d5e6fb4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.html
@@ -0,0 +1,35 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.js
new file mode 100644
index 000000000..5cfb80312
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/Check/form/form.js
@@ -0,0 +1,164 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-12-25 10:39
+ * 描 述:学生请假管理
+ */
+(function () {
+ var keyValue = '';
+ var $header = null;
+ var titleText = '';
+ var page = {
+ isScroll: true,
+ init: function ($page, param) {
+ keyValue = param.keyValue;
+ LeaveDay = param.LeaveDay;
+ // 添加头部按钮列表
+ var _html = '\
+ \
+ \
+ ';
+ $header = $page.parents('.f-page').find('.f-page-header');
+ $header.append(_html);
+ // 取消
+ $header.find('.lr-form-header-cancel').on('tap', function () {
+ learun.layer.confirm('确定要退出当前编辑?', function (_index) {
+ if (_index === '1') {
+ if (keyValue) {// 如果是编辑状态
+ learun.formblur();
+ $header.find('.lr-form-header-cancel').hide();
+ $header.find('.lr-form-header-submit').hide();
+ $header.find('.lr-form-header-btnlist').show();
+ $header.find('.f-page-title').text(titleText);
+ $page.find('.lr-form-container').setFormRead();
+ }
+ else {// 如果是新增状态 关闭当前页面
+ learun.nav.closeCurrent();
+ }
+ }
+ }, '智慧校园提示', ['取消', '确定']);
+ });
+ // 编辑
+ $header.find('.lr-form-header-edit').on('tap', function () {
+ if (keyValue) {
+ //判断是否可以审核:请假天数大于2天且登录用户不是系主任,提示无法审核;
+ if (LeaveDay > 2) {
+ //获取是否是系主任
+ learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/isDeptDirector', "", (data) => {
+ if (data && data != "" && data != undefined) {
+ if (data.IsDeptDirector == false) {
+ learun.layer.warning("该请假申请大于2天,需要由系主任审核!");
+ return false;
+ } else {
+ $header.find('.lr-form-header-btnlist').hide();
+ $header.find('.lr-form-header-cancel').show();
+ $header.find('.lr-form-header-submit').show();
+ titleText = $header.find('.f-page-title').text();
+ $header.find('.f-page-title').text('编辑');
+ $page.find('.lr-form-container').setFormWrite();
+ }
+ }
+ learun.layer.loading(false);
+ });
+ } else {
+ $header.find('.lr-form-header-btnlist').hide();
+ $header.find('.lr-form-header-cancel').show();
+ $header.find('.lr-form-header-submit').show();
+ titleText = $header.find('.f-page-title').text();
+ $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: [
+
+ ],
+ cancel: function () {
+ }
+ });
+ });
+ // 提交
+ $header.find('.lr-form-header-submit').on('tap', function () {
+ // 获取表单数据
+ if (!$page.find('.lr-form-container').lrformValid()) {
+ return false;
+ }
+ var _postData = {}
+ _postData.keyValue = keyValue;
+ _postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet());
+ learun.layer.loading(true, '正在提交数据');
+ learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/saveCheck', _postData, (data) => {
+ learun.layer.loading(false);
+ if (data) {// 表单数据保存成功
+ if (keyValue) {
+ learun.layer.toast('保存数据成功!');
+ learun.formblur();
+ $header.find('.lr-form-header-cancel').hide();
+ $header.find('.lr-form-header-submit').hide();
+ $header.find('.lr-form-header-btnlist').show();
+ $header.find('.f-page-title').text(titleText);
+ $page.find('.lr-form-container').setFormRead();
+ }
+ else {// 如果是
+ learun.nav.closeCurrent();
+ }
+ var prepage = learun.nav.getpage('EducationalAdministration/StuLeaveManagement/Check');
+ prepage.grid.reload();
+ }
+ });
+ });
+ page.bind($page, param);
+ if (keyValue) {
+ // 添加编辑按钮
+ $page.find('.lr-form-container').setFormRead();
+ $header.find('.lr-form-header-btnlist').show();
+ // 获取表单数据
+ learun.layer.loading(true, '获取表单数据');
+ learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/form', keyValue, (data) => {
+ if (data) {
+ for (var id in data) {
+ if (data[id].length) {
+ $page.find('#' + id).lrgridSet(data[id]);
+ }
+ else {
+ $page.find('[data-table="' + id + '"]').lrformSet(data[id]);
+ }
+ }
+ }
+ learun.layer.loading(false);
+ });
+ }
+ else {
+ $header.find('.lr-form-header-cancel').show();
+ $header.find('.lr-form-header-submit').show();
+ }
+ },
+ bind: function ($page, param) {
+ $page.find('#LeaveType').lrpickerex({
+ code: 'LeaveType',
+ type: 'dataItem'
+ });
+ $page.find('#StartTime').lrdate({
+ type: 'date'
+ });
+ $page.find('#EndTime').lrdate({
+ type: 'date'
+ });
+ $page.find('#CheckStatus').lrpickerex({
+ code: 'LeaveCheck',
+ type: 'dataItem'
+ });
+ }, destroy: function (pageinfo) {
+ $header = null;
+ keyValue = '';
+ }
+ };
+ return page;
+})();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.css
new file mode 100644
index 000000000..5f282702b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.css
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.html
new file mode 100644
index 000000000..3035c0c88
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.html
@@ -0,0 +1,26 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.js
new file mode 100644
index 000000000..277d51198
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/StuLeaveManagement.js
@@ -0,0 +1,173 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-12-25 10:39
+ * 描 述:学生请假管理
+ */
+(function () {
+ var begin = '';
+ var end = '';
+ var multipleData = null;
+ var page = {
+ grid: null,
+ init: function ($page) {
+ begin = '';
+ end = '';
+ multipleData = null;
+ page.grid = $page.find('#lr_EducationalAdministrationStuLeaveManagement_list').lrpagination({
+ lclass: page.lclass,
+ rows: 10, // 每页行数
+ getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
+ param.multipleData = multipleData;
+ page.loadData(param, callback, $page);
+ },
+ renderData: function (_index, _item, _$item) {// 渲染数据模板
+ return page.rowRender(_index, _item, _$item, $page);
+ },
+ click: function (item, $item, $et) {// 列表行点击事件
+ if ($et.hasClass('lr-btn-danger')) {
+ page.btnClick(item, $item, $page);
+ }
+ else {
+ page.rowClick(item, $item, $page);
+ }
+ },
+ btns: page.rowBtns
+ });
+ // 多条件查询
+ var $multiple = $page.find('.lr_multiple_search').multiplequery({
+ callback: function (data) {
+ begin = '';
+ end = '';
+ multipleData = data || {};
+ page.grid.reload();
+ }
+ });
+ $multiple.find('#LeaveType').lrpickerex({
+ type: 'dataItem',
+ code: 'LeaveType'
+ });
+ $multiple.find('#CheckStatus').lrpickerex({
+ type: 'dataItem',
+ code: 'LeaveCheck'
+ });
+ $page.find('#lr_EducationalAdministrationStuLeaveManagement_btn').on('tap', function () {
+ learun.nav.go({ path: 'EducationalAdministration/StuLeaveManagement/form', title: '新增', type: 'right' });
+ });
+ },
+ lclass: 'lr-list',
+ loadData: function (param, callback, $page) {// 列表加载后台数据
+ var _postParam = {
+ pagination: {
+ rows: param.rows,
+ page: param.page,
+ sidx: 'CreateTime desc',
+ sord: 'DESC'
+ },
+ queryJson: JSON.stringify({ StuNo: learun.storage.get('userinfo').baseinfo.account })
+ };
+ if (param.multipleData) {
+ multipleData.StuNo = learun.storage.get('userinfo').baseinfo.account;
+ _postParam.queryJson = JSON.stringify(multipleData);
+ }
+ if (param.begin && param.end) {
+ _postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, StuNo: learun.storage.get('userinfo').baseinfo.account });
+ }
+ learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/pagelist', _postParam, (data) => {
+ $page.find('.lr-badge').text('0');
+ if (data) {
+ $page.find('.lr-badge').text(data.records);
+ callback(data.rows, parseInt(data.records));
+ }
+ else {
+ callback([], 0);
+ }
+ });
+ },
+ rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据
+ _$item.addClass('lr-list-item lr-list-item-multi');
+ _$item.append($('审核状态:
').dataFormatter({
+ value: _item.CheckStatus == "1" ? "同意" : _item.CheckStatus == "2" ? "不同意" : "申请中"
+ }));
+ _$item.append($('审核备注:
').dataFormatter({ value: _item.CheckRemark }));
+ _$item.append($('审核时间:
').dataFormatter({ value: _item.CheckTime }));
+ _$item.append($('审核人:
').dataFormatter({
+ value: _item.CheckUserNo,
+ type: 'dataSource',
+ code: 'EmpInfo',
+ keyId: 'empno',
+ text: 'empname'
+ }));
+ _$item.append($('请假类型:
').dataFormatter({
+ value: _item.LeaveType,
+ type: 'dataItem',
+ code: 'LeaveType'
+ }));
+ _$item.append($('开始时间:
').dataFormatter({ value: _item.StartTime }));
+ _$item.append($('结束时间:
').dataFormatter({ value: _item.EndTime }));
+ _$item.append($('请假天数:
').dataFormatter({ value: _item.LeaveDay }));
+ _$item.append($('请假事由:
').dataFormatter({ value: _item.LeaveReason }));
+ _$item.append($('学号:
').dataFormatter({ value: _item.CreateUserNo }));
+ _$item.append($('姓名:
').dataFormatter({ value: _item.CreateUserName }));
+ _$item.append($('申请时间:
').dataFormatter({ value: _item.CreateTime }));
+ _$item.append($('班级:
').dataFormatter({
+ value: _item.ClassNo,
+ type: 'dataSource',
+ code: 'bjsj',
+ keyId: 'classno',
+ text: 'classname'
+ }));
+ _$item.append($('系部:
').dataFormatter({
+ value: _item.DeptNo,
+ type: 'dataSource',
+ code: 'CdDeptInfo',
+ keyId: 'deptno',
+ text: 'deptname'
+ }));
+ _$item.append($('专业:
').dataFormatter({
+ value: _item.MajorNo,
+ type: 'dataSource',
+ code: 'CdMajorInfo',
+ keyId: 'majorno',
+ text: 'majorname'
+ }));
+ _$item.append($('班主任:
').dataFormatter({
+ value: _item.ClassDiredctorNo,
+ type: 'dataSource',
+ code: 'EmpInfo',
+ keyId: 'empno',
+ text: 'empname'
+ }));
+ _$item.append($('辅导员:
').dataFormatter({
+ value: _item.ClassTutorNo,
+ type: 'dataSource',
+ code: 'EmpInfo',
+ keyId: 'empno',
+ text: 'empname'
+ }));
+ return '';
+ },
+ rowClick: function (item, $item, $page) {// 列表行点击触发方法
+ learun.nav.go({ path: 'EducationalAdministration/StuLeaveManagement/form', title: '详情', type: 'right', param: { keyValue: item.Id, CheckStatus: item.CheckStatus } });
+ },
+ btnClick: function (item, $item, $page) {// 左滑按钮点击事件
+ if (item.CheckStatus == "1") {
+ learun.layer.warning("该项已审核通过无法删除!");
+ return false;
+ }
+ learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
+ if (_index === '1') {
+ learun.layer.loading(true, '正在删除该笔数据');
+ learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/delete', item.Id, (data) => {
+ if (data) {// 删除数据成功
+ page.grid.reload();
+ }
+ learun.layer.loading(false);
+ });
+ }
+ }, '智慧校园提示', ['取消', '确定']);
+ },
+ rowBtns: ['删除'] // 列表行左滑按钮
+ };
+ return page;
+})();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.css
new file mode 100644
index 000000000..5f282702b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.css
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.html
new file mode 100644
index 000000000..008e0b086
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.html
@@ -0,0 +1,26 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.js
new file mode 100644
index 000000000..0a9648a44
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuLeaveManagement/form/form.js
@@ -0,0 +1,161 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-12-25 10:39
+ * 描 述:学生请假管理
+ */
+(function () {
+ var keyValue = '';
+ var $header = null;
+ var titleText = '';
+ var page = {
+ isScroll: true,
+ init: function ($page, param) {
+ keyValue = param.keyValue;
+ CheckStatus = param.CheckStatus;
+ // 添加头部按钮列表
+ var _html = '\
+ \
+ \
+ ';
+ $header = $page.parents('.f-page').find('.f-page-header');
+ $header.append(_html);
+ // 取消
+ $header.find('.lr-form-header-cancel').on('tap', function () {
+ learun.layer.confirm('确定要退出当前编辑?', function (_index) {
+ if (_index === '1') {
+ if (keyValue) {// 如果是编辑状态
+ learun.formblur();
+ $header.find('.lr-form-header-cancel').hide();
+ $header.find('.lr-form-header-submit').hide();
+ $header.find('.lr-form-header-btnlist').show();
+ $header.find('.f-page-title').text(titleText);
+ $page.find('.lr-form-container').setFormRead();
+ }
+ else {// 如果是新增状态 关闭当前页面
+ learun.nav.closeCurrent();
+ }
+ }
+ }, '智慧校园提示', ['取消', '确定']);
+ });
+ // 编辑
+ $header.find('.lr-form-header-edit').on('tap', function () {
+ if (keyValue) {
+ if (CheckStatus == "1" || CheckStatus == "2") {
+ learun.layer.warning("该项已审核无法编辑!");
+ return false;
+ }
+ }
+ $header.find('.lr-form-header-btnlist').hide();
+ $header.find('.lr-form-header-cancel').show();
+ $header.find('.lr-form-header-submit').show();
+ titleText = $header.find('.f-page-title').text();
+ $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/adms/EducationalAdministration/StuLeaveManagement/delete', keyValue, (data) => {
+ learun.layer.loading(false);
+ if (data) {// 删除数据成功
+ learun.nav.closeCurrent();
+ var prepage = learun.nav.getpage('EducationalAdministration/StuLeaveManagement');
+ prepage.grid.reload();
+ }
+ });
+ }
+ }, '智慧校园提示', ['取消', '确定']);
+ }
+ }
+ ],
+ cancel: function () {
+ }
+ });
+ });
+ // 提交
+ $header.find('.lr-form-header-submit').on('tap', function () {
+ // 获取表单数据
+ if (!$page.find('.lr-form-container').lrformValid()) {
+ return false;
+ }
+ var _postData = {}
+ _postData.keyValue = keyValue;
+ _postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet());
+ learun.layer.loading(true, '正在提交数据');
+ learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/save', _postData, (data) => {
+ learun.layer.loading(false);
+ if (data) {// 表单数据保存成功
+ if (keyValue) {
+ learun.layer.toast('保存数据成功!');
+ learun.formblur();
+ $header.find('.lr-form-header-cancel').hide();
+ $header.find('.lr-form-header-submit').hide();
+ $header.find('.lr-form-header-btnlist').show();
+ $header.find('.f-page-title').text(titleText);
+ $page.find('.lr-form-container').setFormRead();
+ }
+ else {// 如果是
+ learun.nav.closeCurrent();
+ }
+ var prepage = learun.nav.getpage('EducationalAdministration/StuLeaveManagement');
+ prepage.grid.reload();
+ }
+ });
+ });
+ page.bind($page, param);
+ if (keyValue) {
+ // 添加编辑按钮
+ $page.find('.lr-form-container').setFormRead();
+ $header.find('.lr-form-header-btnlist').show();
+ // 获取表单数据
+ learun.layer.loading(true, '获取表单数据');
+ learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/StuLeaveManagement/form', keyValue, (data) => {
+ if (data) {
+ for (var id in data) {
+ if (data[id].length) {
+ $page.find('#' + id).lrgridSet(data[id]);
+ }
+ else {
+ $page.find('[data-table="' + id + '"]').lrformSet(data[id]);
+ }
+ }
+ }
+ learun.layer.loading(false);
+ });
+ }
+ else {
+ $header.find('.lr-form-header-cancel').show();
+ $header.find('.lr-form-header-submit').show();
+ }
+ },
+ bind: function ($page, param) {
+ $page.find('#LeaveType').lrpickerex({
+ code: 'LeaveType',
+ type: 'dataItem'
+ });
+ $page.find('#StartTime').lrdate({
+ type: 'date'
+ });
+ $page.find('#EndTime').lrdate({
+ type: 'date'
+ });
+ }, destroy: function (pageinfo) {
+ $header = null;
+ keyValue = '';
+ }
+ };
+ return page;
+})();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
index 3b20af763..0e9f959ce 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
@@ -211,6 +211,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuAttendanceLeaveApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuAttendanceLeaveApi.cs
index 29fe98147..013a0af0a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuAttendanceLeaveApi.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuAttendanceLeaveApi.cs
@@ -11,7 +11,7 @@ namespace Learun.Application.WebApi
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-24 14:40
- /// 描 述:请假
+ /// 描 述:学生课表请假管理
///
public class StuAttendanceLeaveApi : BaseApi
{
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs
new file mode 100644
index 000000000..aed5cb4a9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs
@@ -0,0 +1,161 @@
+using Nancy;
+using Learun.Util;
+using System.Collections.Generic;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System;
+using System.Linq;
+
+namespace Learun.Application.WebApi.Modules
+{///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-12-25 10:35
+ /// 描 述:学生请假管理
+ ///
+ public class StuLeaveManagementApi : BaseApi
+ {
+ private StuLeaveManagementIBLL stuLeaveManagementIBLL = new StuLeaveManagementBLL();
+
+ ///
+ /// 注册接口
+ ///
+ public StuLeaveManagementApi()
+ : base("/Learun/adms/EducationalAdministration/StuLeaveManagement")
+ {
+ Get["/pagelist"] = GetPageList;
+ Get["/form"] = GetForm;
+ Post["/delete"] = DeleteForm;
+ Post["/save"] = SaveForm;
+ Post["/saveCheck"] = SaveCheckForm;
+ Get["/isDeptDirector"] = GetIsDeptDirector;
+ }
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表分页数据
+ ///
+ ///
+ ///
+ public Response GetPageList(dynamic _)
+ {
+ ReqPageParam parameter = this.GetReqData();
+ var data = stuLeaveManagementIBLL.GetPageList(parameter.pagination, parameter.queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = parameter.pagination.total,
+ page = parameter.pagination.page,
+ records = parameter.pagination.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ ///
+ public Response GetForm(dynamic _)
+ {
+ string keyValue = this.GetReqData();
+ var StuLeaveManagementData = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(keyValue);
+ var jsonData = new
+ {
+ StuLeaveManagement = StuLeaveManagementData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取登录用户是否是系主任
+ ///
+ ///
+ ///
+ public Response GetIsDeptDirector(dynamic _)
+ {
+ bool isDeptDirector = false;//登录用户是否是系主任标识
+
+ var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId");
+ var loginInfoRoleIds = this.userInfo.roleIds;
+ if (loginInfoRoleIds.IndexOf(',') == -1)
+ {
+ if (loginInfoRoleIds == deptDirectorRoleId)
+ {
+ isDeptDirector = true;
+ }
+ }
+ else
+ {
+ if (loginInfoRoleIds.Split(',').Contains(deptDirectorRoleId))
+ {
+ isDeptDirector = true;
+ }
+ }
+ var jsonData = new
+ {
+ IsDeptDirector = isDeptDirector,
+ };
+ return Success(jsonData);
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ ///
+ ///
+ public Response DeleteForm(dynamic _)
+ {
+ string keyValue = this.GetReqData();
+ stuLeaveManagementIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ ///
+ ///
+ public Response SaveForm(dynamic _)
+ {
+ ReqFormEntity parameter = this.GetReqData();
+ StuLeaveManagementEntity entity = parameter.strEntity.ToObject();
+ entity.CreateTime = DateTime.Now;
+ entity.CreateUserId = this.userInfo.userId;
+ entity.CreateUserNo = this.userInfo.account;
+ stuLeaveManagementIBLL.SaveEntity(parameter.keyValue, entity);
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ ///
+ ///
+ public Response SaveCheckForm(dynamic _)
+ {
+ ReqFormEntity parameter = this.GetReqData();
+ StuLeaveManagementEntity entity = parameter.strEntity.ToObject();
+ entity.CheckUserId = this.userInfo.userId;
+ entity.CheckUserNo = this.userInfo.account;
+ entity.CheckTime = DateTime.Now;
+ stuLeaveManagementIBLL.SaveEntity(parameter.keyValue, entity);
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 私有类
+
+ ///
+ /// 表单实体类
+ ///
+ private class ReqFormEntity
+ {
+ public string keyValue { get; set; }
+ public string strEntity { get; set; }
+ }
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
index 0fac6f538..03283536a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
@@ -107,5 +107,7 @@
+
+
\ No newline at end of file