@@ -40,7 +40,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 主页面【学工信息管理】 | |||||
/// 主页面【学工信息管理】【旧】 | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet] | [HttpGet] | ||||
@@ -49,7 +49,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页【学工信息管理】 | |||||
/// 表单页【学工信息管理】【旧】 | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet] | [HttpGet] | ||||
@@ -57,6 +57,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 表单页-查看 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -97,6 +106,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDataByProcessId(string processId) | |||||
{ | |||||
var StuCancelLeaveManagementData = stuCancelLeaveManagementIBLL.GetEntityByProcessId(processId); | |||||
var jsonData = new | |||||
{ | |||||
StuCancelLeaveManagement = StuCancelLeaveManagementData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -129,6 +154,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
entity.CreateUserId = loginInfo.userId; | entity.CreateUserId = loginInfo.userId; | ||||
entity.CreateUserNo = loginInfo.account; | entity.CreateUserNo = loginInfo.account; | ||||
entity.CreateTime = DateTime.Now; | entity.CreateTime = DateTime.Now; | ||||
entity.CheckStatus = "0"; | |||||
stuCancelLeaveManagementIBLL.SaveEntity(keyValue,entity); | stuCancelLeaveManagementIBLL.SaveEntity(keyValue,entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
@@ -152,6 +179,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
stuCancelLeaveManagementIBLL.SaveEntity(keyValue, entity); | stuCancelLeaveManagementIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DoSubmit(string keyValue, string status, string processId) | |||||
{ | |||||
stuCancelLeaveManagementIBLL.DoSubmit(keyValue, status, processId); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -39,9 +39,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 表单页-查看 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 主页面【学工信息管理】 | |||||
/// 主页面【学工信息管理】【旧】 | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet] | [HttpGet] | ||||
@@ -67,7 +76,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页【学工信息管理】 | |||||
/// 表单页【学工信息管理】【旧】 | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet] | [HttpGet] | ||||
@@ -116,6 +125,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDataByProcessId(string processId) | |||||
{ | |||||
var StuLeaveManagementData = stuLeaveManagementIBLL.GetEntityByProcessId(processId); | |||||
var jsonData = new | |||||
{ | |||||
StuLeaveManagement = StuLeaveManagementData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -148,6 +175,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
entity.CreateUserId = loginInfo.userId; | entity.CreateUserId = loginInfo.userId; | ||||
entity.CreateUserNo = loginInfo.account; | entity.CreateUserNo = loginInfo.account; | ||||
entity.CreateTime = DateTime.Now; | entity.CreateTime = DateTime.Now; | ||||
entity.CheckStatus = "0"; | |||||
stuLeaveManagementIBLL.SaveEntity(keyValue, entity); | stuLeaveManagementIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
@@ -170,6 +198,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
stuLeaveManagementIBLL.SaveEntity(keyValue, entity); | stuLeaveManagementIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DoSubmit(string keyValue, string status, string processId) | |||||
{ | |||||
stuLeaveManagementIBLL.DoSubmit(keyValue, status, processId); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -3,21 +3,25 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" > | |||||
<div class="lr-form-item-title">销假类型<font face="宋体">*</font></div> | |||||
<div id="CancelLeaveType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
@*<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" > | |||||
<div class="lr-form-item-title">销假类型<font face="宋体">*</font></div> | |||||
<div id="CancelLeaveType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" style="display:none;"> | |||||
<div class="lr-form-item-title">销假请假单<font face="宋体">*</font></div> | |||||
<input id="LeaveId" type="text" readonly class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" > | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement"> | |||||
<div class="lr-form-item-title">到校时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">到校时间<font face="宋体">*</font></div> | ||||
<input id="WorkTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#WorkTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="WorkTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#WorkTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" > | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement"> | |||||
<div class="lr-form-item-title">销假事由</div> | <div class="lr-form-item-title">销假事由</div> | ||||
<textarea id="CancelLeaveReason" class="form-control" style="height:100px;" ></textarea> | |||||
<textarea id="CancelLeaveReason" class="form-control" style="height:100px;"></textarea> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" > | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement"> | |||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelLeaveManagement/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelLeaveManagement/Form.js") |
@@ -6,8 +6,40 @@ | |||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
var keyValueInLeave = request('keyValueInLeave'); | |||||
//console.log(keyValue, keyValueInLeave); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
if (keyValue == "null") { | |||||
keyValue = ""; | |||||
} | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | $('.lr-form-wrap').lrscroll(); | ||||
@@ -15,7 +47,10 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#CancelLeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||||
if (!!keyValueInLeave) { | |||||
$('#LeaveId').val(keyValueInLeave); | |||||
} | |||||
//$('#CancelLeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -27,23 +62,52 @@ var bootstrap = function ($, learun) { | |||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
$("#WorkTime").val(data[id].WorkTime); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'StuCancelLeaveManagement' && data[id]) { | |||||
keyValue = data[id].Id; | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$("#WorkTime").val(data[id].WorkTime); | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
return false; | return false; | ||||
} | } | ||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
strEntity: JSON.stringify(formData) | |||||
}; | }; | ||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | ||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
if (!!callBack) { | if (!!callBack) { | ||||
callBack(); | |||||
callBack(res, i); | |||||
} | } | ||||
}); | }); | ||||
}; | }; | ||||
@@ -0,0 +1,27 @@ | |||||
@{ | |||||
ViewBag.Title = "学生销假管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
@*<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" > | |||||
<div class="lr-form-item-title">销假类型<font face="宋体">*</font></div> | |||||
<div id="CancelLeaveType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement" style="display:none;"> | |||||
<div class="lr-form-item-title">销假请假单<font face="宋体">*</font></div> | |||||
<input id="LeaveId" type="text" readonly class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement"> | |||||
<div class="lr-form-item-title">到校时间<font face="宋体">*</font></div> | |||||
<input id="WorkTime" type="text" readonly class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement"> | |||||
<div class="lr-form-item-title">销假事由</div> | |||||
<textarea id="CancelLeaveReason" readonly class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuCancelLeaveManagement"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" readonly class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuCancelLeaveManagement/FormView.js") |
@@ -0,0 +1,115 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-03-26 11:35 | |||||
* 描 述:学生销假管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var keyValueInLeave = request('keyValueInLeave'); | |||||
//console.log(keyValue, keyValueInLeave); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
if (keyValue == "null") { | |||||
keyValue = ""; | |||||
} | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
if (!!keyValueInLeave) { | |||||
$('#LeaveId').val(keyValueInLeave); | |||||
} | |||||
//$('#CancelLeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$("#WorkTime").val(data[id].WorkTime); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'StuCancelLeaveManagement' && data[id]) { | |||||
keyValue = data[id].Id; | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$("#WorkTime").val(data[id].WorkTime); | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify(formData) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, i); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -11,8 +11,8 @@ | |||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">销假类型</div> | |||||
<div id="CancelLeaveType"></div> | |||||
<div class="lr-form-item-title">请假类型</div> | |||||
<div id="LeaveType"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">审核状态</div> | <div class="lr-form-item-title">审核状态</div> | ||||
@@ -27,10 +27,13 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <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_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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -7,6 +7,7 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var processId = ''; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
@@ -16,42 +17,39 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#CancelLeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||||
$('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' }); | |||||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveTypeOfStu' }); | |||||
$('#CheckStatus').lrselect({ data: [{ id: '0', text: '草稿' }, { id: '1', text: '审批中' }, { id: '2', text: '审批通过' }, { id: '3', text: '审批不通过' }] }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | // 编辑 | ||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var status = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (status == "1" || status == "2") { | |||||
learun.alert.warning("该项已审核无法编辑!"); | |||||
var keyValueInLeave = $('#gridtable').jfGridValue('IdInLeave'); | |||||
if (learun.checkrow(keyValueInLeave)) { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (keyValue != null && CheckStatus != "0") { | |||||
learun.alert.warning("当前项已提交销假!"); | |||||
return false; | return false; | ||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/Form?keyValue=' + keyValue, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/Form?keyValue=' + keyValue + '&keyValueInLeave=' + keyValueInLeave, | |||||
width: 600, | width: 600, | ||||
height: 400, | height: 400, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
return top[id].acceptClick(refreshGirdData); | |||||
var res = false; | |||||
// 验证数据 | |||||
res = top[id].validForm(); | |||||
// 保存数据 | |||||
if (res) { | |||||
res = top[id].save('', function () { | |||||
page.search(); | |||||
}); | |||||
} | |||||
return res; | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -61,14 +59,47 @@ var bootstrap = function ($, learun) { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var status = $('#gridtable').jfGridValue('CheckStatus'); | var status = $('#gridtable').jfGridValue('CheckStatus'); | ||||
if (status == "1") { | |||||
learun.alert.warning("该项已审核通过无法删除!"); | |||||
if (status != "0") { | |||||
learun.alert.warning("当前项已提交销假!"); | |||||
return false; | return false; | ||||
} | } | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/DeleteForm', { keyValue: keyValue}, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/DeleteForm', { keyValue: keyValue}, function () { | ||||
refreshGirdData(); | |||||
page.search(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/FormView?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus != "0") { | |||||
learun.alert.warning("当前项已提交销假!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/DoSubmit', { keyValue: keyValue, status: "1", processId: processId }, function (res) { | |||||
refreshGirdData(res, {}); | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
@@ -77,131 +108,78 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/StuCancelLeaveManagement/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "学号", name: "CreateUserNoInLeave", width: 100, align: "left" }, | |||||
{ | { | ||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
label: "姓名", name: "CreateUserIdInLeave", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | key: value, | ||||
code: 'LeaveCheck', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data.text ? _data.text : "申请中"); | |||||
callback(_data.name); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "审核备注", name: "CheckRemark", width: 100, align: "left" }, | |||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
{ | { | ||||
label: "审核人", name: "CheckUserNo", width: 100, align: "left", | |||||
label: "请假类型", name: "LeaveType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "销假类型", name: "CancelLeaveType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'LeaveType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "到校时间", name: "WorkTime", width: 120, align: "left"}, | |||||
{ label: "销假事由", name: "CancelLeaveReason", width: 100, align: "left" }, | |||||
{ label: "学号", name: "CreateUserNo", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "CreateUserName", width: 100, align: "left" }, | |||||
{ label: "申请时间", name: "CreateTime", width: 130, align: "left" }, | |||||
{ | |||||
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: "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', | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | key: value, | ||||
keyId: 'majorno', | |||||
code: 'LeaveTypeOfStu', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['majorname']); | |||||
callback(_data.text); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "请假时间", name: "StartTime", width: 120, align: "left" }, | |||||
{ label: "返校时间", name: "EndTime", width: 120, align: "left" }, | |||||
{ label: "请假天数", name: "LeaveDay", width: 100, align: "left" }, | |||||
{ label: "请假事由", name: "LeaveReason", width: 100, align: "left" }, | |||||
{ | { | ||||
label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
label: "审核状态", name: "CheckStatusInLeave", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<span class=\"label label-warning\">审核中</span>" : cellvalue == "2" ? "<span class=\"label label-success\">审核通过</span>" : cellvalue == "3" ? "<span class=\"label label-danger\">审核未通过</span>" : "<span class=\"label label-default\">草稿</span>"; | |||||
} | } | ||||
}, | }, | ||||
{ label: "销假填表时间", name: "CreateTime", width: 130, align: "left" }, | |||||
{ label: "到校时间", name: "WorkTime", width: 120, align: "left"}, | |||||
{ label: "销假事由", name: "CancelLeaveReason", width: 100, align: "left" }, | |||||
{ | { | ||||
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
label: "销假审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<span class=\"label label-warning\">审核中</span>" : cellvalue == "2" ? "<span class=\"label label-success\">审核通过</span>" : cellvalue == "3" ? "<span class=\"label label-danger\">审核未通过</span>" : cellvalue == "0" ? "<span class=\"label label-default\">草稿</span>" : ""; | |||||
} | } | ||||
}, | }, | ||||
], | ], | ||||
mainId:'Id', | mainId:'Id', | ||||
isPage: true, | isPage: true, | ||||
sord: 'CreateTime desc' | |||||
sord: 'CreateTimeInLeave desc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.StuNo = learun.clientdata.get(['userinfo']).account; | |||||
param.CreateUserIdInLeave = learun.clientdata.get(['userinfo']).userId; //登录用户的已审核通过的请假单 | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
refreshGirdData = function (res, postData) { | |||||
if (!!res) { | |||||
if (res.code == 200) { | |||||
// 发起流程 | |||||
var postData = { | |||||
schemeCode: 'StuCancelLeaveManagement',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
} | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } |
@@ -9,16 +9,20 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | ||||
<div class="lr-form-item-title">请假时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">请假时间<font face="宋体">*</font></div> | ||||
<input id="StartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'EndTime\')}', dateFmt:'yyyy-MM-dd',onpicked: function () { $('#StartTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="StartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'EndTime\')}', dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#StartTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | ||||
<div class="lr-form-item-title">返校时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">返校时间<font face="宋体">*</font></div> | ||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'StartTime\')}',dateFmt:'yyyy-MM-dd',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'StartTime\')}',dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | ||||
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | <div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | ||||
<input id="LeaveDay" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | <input id="LeaveDay" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Files"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | <div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | ||||
<div class="lr-form-item-title">请假事由</div> | <div class="lr-form-item-title">请假事由</div> | ||||
<textarea id="LeaveReason" class="form-control" style="height:100px;"></textarea> | <textarea id="LeaveReason" class="form-control" style="height:100px;"></textarea> | ||||
@@ -6,8 +6,35 @@ | |||||
*/ | */ | ||||
var acceptClick; | var acceptClick; | ||||
var keyValue = request('keyValue'); | var keyValue = request('keyValue'); | ||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | $('.lr-form-wrap').lrscroll(); | ||||
@@ -15,8 +42,8 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||||
$('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' }); | |||||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveTypeOfStu' }); | |||||
$('#Files').lrUploader(); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -28,23 +55,56 @@ var bootstrap = function ($, learun) { | |||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'StuLeaveManagement' && data[id]) { | |||||
keyValue = data[id].Id; | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
return false; | return false; | ||||
} | } | ||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
strEntity: JSON.stringify(formData) | |||||
}; | }; | ||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | ||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
if (!!callBack) { | if (!!callBack) { | ||||
callBack(); | |||||
callBack(res, i); | |||||
} | } | ||||
}); | }); | ||||
}; | }; | ||||
@@ -0,0 +1,31 @@ | |||||
@{ | |||||
ViewBag.Title = "学生请假管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">请假类型<font face="宋体">*</font></div> | |||||
<div id="LeaveType" readonly isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">请假时间<font face="宋体">*</font></div> | |||||
<input id="StartTime" readonly type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">返校时间<font face="宋体">*</font></div> | |||||
<input id="EndTime" readonly type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | |||||
<input id="LeaveDay" readonly type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Files" readonly></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuLeaveManagement"> | |||||
<div class="lr-form-item-title">请假事由</div> | |||||
<textarea id="LeaveReason" readonly class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuLeaveManagement/FormView.js") |
@@ -0,0 +1,112 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-11-27 10:05 | |||||
* 描 述:学生请假管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveTypeOfStu' }); | |||||
$('#Files').lrUploader(); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'StuLeaveManagement' && data[id]) { | |||||
keyValue = data[id].Id; | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify(formData) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, i); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -27,10 +27,14 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <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_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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -7,6 +7,7 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var processId = ''; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
@@ -16,8 +17,8 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveType' }); | |||||
$('#CheckStatus').lrDataItemSelect({ code: 'LeaveCheck' }); | |||||
$('#LeaveType').lrDataItemSelect({ code: 'LeaveTypeOfStu' }); | |||||
$('#CheckStatus').lrselect({ data: [{ id: '0', text: '草稿' }, { id: '1', text: '审批中' }, { id: '2', text: '审批通过' }, { id: '3', text: '审批不通过' }] }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -31,7 +32,16 @@ var bootstrap = function ($, learun) { | |||||
width: 600, | width: 600, | ||||
height: 400, | height: 400, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
return top[id].acceptClick(refreshGirdData); | |||||
var res = false; | |||||
// 验证数据 | |||||
res = top[id].validForm(); | |||||
// 保存数据 | |||||
if (res) { | |||||
res = top[id].save('', function () { | |||||
page.search(); | |||||
}); | |||||
} | |||||
return res; | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -40,8 +50,8 @@ var bootstrap = function ($, learun) { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var status = $('#gridtable').jfGridValue('CheckStatus'); | var status = $('#gridtable').jfGridValue('CheckStatus'); | ||||
if (status == "1" || status == "2") { | |||||
learun.alert.warning("该项已审核无法编辑!"); | |||||
if (status != "0") { | |||||
learun.alert.warning("当前项已提交!"); | |||||
return false; | return false; | ||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -51,7 +61,16 @@ var bootstrap = function ($, learun) { | |||||
width: 600, | width: 600, | ||||
height: 400, | height: 400, | ||||
callBack: function (id) { | callBack: function (id) { | ||||
return top[id].acceptClick(refreshGirdData); | |||||
var res = false; | |||||
// 验证数据 | |||||
res = top[id].validForm(); | |||||
// 保存数据 | |||||
if (res) { | |||||
res = top[id].save('', function () { | |||||
page.search(); | |||||
}); | |||||
} | |||||
return res; | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -61,8 +80,8 @@ var bootstrap = function ($, learun) { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var status = $('#gridtable').jfGridValue('CheckStatus'); | var status = $('#gridtable').jfGridValue('CheckStatus'); | ||||
if (status == "1") { | |||||
learun.alert.warning("该项已审核通过无法删除!"); | |||||
if (status != "0") { | |||||
learun.alert.warning("当前项已提交!"); | |||||
return false; | return false; | ||||
} | } | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
@@ -74,35 +93,80 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/FormView?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus != "0") { | |||||
learun.alert.warning("当前项已提交!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/DoSubmit', { keyValue: keyValue, status: "1", processId: processId }, function (res) { | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/StuLeaveManagement/GetPageList', | ||||
headData: [ | headData: [ | ||||
//{ | |||||
// label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('dataItem', { | |||||
// key: value, | |||||
// code: 'LeaveCheck', | |||||
// callback: function (_data) { | |||||
// callback(_data.text ? _data.text : "申请中"); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
//{ label: "审核备注", name: "CheckRemark", width: 100, align: "left" }, | |||||
//{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
//{ | |||||
// label: "审核人", name: "CheckUserNo", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
// key: value, | |||||
// keyId: 'empno', | |||||
// callback: function (_data) { | |||||
// callback(_data['empname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
{ label: "学号", name: "CreateUserNo", width: 100, align: "left" }, | |||||
{ | { | ||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'LeaveCheck', | |||||
callback: function (_data) { | |||||
callback(_data.text ? _data.text : "申请中"); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "审核备注", name: "CheckRemark", width: 100, align: "left" }, | |||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "审核人", name: "CheckUserNo", width: 100, align: "left", | |||||
label: "姓名", name: "CreateUserId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | key: value, | ||||
keyId: 'empno', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['empname']); | |||||
callback(_data.name); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -112,85 +176,88 @@ var bootstrap = function ($, learun) { | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | learun.clientdata.getAsync('dataItem', { | ||||
key: value, | key: value, | ||||
code: 'LeaveType', | |||||
code: 'LeaveTypeOfStu', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data.text); | callback(_data.text); | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "请假时间", name: "StartTime", width: 100, align: "left" }, | |||||
{ label: "返校时间", name: "EndTime", width: 100, align: "left" }, | |||||
{ label: "请假时间", name: "StartTime", width: 120, align: "left" }, | |||||
{ label: "返校时间", name: "EndTime", width: 120, align: "left" }, | |||||
{ label: "请假天数", name: "LeaveDay", width: 100, align: "left" }, | { label: "请假天数", name: "LeaveDay", width: 100, align: "left" }, | ||||
{ label: "请假事由", name: "LeaveReason", width: 100, align: "left" }, | { label: "请假事由", name: "LeaveReason", width: 100, align: "left" }, | ||||
{ label: "学号", name: "CreateUserNo", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "CreateUserName", width: 100, align: "left" }, | |||||
{ label: "申请时间", name: "CreateTime", width: 130, align: "left" }, | { label: "申请时间", name: "CreateTime", width: 130, align: "left" }, | ||||
{ | { | ||||
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: "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: "ClassDiredctorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empno', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { | |||||
return cellvalue == "1" ? "<span class=\"label label-warning\">审核中</span>" : cellvalue == "2" ? "<span class=\"label label-success\">审核通过</span>" : cellvalue == "3" ? "<span class=\"label label-danger\">审核未通过</span>" : "<span class=\"label label-default\">草稿</span>"; | |||||
} | } | ||||
}, | }, | ||||
//{ | |||||
// 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: "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: "ClassDiredctorNo", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
// key: value, | |||||
// keyId: 'empno', | |||||
// callback: function (_data) { | |||||
// callback(_data['empname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
//{ | |||||
// label: "辅导员", name: "ClassTutorNo", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
// key: value, | |||||
// keyId: 'empno', | |||||
// callback: function (_data) { | |||||
// callback(_data['empname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
@@ -205,8 +272,21 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
refreshGirdData = function (res, postData) { | |||||
if (!!res) { | |||||
if (res.code == 200) { | |||||
// 发起流程 | |||||
var postData = { | |||||
schemeCode: 'StuLeaveManagement',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
} | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } |
@@ -23,24 +23,23 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
// 设置权限 | // 设置权限 | ||||
setAuthorize = function (data) { | setAuthorize = function (data) { | ||||
if(!!data) | |||||
{ | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | $('.lr-form-wrap').lrscroll(); | ||||
@@ -61,34 +60,37 @@ var bootstrap = function ($, learun) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherCancelLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherCancelLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
} | } | ||||
$("#WorkTime").val(data[id].WorkTime); | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
setFormData = function (processId,param,callback) { | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | if (!!processId) { | ||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherCancelLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherCancelLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id] && data[id].length > 0) { | if (!!data[id] && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if(id == 'TeacherCancelLeaveManagement' && data[id] ){ | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'TeacherCancelLeaveManagement' && data[id]) { | |||||
keyValue = data[id].Id; | keyValue = data[id].Id; | ||||
} | } | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | } | ||||
}); | |||||
} | |||||
callback && callback(); } | |||||
} | |||||
$("#WorkTime").val(data[id].WorkTime); | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | // 验证数据是否填写完整 | ||||
validForm = function () { | validForm = function () { | ||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
@@ -99,8 +101,8 @@ var bootstrap = function ($, learun) { | |||||
// 保存数据 | // 保存数据 | ||||
save = function (processId, callBack, i) { | save = function (processId, callBack, i) { | ||||
var formData = $('body').lrGetFormData(); | var formData = $('body').lrGetFormData(); | ||||
if(!!processId){ | |||||
formData.ProcessId =processId; | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | } | ||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify(formData) | strEntity: JSON.stringify(formData) | ||||
@@ -66,6 +66,7 @@ var bootstrap = function ($, learun) { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
} | } | ||||
$("#WorkTime").val(data[id].WorkTime); | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -85,6 +86,7 @@ var bootstrap = function ($, learun) { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
} | } | ||||
$("#WorkTime").val(data[id].WorkTime); | |||||
}); | }); | ||||
} | } | ||||
callback && callback(); | callback && callback(); | ||||
@@ -18,24 +18,23 @@ var bootstrap = function ($, learun) { | |||||
"use strict"; | "use strict"; | ||||
// 设置权限 | // 设置权限 | ||||
setAuthorize = function (data) { | setAuthorize = function (data) { | ||||
if(!!data) | |||||
{ | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | $('.lr-form-wrap').lrscroll(); | ||||
@@ -55,34 +54,41 @@ var bootstrap = function ($, learun) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
setFormData = function (processId,param,callback) { | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | if (!!processId) { | ||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id] && data[id].length > 0) { | if (!!data[id] && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if(id == 'TeacherLeaveManagement' && data[id] ){ | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'TeacherLeaveManagement' && data[id]) { | |||||
keyValue = data[id].Id; | keyValue = data[id].Id; | ||||
} | } | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | } | ||||
}); | |||||
} | |||||
callback && callback(); } | |||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | // 验证数据是否填写完整 | ||||
validForm = function () { | validForm = function () { | ||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
@@ -93,8 +99,8 @@ var bootstrap = function ($, learun) { | |||||
// 保存数据 | // 保存数据 | ||||
save = function (processId, callBack, i) { | save = function (processId, callBack, i) { | ||||
var formData = $('body').lrGetFormData(); | var formData = $('body').lrGetFormData(); | ||||
if(!!processId){ | |||||
formData.ProcessId =processId; | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | } | ||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify(formData) | strEntity: JSON.stringify(formData) | ||||
@@ -18,24 +18,23 @@ var bootstrap = function ($, learun) { | |||||
"use strict"; | "use strict"; | ||||
// 设置权限 | // 设置权限 | ||||
setAuthorize = function (data) { | setAuthorize = function (data) { | ||||
if(!!data) | |||||
{ | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | $('.lr-form-wrap').lrscroll(); | ||||
@@ -55,34 +54,41 @@ var bootstrap = function ($, learun) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
} | } | ||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
// 设置表单数据 | // 设置表单数据 | ||||
setFormData = function (processId,param,callback) { | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | if (!!processId) { | ||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id] && data[id].length > 0) { | if (!!data[id] && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if(id == 'TeacherLeaveManagement' && data[id] ){ | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'TeacherLeaveManagement' && data[id]) { | |||||
keyValue = data[id].Id; | keyValue = data[id].Id; | ||||
} | } | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | } | ||||
}); | |||||
} | |||||
callback && callback(); } | |||||
$("#StartTime").val(data[id].StartTime); | |||||
$("#EndTime").val(data[id].EndTime); | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | // 验证数据是否填写完整 | ||||
validForm = function () { | validForm = function () { | ||||
if (!$('body').lrValidform()) { | if (!$('body').lrValidform()) { | ||||
@@ -93,8 +99,8 @@ var bootstrap = function ($, learun) { | |||||
// 保存数据 | // 保存数据 | ||||
save = function (processId, callBack, i) { | save = function (processId, callBack, i) { | ||||
var formData = $('body').lrGetFormData(); | var formData = $('body').lrGetFormData(); | ||||
if(!!processId){ | |||||
formData.ProcessId =processId; | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
} | } | ||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify(formData) | strEntity: JSON.stringify(formData) | ||||
@@ -1070,6 +1070,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuCancelExam\Detail.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuCancelExam\Detail.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\FormView.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForStudent.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForStudent.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.js" /> | ||||
@@ -1106,6 +1107,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\IndexDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\IndexDC.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\FormView.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuPunishment\CancelForm.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuPunishment\CancelForm.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexBKUnpassTwo.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexBKUnpassTwo.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.js" /> | ||||
@@ -7904,6 +7906,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionForm.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\AdmissionIndex.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\FormView.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\FormView.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" /> | ||||
@@ -35,6 +35,9 @@ | |||||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="DispatchMethod" type="Learun.Application.WorkFlow.DispatchMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="DispatchMethod" type="Learun.Application.WorkFlow.DispatchMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="ArrangeLessonTermAttemperMethod" type="Learun.Application.WorkFlow.ArrangeLessonTermAttemperMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="ArrangeLessonTermAttemperMethod" type="Learun.Application.WorkFlow.ArrangeLessonTermAttemperMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="StuLeaveManagementMethod" type="Learun.Application.WorkFlow.StuLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||||
<typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||||
<!--任务调度器--> | <!--任务调度器--> | ||||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | <typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | ||||
@@ -80,7 +83,9 @@ | |||||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | <type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="DispatchMethod" name="DispatchMethod"></type> | <type type="IWorkFlowMethod" mapTo="DispatchMethod" name="DispatchMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="ArrangeLessonTermAttemperMethod" name="ArrangeLessonTermAttemperMethod"></type> | <type type="IWorkFlowMethod" mapTo="ArrangeLessonTermAttemperMethod" name="ArrangeLessonTermAttemperMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="StuLeaveManagementMethod" name="StuLeaveManagementMethod"></type> | |||||
<type type="IWorkFlowMethod" mapTo="StuCancelLeaveManageMethod" name="StuCancelLeaveManageMethod"></type> | |||||
</container> | </container> | ||||
<container name="TsIOCcontainer"> | <container name="TsIOCcontainer"> | ||||
@@ -67,6 +67,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
public StuCancelLeaveManagementEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return stuCancelLeaveManagementService.GetEntityByProcessId(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -119,6 +143,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DoSubmit(string keyValue, string status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
stuCancelLeaveManagementService.DoSubmit(keyValue, status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||||
{ | |||||
try | |||||
{ | |||||
stuCancelLeaveManagementService.ChangeStatusByProcessId(status, processId, userId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -55,7 +55,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("CREATETIME")] | [Column("CREATETIME")] | ||||
public DateTime? CreateTime { get; set; } | public DateTime? CreateTime { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 审核状态 | |||||
/// 审核状态(0草稿,1审核中,2审核通过,3,审核不通过) | |||||
/// </summary> | /// </summary> | ||||
[Column("CHECKSTATUS")] | [Column("CHECKSTATUS")] | ||||
public string CheckStatus { get; set; } | public string CheckStatus { get; set; } | ||||
@@ -79,6 +79,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("CHECKUSERNO")] | [Column("CHECKUSERNO")] | ||||
public string CheckUserNo { get; set; } | public string CheckUserNo { get; set; } | ||||
/// <summary> | |||||
/// 流程Id | |||||
/// </summary> | |||||
[Column("PROCESSID")] | |||||
public string ProcessId { get; set; } | |||||
/// <summary> | |||||
/// 销假请假单Id | |||||
/// </summary> | |||||
[Column("LEAVEID")] | |||||
public string LeaveId { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -111,6 +121,56 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
public string ClassDiredctorNo { get; set; } | public string ClassDiredctorNo { get; set; } | ||||
[NotMapped] | [NotMapped] | ||||
public string ClassTutorNo { get; set; } | public string ClassTutorNo { get; set; } | ||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string IdInLeave { get; set; } | |||||
/// <summary> | |||||
/// 请假类型 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string LeaveType { get; set; } | |||||
/// <summary> | |||||
/// 开始时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? StartTime { get; set; } | |||||
/// <summary> | |||||
/// 结束时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? EndTime { get; set; } | |||||
/// <summary> | |||||
/// 请假天数 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public decimal? LeaveDay { get; set; } | |||||
/// <summary> | |||||
/// 请假事由 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string LeaveReason { get; set; } | |||||
/// <summary> | |||||
/// 申请人ID | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string CreateUserIdInLeave { get; set; } | |||||
/// <summary> | |||||
/// 申请人编号 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string CreateUserNoInLeave { get; set; } | |||||
/// <summary> | |||||
/// 申请时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? CreateTimeInLeave { get; set; } | |||||
/// <summary> | |||||
/// 审核状态(0草稿,1审核中,2审核通过,3审核不通过,) | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string CheckStatusInLeave { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -27,6 +27,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
StuCancelLeaveManagementEntity GetStuCancelLeaveManagementEntity(string keyValue); | StuCancelLeaveManagementEntity GetStuCancelLeaveManagementEntity(string keyValue); | ||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
StuCancelLeaveManagementEntity GetEntityByProcessId(string processId); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -42,6 +49,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
void SaveEntity(string keyValue, StuCancelLeaveManagementEntity entity); | void SaveEntity(string keyValue, StuCancelLeaveManagementEntity entity); | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DoSubmit(string keyValue, string status, string processId); | |||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void ChangeStatusByProcessId(string status, string processId, string userId); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -30,16 +30,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT t.*,s.StuName as CreateUserName,s.ClassNo,s.DeptNo,s.MajorNo,c.ClassDiredctorNo,c.ClassTutorNo "); | |||||
strSql.Append(" FROM StuCancelLeaveManagement t left join StuInfoBasic s on t.CreateUserNo=s.StuNo left join ClassInfo c on s.ClassNo=c.ClassNo "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
strSql.Append("SELECT t.Id as IdInLeave,t.LeaveType,t.StartTime,t.EndTime,t.LeaveDay,t.LeaveReason,t.CreateUserNo as CreateUserNoInLeave,t.CreateUserId as CreateUserIdInLeave,t.CreateTime as CreateTimeInLeave,t.CheckStatus as CheckStatusInLeave,t2.* "); | |||||
strSql.Append(" FROM StuLeaveManagement t "); | |||||
strSql.Append(" left join StuCancelLeaveManagement t2 on t.Id=t2.LeaveId "); | |||||
strSql.Append(" WHERE 1=1 and t.CheckStatus='2' "); | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["CancelLeaveType"].IsEmpty()) | |||||
if (!queryParam["LeaveType"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("CancelLeaveType",queryParam["CancelLeaveType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CancelLeaveType = @CancelLeaveType "); | |||||
dp.Add("LeaveType",queryParam["LeaveType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.LeaveType = @LeaveType "); | |||||
} | } | ||||
if (!queryParam["CheckStatus"].IsEmpty()) | if (!queryParam["CheckStatus"].IsEmpty()) | ||||
{ | { | ||||
@@ -49,14 +50,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (!queryParam["StuNo"].IsEmpty()) | if (!queryParam["StuNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.CreateUserNo = @StuNo "); | |||||
} | |||||
//班级班主任/辅导员 | |||||
if (!queryParam["ClassManagerNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassManagerNo", queryParam["ClassManagerNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo ) "); | |||||
strSql.Append(" AND t2.CreateUserNo = @StuNo "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<StuCancelLeaveManagementEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuCancelLeaveManagementEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -96,6 +92,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
public StuCancelLeaveManagementEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuCancelLeaveManagementEntity>(t => t.ProcessId == processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -156,6 +176,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DoSubmit(string keyValue, string status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuCancelLeaveManagement set CheckStatus='" + status + "',ProcessId='" + processId + "' where Id='" + keyValue + "' "); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuCancelLeaveManagement set CheckStatus='" + status + "',CheckUserId='" + userId + "',CheckTime='" + DateTime.Now + "' where ProcessId='" + processId + "' "); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -67,6 +67,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
public StuLeaveManagementEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return stuLeaveManagementService.GetEntityByProcessId(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -119,6 +143,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DoSubmit(string keyValue, string status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
stuLeaveManagementService.DoSubmit(keyValue, status, processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||||
{ | |||||
try | |||||
{ | |||||
stuLeaveManagementService.ChangeStatusByProcessId(status, processId, userId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -60,7 +60,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("CREATETIME")] | [Column("CREATETIME")] | ||||
public DateTime? CreateTime { get; set; } | public DateTime? CreateTime { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 审核状态 | |||||
/// 审核状态(0草稿,1审核中,2审核通过,3审核不通过,) | |||||
/// </summary> | /// </summary> | ||||
[Column("CHECKSTATUS")] | [Column("CHECKSTATUS")] | ||||
public string CheckStatus { get; set; } | public string CheckStatus { get; set; } | ||||
@@ -84,6 +84,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("CHECKTIME")] | [Column("CHECKTIME")] | ||||
public DateTime? CheckTime { get; set; } | public DateTime? CheckTime { get; set; } | ||||
/// <summary> | |||||
/// 附件上传 | |||||
/// </summary> | |||||
[Column("FILES")] | |||||
public string Files { get; set; } | |||||
/// <summary> | |||||
/// 流程Id | |||||
/// </summary> | |||||
[Column("PROCESSID")] | |||||
public string ProcessId { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -27,6 +27,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
StuLeaveManagementEntity GetStuLeaveManagementEntity(string keyValue); | StuLeaveManagementEntity GetStuLeaveManagementEntity(string keyValue); | ||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
StuLeaveManagementEntity GetEntityByProcessId(string processId); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -42,6 +49,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
void SaveEntity(string keyValue, StuLeaveManagementEntity entity); | void SaveEntity(string keyValue, StuLeaveManagementEntity entity); | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DoSubmit(string keyValue, string status, string processId); | |||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void ChangeStatusByProcessId(string status, string processId, string userId); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -31,8 +31,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT t.*,s.StuName as CreateUserName,s.ClassNo,s.DeptNo,s.MajorNo,c.ClassDiredctorNo,c.ClassTutorNo "); | |||||
strSql.Append(" FROM StuLeaveManagement t left join StuInfoBasic s on t.CreateUserNo=s.StuNo left join ClassInfo c on s.ClassNo=c.ClassNo "); | |||||
strSql.Append("SELECT t.*,s.StuName as CreateUserName "); | |||||
//strSql.Append("SELECT t.*,s.StuName as CreateUserName,s.ClassNo,s.DeptNo,s.MajorNo,c.ClassDiredctorNo,c.ClassTutorNo "); | |||||
strSql.Append(" FROM StuLeaveManagement t "); | |||||
strSql.Append(" left join StuInfoBasic s on t.CreateUserNo=s.StuNo "); | |||||
//strSql.Append(" left join ClassInfo c on s.ClassNo=c.ClassNo "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
@@ -53,43 +56,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
strSql.Append(" AND t.CreateUserNo = @StuNo "); | strSql.Append(" AND t.CreateUserNo = @StuNo "); | ||||
} | } | ||||
//班级班主任/辅导员/系主任 | //班级班主任/辅导员/系主任 | ||||
if (!queryParam["ClassManagerNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassManagerNo", queryParam["ClassManagerNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo "); | |||||
//登录用户是否是系主任:若是,展示大于2天的请假记录; | |||||
var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId"); | |||||
if (deptDirectorRoleId != null) | |||||
{ | |||||
var loginInfoRoleIds = LoginUserInfo.Get().roleIds; | |||||
if (loginInfoRoleIds.IndexOf(',') == -1) | |||||
{ | |||||
if (loginInfoRoleIds == deptDirectorRoleId) | |||||
{ | |||||
strSql.Append(" or t.LeaveDay>2 )"); | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" ) "); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
if (loginInfoRoleIds.Split(',').Contains(deptDirectorRoleId)) | |||||
{ | |||||
strSql.Append(" or t.LeaveDay>2 )"); | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" ) "); | |||||
} | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
strSql.Append(" ) "); | |||||
} | |||||
} | |||||
//if (!queryParam["ClassManagerNo"].IsEmpty()) | |||||
//{ | |||||
// dp.Add("ClassManagerNo", queryParam["ClassManagerNo"].ToString(), DbType.String); | |||||
// strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo "); | |||||
// //登录用户是否是系主任:若是,展示大于2天的请假记录; | |||||
// var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId"); | |||||
// if (deptDirectorRoleId != null) | |||||
// { | |||||
// var loginInfoRoleIds = LoginUserInfo.Get().roleIds; | |||||
// if (loginInfoRoleIds.IndexOf(',') == -1) | |||||
// { | |||||
// if (loginInfoRoleIds == deptDirectorRoleId) | |||||
// { | |||||
// strSql.Append(" or t.LeaveDay>2 )"); | |||||
// } | |||||
// else | |||||
// { | |||||
// strSql.Append(" ) "); | |||||
// } | |||||
// } | |||||
// else | |||||
// { | |||||
// if (loginInfoRoleIds.Split(',').Contains(deptDirectorRoleId)) | |||||
// { | |||||
// strSql.Append(" or t.LeaveDay>2 )"); | |||||
// } | |||||
// else | |||||
// { | |||||
// strSql.Append(" ) "); | |||||
// } | |||||
// } | |||||
// } | |||||
// else | |||||
// { | |||||
// strSql.Append(" ) "); | |||||
// } | |||||
//} | |||||
return this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -129,6 +132,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
public StuLeaveManagementEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<StuLeaveManagementEntity>(t => t.ProcessId == processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -189,6 +216,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DoSubmit(string keyValue, string status, string processId) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuLeaveManagement set CheckStatus='" + status + "',ProcessId='" + processId + "' where Id='" + keyValue + "' "); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuLeaveManagement set CheckStatus='" + status + "',CheckUserId='" + userId + "',CheckTime='" + DateTime.Now + "' where ProcessId='" + processId + "' "); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -97,8 +97,10 @@ | |||||
<Compile Include="NodeMethod\DispatchMethod.cs" /> | <Compile Include="NodeMethod\DispatchMethod.cs" /> | ||||
<Compile Include="NodeMethod\MeetingManagementApplyMethod.cs" /> | <Compile Include="NodeMethod\MeetingManagementApplyMethod.cs" /> | ||||
<Compile Include="NodeMethod\StuCancelDisciplineManageMethod.cs" /> | <Compile Include="NodeMethod\StuCancelDisciplineManageMethod.cs" /> | ||||
<Compile Include="NodeMethod\StuCancelLeaveManageMethod.cs" /> | |||||
<Compile Include="NodeMethod\TeacherCancelLeaveManageMethod.cs" /> | <Compile Include="NodeMethod\TeacherCancelLeaveManageMethod.cs" /> | ||||
<Compile Include="NodeMethod\StuDisciplineManageMethod.cs" /> | <Compile Include="NodeMethod\StuDisciplineManageMethod.cs" /> | ||||
<Compile Include="NodeMethod\StuLeaveManagementMethod.cs" /> | |||||
<Compile Include="NodeMethod\TeacherOvertimeManageMethod.cs" /> | <Compile Include="NodeMethod\TeacherOvertimeManageMethod.cs" /> | ||||
<Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" /> | <Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" /> | ||||
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" /> | <Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" /> | ||||
@@ -0,0 +1,27 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | |||||
{ | |||||
public class StuCancelLeaveManageMethod : IWorkFlowMethod | |||||
{ | |||||
StuCancelLeaveManagementIBLL stuCancelLeaveManagementIBLL = new StuCancelLeaveManagementBLL(); | |||||
public void Execute(WfMethodParameter parameter) | |||||
{ | |||||
if (parameter.code == "agree") | |||||
{ | |||||
stuCancelLeaveManagementIBLL.ChangeStatusByProcessId("2", parameter.processId, parameter.userId); | |||||
} | |||||
else | |||||
{ | |||||
stuCancelLeaveManagementIBLL.ChangeStatusByProcessId("3", parameter.processId, parameter.userId); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,26 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Learun.Application.WorkFlow | |||||
{ | |||||
public class StuLeaveManagementMethod : IWorkFlowMethod | |||||
{ | |||||
StuLeaveManagementIBLL stuLeaveManagementIBLL = new StuLeaveManagementBLL(); | |||||
public void Execute(WfMethodParameter parameter) | |||||
{ | |||||
if (parameter.code == "agree") | |||||
{ | |||||
stuLeaveManagementIBLL.ChangeStatusByProcessId("2", parameter.processId, parameter.userId); | |||||
} | |||||
else | |||||
{ | |||||
stuLeaveManagementIBLL.ChangeStatusByProcessId("3", parameter.processId, parameter.userId); | |||||
} | |||||
} | |||||
} | |||||
} |