@@ -7,12 +7,15 @@ | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">填表人员</div> | <div class="lr-form-item-title">填表人员</div> | ||||
<input id="Creater" type="text" class="form-control" /> | |||||
<input id="Creater" type="text" class="form-control"/> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">类别</div> | <div class="lr-form-item-title">类别</div> | ||||
@@ -8,12 +8,41 @@ var refreshGirdData; | |||||
var createrID = request('createrID'); | var createrID = request('createrID'); | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var startTime; | |||||
var endTime; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | 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: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
@@ -172,6 +201,8 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -176,6 +176,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] public string ClassDiredctorNo { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -62,13 +62,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
t.HasFamily, | t.HasFamily, | ||||
t.HasPeople, | t.HasPeople, | ||||
t.StudentSource, | t.StudentSource, | ||||
t.Contacts | |||||
t.Contacts,d.ClassDiredctorNo | |||||
"); | "); | ||||
strSql.Append(" FROM EpidemicSituation t left join "+ BaseRepository().getDbConnection().Database+ ".dbo.LR_Base_User b on t.Creater=b.F_UserId left join stuinfobasic c on b.F_EnCode=c.stuno "); | |||||
strSql.Append(" FROM EpidemicSituation t left join "+ BaseRepository().getDbConnection().Database+ ".dbo.LR_Base_User b on t.Creater=b.F_UserId left join stuinfobasic c on b.F_EnCode=c.stuno left join classinfo d on c.classno=d.classno "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | 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.CreateTime >= @startTime AND t.CreateTime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["Creater"].IsEmpty()) | if (!queryParam["Creater"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("Creater", "%"+queryParam["Creater"].ToString()+"%", DbType.String); | dp.Add("Creater", "%"+queryParam["Creater"].ToString()+"%", DbType.String); | ||||