From 3be211b6e9327398be8db862f2b5aa55374ea6b2 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Wed, 30 Sep 2020 16:17:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E9=9A=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/EmpInfoEnternalController.cs | 13 ++++++++++++- .../Views/EmpInfoEnternal/FormAdd.cshtml | 19 ++++++++++++------- .../Views/Sys_ReceiveDocument/Index.js | 3 ++- .../Views/NWFProcess/htPrint.css | 4 ++-- .../XmlConfig/database.config | 4 ++-- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoEnternalController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoEnternalController.cs index 2fef3e739..43c1b5f2b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoEnternalController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoEnternalController.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; +using Learun.Application.Organization; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -13,6 +14,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { // GET: EducationalAdministration/EmpInfoEnternal DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); + UserIBLL userIBLL = new UserBLL(); EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); public ActionResult FormAdd() @@ -96,9 +98,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { EmpInfoEntity entity = strEntity.ToObject(); + if (!string.IsNullOrEmpty(entity.EmpNo)) + { + var empentity = empInfoIBLL.GetEmpInfoEntityByEmpNo(entity.EmpNo); + var userEntity = userIBLL.GetEntityByAccount(entity.EmpNo); + if (null != empentity || null != userEntity) + { + return Success(new { data = entity, info = "有重复的职工编号" }); + } + } entity.EmpId = Guid.NewGuid().ToString(); empInfoIBLL.SaveEntity(keyValue, entity); - return Success("保存成功!"); + return Success(new { data = entity, info = "保存成功" }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml index 6b9c7706e..e4d38c31f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfoEnternal/FormAdd.cshtml @@ -43,6 +43,10 @@ * 姓名 + @*
+ 职工编号 + +
*@
* 校区 @@ -94,8 +98,8 @@
* 出生日期 @@ -192,8 +196,9 @@ async: true, cache: false, success: function (data) { - layer.msg("注册成功"); - alert("注册成功"); + console.log(data); + //layer.msg("注册成功"); + //alert("注册成功"); }, error: function (XMLHttpRequest, textStatus, errorThrown) { }, @@ -202,9 +207,9 @@ complete: function () { } }); - //return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 - - location.href = "/home/index"; + return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 + + //location.href = "/home/index"; }); var laydate = layui.laydate; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js index 4bfa68923..7a11ac2cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js @@ -170,7 +170,8 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('RID'); if (learun.checkrow(keyValue)) { var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - if (SendFlag !== 2) { + console.log(SendFlag); + if (SendFlag !== '2') { learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); return; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.css index 658d88d4b..89691e3e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.css @@ -113,8 +113,8 @@ table { #stampImg { position: absolute; width: 140px; - top: 60px; - left: 170px; + top: 30px; + left: 120px; } .entrTime span { display: inline-block; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index 4c61d0f2b..489b3b61f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -19,7 +19,7 @@ - + @@ -31,5 +31,5 @@ - + \ No newline at end of file