From 452edfe514ac4f5980f6127c76bca676a26ec0e7 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 27 Apr 2022 15:31:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=80=BC=E7=8F=AD=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/DutySchedule/Form.cshtml | 16 +++++--- .../Views/DutySchedule/Index.js | 37 ++++++++++--------- .../DutySchedule/DutyScheduleEntity.cs | 22 ++++++++--- .../DutySchedule/DutyScheduleService.cs | 3 +- 4 files changed, 48 insertions(+), 30 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Form.cshtml index df583dcc4..15e0b4ce8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Form.cshtml @@ -4,16 +4,20 @@ }
-
时间
- +
开始时间
+
-
+
+
结束时间
+ +
+
值班人
-
+
-
+
备注
- +
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/DutySchedule/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js index 07d831cce..97590ef35 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js @@ -19,7 +19,7 @@ var bootstrap = function ($, learun) { }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ + learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/PersonnelManagement/DutySchedule/Form', @@ -50,9 +50,9 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/DutySchedule/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/DutySchedule/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -65,26 +65,29 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/DutySchedule/GetPageList', headData: [ - { label: "时间", name: "Date", width: 100, align: "left"}, - { label: "值班人", name: "Person", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "备注", name: "Remark", width: 100, align: "left"}, + { label: "值班开始时间", name: "StartTime", width: 200, align: "left" }, + { label: "值班结束时间", name: "EndTime", width: 200, align: "left" }, + { + label: "值班人", name: "Person", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "备注", name: "Remark", width: 200, align: "left" }, ], - mainId:'ID', - isPage: true + mainId: 'ID', + isPage: true, }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleEntity.cs index 2e6a87169..4e6b36fa1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 日 期:2019-11-19 15:30 /// 描 述:值班安排 /// - public class DutyScheduleEntity + public class DutyScheduleEntity { #region 实体成员 /// @@ -20,11 +20,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("ID")] public string ID { get; set; } /// - /// 日期 - /// - [Column("DATE")] - public DateTime? Date { get; set; } - /// /// 值班人员 /// [Column("PERSON")] @@ -34,6 +29,21 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("REMARK")] public string Remark { get; set; } + /// + /// 日期 + /// + [Column("STARTTIME")] + public DateTime? StartTime { get; set; } + /// + /// 日期 + /// + [Column("ENDTIME")] + public DateTime? EndTime { get; set; } + /// + /// 日期 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs index 65a28da1f..c660b036e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs @@ -32,7 +32,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement strSql.Append("SELECT "); strSql.Append(@" t.ID, - t.Date, + t.StartTime, + t.EndTime, t.Person, t.Remark,u.F_Account,F_RealName ");