@@ -6,6 +6,7 @@ using System.Collections.Generic; | |||||
using System.Linq; | using System.Linq; | ||||
using System.Web; | using System.Web; | ||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using Learun.Application.Organization; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | ||||
{ | { | ||||
@@ -13,6 +14,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
// GET: EducationalAdministration/EmpInfoEnternal | // GET: EducationalAdministration/EmpInfoEnternal | ||||
DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); | DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); | ||||
UserIBLL userIBLL = new UserBLL(); | |||||
EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); | EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); | ||||
AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | ||||
public ActionResult FormAdd() | public ActionResult FormAdd() | ||||
@@ -96,9 +98,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
EmpInfoEntity entity = strEntity.ToObject<EmpInfoEntity>(); | EmpInfoEntity entity = strEntity.ToObject<EmpInfoEntity>(); | ||||
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(); | entity.EmpId = Guid.NewGuid().ToString(); | ||||
empInfoIBLL.SaveEntity(keyValue, entity); | empInfoIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | |||||
return Success(new { data = entity, info = "保存成功" }); | |||||
} | } | ||||
@@ -43,6 +43,10 @@ | |||||
<span class="chickInputLable"><span>*</span> 姓名</span> | <span class="chickInputLable"><span>*</span> 姓名</span> | ||||
<input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入姓名" class="layui-input"> | <input id="EmpName" type="text" name="EmpName" lay-verify="required" placeholder="请输入姓名" class="layui-input"> | ||||
</div> | </div> | ||||
@*<div class="chickInput"> | |||||
<span class="chickInputLable"> 职工编号</span> | |||||
<input id="EmpNo" type="text" name="EmpNo" placeholder="请输入姓名" class="layui-input"> | |||||
</div>*@ | |||||
<div class="chickInput"> | <div class="chickInput"> | ||||
<span class="chickInputLable"><span>*</span> 校区</span> | <span class="chickInputLable"><span>*</span> 校区</span> | ||||
@@ -94,8 +98,8 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="chickInput" hidden> | <div class="chickInput" hidden> | ||||
<span class="chickInputLable" hidden><span>*</span> 职工编号</span> | |||||
<input type="text" id="Photo" name="Photo" placeholder="请输入职工编号" class="layui-input"> | |||||
<span class="chickInputLable" hidden><span>*</span> 照片</span> | |||||
<input type="text" id="Photo" name="Photo" class="layui-input"> | |||||
</div> | </div> | ||||
<div class="chickInput"> | <div class="chickInput"> | ||||
<span class="chickInputLable"><span>*</span> 出生日期</span> | <span class="chickInputLable"><span>*</span> 出生日期</span> | ||||
@@ -192,8 +196,9 @@ | |||||
async: true, | async: true, | ||||
cache: false, | cache: false, | ||||
success: function (data) { | success: function (data) { | ||||
layer.msg("注册成功"); | |||||
alert("注册成功"); | |||||
console.log(data); | |||||
//layer.msg("注册成功"); | |||||
//alert("注册成功"); | |||||
}, | }, | ||||
error: function (XMLHttpRequest, textStatus, errorThrown) { | error: function (XMLHttpRequest, textStatus, errorThrown) { | ||||
}, | }, | ||||
@@ -202,9 +207,9 @@ | |||||
complete: function () { | complete: function () { | ||||
} | } | ||||
}); | }); | ||||
//return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 | |||||
location.href = "/home/index"; | |||||
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 | |||||
//location.href = "/home/index"; | |||||
}); | }); | ||||
var laydate = layui.laydate; | var laydate = layui.laydate; | ||||
@@ -170,7 +170,8 @@ var bootstrap = function ($, learun) { | |||||
var keyValue = $('#gridtable').jfGridValue('RID'); | var keyValue = $('#gridtable').jfGridValue('RID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | ||||
if (SendFlag !== 2) { | |||||
console.log(SendFlag); | |||||
if (SendFlag !== '2') { | |||||
learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); | learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); | ||||
return; | return; | ||||
} | } | ||||
@@ -113,8 +113,8 @@ table { | |||||
#stampImg { | #stampImg { | ||||
position: absolute; | position: absolute; | ||||
width: 140px; | width: 140px; | ||||
top: 60px; | |||||
left: 170px; | |||||
top: 30px; | |||||
left: 120px; | |||||
} | } | ||||
.entrTime span { | .entrTime span { | ||||
display: inline-block; | display: inline-block; | ||||
@@ -19,7 +19,7 @@ | |||||
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_20200403test;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />--> | <add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />--> | ||||
@@ -31,5 +31,5 @@ | |||||
<!--<add name="BaseDb" connectionString="Server=192.168.2.126;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" /> | <!--<add name="BaseDb" connectionString="Server=192.168.2.126;Initial Catalog=adms7ultimate2_西昌;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="CollegeMIS" connectionString="Server=192.168.2.126;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" /> | <add name="CollegeMIS" connectionString="Server=192.168.2.126;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" /> | ||||
<add name="hangfireString" connectionString="Server=192.168.2.126;Initial Catalog=Hangfire;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />--> | <add name="hangfireString" connectionString="Server=192.168.2.126;Initial Catalog=Hangfire;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />--> | ||||
<!--测试公共提交--> | |||||
<!--测试公共提交--> | |||||
</connectionStrings> | </connectionStrings> |