@@ -19,6 +19,10 @@ | |||||
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | <div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | ||||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | <div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | ||||
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | <div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | ||||
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div> | <div id="ESType" isvalid="yes" checkexpession="NotNull"></div> | ||||
@@ -31,6 +31,7 @@ var bootstrap = function ($, learun) { | |||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | $('#ESType').lrDataItemSelect({ code: 'StudentType' }); | ||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
$('#ESEnabled').lrRadioCheckbox({ | $('#ESEnabled').lrRadioCheckbox({ | ||||
type: 'radio', | type: 'radio', | ||||
code: 'YesOrNoBit', | code: 'YesOrNoBit', | ||||
@@ -18,6 +18,10 @@ | |||||
<div class="lr-form-item-title">学期</div> | <div class="lr-form-item-title">学期</div> | ||||
<div id="Semester"></div> | <div id="Semester"></div> | ||||
</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="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">学生学号</div> | <div class="lr-form-item-title">学生学号</div> | ||||
<input id="StuNo" type="text" class="form-control" /> | <input id="StuNo" type="text" class="form-control" /> | ||||
@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | |||||
}, 245, 400); | |||||
$('#AcademicYearNo').lrselect({ | $('#AcademicYearNo').lrselect({ | ||||
placeholder: "学年", | placeholder: "学年", | ||||
allowSearch: true, | allowSearch: true, | ||||
@@ -35,6 +35,7 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -157,7 +158,20 @@ var bootstrap = function ($, learun) { | |||||
headData: [ | headData: [ | ||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | ||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | { label: "学期", name: "Semester", width: 100, align: "left" }, | ||||
{ label: "学生学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ | |||||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "学生编号", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | { label: "学生姓名", name: "StuName", width: 100, align: "left" }, | ||||
{ | { | ||||
label: "考试类型", name: "ESType", width: 100, align: "left", | label: "考试类型", name: "ESType", width: 100, align: "left", | ||||
@@ -20,6 +20,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("ESID")] | [Column("ESID")] | ||||
public string ESId { get; set; } | public string ESId { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 班级 | |||||
/// </summary> | |||||
[Column("CLASSNO")] | |||||
public string ClassNo { get; set; } | |||||
/// <summary> | |||||
/// 学年 | /// 学年 | ||||
/// </summary> | /// </summary> | ||||
[Column("ACADEMICYEARNO")] | [Column("ACADEMICYEARNO")] | ||||
@@ -33,16 +33,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" | |||||
t.ESId, | |||||
t.AcademicYearNo, | |||||
t.Semester, | |||||
t.StuName, | |||||
t.StuNo, | |||||
t.ESType, | |||||
t.ESOrder, | |||||
t.ESEnabled | |||||
"); | |||||
strSql.Append(@" * "); | |||||
strSql.Append(" FROM Exam_ExamStudent t "); | strSql.Append(" FROM Exam_ExamStudent t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
@@ -58,6 +49,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.Semester = @Semester "); | strSql.Append(" AND t.Semester = @Semester "); | ||||
} | } | ||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | if (!queryParam["StuNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | ||||
@@ -290,6 +286,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var stuList = new Exam_ExamStudentEntity | var stuList = new Exam_ExamStudentEntity | ||||
{ | { | ||||
ESId = Guid.NewGuid().ToString(), | ESId = Guid.NewGuid().ToString(), | ||||
ClassNo = item.ClassNo, | |||||
AcademicYearNo = AcademicYearNo, | AcademicYearNo = AcademicYearNo, | ||||
Semester = Convert.ToInt32(Semester), | Semester = Convert.ToInt32(Semester), | ||||
StuNo = item.StuNo, | StuNo = item.StuNo, | ||||
@@ -312,6 +309,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var stuList = new Exam_ExamStudentEntity | var stuList = new Exam_ExamStudentEntity | ||||
{ | { | ||||
ESId = Guid.NewGuid().ToString(), | ESId = Guid.NewGuid().ToString(), | ||||
ClassNo = item.ClassNo, | |||||
AcademicYearNo = AcademicYearNo, | AcademicYearNo = AcademicYearNo, | ||||
Semester = Convert.ToInt32(Semester), | Semester = Convert.ToInt32(Semester), | ||||
StuNo = item.StuNo, | StuNo = item.StuNo, | ||||
@@ -334,6 +332,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var stuList = new Exam_ExamStudentEntity | var stuList = new Exam_ExamStudentEntity | ||||
{ | { | ||||
ESId = Guid.NewGuid().ToString(), | ESId = Guid.NewGuid().ToString(), | ||||
ClassNo = item.ClassNo, | |||||
AcademicYearNo = AcademicYearNo, | AcademicYearNo = AcademicYearNo, | ||||
Semester = Convert.ToInt32(Semester), | Semester = Convert.ToInt32(Semester), | ||||
StuNo = item.StuNo, | StuNo = item.StuNo, | ||||