dlgSearchAccDept.jsp_back 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <%--
  2. - FileName : dlgSearchAccDept.jsp
  3. - Author(s) : gyeongmo an
  4. - Date : 2014.06.22
  5. - Description: 부서 검색
  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. %>
  24. <SCRIPT language="JavaScript">
  25. var sheet1;
  26. var sheet1Row;
  27. var sheet1PageNo = 1;
  28. var pageLastRowIndex = 1;
  29. var validationResult = false;
  30. var filterShow = false;
  31. // 마지막으로 선택된 행의 번호를 기억하고 있음
  32. var CurMasterRow = 0;
  33. function _onReady(){
  34. gridInit(sheet1);
  35. jQuery("#btnSearch").click(function() {
  36. jQuery("#fevent").val("GET_DEPT_LIST");
  37. var url = Modular.model.PageContext.CONTEXT_ROOT + "/lib/dlgSearchAccDept_sheet.screen";
  38. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  39. //마지막으로 선택된 행이 없음
  40. CurMasterRow= 0;
  41. });
  42. jQuery("#btnClose").click(function() {
  43. parent.searchAccDeptClose(null);
  44. });
  45. jQuery("#btnSearch").click();
  46. }
  47. function gridInit(sheetName){
  48. var init_sheet = {};
  49. init_sheet.Cfg = {SearchMode:2, Page:30};
  50. init_sheet.Cols = [
  51. {Header:'부서코드', Type:"Text", SaveName:"ACC_DEPT_CD", Width:100, Align:"Left", Edit:"false"},
  52. {Header:'부서명', Type:"Text", SaveName:"DEPT_NM", Width:150, Align:"Left", Edit:"false"},
  53. ];
  54. init_sheet.HeaderMode = {Sort:1};
  55. IBS_InitSheet(sheetName, init_sheet);
  56. sheetName.SetDataAutoTrim(0);
  57. setGridSize();
  58. }
  59. function setGridSize() {
  60. sheet1.FitColWidth();
  61. }
  62. /**
  63. * enter click 시 자동으로 검색이되도록 조
  64. */
  65. function check_Enter(){
  66. if (event.keyCode==13)
  67. jQuery("#btnSearch").click();
  68. }
  69. function sheet1_OnSearchEnd(code, message) {
  70. if(code == 0) {
  71. setGridSize();
  72. } else {
  73. //조회 에러 수행
  74. alert(message);
  75. }
  76. }
  77. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  78. returnValue = new Array(sheet1.GetCellValue(Row, 0),sheet1.GetCellValue(Row, 1));
  79. parent.searchAccDeptClose(returnValue);
  80. }
  81. function sheet1_OnSmartResize(Width, Height) {
  82. sheet1.FitColWidth();
  83. autoResize();
  84. }
  85. function autoResize(){
  86. var t1_height = document.getElementById("t1").scrollHeight + 10;
  87. var iframeHeight= document.body.scrollHeight - t1_height;
  88. var iframeWidth= document.body.scrollWidth;
  89. sheet1.SetSheetHeight(iframeHeight);
  90. }
  91. document.onkeydown = closePopupWindow;
  92. </SCRIPT>
  93. <modular:search id="form1">
  94. <modular:key id="fevent" />
  95. </modular:search>
  96. <!-- <BODY onresize="autoResize()" > -->
  97. <FORM id="form1" name="form1" method="post" modular:type="search">
  98. <INPUT type="hidden" name="fevent" id="fevent" value="">
  99. <div align="left" id="title">
  100. <ul>
  101. <li>부서 검색 팝업</li>
  102. </ul>
  103. </div>
  104. <!-- 검색조건 시작 -->
  105. <table id="search-table" class="search-form-table">
  106. <colgroup>
  107. <col width="150" />
  108. <col width="250" />
  109. <col width="*" />
  110. </colgroup>
  111. <tr>
  112. <th>부서코드</th>
  113. <td>
  114. <input type="text" id="deptCd" name="deptCd" size="10" maxsize="10" style="width:96%;" class="input" onKeyDown="check_Enter();" />
  115. </td>
  116. <td class="button" rowspan="2">
  117. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  118. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  119. </td>
  120. </tr>
  121. <tr>
  122. <th>부서명</th>
  123. <td>
  124. <input type="text" id="deptNm" name="deptNm" value="" style="width:96%;" class="input" onKeyDown="check_Enter();"/>
  125. </td>
  126. </tr>
  127. </table>
  128. <!-- 검색조건 종료 -->
  129. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 300px; overflow: auto;">
  130. <script>createIBSheet('sheet1','100%', '300px');</script>
  131. </div>
  132. </form>
  133. <!-- </BODY> -->