BidOpenList.jsp 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <%--
  2. - FileName : BidOpenList.jsp
  3. - Author(s) : Hyung min Son
  4. - Date : 2014.07.14
  5. -
  6. - Description: 견적서 개찰 리스트
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ include file="/jsp/work/taglib.jsp" %>
  14. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  15. <%
  16. ctx.init(request, response);
  17. HandlerStorage storage = ctx.getHandlerStorage();
  18. ValueObject params = storage.getParams();
  19. ValueObject user = storage.getUser();
  20. %>
  21. <SCRIPT language="JavaScript">
  22. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  23. /*예약함수*/
  24. var sheet1 = new ibsheetObject();
  25. var sheet1Row;
  26. var sheet1PageNo = 1;
  27. var pageLastRowIndex = 1;
  28. var validationResult = false;
  29. var filterShow = false;
  30. function _onReady(){
  31. /**
  32. * IBSheet object initialize
  33. */
  34. gridInit(sheet1);
  35. autoResize();
  36. /**
  37. * Application Initialize
  38. */
  39. $("#btnSearch").click(function() {
  40. jQuery("#fevent").val("SHEET_SELECT");
  41. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidOpenList_sheet.screen";
  42. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  43. });
  44. /*
  45. 현장 팝업
  46. */
  47. $("#btn_dept").click(function() {
  48. PopsearchSite("");
  49. });
  50. $("#p_dept_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_dept_cd").val("");$("#p_dept_nm").val("");}});
  51. $("#P_BID_MASTER_NM").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  52. $("#btnSearch").click();
  53. }
  54. /**
  55. * IBSheet object initialize
  56. */
  57. function gridInit(sheetName){
  58. var init_sheet = {};
  59. init_sheet.Cfg = {SearchMode:2, Page:30};
  60. init_sheet.Cols = [
  61. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  62. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  63. {Header:'No.', Type:"Seq", SaveName:"NO", Width:40, Align:"Center", Hidden:"True"},
  64. {Header:'입찰번호', Type:"Text", SaveName:"BID_NO", Width:120, Align:"Center"},
  65. {Header:'차수', Type:"Text", SaveName:"BID_DEG", Width:30, Align:"Center"},
  66. {Header:'현장코드', Type:"Text", SaveName:"DEPT_CD", Width:120, Align:"Left", Hidden:"True"},
  67. {Header:'현장', Type:"Text", SaveName:"DEPT_NM", Width:150, Align:"Left"},
  68. {Header:'☞입찰공고명', Type:"Text", SaveName:"BID_MASTER_NM", Width:150, Align:"Left", Cursor:"pointer"},
  69. {Header:'견적제출마감일시', Type:"Text", SaveName:"BID_TO_DT", Width:100, Align:"Center"},
  70. {Header:'개찰일시', Type:"Text", SaveName:"OPEN_DT", Width:100, Align:"Center"},
  71. {Header:'개찰자', Type:"Text", SaveName:"OPEN_EMPNM", Width:100, Align:"Center"},
  72. {Header:'DEMANDED_ID', Type:"Text", SaveName:"DEMANDED_ID", Width:100, Align:"Center", Hidden:"True"},
  73. {Header:'개찰자ID', Type:"Text", SaveName:"OPEN_EMPID", Width:100, Align:"Center", Hidden:"True"},
  74. {Header:'POSTPONE_REASON', Type:"Text", SaveName:"POSTPONE_REASON", Width:100, Align:"Center", Hidden:"True"}
  75. ];
  76. init_sheet.HeaderMode = {Sort:1};
  77. IBS_InitSheet(sheetName, init_sheet);
  78. sheetName.SetDataAutoTrim(0);
  79. sheetName.SetEditable(false);
  80. sheetName.SetActionMenu("ExcelDown");
  81. setGridSize();
  82. }
  83. function sheet1_OnSelectMenu(Text, Code) {
  84. // text 또는 code값으로 Action수행
  85. switch(Text) {
  86. case "ExcelDown":
  87. sheetExcelDown(sheet1,$('li').html());
  88. break;
  89. }
  90. }
  91. function searchSiteClose(result) {
  92. if( result == null ){
  93. $("#p_dept_nm").val("");
  94. $("#p_dept_cd").val("");
  95. }else{
  96. $("#p_dept_nm").val(result[1]);
  97. $("#p_dept_cd").val(result[0]);
  98. }
  99. setTimeout(function(){fLayerPopClose('_searchSite'); },100);
  100. }
  101. /**
  102. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  103. */
  104. function sheet1_OnSearchEnd(code, message) {
  105. if(code == 0) {
  106. setGridSize();
  107. sheet1.SetColFontColor("BID_MASTER_NM", "#0000ff");
  108. } else {
  109. //조회 에러 수행
  110. alert(message);
  111. }
  112. }
  113. /**
  114. * IBSheet size setting
  115. */
  116. function setGridSize() {
  117. sheet1.FitColWidth();
  118. }
  119. /**
  120. * IBSheet Event: DBLCLICK
  121. */
  122. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  123. if(Row == 0)return;
  124. if (Col == 7) {
  125. var status = sheet1.GetCellValue(Row,8);
  126. $("#BID_DEG").val(sheet1.GetCellValue(Row, "BID_DEG"));
  127. $("#BID_NO").val(sheet1.GetCellValue(Row, "BID_NO"));
  128. $("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
  129. $("#fevent").val("FORM_SELECT");
  130. $("#form1").attr("action", "/bid/purchase/BidOpen.screen");
  131. $("#form1").attr("target", "_self");
  132. $("#form1").attr("method", "post");
  133. $("#form1").submit();
  134. }
  135. }
  136. function sheet1_OnSmartResize(Width, Height) {
  137. sheet1.FitColWidth();
  138. autoResize();
  139. }
  140. function autoResize(){
  141. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  142. var iframeHeight= document.body.scrollHeight - t1_height;
  143. var iframeWidth= document.body.scrollWidth;
  144. sheet1.SetSheetHeight(iframeHeight);
  145. }
  146. </SCRIPT>
  147. <modular:search id="form1">
  148. <modular:key id="fevent" />
  149. </modular:search>
  150. <form id="form1" name="form1" method="post" modular:type="search">
  151. <TABLE id="t1" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  152. <INPUT type="hidden" name="p_user_sabun" value="">
  153. <INPUT type="hidden" name="fevent" id="fevent" value="">
  154. <INPUT type="hidden" name="BID_NO" value="">
  155. <INPUT type="hidden" name="BID_DEG" value="">
  156. <INPUT type="hidden" name="DEMANDED_ID" value="">
  157. <div align="left" id="title" >
  158. <ul><li>구매_견적서개찰</li></ul>
  159. </div>
  160. <!-- 검색조건 영역 : 시작 -->
  161. <TR><TD height="1">
  162. <!-- 검색조건 영역 : 시작 -->
  163. <TR><TD height="1">
  164. <!-- 검색조건 시작 -->
  165. <table id="search-table" class="search-form-table" >
  166. <colgroup>
  167. <col width="100" />
  168. <col width="40%"/>
  169. <col width="100" />
  170. <col/>
  171. <col width="150" />
  172. </colgroup>
  173. <tr>
  174. <th>현장</th>
  175. <td>
  176. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  177. </td>
  178. <th>입찰공고명</th>
  179. <td>
  180. <%= InputText.get("P_BID_MASTER_NM", params.get("P_BID_MASTER_NM"), 80, 50, "hangule, desc=입찰공고명, PerSize") %>
  181. </td>
  182. <td class="button" >
  183. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  184. <span class="btnSearch center" id="btnExcel"><a href="javascript:sheetExcelDown(sheet1,$('li').html());">ExcelDown</a></span>
  185. </td>
  186. </tr>
  187. </table>
  188. </TD></TR>
  189. <!-- 검색조건 영역 : 종료 -->
  190. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  191. <TR><TD height="1">
  192. <TABLE border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  193. <TR><TD></TD></TR>
  194. </TABLE>
  195. </TD></TR>
  196. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  197. </TABLE>
  198. <div id="sheet1_div" style="padding-top:5px;height: auto; min-height: 400px; overflow: auto;">
  199. <script>createIBSheet('sheet1','100%', '400px');</script>
  200. </div>
  201. </FORM>