TestList.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <%--
  2. - FileName : UserList.jsp
  3. - Author(s) : Joung Kyu Park
  4. - Date : 2007.05.16
  5. - Copyright : Copyright (c) 2002-2007 www.hwenc.com, 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.hsnc.common.util.*"%>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ include file="/jsp/work/taglib.jsp" %>
  15. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  16. <%
  17. ctx.init(request, response);
  18. HandlerStorage storage = ctx.getHandlerStorage();
  19. ValueObject params = storage.getParams();
  20. ValueObject user = storage.getUser();
  21. String event = storage.getEvent();
  22. String deptCd = user.get("site_code");
  23. String deptName = user.get("site_name");
  24. deptCd = params.get("buseo");
  25. RowSet rowSet = storage.getRowSet("ROWSET");
  26. // RowSet acctTypeRowSet = storage.getRowSet("AcctTypeRowSet"); //계정 타입
  27. // ValueObject vo = storage.getValueObject("formData");
  28. %>
  29. <SCRIPT language="JavaScript">
  30. /*예약함수*/
  31. var sheet1 = new ibsheetObject();
  32. var sheet1Row;
  33. var sheet1PageNo = 1;
  34. var pageLastRowIndex = 1;
  35. var validationResult = false;
  36. var filterShow = false;
  37. $(document).ready(function(){
  38. var init_sheet = {};
  39. init_sheet.Cfg = {SearchMode:2, Page:10000, MergeSheet:msHeaderOnly};
  40. init_sheet.Cols = [
  41. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  42. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Edit:"False"},
  43. {Header:'No.', Type:"Seq", SaveName:"NO", Width:80, Align:"Center", Edit:"False"},
  44. {Header:'제목.', Type:"Text", SaveName:"TITLE", Width:100, Align:"Center", Edit:"True"},
  45. {Header:'등록일', Type:"Date", SaveName:"CREATE_DATE", Width:60, Format:"Ymd", Align:"Center", Edit:"True"}
  46. ];
  47. init_sheet.HeaderMode = {Sort:1};
  48. IBS_InitSheet(sheet1, init_sheet);
  49. sheet1.SetDataAutoTrim(0);
  50. // sheet1.SetEditable(false);
  51. sheet1.FitColWidth();
  52. });
  53. $(function(){
  54. $("#btnSearch").click(function(){
  55. $("#event").val("GET_LIST");
  56. var url = Modular.model.PageContext.CONTEXT_ROOT + "/test/TestList_sheet.screen";
  57. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 10000, "");
  58. // sheet1.DoSearch("/test/TestList_data.screen", $("#form1"));
  59. });
  60. $("#btnAdd").click(function(){
  61. sheet1.DataInsert(-1);
  62. });
  63. $("#btnSave").click(function(){
  64. if (confirm("저장하시겠습니까?"))
  65. {
  66. $("#event").val("SAVE_LIST");
  67. var url = Modular.model.PageContext.CONTEXT_ROOT + "/test/TestList_sheet.screen";
  68. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  69. }
  70. });
  71. $("#btnSave2").click(function(){
  72. var f = document.form1
  73. $("#event").val("SAVE_FORM");
  74. submitXmlRequest("/test/TestList_form.screen", "SAVE_FORM", f);
  75. // var url = Modular.model.PageContext.CONTEXT_ROOT + "/test/TestList_sheet.screen";
  76. // Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), 10000, false);
  77. });
  78. });
  79. function doResult(resultObj) {
  80. try {
  81. if( resultObj.getRequestEvent() == "SAVE_FORM") {
  82. if( resultObj.getSuccess() ) {
  83. alert("Process is completed.");
  84. // goListProc();
  85. location.reload();
  86. }
  87. else {
  88. dlgErrorMsg(resultObj);
  89. }
  90. // document.form1.isSubmit = false;
  91. }
  92. }
  93. catch(errorObject) {
  94. showErrorDlg("doResult()", errorObject);
  95. }
  96. }
  97. function sheet1_OnSaveEnd(code, msg)
  98. {
  99. var event = $("#event").val();
  100. if(code >= "0")
  101. {
  102. dlgAlert("등록되었습니다.");
  103. }
  104. else
  105. {
  106. dlgAlert("등록실패.");
  107. }
  108. $("#event").val("GET_LIST");
  109. // // var url = Modular.model.PageContext.CONTEXT_ROOT + "/test/TestList_sheet.screen";
  110. // Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 10000, "");
  111. }
  112. </SCRIPT>
  113. <modular:search id="form1">
  114. <modular:key id="event" />
  115. </modular:search>
  116. <form id="form1" name="form1" method="post" modular:type="search">
  117. <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
  118. <TR><TD height="1">
  119. <INPUT type="hidden" name="p_user_sabun" value="">
  120. <INPUT type="hidden" name="event" id="event" value="">
  121. <INPUT type="hidden" name="p_user_pw" value="">
  122. <INPUT type="hidden" name="p_buseo_nm" value="">
  123. <INPUT type="hidden" name="p_job_dscr" value="">
  124. <INPUT type="hidden" name="p_tel_no" value="">
  125. <INPUT type="hidden" name="p_hand_tel_no" value="">
  126. <INPUT type="hidden" name="p_e_mail" value="">
  127. <INPUT type="hidden" name="p_user_name" value="">
  128. <INPUT type="hidden" name="acct_id" value="">
  129. <INPUT type="hidden" name="j_usertype" value="head">
  130. <input type='hidden' name='login_id' >
  131. <input type='hidden' name='login_pw' >
  132. <INPUT type="hidden" name="j_admin_login_gb" value="Y">
  133. <TABLE class="screen_title_table">
  134. <TR height="2"><TD colspan="2"></TD></TR>
  135. <TR height="25">
  136. <TD width="16" valign="middle"><IMG src="/img/buyer/template/bullet_03.gif" ></TD>
  137. <TD width="100%" class="screen_title_text">TEST</TD>
  138. </TR>
  139. </TABLE>
  140. </TD></TR>
  141. <!-- 검색조건 영역 : 시작 -->
  142. <TR><TD height="1">
  143. <TABLE cellspacing="1" cellpadding="0" class="search_table">
  144. <TR height="25">
  145. <!-- 검색조건 타이틀 1 -->
  146. <TD width="10%" class="search_table_title">
  147. <img src="/img/buyer/button/bullet_01.gif" align="middle">Dept
  148. </TD>
  149. <TD width="30%" class="search_table_data">
  150. &nbsp;<input type="text" name="dept" id="dept" value=""/>
  151. </TD>
  152. <TD width="8%" class="search_table_title">
  153. <img src="/img/buyer/button/bullet_01.gif" align="middle">Account Type
  154. </TD>
  155. <TD witdh="5%" class="search_table_data">
  156. &nbsp;<input type="text" name="type" id="type" value=""/>
  157. </TD>
  158. <TD width="8%" class="search_table_title">
  159. <img src="/img/buyer/button/bullet_01.gif" align="middle">Emp. No.
  160. </TD>
  161. <TD width="10%" class="search_table_data">
  162. &nbsp;
  163. <%= InputText.get("user_sabun", "", 80, 50, "hangule, desc=사번, PerSize") %>
  164. </TD>
  165. <TD width="20%" rowspan="3" class="search_button">
  166. <!-- 검색버튼 영역 : 시작 -->
  167. <TABLE border="0" cellpadding="0" cellspacing="0" align="center">
  168. <TR>
  169. <!-- 초기화버튼 : 시작 -->
  170. <TD>
  171. <DIV id="btnSearch" class="button_style">
  172. <TABLE border="0" cellpadding="0" cellspacing="0">
  173. <TR>
  174. <TD class="button_left1"></TD>
  175. <TD class="button_text1">Search&nbsp;</TD>
  176. <TD class="button_right"></TD>
  177. </TR>
  178. </TABLE>
  179. </DIV>
  180. </TD>
  181. <!-- 초기화버튼 : 종료 -->
  182. <!-- 검색버튼 구분 여백 : 시작 -->
  183. <TD width="5"></TD>
  184. <!-- 검색버튼 구분 여백 : 종료 -->
  185. <!-- 검색버튼 : 시작 -->
  186. <TD>
  187. <DIV id="btnSave" class="button_style">
  188. <TABLE border="0" cellpadding="0" cellspacing="0">
  189. <TR>
  190. <TD class="button_left1"></TD>
  191. <TD class="button_text1">Save&nbsp;</TD>
  192. <TD class="button_right"></TD>
  193. </TR>
  194. </TABLE>
  195. </DIV>
  196. <DIV id="btnSave2" class="button_style">
  197. <TABLE border="0" cellpadding="0" cellspacing="0">
  198. <TR>
  199. <TD class="button_left1"></TD>
  200. <TD class="button_text1">Save2&nbsp;</TD>
  201. <TD class="button_right"></TD>
  202. </TR>
  203. </TABLE>
  204. </DIV>
  205. </TD>
  206. <!-- 검색버튼 : 종료 -->
  207. <!-- 검색버튼 구분 여백 : 시작 -->
  208. <TD width="5"></TD>
  209. <!-- 검색버튼 구분 여백 : 종료 -->
  210. <!-- 검색버튼 : 시작 -->
  211. <TD>
  212. <DIV id="btnAdd" class="button_style">
  213. <TABLE border="0" cellpadding="0" cellspacing="0">
  214. <TR>
  215. <TD class="button_left1"></TD>
  216. <TD class="button_text1">Add&nbsp;</TD>
  217. <TD class="button_right"></TD>
  218. </TR>
  219. </TABLE>
  220. </DIV>
  221. </TD>
  222. <TD width="5"></TD>
  223. <TD>
  224. <DIV onclick="getEhr();" class="button_style"> <!-- SP_GET_EHR_EMPDATA 프로시져 호출-->
  225. <TABLE border="0" cellpadding="0" cellspacing="0">
  226. <TR>
  227. <TD class="button_left1"></TD>
  228. <TD class="button_text1">EHR Sync&nbsp;</TD>
  229. <TD class="button_right"></TD>
  230. </TR>
  231. </TABLE>
  232. </DIV>
  233. </TD>
  234. </TR>
  235. </TABLE>
  236. <!-- 검색버튼 영역 : 종료 -->
  237. </TD>
  238. </TR>
  239. <TR height="25">
  240. <!-- 검색조건 타이틀 1 -->
  241. <TD width="8%" class="search_table_title">
  242. <img src="/img/buyer/button/bullet_01.gif" align="middle">Site
  243. </TD>
  244. <TD witdh="15%" class="search_table_data">
  245. &nbsp;
  246. <INPUT type="text" name="dept_cd" class="input" value="" readOnly style="width:30%;background-color: #dedede;" >
  247. <INPUT type="text" name="dept_nm" class="input" value="" style="width:52%">
  248. <IMG onclick="dlgSearchSpotDept(document.form1.dept_cd, document.form1.dept_nm);" src="/img/buyer/button/bt_search_right.gif" alt="현장찾기" border="0" align="absmiddle" style="cursor:hand;">
  249. </TD>
  250. <TD width="8%" class="search_table_title">
  251. <img src="/img/buyer/button/bullet_01.gif" align="middle">Name
  252. </TD>
  253. <TD witdh="5%" class="search_table_data" colspan="3">
  254. &nbsp;
  255. <%//= InputText.get("user_name", "", 60, 50, "hangule, desc=성명, PerSize") %>
  256. <INPUT type="text" name="user_name" value="<%=params.get("user_name") %>" maxlength="50" class="input" style="IME-MODE : active;width:30%;" desc='성명' onKeyPress="doKeyPress();">
  257. </TD>
  258. </TR>
  259. </TABLE>
  260. </TD></TR>
  261. <!-- 검색조건 영역 : 종료 -->
  262. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  263. <TR><TD height="1">
  264. <TABLE border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  265. <TR><TD></TD></TR>
  266. </TABLE>
  267. </TD></TR>
  268. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  269. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  270. </TABLE>
  271. </FORM>
  272. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;">
  273. <!-- 데이터 영역 : 시작 -->
  274. <tr>
  275. <td id="sheet1_td" >
  276. <!-- IBSheet7 그리드 생성 -->
  277. <script>createIBSheet("sheet1","100%", "100%");</script>
  278. </td>
  279. </tr>
  280. <!-- 데이터 영역 : 종료 -->
  281. </table>