From 138371db5be768a77fbdb9aa90b39e08b9abf3d2 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 18 Jul 2023 09:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=AD=A6=E6=AF=94=E8=B5=9B=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20=E6=B7=BB=E5=8A=A0=E9=99=84=E4=BB=B6,=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=AD=97=E6=AE=B5,=E9=83=A8=E9=97=A8=E5=AD=A6?= =?UTF-8?q?=E6=A0=A1=E5=AE=A1=E6=89=B9,=E6=96=B0=E5=A2=9E=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TeachingCompetitionController.cs | 12 +++ .../TeachingCompetition/CheckForm.cshtml | 4 +- .../Views/TeachingCompetition/Form.cshtml | 12 +-- .../Views/TeachingCompetition/Form.js | 1 + .../TeachingCompetition/FormDeptSchool.cshtml | 47 ++++++++ .../TeachingCompetition/FormDeptSchool.js | 63 +++++++++++ .../Views/TeachingCompetition/Index.cshtml | 2 + .../Views/TeachingCompetition/Index.js | 102 ++++++++++++++---- .../Learun.Application.Web.csproj | 2 + .../TeachingCompetitionBLL.cs | 19 +++- .../TeachingCompetitionEntity.cs | 17 ++- .../TeachingCompetitionIBLL.cs | 1 + .../TeachingCompetitionService.cs | 30 ++++++ 13 files changed, 280 insertions(+), 32 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingCompetitionController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingCompetitionController.cs index b682e9ed3..a14925473 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingCompetitionController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingCompetitionController.cs @@ -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) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/CheckForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/CheckForm.cshtml index 0ba4b5e81..7e8537752 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/CheckForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/CheckForm.cshtml @@ -2,9 +2,9 @@ ViewBag.Title = "TeachingCompetition"; Layout = "~/Views/Shared/_Form.cshtml"; } -
+
-
级别*
+
等次*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.cshtml index 989b10c7d..a602ea42e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.cshtml @@ -23,21 +23,21 @@
发奖单位*
-
+
级别*
-
+
类别*
-
+
类型*
-
-
奖励金额
- +
+
附件
+
备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.js index b84198e94..3cb2564ee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Form.js @@ -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) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.cshtml new file mode 100644 index 000000000..d6f190963 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.cshtml @@ -0,0 +1,47 @@ +@{ + ViewBag.Title = "TeachingCompetition"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
部门*
+
+
+
+
获奖教师*
+
+
+
+
获奖内容*
+ +
+
+
时间*
+ +
+
+
发奖单位*
+ +
+
+
级别*
+
+
+
+
类别*
+
+
+
+
类型*
+
+
+
+
附件
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/FormDeptSchool.js new file mode 100644 index 000000000..5d79f6011 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.cshtml index 8f174500d..900560ca3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.cshtml @@ -42,6 +42,8 @@  新增  编辑  删除 +  部门 +  学校  评价 @* 打印*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.js index d15ece5c4..27f4463d1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingCompetition/Index.js @@ -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', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index ea6ee652a..8b63d175c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1441,6 +1441,7 @@ + @@ -8141,6 +8142,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionBLL.cs index e9f648479..5f9f9dd74 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionBLL.cs @@ -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 } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionEntity.cs index 1e1b63518..c16609bb7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionEntity.cs @@ -93,8 +93,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [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; } /// /// 编辑调用 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionIBLL.cs index 0541c1e05..da79ece8e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionIBLL.cs @@ -43,6 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 实体 void SaveEntity(string keyValue, TeachingCompetitionEntity entity); void CheckEntity(string keyValue, TeachingCompetitionEntity entity); + void DeptOrSchoolForm(string keyValue, string DeptSchool); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionService.cs index 884fe96bf..58f5f59a2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingCompetition/TeachingCompetitionService.cs @@ -205,6 +205,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + 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 }