You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
311 lines
8.6 KiB
311 lines
8.6 KiB
1 month ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
<%@ page import="org.wdk.WDKConstant"%>
|
||
|
<%@ page import="org.wdk.WDKCore"%>
|
||
|
<%@ page import="org.wdk.WDK"%>
|
||
|
<%@ page import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
|
||
|
<%
|
||
|
String path = request.getContextPath();
|
||
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
||
|
SessionUser su = (SessionUser)WDK.getSessionUser(request, response);
|
||
|
WDK.writeSessionUser(out, su);
|
||
|
%>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
|
||
|
<title>账户关联角色</title>
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
|
||
|
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
var _user_type_full = '0';
|
||
|
var _user_type_not = '0';
|
||
|
var _user_type_yes = '0';
|
||
|
var _account_id = $.getSessionUser().account_id;
|
||
|
var _manage_unit_uuid = $.getSessionUser().manageunituuid;
|
||
|
//grid相关
|
||
|
var _gridcode = "platform.uum.uum_account2role_grid";
|
||
|
var _gridid = $.getUUID();
|
||
|
//初始化
|
||
|
$(function(){
|
||
|
|
||
|
//初始化用户人员关联
|
||
|
$.radio({
|
||
|
id:'user_type_full'
|
||
|
,initvalue:'user_type_full'
|
||
|
,url:''
|
||
|
,queryParams:{}
|
||
|
,disabled:false
|
||
|
,data:[{
|
||
|
id:'user_type_full',
|
||
|
text:'全部'
|
||
|
}
|
||
|
,{
|
||
|
id:'user_type_not',
|
||
|
text:'未关联人员'
|
||
|
}
|
||
|
,{
|
||
|
id:'user_type_yes',
|
||
|
text:'已关联人员'
|
||
|
}]
|
||
|
/* ,onChange:function(){
|
||
|
alert(12);
|
||
|
} */
|
||
|
,onLoadSuccess:function(){
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
//组织参数
|
||
|
var dataJson = {
|
||
|
op_acc: $.getSessionUser().account_id
|
||
|
,parent_uuid: '-1'
|
||
|
,org_id: $.getSessionUser().companyuuid
|
||
|
,level:1
|
||
|
,include_self : 1
|
||
|
,result_fields:'org_uuid,org_code,org_name,parent_uuid'
|
||
|
,order_expr:'display_order'
|
||
|
};
|
||
|
//方法名
|
||
|
var queryMethod="queryAccountOrgListByParentID";
|
||
|
//组织请求数据集
|
||
|
var dataParam = {
|
||
|
_SRVNAME: 'service.usr.org',
|
||
|
_SRVMETHOD: queryMethod,
|
||
|
_DATA: $.json2str(dataJson),
|
||
|
_RSFIELD: 'resultset',//TODO:待确认
|
||
|
_RSTYPE: 'tree',
|
||
|
_RSPARAM: $.json2str({
|
||
|
idField: 'org_uuid'
|
||
|
,textField: 'org_name'
|
||
|
,parentField: 'parent_uuid'
|
||
|
,asyn:'1' //是否是异步 0:同步;1:异步
|
||
|
,asyn_urlField:'parent_uuid'
|
||
|
,asyn_dataField:'parent_uuid' //如果是异步,则从url中取出的参数替换_DATA参数的名
|
||
|
})
|
||
|
};
|
||
|
$.inputpop({
|
||
|
id:'org_uuid',
|
||
|
type:'tree',
|
||
|
title:'组织机构',
|
||
|
width:320,
|
||
|
height:480,
|
||
|
editable:false,
|
||
|
required:false,
|
||
|
checkbox:false,
|
||
|
asyn:true,
|
||
|
parentField:'parent_uuid',
|
||
|
initid: $.getSessionUser().companyuuid,
|
||
|
inittext:$.getSessionUser().companyname,
|
||
|
initvalue:$.getSessionUser().companyuuid,
|
||
|
dataurl:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
||
|
queryParams:dataParam,
|
||
|
onBeforeOpen:'',
|
||
|
callback:function(jparam){
|
||
|
$.inputpop_setValue ({
|
||
|
id:'org_uuid',
|
||
|
value_id:jparam.value_id,
|
||
|
value_text:jparam.value_text,
|
||
|
value_value:jparam.value_text
|
||
|
});
|
||
|
|
||
|
//获取父id 只返回第一个结果集数据
|
||
|
//var pid = jparam.value_rows[0].pid;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
//初始化grid
|
||
|
var dataParam = getGridQueryParam();
|
||
|
$.grid({
|
||
|
id : _gridid,
|
||
|
containerid : 'layout_grid',
|
||
|
gridcode : _gridcode,
|
||
|
checkbox : false,
|
||
|
checkOnSelect : false,
|
||
|
selectOnCheck : false,
|
||
|
idField:"account_uuid",
|
||
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
||
|
queryParams:dataParam,
|
||
|
fitColumns:true, //是否自动填充满
|
||
|
nowrap:false, //自动换行
|
||
|
pagination:true,
|
||
|
formatter: {
|
||
|
// command:'formatter_command',
|
||
|
is_lock: 'formatter_is_lock',
|
||
|
name: 'formatter_name'
|
||
|
}
|
||
|
,onLoaded:function(){
|
||
|
$.wait_close();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
//注册按钮事件
|
||
|
$("#btn_add").on("click", function(){
|
||
|
$.openWin({
|
||
|
id:$.getUUID()
|
||
|
,title:'账户管理-新增账户'
|
||
|
,height:300
|
||
|
,width:600
|
||
|
,url:'platform/uum/uum_account_add.jsp'
|
||
|
,queryParams:{
|
||
|
actionflag:'add'
|
||
|
}
|
||
|
,onClose:function(){
|
||
|
btn_query();
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$("input[name='user_type_full']").change(function() {
|
||
|
btn_query();
|
||
|
});
|
||
|
});
|
||
|
|
||
|
function removeBlank(e) {
|
||
|
if(e.keyCode == 32){
|
||
|
e.preventDefault();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function formatter_is_lock(value,row,index) {
|
||
|
return row.is_lock == "0" ? "否" : "是";
|
||
|
}
|
||
|
|
||
|
function formatter_name(value,row,index) {
|
||
|
return (row.person_name && row.person_name != "")?row.person_name:row.nickname;
|
||
|
}
|
||
|
|
||
|
|
||
|
//获取grid查询参数
|
||
|
function getGridQueryParam(){
|
||
|
/*var user_type_fullObj = $("input[name='user_type_full']:checked");
|
||
|
var user_type_full= "user_type_full";
|
||
|
if(user_type_fullObj){
|
||
|
user_type_full= user_type_fullObj.val();
|
||
|
}
|
||
|
if(user_type_full=='user_type_full'){
|
||
|
_user_type_full = '1';
|
||
|
_user_type_not = '0';
|
||
|
_user_type_yes = '0';
|
||
|
}else if(user_type_full=='user_type_not'){
|
||
|
_user_type_full = '0';
|
||
|
_user_type_not = '1';
|
||
|
_user_type_yes = '0';
|
||
|
}else if(user_type_full=='user_type_yes'){*/
|
||
|
_user_type_full = '0';
|
||
|
_user_type_not = '0';
|
||
|
_user_type_yes = '1';
|
||
|
/*}*/
|
||
|
|
||
|
var account_name = $('#account_name').val();
|
||
|
var dataParam = {
|
||
|
_SRVNAME:'service.usr.account'
|
||
|
,_SRVMETHOD:'pagequeryAccList'
|
||
|
,_DATA:$.json2str({
|
||
|
op_account_uuid:_account_id
|
||
|
,account_info: {
|
||
|
account_name:account_name
|
||
|
,depart_uuid:$.inputpop_getValue({id:'org_uuid'})
|
||
|
}
|
||
|
,resultfields:''
|
||
|
,orderfields:''
|
||
|
})
|
||
|
,_RSTYPE:'grid'
|
||
|
,_RSFIELD:'account_info'
|
||
|
,_RSPARAM:$.json2str({pagequery:'1'})
|
||
|
};
|
||
|
return dataParam;
|
||
|
}
|
||
|
|
||
|
function btn_query(){
|
||
|
//组织参数
|
||
|
var dataParam = getGridQueryParam();
|
||
|
$.grid_reload({
|
||
|
id:_gridid,
|
||
|
queryParams:dataParam
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
//关联角色 btn_acc2role Button
|
||
|
function btn_acc2role(){
|
||
|
var row = $.grid_getSelected({
|
||
|
id : _gridid
|
||
|
});
|
||
|
if (!row.account_uuid) {
|
||
|
alert('请选择账户的记录!');
|
||
|
return;
|
||
|
}
|
||
|
$.openWin({
|
||
|
id:$.getUUID(),
|
||
|
title:'用户关联角色',
|
||
|
height:500,
|
||
|
width:600,
|
||
|
url:'platform/uum/uum_account_role.jsp',
|
||
|
queryParams:{
|
||
|
account_uuid:row.account_uuid
|
||
|
,depart_uuid:row.depart_uuid
|
||
|
},
|
||
|
onClose:function(){
|
||
|
btn_query();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div class="easyui-layout" data-options="fit:true">
|
||
|
|
||
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="overflow:hidden">
|
||
|
<div class="page-toolbar" style="padding-bottom: 5px;">
|
||
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="btn_acc2role();" >关联角色</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div data-options="region:'center',border:false,collapsed:false" >
|
||
|
<div class="easyui-layout" data-options="fit:true">
|
||
|
<div data-options="region:'north',border:false,collapsed:false" class="row-1" style="padding:0 10px;overflow:hidden;" >
|
||
|
<form id="search_form" >
|
||
|
<div class="h_layout">
|
||
|
<div>
|
||
|
<div class="inputgroup" >
|
||
|
<label>组织结构</label>
|
||
|
<div style="line-height: 22px;">
|
||
|
<input id="org_uuid" name="org_uuid"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="inputgroup">
|
||
|
<label>关键字</label>
|
||
|
<div>
|
||
|
<input class="easyui-validatebox" id="account_name" name="account_name"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="width:125px;">
|
||
|
<a class="eapbutton" style="float:right;" onclick="btn_query()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|