diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs index ddca4fc31..37a2617cb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using Learun.Application.WorkFlow; using Learun.Application.Base.SystemModule; using System.Linq; +using DocumentFormat.OpenXml.EMMA; using Learun.Application.Organization; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers @@ -46,6 +47,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View("IndexXF"); } + + public ActionResult ReadIndex() + { + return View(); + } + /// /// 表单页 /// @@ -71,6 +78,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + + [HttpGet] + public ActionResult SelectForm() + { + return View(); + } + #endregion #region 获取数据 @@ -265,27 +280,35 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(dispatchEntity); } + #region 查阅 /// /// 查阅 /// /// + /// /// [HttpPost] [AjaxOnly] - public ActionResult Read(string keyValue) + public ActionResult Read(string keyValue, string reader) { DispatchAuditEntity entityaudit = new DispatchAuditEntity(); var userInfo = LoginUserInfo.Get(); - var Model = dispatchAuditIBLL.Repetition(keyValue, userInfo.realName); - if (Model != null) + string userIds = userInfo.userId; + if (reader.Contains(userIds)) + { + int i = 1; + } + + var model = dispatchAuditIBLL.Repetition(keyValue, userInfo.realName); + if (model != null) { return Fail("请勿重复批阅!"); } else { var dispatchEntity = dispatchIBLL.GetDispatchEntity(keyValue); - var PrintList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).Select(x => x.F_CreateUserName); - if (PrintList.Contains(userInfo.realName)) + var printList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).Select(x => x.F_CreateUserName); + if (printList.Contains(userInfo.realName)) { return Fail("请勿重复批阅!"); } @@ -301,5 +324,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion + #region 设置传阅人 + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SetRead(string objectId, string userIds) + { + var model = dispatchIBLL.GetDispatchEntity(objectId); + if (!string.IsNullOrEmpty(model.Reader)) + { + return Fail("请勿重复设置传阅人!"); + } + else + { + model.Reader = userIds; + dispatchIBLL.SaveEntity(objectId, model); + return Success("设置成功!"); + } + } + #endregion + + #endregion + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml index 3c87edbbb..1aff7bceb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml @@ -8,9 +8,9 @@
-
来文单位*
- -
+
来文单位*
+ +
*
@@ -47,12 +47,12 @@
收文单位
-
- -
+
+ +
@*
呈送意见
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml index 0d7ef1174..d4816bfc9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml @@ -31,7 +31,7 @@  编辑  删除   提交 -  查阅 +  设置传阅  打印
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js index 14242836d..314474d76 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js @@ -74,29 +74,6 @@ var bootstrap = function ($, learun) { }); } }); - //查阅 - $('#lr_Read').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); - if (learun.checkrow(keyValue)) { - var FlowNo = $('#gridtable').jfGridValue('FlowNo'); - if (FlowNo != 2) { - learun.alert.warning("当前项目不能查阅!"); - return; - } - learun.layerForm({ - id: 'form', - title: '查阅', - url: top.$.rootUrl + '/EducationalAdministration/Dispatch/ReadForm?keyValue=' + keyValue, - width: 800, - height: 380, - callBack: function (id) { - learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/Read', { keyValue: keyValue }, function (res) { - }); - } - }); - - } - }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -152,24 +129,31 @@ var bootstrap = function ($, learun) { }); } }); + // 添加传阅人 + $('#lr_setread').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + var loginInfo = learun.clientdata.get(['userinfo']); + console.log(loginInfo); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '添加传阅人员', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/SelectForm?objectId=' + keyValue + '&companyId=' + loginInfo.F_CompanyId + '&departmentId=' + loginInfo.F_DepartmentId + '&category=1', + width: 800, + height: 520, + callBack: function (id) { + return top[id].acceptClick(); + } + }); + } + }); }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', - headData: [ - //{ - // label: "标题", name: "DisTitle", width: 400, align: "center", - // formatterAsync: function (callback, value, row, op, $cell) { - // learun.clientdata.getAsync('dataItem', { - // key: value, - // code: 'Dispatch', - // callback: function (_data) { - // callback(_data.text); - // } - // }); - // } - //}, + headData: + [ { label: "来文单位", name: "DisFrom", width: 400, align: "center" }, { label: "字", name: "DisWork", width: 150, align: "center" }, { label: "号", name: "DisMark", width: 150, align: "center" }, @@ -178,20 +162,6 @@ var bootstrap = function ($, learun) { { label: "月", name: "DisMonth", width: 100, align: "center" }, { label: "日", name: "DisDay", width: 100, align: "center" }, { label: "事由", name: "Reasons", width: 500, align: "center" }, - //{ label: "呈送意见", name: "Render", width: 200, align: "center" }, - //{ label: "呈送时间", name: "RenderDate", width: 100, align: "center" }, - //{ - // label: "收文单位", name: "DisOffice", width: 200, align: "center", - // formatterAsync: function (callback, value, row, op, $cell) { - // learun.clientdata.getAsync('dataItem', { - // key: value, - // code: 'DisOffice', - // callback: function (_data) { - // callback(_data.text); - // } - // }); - // } - //}, { label: "审批状态", name: "FlowNo", width: 100, align: "center", formatter: function (cellvalue, row) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml index d929ab324..1e196a8bd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml @@ -31,7 +31,7 @@  编辑  删除   提交 -   查阅 +  设置传阅  打印 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js index b3f8a563e..f1eb8f367 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js @@ -75,29 +75,6 @@ var bootstrap = function ($, learun) { }); } }); - //查阅 - $('#lr_Read').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); - if (learun.checkrow(keyValue)) { - var FlowNo = $('#gridtable').jfGridValue('FlowNo'); - if (FlowNo != 2) { - learun.alert.warning("当前项目不能查阅!"); - return; - } - learun.layerForm({ - id: 'form', - title: '查阅', - url: top.$.rootUrl + '/EducationalAdministration/Dispatch/ReadForm?keyValue=' + keyValue, - width: 800, - height: 380, - callBack: function (id) { - learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/Read', { keyValue: keyValue }, function (res) { - }); - } - }); - - } - }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -153,24 +130,31 @@ var bootstrap = function ($, learun) { }); } }); + // 添加传阅人 + $('#lr_setread').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + var loginInfo = learun.clientdata.get(['userinfo']); + console.log(loginInfo); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '添加传阅人员', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/SelectForm?objectId=' + keyValue + '&companyId=' + loginInfo.F_CompanyId + '&departmentId=' + loginInfo.F_DepartmentId + '&category=1', + width: 800, + height: 520, + callBack: function (id) { + return top[id].acceptClick(); + } + }); + } + }); }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', - headData: [ - //{ - // label: "标题", name: "DisTitle", width: 400, align: "center", - // formatterAsync: function (callback, value, row, op, $cell) { - // learun.clientdata.getAsync('dataItem', { - // key: value, - // code: 'Dispatch', - // callback: function (_data) { - // callback(_data.text); - // } - // }); - // } - //}, + headData: + [ { label: "来文单位", name: "DisFrom", width: 400, align: "center" }, { label: "字", name: "DisWork", width: 150, align: "center" }, { label: "号", name: "DisMark", width: 150, align: "center" }, @@ -179,20 +163,6 @@ var bootstrap = function ($, learun) { { label: "月", name: "DisMonth", width: 100, align: "center" }, { label: "日", name: "DisDay", width: 100, align: "center" }, { label: "事由", name: "Reasons", width: 500, align: "center" }, - //{ label: "呈送意见", name: "Render", width: 200, align: "center" }, - //{ label: "呈送时间", name: "RenderDate", width: 100, align: "center" }, - //{ - // label: "收文单位", name: "DisOffice", width: 200, align: "center", - // formatterAsync: function (callback, value, row, op, $cell) { - // learun.clientdata.getAsync('dataItem', { - // key: value, - // code: 'DisOffice', - // callback: function (_data) { - // callback(_data.text); - // } - // }); - // } - //}, { label: "审批状态", name: "FlowNo", width: 100, align: "center", formatter: function (cellvalue, row) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml index 72c22fe58..7490a5825 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml @@ -340,8 +340,6 @@ $('#lr_print').on('click', function () { $('#content').jqprint(); }); - - console.log(sss); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml index 0db774049..8de5a276f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml @@ -9,35 +9,35 @@
来文单位*
- +
*
- +
*
- +
份数*
- +
*
- +
*
- +
*
- +
事       由
- +
附       件
@@ -47,22 +47,12 @@
收文单位
-
- -
- @*
-
呈送意见
- -
-
+
+ *@ + +
+
[Column("PROCESSID")] public string processId { get; set; } + /// + /// 保存有权限查看的人(主键) + /// + [Column("READER")] + public string Reader { get; set; } + #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs index e7780e034..b17648c18 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs @@ -49,7 +49,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration t.Instructions, t.DisOffice, t.FlowNo, - t.processId + t.processId, + t.Reader "); strSql.Append(" FROM Dispatch t "); strSql.Append(" WHERE 1=1 "); @@ -67,6 +68,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("DisTitle", "%" + queryParam["DisTitle"].ToString() + "%", DbType.String); strSql.Append(" AND t.DisTitle Like @DisTitle "); } + if (!queryParam["DisFrom"].IsEmpty()) + { + dp.Add("DisFrom", "%" + queryParam["DisFrom"].ToString() + "%", DbType.String); + strSql.Append(" AND t.DisTitle Like @DisFrom "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex)