 <%--
  - FileName   : purchaseRequestList.jsp
  - Author(s)  : ok
  - Date       : 2014.07.28
  - Copyright  : Copyright (c) 2014 www.udapsoft.co.kr, Inc.
  - Description: (전자조달.구매대금) 대금신청현황의 대금신규등록 팝업
--%>

<%@page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@ page import="kr.co.hsnc.common.util.Formatter"%>
<%@ page import="kr.co.hsnc.common.config.WAFConfig"%>

<%@ include file="/jsp/work/taglib.jsp" %>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<%
	ctx.init(request, response);
	HandlerStorage storage = ctx.getHandlerStorage();
	ValueObject params = storage.getParams();
	ValueObject user = storage.getUser();
	String event = storage.getEvent();

	
	String _sBaseUrl	=	WAFConfig.get("waf.smb.url");
	String gwurl	=	"https://gw.sgcenc.co.kr/";//WAFConfig.get("gw.url.address2");
	
	RowSet DashList1 = storage.getRowSet("DashList1");
	
	RowSet DashList2= storage.getRowSet("DashList2");
	
	RowSet DashList3= storage.getRowSet("DashList3");
	
	RowSet DashList4= storage.getRowSet("DashList4");
%>

<script language="javascript" src="/js/report.js"></script>
<script type="text/javascript">


$(function(){
    
    $(".icon_x").click(function(){
	    window.close();
	});
    
    
  //페이지 로드시 콤마 찍어주기.
    $(".numberic").each(function(){
        $(this).text($(this).text().split(/(?=(?:\d{3})+(?:\.|$))/g).join(',')); 
    });
    
});


	function getGiveUpFile(prepay_id, zip_file_nm)
	{
	    var win_id = "_viewFileList";
		var link = "/common/file/FileListNew.screen";
		    link += "?pop_win_id="+win_id;
		    link += "&extFunction=viewFileListClose";
		    link += "&file_gb=" + "PREPAYMENTS_GIVEUP";
		    link += "&id=" + prepay_id;
		    link += "&sys_gb=" + "payment/purchase/"+prepay_id;	
		    link += "&zip_down_yn=" + "Y";
		    link += "&zip_down_name=" + encodeURIComponent(zip_file_nm);
		    link += "&sModule=LM";
		    
	    var popOption = "width=750, height=450, resizable=no, scrollbars=no, status=no;";    //팝업창 옵션(optoin)
		window.open(link,"",popOption);
	}
	
	function getFile(prepay_id, zip_file_nm)
	{
	    var win_id = "_viewFileList";
		var link = "/common/file/FileListNew.screen";
		    link += "?pop_win_id="+win_id;
		    link += "&extFunction=viewFileListClose";
		    link += "&file_gb=" + "PURCHASE_"+prepay_id;
		    link += "&id=" + "";
		    link += "&sys_gb=" + "payment/purchase/"+prepay_id;
		    link += "&zip_down_yn=" + "Y";
		    link += "&zip_down_name=" + encodeURIComponent(zip_file_nm);
		    link += "&sModule=LM";
		    
	    var popOption = "width=750, height=450, resizable=no, scrollbars=no, status=no;";    //팝업창 옵션(optoin)
		window.open(link,"",popOption);
	}

	function getPrepayFile(prepay_id, file_gb, zip_file_nm)
	{
	    var win_id = "_viewFileList";
		var link = "/common/file/FileListNew.screen";
		    link += "?pop_win_id="+win_id;
		    link += "&extFunction=viewFileListClose";
		    link += "&file_gb=" + file_gb;
		    link += "&id=" + prepay_id;
		    link += "&sys_gb=" + "prepay/purchase/"+prepay_id;	
		    link += "&zip_down_yn=" + "Y";
		    link += "&zip_down_name=" + encodeURIComponent(zip_file_nm);
		    link += "&sModule=LM";
		    
	    var popOption = "width=750, height=450, resizable=no, scrollbars=no, status=no;";    //팝업창 옵션(optoin)
		window.open(link,"",popOption);
	}

	//첨부파일   
	function getFileListPop(gubun, code, isDirGubun, zip_file_nm)
	{
	    var win_id = "_viewFileList";
		var link = "/common/file/FileListNew.screen";
		    link += "?pop_win_id="+win_id;
		    link += "&extFunction=viewFileListClose";
		    link += "&file_gb=" + gubun;
		    link += "&id=" + code;
		    link += "&is_modify=" + "N";
		    link += "&zip_down_yn=" + "Y";
		    link += "&zip_down_name=" + encodeURIComponent(zip_file_nm);
		    link += "&sModule=LM";
		    if(isDirGubun == "1")
	        {
		        link += "&sys_gb=" + "cont/purchase/"+code;
	        }
		    else if(isDirGubun == "99")  //2015.10.20
	        {
		        link += "&sys_gb=" + "cont/purchase/"+code;
		        
	        }
		    else
	        {
		        link += "&sys_gb=" + "bid/purchase/"+code;
	        }
		    
	    var popOption = "width=750, height=450, resizable=no, scrollbars=no, status=no;";    //팝업창 옵션(optoin)
		window.open(link,"",popOption);
	    
	}
	
	
	function popOpenGuar(wG, wSeq, wCauseCd, wOnOff, wGStatus, wOffid, wConRefNo, wChgNo){	
		var	sGuarKind		=	wG;														//보증서종류
		var	sGuarSeq		=	wSeq;															//일련번호
		var	sGuarOnoffYn	=	wOnOff;												//온오프여부
		var	sGuarStatus		=	wGStatus;													//보증진행상태

		var	sChgNo			=	wChgNo;	//계약차수

		var	style			=	"";
		var	src				=	"";
		var	sGrtType	=	"";	//	보증종목구분

		if(sGuarKind == "1")			sGrtType	=	"002";	//계약
		else if(sGuarKind == "2")	sGrtType	=	"006";	//지급
		else if(sGuarKind == "3")	sGrtType	=	"004";	//선급금
		else if(sGuarKind == "4")	sGrtType	=	"005";	//근재
		else if(sGuarKind == "5")	sGrtType	=	"003";	//하자	

		//검토대기나 완료일경우
		if(sGuarOnoffYn == "Y" && sGuarStatus.length > 0 && (sGuarStatus == "08" || sGuarStatus == "09")){
			
			var	sOffId				=	wOffid;		//	수신기관 ID
			var	conRefNo			=	wConRefNo; 							//	계약번호
			var	sGrtSeq				=	wSeq;	//	보증차수			
			var	sMsgFuncCode		=	"53";																//	문서기능
			var	sModule				=	"EB";																//	모듈구분코드
			
			if(sChgNo == "")	
				sChgNo	=	"00";
			else if(sChgNo.length == 1)
				sChgNo = "0" + sChgNo;
				
			if(sGrtSeq.length == 1)
				sGrtSeq = "0" + sGrtSeq;
				
			//parameter 확인 요함
			src		= "http://211.38.140.242:8091/transure/view/KSCFCView.jsp?offID="+sOffId+"&conRefNo="+conRefNo+"&conSeqNo="+sChgNo+"&grtSeq="+sGrtSeq+"&grtType="+sGrtType+"&msgFuncCode="+sMsgFuncCode+"&module="+sModule;
			style	=	"width=720,height=800, loactionbar=visible, menubar=visible, scrollbars=no";
		}
		
		var	id		=	"WARR";		
		var	clNew	=	window.open(src,id,style);
		
		if(clNew == null){
// 			alert("          ▒【보증신청】페이지는 팝업창으로 구성되어 있습니다. ▒\n\n\n'팝업이 차단되었습니다. 팝업 또는 추가 옵션을 보려면 여기를 클릭하십시오.' 라는\n\n 메세지가 보일경우에는 그 메세지를 클릭하셔서 '현재 사이트의 팝업을 항상 허용'이나\n\n'임시로 팝업허용'으로 설정해주시기 바랍니다.");
		}else{
			clNew.focus();
		}
	}	
	
	
	
	function conversationPop(conversationId)
	{
		var popUrl    =    "/payment/purchase/taxInfoPop.screen?CONVERSATION_ID="+conversationId  
		var popOption = "width=750, height=500, resizable=no, scrollbars=no, status=no;";    //팝업창 옵션(optoin)
		window.open(popUrl,"_blank",popOption);
	}
	
	
	
	function btn_tbecheckpop(bid_no, bid_deg)
	{
	    var win_id = "_TBECheckPop";
	 	var link = "/bid/purchase/TBECheckPop.screen";
		       link += "?pop_win_id="+win_id;
		       link += "&BID_NO="+bid_no;
		       link += "&BID_DEG="+bid_deg;
		       link += "&sModule=LM";
		       
		var popOption = "width=900, height=210, resizable=no, scrollbars=no, status=no;";    //팝업창 옵션(optoin)
		window.open(link, "", popOption);
	}
	
	function doResult(resultObj) {
		try 
		{
		   if( resultObj.getRequestEvent() == "TEST") 
		    {
				if( resultObj.getSuccess() ) 
				{
					document.form1.isSubmit = false;
					var vo = resultObj.getValueObject();
				}
				else 
				{
					alert(resultObj.getValueObject().get("errMsg"));
					document.form1.isSubmit = false;
				}
			}
		    
		}
		catch(errorObject) {
			showErrorDlg("doResult()", errorObject);
		}
	}
	
	//2015.10.20 상세화면 생략. 
	function popOpenGuarOff(purContModId, warrGubun, warrSeq, causeCode)
	{
	    var param = "";
	    var url = "";
         param = "?purContModId=" + purContModId;
		 param = param + "&warrGubun=" + warrGubun;
		 param = param + "&warrSeq=" + warrSeq;
		 param = param + "&causeCode=" + causeCode;
		 param = param + "&sModule=LM";
		 url = "/portal/guar/contPurWarrPopup.screen"+param;

		var popOption = "width=800, height=600, resizable=no, scrollbars=no, status=no;";    //팝업창 옵션(optoin)
		window.open(url, "", popOption);
	}
	
	
	function getFileList(pur_cont_mod_id)
	{
	    var param = "";
		var param = "?fevent=GET_FILE_LIST&p_job_div=P&p_pur_cont_mod_id=" + pur_cont_mod_id;
		param = param + "&sModule=LM";
		
		var url = "/payment/purchase/PayItemPurDashBoardFilePop.screen"+param;
		
		var popOption = "width=450, height=200, resizable=no, scrollbars=auto, status=no;";    //팝업창 옵션(optoin)
		window.open(url, "", popOption);
	}
	
	
	
	function report(bid_no, bid_deg, pbc_cbe_type_cd)
	{
	    var reportInfo = new ReportInfo();
        if(pbc_cbe_type_cd == "A")
        {
            reportInfo.title = "견적대비표";
            reportInfo.reportName = "/report/mrd/buyer/bid/purchase/Bid_purchase_Atype.mrd";
            
            reportInfo.set(bid_no);    	// $1
	        reportInfo.set(bid_deg);    	// $2
        }
        else if(pbc_cbe_type_cd == "B")
        {
            reportInfo.title = "견적대비표";
            reportInfo.reportName = "/report/mrd/buyer/bid/purchase/Bid_purchase_Btype.mrd";
            
            reportInfo.set(bid_no);    	// $1
	        reportInfo.set(bid_deg);    	// $2
        }
        else if(pbc_cbe_type_cd == "C")
        {
            reportInfo.title = "견적대비표";
            reportInfo.reportName = "/report/mrd/buyer/bid/purchase/Bid_purchase_Ctype.mrd";
            
            reportInfo.set(bid_no);    	// $1
	        reportInfo.set(bid_deg);    	// $2
        }
        reportInfo.width = 1000;                         	// Default: 1024
        reportInfo.height = 700;                         	// Default: 768
		reportInfo.showPopup();
	}
	
	function viewDraft(doc_id, year){
		var doc_chk = doc_id.substring(doc_id.length-3, doc_id.length);
		var link = "";
		
		doc_chk = doc_chk * 1;
		if (year < "20151214") {
			link = "<%=gwurl%>upload_approval/TEC/doc/" + doc_chk + "/"+ doc_id+".mht";
		}
		else{
			link = "<%=gwurl%>upload_approval/TEC/doc/" +  year.substr(0,4) + "/" + doc_chk + "/"+ doc_id+".mht";
		}
		
		//var popOption = "width=400, height=450, resizable=no, scrollbars=auto, status=no;";    //팝업창 옵션(optoin)
		window.open(link,"_viewDraft","");	
	}

</script>

<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>
<form id="form1" name="form1" method="post" modular:type="search" action="">
<input type="hidden" name="fevent" id="fevent" value="">
<input type="hidden" name="p_AttachFile1" id="p_AttachFile1" value="">
<input type="hidden" name="prepay_id" id="prepay_id" value="">

<div class="application-info  magT10">
	<div class="application-sub-title">
		<span class="title">대금</span>
	</div>
	<div class="application-location"></div>
</div>

<table class="form-table" style="width: 100%;">

	<col width="10%"/>
	<col width="30%"/>
	<col width="15%"/>
	<col width="5%"/>
<!-- 	<col width="10%"/> -->
<!-- 	<col width="10%"/> -->
	<col width="10%"/>
	<col width="10%"/>
	
	<tr height="25">
		<th style="text-align: center; padding-left: 0px;">구분</th>
		<th style="text-align: center; padding-left: 0px;">상태</th>
		<th style="text-align: center; padding-left: 0px;">보증</th>
		<th style="text-align: center; padding-left: 0px;">결재</th>
		<!-- 
		<th style="text-align: center; padding-left: 0px;">세금계산서</th>
		<th style="text-align: center; padding-left: 0px;">계산서</th>
		 -->
		<th style="text-align: center; padding-left: 0px;">포기각서</th>
		<th style="text-align: center; padding-left: 0px;">첨부문서</th>
	</tr>
	<% if(DashList1.size() != 0){%>
		<%for(int i=0; i < DashList1.size(); i++){
			RowSet fileRow = null;
			RowSet fileTaxRow = null;
			
			// 1 : 선급, 그외 대금
			if("1".equals(DashList1.getRow(i).get("DEPOSIT_CD"))){
				fileRow = FileManager.getFileList("PREPAYMENTS_BILLING", DashList1.getRow(i).get("PREPAY_ID"));
				// 선급 순발행인 경우 세금계산서 추가
				if("2".equals(DashList1.getRow(i).get("TAX_METHOD_CD"))){
					fileTaxRow = FileManager.getFileList("TAX_BILL", DashList1.getRow(i).get("PREPAY_ID"));
				} else if("3".equals(DashList1.getRow(i).get("TAX_METHOD_CD"))){
					fileTaxRow = FileManager.getFileList("PREPAYMENTS_INVOICE", DashList1.getRow(i).get("PREPAY_ID"));
				} else {
					fileTaxRow = new RowSetImpl();
				}
			} else {
				fileRow = FileManager.getFileList("PURCHASE_"+DashList1.getRow(i).get("PREPAY_ID"), "");
			}
			
			RowSet filePreRow = FileManager.getFileList("PREPAYMENTS_GIVEUP", DashList1.getRow(i).get("PREPAY_ID"));
		%>
		<tr height="25">
			<td style="vertical-align: middle;"><%=DashList1.getRow(i).get("DEPOSIT_NM") %></td>
			<td><%=DashList1.getRow(i).get("STATUS_NM") %></td>
			<td style="text-align: center;">
				<%=DashList1.getRow(i).get("WARR_GUBUN_NM") %>
				<%if(DashList1.getRow(i).get("GUAR_ONOFF_YN").equals("N")){ %>
				<%-- <img  align="absmiddle" id="war_gubun" style="cursor: pointer; <%=DashList1.getRow(i).get("WARR_GUBUN_NM").trim().equals("") ? "display:none;" : "" %>" src="/img/buyer/button/bt_search_right.gif" border="0" onclick="popOpenGuarOff('<%=DashList1.getRow(i).get("PUR_CONT_MOD_ID")%>', '<%=DashList1.getRow(i).get("WARR_GUBUN")%>', '<%=DashList1.getRow(i).get("WARR_SEQ")%>', '<%=DashList1.getRow(i).get("CAUSECODE")%>');"/>
				 --%>
				 <img align="absmiddle" id="war_gubun" style="cursor: pointer; <%=DashList1.getRow(i).get("WARR_GUBUN_NM").trim().equals("") ? "display:none;" : "" %>" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFileListPop('GUARCONT_PUR_'+'<%=DashList1.getRow(i).get("WARR_GUBUN")%>'+'_'+'<%=DashList1.getRow(i).get("WARR_SEQ")%>', '<%=DashList1.getRow(i).get("PUR_CONT_MOD_ID")%>', '99','<%=DashList1.getRow(i).get("WARR_GUBUN_NM") %>');"/>
				<%}else{ %>
				<img  align="absmiddle" id="war_gubun" style="cursor: pointer; <%=DashList1.getRow(i).get("WARR_GUBUN_NM").trim().equals("") ? "display:none;" : "" %>" src="/img/buyer/button/bt_search_right.gif" border="0" onclick="popOpenGuar('<%=DashList1.getRow(i).get("WARR_GUBUN")%>','<%=DashList1.getRow(i).get("WARR_SEQ")%>','<%=DashList1.getRow(i).get("CAUSECODE")%>','<%=DashList1.getRow(i).get("GUAR_ONOFF_YN")%>','<%=DashList1.getRow(i).get("GUAR_STATUS")%>','<%=DashList1.getRow(i).get("WARR_GOFFICE_ID")%>','<%=DashList1.getRow(i).get("GRTREQNO")%>','<%=DashList1.getRow(i).get("MOD_NO")%>');" />
				<%} %>
			</td>
			<td style="text-align: center;">
			<%if(!"".equals(DashList1.getRow(i).get("DOC_ID")) ){ %>
				<img align="absmiddle" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="viewDraft('<%=DashList1.getRow(i).get("DOC_ID") %>','<%=DashList1.getRow(i).get("YEAR") %>');"/>
			<%} %>
			</td>
			<!-- 
			<td style="text-align: center;"><span class="btnSearch center"><a href="javascript:void(0);" onclick="conversationPop('<%=DashList1.getRow(i).get("CONVERSATION_ID1").trim()%>');" id="btnDashTest" <%=DashList1.getRow(i).get("CONVERSATION_ID1").trim().equals("") ? "style=\"display:none;\" " : "" %>>보기</a></span></td>
			<td style="text-align: center;"><span class="btnSearch center"><a href="javascript:void(0);" onclick="conversationPop('<%=DashList1.getRow(i).get("CONVERSATION_ID2").trim()%>');" id="btnDashTest" <%=DashList1.getRow(i).get("CONVERSATION_ID2").trim().equals("") ? "style=\"display:none;\" " : "" %>>보기</a></span></td>
			 -->
			<td style="text-align: center;">
			<%if(filePreRow.size()>0){ %>
				<img align="absmiddle" id="fail_file" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getGiveUpFile('<%=DashList1.getRow(i).get("PREPAY_ID").trim() %>','포기각서');"/>
			<%} %>
			</td>
			<td style="text-align: center;">
			<%if("1".equals(DashList1.getRow(i).get("DEPOSIT_CD"))){
				if(fileRow.size()>0){ %>
					<img align="absmiddle" id="attch_file" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getPrepayFile('<%=DashList1.getRow(i).get("PREPAY_ID").trim() %>','PREPAYMENTS_BILLING','<%=DashList1.getRow(i).get("DEPOSIT_NM") %>')"/>
			<%	}
				if(fileTaxRow.size()>0){ 
					if("2".equals(DashList1.getRow(i).get("TAX_METHOD_CD"))){ %>
						&nbsp;<img align="absmiddle" id="attch_file" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getPrepayFile('<%=DashList1.getRow(i).get("PREPAY_ID").trim() %>','TAX_BILL','<%=DashList1.getRow(i).get("DEPOSIT_NM") %>')"/>
			<%		} else if("3".equals(DashList1.getRow(i).get("TAX_METHOD_CD"))){ %>
						&nbsp;<img align="absmiddle" id="attch_file" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getPrepayFile('<%=DashList1.getRow(i).get("PREPAY_ID").trim() %>','PREPAYMENTS_INVOICE','<%=DashList1.getRow(i).get("DEPOSIT_NM") %>')"/>
			<%		}
				}
			  } else {
				if(fileRow.size()>0){ %>
					<img align="absmiddle" id="attch_file" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFile('<%=DashList1.getRow(i).get("PREPAY_ID").trim() %>','<%=DashList1.getRow(i).get("DEPOSIT_NM") %>')"/>
			<%	}
			  } %>
			</td>
		</tr>
		<%} %>
	<%}else{ %>
		<tr height="25">
			<td style="vertical-align: middle; text-align: center;" colspan="6">검색된 내용이 없습니다.</td>
		</tr>
	<%} %>
	
</table>

<%String chk = params.get("job_auth");
  if (chk == null) chk = "";
  if (chk.equals("SITE_CONT") ||chk.equals("SITE_CONT2") ){
  }else{ %>
<div class="application-info  magT10">
	<div class="application-sub-title">
		<span class="title">계약</span>
	</div>
	<div class="application-location"></div>
</div>

<table class="form-table" style="width: 100%;">

	<col width="9%"/>
	<col width="5%"/>
	<col width="20%"/>
	<col width="30%"/>
	<col width="9%"/>
	<col width="9%"/>
<!-- 	<col width="9%"/> -->
	<col width="9%"/>
	
	<tr height="25">
		<th style="text-align: center; padding-left: 0px;" rowspan="2">구분</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">차수</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">계약번호</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">계약명</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">발주의뢰</th> <!-- 2016.4.12 -->
		<th style="text-align: center; padding-left: 0px;" rowspan="2">시행결의</th>
		<th style="text-align: center; padding-left: 0px;" colspan="2">계약문서</th>
	</tr>
	<tr height="25">
		<th style="text-align: center; padding-left: 0px;">자동첨부</th>
		<th style="text-align: center; padding-left: 0px;">수동첨부</th>
	</tr>
	<% if(DashList2.size() != 0){%>
		<%for(int i=0; i < DashList2.size(); i++){ 
			
			RowSet fileRow = FileManager.getFileList("PUR_CONT_MOD_ID", DashList2.getRow(i).get("PUR_CONT_MOD_ID"));
		%>
		<tr height="25">
			<td style="vertical-align: middle;"><%=DashList2.getRow(i).get("MOD_DESC") %></td>
			<td style="text-align: center;"><%=DashList2.getRow(i).get("MOD_NO") %></td>
			<td><%=DashList2.getRow(i).get("ORD_DOC_NO") %></td>
			<td><%=DashList2.getRow(i).get("CST_DOC_NAME") %></td>
			<td style="text-align: center;">
			<%if(!"".equals(DashList2.getRow(i).get("DOC_ID0")) ){ %>
				<img align="absmiddle" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="viewDraft('<%=DashList2.getRow(i).get("DOC_ID0") %>','<%=DashList2.getRow(i).get("YEAR0") %>');"/>
			<%} %>
			</td>
			<td style="text-align: center;">
			<%if(!"".equals(DashList2.getRow(i).get("DOC_ID")) ){ %>
				<img align="absmiddle" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="viewDraft('<%=DashList2.getRow(i).get("DOC_ID") %>','<%=DashList2.getRow(i).get("YEAR") %>');"/>
			<%} %>
			</td>
			<td style="text-align: center;">
			<%if(!DashList2.getRow(i).get("AUTO_CNT").equals("0")){ %>
				<img align="absmiddle" id="fileList" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFileList('<%=DashList2.getRow(i).get("PUR_CONT_MOD_ID") %>');"/>
			<%} %>
			</td>
			<td style="text-align: center;">
			<%if(fileRow.size()>0){ %>
				<img align="absmiddle" id="fileList2" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFileListPop('PUR_CONT_MOD_ID', '<%=DashList2.getRow(i).get("PUR_CONT_MOD_ID")%>', '2','<%=DashList2.getRow(i).get("ORD_DOC_NO") %>'+'_'+'<%=DashList2.getRow(i).get("MOD_NO") %>'+'차 계약자료');"/>
			<%} %>
			</td>
		</tr>
		<%} %>
	<%}else{ %>
		<tr height="25">
			<td style="vertical-align: middle; text-align: center;" colspan="8">검색된 내용이 없습니다.</td>
		</tr>
	<%} %>
</table>
<%} %>

<div class="application-info  magT10">
	<div class="application-sub-title">
		<span class="title">보증</span>
	</div>
	<div class="application-location"></div>
</div>

<table class="form-table" style="width: 100%;">
	<col width="20%"/>
	<col width="5%"/>
	<col width="20%"/>
	<col width="15%"/>
	<col width="15%"/>
	<col width="25%"/>
	
	<tr height="25">
		<th style="text-align: center; padding-left: 0px;" >보증종류</th>
		<th style="text-align: center; padding-left: 0px;" >차수</th>
		<th style="text-align: center; padding-left: 0px;" >보증기관</th>
		<th style="text-align: center; padding-left: 0px;" >보증금액</th>
		<th style="text-align: center; padding-left: 0px;" >발급일</th>
		<th style="text-align: center; padding-left: 0px;" >보증기간</th>
	</tr>
<% if(DashList4.size() != 0){%>
	<%for(int i=0; i < DashList4.size(); i++){ %>
	<tr>
		<td style="text-align: center;">
		<%=DashList4.getRow(i).get("WARR_GUBUN_NM") %>
			<%if(DashList4.getRow(i).get("GUAR_ONOFF_YN").equals("N")){ %>
				<!--<img  align="absmiddle" id="war_gubun" style="cursor: pointer; <%=DashList4.getRow(i).get("WARR_GUBUN_NM").trim().equals("") ? "display:none;" : "" %>" src="/img/buyer/button/bt_search_right.gif" border="0" onclick="popOpenGuarOff('<%=DashList4.getRow(i).get("PUR_CONT_MOD_ID")%>', '<%=DashList4.getRow(i).get("WARR_GUBUN")%>', '<%=DashList4.getRow(i).get("WARR_SEQ")%>', '<%=DashList4.getRow(i).get("CAUSECODE")%>');"/>
			    2015.10.20  -->
			    <img align="absmiddle" id="war_gubun" style="cursor: pointer; <%=DashList4.getRow(i).get("WARR_GUBUN_NM").trim().equals("") ? "display:none;" : "" %>" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFileListPop('GUARCONT_PUR_'+'<%=DashList4.getRow(i).get("WARR_GUBUN")%>'+'_'+'<%=DashList4.getRow(i).get("WARR_SEQ")%>', '<%=DashList4.getRow(i).get("PUR_CONT_MOD_ID")%>', '99');"/>
			<%}else{ %>
				<img  align="absmiddle" id="war_gubun" style="cursor: pointer; <%=DashList4.getRow(i).get("WARR_GUBUN_NM").trim().equals("") ? "display:none;" : "" %>" src="/img/buyer/button/bt_search_right.gif" border="0" onclick="popOpenGuar('<%=DashList4.getRow(i).get("WARR_GUBUN")%>','<%=DashList4.getRow(i).get("WARR_SEQ")%>','<%=DashList4.getRow(i).get("CAUSECODE")%>','<%=DashList4.getRow(i).get("GUAR_ONOFF_YN")%>','<%=DashList4.getRow(i).get("GUAR_STATUS")%>','<%=DashList4.getRow(i).get("WARR_GOFFICE_ID")%>','<%=DashList4.getRow(i).get("GRTREQNO")%>','<%=DashList4.getRow(i).get("MOD_NO")%>');" />
			<%} %>
		</td>
		<td style="text-align: center;"><%=DashList4.getRow(i).get("WARR_SEQ") %></td>
		<td style="text-align: center;"><%=DashList4.getRow(i).get("WARR_GOFFICE") %></td>
		<td style="text-align: right;" class="numberic"><%=DashList4.getRow(i).get("WARR_WAMT") %></td>
		<td style="text-align: center;"><%=DashList4.getRow(i).get("PAPERDATE") %></td>
		<td style="text-align: center;"><%=DashList4.getRow(i).get("WARR_SDATE") %> ~ <%=DashList4.getRow(i).get("WARR_EDATE") %></td>
	</tr>
	<%} %>
<%}else{ %>
	<tr height="25">
		<td style="vertical-align: middle; text-align: center;" colspan="6">검색된 내용이 없습니다.</td>
	</tr>
<%} %>
</table>
<!-- 
<div class="application-info  magT10">
	<div class="application-sub-title">
		<span class="title">입찰</span>
	</div>
	<div class="application-location"></div>
</div>

<table class="form-table" style="width: 100%;">

	<col width="20%"/>
	<col width="5%"/>
	<col width="15%"/>
	<col width="10%"/>
	<col width="10%"/>
	<col width="10%"/>
	<col width="10%"/>
	<col width="5%"/>
	<col width="5%"/>
	<col width="5%"/>
	
	<tr height="25">
		<th style="text-align: center; padding-left: 0px;" rowspan="2">입찰번호</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">차수</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">입찰명</th>
		<th style="text-align: center; padding-left: 0px;" colspan="2">TBE결과</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">견적대비표</th>
		<th style="text-align: center; padding-left: 0px;" rowspan="2">입찰실시</th>
		<th style="text-align: center; padding-left: 0px;" colspan="3">첨부문서</th>
	</tr>
	<tr height="25">
		<th style="text-align: center; padding-left: 0px;">결과</th>
		<th style="text-align: center; padding-left: 0px;">보기</th>
		<th style="text-align: center; padding-left: 0px;">내부</th>
		<th style="text-align: center; padding-left: 0px;">외부</th>
		<th style="text-align: center; padding-left: 0px;">업체</th>
	</tr>
	<% if(DashList3.size() != 0){%>
		<%for(int i=0; i < DashList3.size(); i++){ %>
		<tr height="25">
			<td style="vertical-align: middle;"><%=DashList3.getRow(i).get("BID_NO") %></td>
			<td style="text-align: center;"><%=DashList3.getRow(i).get("BID_DEG") %></td>
			<td><%=DashList3.getRow(i).get("BID_MASTER_NM") %></td>
			<td style="text-align: center;">적합</td>
			<td style="text-align: center;"><span class="btnSearch center"><a href="javascript:void(0);" id="btnTbeResult" onclick="btn_tbecheckpop('<%=DashList3.getRow(i).get("BID_NO") %>','<%=DashList3.getRow(i).get("BID_DEG") %>');">보기</a></span></td>
			<td style="text-align: center;">
				<span class="btnSearch center"><a href="javascript:void(0);" id="btn_report" onclick="report('<%=DashList3.getRow(i).get("BID_NO") %>','<%=DashList3.getRow(i).get("BID_DEG") %>','<%=DashList3.getRow(i).get("PBC_CBE_TYPE_CD") %>')">보기</a></span>
			</td>
			
			<td style="text-align: center;">
			<%if(!"".equals(DashList3.getRow(i).get("DOC_ID")) ){ %>
				<img align="absmiddle" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="viewDraft('<%=DashList3.getRow(i).get("DOC_ID") %>','<%=DashList3.getRow(i).get("YEAR") %>');"/>
			<%} %>
			</td>
			
			<td style="text-align: center;">
			<%if(!DashList3.getRow(i).get("BID_IN_CNT").equals("0") ){ %>
				<img align="absmiddle" id="file_in" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFileListPop('<%=DashList3.getRow(i).get("DOC_ETC_IN") %>', '<%=DashList3.getRow(i).get("DEMANDED_ID") %>');"/>
			<%} %>
			</td>
			<td style="text-align: center;">
			<%if(!DashList3.getRow(i).get("BID_OUT_CNT").equals("0") ){ %>
				<img align="absmiddle" id="file_out" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFileListPop('<%=DashList3.getRow(i).get("DOC_ETC_OUT") %>', '<%=DashList3.getRow(i).get("DEMANDED_ID") %>');"/>
			<%} %>
			</td>
			<td style="text-align: center;">
			<%if(!DashList3.getRow(i).get("CORP_CNT").equals("0") ){ %>
				<img align="absmiddle" id="corp_file" style="cursor: pointer;" src="/img/buyer/button/bt_change.gif" border="0" onclick="getFileListPop('<%=DashList3.getRow(i).get("FILE_GB") %>', '<%=DashList3.getRow(i).get("DEMANDED_ID") %>');"/>
			<%} %>
			</td>
		</tr>
		<%} %>
	<%}else{ %>
		<tr height="25">
			<td style="vertical-align: middle; text-align: center;" colspan="10">검색된 내용이 없습니다.</td>
		</tr>
	<%} %>
</table>
 -->
</form>