From 8f3aaac05ef52c0227f07b5d658907e820d0825d Mon Sep 17 00:00:00 2001 From: edy Date: Tue, 6 Jul 2021 17:57:14 +0800 Subject: [PATCH] --- .../Controllers/DispatchController.cs | 12 +- .../Views/Dispatch/CheckIndex.cshtml | 43 -------- .../Views/Dispatch/CheckIndex.js | 104 ------------------ .../Views/Dispatch/Index.js | 27 ++++- .../Views/Dispatch/IndexXF.js | 60 ++++------ .../{CheckForm.cshtml => ReadForm.cshtml} | 14 +-- .../Dispatch/{CheckForm.js => ReadForm.js} | 18 +-- .../Learun.Application.Web.csproj | 4 +- .../DispatchAudit/DispatchAuditBLL.cs | 26 +++++ .../DispatchAudit/DispatchAuditIBLL.cs | 7 ++ .../DispatchAudit/DispatchAuditService.cs | 36 +++++- 11 files changed, 136 insertions(+), 215 deletions(-) delete mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.cshtml delete mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.js rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/{CheckForm.cshtml => ReadForm.cshtml} (88%) rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/{CheckForm.js => ReadForm.js} (90%) 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 f33cffaed..4346d0403 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 @@ -66,7 +66,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } - + [HttpGet] + public ActionResult ReadForm() + { + return View(); + } #endregion #region 获取数据 @@ -253,9 +257,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } /// - /// 查看实体数据 - /// 主键 - /// + /// 查阅 + /// + /// /// [HttpPost] [AjaxOnly] diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.cshtml deleted file mode 100644 index 0d7ef1174..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.cshtml +++ /dev/null @@ -1,43 +0,0 @@ -@{ - ViewBag.Title = "收文报告"; - Layout = "~/Views/Shared/_Index.cshtml"; -} -
-
-
-
-
-
-
-
-
-
标题
- -
- @*
-
收文单位
- -
*@ -
-
-
-
- -
-
-
-
-
-@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.js deleted file mode 100644 index 70ecf3850..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckIndex.js +++ /dev/null @@ -1,104 +0,0 @@ -/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) - * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 - * 创建人:超级管理员 - * 日 期:2021-06-01 11:49 - * 描 述:收文报告 - */ -var refreshGirdData; -var bootstrap = function ($, learun) { - "use strict"; - var processId = ''; - var page = { - init: function () { - page.initGird(); - page.bind(); - }, - bind: function () { - $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { - page.search(queryJson); - }, 220, 400); - // 刷新 - $('#lr_refresh').on('click', function () { - location.reload(); - }); - }, - // 初始化列表 - 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); - // } - // }); - // } - //}, - { label: "来文单位", name: "DisFrom", width: 400, align: "center" }, - { label: "字", name: "DisWork", width: 150, align: "center" }, - { label: "号", name: "DisMark", width: 150, align: "center" }, - { label: "份数", name: "Copies", width: 100, align: "center" }, - { label: "年", name: "DisYear", width: 100, align: "center" }, - { 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) { - if (cellvalue == 0) { - return '草稿'; - } if (cellvalue == 1) { - return '审批中'; - } else if (cellvalue == 2) { - return '审批通过'; - } - } - } - ], - mainId: 'Id', - isPage: true - }); - page.search(); - }, - search: function (param) { - param = param || {}; - param.WorkName = 1; - $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); - } - }; - refreshGirdData = function (res, postData) { - if (res.code == 200) { - // 发起流程 - var postData = { - schemeCode: 'Dispatch',// 填写流程对应模板编号 - //schemeCode: 'DBSW',// 填写流程对应模板编号 - processId: processId, - level: '1', - }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { - learun.loading(false); - }); - page.search(); - } - }; - page.init(); -} 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 730f85159..6b20025c4 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 @@ -40,10 +40,6 @@ var bootstrap = function ($, learun) { page.search(); }); } - //if (res) { - // processId = learun.newGuid(); - // res = top[id].save(processId, refreshGirdData); - //} return res; } }); @@ -78,6 +74,29 @@ 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'); 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 d3b6b34c4..08f48ddfd 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 @@ -45,41 +45,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 ==0) { - learun.alert.warning("当前项目未提交,请先提交!"); - return; - } - top.layer.open({ - id: 'FileList', - //type: 2, - title: '查看', - area: ['1000px', '600px'], - btn: ['保存','关闭'], - skin: 'lr-layer', - success: function (layero, index) { - top['FileList'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); - //判断查阅状态 - learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Dispatch/Read', { keyValue: keyValue }, function () { - // refreshGirdData(); - }); - }, - yes: function (index) { - var flag = top['FileList'].acceptClick(refreshGirdData); - if (flag) { - learun.layerClose('', index); - } - }, - end: function () { - top['FileList'] = null; - } - }); - } - }); // 编辑 $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -92,7 +57,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'form', title: '编辑', - url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&WorkName=' + 2 + '&DisOffice=' + 2, + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue, width: 800, height: 380, callBack: function (id) { @@ -110,6 +75,29 @@ 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'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml similarity index 88% rename from Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckForm.cshtml rename to Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml index 3c87edbbb..0db774049 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/CheckForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml @@ -8,9 +8,9 @@
-
来文单位*
- -
+
来文单位*
+ +
*
@@ -43,7 +43,7 @@
附       件
- *@ -
public DispatchAuditService() { - fieldSql=@" + fieldSql = @" t.Id, t.DisId, t.AuditTime, @@ -41,7 +42,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 条件参数 /// - public IEnumerable GetList( string queryJson ) + public IEnumerable GetList(string queryJson) { try { @@ -134,7 +135,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.Id== keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); } catch (Exception ex) { @@ -184,5 +185,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + #region 扩展数据 + + /// + /// 查询数据 + /// + /// + /// + public void Repetition(string DisId) + { + try + { + if (!string.IsNullOrEmpty(DisId)) + { + this.BaseRepository("CollegeMIS").FindList().Where(o => o.DisId == DisId); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } }