Merge branch 'tolag3'
This commit is contained in:
commit
1adc2c4bb7
@ -608,14 +608,28 @@ public class AdjReqMgrOffLineController {
|
||||
PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF-8"));
|
||||
|
||||
|
||||
List<MenuManageJTreeVO> resultList = null ;
|
||||
List<MenuManageJTreeVO> resultList = new ArrayList<MenuManageJTreeVO>();
|
||||
|
||||
MenuManageJTreeVO menuManageTopVO = new MenuManageJTreeVO();
|
||||
menuManageTopVO.setUpperMenuId("#");
|
||||
menuManageTopVO.setMenuNo("0");
|
||||
menuManageTopVO.setMenuNm("관련인");
|
||||
MenuManageJTreeVO menuManageTopVO2 = new MenuManageJTreeVO();
|
||||
menuManageTopVO2.setUpperMenuId("#");
|
||||
menuManageTopVO2.setMenuNo("0");
|
||||
menuManageTopVO2.setMenuNm("관련인");
|
||||
resultList.add(0, menuManageTopVO2);
|
||||
|
||||
for(int i = 1 ; i < 6 ; i ++ ){
|
||||
MenuManageJTreeVO menuManageTopVO = new MenuManageJTreeVO();
|
||||
|
||||
menuManageTopVO.setUpperMenuId("0");
|
||||
menuManageTopVO.setMenuNo(String.valueOf(i));
|
||||
menuManageTopVO.setMenuNm("홍길동" + String.valueOf(i));
|
||||
menuManageTopVO.setMenuOrdr(i);
|
||||
menuManageTopVO.setProgrmFileNm("dir");
|
||||
menuManageTopVO.setUseYn("Y");
|
||||
menuManageTopVO.setRelateImagePath("/");
|
||||
menuManageTopVO.setRelateImageNm("/");
|
||||
resultList.add(i, menuManageTopVO);
|
||||
}
|
||||
|
||||
resultList.add(0, menuManageTopVO);
|
||||
System.out.println("resultList :: "+resultList);
|
||||
mapper.writeValue(out, resultList);
|
||||
out.flush();
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
var newNodeId = "";
|
||||
function jstreeInit() {
|
||||
$('#kopost_organization').jstree({
|
||||
$('#kccadr_sbmt').jstree({
|
||||
"core" : {
|
||||
"animation" : 0,
|
||||
"multiple" : false,
|
||||
@ -39,6 +39,8 @@ function jstreeInit() {
|
||||
"url" : "<c:url value='/kccadr/adjReqMgOff/adjReqMgrOffAppReqPopAjax.do'/>",
|
||||
"dataType" : "json",
|
||||
"data" : function (node) {
|
||||
console.log("node.id :: " + node.id);
|
||||
console.log("authorCode :: " + $('#authorCode').val());
|
||||
return {'id' : node.id, 'authorCode' : $('#authorCode').val() };
|
||||
}
|
||||
}
|
||||
@ -60,14 +62,14 @@ function jstreeInit() {
|
||||
"icon" : "jstree-file",
|
||||
"valid_children" : []
|
||||
}
|
||||
},
|
||||
}/* ,
|
||||
"plugins" : [
|
||||
"contextmenu", "dnd", "search",
|
||||
"types"
|
||||
]
|
||||
] */
|
||||
})
|
||||
.bind('loaded.jstree', function(e, data) {
|
||||
$('#kopost_organization').jstree('open_node' , $('#0') )
|
||||
$('#kccadr_sbmt').jstree('open_node' , $('#0') )
|
||||
})
|
||||
.on('select_node.jstree', function (e, data) {
|
||||
if(!$('.organ_rightbox').is(":visible")){
|
||||
@ -367,7 +369,7 @@ function fn_delete_menuInfo(menuNo , progrmFileNm ) {
|
||||
return ;
|
||||
}
|
||||
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
var instance = $('#kccadr_sbmt').jstree(true);
|
||||
if(instance.get_node(menuNo).children.length != 0){
|
||||
alert("하위 메뉴를 먼저 삭제 후 메뉴를 삭제해 주세요.");
|
||||
return;
|
||||
@ -383,10 +385,10 @@ function fn_delete_menuInfo(menuNo , progrmFileNm ) {
|
||||
success : function(returnData, status) {
|
||||
if (returnData.status == "success") {
|
||||
// 직원 목록 갱신
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
var instance = $('#kccadr_sbmt').jstree(true);
|
||||
//$("#" + instance.get_node(partIdx).a_attr.id).trigger("click");
|
||||
alert("메뉴 정보가 삭제 되었습니다.");
|
||||
$("#kopost_organization").jstree("refresh");
|
||||
$("#kccadr_sbmt").jstree("refresh");
|
||||
fn_init_menuInfo();
|
||||
} else if(returnData.status == "duplPk"){
|
||||
alert("삭제하려는 메뉴를 참조하고 있는 메뉴가 있습니다.\n 참조하는 메뉴를 삭제후 다시 시도해 주세요\n"+ "("+returnData.menuManageResultVO.menuCours+")");
|
||||
@ -474,7 +476,7 @@ function fn_save_menuInfo(menuNo) {
|
||||
success : function(returnData, status) {
|
||||
if (returnData.status == "success") {
|
||||
alert("메뉴 정보가 저장 되었습니다.");
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
var instance = $('#kccadr_sbmt').jstree(true);
|
||||
$('#'+instance.get_node($('#tmp_Id').val()).a_attr.id).trigger("click");//이전 메뉴id선택되게
|
||||
$('#tmp_Id').val($('#menuNo').val());
|
||||
} else if(returnData.status == "upperDupl"){
|
||||
@ -494,7 +496,7 @@ function fn_save_menuInfo(menuNo) {
|
||||
alert("메뉴 정보 저장이 실패되었습니다.");
|
||||
},
|
||||
complete : function () {
|
||||
$("#kopost_organization").jstree("refresh");
|
||||
$("#kccadr_sbmt").jstree("refresh");
|
||||
deleteLodingBar();
|
||||
}
|
||||
});
|
||||
@ -532,9 +534,9 @@ function initShowUrl(init){
|
||||
$("#url").attr("readonly", false);
|
||||
}
|
||||
if(init=='N'){
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
if($('#kopost_organization').jstree('get_selected')[0] != null){
|
||||
if(instance.get_node($('#kopost_organization').jstree('get_selected')[0]).children.length != 0){
|
||||
var instance = $('#kccadr_sbmt').jstree(true);
|
||||
if($('#kccadr_sbmt').jstree('get_selected')[0] != null){
|
||||
if(instance.get_node($('#kccadr_sbmt').jstree('get_selected')[0]).children.length != 0){
|
||||
alert("하위 메뉴가 있을경우는 다른타입으로 변경할수 없습니다.");
|
||||
return;
|
||||
}
|
||||
@ -788,15 +790,15 @@ function btnReset(obj){
|
||||
$(obj).closest('dd').find('span').html('');
|
||||
}
|
||||
|
||||
function proxyPay(obj){
|
||||
function proxyPay(obj, pram){
|
||||
var proxyPayList = '';
|
||||
proxyPayList += '<div class="appreq_box pay_box">';
|
||||
proxyPayList += '<div class="add_box"><button type="button" class="btnType08">추가</button></div>';
|
||||
proxyPayList += '<div class="add_box"><button type="button" class="btnType08" onclick="addSbmtPerson(\''+pram+'\', \'confront\');">추가</button></div>';
|
||||
proxyPayList += '<div class="list_box">';
|
||||
proxyPayList += '<dl>';
|
||||
proxyPayList += '<dt>대결자</dt>';
|
||||
proxyPayList += '<dd>';
|
||||
proxyPayList += '<span></span>';
|
||||
proxyPayList += '<span id=\'confront'+pram+'\'></span>';
|
||||
proxyPayList += '<div class="button_box"><button type="button" class="btn_reset">초기화</button></div>';
|
||||
proxyPayList += '</dd>';
|
||||
proxyPayList += '</dl>';
|
||||
@ -810,14 +812,28 @@ function proxyPay(obj){
|
||||
$(obj).closest('li').append(proxyPayList);
|
||||
}
|
||||
}
|
||||
|
||||
function addSbmtPerson(pram, type){
|
||||
var selectedNm = $('#kccadr_sbmt').jstree('get_selected',true)[0].text;
|
||||
|
||||
if(type == 'sbmt'){
|
||||
$('#sbmtPerson'+pram).text(selectedNm);
|
||||
}else{
|
||||
$('#confront'+pram).text(selectedNm);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<title>○○○ 결재 요청</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="smbtForm" name="smbtForm" action="">
|
||||
<input type="hidden" name="authorCode" id="authorCode" value="ROLE_ADMIN"/>
|
||||
</form>
|
||||
<div class="area_popup">
|
||||
<div class="cont_popup">
|
||||
<div class="menu_select">
|
||||
<select name="authorCode" id="authorCode" class="select" title="검색조건선택">
|
||||
<select name="authorCodeSelect" id="authorCodeSelect" class="select" title="검색조건선택">
|
||||
<option value="부서별">부서별</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -825,10 +841,10 @@ function proxyPay(obj){
|
||||
<div class="menu_wrap appreq_menu_wrap">
|
||||
<div class="menu_area">
|
||||
<div class="btn_wrap">
|
||||
<button type="button" class="btnType02 all_open" onclick="$('#kopost_organization').jstree('open_all' );">모두열기</button>
|
||||
<button type="button" class="btnType03 all_close" onclick="$('#kopost_organization').jstree('close_node' , $('#0') );">모두닫기</button>
|
||||
<button type="button" class="btnType02 all_open" onclick="$('#kccadr_sbmt').jstree('open_all' );">모두열기</button>
|
||||
<button type="button" class="btnType03 all_close" onclick="$('#kccadr_sbmt').jstree('close_node' , $('#0') );">모두닫기</button>
|
||||
</div>
|
||||
<div class="menu_list" id="kopost_organization" class="jstree_orgChart"></div>
|
||||
<div class="menu_list" id="kccadr_sbmt" class="jstree_orgChart"></div>
|
||||
</div>
|
||||
<div class="menu_detail">
|
||||
<ul class="appreq_list">
|
||||
@ -836,16 +852,16 @@ function proxyPay(obj){
|
||||
<div class="title">팀장</div>
|
||||
<div class="appreq_box">
|
||||
<div class="add_box">
|
||||
<button type="button" class="btnType08">추가</button>
|
||||
<button type="button" class="btnType08" onclick="addSbmtPerson('1', 'sbmt');">추가</button>
|
||||
</div>
|
||||
<div class="list_box">
|
||||
<dl>
|
||||
<dt>결재자</dt>
|
||||
<dd>
|
||||
<span>홍길동</span>
|
||||
<span id="sbmtPerson1">결재자1</span>
|
||||
<div class="button_box">
|
||||
<button type="button" class="btn_reset" onclick="btnReset(this);">초기화</button>
|
||||
<button type="button" class="btn_pay" onclick="proxyPay(this);">대결</button>
|
||||
<button type="button" class="btn_pay" onclick="proxyPay(this, '1');">대결</button>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -856,16 +872,16 @@ function proxyPay(obj){
|
||||
<div class="title">부서장</div>
|
||||
<div class="appreq_box">
|
||||
<div class="add_box">
|
||||
<button type="button" class="btnType08">추가</button>
|
||||
<button type="button" class="btnType08" onclick="addSbmtPerson('2', 'sbmt');">추가</button>
|
||||
</div>
|
||||
<div class="list_box">
|
||||
<dl>
|
||||
<dt>결재자</dt>
|
||||
<dd>
|
||||
<span>홍길동</span>
|
||||
<span id="sbmtPerson2">결재자2</span>
|
||||
<div class="button_box">
|
||||
<button type="button" class="btn_reset" onclick="btnReset(this);">초기화</button>
|
||||
<button type="button" class="btn_pay" onclick="proxyPay(this);">대결</button>
|
||||
<button type="button" class="btn_pay" onclick="proxyPay(this, '2');">대결</button>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -876,16 +892,16 @@ function proxyPay(obj){
|
||||
<div class="title">위원장</div>
|
||||
<div class="appreq_box">
|
||||
<div class="add_box">
|
||||
<button type="button" class="btnType08">추가</button>
|
||||
<button type="button" class="btnType08" onclick="addSbmtPerson('3', 'sbmt');">추가</button>
|
||||
</div>
|
||||
<div class="list_box">
|
||||
<dl>
|
||||
<dt>결재자</dt>
|
||||
<dd>
|
||||
<span>홍길동</span>
|
||||
<span id="sbmtPerson3">결재자3</span>
|
||||
<div class="button_box">
|
||||
<button type="button" class="btn_reset" onclick="btnReset(this);">초기화</button>
|
||||
<button type="button" class="btn_pay" onclick="proxyPay(this);">대결</button>
|
||||
<button type="button" class="btn_pay" onclick="proxyPay(this, '3');">대결</button>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user