From abfb8c2541027d37bf30b2e2caa003f4ff41987b Mon Sep 17 00:00:00 2001 From: edy Date: Tue, 22 Jun 2021 18:33:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DispatchController.cs | 28 ++++++++++++++++++- .../Views/Dispatch/Form.cshtml | 8 ++---- .../Views/Dispatch/Form.js | 7 +++++ .../Views/Dispatch/FormView.cshtml | 4 +-- .../Views/Dispatch/FormView.js | 7 +++++ .../Views/Dispatch/Index.js | 26 +++++++++++++++-- .../Views/Dispatch/IndexXF.js | 26 +++++++++++++++-- .../Views/Dispatch/Print.cshtml | 2 +- 8 files changed, 94 insertions(+), 14 deletions(-) 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 7fbe8369e..f32fb6b14 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 @@ -22,7 +22,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers private DispatchIBLL dispatchIBLL = new DispatchBLL(); private NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL(); private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); - + private DataItemIBLL dataItemIBLL = new DataItemBLL(); #region 视图功能 /// @@ -189,6 +189,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult Print(string keyValue) { var dispatchEntity = dispatchIBLL.GetDispatchEntity(keyValue); + if (dispatchEntity == null) { return View(new DispatchEntity()); @@ -198,6 +199,31 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers dispatchEntity.AttachmentName = annexesFileIBLL.GetFileNames(dispatchEntity.AttachmentName); } + #region 读取数据 + if (dispatchEntity.DisTitle != null) + { + var Model = dataItemIBLL.GetDetailList("DisPatch"); + foreach (var item in Model) + { + if (!string.IsNullOrEmpty(dispatchEntity.DisTitle) && item.F_ItemValue == dispatchEntity.DisTitle) + { + dispatchEntity.DisTitle = item.F_ItemName; + } + } + } + if (dispatchEntity.DisOffice != null) + { + var Model = dataItemIBLL.GetDetailList("DisOffice"); + foreach (var item in Model) + { + if (!string.IsNullOrEmpty(dispatchEntity.DisOffice) && item.F_ItemValue == dispatchEntity.DisOffice) + { + dispatchEntity.DisOffice = item.F_ItemName; + } + } + } + #endregion + //获取校长的签名盖章 var listTaskLog = nWFTaskIBLL.GetLogList(dispatchEntity.processId); var nwfTaskLogEntity = listTaskLog.FirstOrDefault(a => a.F_TaskUserName == "超级管理员"); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.cshtml index f218e00dd..45b3f451f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.cshtml @@ -4,8 +4,8 @@ }
-
标题*
- +
标题
+
来文单位*
@@ -53,10 +53,6 @@ onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#RenderDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
- @*
-
批示
- -
*@
收文单位
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.js index c3970e9aa..e5add66ad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.js @@ -7,6 +7,7 @@ var acceptClick; var keyValue = request('keyValue'); var DisOffice = request('DisOffice'); +var WorkName = request('WorkName'); // 设置权限 var setAuthorize; // 设置表单数据 @@ -50,6 +51,12 @@ var bootstrap = function ($, learun) { } else { $('#DisOffice').lrselectSet("2"); } + $('#DisTitle').lrDataItemSelect({ code: 'Dispatch' }); + if (WorkName == "1") { + $('#DisTitle').lrselectSet("1"); + } else { + $('#DisTitle').lrselectSet("2"); + } }, initData: function () { if (!!keyValue) { 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 c8c7436e6..5448dc2cd 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 @@ -4,8 +4,8 @@ }
-
标题*
- +
标题
+
来文单位*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.js index 028a6db32..56a77b6ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.js @@ -7,6 +7,7 @@ var acceptClick; var keyValue = request('keyValue'); var DisOffice = request('DisOffice'); +var WorkName = request('WorkName'); // 设置权限 var setAuthorize; // 设置表单数据 @@ -50,6 +51,12 @@ var bootstrap = function ($, learun) { } else { $('#DisOffice').lrselectSet("2"); } + $('#DisTitle').lrDataItemSelect({ code: 'Dispatch' }); + if (WorkName == "1") { + $('#DisTitle').lrselectSet("1"); + } else { + $('#DisTitle').lrselectSet("2"); + } }, initData: function () { 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 837378a03..fb6646926 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 @@ -139,7 +139,18 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', headData: [ - { label: "标题", name: "DisTitle", width: 250, align: "center" }, + { + label: "标题", name: "DisTitle", width: 250, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Dispatch', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, { label: "来文单位", name: "DisFrom", width: 200, align: "center" }, { label: "字", name: "DisWork", width: 80, align: "center" }, { label: "号", name: "DisMark", width: 80, align: "center" }, @@ -150,7 +161,18 @@ var bootstrap = function ($, learun) { { label: "事由", name: "Reasons", width: 150, align: "center" }, { label: "呈送意见", name: "Render", width: 200, align: "center" }, { label: "呈送时间", name: "RenderDate", width: 100, align: "center" }, - { label: "收文单位", name: "DisOffice", width: 200, 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.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js index 370397cc6..d636a935e 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 @@ -136,7 +136,18 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', headData: [ - { label: "标题", name: "DisTitle", width: 250, align: "center" }, + { + label: "标题", name: "DisTitle", width: 250, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Dispatch', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, { label: "来文单位", name: "DisFrom", width: 200, align: "center" }, { label: "字", name: "DisWork", width: 80, align: "center" }, { label: "号", name: "DisMark", width: 80, align: "center" }, @@ -147,7 +158,18 @@ var bootstrap = function ($, learun) { { label: "事由", name: "Reasons", width: 150, align: "center" }, { label: "呈送意见", name: "Render", width: 200, align: "center" }, { label: "呈送时间", name: "RenderDate", width: 100, align: "center" }, - { label: "收文单位", name: "DisOffice", width: 200, 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 937f546ad..7c5207b52 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 @@ -217,7 +217,7 @@ 线

-
@Model.WorkName
+
@Model.DisTitle