浏览代码

校区管理上级不允许选自己

新疆警官学校中职
ndbs 5 个月前
父节点
当前提交
11387ac3c4
共有 3 个文件被更改,包括 22 次插入8 次删除
  1. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Organization/Company/CompanyService.cs
  2. +15
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/CompanyController.cs
  3. +5
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Company/Form.cshtml

+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Organization/Company/CompanyService.cs 查看文件

@@ -53,7 +53,8 @@ namespace Learun.Application.Organization
t.F_Photo,
t.F_BriefIntroduction,
t.F_EnrollmentInformation,
t.F_ModifyUserName
t.F_ModifyUserName,
T.F_USCreditCode
";
}
#endregion


+ 15
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/CompanyController.cs 查看文件

@@ -131,6 +131,11 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers

list = list.Where(m => m.F_CompanyId != keyValue).ToList();
}
if (keyValue == entity.F_ParentId)
{
return Fail("操作失败,当前项不允许");
}

if (list.Any(a => a.F_FullName == entity.F_FullName))
{
return Fail("学校名称重复");
@@ -157,8 +162,16 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
companyIBLL.VirtualDelete(keyValue);
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, "");
var list = companyIBLL.GetList().Where(x => x.F_ParentId == keyValue && x.F_EnabledMark == 1 && x.F_DeleteMark == 0);
if (list.Count() > 0)
{
return Fail("删除失败!拥有下辖项不可直接删除");
}
else
{
companyIBLL.VirtualDelete(keyValue);
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, "");
}
}
#endregion
}

+ 5
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Company/Form.cshtml 查看文件

@@ -20,12 +20,12 @@
<div id="F_ParentId"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">统一社会信用代码<font face="宋体">*</font></div>
<div class="lr-form-item-title">统一信用代码<font face="宋体">*</font></div>
<input id="F_USCreditCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">成立时间</div>
<input id="F_FoundedTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker()" />
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">成立时间<font face="宋体">*</font></div>
<input id="F_FoundedTime" type="text" isvalid="yes" checkexpession="NotNull" class="form-control lr-input-wdatepicker" onfocus="WdatePicker()" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">负责人</div>
@@ -40,7 +40,7 @@
<div class="lr-form-item-title">电子邮箱</div>
<input id="F_Email" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">照片</div>
<div id="F_Photo"></div>
</div>


正在加载...
取消
保存