@@ -34,7 +34,7 @@ | |||||
<div id="Semester"></div> | <div id="Semester"></div> | ||||
</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> | |||||
<input id="PublishNo" type="text" class="form-control" /> | <input id="PublishNo" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | |||||
}, 250, 400); | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | ||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' }); | $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' }); | ||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | ||||
@@ -53,7 +53,7 @@ var bootstrap = function ($, learun) { | |||||
$('#AcademicYearNo').lrselect({ | $('#AcademicYearNo').lrselect({ | ||||
placeholder: "请选择学年", | placeholder: "请选择学年", | ||||
allowSearch: true, | allowSearch: true, | ||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear', | |||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
@@ -60,10 +60,7 @@ var bootstrap = function ($, learun) { | |||||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | $('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | ||||
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | $('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | ||||
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName); | $('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -31,7 +31,7 @@ | |||||
<div id="Semester"></div> | <div id="Semester"></div> | ||||
</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> | |||||
<input id="PublishNo" type="text" class="form-control" /> | <input id="PublishNo" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -43,9 +43,9 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
@*<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a>*@ | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | <a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -13,6 +13,9 @@ var bootstrap = function ($, learun) { | |||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 250, 400); | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | ||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' }); | $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' }); | ||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | ||||
@@ -20,7 +23,7 @@ var bootstrap = function ($, learun) { | |||||
$('#AcademicYearNo').lrselect({ | $('#AcademicYearNo').lrselect({ | ||||
placeholder: "请选择学年", | placeholder: "请选择学年", | ||||
allowSearch: true, | allowSearch: true, | ||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear', | |||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
@@ -66,6 +69,21 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/Form?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 700, | |||||
btn: null, | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | // 打印 | ||||
$('#lr_print').on('click', function () { | $('#lr_print').on('click', function () { | ||||
$('#gridtable').jqprintTable(); | $('#gridtable').jqprintTable(); | ||||
@@ -39,6 +39,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
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["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["LessonNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.LessonNo = @LessonNo "); | |||||
} | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Semester = @Semester "); | |||||
} | |||||
if (!queryParam["PublishNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("PublishNo", "%" + queryParam["PublishNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.PublishNo Like @PublishNo "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||