dlgSearchUser.jsp 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <%--
  2. - FileName : dlgSearchUser.jsp
  3. - Author(s) : gyeongmo an
  4. - Date : 2014.06.18
  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.common.ui.*" %>
  11. <%@ page import="kr.co.udapsoft.common.code.*" %>
  12. <%@ page import="kr.co.hsnc.common.util.*"%>
  13. <%@ include file="/jsp/work/taglib.jsp" %>
  14. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  15. <%
  16. String event = request.getParameter("fevent");
  17. %>
  18. <SCRIPT language="JavaScript">
  19. /*예약함수*/
  20. var sheet1;
  21. var sheet1Row;
  22. var sheet1PageNo = 1;
  23. var pageLastRowIndex = 1;
  24. var validationResult = false;
  25. var filterShow = false;
  26. function _onReady(){
  27. gridInit(sheet1);
  28. jQuery("#btnSearch").click(function() {
  29. var f = document.form1;
  30. if(f.user_sabun.value == "" && f.user_name.value == "") {
  31. alert("이름 혹은 사번을 입력해 주세요.");
  32. return;
  33. } else {
  34. jQuery("#fevent").val("GET_USER_LIST");
  35. var url = Modular.model.PageContext.CONTEXT_ROOT + "/sycs/user/dlgSearchUser_sheet.screen";
  36. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  37. }
  38. });
  39. jQuery("#btnClose").click(function() {
  40. setTimeout(function(){parent.searchInsaUserClose(null);},100);
  41. });
  42. }
  43. function gridInit(sheetName){
  44. var init_sheet = {};
  45. init_sheet.Cfg = {SearchMode:2, Page:30};
  46. init_sheet.Cols = [
  47. {Header:'번호', Type:"Seq", SaveName:"NO", Width:30, Align:"Center", Edit:"false"},
  48. {Header:'상태', Type:"Status", SaveName:"STATUS", Width:80, Align:"Center", Hidden:"True"},
  49. {Header:'사원번호', Type:"Text", SaveName:"user_sabun", Width:80, Align:"Center", Edit:"false"},
  50. {Header:'이름', Type:"Text", SaveName:"user_name", Width:80, Align:"Center", Edit:"false" },
  51. {Header:'현장코드', Type:"Text", SaveName:"site_cd", Width:0, Align:"Center", Hidden:"True"},
  52. {Header:'현장', Type:"Text", SaveName:"site_name", Width:110, Align:"Left", Edit:"false" },
  53. {Header:'직위코드', Type:"Text", SaveName:"position_code", Width:0, Align:"Center", Hidden:"True" },
  54. {Header:'직위', Type:"Text", SaveName:"position_name", Width:80, Align:"Center", Edit:"false" },
  55. {Header:'전화번호', Type:"Text", SaveName:"tel_no", Width:0, Align:"Center", Hidden:"True" },
  56. {Header:'휴대폰번호', Type:"Text", SaveName:"hand_tel_no", Width:0, Align:"Center", Hidden:"True"},
  57. {Header:'주민번호', Type:"Text", SaveName:"jumin", Width:0, Align:"Center", Hidden:"True"},
  58. {Header:'계정ID', Type:"Text", SaveName:"acct_id", Width:0, Align:"Center", Hidden:"True"},
  59. {Header:'근무구분', Type:"Text", SaveName:"cutyc", Width:0, Align:"Center", Hidden:"True"},
  60. {Header:'현장약어', Type:"Text", SaveName:"dept_ini", Width:0, Align:"Center", Hidden:"True"},
  61. {Header:'체크여부', Type:"Text", SaveName:"ischeck", Width:0, Align:"Center", Hidden:"True"},
  62. {Header:'E-mail', Type:"Text", SaveName:"email", Width:0, Align:"Center", Hidden:"True"},
  63. {Header:'부서코드', Type:"Text", SaveName:"dept_code", Width:0, Align:"Center", Hidden:"True"},
  64. {Header:'부서', Type:"Text", SaveName:"dept_name", Width:0, Align:"Center", Hidden:"True"}
  65. ];
  66. init_sheet.HeaderMode = {Sort:1};
  67. IBS_InitSheet(sheetName, init_sheet);
  68. sheetName.SetDataAutoTrim(0);
  69. setGridSize();
  70. }
  71. function setGridSize() {
  72. sheet1.FitColWidth();
  73. }
  74. function sheet1_OnSearchEnd(code, message) {
  75. if(code == 0) {
  76. setGridSize();
  77. } else {
  78. alert(message);
  79. }
  80. }
  81. function doKeyPress() {
  82. if( event.keyCode == 13 ) {
  83. jQuery("#btnSearch").click();
  84. }
  85. }
  86. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  87. var isExist = sheet1.GetCellValue(Row,14);
  88. if (isExist == 0){
  89. var user_sabun, user_name, site_cd, site_nm, position_code, position_name, tel_no, hand_tel_no, email, acc_id, dept_code, dept_name;
  90. user_sabun = sheet1.GetCellValue(Row, "user_sabun");
  91. user_name = sheet1.GetCellValue(Row, "user_name");
  92. site_cd = sheet1.GetCellValue(Row, "site_cd");
  93. site_nm = sheet1.GetCellValue(Row, "site_name");
  94. position_code = sheet1.GetCellValue(Row, "position_code");
  95. position_name = sheet1.GetCellValue(Row, "position_name");
  96. tel_no = sheet1.GetCellValue(Row, "tel_no");
  97. hand_tel_no = sheet1.GetCellValue(Row, "hand_tel_no");
  98. email = sheet1.GetCellValue(Row, "email");
  99. acc_id = sheet1.GetCellValue(Row, "acct_id");
  100. dept_code = sheet1.GetCellValue(Row, "dept_code");
  101. dept_name = sheet1.GetCellValue(Row, "dept_name");
  102. returnValue = new Array(user_sabun, user_name, site_cd, site_nm, position_code, position_name, tel_no, hand_tel_no, email, acc_id, dept_code, dept_name);
  103. setTimeout(function(){parent.searchInsaUserClose(returnValue);},100);
  104. }else{
  105. alert("이미 등록된 유저 입니다.");
  106. }
  107. }
  108. function sheet1_OnSmartResize(Width, Height) {
  109. sheet1.FitColWidth();
  110. autoResize();
  111. }
  112. function autoResize(){
  113. var t1_height = document.getElementById("search-table").scrollHeight + 10;
  114. var iframeHeight= document.body.scrollHeight - t1_height;
  115. sheet1.SetSheetHeight(iframeHeight);
  116. }
  117. document.body.onresize = addEvent( document.body.onresize, "setGridSize()");
  118. </SCRIPT>
  119. <modular:search id="form1">
  120. <modular:key id="fevent" />
  121. </modular:search>
  122. <BODY onresize="autoResize()" >
  123. <FORM id="form1" name="form1" method="post" modular:type="search">
  124. <INPUT type="hidden" name="fevent" id="fevent" value="">
  125. <INPUT type="hidden" name="acct_id" value="">
  126. <!-- 검색조건 시작 -->
  127. <table id="search-table" class="search-form-table">
  128. <colgroup>
  129. <col width="100" />
  130. <col width="250" />
  131. <col width="100" />
  132. <col width="250" />
  133. <col width="200" />
  134. </colgroup>
  135. <tr>
  136. <th>이름</th>
  137. <td>
  138. <%= InputText.get("user_name", "", 70, 10, "ID,PerSize") %>
  139. </td>
  140. <th>사원번호</th>
  141. <td>
  142. <%= InputText.get("user_sabun", "", 70, 10, "ID,PerSize") %>
  143. </td>
  144. <td class="button" rowspan="2">
  145. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  146. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  147. </td>
  148. </tr>
  149. </table>
  150. <!-- 검색조건 종료 -->
  151. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 450px; overflow: auto;">
  152. <script>createIBSheet('sheet1','100%', '450px');</script>
  153. </div>
  154. </body>