dlgSearchUserPop.jsp 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <%--
  2. - FileName : dlgSearchUserPop.jsp
  3. - Author(s) : gyeongmo an
  4. - Date : 2014-06-30
  5. - Copyright : Copyright (c) 2014 www.udapsoft.co.kr, Inc.
  6. -
  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.udapsoft.common.code.*" %>
  13. <%@ page import="kr.co.hsnc.common.util.*"%>
  14. <%@ page import="kr.co.hsnc.common.sql.*" %>
  15. <%@ page import="kr.co.hsnc.common.sql.RowSet" %>
  16. <%@ page import="kr.co.hsnc.common.util.ValueObject" %>
  17. <%@ page import="com.udapsoft.waf.system.*" %>
  18. <%@ page import="com.udapsoft.waf.common.*" %>
  19. <%@ page import="kr.co.udapsoft.common.*" %>
  20. <%@ page import="com.udapsoft.waf.common.ui.HTMLMaker" %>
  21. <%@ include file="/jsp/work/taglib.jsp" %>
  22. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  23. <%
  24. ctx.init(request, response);
  25. ValueObject user = null;
  26. user = ctx.getUser();
  27. ValueObject params = ctx.getParams();
  28. HandlerStorage storage = ctx.getHandlerStorage();
  29. String GB = (String) storage.get("GB");
  30. String CODE = (String) storage.get("CODE");
  31. String NAME = (String) storage.get("NAME");
  32. String deptNameYn = (String) storage.get("deptNameYn");
  33. if("purchase".equals(deptNameYn)){
  34. deptNameYn = "구매팀";
  35. }else if("outside".equals(deptNameYn)){
  36. deptNameYn = "외주팀";
  37. }else{
  38. deptNameYn = "";
  39. }
  40. request.setCharacterEncoding("utf-8");
  41. %>
  42. <SCRIPT language="JavaScript">
  43. /*예약함수*/
  44. var sheet1;
  45. var sheet1Row;
  46. var sheet1PageNo = 1;
  47. var pageLastRowIndex = 1;
  48. var validationResult = false;
  49. var filterShow = false;
  50. var argObj = window.dialogArguments;
  51. function _onReady(){
  52. gridInit(sheet1);
  53. jQuery("#btnSearch").click(function() {
  54. jQuery("#fevent").val("SearchUserPop");
  55. var url = Modular.model.PageContext.CONTEXT_ROOT + "dlgSearchUserPop_sheet.screen";
  56. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  57. });
  58. jQuery("#btnClose").click(function() {
  59. setTimeout(function(){parent.SearchUserClose(null);},100);
  60. });
  61. //jQuery("#btnSearch").click();
  62. }
  63. function gridInit(sheetName){
  64. var init_sheet = {};
  65. init_sheet.Cfg = {SearchMode:2, Page:30};
  66. init_sheet.Cols = [
  67. {Header:'계정ID', Type:"Text", SaveName:"ACCT_ID", Width:0, Align:"Center", Hidden:"True"},
  68. {Header:'사번', Type:"Text", SaveName:"USER_SABUN", Width:30, Align:"Center"},
  69. {Header:'권한구분', Type:"Text", SaveName:"RIGHT_GB", Width:0, Align:"Left", Hidden:"True"},
  70. {Header:'담당업무', Type:"Text", SaveName:"JOB_DSCR", Width:0, Align:"Left", Hidden:"True"},
  71. {Header:'ACCT_TYPE_ID', Type:"Text", SaveName:"ACCT_TYPE_ID", Width:0, Align:"Left", Hidden:"True"},
  72. {Header:'퇴사일자', Type:"Text", SaveName:"INACTIVE_DATE", Width:0, Align:"Left", Hidden:"True"},
  73. {Header:'이름', Type:"Text", SaveName:"USER_NAME", Width:20, Align:"Center"},
  74. {Header:'직책코드', Type:"Text", SaveName:"POSITION_CODE", Width:0, Align:"Center", Hidden:"True"},
  75. {Header:'직책명', Type:"Text", SaveName:"POSITION_NAME", Width:0, Align:"Left", Hidden:"True"},
  76. {Header:'부서코드', Type:"Text", SaveName:"BUSEO", Width:30, Align:"Center", Hidden:"True"},
  77. {Header:'부서명', Type:"Text", SaveName:"BUSEO_NAME", Width:40, Align:"Left"},
  78. {Header:'겸직현장1', Type:"Text", SaveName:"DSO1", Width:0, Align:"Left", Hidden:"True"},
  79. {Header:'겸직현장2', Type:"Text", SaveName:"DSO2", Width:0, Align:"Left", Hidden:"True"},
  80. {Header:'현장', Type:"Text", SaveName:"PSOSO", Width:0, Align:"Left", Hidden:"True"},
  81. {Header:'근무구분', Type:"Text", SaveName:"DUTYC", Width:0, Align:"Left", Hidden:"True"},
  82. {Header:'직위코드', Type:"Text", SaveName:"GRADE_CODE", Width:0, Align:"Left", Hidden:"True"},
  83. {Header:'직위명', Type:"Text", SaveName:"GRADE_NAME", Width:20, Align:"Center"},
  84. {Header:'전화번호', Type:"Text", SaveName:"TEL_NO", Width:30, Align:"Center"},
  85. {Header:'휴대폰번호', Type:"Text", SaveName:"HAND_TEL_NO", Width:30, Align:"Center"},
  86. {Header:'이메일주소', Type:"Text", SaveName:"E_MAIL", Width:40, Align:"Left"}
  87. ];
  88. init_sheet.HeaderMode = {Sort:1};
  89. IBS_InitSheet(sheetName, init_sheet);
  90. sheetName.SetDataAutoTrim(0);
  91. sheetName.SetEditable(false);
  92. setGridSize();
  93. }
  94. function autoResize(){
  95. var t1_height = document.getElementById("search-table").scrollHeight + 10;
  96. var iframeHeight= document.body.scrollHeight - t1_height;
  97. var iframeWidth = document.body.scrollWidth;
  98. sheet1.SetSheetHeight(iframeHeight);
  99. //sheet1.SetSheetWidth(iframeWidth);
  100. }
  101. function setGridSize() {
  102. sheet1.FitColWidth();
  103. }
  104. function sheet1_OnSearchEnd(code, message) {
  105. if(code == 0) {
  106. setGridSize();
  107. } else {
  108. //조회 에러 수행
  109. //alert(message);
  110. alert("조회 실패");
  111. }
  112. }
  113. function prcKeyPress()
  114. {
  115. if( event.keyCode == 13 )
  116. {
  117. jQuery("#btnSearch").click();
  118. }
  119. }
  120. //키처리
  121. document.onkeydown = function(){
  122. //F5 새로고침
  123. if(event.keyCode == "13"){
  124. jQuery("#btnSearch").click();
  125. }
  126. //ESC 창닫기
  127. if(event.keyCode == "27"){
  128. window.close();
  129. }
  130. }
  131. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  132. if(Row == 0)return;
  133. var retArray = new Array();
  134. if("<%=CODE%>".length > 0){
  135. parent.$("#"+"<%=CODE%>").val(sheet1.GetCellValue(Row, "ACCT_ID"));
  136. parent.$("#"+"<%=NAME%>").val(sheet1.GetCellValue(Row, "USER_NAME"));
  137. }else{
  138. retArray[0] = sheet1.GetCellValue(Row, "USER_SABUN"); // 사번
  139. retArray[1] = sheet1.GetCellValue(Row, "USER_NAME"); // 이름
  140. retArray[2] = sheet1.GetCellValue(Row, "BUSEO"); // 부서코드
  141. retArray[3] = sheet1.GetCellValue(Row, "BUSEO_NAME"); // 부서
  142. retArray[4] = sheet1.GetCellValue(Row, "GRADE_CODE"); // 직위코드
  143. retArray[5] = sheet1.GetCellValue(Row, "GRADE_NAME"); // 직위
  144. retArray[6] = sheet1.GetCellValue(Row, "TEL_NO"); // 일반전화
  145. retArray[7] = sheet1.GetCellValue(Row, "HAND_TEL_NO"); // 휴대폰번호
  146. retArray[8] = sheet1.GetCellValue(Row, "E_MAIL"); // 이메일
  147. retArray[9] = sheet1.GetCellValue(Row, "ACCT_ID"); // ACCT_ID
  148. retArray[10] = "<%=GB%>"; // 입력구분
  149. }
  150. setTimeout(function(){parent.SearchUserClose(retArray);},100);
  151. }
  152. </SCRIPT>
  153. <modular:search id="form1">
  154. <modular:key id="fevent" />
  155. </modular:search>
  156. <BODY onresize="autoResize()" >
  157. <form id="form1" name="form1" method="post" modular:type="search" style="width:100%;height:100%;">
  158. <INPUT type="hidden" name="fevent" id="fevent" value="">
  159. <!-- 검색조건 시작 -->
  160. <table id="search-table" class="search-form-table">
  161. <colgroup>
  162. <col width="100" />
  163. <col width="230" />
  164. <col width="100" />
  165. <col width="*" />
  166. <col width="150" />
  167. </colgroup>
  168. <tr>
  169. <th>부서명</th>
  170. <td>
  171. <%if(deptNameYn =="") { %>
  172. <%=InputText.get("S_DEPT_NAME", "", 30, 20, "hangule, required")%>
  173. <%} else { %>
  174. <%=InputText.get("S_DEPT_NAME", deptNameYn, 30, 20, "hangule, required, readOnly")%>
  175. <%} %>
  176. </td>
  177. <th>사용자명</th>
  178. <td>
  179. <%=InputText.get("S_NAME", "", 30, 20, "hangule, required")%>
  180. </td>
  181. <td class="button" rowspan="2">
  182. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  183. <!-- <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span> -->
  184. </td>
  185. </tr>
  186. </table>
  187. <!-- 검색조건 종료 -->
  188. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 350px; overflow: auto;">
  189. <script>createIBSheet('sheet1','100%', '350px');</script>
  190. </div>
  191. </FORM>
  192. </body>