From 8296691553c3d1e0c042dbd6aba80c6ba9549c12 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 8 Oct 2021 16:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=AE=97=E7=BB=9F=E8=AE=A1=E3=80=81?= =?UTF-8?q?=E6=8A=A5=E9=94=80=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExpendedManageMainController.cs | 11 ++- .../Controllers/FundsManageMainController.cs | 9 ++ .../ExpendedManageMain/IndexStatistics.cshtml | 34 +++++++ .../ExpendedManageMain/IndexStatistics.js | 89 +++++++++++++++++++ .../Views/FundsManageMain/IndexCheck.js | 12 ++- .../FundsManageMain/IndexStatistics.cshtml | 34 +++++++ .../Views/FundsManageMain/IndexStatistics.js | 86 ++++++++++++++++++ .../Learun.Application.Web.csproj | 4 + 8 files changed, 274 insertions(+), 5 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ExpendedManageMainController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ExpendedManageMainController.cs index 3bff33277..ea2e27c0d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ExpendedManageMainController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ExpendedManageMainController.cs @@ -47,7 +47,16 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers { return View(); } - + /// + /// 统计 + /// + /// + [HttpGet] + public ActionResult IndexStatistics() + { + return View(); + } + #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/FundsManageMainController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/FundsManageMainController.cs index aff6eb14c..9b9090041 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/FundsManageMainController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/FundsManageMainController.cs @@ -47,6 +47,15 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers { return View(); } + /// + /// 统计 + /// + /// + [HttpGet] + public ActionResult IndexStatistics() + { + return View(); + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.cshtml new file mode 100644 index 000000000..bee471b91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.cshtml @@ -0,0 +1,34 @@ +@{ + ViewBag.Title = "经费报销管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
项目编号
+
+
+
+
+
+
+
+
+ +
+
+  打印 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.js new file mode 100644 index 000000000..f1b99e9d8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ExpendedManageMain/IndexStatistics.js @@ -0,0 +1,89 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-09-29 10:37 + * 描 述:经费报销管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#SRProjectBasicId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/CustomFunction/SRProjectBasic/GetList', + value: "ID", + text: "EnCode" + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/CustomFunction/ExpendedManageMain/GetPageList', + headData: [ + { + label: "项目编号 ", name: "SRProjectBasicCode", width: 100, align: "left" + }, + { label: "预算总金额", name: "FundsSum", width: 100, align: "left", statistics: true }, + { label: "报销总金额", name: "ExpendedSum", width: 100, align: "left", statistics: true }, + { + label: "申请人", name: "CreateUserId", 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: "CreateTime", width: 150, align: "left" + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return "草稿"; + } else if (cellvalue == 1) { + return "已提交"; + } else if (cellvalue == 2) { + return "审核通过"; + } else if (cellvalue == 3) { + return "审核未通过"; + } + } + }, + ], + mainId: 'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = " and Status=2 "; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.js index b926f1b6c..88ed58ef3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.js @@ -31,7 +31,7 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { var Status = $('#gridtable').jfGridValue('Status'); - if (Status != 1) { + if (Status == 0) { return learun.alert.warning('请先提交选中记录!'); } learun.layerConfirm('是否确认审核通过该项!', function (res) { @@ -47,6 +47,10 @@ var bootstrap = function ($, learun) { $('#lr_fail').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + return learun.alert.warning('请先提交选中记录!'); + } learun.layerConfirm('是否确认未通过该项!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/CustomFunction/FundsManageMain/UpdateStatus', { keyValue: keyValue, Status: 3 }, function () { @@ -84,11 +88,11 @@ var bootstrap = function ($, learun) { }, { label: "备注", name: "Remark", width: 100, align: "left" }, { - label: "状态", name: "Status", width: 100, align: "left" , - formatter: function(cellvalue, row) { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { if (cellvalue == 0) { return "草稿"; - } else if (cellvalue == 1){ + } else if (cellvalue == 1) { return "已提交"; } else if (cellvalue == 2) { return "审核通过"; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.cshtml new file mode 100644 index 000000000..701ed4362 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.cshtml @@ -0,0 +1,34 @@ +@{ + ViewBag.Title = "经费预算管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
项目编号
+
+
+
+
+
+
+
+
+ +
+
+  打印 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.js new file mode 100644 index 000000000..c3ea1f947 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexStatistics.js @@ -0,0 +1,86 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-09-27 11:38 + * 描 述:经费预算管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#SRProjectBasicId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/CustomFunction/SRProjectBasic/GetList', + value: "ID", + text: "EnCode" + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/CustomFunction/FundsManageMain/GetPageList', + headData: [ + { + label: "项目编号", name: "SRProjectBasicCode", width: 100, align: "left" + }, + { label: "总预算", name: "FundsSum", width: 100, align: "left", statistics: true }, + { label: "申请时间", name: "CreateTime", width: 100, align: "left" }, + { + label: "申请人", name: "CreateUserId", 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: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return "草稿"; + } else if (cellvalue == 1) { + return "已提交"; + } else if (cellvalue == 2) { + return "审核通过"; + } else if (cellvalue == 3) { + return "审核未通过"; + } + } + }, + ], + mainId: 'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = " and Status=2 "; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + 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 6c6cfa489..86f81988c 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 @@ -944,7 +944,9 @@ + + @@ -7390,6 +7392,8 @@ + +