diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs index d0c5e2dbd..d0bd4e1dc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs @@ -56,7 +56,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } - + [HttpGet] + public ActionResult SelectUserForm() + { + return View(); + } /// /// 阅读详情 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js index 7a11ac2cf..c21d5eced 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js @@ -8,6 +8,7 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var processId = ''; + var auditors = {}; var page = { init: function () { page.initGird(); @@ -130,12 +131,55 @@ var bootstrap = function ($, learun) { learun.alert.warning("当前项目已提交,请耐心等待审批!"); return; } - learun.layerConfirm('是否确认提交该项!', function (res) { - if (res) { - processId = learun.newGuid(); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { - refreshGirdData(res, {}); - }); + learun.layerForm({ + id: 'formselectuser', + title: '下发审批指定接收人', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/SelectUserForm?keyValue=' + keyValue, + width: 800, + height: 200, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function (formres, formdata) { + processId = learun.newGuid(); + var schemeObj; + //初始化流程 + learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetSchemeByCode', { code: "Sys_ReceiveDocument" }, function (data) { + if (data) { + schemeObj = JSON.parse(data.F_Content); + // 获取开始节点 + $.each(schemeObj.nodes, function (_index, _item) { + if (_item.type == 'startround') { + var param = { + code: 'Sys_ReceiveDocument', + processId: '', + taskId: '', + nodeId: _item.id, + operationCode: 'agree' + }; + learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetNextAuditors', param, function (data) { + $.each(data, + function (_id, _list) { + if (_list.length > 0) { + auditors[_id] = formdata.SpecifyReceiver; + } + }); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (datares) { + refreshGirdData(datares, {}); + return true; + }); + }); + return true; + } + }); + } + }); + }); + } + return res; } }); } @@ -289,6 +333,7 @@ var bootstrap = function ($, learun) { schemeCode: 'Sys_ReceiveDocument',// 填写流程对应模板编号 processId: processId, level: '1', + auditors: JSON.stringify(auditors) }; learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { learun.loading(false); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/SelectUserForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/SelectUserForm.cshtml new file mode 100644 index 000000000..9a9383569 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/SelectUserForm.cshtml @@ -0,0 +1,11 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
接收人*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/SelectUserForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/SelectUserForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/SelectUserForm.js new file mode 100644 index 000000000..5368e6872 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/SelectUserForm.js @@ -0,0 +1,55 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var acceptClick; +var keyValue = request('keyValue'); +var rFileId = request('rFileId'); +var specifyReceiver = request('specifyReceiver'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#SpecifyReceiver').lrUserSelect(0); + }, + initData: function () { + if (rFileId) { + $('#SpecifyReceiver').lrformselectSet(specifyReceiver); + } + } + }; + // 验证数据是否填写完整 + validForm = function () { + if (!$('#form').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack) { + var formData = $('body').lrGetFormData(); + if (!!callBack) { + callBack({ code: 200, info: "success", data: {} }, formData); + } + return true; + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 2acd3ed73..33087689b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -995,6 +995,7 @@ + @@ -6894,6 +6895,7 @@ +