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.
251 lines
7.8 KiB
251 lines
7.8 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
|
|
<title>总分方案维护--新增</title>
|
|
<style type="text/css">
|
|
.row{
|
|
/* margin-bottom : 20px; */
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
var param = $.getURLParam('param');
|
|
var _wid = $.getURLParam('wid');
|
|
var jparam = $.str2json($.urlparam_decode(param));
|
|
/* var _json = $.str2json(jparam.queryParams.json);
|
|
var _role_name = jparam.queryParams.role_name;
|
|
var _rows = $.str2json(jparam.queryParams.rows); */
|
|
|
|
var paramid = jparam.queryParams.paramid;
|
|
var _json = $.getRoot()[paramid];
|
|
$.getRoot()[paramid] = null;
|
|
|
|
var org_attr_scode = _json.org_attr_scode;
|
|
$(function(){
|
|
$("#role_uuid").val(_json.role_uuid);
|
|
$("#role_name").val(_json.role_name);
|
|
$("#func_uuid").val(_json.func_uuid);
|
|
/* $("#subsystem_name").val(_rows.subsystem_name);
|
|
$("#module_name").val(_rows.module_name); */
|
|
$("#fun_name").val(_json.fun_name);
|
|
|
|
$.combobox({
|
|
id: "data_right_level_scode",
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
queryParams : {
|
|
_SRVNAME : 'service.wdk.pub',
|
|
_SRVMETHOD : 'wql_queryCombobox',
|
|
_DATA : $.json2str({
|
|
modulecode : 'S_UC_ROLE_DATALEVEL',
|
|
jparam : {
|
|
condition : ""
|
|
}
|
|
}),
|
|
_RSFIELD : 'result'
|
|
}
|
|
,height:25
|
|
,panelHeight : 220
|
|
,required:false
|
|
,editable:false
|
|
,multiple:false
|
|
,initvalue: _json.rowcount > 1?"" : _json.data_right_level_scode
|
|
,idField:'id'
|
|
,textField:'text'
|
|
,missingMessage:'业务类型不能为空!'
|
|
,tipPosition:'right'
|
|
,onChange:function(newValue,oldVale){
|
|
if( newValue === '07'){
|
|
if(_json.rowcount == 1){
|
|
$("#orguuid_right_str").combotree('enable');
|
|
}else{
|
|
alert("批量设置不允许选择多部门,请切换到单条权限设置");
|
|
setTimeout(function(){
|
|
$("#data_right_level_scode").combobox('clear');
|
|
},200);
|
|
}
|
|
}else{
|
|
$("#orguuid_right_str").combotree('clear');
|
|
$("#orguuid_right_str").combotree('disable');
|
|
}
|
|
}
|
|
});
|
|
var _data = {
|
|
op_acc: $.getSessionUser().account_id
|
|
|
|
};
|
|
var da = {
|
|
org_attr_scode : org_attr_scode,
|
|
level: '-1'
|
|
,include_self: '1'
|
|
,result_fields:'org_uuid,org_name,parent_uuid'
|
|
,order_expr:'display_order'
|
|
}
|
|
var _menthod = "queryBizOrgListByMU";
|
|
debugger;
|
|
if(org_attr_scode != "" && org_attr_scode != "00"){
|
|
_data.org_attr_scode = org_attr_scode;
|
|
}
|
|
|
|
$.extend(_data,da);
|
|
var dataParam = {
|
|
_SRVNAME: 'service.usr.org',
|
|
_SRVMETHOD: _menthod,
|
|
_DATA: $.json2str(_data),
|
|
_RSFIELD: 'resultset',//TODO:待确认
|
|
_RSTYPE: 'combotree',
|
|
_RSPARAM: $.json2str({
|
|
idField: 'org_uuid'
|
|
,textField: 'org_name'
|
|
,parentField: 'parent_uuid'
|
|
})
|
|
};
|
|
$.combotree({
|
|
id:"orguuid_right_str",
|
|
checkbox: true,
|
|
initvalue: _json.rowcount > 1?"" : _json.orguuid_right_str,
|
|
expandall:false,
|
|
//cascadeCheck:false,
|
|
asyn:false,
|
|
multiple:true,
|
|
panelHeight : 150,
|
|
onlyLeafCheck:true,
|
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
|
queryParams:dataParam,
|
|
onChange:function(treeId,node){
|
|
}
|
|
});
|
|
if(_json.rowcount > 1 || _json.data_right_level_scode != "07"){
|
|
$("#orguuid_right_str").combotree('clear');
|
|
$("#orguuid_right_str").combotree('disable');
|
|
}
|
|
});
|
|
|
|
//注册关闭按钮事件
|
|
function opt_save(){
|
|
|
|
//验证
|
|
var data_right_level_scode = $("#data_right_level_scode").combobox('getValue');
|
|
var orguuid_right_str = $("#orguuid_right_str").combotree('getValues').join(",");
|
|
if(data_right_level_scode == "07" && !orguuid_right_str){
|
|
alert("数据权限组织不能为空");
|
|
return false;
|
|
}
|
|
var data = {
|
|
role_uuid : $("#role_uuid").val(),
|
|
func_uuid : $("#func_uuid").val(),
|
|
data_right_level_scode : data_right_level_scode,
|
|
orguuid_right_str : orguuid_right_str,
|
|
orgname_right_str : $("#orguuid_right_str").combotree('getText')
|
|
}
|
|
|
|
$.wait_open();
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:{
|
|
_SRVNAME: 'service.usr.authorization',
|
|
_SRVMETHOD: 'saveRoleFunc',
|
|
_DATA:$.json2str({
|
|
op_account_uuid : _sessionuser.account_id,
|
|
rolefunc_info : data
|
|
})
|
|
},
|
|
success:function(result) {
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if(jres.code=="1"){ //操作成功
|
|
alert(jres.desc);
|
|
opt_close(jres);
|
|
}else{
|
|
alert(jres.desc);
|
|
}
|
|
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
//关闭当前页面
|
|
function opt_close(value) {
|
|
var wid = $.getURLParam("wid");
|
|
if(value){
|
|
$.setWinReturn(_wid,value);
|
|
}
|
|
$.closeWin(wid);
|
|
}
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body class="easyui-layout win" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" >
|
|
<div class="page-toolbar">
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-save'" onclick="opt_save()">保存</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-close'" onclick="opt_close()">关闭</a>
|
|
</div>
|
|
</div>
|
|
<div data-options="region:'center',border:false,collapsed:false" >
|
|
<div class="edit-container-win1">
|
|
<form id="edit_form">
|
|
<input type="hidden" id="role_uuid"/>
|
|
<input type="hidden" id="func_uuid"/>
|
|
<div class="row">
|
|
<div class="formgroup" style="width:618px;">
|
|
<label>角色名称</label>
|
|
<div>
|
|
<input class="easyui-validatebox" type="text" id="role_name" name="role_name" readonly="readonly"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- <div class="row">
|
|
<div class="formgroup" style="width:618px;">
|
|
<label>子系统名称</label>
|
|
<div>
|
|
<input class="easyui-validatebox" type="text" id="subsystem_name" name="subsystem_name" readonly="readonly"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="formgroup" style="width:618px;">
|
|
<label>模块名称</label>
|
|
<div>
|
|
<input class="easyui-validatebox" type="text" id="module_name" name="module_name" readonly="readonly"/>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
<div class="row">
|
|
<div class="formgroup" style="width:618px;">
|
|
<label>功能名称</label>
|
|
<div>
|
|
<textarea class="easyui-validatebox" style="height:120px;" id="fun_name" name="fun_name" readonly="readonly"/></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" style="margin-top: 5px;">
|
|
<div class="formgroup" style="width:618px;">
|
|
<label>数据权限</label>
|
|
<div>
|
|
<input class="easyui-validatebox" type="text" id="data_right_level_scode" name="data_right_level_scode"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="formgroup" style="width:618px;">
|
|
<label>数据权限组织</label>
|
|
<div>
|
|
<input class="easyui-validatebox" type="text" id="orguuid_right_str" name="orguuid_right_str"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html>.
|