Browse Source

人才培养计划管理与审批

中职版本
zhangli 3 years ago
parent
commit
f94a7e2f00
9 changed files with 242 additions and 24 deletions
  1. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EATalentTrainController.cs
  2. +42
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.cshtml
  3. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.js
  4. +5
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.cshtml
  5. +87
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js
  6. +23
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs
  7. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs
  9. +25
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EATalentTrainController.cs View File

@@ -111,6 +111,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
return Success("保存成功!");
}
/// <summary>
/// 修改状态
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue,int Status)
{
eATalentTrainIBLL.UpdateStatus(keyValue, Status);
return Success("操作成功!");
}
#endregion

}


+ 42
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.cshtml View File

@@ -3,33 +3,61 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" >
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">方案名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/>
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<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="EATalentTrain" >
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<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="EATalentTrain" >
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" ></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" >
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">入学要求</div>
<input id="EntranceRequire" type="text" class="form-control" />
<input id="EntranceRequire" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" >
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">修业年限</div>
<input id="YearLimit" type="text" class="form-control" />
<input id="YearLimit" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" >
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">培训方案</div>
<div id="ProgramFile" ></div>
<div id="ProgramFile"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">计划招生人数</div>
<input id="PlannedNum" type="number" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">计划教学课程</div>
<div id="PlannedCourse"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">就业领域</div>
<input id="EmploymentField" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">教学条件</div>
<input id="TeachingCondition" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">教学资源</div>
<input id="TeachingResource" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">培养目标</div>
<input id="TrainingObjectives" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" >
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/EATalentTrain/Form.js")

+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.js View File

@@ -31,7 +31,9 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#PlannedCourse').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', type: 'multiple' });
$('#ProgramFile').lrUploader();
},
initData: function () {


+ 5
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.cshtml View File

@@ -31,9 +31,12 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;提交</a>
<a id="lr_check" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;审核通过</a>
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;未通过</a>
</div>
</div>
</div>


+ 87
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js View File

@@ -79,12 +79,80 @@ var bootstrap = function ($, learun) {
});
}
});

//提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
return learun.alert.warning('只有草稿状态才可提交!');
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 1 }, function () {
refreshGirdData();
});
}
});
}
});
//审核通过
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 0) {
return learun.alert.warning('请先提交!');
}
learun.layerConfirm('是否确认审核通过该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () {
refreshGirdData();
});
}
});
}
});
//审核不通过
$('#lr_nocheck').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 0) {
return learun.alert.warning('请先提交!');
}
learun.layerConfirm('是否确认审核不通过该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 3 }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/EATalentTrain/GetPageList',
headData: [
{ label: "方案名称", name: "Name", width: 150, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 0) {
return '<span class=\"label label-default\">草稿</span>';
} else if (cellvalue == 1) {
return "<span class=\"label label-warning\">待审核</span>";
} else if (cellvalue == 2) {
return "<span class=\"label label-success\">审核通过</span>";
} else {
return "<span class=\"label label-danger\">未通过</span>";
}

}
},
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{
@@ -102,6 +170,24 @@ var bootstrap = function ($, learun) {
},
{ label: "入学要求", name: "EntranceRequire", width: 150, align: "left" },
{ label: "修业年限", name: "YearLimit", width: 100, align: "left" },
{ label: "计划招生人数", name: "PlannedNum", width: 100, align: "left" },
{
label: "计划教学课程", name: "PlannedCourse", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonid',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: "就业领域", name: "EmploymentField", width: 100, align: "left" },
{ label: "教学条件", name: "TeachingCondition", width: 100, align: "left" },
{ label: "教学资源", name: "TeachingResource", width: 100, align: "left" },
{ label: "培养目标", name: "TrainingObjectives", width: 100, align: "left" },
],
mainId: 'Id',
isPage: true


+ 23
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs View File

@@ -93,7 +93,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 修改状态
/// </summary>
/// <param name="keyValue">主键</param>
public void UpdateStatus(string keyValue, int Status)
{
try
{
eATalentTrainService.UpdateStatus(keyValue, Status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs View File

@@ -20,6 +20,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 方案名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
@@ -54,6 +59,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }

/// <summary>
/// 计划招生人数
/// </summary>
[Column("PLANNEDNUM")]
public int? PlannedNum { get; set; }
/// <summary>
/// 计划教学课程
/// </summary>
[Column("PLANNEDCOURSE")]
public string PlannedCourse { get; set; }
/// <summary>
/// 就业领域
/// </summary>
[Column("EMPLOYMENTFIELD")]
public string EmploymentField { get; set; }
/// <summary>
/// 教学条件
/// </summary>
[Column("TEACHINGCONDITION")]
public string TeachingCondition { get; set; }
/// <summary>
/// 教学资源
/// </summary>
[Column("TEACHINGRESOURCE")]
public string TeachingResource { get; set; }
/// <summary>
/// 培养目标
/// </summary>
[Column("TRAININGOBJECTIVES")]
public string TrainingObjectives { get; set; }

/// <summary>
/// 状态
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
#endregion

#region 扩展操作
@@ -63,6 +106,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public void Create()
{
this.Id = Guid.NewGuid().ToString();
this.Status = 0;
}
/// <summary>
/// 编辑调用


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs View File

@@ -36,6 +36,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
void UpdateStatus(string keyValue, int Status);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 25
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs View File

@@ -38,20 +38,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo",queryParam["AcademicYearNo"].ToString(), DbType.String);
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);
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String);
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
return this.BaseRepository("CollegeMIS").FindList<EATalentTrainEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<EATalentTrainEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -102,7 +102,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<EATalentTrainEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<EATalentTrainEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void UpdateStatus(string keyValue, int Status)
{
try
{
string sql = $"update EATalentTrain set Status={Status} where Id='{keyValue}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{


Loading…
Cancel
Save