dlgSearchAccDept.jsp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. autoResize();
  36. jQuery("#btnSearch").click(function() {
  37. jQuery("#fevent").val("GET_DEPT_LIST");
  38. jQuery("#deadflg").val(jQuery(':radio[name="r_deadflg"]:checked').val());
  39. var url = Modular.model.PageContext.CONTEXT_ROOT + "/lib/dlgSearchAccDept_sheet.screen";
  40. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  41. //마지막으로 선택된 행이 없음
  42. CurMasterRow= 0;
  43. });
  44. jQuery("#btnClose").click(function() {
  45. setTimeout(function(){parent.searchAccDeptClose(null);},100);
  46. });
  47. jQuery("#btnSearch").click();
  48. }
  49. function gridInit(sheetName){
  50. var init_sheet = {};
  51. init_sheet.Cfg = {SearchMode:2, Page:30};
  52. init_sheet.Cols = [
  53. {Header:'부서코드', Type:"Text", SaveName:"DEPT_HR_CD", Width:100, Align:"Left", Edit:"false"},
  54. {Header:'부서명', Type:"Text", SaveName:"DEPT_NM", Width:150, Align:"Left", Edit:"false"},
  55. ];
  56. init_sheet.HeaderMode = {Sort:1};
  57. IBS_InitSheet(sheetName, init_sheet);
  58. sheetName.SetDataAutoTrim(0);
  59. setGridSize();
  60. }
  61. function setGridSize() {
  62. sheet1.FitColWidth();
  63. }
  64. function sheet1_OnSearchEnd(code, message) {
  65. if(code == 0) {
  66. setGridSize();
  67. } else {
  68. //조회 에러 수행
  69. alert(message);
  70. }
  71. }
  72. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  73. returnValue = new Array(sheet1.GetCellValue(Row, 0),sheet1.GetCellValue(Row, 1));
  74. setTimeout(function(){parent.searchAccDeptClose(returnValue);},100);
  75. }
  76. function sheet1_OnSmartResize(Width, Height) {
  77. sheet1.FitColWidth();
  78. autoResize();
  79. }
  80. /**
  81. * enter click 시 자동으로 검색이되도록 조
  82. */
  83. function check_Enter(){
  84. if (event.keyCode==13)
  85. jQuery("#btnSearch").click();
  86. }
  87. function doSearch(){
  88. jQuery("#btnSearch").click();
  89. }
  90. function autoResize(){
  91. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title_pop").scrollHeight + 20;
  92. var iframeHeight= document.body.scrollHeight - t1_height;
  93. var iframeWidth= document.body.scrollWidth;
  94. sheet1.SetSheetHeight(iframeHeight);
  95. }
  96. document.onkeydown = closePopupWindow;
  97. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  98. </SCRIPT>
  99. <modular:search id="form1">
  100. <modular:key id="fevent" />
  101. </modular:search>
  102. <!-- <BODY onresize="autoResize()" > -->
  103. <FORM id="form1" name="form1" method="post" modular:type="search">
  104. <INPUT type="hidden" name="fevent" id="fevent" value="">
  105. <INPUT type="hidden" name="deadflg" id="deadflg" value="">
  106. <!-- 검색조건 시작 -->
  107. <table id="search-table" class="search-form-table">
  108. <colgroup>
  109. <col width="150" />
  110. <col width="250" />
  111. <col width="*" />
  112. </colgroup>
  113. <tr>
  114. <th>부서명</th>
  115. <td>
  116. <input type="text" id="deptNm" name="deptNm" value="" style="width:96%;" class="input" onKeyDown="check_Enter();"/>
  117. </td>
  118. <td class="button" rowspan="2">
  119. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  120. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  121. </td>
  122. </tr>
  123. <tr>
  124. <th>사용구분</th>
  125. <td>
  126. <LABEL for="deadflg_0"><INPUT id="deadflg_0" type="radio" name="r_deadflg" value="" onClick="doSearch();">전체</LABEL>
  127. <LABEL for="deadflg_1"><INPUT id="deadflg_1" type="radio" name="r_deadflg" value="Y" onClick="doSearch();" checked>사용</LABEL>
  128. <LABEL for="deadflg_2"><INPUT id="deadflg_2" type="radio" name="r_deadflg" value="N" onClick="doSearch();">미사용</LABEL>
  129. </td>
  130. </tr>
  131. </table>
  132. <!-- 검색조건 종료 -->
  133. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 330px; overflow: auto;">
  134. <script>createIBSheet('sheet1','100%', '330px');</script>
  135. </div>
  136. </form>
  137. <!-- </BODY> -->