SuppReferenceDetail.jsp 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <%--
  2. - FileName : SuppReferenceDetail.jsp
  3. - Author : gyeongmo an
  4. - Date : 2014.07.18
  5. - Copyright : Copyright (c) 2014 www.udapsoft.co.kr, Inc.
  6. - All rights reserved.
  7. - Description: 협력업체 자료실 상세
  8. --%>
  9. <%@ page contentType="text/html; charset=utf-8" %>
  10. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  11. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  12. <%@ page import="kr.co.hsnc.common.util.*"%>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager" %>
  15. <%@ page import="com.udapsoft.waf.common.util.DateUtil" %>
  16. <%@ include file="/jsp/work/taglib.jsp" %>
  17. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  18. <%
  19. ctx.init(request, response);
  20. String fevent = ctx.get("fevent");
  21. HandlerStorage storage = ctx.getHandlerStorage();
  22. ValueObject params = storage.getParams();
  23. ValueObject user = storage.getUser();
  24. String acct_id = "";
  25. if( user != null ) {
  26. acct_id = user.get("acct_id");
  27. }
  28. ValueObject vo = storage.getValueObject("suppReferenceDetailRowSet");
  29. //레이어로 띄웠는지 체크
  30. String layerYn = params.get("layerYn");
  31. String tempWidth= "";
  32. if(layerYn.equals("Y")) {
  33. tempWidth = "770px";
  34. } else {
  35. tempWidth = "100%";
  36. }
  37. String pop_win_id = "";
  38. if(!"".equals(params.get("pop_win_id"))) {
  39. pop_win_id = params.get("pop_win_id");
  40. }
  41. %>
  42. <SCRIPT language="JavaScript">
  43. function _onReady(){
  44. var f = document.form1;
  45. jQuery("#btnList").click(function() {
  46. var f = document.form1;
  47. f.fevent.value ="";
  48. f.layerYn.value = '<%=layerYn%>';
  49. f.pop_win_id.value = '<%=pop_win_id%>';
  50. f.action = "/supplier/portal/center/SuppReferenceList.screen";
  51. f.target = "_self";
  52. f.submit();
  53. });
  54. jQuery("#btnClose").click(function() {
  55. setTimeout(function(){parent.searchReferenceClose();},100);
  56. });
  57. }
  58. //첨부파일
  59. function doAttachFile(obj) {
  60. if(obj.value==''){
  61. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  62. }
  63. else if(obj.value != ''){
  64. viewFileListNew('REFERENCE_DETAIL', obj.value, document.form1.p_AttachFile, "N", "");
  65. }
  66. }
  67. function doDownFile(fileId){
  68. var url="/common/file/FileDownloadServlet";
  69. url += "?file_id=" + fileId;
  70. window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new")
  71. }
  72. function doAttachFileDiv(obj) {
  73. if(obj==''){
  74. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  75. }
  76. else if(obj != ''){
  77. viewFileListNew('REFERENCE_DETAIL', obj.value, document.getElementById("attach_file_view"), "N", "");
  78. }
  79. }
  80. /**
  81. * 첨부파일 예약 함수
  82. */
  83. function fileDown(file_id){
  84. var url="/common/file/FileDownloadServlet";
  85. url += "?file_id=" + file_id;
  86. window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new")
  87. }
  88. </script>
  89. <form id="form1" name="form1" method="post" modular:type="search" style="width:<%=tempWidth%>;height:100%;">
  90. <STYLE>
  91. BODY {
  92. OVERFLOW-X : HIDDEN ;
  93. }
  94. </STYLE>
  95. <INPUT type="hidden" name="fevent" value="<%= params.get("fevent") %>">
  96. <INPUT type="hidden" name="write_id" value="<%=acct_id%>">
  97. <INPUT type="hidden" name="seq" value="<%=vo.get("seq")%>">
  98. <INPUT type="hidden" name="supp_open_yn_value">
  99. <INPUT type="hidden" name="layerYn">
  100. <INPUT type="hidden" name="pop_win_id">
  101. <!-- 제목 및 버튼 -->
  102. <table width="100%">
  103. <colgroup>
  104. <col width="500" />
  105. <col width="*" />
  106. </colgroup>
  107. <tr>
  108. <th>
  109. <div align="left" id="title">
  110. <ul>
  111. <li>자료실</li>
  112. </ul>
  113. </div>
  114. </th>
  115. <td align="right">
  116. <span class="btnSearch center"><a href="javascript:void(0);" id="btnList">목록</a></span>
  117. <%if(layerYn.equals("Y")) { %>
  118. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  119. <%} %>
  120. </td>
  121. </tr>
  122. </table>
  123. <TABLE class="form-table"">
  124. <col width="15%">
  125. <col width="50%">
  126. <col width="15%">
  127. <col width="20%">
  128. <tr>
  129. <th style="text-align: left;">
  130. 제목
  131. </th>
  132. <td>
  133. <%= InputText.get("supp_reference_title", vo.get("title"), 45, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
  134. </td>
  135. <th style="text-align: left;">
  136. 일자
  137. </th>
  138. <td>
  139. <%= InputText.get("noti_dy", DateUtil.formatDateTime(vo.get("noti_dy"), "yyyyMMdd", "yyyy-MM-dd"), 45, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
  140. </td>
  141. </tr>
  142. <tr>
  143. <th style="text-align: left;">
  144. 작성자
  145. </th>
  146. <td colspan="3">
  147. <%= InputText.get("write_nm", vo.get("write_nm"), 45, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
  148. </td>
  149. </tr>
  150. <tr>
  151. <th style="text-align: left;">
  152. 내용
  153. </th>
  154. <td colspan="3">
  155. <%=HTMLCvt.cvtHTML(vo.get("content")) %>
  156. </td>
  157. </tr>
  158. <tr>
  159. <th style="text-align: left;">
  160. 첨부파일
  161. </th>
  162. <%--
  163. <td width="30%" style="padding-top: 3px;" COLSPAN='3'>
  164. <TABLE cellspacing="0" cellpadding="0">
  165. <%
  166. RowSet fileList = FileManager.getFileList("REFERENCE_DETAIL", vo.get("seq"));
  167. for(int i = 0; i < fileList.size(); i++){
  168. %>
  169. <TR height="25">
  170. <TD class="search_table_data">
  171. <a href="javascript:doDownFile('<%=fileList.getRow(i).get("FILE_ID") %>');"><%=fileList.getRow(i).get("FILE_NAME")%></a>
  172. </TD>
  173. </TR>
  174. <%
  175. }
  176. %>
  177. </TABLE>
  178. <TEXTAREA name="p_AttachFile" style="width:95%" rows="1" class="input" readOnly><%=vo.get("SUPP_REFERENCE_DETAIL_FILE") %></TEXTAREA>
  179. <IMG src="/img/buyer/icon/icon_plus.gif" alt="adjust size" border="0" align="top" onClick="JavaScript:toggleTextarea(this, document.form1.p_AttachFile, 1, 5);" style="cursor:hand;">
  180. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.seq);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:hand;'>
  181. </td>
  182. --%>
  183. <td colspan="3">
  184. <div id="attach_file_view" class="attach_file_view">
  185. <!-- 첨부 파일 화면에 바로보일때 사용 -->
  186. <%=FileManager.getFileListForDiv("REFERENCE_DETAIL", vo.get("seq")) %>
  187. </div>
  188. </td>
  189. </tr>
  190. </table>
  191. </form>