@@ -8,15 +8,18 @@ | |||
} | |||
</style> | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="lr-form-item-title">学号<font face="宋体">*</font></div> | |||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange"> | |||
<div class="lr-form-item-title">性别<font face="宋体">*</font></div> | |||
<div id="GenderNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasicChange" style="display:none;"> | |||
<div class="lr-form-item-title">异动类型</div> | |||
<div id="MoveType"></div> | |||
@@ -59,6 +59,7 @@ var bootstrap = function ($, learun) { | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
$('#NewDeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | |||
if (item != null && item != undefined) { | |||
@@ -106,6 +107,7 @@ var bootstrap = function ($, learun) { | |||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + StuNo, '', function (data) { | |||
if (data) { | |||
$("#StuNo").val(data.StuNo); | |||
$("#GenderNo").lrselectSet(data.GenderNo); | |||
$("#StuName").val(data.StuName); | |||
$("#DeptNo").lrselectSet(data.DeptNo); | |||
$("#MajorNo").lrselectSet(data.MajorNo); | |||
@@ -128,6 +130,7 @@ var bootstrap = function ($, learun) { | |||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfoBasicEntityByStuName?name=' + StuName, '', function (data) { | |||
if (data) { | |||
$("#StuNo").val(data.StuNo); | |||
$("#GenderNo").lrselectSet(data.GenderNo); | |||
$("#StuName").val(data.StuName); | |||
$("#DeptNo").lrselectSet(data.DeptNo); | |||
$("#MajorNo").lrselectSet(data.MajorNo); | |||
@@ -7,6 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -14,6 +17,30 @@ | |||
<div class="lr-form-item-title">学生</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="GenderNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">年级</div> | |||
<div id="Grade"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">异动类型</div> | |||
<div id="StuChangeType"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -7,15 +7,54 @@ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
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: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
}, 300, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#StuChangeType').lrDataItemSelect({ code: 'StuChangeType' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -116,6 +155,12 @@ var bootstrap = function ($, learun) { | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "异动类型", name: "StuChangeType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -234,10 +279,12 @@ var bootstrap = function ($, learun) { | |||
sord: 'desc', | |||
sidx: 'CreateTime' | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// 性别码 | |||
/// </summary> | |||
[Column("GENDERNO")] | |||
public bool? GenderNo { get; set; } | |||
/// <summary> | |||
/// DeptNo | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
@@ -39,6 +39,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", "" + queryParam["DeptNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.DeptNo=@DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", "" + queryParam["MajorNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.MajorNo=@MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", "" + queryParam["ClassNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.ClassNo=@ClassNo "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", "" + queryParam["Grade"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.Grade=@Grade "); | |||
} | |||
if (!queryParam["GenderNo"].IsEmpty()) | |||
{ | |||
dp.Add("GenderNo", "" + queryParam["GenderNo"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.GenderNo=@GenderNo "); | |||
} | |||
if (!queryParam["StuChangeType"].IsEmpty()) | |||
{ | |||
dp.Add("StuChangeType", "" + queryParam["StuChangeType"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.StuChangeType=@StuChangeType "); | |||
} | |||
if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.CheckTime >= @startTime AND t.CheckTime <= @endTime ) "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasicChangeEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||