@@ -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,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"> | |||
@@ -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> | |||
@@ -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) { | |||
@@ -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") |
@@ -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(); | |||
} |
@@ -42,6 +42,8 @@ | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_dept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 部门</a> | |||
<a id="lr_school" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 学校</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-trash-o"></i> 评价</a> | |||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
@@ -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', | |||
@@ -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" /> | |||
@@ -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 | |||
} | |||
@@ -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> | |||
/// 编辑调用 | |||
@@ -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 | |||
} | |||
@@ -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 | |||
} | |||