SuppNotiDetail.jsp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <%--
  2. - FileName : SuppNotiDetail.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.hsnc.common.sql.*" %>
  15. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager" %>
  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("suppNotiDetailRowSet");
  29. String notiDy = vo.get("noti_dy").substring(0, 4) + "-" + vo.get("noti_dy").substring(4, 6) + "-" +
  30. vo.get("noti_dy").substring(6, 8);
  31. // 레이어로 띄웠는지 체크
  32. String layerYn = params.get("layerYn");
  33. String tempWidth= "";
  34. if(layerYn.equals("Y")) {
  35. tempWidth="770px";
  36. } else {
  37. tempWidth="100%";
  38. }
  39. String pop_win_id = "";
  40. if(!"".equals(params.get("pop_win_id"))) {
  41. pop_win_id = params.get("pop_win_id");
  42. }
  43. %>
  44. <SCRIPT language="JavaScript">
  45. function _onReady(){
  46. var f = document.form1;
  47. jQuery("#btnList").click(function() {
  48. var f = document.form1;
  49. f.fevent.value ="";
  50. f.layerYn.value = '<%=layerYn%>';
  51. f.pop_win_id.value = '<%=pop_win_id%>';
  52. f.action = "/supplier/portal/center/SuppNotiList.screen";
  53. f.target = "_self";
  54. f.submit();
  55. });
  56. jQuery("#btnClose").click(function() {
  57. //setTimeout(function(){fLayerPopClose('_searchNotice');},100);
  58. setTimeout(function(){parent.searchNoticeClose(null);},100);
  59. });
  60. }
  61. //첨부파일
  62. function doAttachFile(obj) {
  63. if(obj.value==''){
  64. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  65. }
  66. else if(obj.value != ''){
  67. viewFileListNew('NOTI_DETAIL', obj.value, document.form1.p_AttachFile, "N", "");
  68. }
  69. }
  70. function doAttachFileDiv(obj) {
  71. if(obj==''){
  72. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  73. }
  74. else if(obj != ''){
  75. viewFileListNew('NOTI_DETAIL', obj.value, document.getElementById("attach_file_view"), "N", "");
  76. }
  77. }
  78. function doDownFile(fileId){
  79. var url="/common/file/FileDownloadServlet";
  80. url += "?file_id=" + fileId;
  81. 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")
  82. }
  83. /**
  84. * 첨부파일 예약 함수
  85. */
  86. function fileDown(file_id){
  87. var url="/common/file/FileDownloadServlet";
  88. url += "?file_id=" + file_id;
  89. 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")
  90. }
  91. </script>
  92. <form id="form1" name="form1" method="post" modular:type="search" style="width:<%=tempWidth %>;height:100%;">
  93. <STYLE>
  94. BODY {
  95. OVERFLOW-X : HIDDEN ;
  96. }
  97. </STYLE>
  98. <INPUT type="hidden" name="fevent" value="<%= params.get("fevent") %>">
  99. <INPUT type="hidden" name="write_id" value="<%=acct_id%>">
  100. <INPUT type="hidden" name="seq" value="<%=vo.get("seq")%>">
  101. <INPUT type="hidden" name="supp_open_yn_value">
  102. <INPUT type="hidden" name="layerYn">
  103. <INPUT type="hidden" name="pop_win_id">
  104. <!-- 제목 및 버튼 -->
  105. <table width="100%">
  106. <colgroup>
  107. <col width="500" />
  108. <col width="*" />
  109. </colgroup>
  110. <tr>
  111. <th>
  112. <div align="left" id="title">
  113. <ul>
  114. <li>공지사항</li>
  115. </ul>
  116. </div>
  117. </th>
  118. <td align="right">
  119. <span class="btnSearch center"><a href="javascript:void(0);" id="btnList">목록</a></span>
  120. <%if(layerYn.equals("Y")) { %>
  121. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  122. <%} %>
  123. </td>
  124. </tr>
  125. </table>
  126. <TABLE class="form-table">
  127. <col width="15%">
  128. <col width="50%">
  129. <col width="15%">
  130. <col width="20%">
  131. <tr>
  132. <th style="text-align: left;">
  133. 제목
  134. </th>
  135. <td>
  136. <%= InputText.get("supp_noti_title", vo.get("title"), 45, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
  137. </td>
  138. <th style="text-align: left;">
  139. 공지일자
  140. </th>
  141. <td>
  142. <%= InputText.get("notiDy", notiDy, 45, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
  143. </td>
  144. </tr>
  145. <tr>
  146. <th style="text-align: left;">
  147. 작성자
  148. </th>
  149. <td colspan="3">
  150. <%= InputText.get("write_nm", vo.get("write_nm"), 45, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
  151. </td>
  152. </tr>
  153. <tr>
  154. <th style="text-align: left;">
  155. 내용
  156. </th>
  157. <td colspan="3" >
  158. <%=HTMLCvt.cvtHTML(vo.get("content")) %>
  159. </td>
  160. </tr>
  161. <tr>
  162. <th style="text-align: left;">
  163. 첨부파일
  164. </th>
  165. <%--
  166. <td width="30%" style="padding-top: 3px;" COLSPAN='3'>
  167. <TABLE cellspacing="0" cellpadding="0">
  168. <%
  169. RowSet fileList = FileManager.getFileList("NOTI_DETAIL", vo.get("seq"));
  170. for(int i = 0; i < fileList.size(); i++){
  171. %>
  172. <TR height="25">
  173. <TD class="search_table_data">
  174. <a href="javascript:doDownFile('<%=fileList.getRow(i).get("FILE_ID") %>');"><%=fileList.getRow(i).get("FILE_NAME")%></a>
  175. </TD>
  176. </TR>
  177. <%
  178. }
  179. %>
  180. </TABLE>
  181. <TEXTAREA name="p_AttachFile" style="width:95%" rows="1" class="input" readOnly><%=vo.get("SUPP_NOTI_DETAIL_FILE") %></TEXTAREA>
  182. <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;">
  183. <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;'>
  184. </td>
  185. --%>
  186. <td colspan="3">
  187. <div id="attach_file_view" class="attach_file_view">
  188. <!-- 첨부 파일 화면에 바로보일때 사용 -->
  189. <%=FileManager.getFileListForDiv("NOTI_DETAIL", vo.get("seq")) %>
  190. </div>
  191. </td>
  192. </tr>
  193. </table>
  194. </form>