@@ -271,11 +271,11 @@ namespace Learun.Application.Organization | |||||
/// <param name="keyword">查询关键词</param> | /// <param name="keyword">查询关键词</param> | ||||
/// <param name="tp">0 教师 1学生</param> | /// <param name="tp">0 教师 1学生</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public List<UserEntity> GetPageList(string companyId, string departmentId, Pagination pagination, string keyword, string tp) | |||||
public List<UserEntity> GetPageList(string companyId, string departmentId, Pagination pagination, string keyword, string tp, string F_EnabledMark) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return (List<UserEntity>)userService.GetPageList(companyId, departmentId, pagination, keyword, tp); | |||||
return (List<UserEntity>)userService.GetPageList(companyId, departmentId, pagination, keyword, tp, F_EnabledMark); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -58,7 +58,7 @@ namespace Learun.Application.Organization | |||||
/// <param name="keyword">查询关键词</param> | /// <param name="keyword">查询关键词</param> | ||||
/// <param name="tp">0 教师 1学生</param> | /// <param name="tp">0 教师 1学生</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
List<UserEntity> GetPageList(string companyId, string departmentId, Pagination pagination, string keyword, string tp); | |||||
List<UserEntity> GetPageList(string companyId, string departmentId, Pagination pagination, string keyword, string tp, string F_EnabledMark); | |||||
/// <summary> | /// <summary> | ||||
/// 用户列表(导出Excel) | /// 用户列表(导出Excel) | ||||
/// </summary> | /// </summary> | ||||
@@ -178,7 +178,7 @@ namespace Learun.Application.Organization | |||||
/// <param name="keyword"></param> | /// <param name="keyword"></param> | ||||
/// <param name="tp">类型 0学生 1 教师</param> | /// <param name="tp">类型 0学生 1 教师</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<UserEntity> GetPageList(string companyId, string departmentId, Pagination pagination, string keyword, string tp) | |||||
public IEnumerable<UserEntity> GetPageList(string companyId, string departmentId, Pagination pagination, string keyword, string tp, string F_EnabledMark) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
@@ -208,8 +208,12 @@ namespace Learun.Application.Organization | |||||
keyword = "%" + keyword + "%"; | keyword = "%" + keyword + "%"; | ||||
strSql.Append(" AND( t.F_Account like @keyword or t.F_RealName like @keyword or t.F_Mobile like @keyword ) "); | strSql.Append(" AND( t.F_Account like @keyword or t.F_RealName like @keyword or t.F_Mobile like @keyword ) "); | ||||
} | } | ||||
return this.BaseRepository().FindList<UserEntity>(strSql.ToString(), new { companyId, departmentId, keyword }, pagination); | |||||
if (!string.IsNullOrEmpty(F_EnabledMark)) | |||||
{ | |||||
strSql.Append(" AND t.F_EnabledMark=@F_EnabledMark "); | |||||
} | |||||
return this.BaseRepository().FindList<UserEntity>(strSql.ToString(), new { companyId, departmentId, keyword, F_EnabledMark }, pagination); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -90,13 +90,14 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
/// <param name="companyId">公司主键</param> | /// <param name="companyId">公司主键</param> | ||||
/// <param name="departmentId">部门主键</param> | /// <param name="departmentId">部门主键</param> | ||||
/// <param name="tp">0 教师 1学生</param> | /// <param name="tp">0 教师 1学生</param> | ||||
/// <param name="F_EnabledMark">状态:0禁用 1正常</param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet] | [HttpGet] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetPageList(string pagination, string keyword, string companyId, string departmentId, string tp) | |||||
public ActionResult GetPageList(string pagination, string keyword, string companyId, string departmentId, string tp, string F_EnabledMark) | |||||
{ | { | ||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | Pagination paginationobj = pagination.ToObject<Pagination>(); | ||||
var data = userIBLL.GetPageList(companyId, departmentId, paginationobj, keyword, tp); | |||||
var data = userIBLL.GetPageList(companyId, departmentId, paginationobj, keyword, tp, F_EnabledMark); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
rows = data, | rows = data, | ||||
@@ -23,6 +23,9 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | <input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-item" style="width: 160px;"> | |||||
<div id="F_EnabledMark" style="border-radius: 4px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> <span class="lrlt">查询</span></a> | <a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> <span class="lrlt">查询</span></a> | ||||
</div> | </div> | ||||
@@ -22,9 +22,13 @@ var bootstrap = function ($, learun) { | |||||
// 查询 | // 查询 | ||||
$('#btn_Search').on('click', function () { | $('#btn_Search').on('click', function () { | ||||
var keyword = $('#txt_Keyword').val(); | var keyword = $('#txt_Keyword').val(); | ||||
page.search({ keyword: keyword }); | |||||
var F_EnabledMark = $('#F_EnabledMark').lrselectGet(); | |||||
page.search({ keyword: keyword, F_EnabledMark: F_EnabledMark }); | |||||
}); | |||||
$('#F_EnabledMark').lrselect({ | |||||
placeholder: '请选择状态', | |||||
data: [{ id: '1', text: "正常" }, { id: '0', text: "禁用" }] | |||||
}); | }); | ||||
// 部门选择 | // 部门选择 | ||||
$('#department_select').lrselect({ | $('#department_select').lrselect({ | ||||
type: 'tree', | type: 'tree', | ||||
@@ -23,6 +23,9 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | <input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-item" style="width: 160px;"> | |||||
<div id="F_EnabledMark" style="border-radius: 4px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> <span class="lrlt">查询</span></a> | <a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> <span class="lrlt">查询</span></a> | ||||
</div> | </div> | ||||
@@ -15,7 +15,12 @@ var bootstrap = function ($, learun) { | |||||
// 查询 | // 查询 | ||||
$('#btn_Search').on('click', function () { | $('#btn_Search').on('click', function () { | ||||
var keyword = $('#txt_Keyword').val(); | var keyword = $('#txt_Keyword').val(); | ||||
page.search({ keyword: keyword }); | |||||
var F_EnabledMark = $('#F_EnabledMark').lrselectGet(); | |||||
page.search({ keyword: keyword, F_EnabledMark: F_EnabledMark }); | |||||
}); | |||||
$('#F_EnabledMark').lrselect({ | |||||
placeholder: '请选择状态', | |||||
data: [{ id: '1', text: "正常" }, { id: '0', text: "禁用" }] | |||||
}); | }); | ||||
// 系选择 | // 系选择 | ||||
$('#department_select').lrselect({ | $('#department_select').lrselect({ | ||||
@@ -189,7 +189,7 @@ namespace Learun.Application.Web.Areas.LR_WebChatModule.Controllers | |||||
{ | { | ||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | Pagination paginationobj = pagination.ToObject<Pagination>(); | ||||
//获取内部系统人员列表 | //获取内部系统人员列表 | ||||
var data = userIBLL.GetPageList(companyId, departmentId, paginationobj, keyword,""); | |||||
var data = userIBLL.GetPageList(companyId, departmentId, paginationobj, keyword, "", ""); | |||||
//获取微信员工列表 | //获取微信员工列表 | ||||
var wxData = GetUserList("1", 1); | var wxData = GetUserList("1", 1); | ||||
if (wxData.errcode != 0) | if (wxData.errcode != 0) | ||||