@@ -158,6 +158,12 @@ namespace Learun.Application.Organization | |||
/// <returns></returns> | |||
[Column("F_MODIFYUSERNAME")] | |||
public string F_ModifyUserName { get; set; } | |||
/// <summary> | |||
/// 公告类别 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("NOTICECATEGORY")] | |||
public string NoticeCategory { get; set; } | |||
/// <summary> | |||
@@ -8,6 +8,7 @@ using System.Threading.Tasks; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
using Learun.Application.Base.AuthorizeModule; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.Organization; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using Learun.Util.Operat; | |||
@@ -31,6 +32,8 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); | |||
private UserIBLL userIbll = new UserBLL(); | |||
private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); | |||
private DataItemIBLL dataItemIbll=new DataItemBLL(); | |||
private DepartmentIBLL departmentIbll=new DepartmentBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 管理页面 | |||
@@ -51,6 +54,33 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 通知公告(需要审核) | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexFlow() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 通知公告表单(需要审核) | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormFlow() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 通知公告表单(需要审核) | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormFlowView() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 管理页面【查看通知公告】 | |||
/// </summary> | |||
/// <returns></returns> | |||
@@ -158,6 +188,31 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||
data.F_NewsContent = WebHelper.HtmlDecode(data.F_NewsContent); | |||
return JsonResult(data); | |||
} | |||
public ActionResult GetNoticeCategoryByDepartment(string departmentId) | |||
{ | |||
var typeList = dataItemIbll.GetDetailList("NoticeCategory"); | |||
var departmentEntity = departmentIbll.GetEntity(departmentId); | |||
List<object> list=new List<object>(); | |||
if (departmentEntity != null) | |||
{ | |||
var typetext = departmentEntity.NoticeCategory?.Split(','); | |||
foreach (var item in typetext) | |||
{ | |||
var entity = typeList.FirstOrDefault(a => a.F_ItemValue.Equals(item)); | |||
if (entity != null) | |||
{ | |||
list.Add(new {text=entity.F_ItemName,value=entity.F_ItemValue}); | |||
} | |||
} | |||
} | |||
return JsonResult(list); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -341,5 +396,39 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||
} | |||
} | |||
#endregion | |||
#region 流程 | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ChangeStatusById(string keyValue, string processId) | |||
{ | |||
noticeIBLL.ChangeStatusById(keyValue, 1, processId); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
NewsEntity OANewsData = noticeIBLL.GetEntityByProcessId(processId); | |||
var jsonData = new | |||
{ | |||
OANews = OANewsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,55 @@ | |||
@{ | |||
ViewBag.Title = "发布新闻"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | |||
<input id="F_FullHead" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | |||
<div id="F_CategoryId" isvalid="yes" checkexpession="NotNull"></div> | |||
<input type="hidden" id="F_Category" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div> | |||
<input id="F_ReleaseTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">信息来源</div> | |||
<input id="F_SourceName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">来源地址</div> | |||
<input id="F_SourceAddress" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="F_SendDeptId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">接收岗位</div> | |||
<div id="F_SendPostId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">下发飞星</div> | |||
<div id="F_IsSendFX"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">标题图片</div> | |||
<div id="F_NewsImage"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">公告内容</div> | |||
<div id="editor" style="height:300px;"></div> | |||
@*<script id="editor" type="text/plain" style="height:270px;"> | |||
</script>*@ | |||
</div> | |||
</div> | |||
@*<script src="~/Content/ueditor/ueditor.config.js"></script> | |||
<script src="~/Content/ueditor/ueditor.all.js"></script> | |||
<script src="~/Content/ueditor/lang/zh-cn/zh-cn.js"></script>*@ | |||
@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/FormFlow.js") |
@@ -0,0 +1,104 @@ | |||
/* | |||
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:陈彬彬 | |||
* 日 期:2017.11.11 | |||
* 描 述:公告通知 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
var isUpdate; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var ue; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
//公告类别 | |||
$('#F_CategoryId').lrselect({ | |||
url: top.$.rootUrl + '/LR_OAModule/Notice/GetNoticeCategoryByDepartment?departmentId=' + loginInfo.departmentId, | |||
text: "text", | |||
value: "value", | |||
select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#F_Category").val(item.text); | |||
} | |||
} | |||
}); | |||
$('#F_NewsImage').lrUploader(); | |||
$('#F_IsSendFX').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#F_SendDeptId').lrDepartmentSelect({ type: 'treemultiple' }); | |||
$('#F_SendPostId').lrPostSelect({ type: 'treemultiple' }); | |||
//内容编辑器 | |||
ue = UE.getEditor('editor'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
//$('#form').lrSetFormData(selectedRow); | |||
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); | |||
$.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
setTimeout(function () { | |||
ue.setContent(data.F_NewsContent); | |||
}, 100); | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/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 == 'Sys_ReceiveFile') { | |||
keyValue = data[id].F_DeptRelationId; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.RProcessId = processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, formData, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} | |||
@@ -0,0 +1,55 @@ | |||
@{ | |||
ViewBag.Title = "发布新闻"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | |||
<input id="F_FullHead" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | |||
<div id="F_CategoryId" isvalid="yes" checkexpession="NotNull"></div> | |||
<input type="hidden" readonly="readonly" id="F_Category" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div> | |||
<input id="F_ReleaseTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" readonly="readonly" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">信息来源</div> | |||
<input id="F_SourceName" readonly="readonly" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">来源地址</div> | |||
<input id="F_SourceAddress" readonly="readonly" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="F_SendDeptId" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">接收岗位</div> | |||
<div id="F_SendPostId" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">下发飞星</div> | |||
<div id="F_IsSendFX" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">标题图片</div> | |||
<div id="F_NewsImage" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||
<div class="lr-form-item-title">公告内容</div> | |||
<div id="editor" readonly="readonly" style="height:300px;"></div> | |||
@*<script id="editor" type="text/plain" style="height:270px;"> | |||
</script>*@ | |||
</div> | |||
</div> | |||
@*<script src="~/Content/ueditor/ueditor.config.js"></script> | |||
<script src="~/Content/ueditor/ueditor.all.js"></script> | |||
<script src="~/Content/ueditor/lang/zh-cn/zh-cn.js"></script>*@ | |||
@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/FormFlowView.js") |
@@ -0,0 +1,95 @@ | |||
/* | |||
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:陈彬彬 | |||
* 日 期:2017.11.11 | |||
* 描 述:公告通知 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
var isUpdate; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var ue; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//公告类别 | |||
$('#F_CategoryId').lrDataItemSelect({ | |||
code: 'NoticeCategory', maxHeight: 230, select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#F_Category").val(item.text); | |||
} | |||
} | |||
}); | |||
$('#F_NewsImage').lrUploader(); | |||
$('#F_IsSendFX').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#F_SendDeptId').lrDepartmentSelect({ type: 'treemultiple' }); | |||
$('#F_SendPostId').lrPostSelect({ type: 'treemultiple' }); | |||
//内容编辑器 | |||
ue = UE.getEditor('editor'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
//$('#form').lrSetFormData(selectedRow); | |||
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); | |||
$.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
setTimeout(function () { | |||
ue.setContent(data.F_NewsContent); | |||
}, 100); | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = {}; | |||
var res = {}; | |||
res.code = 200; | |||
if (!!processId) { | |||
formData.RProcessId = processId; | |||
} | |||
callBack(res, i); | |||
}; | |||
page.init(); | |||
} | |||
@@ -0,0 +1,35 @@ | |||
@{ | |||
ViewBag.Title = "通知公告"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle"> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入标题" /> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> <span class="lrlt">查询</span></a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class="btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class="btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> <span class="lrlt">录入</span></a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> <span class="lrlt">修改</span></a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> <span class="lrlt">查看</span></a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> <span class="lrlt">提交</span></a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> <span class="lrlt">删除</span></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/IndexFlow.js") | |||
@@ -0,0 +1,195 @@ | |||
/* | |||
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:陈彬彬 | |||
* 日 期:2017.07.11 | |||
* 描 述:公告通知 | |||
*/ | |||
var refreshGirdData; // 更新数据 | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGrid(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
var keyword = $('#txt_Keyword').val(); | |||
page.search({ keyword: keyword }); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '添加公告', | |||
url: top.$.rootUrl + '/LR_OAModule/Notice/FormFlow', | |||
width: 1000, | |||
height: 650, | |||
maxmin: true, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('F_NewsId'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(",") != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return false; | |||
} | |||
var SendFlag = $('#gridtable').jfGridValue('F_Status'); | |||
if (SendFlag == "1" || SendFlag == "2") { | |||
learun.alert.warning("当前项目已提交不能编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'formedit', | |||
title: '编辑公告', | |||
url: top.$.rootUrl + '/LR_OAModule/Notice/FormFlow?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 650, | |||
maxmin: true, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(",") != -1) { | |||
learun.alert.warning("只能选择一条记录查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LR_OAModule/Notice/FormFlow?keyValue=' + keyValue, | |||
width: 800, | |||
height: 700, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('F_NewsId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LR_OAModule/Notice/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('F_NewsId'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('F_Status'); | |||
if (SendFlag == "1" || SendFlag=="2") { | |||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LR_OAModule/Notice/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
initGrid: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LR_OAModule/Notice/GetPageList', | |||
headData: [ | |||
{ label: '公告标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' }, | |||
{ label: '公告类别', name: 'F_Category', index: 'F_Category', width: 100, align: 'center' }, | |||
{ | |||
label: "发布时间", name: "F_ReleaseTime", index: "F_ReleaseTime", width: 140, align: "center", | |||
formatter: function (cellvalue) { | |||
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm'); | |||
} | |||
}, | |||
{ label: '信息来源', name: 'F_SourceName', index: 'F_SourceName', width: 100, align: 'center' }, | |||
{ label: '阅读次数', name: 'F_PV', index: 'F_PV', width: 80, align: 'center' }, | |||
{ | |||
label: "审核状态", name: "F_Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === "1") { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === "2") { | |||
return '<span class=\"label label-success\">通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "发布状态", name: "F_EnabledMark", index: "F_EnabledMark", width: 80, align: "center", autowidth: false, | |||
formatter: function (cellvalue) { | |||
if (cellvalue == 1) { | |||
return "<span class=\"label label-success\">已发布</span>"; | |||
} else { | |||
return "<span class=\"label label-danger\">未发布</span>"; | |||
} | |||
} | |||
}, | |||
{ label: "创建时间", name: "F_CreateDate", index: "F_CreateDate", width: 130, align: "center" } | |||
], | |||
mainId: 'F_NewsId', | |||
reloadSelected: true, | |||
isMultiselect: true, | |||
isPage: true, | |||
sidx: 'F_CreateDate', | |||
sord: 'desc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
$('#gridtable').jfGridSet('reload', param); | |||
} | |||
}; | |||
// 保存数据后回调刷新 | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
var postData = { | |||
schemeCode: 'OA_News',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
} | |||
page.init(); | |||
} | |||
@@ -36,6 +36,10 @@ | |||
<div id="F_SchoolMasterId" ></div> | |||
<input type="hidden" id="F_SchoolMaster"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">公告类别</div> | |||
<div id="NoticeCategory" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">电话号</div> | |||
<input id="F_OuterPhone" type="text" class="form-control" /> | |||
@@ -37,6 +37,8 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}); | |||
$('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true }); | |||
}, | |||
initData: function () { | |||
if (!!selectedRow) { | |||
@@ -98,6 +98,18 @@ var bootstrap = function ($, learun) { | |||
{ label: "部门性质", name: "F_Nature", width: 100, align: "left" }, | |||
{ label: "负责人", name: "F_Manager", width: 100, align: "left" }, | |||
{ label: "分管校长", name: "F_SchoolMaster", width: 100, align: "left" }, | |||
{ | |||
label: "公告类别", name: "NoticeCategory", width: 200, align: "left" , | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getsAsync('dataItem', { | |||
key: value, | |||
code: 'NoticeCategory', | |||
callback: function (_data) { | |||
callback(_data); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "电话号", name: "F_OuterPhone", width: 100, align: "left" }, | |||
{ label: "分机号", name: "F_InnerPhone", width: 60, align: "center" }, | |||
{ label: "排序", name: "F_Order", width: 60, align: "center" }, | |||
@@ -1261,6 +1261,9 @@ | |||
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\Form.js" /> | |||
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\Index.js" /> | |||
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\StampDetailIndex.js" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlowView.js" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlow.js" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\IndexFlow.js" /> | |||
<Content Include="Areas\LR_OAModule\Views\ResourceFile\BcIndex.js" /> | |||
<Content Include="Areas\LR_OAModule\Views\Signet\Index.js" /> | |||
<Content Include="Areas\LR_PortalSite\Views\Article\Form.css" /> | |||
@@ -6842,6 +6845,9 @@ | |||
<Content Include="Areas\LR_Desktop\Views\WeChatDevelop\Index.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EmpInfo\ImportForm.cshtml" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\IndexFlow.cshtml" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlow.cshtml" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlowView.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -400,7 +400,7 @@ | |||
else { | |||
var data = storage.get("dataItemData").data || {}; | |||
var keyList = op.key.split(','); | |||
var keyList = (op.key || "").split(','); | |||
var _text = [] | |||
$.each(keyList, function (_index, _item) { | |||
var _item = clientAsyncData.dataItem.find(_item, data[op.code] || {}); | |||
@@ -25,6 +25,7 @@ | |||
<typeAlias alias="Sys_SendFilePartyMethod" type="Learun.Application.WorkFlow.Sys_SendFilePartyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_ReceiveMethod" type="Learun.Application.WorkFlow.Ass_ReceiveMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="ADR_AddApplyMethod" type="Learun.Application.WorkFlow.ADR_AddApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="OA_NewsMethod" type="Learun.Application.WorkFlow.OA_NewsMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
@@ -60,6 +61,7 @@ | |||
<type type="IWorkFlowMethod" mapTo="Ass_ReceiveMethod" name="Ass_ReceiveMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="ADR_AddApplyMethod" name="ADR_AddApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="WFFileRelease" name="wfFileRelease"></type> | |||
<type type="IWorkFlowMethod" mapTo="OA_NewsMethod" name="OA_NewsMethod"></type> | |||
</container> | |||
@@ -150,6 +150,26 @@ namespace Learun.Application.OA | |||
} | |||
} | |||
} | |||
public void ChangeStatusByProcessId(string parameterProcessId, int p1) | |||
{ | |||
try | |||
{ | |||
newsService.ChangeStatusByProcessId(parameterProcessId, p1); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -182,6 +182,18 @@ namespace Learun.Application.OA | |||
[Column("F_ISSENDFX")] | |||
public bool? F_IsSendFX { get; set; } | |||
/// <summary> | |||
/// 流程id | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("F_PROGRESSID")] | |||
public string F_ProgressId { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("F_STATUS")] | |||
public string F_Status { get; set; } | |||
/// <summary> | |||
@@ -46,5 +46,7 @@ namespace Learun.Application.OA | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, NewsEntity newsEntity); | |||
#endregion | |||
void ChangeStatusByProcessId(string parameterProcessId, int p1); | |||
} | |||
} |
@@ -3,6 +3,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Text; | |||
using Spire.Pdf.General.Render.Decode.Jpeg2000.Icc; | |||
namespace Learun.Application.OA | |||
{ | |||
@@ -171,5 +172,34 @@ namespace Learun.Application.OA | |||
} | |||
#endregion | |||
public void ChangeStatusByProcessId(string parameterProcessId, int status) | |||
{ | |||
if (status == 2) | |||
{ | |||
try | |||
{ | |||
var newEntity = this.BaseRepository() | |||
.FindEntity<NewsEntity>(a => a.F_ProgressId == parameterProcessId); | |||
if (null != newEntity) | |||
{ | |||
newEntity.F_Status = "2"; | |||
} | |||
this.BaseRepository().Update(newEntity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -121,11 +121,52 @@ namespace Learun.Application.OA | |||
/// </summary> | |||
/// <param name="keyword">关键词</param> | |||
/// <returns></returns> | |||
public IEnumerable<NewsEntity> GetList(string keyword, string userId,string categoryId=null) | |||
public IEnumerable<NewsEntity> GetList(string keyword, string userId, string categoryId = null) | |||
{ | |||
try | |||
{ | |||
return noticeService.GetList(keyword, userId,categoryId); | |||
return noticeService.GetList(keyword, userId, categoryId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 流程 | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
noticeService.ChangeStatusById(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public NewsEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return noticeService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -52,5 +52,8 @@ namespace Learun.Application.OA | |||
IEnumerable<NewsEntity> GetList(string keyword, string userId,string categoryId=null); | |||
#endregion | |||
void ChangeStatusById(string keyValue, int i, string processId); | |||
NewsEntity GetEntityByProcessId(string processId); | |||
} | |||
} |
@@ -182,5 +182,36 @@ namespace Learun.Application.OA | |||
} | |||
#endregion | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
BaseRepository().ExecuteBySql($"UPDATE dbo.LR_OA_News SET F_Status='{status}',F_ProgressId='{processId}' WHERE F_NewsId='{keyValue}'", null); | |||
} | |||
catch (Exception ex) | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
public NewsEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<NewsEntity>(t => t.F_ProgressId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -106,6 +106,7 @@ | |||
<Compile Include="NodeMethod\Ass_AllocationMethod.cs" /> | |||
<Compile Include="NodeMethod\IWorkFlowMethod.cs" /> | |||
<Compile Include="NodeMethod\Sys_ReceiveDocumentMethod.cs" /> | |||
<Compile Include="NodeMethod\OA_NewsMethod.cs" /> | |||
<Compile Include="NodeMethod\Sys_SendFilePartyMethod.cs" /> | |||
<Compile Include="NodeMethod\Sys_SendFileMethod.cs" /> | |||
<Compile Include="NodeMethod\Ass_RepairItemMethod.cs" /> | |||
@@ -227,6 +228,10 @@ | |||
<Project>{211fa31a-b9d8-4f48-80cc-573b9410828e}</Project> | |||
<Name>Learun.Application.Message</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\Learun.Application.OA\Learun.Application.OA.csproj"> | |||
<Project>{5F3FDF79-A47E-4782-A090-DD0DC2D5CDC1}</Project> | |||
<Name>Learun.Application.OA</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\Learun.Application.TwoDevelopment\Learun.Application.TwoDevelopment.csproj"> | |||
<Project>{56f9a112-fd96-4809-98f4-0d7c5de0711b}</Project> | |||
<Name>Learun.Application.TwoDevelopment</Name> | |||
@@ -0,0 +1,26 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Learun.Application.OA; | |||
namespace Learun.Application.WorkFlow | |||
{ | |||
public class OA_NewsMethod : IWorkFlowMethod | |||
{ | |||
NewsIBLL newsIBLL=new NewsBLL(); | |||
public void Execute(WfMethodParameter parameter) | |||
{ | |||
if (parameter.code == "agree") | |||
{ | |||
newsIBLL.ChangeStatusByProcessId(parameter.processId, 2); | |||
} | |||
else | |||
{ | |||
newsIBLL.ChangeStatusByProcessId(parameter.processId, 0); | |||
} | |||
} | |||
} | |||
} |