From 4e13ff3552a22468fc97eaaa2fcda87f09bb6a3b Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 11 Nov 2022 09:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=8F=E8=B4=B9=E5=BC=80=E6=94=AF=E7=94=B3?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FundsApplyController.cs | 2 + .../Views/FundsApply/Index.cshtml | 7 +- .../Views/FundsApply/Index.js | 108 +++++++++++------- .../XmlConfig/ioc.config | 2 +- .../FundsApply/FundsApplyService.cs | 1 + .../FundsApplyDetail/FundsApplyDetailBLL.cs | 1 + .../FundsApplyDetailService.cs | 1 + 7 files changed, 78 insertions(+), 44 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs index da27d80a3..da691f003 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs @@ -99,9 +99,11 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public ActionResult GetFormDataByProcessId(string processId) { var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId(processId); + var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(FundsApplyData.Id); var jsonData = new { FundsApply = FundsApplyData, + FundsApplyDetail = FundsApplyDetailData, }; return Success(jsonData); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml index e97220d9e..eae4e3edb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml @@ -13,11 +13,12 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js index a356e7b1c..4ccfa8b43 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js @@ -46,6 +46,12 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } + learun.layerForm({ id: 'formFundsApply', title: '编辑', @@ -71,10 +77,15 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/DeleteForm', { keyValue: keyValue}, function () { - refreshGirdData(); + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/DeleteForm', { keyValue: keyValue }, function () { + page.search(); }); } }); @@ -103,7 +114,22 @@ var bootstrap = function ($, learun) { }); } }); + //查看 + $('#lr_look').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formFundsApply', + title: '查看', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/FormView?keyValue=' + keyValue, + width: 860, + height: 600, + callBack: function (id) { + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -111,27 +137,31 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList', headData: [ { label: "申报单号", name: "EnCode", width: 200, align: "left" }, - { label: "申报部门", name: "ApplyDept", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('department', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "填报时间", name: "ApplyTime", width: 100, align: "left"}, - { label: "填报人", name: "ApplyUser", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "备注", name: "Remark", width: 100, align: "left"}, - { label: "总金额", name: "SumAmount", width: 100, align: "left"}, + { + label: "申报部门", name: "ApplyDept", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "填报时间", name: "ApplyTime", width: 100, align: "left" }, + { + label: "填报人", name: "ApplyUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + { label: "总金额", name: "SumAmount", width: 100, align: "left" }, { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left" }, { label: "审批状态", name: "Status", width: 100, align: "left", @@ -147,33 +177,31 @@ var bootstrap = function ($, learun) { } ], - mainId:'Id', + mainId: 'Id', isPage: true }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function (res, postData) { - if (!!res) - { - if (res.code == 200) - { - // 发起流程 - var postData = { - schemeCode:'LC_FundsApply',// 填写流程对应模板编号 - processId:processId, - level:'1', - }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { - learun.loading(false); - }); + if (!!res) { + if (res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'LC_FundsApply',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); } - page.search(); - } }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index 45e3931a9..c6bb783be 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -35,7 +35,7 @@