<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="/jsp/common/include/localemessage.jsp" %>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setHeader("Expires", "0");
%>


<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="/jsp/common/include/css.jsp"/>
<jsp:include page="/jsp/common/include/script.jsp"/>

<script language="javascript" >
var isDetail = false;
var lastsel1,lastsel2;

var selectName = "psvSysBzwkDstcd,psvSysAdptrBzwkGroupName,outbndRoutName";	// selectBox Name

function replaceRowName(rows){
	var json ={};
	json["rows"]=rows;
	return json;
}

function init(url,key1,key2,callback){
	$.ajax({  
		type : "POST",
		url:url,
		dataType:"json",
		data:{cmd: 'LIST_INIT_COMBO'},
		success:function(json){
			new makeOptions("CODE","NAME").setObj($("select[name=eaiBzwkDstcd]"              )).setData(json.bizRows            ).setFormat(codeName3OptionFormat).rendering();//업무구분코드             		
			new makeOptions("CODE","NAME").setObj($("select[name=svcHmsEonot]"               )).setData(json.svcTimeExistRows   ).setFormat(codeName3OptionFormat).rendering();//업무운영 시간여부        		
			new makeOptions("CODE","NAME").setObj($("select[name=svcMotivUseDstcd]"          )).setData(json.svcSameTimeTypeRows).rendering();//인터페이스 사용유형      		
			new makeOptions("CODE","NAME").setObj($("select[name=svcPrcesDsticName]"         )).setData(json.svcProcessTypeRows ).rendering();//서비스 처리유형          		
			new makeOptions("CODE","NAME").setObj($("select[name=flowCtrlRoutName]"          )).setData(json.flowControlRows    ).rendering();//Flow Control 라우팅명    		
			new makeOptions("CODE","NAME").setObj($("select[name=intgraDsticName]"           )).setData(json.unitTypeRows       ).rendering();//거래유형                 		
			//new makeOptions("CODE","NAME").setObj($("select[name=svcBfClmnLogYn]"            )).setData(json.svcWholeColLogRows ).setFormat(codeName3OptionFormat).rendering();//보조 로그 사용여부       		
			new makeOptions("CODE","NAME").setObj($("select[name=internalExternalDvcd]"      )).setData(json.internalExternalDvcdRows ).setFormat(codeName3OptionFormat).rendering();//내외부구분코드
			new makeOptions("CODE","NAME").setObj($("select[name=sevrLogLvelNo]"             )).setData(json.serverLogLevelRows ).setFormat(codeName3OptionFormat).rendering();//서버로그 레벨            		
			new makeOptions("CODE","NAME").setObj($("select[name=svcLogLvelNo]"              )).setData(json.svcLogLevelRows    ).setFormat(codeName3OptionFormat).rendering();//서비스 로그레벨          		
			//EAI서버구분코드
			new makeOptions("CODE","NAME").setObj($("select[name=eaiSevrDstCd]"               )).setData(json.inoutTypeRows).setFormat(codeName3OptionFormat).rendering();
			//EAI그룹회사코드
			new makeOptions("CODE","NAME").setObj($("select[name=eaiGroupCoCd]"               )).setData(json.groupCoCdRows).setFormat(codeName3OptionFormat).rendering();
			//거래처리구분
			new makeOptions("CODE","NAME").setObj($("select[name=tranType]"                   )).setData(json.tranTypeRows).setFormat(codeName3OptionFormat).rendering();
			
			new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=gstatSysAdptrBzwkGroupName]")).setNoValueInclude(true).setNoValue("", "<%=localeMessage.getString("combo.noChoice")%>").setData(json.inAdapterRows).setFormat(codeName3OptionFormat).rendering();//기동 인터페이스 유형


			new makeOptions("CODE","NAME").setObj($("select[name=psvIntfacDsticName]" )).setData(json.psvItfTypeRows        ).rendering();//수동 인터페이스 유형	             		
			new makeOptions("CODE","NAME").setObj($("select[name=psvSysBzwkDstcd]"    )).setData(json.bizRows               ).setFormat(codeName3OptionFormat).rendering();//수동업무구분        		
			//new makeOptions("CODE","NAME").setObj($("select[name=psvSysIdName]"       )).setData(json.psvIdRows             ).rendering();//수동시스템ID        		
			new makeOptions("CODE","NAME").setObj($("select[name=flovrYn]"            )).setData(json.failOverClsRows       ).setFormat(codeName3OptionFormat).rendering();//FailOver여부           		
			new makeOptions("CODE","NAME").setObj($("select[name=chngEonot]"          )).setData(json.cnvExistNotRows       ).setFormat(codeName3OptionFormat).rendering();//변환유무             		
			new makeOptions("CODE","NAME").setObj($("select[name=bascRspnsChngEonot]" )).setData(json.bsRspCnvExistNotRows  ).setFormat(codeName3OptionFormat).rendering();//기본응답변환유무             		
			new makeOptions("CODE","NAME").setObj($("select[name=errRspnsChngEonot]"  )).setData(json.errRspCnvExistNotRows ).setFormat(codeName3OptionFormat).rendering();//오류응답변환유무             		
			new makeOptions("CODE","NAME").setObj($("select[name=outbndRoutName]"     )).setData(json.outBoundRoutingRows   ).rendering();//Outbound라우팅명             		
			new makeOptions("CODE","NAME").setObj($("select[name=supplDelYn]"         )).setData(json.addDelYnRows          ).rendering();//추가삭제여부             		
			new makeOptions("CODE","NAME").setObj($("select[name=hdrCtrlDstcd]"       )).setData(json.hdrCtlCdRows          ).setFormat(codeName3OptionFormat).rendering();//헤더제어구분코드             		
			new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=psvSysAdptrBzwkGroupName]")).setNoValueInclude(true).setNoValue("", "<%=localeMessage.getString("combo.noChoice")%>").setData(json.ouAdapterRows).setFormat(codeName3OptionFormat).rendering();//수동시스템인터페이스유형             		
			
			if(key2 == "") setSearchable(selectName);	// 콤보에 searchable 설정
			
			if(typeof callback === 'function') {
				callback(url,key1,key2);
    		}
		},
		error:function(e){
			alert(e.responseText);
		}
	});
}
function detail(url,key1,key2){
	//IF 메시지 정보
	$.ajax({  
		type : "POST",
		url:url,
		dataType:"json",
		data:{cmd: 'DETAIL', eaiSvcName : key1 },
		success:function(json){
			var data = json;
			$("#ajaxForm input[type!=radio],#ajaxForm select,#ajaxForm textarea").each(function(){
				var name = $(this).attr("name");
				var tag  = $(this).prop("tagName").toLowerCase();
				$(tag+"[name="+name+"]").val(data[name.toUpperCase()]);
				$(tag+"[name="+name+"]").attr('readonly',true);
				$(tag+"[name="+name+"]").css({'background-color' : '#e5e5e5'});
				if (tag =="select"){
					$("select[name="+name+"]").attr("disabled",true);
				}
			});
		},
		error:function(e){
			alert(e.responseText);
		}
	});
	$("input[name=svcPrcssNo]").val('${param.svcPrcssNoForIndex}');
	if (!isDetail)return;
	//IF 서비스 메시지 등록
	$.ajax({  
		type : "POST",
		url:url,
		dataType:"json",
		data:{cmd: 'DETAIL_SVC', eaiSvcName : key1 , svcPrcssNo:key2},
		success:function(json){
			var data = json;
			$("input[name=svcPrcssNo]").attr('readonly',true);
			$("#ajaxForm2 input,#ajaxForm2 select,#ajaxForm2 textarea").each(function(){
				var name = $(this).attr("name");
				var tag  = $(this).prop("tagName").toLowerCase();
				$(tag+"[name="+name+"]").val(data[name.toUpperCase()]);
<%  if( "R".equals(request.getAttribute("rmsMenuAuth")) ) { %>				
				$(tag+"[name="+name+"]").attr('readonly',true);
				$(tag+"[name="+name+"]").css({'background-color' : '#e5e5e5'});
				if (tag =="select"){
					$("select[name="+name+"]").attr("disabled",true);
				}
<%  } %>				

			$("input[name=chngMsgIdName],input[name=bascRspnsChngMsgIdName],input[name=errRspnsChngMsgIdName]").each(function(){
				var name = $(this).attr("name");
				console.log(name + ": "+$("input[name="+name+"]").val());
				if($("input[name="+name+"]").val().trim() != ""){
					$("#"+name).show();
					$("input[name="+name+"]").css("width","85%");
				}
			});

			});
			$("#grid1")[0].addJSONData(replaceRowName(json.refRows));
			$("#grid2")[0].addJSONData(replaceRowName(json.conRuleRows));
			
			setSearchable(selectName);	// 콤보에 searchable 설정
		},
		error:function(e){
			alert(e.responseText);
		}
	});	
}
function gridRendering(){
	$('#grid1').jqGrid({
		datatype:"local",
	    editurl : "clientArray",
	    dataType:"json",
		loadonce: true,
		rowNum: 10000,
		colNames:['<%= localeMessage.getString("eaiMsg.serviceCode") %>',
		          '처리순서',
		          '<%= localeMessage.getString("eaiMsg.order") %>',
                  '<%= localeMessage.getString("eaiMsg.regMsgID") %>'
                  ],
		colModel:[
				{ name : 'EAISVCNAME'   , align:'left' , hidden: true },
				{ name : 'SVCPRCSSNO'   , align:'left' , hidden: true},
				{ name : 'REFMSGIDNO'   , align:'left' },
				{ name : 'REFMSGIDNAME' , align:'left' ,editable: true}
				],
        jsonReader: {
             repeatitems:false,
             root : 'rows'
		                  
        },	
        onSortCol : function(){
        	return 'stop';	//정렬 방지
        },     
        loadComplete : function (d) {
        },
        ondblClickRow: function(rowId) {
     
        },
<%  if( "W".equals(request.getAttribute("rmsMenuAuth")) ) { %>	        
	    onSelectRow: function(rowid,status){
	    	if (lastsel1 !=undefined){
	            if($("#grid1 tr#" + lastsel1).attr("editable") == 1){ //editable=1 means row in edit mode
	        	  $("#grid1").saveRow(lastsel1,false,"clientArray");
				}
	    	}
	        $('#grid1').restoreRow(lastsel1);
	        $('#grid1').editRow(rowid,true);
	        lastsel1=rowid;
	    },<%  } %>
	    height: '100',
		autowidth: true,
		viewrecords: true
	}
	       
	);	
	$('#grid2').jqGrid({
		datatype:"local",
	    editurl : "clientArray",
		//loadonce: true,
		rowNum: 1000,
		dataType:"json",
		colNames:['<%= localeMessage.getString("eaiMsg.serviceCode") %>',
		          '처리순서',
                  '<%= localeMessage.getString("eaiMsg.serno") %>',
                  '<%= localeMessage.getString("eaiMsg.resultNo") %>',
                  '<%= localeMessage.getString("eaiMsg.ruleFieldGroup") %>',
                  '<%= localeMessage.getString("eaiMsg.ruleField") %>',
                  '<%= localeMessage.getString("eaiMsg.comparison") %>'
                  ],

		colModel:[
				{ name : 'EAISVCNAME'       , align:'left' , hidden: true },
				{ name : 'SVCPRCSSNO'       , align:'left' , hidden: true},
				{ name : 'RULESERNO'        , align:'left' },
				{ name : 'RSULTPRCSSNO'     , align:'left' ,editable: true},
				{ name : 'RULEFLDGROUPNAME' , align:'left' ,editable: true},
				{ name : 'RULEFLDNAME'      , align:'left' ,editable: true},
				{ name : 'CMPRCTNT'         , align:'left' ,editable: true}
				],
        jsonReader: {
             repeatitems:false,
             root : 'conRuleRows'
        },	   
        loadComplete : function (d) {
        },
        ondblClickRow: function(rowId) {
     
        },
        onSortCol : function(){
        	return 'stop';	//정렬 방지
        },   
<%  if( "W".equals(request.getAttribute("rmsMenuAuth")) ) { %>	    
        onSelectRow: function(rowid,status){
	    	if (lastsel2 !=undefined){
	            if($("#grid2 tr#" + lastsel2).attr("editable") == 1){ //editable=1 means row in edit mode
	        	  $("#grid2").saveRow(lastsel2,false,"clientArray");
				}
	    	}
	        $('#grid2').restoreRow(lastsel2);
	        $('#grid2').editRow(rowid,true);
	        lastsel2=rowid;
	    },        
<%  } %>	                   
	    height: '200',
		autowidth: true,
		viewrecords: true
	});		
}
$(document).ready(function() {	
	var returnUrl = '${param.returnUrl}';
	returnUrl = returnUrl + '?cmd='+'DETAIL';
	returnUrl = returnUrl + '&page='+'${param.pages}';
	returnUrl = returnUrl + '&menuId='+'${param.menuId}';
	//검색조건
	returnUrl = returnUrl + '&'+ getSearchUrlForReturn();
	//key
	returnUrl = returnUrl + '&eaiSvcName='+ "${param.eaiSvcName}";
	
	
	
	var url ='<c:url value="/onl/admin/service/eaiMsgMan.json" />';
	var key1 ="${param.eaiSvcName}";
	var key2 ="${param.svcPrcssNo}";
	if (key2 != "" && key2 !="null"){
		isDetail = true;
	}
	gridRendering();
	
	init(url,key1,key2,detail);
	$("#btn_modify").click(function(){
		if($("#grid1 tr#" + lastsel1).attr("editable") == 1){ //editable=1 means row in edit mode
			$("#grid1").saveRow(lastsel1,false,"clientArray");
		}
		if($("#grid2 tr#" + lastsel2).attr("editable") == 1){ //editable=1 means row in edit mode
			$("#grid2").saveRow(lastsel2,false,"clientArray");
		}
		
		var data     = $("#grid1").getRowData();
		var gridRef = new Array();
		for (var i = 0; i <data.length; i++) {
			if (data[0]["REFMSGIDNAME"] !=null){
				gridRef.push(data[i]);
			}
		}
		
		data     = $("#grid2").getRowData();
		var gridConRule = new Array();
		for (var i = 0; i <data.length; i++) {
			if (data[0]["RSULTPRCSSNO"] !=null){
				gridConRule.push(data[i]);
			}
		}
	
		var postData = $('#ajaxForm2').serializeArray();
		postData.push({ name: "eaiSvcName" , value:key1});
		if (isDetail){
			postData.push({ name: "cmd" , value:"UPDATE_SVC"});
		}else{
			postData.push({ name: "cmd" , value:"INSERT_SVC"});
		}
		postData.push({ name: "gridRef" , value:JSON.stringify(gridRef)});
		postData.push({ name: "gridConRule" , value:JSON.stringify(gridConRule)});
		
		$.ajax({
			type : "POST",
			url:url,
			data:postData,
			success:function(args){
				alert("<%= localeMessage.getString("common.saveMsg") %>");
				goNav(returnUrl);//LIST로 이동
			},
			error:function(e){
				alert(e.responseText);
			}
		});
	});
	$("#btn_delete").click(function(){
		var postData = $('#ajaxForm2').serializeArray();
		postData.push({ name: "cmd" , value:"DELETE_SVC"});
		postData.push({ name: "eaiSvcName" , value:key1});
		$.ajax({
			type : "POST",
			url:url,
			data:postData,
			success:function(args){
				alert("<%=localeMessage.getString("common.deleteMsg")%>");
				goNav(returnUrl);//LIST로 이동

			},
			error:function(e){
				alert(e.responseText);
			}
		});
	});	
	$("#btn_previous").click(function(){
		goNav(returnUrl);//LIST로 이동
	});
	$("#grid1add").click(function(){
		var rows = $("#grid1")[0].rows;
		var index = Number($(rows[rows.length-1]).attr("id"));
		if (isNaN(index)) index=0;
	    var rowid = index + 1;
		var data = new Object();
		data["EAISVCNAME"]=key1; 
		data["SVCPRCSSNO"]=key2; 
		data["REFMSGIDNO"]=rowid; 
		data["REFMSGIDNAME"]=null;; 	    
	    
		$("#grid1").jqGrid('addRow', {
           rowID : rowid,          
           initdata : data,
           position :"last",    //first, last
           useDefValues : false,
           useFormatter : false,
           addRowParams : {extraparam:{}}
		});
		$("#"+$('#grid1').jqGrid('getGridParam','selrow')).focus();
	});
	$("#grid2add").click(function(){
		var rows = $("#grid2")[0].rows;
		var index = Number($(rows[rows.length-1]).attr("id"));
		if (isNaN(index)) index=0;
	    var rowid = index + 1;
		var data = new Object();
		data["EAISVCNAME"]=key1; 
		data["SVCPRCSSNO"]=key2; 
		data["RULESERNO"]=rowid; 
		data["RSULTPRCSSNO"]=null; 	    
		data["RULEFLDGROUPNAME"]=null; 	    
		data["RULEFLDNAME"]=null; 	    
		data["CMPRCTNT"]=null; 	    
	    
		$("#grid2").jqGrid('addRow', {
           rowID : rowid,          
           initdata : data,
           position :"last",    //first, last
           useDefValues : false,
           useFormatter : false,
           addRowParams : {extraparam:{}}
		});
		$("#"+$('#grid2').jqGrid('getGridParam','selrow')).focus();
	});	
	$("#grid1delete").click(function(){
		var rowId = $("#grid1").getGridParam( "selrow" );
		if (rowId == null){
			alert("<%=localeMessage.getString("eaiMsg.alert01")%>");
			return;
		}
		$('#grid1').jqGrid('delRowData',rowId);
	});	
	$("#grid2delete").click(function(){
		var rowId = $("#grid2").getGridParam( "selrow" );
		if (rowId == null){
			alert("<%=localeMessage.getString("eaiMsg.alert01")%>");
			return;
		}
		
		$('#grid2').jqGrid('delRowData',rowId);
	});
	
	$("#chngMsgIdName, #bascRspnsChngMsgIdName ,#errRspnsChngMsgIdName").click(function(){
		var name = $(this).attr('id');
		
		if($("input[name="+name+"]").val().trim() == ""){
			alert("No data");
			return false;
		}
		
		if($.trim(name) =="") return;
		var args = new Object();
    	
   		var eaiSvcName 	= $("input[name=eaiSvcName]").val();
		var cnvsnName 	= $("input[name="+name+"]").val();
		//args['cnvsnDesc'] = $("input[name=cnvsnName_"+gbn+"]").val();
        
        var url='<c:url value="/onl/transaction/tracking/trackingMan.view"/>';
        url += '?cmd=TRANSFORMPOPUP2';
   
         //key값
        url += '&cnvsnName='+cnvsnName;
        url += '&eaiSvcName='+eaiSvcName;

	    showModal(url,args,1800,820);

	});
	
	  $(".layout_btn").hide();

	buttonControl(isDetail);
	titleControl(isDetail);
});
 
</script>
</head>
	<body>
		<div class="right_box">
			<div class="content_top">
				<ul class="path">
					<li><a href="#">${rmsMenuPath}</a></li>					
				</ul>					
			</div><!-- end content_top -->
			<div class="content_middle">
				<div class="search_wrap">
               		<button type="button" class="cssbtn" id="btn_delete" level="W" status="DETAIL,NEW"><i class="material-icons">delete</i> <%= localeMessage.getString("button.delete") %></button>
               		<button type="button" class="cssbtn" id="btn_modify" level="W"  status="DETAIL,NEW"><i class="material-icons">save</i> <%= localeMessage.getString("button.modify") %></button>
					<button type="button" class="cssbtn" id="btn_previous" level="R"  status="DETAIL,NEW"><i class="material-icons">arrow_back</i> <%= localeMessage.getString("button.previous") %></button>
<%--					<img src="<c:url value="/img/btn_initialize.png"/>" alt="" id="btn_initialize" level="W" status="DETAIL"/> --%>
<%-- 					<img src="<c:url value="/img/btn_modify.png"/>" alt="" id="btn_modify" level="W" status="DETAIL,NEW" />				 --%>
<%-- 					<img src="<c:url value="/img/btn_previous.png"/>" alt="" id="btn_previous" level="R" status="DETAIL,NEW"/> --%>
				</div>
				<div class="title"><%= localeMessage.getString("eaiMsg.title") %></div>						
				
				<form id="ajaxForm">
					<div class="table_row_title"><%= localeMessage.getString("eaiMsg.subtitle1") %></div>
					<%-- <table id="detail" class="table_row"  cellspacing="0"  >
						<tr level="W">
							<td colspan="4">
								<input type="text" name="newEaiSvcName" style="width:calc(100% - 70px);">
								<img id="btn_clone" src="<c:url value="/img/btn_clone1.png"/>" level="W" status="DETAIL" class="btn_img"/>							
							</td>
						</tr>
					</table> --%>
					<table id="detail" class="table_row"  cellspacing="0"  >
						<tr>
							<th style="width:15%;"><%= localeMessage.getString("eaiMsg.serviceCode") %></th>
							<td style="width:35%;"><input type="text" name="eaiSvcName"> </td>
							<th style="width:15%;"><%= localeMessage.getString("eaiMsg.bizCode") %></th>
							<td style="width:35%;">
								<div style="position:relative;">
									<div class="select-style">
										<div class="select-style"><select name="eaiBzwkDstcd">
										</select>
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.bizHour") %></th>
							<td >
								<div class="select-style">
								<div class="select-style"><select name="svcHmsEonot"></select>
								</div>
							</td>
							<th><%= localeMessage.getString("eaiMsg.syncYn") %></th>
							<td >
								<div class="select-style">
								<div class="select-style"><select name="svcMotivUseDstcd"></select>
								</div>
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.procType") %></th>
							<td >
								<div class="select-style">
								<div class="select-style"><select name="svcPrcesDsticName"></select>
								</div>
							</td>
							<th><%= localeMessage.getString("eaiMsg.fcrouting") %></th>
							<td >
								<div style="position:relative;">
									<div class="select-style">
									<div class="select-style"><select name="flowCtrlRoutName">
									</select>
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.transType") %></th>
							<td >
								<div class="select-style">
								<div class="select-style"><select name="intgraDsticName"></select>
								</div>
							</td>
							<th><%= localeMessage.getString("eaiMessage.internalExternalDvcd")%> </th>
							<td >
								<div class="select-style">
									<select name="internalExternalDvcd"></select>
								</div>
								<input type="hidden" name="svcBfClmnLogYn">
							</td>
							<!-- 
							<th>< %= localeMessage.getString("eaiMsg.subLog") %></th>
							<td >
								<div class="select-style">
								<div class="select-style"><select name="svcBfClmnLogYn"></select>
								</div>
							</td>
							-->
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.sendAdapter") %></th>
							<td >
								<div style="position:relative;">
									<div class="select-style">
									<div class="select-style"><select name="gstatSysAdptrBzwkGroupName">
									</select>
									</div>
								</div>	
							</td>
							<th><%= localeMessage.getString("eaiMsg.svrLogLevel") %></th>
							<td >
								<div class="select-style">
								<div class="select-style"><select name="sevrLogLvelNo"></select>
								</div>
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.serviceLogLevel") %></th>
							<td >
								<div class="select-style">
								<div class="select-style"><select name="svcLogLvelNo"></select>
								</div>
							</td>
							<th><%= localeMessage.getString("eaiMsg.errSvcCode") %></th>
							<td >
								<input type="text" name="errEAISvcName">
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.reqErrTransID") %></th>
							<td >
								<input type="text" name="dmndErrChngIdName">
							</td>
							<th><%= localeMessage.getString("eaiMsg.reqErrField") %></th>
							<td >
								<input type="text" name="dmndErrFldName">
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.resErrTransID") %></th>
							<td >
								<input type="text" name="rspnsErrChngIdName">
							</td>
							<th><%= localeMessage.getString("eaiMsg.resErrField") %></th>
							<td >
								<input type="text" name="rspnsErrFldName">
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.ifSerDesc") %></th>
							<td colspan="3">
								<textarea name="eaiSvcDesc" style="width:100%;height:50px"></textarea>
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.eaiSevrDstCd") %></th>
							<td >
								<div class="select-style">
									<select name="eaiSevrDstCd"></select>
								</div>
							</td>
							<th><%= localeMessage.getString("eaiMsg.eaiGroupCoCd") %></th>
							<td >
								<div class="select-style">
									<select name="eaiGroupCoCd"></select>
								</div>
							</td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.tranType") %></th>
							<td>
								<div class="select-style">
									<select name="tranType"></select>
								</div>
							</td>
							<th><%= localeMessage.getString("eaiMsg.verInfo") %></th>
							<td>
								<input type="text" name="verInfo">
							</td>									
						</tr>
					</table>
				</form>
					
				<div class="table_row_title"><%= localeMessage.getString("eaiMsg.subtitle2") %></div>	
				<form id="ajaxForm2">
					<table class="table_row"  cellspacing="0"  >
						<tr>
							<th style="width:20%;"><%= localeMessage.getString("eaiMsg.procNo") %></th>
							<td style="width:30%;"><input type="text" name="svcPrcssNo" /> </td>
							<th style="width:20%;"><%= localeMessage.getString("eaiMsg.recvSyncYn") %></th>
							<td style="width:30%;"><div class="select-style"><select name="psvIntfacDsticName" /></div> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.recvBizDiv") %></th><td><div class="select-style"><select name="psvSysBzwkDstcd" /></div> </td>
							<!-- <th>수동시스템ID</th><td><div class="select-style"><select name="psvSysIdName" /></div> </td> -->
							<th><%= localeMessage.getString("eaiMsg.recvSvcCd") %></th><td><input type="text" name="psvSysSvcDsticName" /> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.recvAdapter") %></th><td><div class="select-style"><select name="psvSysAdptrBzwkGroupName" /></div> </td>
							<th><%= localeMessage.getString("eaiMsg.failover") %></th><td><div class="select-style"><select name="flovrYn" /></div> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.trnasformYn") %></th><td><div class="select-style"><select name="chngEonot" /></div> </td>
							<th><%= localeMessage.getString("eaiMsg.transformMsgID") %></th><td><input type="text" name="chngMsgIdName" />
							<img src="<c:url value="/images/bt/pop_detail.gif"/>" alt="" id="chngMsgIdName" class="layout_btn" style="cursor:pointer;"/> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.normalResTransYn") %></th><td><div class="select-style"><select name="bascRspnsChngEonot" /></div> </td>
							<th><%= localeMessage.getString("eaiMsg.errResTransYn") %></th><td><div class="select-style"><select name="errRspnsChngEonot" /></div> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.normalResTransMsgID") %></th><td><input type="text" name="bascRspnsChngMsgIdName" />
							<img src="<c:url value="/images/bt/pop_detail.gif"/>" alt="" id="bascRspnsChngMsgIdName" class="layout_btn" style="cursor:pointer;" /> </td>							
							<th><%= localeMessage.getString("eaiMsg.errResTransMsgID") %></th><td><input type="text" name="errRspnsChngMsgIdName" />
							<img src="<c:url value="/images/bt/pop_detail.gif"/>" alt="" id="errRspnsChngMsgIdName" class="layout_btn" style="cursor:pointer;"/>  </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.normalResMsgVal") %></th><td><input type="text" name="bascRspnsMsgCmprCtnt" /> </td>
							<th><%= localeMessage.getString("eaiMsg.errResMsgVal") %></th><td><input type="text" name="errRspnsMsgCmprCtnt" /> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.nextOrder") %></th><td><input type="text" name="nextSvcPrcssNo" /> </td>
							<th><%= localeMessage.getString("eaiMsg.outRouting") %></th><td><div class="select-style"><select name="outbndRoutName" /></div> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.timeout") %></th><td><input type="text" name="toutVal" /> </td>
							<th><%= localeMessage.getString("eaiMsg.rewardSvcCd") %></th><td><input type="text" name="cmpenSvcPrcssDsticName" /> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.addDel") %></th><td><div class="select-style"><select name="supplDelYn" /></div> </td>
							<th><%= localeMessage.getString("eaiMsg.headerControl") %></th><td><div class="select-style"><select name="hdrCtrlDstcd" /></div> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.refClass") %></th><td colspan="3"><input type="text" name="hdrRefClsName" /> </td>
						</tr>
						<tr>
							<th><%= localeMessage.getString("eaiMsg.restAddCon") %></th><td colspan="3"><input type="text" name="restOption" /> </td>
						</tr>
					</table>
				</form>
				
				<div style="position:relative;">
					<div class="table_row_title"><%= localeMessage.getString("eaiMsg.subtitle3") %></div>
					<div style="position:absolute;right:0; top:0;">
						<button type="button" class="cssbtn" id="grid1add" level="W" status="DETAIL,NEW"><i class="material-icons">add</i> <%= localeMessage.getString("button.new") %></button>
						<button type="button" class="cssbtn" id="grid1delete" level="W" status="DETAIL,NEW"><i class="material-icons">delete</i> <%= localeMessage.getString("button.delete") %></button>
<%-- 						<img id="btn_pop_new" src="<c:url value="/img/btn_new.png"/>" name="grid1add" class="btn_img" status="DETAIL,NEW" level="W"/> --%>
<%-- 						<img id="btn_pop_delete" src="<c:url value="/img/btn_delete.png"/>" name="grid1delete" class="btn_img" status="DETAIL,NEW" level="W"/> --%>
					</div>
				</div>
				<!-- grid -->
				<table id="grid1" ></table>	
				<div style="position:relative; margin-top:15px;">
					<div class="table_row_title"><%= localeMessage.getString("eaiMsg.subtitle4") %></div>
					<div style="position:absolute;right:0; top:0;">
						<button type="button" class="cssbtn" id="grid2add" level="W" status="DETAIL,NEW"><i class="material-icons">add</i> <%= localeMessage.getString("button.new") %></button>
						<button type="button" class="cssbtn" id="grid2delete" level="W" status="DETAIL,NEW"><i class="material-icons">delete</i> <%= localeMessage.getString("button.delete") %></button>
<%-- 						<img id="btn_pop_new" src="<c:url value="/img/btn_new.png"/>" name="grid2add" class="btn_img" status="DETAIL,NEW" level="W"/> --%>
<%-- 						<img id="btn_pop_delete" src="<c:url value="/img/btn_delete.png"/>" name="grid2delete"class="btn_img"  status="DETAIL,NEW" level="W"/> --%>
					</div>
				</div>
				<table id="grid2" ></table>
			</div><!-- end content_middle -->
		</div><!-- end right_box -->	
	</body>
</html>

