dlgCodePopup.jsp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <%--
  2. - FileName : dlgCodePopup.jsp
  3. - Author(s) : Kim Myung HO
  4. - Date : 2014.10.02
  5. - Description: Sub 코드 검색
  6. --%>
  7. <%@ page contentType="text/html; charset=utf-8" %>
  8. <%@ page import="kr.co.hsnc.common.sql.RowSet" %>
  9. <%@ page import="kr.co.hsnc.common.util.ValueObject" %>
  10. <%@ page import="com.udapsoft.waf.system.*" %>
  11. <%@ page import="com.udapsoft.waf.common.*" %>
  12. <%@ page import="kr.co.udapsoft.common.*" %>
  13. <%@ page import="com.udapsoft.waf.common.ui.HTMLMaker" %>
  14. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  15. <%@ include file="/jsp/work/taglib.jsp" %>
  16. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  17. <%
  18. ctx.init(request, response);
  19. HandlerStorage storage = ctx.getHandlerStorage();
  20. ValueObject user = ctx.getUser();
  21. ValueObject params = storage.getParams();
  22. String event = storage.getEvent();
  23. String search_yn = params.get("p_search");
  24. %>
  25. <SCRIPT language="JavaScript">
  26. var sheet2;
  27. var sheet2Row;
  28. var sheet2PageNo = 1;
  29. var pageLastRowIndex = 1;
  30. var validationResult = false;
  31. var filterShow = false;
  32. // 마지막으로 선택된 행의 번호를 기억하고 있음
  33. var CurMasterRow = 0;
  34. function _onReady(){
  35. gridInit(sheet2);
  36. init_menu();
  37. autoResize();
  38. jQuery("#btnSearch").click(function() {
  39. jQuery("#fevent").val("GET_STANDARDCODEDETAIL_LIST");
  40. var url = Modular.model.PageContext.CONTEXT_ROOT + "/sycs/code/SYSInputStandardCodeListDetail_sheet.screen";
  41. Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 30, "");
  42. //마지막으로 선택된 행이 없음
  43. CurMasterRow= 0;
  44. });
  45. jQuery("#btnClose").click(function() {
  46. setTimeout(function(){parent.SearchPayItemClose(null);},100);
  47. });
  48. jQuery("#btnSearch").click();
  49. }
  50. function gridInit(sheetName){
  51. var init_sheet = {};
  52. init_sheet.Cfg = {SearchMode:2, Page:30};
  53. init_sheet.Cols = [
  54. {Header:'내역코드', Type:"Text", SaveName:"DETAILCD", Width:80, Align:"Center", Edit:"false"},
  55. {Header:'내역코드명', Type:"Text", SaveName:"DETAILNM", Width:200, Align:"Left", Edit:"false"},
  56. {Header:'기본코드', Type:"Text", SaveName:"BASECD", Width:200, Align:"Left", Edit:"false" , Hidden:"True"}
  57. ];
  58. init_sheet.HeaderMode = {Sort:1};
  59. IBS_InitSheet(sheetName, init_sheet);
  60. sheetName.SetDataAutoTrim(0);
  61. setGridSize();
  62. }
  63. function setGridSize() {
  64. sheet2.FitColWidth();
  65. }
  66. function sheet2_OnSearchEnd(code, message) {
  67. if(code == 0) {
  68. setGridSize();
  69. } else {
  70. //조회 에러 수행
  71. alert(message);
  72. }
  73. }
  74. function sheet2_OnLoad(){
  75. jQuery("#fevent").val("GET_STANDARDCODEDETAIL_LIST");
  76. var url = Modular.model.PageContext.CONTEXT_ROOT + "/sycs/code/SYSInputStandardCodeListDetail_sheet.screen";
  77. Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 30, "");
  78. }
  79. function sheet2_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  80. returnValue = new Array(sheet2.GetCellValue(Row, 0),sheet2.GetCellValue(Row, 1),sheet2.GetCellValue(Row, 2));
  81. setTimeout(function(){parent.SearchCodeDetailClose(returnValue);},100);
  82. }
  83. function sheet2_OnSmartResize(Width, Height) {
  84. sheet2.FitColWidth();
  85. autoResize();
  86. }
  87. /**
  88. * enter click 시 자동으로 검색이되도록 조
  89. */
  90. function check_Enter(){
  91. if (event.keyCode==13)
  92. jQuery("#btnSearch").click();
  93. }
  94. function autoResize(){
  95. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title_pop").scrollHeight + 20;
  96. var iframeHeight= document.body.scrollHeight - t1_height;
  97. var iframeWidth= document.body.scrollWidth;
  98. sheet2.SetSheetHeight(iframeHeight);
  99. }
  100. function init_menu(){
  101. <%if(params.get("p_search").equals("Y") ){ %>
  102. <%}else{%>
  103. document.getElementById("search-table").style.display = "none";
  104. <%}%>
  105. }
  106. document.onkeydown = closePopupWindow;
  107. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  108. </SCRIPT>
  109. <modular:search id="form1">
  110. <modular:key id="fevent" />
  111. </modular:search>
  112. <!-- <BODY onresize="autoResize()" > -->
  113. <FORM id="form1" name="form1" method="post" modular:type="search">
  114. <INPUT type="hidden" name="fevent" id="fevent" value="">
  115. <INPUT type="hidden" name="p_basecd" value="<%=params.get("p_basecd")%>" />
  116. <INPUT type="hidden" name="p_search" value="<%=params.get("p_search")%>" />
  117. <table id="search-table" class="search-form-table">
  118. <colgroup>
  119. <col width="100" />
  120. <col width="250" />
  121. <col width="100" />
  122. <col width="130" />
  123. <col width="*" />
  124. </colgroup>
  125. <tr>
  126. <TH>코드명</TH>
  127. <td>
  128. <INPUT type="text" name="DETAILNM" class="input" value="<%=params.get("DETAILNM") %>" style="width:90%">
  129. </td>
  130. <TH>구분</TH>
  131. <TD>
  132. <SELECT class='input_select' id='CHG_CODE01' name='CHG_CODE01' style='width:80px;' ><option value=''>--전체--</option><OPTION value='C'>토건</OPTION><OPTION value='P'>플랜트</OPTION> </SELECT>
  133. </TD>
  134. <td class="button">
  135. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  136. </td>
  137. </tr>
  138. </table>
  139. <!-- 검색조건 종료 -->
  140. <div id="sheet2_div" style="padding-top:5px; height: auto; min-height: 330px; overflow: auto;">
  141. <script>createIBSheet('sheet2','100%', '330px');</script>
  142. </div>
  143. </form>
  144. <!-- </BODY> -->