Преглед изворни кода

【增加】班级信息管理:增加班主任/辅导员安排;

临城职教中职
dyy пре 2 година
родитељ
комит
fb3e659cec
8 измењених фајлова са 134 додато и 39 уклоњено
  1. +9
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs
  2. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/FormArrange.cshtml
  3. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/FormArrange.js
  4. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.cshtml
  5. +31
    -23
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +12
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoEntity.cs
  8. +8
    -15
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs

+ 9
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs Прегледај датотеку

@@ -50,6 +50,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
/// <summary>
/// 班主任/辅导员安排表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormArrange()
{
return View();
}
#endregion

#region 获取数据


+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/FormArrange.cshtml Прегледај датотеку

@@ -0,0 +1,15 @@
@{
ViewBag.Title = "班级信息管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="ClassInfo">
<div class="lr-form-item-title">班主任</div>
<div id="ClassDiredctorNo"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ClassInfo">
<div class="lr-form-item-title">辅导员</div>
<div id="ClassTutorNo"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassInfo/FormArrange.js")

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/FormArrange.js Прегледај датотеку

@@ -0,0 +1,52 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-01-29 11:08
* 描 述:班级信息管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#ClassDiredctorNo').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_encode',text: 'f_realname' });
$('#ClassTutorNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ClassInfo/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ClassInfo/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.cshtml Прегледај датотеку

@@ -26,6 +26,10 @@
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" class="form-control" />
</div>
</div>
</div>
</div>
@@ -44,6 +48,7 @@
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_stu" class="btn btn-default"><i class="fa fa-eye"></i>&nbsp;查看学生</a>
<a id="lr_arrange" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;班主任/辅导员安排</a>
</div>
</div>
</div>


+ 31
- 23
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Index.js Прегледај датотеку

@@ -174,6 +174,28 @@ var bootstrap = function ($, learun) {
});
}
});

// 班主任/辅导员安排
$('#lr_arrange').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ClassId');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
learun.layerForm({
id: 'formArrange',
title: '分配班主任/辅导员',
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/FormArrange?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});

},
// 初始化列表
initGird: function () {
@@ -222,33 +244,19 @@ var bootstrap = function ($, learun) {
}

},
{ label: "年级", name: "Grade", width: 80, align: "center" },
{ label: "年级", name: "Grade", width: 60, align: "center" },
{ label: "学生人数", name: "StuNum", width: 80, align: "left" },
{
label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_encode',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
label: "班主任号", name: "ClassDiredctorNo", width: 100, align: "left"
},
{
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_encode',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
label: "班主任", name: "ClassDiredctorName", width: 100, align: "left"
},
{
label: "辅导员号", name: "ClassTutorNo", width: 100, align: "left"
},
{
label: "辅导员", name: "ClassTutorName", width: 100, align: "left"
},
{
label: "是否启用", name: "CheckMark", width: 80, align: "center",


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Прегледај датотеку

@@ -1011,6 +1011,7 @@
<Content Include="Areas\EducationalAdministration\Views\CertificateManage\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\ClassInfo\FormArrange.js" />
<Content Include="Areas\EducationalAdministration\Views\ClassInfo\FormType.js" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\TeachForm.js" />
@@ -1119,6 +1120,7 @@
<Content Include="Areas\EducationalAdministration\Views\MealCardRunTab\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTermStu.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\IndexLessonTermTeach.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ClassInfo\FormArrange.cshtml" />
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" />


+ 12
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoEntity.cs Прегледај датотеку

@@ -71,7 +71,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public string ClassDiredctorNo { get; set; }
/// <summary>
/// 辅导员职工号

/// </summary>
[Column("CLASSTUTORNO")]
public string ClassTutorNo { get; set; }
@@ -122,6 +121,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段

/// <summary>
/// 班主任
/// </summary>
[NotMapped]
public string ClassDiredctorName { get; set; }
/// <summary>
/// 辅导员
/// </summary>
[NotMapped]
public string ClassTutorName { get; set; }

#endregion
}
}


+ 8
- 15
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs Прегледај датотеку

@@ -30,22 +30,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ClassId,
t.ClassName,
t.ClassNo,
t.DeptNo,
t.MajorNo,
t.SerialNum,
t.Grade,
t.StuNum,
t.ClassDiredctorNo,
t.ClassTutorNo,
t.ClassType,
t.CheckMark,t.IsSeparate
");
strSql.Append("SELECT t.*,e.EmpName as ClassDiredctorName,e2.EmpName as ClassTutorName ");
strSql.Append(" FROM ClassInfo t ");
strSql.Append(" left join EmpInfo e on t.ClassDiredctorNo=e.EmpNo ");
strSql.Append(" left join EmpInfo e2 on t.ClassTutorNo=e2.EmpNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -70,6 +58,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
strSql.Append(" AND t.Grade = @Grade ");
}
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)


Loading…
Откажи
Сачувај