NoticeForAdminList.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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. //System.out.println("acctyType:"+acctTypeRowSet);
  28. %>
  29. <SCRIPT language="JavaScript">
  30. /*예약함수*/
  31. var sheet1;
  32. var sheet1Row;
  33. var sheet1PageNo = 1;
  34. var pageLastRowIndex = 1;
  35. var validationResult = false;
  36. var filterShow = false;
  37. function _onReady(){
  38. /**
  39. * IBSheet object initialize
  40. */
  41. gridInit(sheet1);
  42. /**
  43. * Application Initialize
  44. */
  45. jQuery("#btnSearch").click(function() {
  46. jQuery("#fevent").val("GET_LIST");
  47. var url = Modular.model.PageContext.CONTEXT_ROOT + "/sycs/info/NoticeForAdminList_sheet.screen";
  48. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 10000, "");
  49. });
  50. /* jQuery("#btnAdd").click(function() {
  51. //var rowIdx = masterSheet.DataInsert(-1);
  52. jQuery("#fevent").val("UserForm_Reg");
  53. jQuery("#form1").attr("action", "/sycs/user/UserForm.screen");
  54. jQuery("#form1").attr("target", "_self");
  55. jQuery("#form1").attr("method", "post");
  56. jQuery("#form1").submit();
  57. });
  58. */ jQuery("#btnAdd").click(function() {
  59. var rowIdx = sheet1.DataInsert(-1);
  60. });
  61. jQuery("#btnClear").click(function() {
  62. /* var f = document.form1;
  63. f.dept_cd.value = "";
  64. f.dept_nm.value = "";
  65. f.p_dept_cd.value = "";
  66. f.p_dept_nm.value = "";
  67. setSelect(f.acct_type_id, "");
  68. f.user_sabun.value = "";
  69. f.user_name.value = "";
  70. f.user_name.focus(); */
  71. jQuery("#dept_cd").val("");
  72. jQuery("#dept_nm").val("");
  73. jQuery("#p_dept_cd").val("");
  74. jQuery("#p_dept_nm").val("");
  75. jQuery("#acct_type_id").val("");
  76. jQuery("#user_sabun").val("");
  77. jQuery("#user_name").val("");
  78. jQuery("#user_name").val("");
  79. });
  80. jQuery("#btnSave").click(function() {
  81. if (confirm("저장하시겠습니까?")) {
  82. jQuery("#fevent").val("SAVE_DATA");
  83. var url = Modular.model.PageContext.CONTEXT_ROOT + "/sycs/info/NoticeForAdminList_sheet.screen";
  84. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  85. }
  86. });
  87. pageinit();
  88. }
  89. function pageinit(){
  90. jQuery("#btnSearch").click();
  91. }
  92. /**
  93. * IBSheet object initialize
  94. */
  95. function gridInit(sheetName){
  96. var init_sheet = {};
  97. init_sheet.Cfg = {SearchMode:2, Page:10000};
  98. init_sheet.Cols = [
  99. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center"},
  100. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center"},
  101. {Header:'No.', Type:"Seq", SaveName:"NO", Width:80, Align:"Center"},
  102. {Header:'Tel No.', Type:"Text", SaveName:"tel_no", Width:100, Align:"Left"},
  103. {Header:'Mobile No.', Type:"Text", SaveName:"hand_tel_no", Width:100, Align:"Left"},
  104. {Header:'E-mail', Type:"Text", SaveName:"e_mail", Width:120, Align:"Left"},
  105. {Header:'Reg. Date', Type:"Text", SaveName:"cre_date", Width:100, Align:"Center"},
  106. {Header:'acct_id', Type:"Text", SaveName:"acct_id", Width:0, Align:"Left", Hidden:"True"}
  107. ];
  108. init_sheet.HeaderMode = {Sort:1};
  109. IBS_InitSheet(sheetName, init_sheet);
  110. sheetName.SetDataAutoTrim(0);
  111. sheetName.SetEditable(1);
  112. setGridSize();
  113. }
  114. /**
  115. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  116. */
  117. function sheet1_OnSearchEnd(code, message) {
  118. if(code == 0) {
  119. setGridSize();
  120. } else {
  121. //조회 에러 수행
  122. alert(message);
  123. }
  124. }
  125. /**
  126. * IBSheet Event: Save End(IBSheet 데이터 저장 CallBack)
  127. */
  128. function sheet1_OnSaveEnd(code, msg) {
  129. if(code >= 0) {
  130. alert("저장 성공");
  131. } else {
  132. alert(msg);
  133. }
  134. }
  135. /**
  136. * IBSheet Event: Click
  137. */
  138. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  139. //masterSheetRow = Row;
  140. }
  141. /**
  142. * IBSheet size setting
  143. */
  144. function setGridSize() {
  145. sheet1.FitColWidth();
  146. }
  147. /**
  148. * IBSheet Event: DBLCLICK
  149. */
  150. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  151. if (sheet1.ColSaveName(Col) == "user_name") {
  152. jQuery("#acct_id").val(sheet1.GetCellValue(Row, "acct_id"));
  153. jQuery("#fevent").val("GET_USERFORM_LIST");
  154. jQuery("#form1").attr("action", "/sycs/user/UserForm.screen");
  155. jQuery("#form1").attr("target", "_self");
  156. jQuery("#form1").attr("method", "post");
  157. jQuery("#form1").submit();
  158. }
  159. else if(sheet1.ColSaveName(Col) =="user_sabun"){
  160. var user_sabun = sheet1.GetCellValue(Row, "user_sabun");
  161. var user_pw = sheet1.GetCellValue(Row, "user_pw");
  162. f_gologin(user_sabun, user_pw );
  163. }
  164. else if(sheet1.ColSaveName(Col) =="e_mail"){
  165. if(!sheet1.CellValue(Row, "e_mail")==""){
  166. location.href = "mailto:" + sheet1.GetCellValue(Row,Col);
  167. }
  168. return;
  169. }
  170. else return;
  171. }
  172. //인사 정보 호출
  173. function getEhr(){
  174. if(dlgConfirm("Do you want EHR Data Sync?")){
  175. submitXmlRequest("/sycs/user/UserList_process.screen", "GET_EHR_DATA", document.form1);
  176. }
  177. }
  178. //자동로그인 기능
  179. function f_gologin(login_id,login_pw){
  180. var f = document.form1;
  181. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  182. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  183. return;
  184. }
  185. f.login_id.value = login_id;
  186. f.login_pw.value = login_pw;
  187. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  188. alert("Log-in is being processed.");
  189. };
  190. }
  191. function doResult(resultObj) {
  192. try {
  193. if( resultObj.getRequestEvent() == "" ) {
  194. if( resultObj.getSuccess() ) {
  195. var f = document.form1;
  196. f.action = "/main.screen";
  197. f.target = "_parent";
  198. f.submit();
  199. }
  200. else {
  201. dlgErrorMsg(resultObj);
  202. }
  203. document.form1.isSubmit = false;
  204. }else if( resultObj.getRequestEvent() == "GET_EHR_DATA" ) {
  205. if( resultObj.getSuccess() ) {
  206. alert("EHR Synchronize Complete");
  207. doSearch(document.all.sheet1);
  208. }
  209. else {
  210. dlgErrorMsg(resultObj);
  211. }
  212. document.form1.isSubmit = false;
  213. }
  214. }
  215. catch(errorObject) {
  216. showErrorDlg("doResult()", errorObject);
  217. }
  218. }
  219. function searchAccDept(p_dept_cd, p_dept_nm){
  220. result = window.showModalDialog(getDummyUrl('/lib/dlgSearchAccDept.screen'),'부서 찾기','dialogWidth:620px;dialogHeight:460px; center:yes; help:no; status:no; scroll:no; resizable:no');
  221. if( result == null ){
  222. document.form1.p_dept_cd.value = ""; //부서코드
  223. document.form1.p_dept_nm.value = ""; //부서명
  224. }else{
  225. document.form1.p_dept_cd.value = result[0]; //부서코드
  226. document.form1.p_dept_nm.value = result[1]; //부서명
  227. }
  228. }
  229. function doKeyPress() {
  230. if( event.keyCode == 13 ) {
  231. doSearch(document.all.sheet1)
  232. }
  233. }
  234. </SCRIPT>
  235. <modular:search id="form1">
  236. <modular:key id="fevent" />
  237. </modular:search>
  238. <form id="form1" name="form1" method="post" modular:type="search">
  239. <TABLE border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  240. <INPUT type="hidden" name="fevent" id="fevent" value="">
  241. <INPUT type="hidden" name="formdata1" id="formdata1" value="formdata1Test">
  242. <TR height="1">
  243. <TD>
  244. <TABLE class="screen_title_table" border="0">
  245. <TR height="2">
  246. <TD colspan="2"></TD>
  247. </TR>
  248. <TR height="25">
  249. <TD width="16" valign="middle"><IMG src="/img/buyer/template/bullet_03.gif" ></TD>
  250. <TD width="100%" class="screen_title_text">Notice List</TD>
  251. </TR>
  252. </TABLE>
  253. </TD>
  254. </TR>
  255. <!-- 검색조건 영역 : 시작 -->
  256. <TR>
  257. <TD height="1">
  258. <TABLE cellspacing="1" cellpadding="0" class="search_table" border="0" width="100%" height="100%">
  259. <TR height="25">
  260. <!-- 검색조건 타이틀 1 -->
  261. <TD width="10%" class="search_table_title"><img src="/img/buyer/button/bullet_01.gif" align="middle">Dept</TD>
  262. <TD width="30%" class="search_table_data">&nbsp;
  263. <%= InputText.get("p_dept_cd", params.get("p_dept_cd"), 30, 10, "ID,ReadOnly,PerSize") %>
  264. <%-- <%= InputText.get("p_dept_nm", DeptCodeManager.getDeptName(params.get("p_dept_cd")), 52, 30, "ID,PerSize") %> --%>
  265. <IMG onclick="searchAccDept(document.form1.p_dept_cd, document.form1.p_dept_nm)" src="/img/buyer/button/bt_search_right.gif" alt="부서찾기" border="0" align="absmiddle" style="cursor:hand;">
  266. </TD>
  267. <TD width="8%" class="search_table_title"><img src="/img/buyer/button/bullet_01.gif" align="middle">Account Type</TD>
  268. <TD witdh="5%" class="search_table_data"><%-- &nbsp;&nbsp;<%= HTMLMaker.getSelectTag(acctTypeRowSet, "ACCT_TYPE_ID", "ACCT_TYPE_NAME", "acct_type_id", "width:70%;height=18;", "<option value=''>--선택--</option>", "") %> --%></TD>
  269. <TD width="8%" class="search_table_title"><img src="/img/buyer/button/bullet_01.gif" align="middle">Emp. No.</TD>
  270. <TD width="10%" class="search_table_data">&nbsp;<%-- <%= InputText.get("user_sabun", "", 80, 50, "hangule, desc=사번, PerSize") %> --%></TD>
  271. <TD width="20%" rowspan="3" class="search_button">
  272. <!-- 검색버튼 영역 : 시작 -->
  273. <TABLE border="0" cellpadding="0" cellspacing="0" align="center">
  274. <TR>
  275. <TD>
  276. <DIV id="btnSearch" class="button_style">
  277. <TABLE border="0" cellpadding="0" cellspacing="0">
  278. <TR>
  279. <TD class="button_left1"></TD>
  280. <TD class="button_text1">Search&nbsp;</TD>
  281. <TD class="button_right"></TD>
  282. </TR>
  283. </TABLE>
  284. </DIV>
  285. </TD>
  286. <!-- 버튼 구분 여백 : 시작 -->
  287. <TD width="5"></TD>
  288. <!-- 버튼 구분 여백 : 종료 -->
  289. <TD>
  290. <DIV id="btnSave" class="button_style">
  291. <TABLE border="0" cellpadding="0" cellspacing="0">
  292. <TR>
  293. <TD class="button_left1"></TD>
  294. <TD class="button_text1">Save&nbsp;</TD>
  295. <TD class="button_right"></TD>
  296. </TR>
  297. </TABLE>
  298. </DIV>
  299. </TD>
  300. <!-- 버튼 구분 여백 : 시작 -->
  301. <TD width="5"></TD>
  302. <!-- 버튼 구분 여백 : 종료 -->
  303. <TD>
  304. <DIV id="btnAdd" class="button_style">
  305. <TABLE border="0" cellpadding="0" cellspacing="0">
  306. <TR>
  307. <TD class="button_left1"></TD>
  308. <TD class="button_text1">Add&nbsp;</TD>
  309. <TD class="button_right"></TD>
  310. </TR>
  311. </TABLE>
  312. </DIV>
  313. </TD>
  314. </TR>
  315. </TABLE>
  316. <!-- 검색버튼 영역 : 종료 -->
  317. </TD>
  318. </TR>
  319. <TR height="25">
  320. <!-- 검색조건 타이틀 1 -->
  321. <TD width="8%" class="search_table_title"><img src="/img/buyer/button/bullet_01.gif" align="middle">Site</TD>
  322. <TD witdh="15%" class="search_table_data">&nbsp;
  323. <INPUT type="text" name="dept_cd" class="input" value="" readOnly style="width:30%;background-color: #dedede;" >
  324. <INPUT type="text" name="dept_nm" class="input" value="" style="width:52%">
  325. <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;">
  326. </TD>
  327. <TD width="8%" class="search_table_title"><img src="/img/buyer/button/bullet_01.gif" align="middle">Name</TD>
  328. <TD witdh="5%" class="search_table_data" colspan="3">&nbsp;
  329. <%//= InputText.get("user_name", "", 60, 50, "hangule, desc=성명, PerSize") %>
  330. <INPUT type="text" name="user_name" value="<%=params.get("user_name") %>" maxlength="50" class="input" style="IME-MODE : active;width:30%;" desc='성명' onKeyPress="doKeyPress();">
  331. </TD>
  332. </TR>
  333. </TABLE>
  334. </TD>
  335. </TR>
  336. <!-- 검색조건 영역 : 종료 -->
  337. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  338. <TR height="1">
  339. <TD>
  340. <TABLE border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  341. <TR>
  342. <TD></TD>
  343. </TR>
  344. </TABLE>
  345. </TD>
  346. </TR>
  347. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  348. <!-- 데이터 영역 : 시작 -->
  349. <TR>
  350. <TD id="sheet1_td" >
  351. <!-- IBSheet7 그리드 생성 -->
  352. <script>createIBSheet('sheet1','100%', '100%');</script>
  353. </TD>
  354. </TR>
  355. <!-- 데이터 영역 : 종료 -->
  356. </TABLE>
  357. </FORM>