From fe024babc27f7bd18abdbde9c4de3bbea4b248bb Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 11 Nov 2022 11:16:43 +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=E5=A4=9A=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/FundsApply/Index.cshtml | 14 +++++++ .../Views/FundsApply/Index.js | 41 +++++++++++++++++-- .../FundsApply/FundsApplyService.cs | 11 +++++ 3 files changed, 63 insertions(+), 3 deletions(-) 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 eae4e3edb..4d1e1614f 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 @@ -7,6 +7,20 @@
+
+
+
+
+
+
+
+
申请人
+
+
+
+
+
+
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 4ccfa8b43..5d431a34c 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 @@ -7,6 +7,8 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var startTime; + var endTime; var processId = ''; var page = { init: function () { @@ -14,6 +16,37 @@ var bootstrap = function ($, learun) { page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '3', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#ApplyUser').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -148,7 +181,7 @@ var bootstrap = function ($, learun) { }); } }, - { label: "填报时间", name: "ApplyTime", width: 100, align: "left" }, + { label: "填报时间", name: "ApplyTime", width: 150, align: "left" }, { label: "填报人", name: "ApplyUser", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -162,7 +195,7 @@ var bootstrap = function ($, learun) { }, { label: "备注", name: "Remark", width: 100, align: "left" }, { label: "总金额", name: "SumAmount", width: 100, align: "left" }, - { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left" }, + { label: "人民币(大写)", name: "UpperAmount", width: 200, align: "left" }, { label: "审批状态", name: "Status", width: 100, align: "left", formatter: function (cellvalue, row) { @@ -180,10 +213,12 @@ var bootstrap = function ($, learun) { mainId: 'Id', isPage: true }); - page.search(); + //page.search(); }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs index 2c897ed60..12ec5cf91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs @@ -39,6 +39,17 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.ApplyTime >= @startTime AND t.ApplyTime <= @endTime ) "); + } + if (!queryParam["ApplyUser"].IsEmpty()) + { + dp.Add("ApplyUser", queryParam["ApplyUser"].ToString(), DbType.String); + strSql.Append(" AND t.ApplyUser = @ApplyUser "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex)