Bladeren bron

手机端学生请假功能

yanshi
edy 3 jaren geleden
bovenliggende
commit
81f9b0fdc5
10 gewijzigde bestanden met toevoegingen van 281 en 223 verwijderingen
  1. +0
    -42
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/form/form.html
  2. +0
    -169
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/form/form.js
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js
  4. +0
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/DtStuLeave.css
  5. +0
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/DtStuLeave.html
  6. +25
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/DtStuLeave.js
  7. +0
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/form/form.css
  8. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/form/form.html
  9. +214
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/form/form.js
  10. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/database.config

+ 0
- 42
Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/form/form.html Bestand weergeven

@@ -1,42 +0,0 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>所属系</label>
<div id="CreateUserDeptNo" isvalid="yes" checkexpession="NotNull" errormsg="所属系" ></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>班级</label>
<div id="CreateUserClassNo" isvalid="yes" checkexpession="NotNull" errormsg="班级" ></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<label>申请用户</label>
<div id="CreateUserName" ></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>申请类型</label>
<div id="LeaveType" isvalid="yes" checkexpession="NotNull" errormsg="申请类型" ></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>开始时间</label>
<div id="BeginDate" isvalid="yes" checkexpession="NotNull" errormsg="开始时间" ></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>结束时间</label>
<div id="EndDate" isvalid="yes" checkexpession="NotNull" errormsg="结束时间" ></div>
</div>
<div class="lr-form-row lr-form-row-multi" data-table="DtStuLeave">
<font face="宋体">*</font>
<label>申请理由</label>
<textarea id="LeaveReason" style="height:100px;" isvalid="yes" checkexpession="NotNull" errormsg="申请理由" ></textarea>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<label>流程Id</label>
<input id="processId" type="text" />
</div>
</div>

+ 0
- 169
Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/form/form.js Bestand weergeven

@@ -1,169 +0,0 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-07-23 10:15
* 描 述:学生请销假
*/
(function () {
var keyValue = '';
var $header = null;
var titleText = '';
var page = {
isScroll: true,
init: function ($page, param) {
keyValue = param.keyValue;
// 添加头部按钮列表
var _html = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$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();
}
}
}, 'learun智慧校园提示', ['取消', '确定']);
});
// 编辑
$header.find('.lr-form-header-edit').on('tap', function () {
$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/EducationalAdministration/DtStuLeave/delete', keyValue, (data) => {
learun.layer.loading(false);
if (data) {// 删除数据成功
learun.nav.closeCurrent();
var prepage = learun.nav.getpage('EducationalAdministration/DtStuLeave');
prepage.grid.reload();
}
});
}
}, 'Learun智慧校园提示', ['取消', '确定']);
}
}
],
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/EducationalAdministration/DtStuLeave/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/DtStuLeave');
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/EducationalAdministration/DtStuLeave/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('#CreateUserDeptNo').lrpickerex({
type: 'sourceData',
code: 'CdDeptInfo',
ivalue: 'deptno',
itext: 'deptname'
});
$page.find('#CreateUserClassNo').lrpickerex({
type: 'sourceData',
code: 'bjsj',
ivalue: 'classno',
itext: 'classname'
});
$page.find('#CreateUserName').lrselect({
type: 'user'
});
if (!keyValue) {
$page.find('#CreateUserName').lrselectSet(learun.storage.get('userinfo').baseinfo.userId);
}
$page.find('#LeaveType').lrpickerex({
code: 'LeaveType',
type: 'dataItem' });
$page.find('#BeginDate').lrdate({
});
$page.find('#EndDate').lrdate({
});
}, destroy: function (pageinfo) {
$header = null;
keyValue = '';
}
};
return page;
})();

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js Bestand weergeven

@@ -13,8 +13,8 @@


var config = {
webapi: 'http://localhost:8081/',
web: "http://localhost:8087/"//web地址,用于配置logo
webapi: 'http://localhost:31173/',
web: "http://localhost:20472/"//web地址,用于配置logo
};
// var config = {
// webapi: 'http://123.57.209.16:31173/',


Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/DtStuLeave.css → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/DtStuLeave.css Bestand weergeven


Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/DtStuLeave.html → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/DtStuLeave.html Bestand weergeven


Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/DtStuLeave.js → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/DtStuLeave.js Bestand weergeven

@@ -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 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-07-23 10:15
@@ -66,7 +66,7 @@
pagination: {
rows: param.rows,
page: param.page,
sidx: 'LSGZQDDM',
sidx: 'Id',
sord: 'DESC'
},
queryJson: '{}'
@@ -89,7 +89,8 @@
});
},
rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据
_$item.addClass('lr-list-item lr-list-item-multi');
_$item.append($('<p class="lr-ellipsis"><span>提交状态:</span></p>').dataFormatter({ value: _item.FlowNo == 1 }));
_$item.addClass('lr-list-item lr-list-item-multi');
_$item.append($('<p class="lr-ellipsis"><span>所属系:</span></p>').dataFormatter({ value: _item.CreateUserDeptNo,
type: 'dataSource',
code: 'CdDeptInfo',
@@ -119,17 +120,33 @@
dateformat: 'yyyy-MM-dd HH:mm'
}));
_$item.append($('<p class="lr-ellipsis"><span>申请理由:</span></p>').dataFormatter({ value: _item.LeaveReason }));
_$item.append($('<p class="lr-ellipsis"><span>流程Id:</span></p>').dataFormatter({ value: _item.processId }));
return '';
var lastStatus = "";
if (_item.FlowNo == 0) {
lastStatus = '<span class="circle bgcyellow">草稿</span>';
} else if (_item.FlowNo == 1) {
lastStatus = '<span class="circle bgcblue1">审批中</span>';
} else if (_item.FlowNo == 2) {
lastStatus = '<span class="circle bgcpink">请假中</span>';
} else if (_item.FlowNo == 3){
lastStatus = '<span class="circle bgccyan">已销假</span>';
}
_$item.append(lastStatus);
return '';
},
rowClick: function (item, $item, $page) {// 列表行点击触发方法
learun.nav.go({ path: 'EducationalAdministration/DtStuLeave/form', title: '详情', type: 'right', param: { keyValue: item.LSGZQDDM } });
learun.nav.go({ path: 'EducationalAdministration/DtStuLeave/form', title: '详情', type: 'right', param: { keyValue: item.Id ,FlowNo:item.FlowNo} });
},
btnClick: function (item, $item, $page) {// 左滑按钮点击事件
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
var FlowNo=item.FlowNo;
if(FlowNo!=0)
{
learun.layer.toast("当前项目已提交,不可删除!");
return;
}
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在删除该笔数据');
learun.httppost(config.webapi + 'learun/EducationalAdministration/DtStuLeave/delete', item.LSGZQDDM , (data) => {
learun.httppost(config.webapi + 'learun/EducationalAdministration/DtStuLeave/delete', item.Id , (data) => {
if (data) {// 删除数据成功
page.grid.reload();
}

Learun.Framework.Ultimate V7/Learun.Application.Mobile/pages/EducationalAdministration/DtStuLeave/form/form.css → Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/form/form.css Bestand weergeven


+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/form/form.html Bestand weergeven

@@ -0,0 +1,38 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>所属系</label>
<div id="CreateUserDeptNo" isvalid="yes" checkexpession="NotNull" errormsg="所属系"></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>班级</label>
<div id="CreateUserClassNo" isvalid="yes" checkexpession="NotNull" errormsg="班级"></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">

<label>申请用户</label>
<div id="CreateUserName"></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>申请类型</label>
<div id="LeaveType" isvalid="yes" checkexpession="NotNull" errormsg="申请类型"></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>开始时间</label>
<div id="BeginDate" isvalid="yes" checkexpession="NotNull" errormsg="开始时间"></div>
</div>
<div class="lr-form-row " data-table="DtStuLeave">
<font face="宋体">*</font>
<label>结束时间</label>
<div id="EndDate" isvalid="yes" checkexpession="NotNull" errormsg="结束时间"></div>
</div>
<div class="lr-form-row lr-form-row-multi" data-table="DtStuLeave">
<font face="宋体">*</font>
<label>申请理由</label>
<textarea id="LeaveReason" style="height:100px;" isvalid="yes" checkexpession="NotNull"
errormsg="申请理由"></textarea>
</div>
</div>

+ 214
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/DtStuLeave/form/form.js Bestand weergeven

@@ -0,0 +1,214 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-07-23 10:15
* 描 述:学生请销假
*/
(function() {
var keyValue = '';
var Statu = '';
var $header = null;
var titleText = '';
var page = {
isScroll: true,
init: function($page, param) {
keyValue = param.keyValue;
Statu = param.FlowNo;
console.log(222, keyValue);
// 添加头部按钮列表
var _html = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$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();
}
}
}, 'learun智慧校园提示', ['取消', '确定']);
});
// 编辑
$header.find('.lr-form-header-edit').on('tap', function() {
if (keyValue) {
if (Statu != 0) {
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() {
if(keyValue){
console.log(Statu,111)
if(Statu!=0){
learun.layer.warning("当前项已提交不删除!");
return false;
}
}
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/DtStuLeave/delete',
keyValue, (data) => {
learun.layer.loading(
false);
if (data) { // 删除数据成功
learun.nav
.closeCurrent();
var prepage = learun
.nav.getpage(
'EducationalAdministration/DtStuLeave'
);
prepage.grid
.reload();
}
});
}
}, 'Learun智慧校园提示', ['取消', '确定']);
}
}],
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/EducationalAdministration/DtStuLeave/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();
}
// learun.layer.confirm('请确认是否提交?', function(
// _index) {
// if (_index === '1') {
// learun.layer.loading(true,
// '正在提交该项数据');
// learun.httppost(config.webapi +
// 'learun/EducationalAdministration/DtStuLeave/SubmitList',
// {keyValue:keyValue,FlowNo:1,processId}, (data) => {
// learun.layer.loading(
// false);
// // if (data) { // 删除数据成功
// // learun.nav
// // .closeCurrent();
// // var prepage = learun
// // .nav.getpage(
// // 'EducationalAdministration/DtStuLeave'
// // );
// // prepage.grid
// // .reload();
// // }
// });
// }
// }, 'Learun智慧校园提示', ['保存为草稿', '确定']);
var prepage = learun.nav.getpage(
'EducationalAdministration/DtStuLeave');
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/EducationalAdministration/DtStuLeave/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-方').show();
$header.find('.lr-form-header-submit').show();
}
},
bind: function($page, param) {
$page.find('#CreateUserDeptNo').lrpickerex({
type: 'sourceData',
code: 'CdDeptInfo',
ivalue: 'deptno',
itext: 'deptname'
});
$page.find('#CreateUserClassNo').lrpickerex({
type: 'sourceData',
code: 'bjsj',
ivalue: 'classno',
itext: 'classname'
});
$page.find('#CreateUserName').lrselect({
type: 'user'
});
if (!keyValue) {
$page.find('#CreateUserName').lrselectSet(learun.storage.get('userinfo').baseinfo.userId);
}
$page.find('#LeaveType').lrpickerex({
code: 'LeaveType',
type: 'dataItem'
});
$page.find('#BeginDate').lrdate({});
$page.find('#EndDate').lrdate({});
},
destroy: function(pageinfo) {
$header = null;
keyValue = '';
}
};
return page;
})();

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/database.config Bestand weergeven

@@ -2,8 +2,8 @@
<connectionStrings>
<!--<add name="BaseDb" connectionString="Server=192.168.2.126;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=192.168.2.126;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />-->
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_演示;;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_演示;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />

<!--金隅-->
<!--<add name="BaseDb" connectionString="Server=192.168.100.225;Initial Catalog=adms7ultimate2;User ID=sa;Password=Jykj@2019" providerName="System.Data.SqlClient" />


Laden…
Annuleren
Opslaan