MyInfo.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <%--
  2. - FileName : MyInfo.jsp
  3. - Author(s) : Sung Min Lee
  4. - Date : 2014.06.24
  5. -
  6. - Description: 담당자 관리 목록
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ include file="/jsp/work/taglib.jsp" %>
  14. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  15. <%
  16. ctx.init(request, response);
  17. HandlerStorage storage = ctx.getHandlerStorage();
  18. ValueObject params = storage.getParams();
  19. ValueObject user = storage.getUser();
  20. String fevent = storage.getEvent();
  21. ValueObject vo = storage.getValueObject("SuppJoinRequest");
  22. %>
  23. <script type="text/javascript">
  24. <!--
  25. /*예약함수*/
  26. var sheet1 = new ibsheetObject();
  27. var sheet1Row;
  28. var sheet1PageNo = 1;
  29. var pageLastRowIndex = 1;
  30. var validationResult = false;
  31. var filterShow = false;
  32. function _onReady()
  33. {
  34. }
  35. $(document).on("keyup", "input:text[numberOnly]", function() {$(this).val( $(this).val().replace(/[^0-9]/gi,"") );});
  36. //숫자,특문-만
  37. $(document).on("keyup", "input:text[noHangelEng]", function() {$(this).val( $(this).val().replace( /[^0-9-]/gi, "") );});
  38. $(function(){
  39. $("#btn_list").click(function(){
  40. $("#form1").attr("action", "/supplier/notice.screen");
  41. $("#form1").submit();
  42. });
  43. $("#btn_save").click(function(){
  44. var f = document.form1;
  45. if($("#p_user_name").val().trim() == "")
  46. {
  47. alert("담당자명을 입력해 주세요.");
  48. $("#p_user_name").focus();
  49. return false;
  50. }
  51. if($("#p_user_id").val().trim() == "")
  52. {
  53. alert("담당자 ID를 입력해 주세요.");
  54. $("#p_user_id").focus();
  55. return false;
  56. }
  57. if($("#p_passwd").val().trim() == "")
  58. {
  59. alert("비밀번호를 입력해 주세요.");
  60. $("#p_passwd").focus();
  61. return false;
  62. }
  63. if(!$("#p_repasswd").val().trim())
  64. {
  65. alert("비밀번호확인을 입력해 주세요.");
  66. $("#p_repasswd").focus();
  67. return false;
  68. }else
  69. {
  70. if($("#p_passwd").val().trim() != $("#p_repasswd").val().trim())
  71. {
  72. alert("비밀번호와 비밀번호 확인 입력값이 일치하지 않습니다.");
  73. $("#p_repasswd").focus();
  74. return;
  75. }
  76. }
  77. if($("#p_division").val().trim() == "")
  78. {
  79. alert("부서명을 입력해 주세요.");
  80. $("#p_division").focus();
  81. return false;
  82. }
  83. if($("#p_position").val().trim() == "")
  84. {
  85. alert("직위를 입력해 주세요.");
  86. $("#p_position").focus();
  87. return false;
  88. }
  89. if($("#p_tel_num").val().trim() == "")
  90. {
  91. alert("전화번호를 입력해 주세요.");
  92. $("#p_tel_num").focus();
  93. return false;
  94. }
  95. if($("#p_fax_num").val().trim() == "")
  96. {
  97. alert("팩스번호를 입력해 주세요.");
  98. $("#p_fax_num").focus();
  99. return false;
  100. }
  101. if($("#p_hp1").val().trim() == "" || $("#p_hp2").val().trim() == "" || $("#p_hp3").val().trim() == "")
  102. {
  103. alert("핸드폰 번호를 입력해 주세요.");
  104. if(!$("#p_hp1").val())
  105. {
  106. $("#p_hp1").focus();
  107. }else if(!$("#p_hp2").val())
  108. {
  109. $("#p_hp2").focus();
  110. }else if(!$("#p_hp3").val())
  111. {
  112. $("#p_hp3").focus();
  113. }
  114. return false;
  115. }
  116. if($("#p_email").val().trim() == "")
  117. {
  118. alert("이메일을 입력해 주세요.");
  119. return $("#p_email").focus();
  120. }else
  121. {
  122. // 정규식 - 이메일 유효성 검사
  123. var regEmail = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
  124. if(!regEmail.test($("#p_email").val().trim()))
  125. {
  126. alert("이메일 주소가 유효하지 않습니다");
  127. $("#p_email").focus();
  128. return false;
  129. }
  130. }
  131. $("#fevent").val("SAVE_INFO");
  132. submitXmlRequest("/portal/own/MyInfo_form.screen", "SAVE_INFO", f, "VALUEOBJECT");
  133. });
  134. });
  135. function doResult(resultObj) {
  136. try
  137. {
  138. document.form1.isSubmit = false;
  139. if( resultObj.getRequestEvent() == "SAVE_INFO")
  140. {
  141. if( resultObj.getSuccess() )
  142. {
  143. alert("등록되었습니다.");
  144. top.location.href="/mainPortal.screen";
  145. // $("#form1").attr("action", "/supplier/notice.screen");
  146. // $("#form1").submit();
  147. }
  148. else
  149. {
  150. // dlgErrorMsg(resultObj.getMessage);
  151. alert(resultObj.getValueObject().get("errMsg"));
  152. }
  153. }
  154. }
  155. catch(errorObject) {
  156. showErrorDlg("doResult()", errorObject);
  157. }
  158. }
  159. //-->
  160. </script>
  161. <modular:search id="form1">
  162. <modular:key id="fevent" />
  163. </modular:search>
  164. <form id="form1" name="form1" method="post" modular:type="search">
  165. <INPUT type="hidden" name="fevent" id="fevent" value="">
  166. <input type="hidden" name="user_id" id="user_id" value="<%=params.get("p_user_id") %>" />
  167. <input type="hidden" name="p_corp_id" id="p_corp_id" value="<%=vo.get("corp_id") %>" />
  168. <!-- 제목 및 버튼 -->
  169. <table width="100%">
  170. <colgroup>
  171. <col width="500" />
  172. <col width="*" />
  173. </colgroup>
  174. <tr>
  175. <th>
  176. <div align="left" id="title">
  177. <ul>
  178. <li><span id="resultListDivTitle">담당자 정보수정</span></li>
  179. </ul>
  180. </div>
  181. </th>
  182. <td align="right">
  183. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">돌아가기</a></span>
  184. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_save">저장</a></span></td>
  185. </tr>
  186. </table>
  187. <div class="application-info magT10">
  188. <div class="application-sub-title">
  189. <span class="title">담당자 정보</span>
  190. </div>
  191. <div class="application-location"></div>
  192. </div>
  193. <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: auto;">
  194. <!-- 검색조건 영역 : 시작 -->
  195. <tr>
  196. <td height="1">
  197. <table class="form-table">
  198. <col width="10%">
  199. <col width="30%">
  200. <col width="10%">
  201. <col width="30%">
  202. <tr height="25">
  203. <!-- 검색조건 타이틀 1 -->
  204. <th class="required" style="text-align: left;">담당자명</th>
  205. <td class="search_table_data">
  206. &nbsp;<input type="text" name="p_user_name" id="p_user_name" style="width: 85%;" value="<%=vo.get("USER_NAME")%>" />
  207. </td>
  208. <th class="required" style="text-align: left;">담당자 ID</th>
  209. <td class="search_table_data">
  210. &nbsp;<input type="text" name="p_user_id" id="p_user_id" style="width: 85%;" value="<%=vo.get("USER_ID")%>" <%=params.get("p_user_id").equals("") ? "" : "readonly=\"readonly\" " %> />
  211. </td>
  212. </tr>
  213. <tr height="25">
  214. <!-- 검색조건 타이틀 1 -->
  215. <th class="required" style="text-align: left;">비밀번호</th>
  216. <td class="search_table_data">
  217. &nbsp;<input type="password" name="p_passwd" id="p_passwd" style="width: 85%; border: 1px solid #CBCBCB;" value="<%=vo.get("PASSWD")%>" />
  218. </td>
  219. <th class="required" style="text-align: left;">비밀번호 확인</th>
  220. <td class="search_table_data">
  221. &nbsp;<input type="password" name="p_repasswd" id="p_repasswd" style="width: 85%; border: 1px solid #CBCBCB;" value=""/>
  222. </td>
  223. </tr>
  224. <tr height="25">
  225. <!-- 검색조건 타이틀 1 -->
  226. <th class="required" style="text-align: left;">부서</th>
  227. <td class="search_table_data">
  228. &nbsp;<input type="text" name="p_division" id="p_division" style="width: 85%;" value="<%=vo.get("DIVISION") %>" />
  229. </td>
  230. <th class="required" style="text-align: left;">직위</th>
  231. <td class="search_table_data">
  232. &nbsp;<input type="text" name="p_position" id="p_position" style="width: 85%;" value="<%=vo.get("POSITION") %>" />
  233. </td>
  234. </tr>
  235. <tr height="25">
  236. <!-- 검색조건 타이틀 1 -->
  237. <th class="required" style="text-align: left;">전화번호</th>
  238. <td class="search_table_data">
  239. &nbsp;<input type="text" name="p_tel_num" id="p_tel_num" style="width: 64%;" value="<%=vo.get("TEL_NUM") %>" noHangelEng="true" />&nbsp;<span style="color: red; font-size: 11px;">ex)000-0000-0000</span>
  240. </td>
  241. <th class="required" style="text-align: left;">팩스번호</th>
  242. <td class="search_table_data">
  243. &nbsp;<input type="text" name="p_fax_num" id="p_fax_num" style="width: 64%;" value="<%=vo.get("FAX_NUM") %>" noHangelEng="true" />&nbsp;<span style="color: red; font-size: 11px;">ex)000-0000-0000</span>
  244. </td>
  245. </tr>
  246. <tr height="25">
  247. <!-- 검색조건 타이틀 1 -->
  248. <th class="required" style="text-align: left;">핸드폰</th>
  249. <td class="search_table_data">
  250. &nbsp;<input type="text" name="p_hp1" id="p_hp1" size="3" value="<%=vo.get("HP1") %>" numberOnly="true" maxlength="3"/> -
  251. &nbsp;<input type="text" name="p_hp2" id="p_hp2" size="4" value="<%=vo.get("HP2") %>" numberOnly="true" maxlength="4"/> -
  252. &nbsp;<input type="text" name="p_hp3" id="p_hp3" size="4" value="<%=vo.get("HP3") %>" numberOnly="true" maxlength="4"/>
  253. </td>
  254. <th class="required" style="text-align: left;">이메일</th>
  255. <td class="search_table_data">
  256. &nbsp;<input type="text" name="p_email" id="p_email" style="width: 85%;" value="<%=vo.get("EMAIL")%>"/>
  257. </td>
  258. </tr>
  259. </table>
  260. </td>
  261. </tr>
  262. <!-- 검색조건 영역 : 종료 -->
  263. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  264. <tr>
  265. <td height="1">
  266. <table border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  267. <tr>
  268. <td>
  269. </td>
  270. </tr>
  271. </table>
  272. </td>
  273. </tr>
  274. </table>
  275. </form>