Selaa lähdekoodia

考勤规则增加工作日页面

黑艺新账号
liangkun 1 vuosi sitten
vanhempi
commit
9c0ad63b20
14 muutettua tiedostoa jossa 317 lisäystä ja 4 poistoa
  1. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs
  2. +22
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml
  3. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml
  4. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.js
  5. +4
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.cshtml
  6. +16
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js
  7. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  9. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ADR_RestrictionDayMap.cs
  10. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  11. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs
  12. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionDayEntity.cs
  13. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs
  14. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs

+ 31
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs Näytä tiedosto

@@ -37,6 +37,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
return View();
}

[HttpGet]
public ActionResult FormDay()
{
return View();
}
#endregion

#region 获取数据
@@ -78,6 +84,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
};
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

#region 提交数据
@@ -124,6 +142,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
}
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

}


+ 22
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml Näytä tiedosto

@@ -82,10 +82,31 @@
<div class="col-xs-12 lr-form-item" data-table="ADR_Restriction">
<div class="lr-form-item-title">未签退,记为<font face="宋体">*</font></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="lr-form-item-title">考勤人员类型<font face="宋体">*</font></div>
<div id="AType" isvalid="yes" checkexpession="NotNull"></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>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js")

+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.cshtml Näytä tiedosto

@@ -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")

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/FormDay.js Näytä tiedosto

@@ -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();
}

+ 4
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.cshtml Näytä tiedosto

@@ -12,11 +12,12 @@
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</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>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<div class=" btn-group btn-group-sm">
<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_enable" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;启用</a>
<a id="lr_day" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;工作日配置</a>
</div>
</div>
</div>


+ 16
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js Näytä tiedosto

@@ -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 () {
var keyValue = $('#gridtable').jfGridValue('ID');


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Näytä tiedosto

@@ -1720,6 +1720,7 @@
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\SelectExpressForm.js" />
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.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\FormTerminate.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\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\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Näytä tiedosto

@@ -240,6 +240,7 @@
<Compile Include="LR_WorkFlow\WfTaskHistoryMap.cs" />
<Compile Include="LR_WorkFlow\WfTaskMap.cs" />
<Compile Include="Permission\DepartmentReleasePermissionsMap.cs" />
<Compile Include="PersonnelManagement\ADR_RestrictionDayMap.cs" />
<Compile Include="PersonnelManagement\JbjiabanMap.cs" />
<Compile Include="PersonnelManagement\MeetingManagementMap.cs" />
<Compile Include="PersonnelManagement\MeetingSignInRecordMap.cs" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ADR_RestrictionDayMap.cs Näytä tiedosto

@@ -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
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Näytä tiedosto

@@ -465,6 +465,7 @@
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsEntity.cs" />
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsIBLL.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_ElectronicMaterialMangementEntity.cs" />
<Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementIBLL.cs" />


+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs Näytä tiedosto

@@ -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



+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionDayEntity.cs Näytä tiedosto

@@ -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
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs Näytä tiedosto

@@ -59,5 +59,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
#endregion

ADR_RestrictionEntity GetADR_RestrictionEntityEnabled();
IEnumerable<ADR_RestrictionDayEntity> GetADR_RestrictionDay(string keyValue);
void SaveFormDay(string keyValue, List<ADR_RestrictionDayEntity> entity);
}
}

+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs Näytä tiedosto

@@ -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);
}
}
}
}
}

Ladataan…
Peruuta
Tallenna