<%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.*"%>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="com.udapsoft.waf.common.web.*" %>
<%@ page import="kr.co.hsnc.common.sql.*"%>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.util.*"%>
<%@ page import="com.udapsoft.waf.system.HandlerStorage"%>
<%@ page import="kr.co.hsnc.common.util.ValueObject"%>
<%@ page import="kr.co.hsnc.common.message.WAFMessage"%>
<%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
<%@ page import="com.udapsoft.waf.common.util.StringUtils" %>
<%@ page import="kr.co.udapsoft.common.util.PCMSUtil" %>
<%@ page import="kr.co.hsnc.common.util.Formatter"%>
<%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
<%@page import="java.net.URLEncoder"%>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
	ctx.init(request, response);
	String link = ctx.getServerDomain();

    HandlerStorage storage = ctx.getHandlerStorage();
	ValueObject params = storage.getParams();

   	
	WAFMessage wafMessage = WAFMessage.getInstance();
	
	ValueObject ContInfo  = storage.getValueObject("ContInfo");
    /*계약서식 FILE */
	RowSet autofile_list = storage.getRowSet("AUTOFILE_LIST");    
	String gwurl	=	"http://gw.sgcenc.co.kr/";
	
%>



<br>
<TABLE width="709" border="0" cellspacing="0" cellpadding="0">
	<tbody>
    <TR>
        <TD>
            <TABLE width="709" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolorlight="#AEAFAF" border="1">
	          <COLGROUP>
	            <COL width="70px">
	            <COL width="70px">
	            <COL width="214px">
	            <COL width="140px">
	            <COL width="215px">
				<COL/>
	          </COLGROUP>
	          	<tr height="23" align="center">
	          		<td class="list_title" nowrap align="Center" colspan="2">작성자</td>
	          		<td class="list_data" nowrap align="Left" >&nbsp;<%=ContInfo.get("USER_NAME")%></td>
	          		<td class="list_title" nowrap align="Center">사업주명</td>
	          		<%
	          				if(ContInfo.get("M_MEMBER_NAME").length() > 18) {
	          					
          			%>
          				<td class="list_data" nowrap align="left">&nbsp;<%=ContInfo.get("M_MEMBER_NAME").substring(0, 15)+"..." %></td>
					<%
          				} else {
					%>	          			
          				<td class="list_data" nowrap align="left">&nbsp;<%=ContInfo.get("M_MEMBER_NAME")%></td>
					<%
          				}
					%>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" nowrap align="Center" colspan="2">계약번호</td>
	          		<td class="list_data" nowrap align="Left">&nbsp;<%=ContInfo.get("ORD_DOC_NO")%></td>
	          		<td class="list_title" nowrap align="Center">PROJECT명</td>
	          		<%
	          				if(ContInfo.get("DEPT_NM").length() > 18) {
	          					
	          			%>
		          			<td class="list_data" nowrap align="left">&nbsp;<%=ContInfo.get("DEPT_NM").substring(0, 15)+"..." %></td>
						<%
	          				} else {
						%>	          			
	          				<td class="list_data" nowrap align="left">&nbsp;<%=ContInfo.get("DEPT_NM")%></td>
						<%
	          				}
						%>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" nowrap align="Center" colspan="2">계약명</td>
	          		<td class="list_data" nowrap align="Left" colspan="3">&nbsp;<%=ContInfo.get("CST_DOC_NAME")%></td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" nowrap align="Center" rowspan="2">공급자 </br>정보</td>
	          		<td class="list_title" nowrap align="Center">상호</td>
	          		<td class="list_data" nowrap align="Left" colspan="3">&nbsp;<%=ContInfo.get("S_MEMBER_NAME")%></td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" align="Center">사업자번호</td>
	          		<td class="list_data" nowrap align="Left" colspan="3" >&nbsp;<%=StringUtils.getBizNo(ContInfo.get("S_VENDCD"))%></td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" align="Center" colspan="2">계약일자</td>
	          		<td class="list_data" nowrap align="Left" >&nbsp;<%=ContInfo.get("ORD_CON_DATE")%></td>
	          		<td class="list_title" nowrap align="Center">공급가액</td>
	          		<td class="list_data" nowrap align="right">&nbsp;<%=ContInfo.get("ORD_SUPPLY_AMT")%>&nbsp;</td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" align="Center" colspan="2">부가세</td>
	          		<td class="list_data" nowrap align="right" >&nbsp;<%=ContInfo.get("ORD_SURTAX_AMT")%>&nbsp;</td>
	          		<td class="list_title" nowrap align="Center">계약금액</td>
	          		<td class="list_data" nowrap align="right">&nbsp;<%=ContInfo.get("ORD_AMT")%>&nbsp;</td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" align="Center" colspan="2">계약서</td>
	          		<td class="list_data" nowrap align="Center" >
	          			<%
							if(autofile_list.size()>0){
						%>
								<IMG src="<%=link %>/img/buyer/button/bt_attach_file.gif" id="bt_attach_file" alt="첨부파일 관리" align="top" valign="top" onClick="getFileList('<%=ContInfo.get("PUR_CONT_MOD_ID")%>');" class="button">
						<%
							}	
						%>				
	          		</td>
	          		<td class="list_title" nowrap align="Center">시행결의서</td>
	          		<td class="list_data" nowrap align="Center">
	          			<%
	          				if(!"".equals(ContInfo.get("DOC_ID")) ){ 
	          			%>
							<img align="absmiddle" style="cursor: pointer;" src="<%=link %>/img/buyer/button/bt_attach_file.gif" border="0" onclick="viewDraft('<%=ContInfo.get("DOC_ID")%>', '<%=ContInfo.get("year")%>');"/>
						<%
							} 
						%>
	          		</td>
	          	</tr>
	          	<tr height="23" align="center">
	          		<td class="list_title" align="Center" colspan="2">첨부서류</td>
	          		<td class="list_data" nowrap align="Center" colspan="3">
	          			<%
							RowSet addFile = FileManager.getFileList("PUR_CONT_MOD_ID", ContInfo.get("PUR_CONT_MOD_ID"));
							if (addFile.size()>0){
						%>	
							<IMG src="<%=link %>/img/buyer/button/bt_attach_file.gif" id="bt_attach_file" alt="첨부파일 관리" align="top" valign="top" onClick="open_apppend_file('PUR_CONT_MOD_ID', '<%=ContInfo.get("PUR_CONT_MOD_ID")%>');" class="button">
						<%
							}	
						%>
	          		</td>
	          	</tr>
			</TABLE>
        </TD>
    </TR>
  </tbody>
</TABLE>
<br>
<table><tr><td style="display:none;" id=doctitle_1  class=FIELD><%=ContInfo.get("doctitle")%></td></tr></table>
<br>
