@@ -37,6 +37,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
[HttpGet] | |||||
public ActionResult FormDay() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -78,6 +84,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDayData(string keyValue) | |||||
{ | |||||
var ADR_RestrictionData = aDR_RestrictionIBLL.GetADR_RestrictionDay(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
ADR_RestrictionDay = ADR_RestrictionData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -124,6 +142,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
} | } | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveFormDay(string keyValue, string strEntity) | |||||
{ | |||||
List<ADR_RestrictionDayEntity> entity = strEntity.ToObject<List<ADR_RestrictionDayEntity>>(); | |||||
aDR_RestrictionIBLL.SaveFormDay(keyValue, entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -82,10 +82,31 @@ | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Restriction"> | <div class="col-xs-12 lr-form-item" data-table="ADR_Restriction"> | ||||
<div class="lr-form-item-title">未签退,记为<font face="宋体">*</font></div> | <div class="lr-form-item-title">未签退,记为<font face="宋体">*</font></div> | ||||
<div id="NoSignOut" isvalid="yes" checkexpession="NotNull"></div> | <div id="NoSignOut" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Restriction"> | <div class="col-xs-12 lr-form-item" data-table="ADR_Restriction"> | ||||
<div class="lr-form-item-title">考勤人员类型<font face="宋体">*</font></div> | <div class="lr-form-item-title">考勤人员类型<font face="宋体">*</font></div> | ||||
<div id="AType" isvalid="yes" checkexpession="NotNull"></div> | <div id="AType" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Restriction"> | |||||
<div class="lr-form-item-title">地图</div> | |||||
<div></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Restriction"> | |||||
<div class="lr-form-item-title">经度<font face="宋体">*</font></div> | |||||
<input id="GPSLon" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Restriction"> | |||||
<div class="lr-form-item-title">纬度<font face="宋体">*</font></div> | |||||
<input id="GPSLat" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Restriction"> | |||||
<div class="lr-form-item-title">范围<font face="宋体">*</font></div> | |||||
<input id="GPSRange" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Restriction"> | |||||
<div class="lr-form-item-title">地址<font face="宋体">*</font></div> | |||||
<input id="GPSAddr" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js") | @Html.AppendJsFile("/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js") |
@@ -0,0 +1,22 @@ | |||||
@{ | |||||
ViewBag.Title = "工作日配置"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<style> | |||||
.lr-form-item-title { | |||||
width: 120px; | |||||
padding-right: 10px; | |||||
} | |||||
.lr-form-item { | |||||
padding: 5px 0 5px 120px; | |||||
} | |||||
</style> | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_RestrictionDay"> | |||||
<div class="lr-form-item-title">上班日期<font face="宋体">*</font></div> | |||||
<input id="WorkDay" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.js") |
@@ -0,0 +1,51 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-09-03 14:57 | |||||
* 描 述:考勤限制 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/GetFormDayData?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()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/SaveFormDay', postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -12,11 +12,12 @@ | |||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </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> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_enable" class="btn btn-default"><i class="fa fa-plus"></i> 启用</a> | <a id="lr_enable" class="btn btn-default"><i class="fa fa-plus"></i> 启用</a> | ||||
<a id="lr_day" class="btn btn-default"><i class="fa fa-plus"></i> 工作日配置</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -30,6 +30,22 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
//工作日配置 | |||||
$('#lr_day').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formday', | |||||
title: '工作日配置', | |||||
url: top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/FormDay?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 520, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 编辑 | // 编辑 | ||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
@@ -1720,6 +1720,7 @@ | |||||
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\SelectExpressForm.js" /> | <Content Include="Areas\LR_TaskScheduling\Views\TSScheme\SelectExpressForm.js" /> | ||||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.js" /> | <Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.js" /> | ||||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Index.js" /> | <Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Index.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\FormDay.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRemove.js" /> | <Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRemove.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormTerminate.js" /> | <Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormTerminate.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" /> | <Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" /> | ||||
@@ -8269,6 +8270,7 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\RepairReportTeacher\dealFormView.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\RepairReportTeacher\dealFormView.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\RepairReportTeacher\EvaluateFormView.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\RepairReportTeacher\EvaluateFormView.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\RepairReportStudent\EvaluateFormView.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\RepairReportStudent\EvaluateFormView.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\FormDay.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -240,6 +240,7 @@ | |||||
<Compile Include="LR_WorkFlow\WfTaskHistoryMap.cs" /> | <Compile Include="LR_WorkFlow\WfTaskHistoryMap.cs" /> | ||||
<Compile Include="LR_WorkFlow\WfTaskMap.cs" /> | <Compile Include="LR_WorkFlow\WfTaskMap.cs" /> | ||||
<Compile Include="Permission\DepartmentReleasePermissionsMap.cs" /> | <Compile Include="Permission\DepartmentReleasePermissionsMap.cs" /> | ||||
<Compile Include="PersonnelManagement\ADR_RestrictionDayMap.cs" /> | |||||
<Compile Include="PersonnelManagement\JbjiabanMap.cs" /> | <Compile Include="PersonnelManagement\JbjiabanMap.cs" /> | ||||
<Compile Include="PersonnelManagement\MeetingManagementMap.cs" /> | <Compile Include="PersonnelManagement\MeetingManagementMap.cs" /> | ||||
<Compile Include="PersonnelManagement\MeetingSignInRecordMap.cs" /> | <Compile Include="PersonnelManagement\MeetingSignInRecordMap.cs" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 14:57 | |||||
/// 描 述:考勤限制 | |||||
/// </summary> | |||||
public class ADR_RestrictionDayMap : EntityTypeConfiguration<ADR_RestrictionDayEntity> | |||||
{ | |||||
public ADR_RestrictionDayMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("ADR_RESTRICTIONDAY"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -465,6 +465,7 @@ | |||||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsEntity.cs" /> | <Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsEntity.cs" /> | ||||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsIBLL.cs" /> | <Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsIBLL.cs" /> | ||||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsService.cs" /> | <Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsService.cs" /> | ||||
<Compile Include="PersonnelManagement\ADR_Restriction\ADR_RestrictionDayEntity.cs" /> | |||||
<Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementBLL.cs" /> | <Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementEntity.cs" /> | <Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementEntity.cs" /> | ||||
<Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementIBLL.cs" /> | <Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementIBLL.cs" /> | ||||
@@ -203,6 +203,45 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<ADR_RestrictionDayEntity> GetADR_RestrictionDay(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return aDR_RestrictionService.GetADR_RestrictionDay(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void SaveFormDay(string keyValue, List<ADR_RestrictionDayEntity> entity) | |||||
{ | |||||
try | |||||
{ | |||||
aDR_RestrictionService.SaveFormDay(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
@@ -0,0 +1,54 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 14:57 | |||||
/// 描 述:考勤限制 | |||||
/// </summary> | |||||
public class ADR_RestrictionDayEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 编号 | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
[Column("RID")] | |||||
public string RId { get; set; } | |||||
/// <summary> | |||||
/// 上班日期 | |||||
/// </summary> | |||||
[Column("WORKDAY")] | |||||
public DateTime WorkDay { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -59,5 +59,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
#endregion | #endregion | ||||
ADR_RestrictionEntity GetADR_RestrictionEntityEnabled(); | ADR_RestrictionEntity GetADR_RestrictionEntityEnabled(); | ||||
IEnumerable<ADR_RestrictionDayEntity> GetADR_RestrictionDay(string keyValue); | |||||
void SaveFormDay(string keyValue, List<ADR_RestrictionDayEntity> entity); | |||||
} | } | ||||
} | } |
@@ -1322,5 +1322,48 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<ADR_RestrictionDayEntity> GetADR_RestrictionDay(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindList<ADR_RestrictionDayEntity>(m=>m.RId== keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void SaveFormDay(string keyValue, List<ADR_RestrictionDayEntity> entity) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql("delete from ADR_RestrictionDay where RId='"+keyValue+"'"); | |||||
foreach (var item in entity) | |||||
{ | |||||
item.Create(); | |||||
} | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |