Bladeren bron

教学比赛功能 添加附件,删除字段,部门学校审批,新增类型

怀来职教中心中职
ndbs 1 jaar geleden
bovenliggende
commit
138371db5b
13 gewijzigde bestanden met toevoegingen van 280 en 32 verwijderingen
  1. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingCompetitionController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/CheckForm.cshtml
  3. +6
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.cshtml
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.js
  5. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.cshtml
  6. +63
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.js
  7. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.cshtml
  8. +80
    -22
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.js
  9. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  10. +18
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionBLL.cs
  11. +16
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionEntity.cs
  12. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionIBLL.cs
  13. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionService.cs

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingCompetitionController.cs Bestand weergeven

@@ -37,6 +37,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
[HttpGet]
public ActionResult FormDeptSchool()
{
return View();
}

[HttpGet]
public ActionResult CheckForm()
@@ -119,6 +124,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("保存成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult DeptOrSchoolForm(string keyValue, string DeptSchool)
{
teachingCompetitionIBLL.DeptOrSchoolForm(keyValue, DeptSchool);
return Success("评价成功!");
}
[HttpPost]
[AjaxOnly]
public ActionResult CheckForm(string keyValue, string strEntity)


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/CheckForm.cshtml Bestand weergeven

@@ -2,9 +2,9 @@
ViewBag.Title = "TeachingCompetition";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">级别<font face="宋体">*</font></div>
<div class="lr-form-item-title">等次<font face="宋体">*</font></div>
<div id="Rating" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">


+ 6
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.cshtml Bestand weergeven

@@ -23,21 +23,21 @@
<div class="lr-form-item-title">发奖单位<font face="宋体">*</font></div>
<input id="AwardingUnit" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="col-xs-4 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">级别<font face="宋体">*</font></div>
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="col-xs-4 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">类别<font face="宋体">*</font></div>
<div id="Classes" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="col-xs-4 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">类型<font face="宋体">*</font></div>
<div id="TType" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">奖励金额</div>
<input id="Money" type="number" class="form-control" />
<div class="col-xs-12 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">附件</div>
<div id="Path" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">备注</div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.js Bestand weergeven

@@ -20,6 +20,7 @@ var bootstrap = function ($, learun) {
$('#Grade').lrDataItemSelect({ code: 'Level' });
$('#Classes').lrDataItemSelect({ code: 'Classes' });
$('#TType').lrDataItemSelect({ code: 'TType' });
$('#Path').lrUploader();
},
initData: function () {
if (!!keyValue) {


+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.cshtml Bestand weergeven

@@ -0,0 +1,47 @@
@{
ViewBag.Title = "TeachingCompetition";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">部门<font face="宋体">*</font></div>
<div id="DepartmentId" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">获奖教师<font face="宋体">*</font></div>
<div id="TeachNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">获奖内容<font face="宋体">*</font></div>
<textarea id="AwardContent" class="form-control" readonly style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">时间<font face="宋体">*</font></div>
<input id="AwardTime" type="text" class="form-control lr-input-wdatepicker" readonly isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">发奖单位<font face="宋体">*</font></div>
<input id="AwardingUnit" type="text" class="form-control" isvalid="yes" readonly checkexpession="NotNull" />
</div>
<div class="col-xs-4 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">级别<font face="宋体">*</font></div>
<div id="Grade" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">类别<font face="宋体">*</font></div>
<div id="Classes" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">类型<font face="宋体">*</font></div>
<div id="TType" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">附件</div>
<div id="Path" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingCompetition">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" readonly></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.js")

+ 63
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.js Bestand weergeven

@@ -0,0 +1,63 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-06-12 11:42
* 描 述:TeachingCompetition
*/
var acceptClick;
var keyValue = request('keyValue');
var DeptSchool = request('DeptSchool');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#TeachNo').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' });
$('#Grade').lrDataItemSelect({ code: 'Level' });
$('#Classes').lrDataItemSelect({ code: 'Classes' });
$('#TType').lrDataItemSelect({ code: 'TType' });
$('#Path').lrUploader({ isUpload: false });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/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())
//};
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/DeptOrSchoolForm', { keyValue: keyValue, DeptSchool, DeptSchool }, function () {
if (!!callBack) {
callBack();
}
});
//$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/SaveForm?keyValue=' + keyValue, postData, function (res) {
// // 保存成功后才回调
// if (!!callBack) {
// callBack();
// }
//});

};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.cshtml Bestand weergeven

@@ -42,6 +42,8 @@
<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_dept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;部门</a>
<a id="lr_school" 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-trash-o"></i>&nbsp;评价</a>
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>*@
</div>


+ 80
- 22
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.js Bestand weergeven

@@ -31,7 +31,7 @@ var bootstrap = function ($, learun) {
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/Form',
width: 600,
height: 450,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -50,7 +50,7 @@ var bootstrap = function ($, learun) {
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/Form?keyValue=' + keyValue,
width: 600,
height: 450,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -71,6 +71,38 @@ var bootstrap = function ($, learun) {
}
});
// 评价
$('#lr_dept').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '评价',
url: top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=1',
width: 600,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 学校
$('#lr_school').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '部门',
url: top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/FormDeptSchool?keyValue=' + keyValue +'&DeptSchool=2',
width: 600,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 评价
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
@@ -79,7 +111,7 @@ var bootstrap = function ($, learun) {
title: '评价',
url: top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/CheckForm?keyValue=' + keyValue,
width: 600,
height: 300,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -174,28 +206,54 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "奖励金额", name: "Money", width: 100, align: "left" },
//{ label: "奖励金额", name: "Money", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
{
label: "评价教师", name: "EvaluateTeacher", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
label: "部门审核人", name: "DeptUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "评价时间", name: "EvaluateTime", width: 100, align: "left"
, formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd ');
}
},
{ label: "评价备注", name: "EvaluateRemark", width: 100, align: "left" },
label: "学校审核人", name: "SchoolUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
//{
// label: "评价教师", name: "EvaluateTeacher", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo',
// key: value,
// keyId: 'f_userid',
// callback: function (_data) {
// callback(_data['f_realname']);
// }
// });
// }
//},
//{
// label: "评价时间", name: "EvaluateTime", width: 100, align: "left"
// , formatter: function (cellvalue) {
// return learun.formatDate(cellvalue, 'yyyy-MM-dd ');
// }
//},
//{ label: "评价备注", name: "EvaluateRemark", width: 100, align: "left" },

],
mainId: 'ID',


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Bestand weergeven

@@ -1441,6 +1441,7 @@
<Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\CheckForm.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\FormDeptSchool.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlanItem\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\FormManage.js" />
@@ -8141,6 +8142,7 @@
<Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\FormDeptSchool.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 18
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionBLL.cs Bestand weergeven

@@ -136,7 +136,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
public void DeptOrSchoolForm(string keyValue, string DeptSchool)
{
try
{
teachingCompetitionService.DeptOrSchoolForm(keyValue, DeptSchool);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 16
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionEntity.cs Bestand weergeven

@@ -93,8 +93,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("EVALUATEREMARK")]
public string EvaluateRemark { get; set; }
[Column("TType")]
[Column("TTYPE")]
public string TType { get; set; }
[Column("PATH")]
public string Path { get; set; }

[Column("DEPTTIME")]
public DateTime? DeptTime { get; set; }
[Column("DEPTUSER")]
public string DeptUser { get; set; }
[Column("SCHOOLTIME")]
public DateTime? SchoolTime { get; set; }
[Column("SCHOOLUSER")]
public string SchoolUser { get; set; }
[Column("STATE")]
public int? State { get; set; }

#endregion

#region 扩展操作
@@ -106,6 +120,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
this.ID = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
this.CreateUser = LoginUserInfo.Get().userId;
this.State = 0;
}
/// <summary>
/// 编辑调用


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionIBLL.cs Bestand weergeven

@@ -43,6 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TeachingCompetitionEntity entity);
void CheckEntity(string keyValue, TeachingCompetitionEntity entity);
void DeptOrSchoolForm(string keyValue, string DeptSchool);
#endregion

}


+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionService.cs Bestand weergeven

@@ -205,6 +205,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void DeptOrSchoolForm(string keyValue, string DeptSchool)
{
try
{
if (DeptSchool == "1")
{
this.BaseRepository("CollegeMIS").ExecuteBySql(" update TeachingCompetition set DeptUser='" + LoginUserInfo.Get().userId + "',DeptTime='" + DateTime.Now + "',State=2 where id= '" + keyValue + "'");
}
else
{
this.BaseRepository("CollegeMIS").ExecuteBySql(" update TeachingCompetition set SchoolUser='" + LoginUserInfo.Get().userId + "',SchoolTime='" + DateTime.Now + "',State=2 where id= '" + keyValue + "'");
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


Laden…
Annuleren
Opslaan