@@ -3,27 +3,39 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">系<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | |||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">课程编号<font face="宋体">*</font></div> | |||
<input id="LessonNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">课程名称<font face="宋体">*</font></div> | |||
<input id="LessonName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="LessonName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">排序号</div> | |||
<input id="ELOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | |||
<div id="ELEnabled" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
@@ -30,6 +30,41 @@ var bootstrap = function ($, learun) { | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//年级 | |||
$('#Grade').lrselect({ | |||
placeholder: "请选择年级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#DeptNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
value: 'deptno', | |||
text: 'deptname', | |||
maxHeight: 200, | |||
select: function(item) { | |||
var NDeptNo = $("#DeptNo").lrselectGet(); | |||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||
value: "majorno", | |||
text: "majorname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}); | |||
$("#MajorNo").lrselect(); | |||
$('#ELEnabled').lrRadioCheckbox({ | |||
type: 'radio', | |||
@@ -153,11 +153,37 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, { | |||
label: "系部", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | |||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | |||
//{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, | |||
@@ -995,7 +995,6 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.js" /> | |||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考试课程表 | |||
/// </summary> | |||
public class Exam_ExamLessonEntity | |||
public class Exam_ExamLessonEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
@@ -40,6 +40,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("LESSONNO")] | |||
public string LessonNo { get; set; } | |||
/// <summary> | |||
/// 年级 | |||
/// </summary> | |||
[Column("GRADE")] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// 系 | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// 专业 | |||
/// </summary> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// 排序号 | |||
/// </summary> | |||
[Column("ELORDER")] | |||
@@ -32,13 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.ELId, | |||
t.AcademicYearNo, | |||
t.Semester, | |||
t.LessonNo, | |||
t.LessonName, | |||
t.ELOrder, | |||
t.ELEnabled | |||
t.* | |||
"); | |||
strSql.Append(" FROM Exam_ExamLesson t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
@@ -236,11 +230,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
string sql = $@"insert into Exam_ExamLesson([ELId] | |||
,[AcademicYearNo] | |||
,[Semester] | |||
,Grade,DeptNo,MajorNo | |||
,[LessonName] | |||
,[LessonNo] | |||
,[ELOrder] | |||
,[ELEnabled]) | |||
select NEWID(),AcademicYearNo,Semester,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||
select NEWID(),AcademicYearNo,Semester,Grade,DeptNo,MajorNo,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||
and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | |||
"; | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||