ChargeDetail.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. <%--
  2. - FileName : ChargeList.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. String defaultYn = vo.get("default_yn");
  23. %>
  24. <SCRIPT language="JavaScript" src="/js/common.js"></SCRIPT>
  25. <script type="text/javascript">
  26. <!--
  27. /*예약함수*/
  28. var sheet1 = new ibsheetObject();
  29. var sheet1Row;
  30. var sheet1PageNo = 1;
  31. var pageLastRowIndex = 1;
  32. var validationResult = false;
  33. var filterShow = false;
  34. function _onReady()
  35. {
  36. }
  37. $(document).on("keyup", "input:text[numberOnly]", function() {$(this).val( $(this).val().replace(/[^0-9]/gi,"") );});
  38. //숫자,특문-만
  39. $(document).on("keyup", "input:text[noHangelEng]", function() {$(this).val( $(this).val().replace( /[^0-9-]/gi, "") );});
  40. $(function(){
  41. var defaultYn = "<%=defaultYn%>";
  42. var my_id = "<%=vo.get("user_id")%>";
  43. if(defaultYn == "Y" || my_id == "")
  44. {
  45. $("#btn_delete").css("display", "none");
  46. }
  47. $("#btn_list").click(function(){
  48. $("#form1").attr("action", "/portal/own/ChargeList.screen");
  49. $("#form1").submit();
  50. });
  51. $("#btn_delete").click(function(){
  52. var f = document.form1;
  53. if(confirm("삭제 하시겠습니까?"))
  54. {
  55. $("#fevent").val("DELETE_CHARGE");
  56. submitXmlRequest("/portal/own/ChargeDetail_form.screen", "DELETE_CHARGE", f, "VALUEOBJECT");
  57. }
  58. });
  59. $("#btn_save").click(function(){
  60. var f = document.form1;
  61. //2016.12.27
  62. if ("<%=vo.get("default_yn")%>" == "Y" && $(':radio[name="use_yn"]:checked').val() == "N"){
  63. alert("관리자는 미사용 처리할수 없습니다.");
  64. return false;
  65. }
  66. if($("#p_user_name").val().trim() == "")
  67. {
  68. alert("담당자명을 입력해 주세요.");
  69. $("#p_user_name").focus();
  70. return false;
  71. }
  72. if($("#user_id").val().trim() == "")
  73. {
  74. alert("담당자 ID를 입력해 주세요.");
  75. $("#user_id").focus();
  76. return false;
  77. }
  78. if($("#p_passwd").val().trim() == "")
  79. {
  80. alert("비밀번호를 입력해 주세요.");
  81. $("#p_passwd").focus();
  82. return false;
  83. }
  84. if(!$("#p_repasswd").val().trim())
  85. {
  86. alert("비밀번호확인을 입력해 주세요.");
  87. $("#p_repasswd").focus();
  88. return false;
  89. }else
  90. {
  91. if($("#p_passwd").val().trim() != $("#p_repasswd").val().trim())
  92. {
  93. alert("비밀번호와 비밀번호 확인 입력값이 일치하지 않습니다.");
  94. $("#p_repasswd").focus();
  95. return;
  96. }
  97. }
  98. //2016.10.11 비밀번호확인
  99. var argObj = new Object();
  100. argObj.user_id = $("#user_id").val();
  101. argObj.passwd01 = $("#p_passwd").val();
  102. argObj.passwd02 = $("#p_repasswd").val();
  103. argObj.tel_no = $("#p_tel_num").val();
  104. argObj.fax_no = $("#p_fax_num").val();
  105. argObj.hand_tel = $("#p_hp1").val() + $("#p_hp2").val() + $("#p_hp3").val();
  106. var rMsg = doValidPassWord(argObj)
  107. if( rMsg != "" ) {
  108. ErrMsg($("#p_repasswd") , rMsg);
  109. return;
  110. }
  111. if($("#p_division").val().trim() == "")
  112. {
  113. alert("부서명을 입력해 주세요.");
  114. $("#p_division").focus();
  115. return false;
  116. }
  117. if($("#p_position").val().trim() == "")
  118. {
  119. alert("직위를 입력해 주세요.");
  120. $("#p_position").focus();
  121. return false;
  122. }
  123. if($("#p_tel_num").val().trim() == "")
  124. {
  125. alert("전화번호를 입력해 주세요.");
  126. $("#p_tel_num").focus();
  127. return false;
  128. }
  129. if($("#p_fax_num").val().trim() == "")
  130. {
  131. alert("팩스번호를 입력해 주세요.");
  132. $("#p_fax_num").focus();
  133. return false;
  134. }
  135. if($("#p_hp1").val().trim() == "" || $("#p_hp2").val().trim() == "" || $("#p_hp3").val().trim() == "")
  136. {
  137. alert("핸드폰 번호를 입력해 주세요.");
  138. if(!$("#p_hp1").val())
  139. {
  140. $("#p_hp1").focus();
  141. }else if(!$("#p_hp2").val())
  142. {
  143. $("#p_hp2").focus();
  144. }else if(!$("#p_hp3").val())
  145. {
  146. $("#p_hp3").focus();
  147. }
  148. return false;
  149. }
  150. if($("#p_email").val().trim() == "")
  151. {
  152. alert("이메일을 입력해 주세요.");
  153. return $("#p_email").focus();
  154. }else
  155. {
  156. // 정규식 - 이메일 유효성 검사
  157. 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})(\]?)$/;
  158. if(!regEmail.test($("#p_email").val().trim()))
  159. {
  160. alert("이메일 주소가 유효하지 않습니다");
  161. $("#p_email").focus();
  162. return false;
  163. }
  164. }
  165. if ( stringByteSize4UTF($("#p_user_name").val()) > 200 ) {
  166. alert("담당자명은 200자까지 입력하실 수 있습니다.");
  167. return;
  168. }
  169. if ( stringByteSize4UTF($("#p_passwd").val()) > 100 ) {
  170. alert("비밀번호는 100자까지 입력하실 수 있습니다.");
  171. return;
  172. }
  173. if ( stringByteSize4UTF($("#p_division").val()) > 50 ) {
  174. alert("부서는 50자까지 입력하실 수 있습니다.");
  175. return;
  176. }
  177. if ( stringByteSize4UTF($("#p_position").val()) > 20 ) {
  178. alert("직위는 20자까지 입력하실 수 있습니다.");
  179. return;
  180. }
  181. if ( stringByteSize4UTF($("#p_tel_num").val()) > 50 ) {
  182. alert("전화번호는 50자까지 입력하실 수 있습니다.");
  183. return;
  184. }
  185. if ( stringByteSize4UTF($("#p_fax_num").val()) > 50 ) {
  186. alert("팩스번호는 50자까지 입력하실 수 있습니다.");
  187. return;
  188. }
  189. if ( stringByteSize4UTF($("#p_email").val()) > 250 ) {
  190. alert("이메일은 250자까지 입력하실 수 있습니다.");
  191. return;
  192. }
  193. if(confirm("입력한 담당자 정보를 저장 하시겠습니까?"))
  194. {
  195. $("#fevent").val("SAVE_CHARGE");
  196. submitXmlRequest("/portal/own/ChargeDetail_form.screen", "SAVE_CHARGE", f, "VALUEOBJECT");
  197. }
  198. });
  199. });
  200. function doResult(resultObj) {
  201. try
  202. {
  203. document.form1.isSubmit = false;
  204. if( resultObj.getRequestEvent() == "SAVE_CHARGE")
  205. {
  206. if( resultObj.getSuccess() )
  207. {
  208. alert("저장되었습니다.");
  209. $("#fevent").val("GET_DETAIL");
  210. if($("#p_my_user_id").val() != "")
  211. {
  212. $("#form1").attr("action", "/portal/own/ChargeDetail.screen");
  213. $("#form1").submit();
  214. }
  215. else
  216. {
  217. location.href="/portal/own/ChargeList.screen";
  218. }
  219. }
  220. else
  221. {
  222. // dlgErrorMsg(resultObj.getMessage);
  223. alert(resultObj.getValueObject().get("errMsg"));
  224. }
  225. }
  226. else if( resultObj.getRequestEvent() == "DELETE_CHARGE")
  227. {
  228. if( resultObj.getSuccess() )
  229. {
  230. alert("삭제되었습니다.");
  231. location.href="/portal/own/ChargeList.screen";
  232. }
  233. else
  234. {
  235. alert(resultObj.getValueObject().get("errMsg"));
  236. }
  237. }
  238. }
  239. catch(errorObject) {
  240. showErrorDlg("doResult()", errorObject);
  241. }
  242. }
  243. //-->
  244. </script>
  245. <modular:search id="form1">
  246. <modular:key id="fevent" />
  247. </modular:search>
  248. <form id="form1" name="form1" method="post" modular:type="search">
  249. <INPUT type="hidden" name="fevent" id="fevent" value="">
  250. <input type="hidden" name="p_user_id" id="p_user_id" value="<%=params.get("p_user_id") %>" />
  251. <input type="hidden" name="s_user_id" id="s_user_id" value="<%=params.get("s_user_id") %>" />
  252. <input type="hidden" name="p_corp_id" id="p_corp_id" value="<%=params.get("p_corp_id") %>" />
  253. <input type="hidden" name="p_my_user_id" id="p_my_user_id" value="<%=vo.get("USER_ID") %>" />
  254. <input type="hidden" name="s_user_name" id="s_user_name" value="<%=params.get("s_user_name") %>" />
  255. <!-- 제목 및 버튼 -->
  256. <table width="100%">
  257. <colgroup>
  258. <col width="500" />
  259. <col width="*" />
  260. </colgroup>
  261. <tr>
  262. <th>
  263. <div align="left" id="title">
  264. <ul>
  265. <li><span id="resultListDivTitle">담당자 관리 상세</span></li>
  266. </ul>
  267. </div>
  268. </th>
  269. <td align="right">
  270. <div style="float: right; margin-top: 16px;">
  271. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">목록</a></span>
  272. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_delete">삭제</a></span>
  273. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_save">저장</a></span>
  274. </div>
  275. </td>
  276. </tr>
  277. </table>
  278. <div class="application-info magT10">
  279. <div class="application-sub-title">
  280. <span class="title">담당자 정보</span>
  281. </div>
  282. <div class="application-location"></div>
  283. </div>
  284. <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: auto;">
  285. <!-- 검색조건 영역 : 시작 -->
  286. <tr>
  287. <td height="1">
  288. <table class="form-table">
  289. <col width="10%">
  290. <col width="30%">
  291. <col width="10%">
  292. <col width="30%">
  293. <tr height="25">
  294. <!-- 검색조건 타이틀 1 -->
  295. <th class="required" style="text-align: left;">담당자명</th>
  296. <td >
  297. <input type="text" name="p_user_name" id="p_user_name" style="width: 85%;" value="<%=vo.get("USER_NAME")%>" />
  298. </td>
  299. <th class="required" style="text-align: left;">담당자 ID</th>
  300. <td >
  301. <input type="text" name="user_id" id="user_id" style="width: 85%;" value="<%=vo.get("USER_ID")%>" <%=params.get("p_user_id").equals("") ? "" : "readonly=\"readonly\" " %> />
  302. </td>
  303. </tr>
  304. <tr height="25">
  305. <!-- 검색조건 타이틀 1 -->
  306. <th class="required" style="text-align: left;">비밀번호</th>
  307. <td >
  308. <input type="password" name="p_passwd" id="p_passwd" style="width: 85%; border: 1px solid #CBCBCB;" value="<%=vo.get("PASSWD")%>" />
  309. </td>
  310. <th class="required" style="text-align: left;">비밀번호 확인</th>
  311. <td valign="center">
  312. <input type="password" name="p_repasswd" id="p_repasswd" style="width: 85%; border: 1px solid #CBCBCB;" value="<%=vo.get("PASSWD")%>"/>
  313. <br><span style="color: red; font-size: 11px;">*숫자,영문자 조합 8-15자리. 연속된 숫자,문자 4자리 이상 불가</span>
  314. </td>
  315. </tr>
  316. <tr height="25">
  317. <!-- 검색조건 타이틀 1 -->
  318. <th class="required" style="text-align: left;">부서</th>
  319. <td >
  320. <input type="text" name="p_division" id="p_division" style="width: 85%;" value="<%=vo.get("DIVISION") %>" />
  321. </td>
  322. <th class="required" style="text-align: left;">직위</th>
  323. <td >
  324. <input type="text" name="p_position" id="p_position" style="width: 85%;" value="<%=vo.get("POSITION") %>" />
  325. </td>
  326. </tr>
  327. <tr height="25">
  328. <!-- 검색조건 타이틀 1 -->
  329. <th class="required" style="text-align: left;">전화번호</th>
  330. <td >
  331. <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>
  332. </td>
  333. <th class="required" style="text-align: left;">팩스번호</th>
  334. <td >
  335. <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>
  336. </td>
  337. </tr>
  338. <tr height="25">
  339. <!-- 검색조건 타이틀 1 -->
  340. <th class="required" style="text-align: left;">핸드폰</th>
  341. <td >
  342. <input type="text" name="p_hp1" id="p_hp1" size="3" value="<%=vo.get("HP1") %>" numberOnly="true" maxlength="3"/> -
  343. <input type="text" name="p_hp2" id="p_hp2" size="4" value="<%=vo.get("HP2") %>" numberOnly="true" maxlength="4"/> -
  344. <input type="text" name="p_hp3" id="p_hp3" size="4" value="<%=vo.get("HP3") %>" numberOnly="true" maxlength="4"/>
  345. </td>
  346. <th class="required" style="text-align: left;">이메일</th>
  347. <td >
  348. <input type="text" name="p_email" id="p_email" style="width: 85%;" value="<%=vo.get("EMAIL")%>"/>
  349. </td>
  350. </tr>
  351. <tr height="25">
  352. <th class="required" style="text-align: left;">사용자 관리구분</th>
  353. <td style="vertical-align: middle;">
  354. <%=vo.get("default_yn").equals("Y") ? "관리자" : "사용자" %>
  355. </td>
  356. <th class="required" style="text-align: left;">사용여부</th>
  357. <td style="vertical-align: middle;">
  358. <input type="radio" name="use_yn" id="use_yn_1" value="Y" <%=vo.get("use_yn").equals("Y") ? "checked=\"checked\" " : "" %> /> 사용 &nbsp;&nbsp;&nbsp;
  359. <input type="radio" name="use_yn" id="use_yn_2" value="N" <%=vo.get("use_yn").equals("N") ? "checked=\"checked\" " : "" %>/> 미사용
  360. </td>
  361. </tr>
  362. </table>
  363. </td>
  364. </tr>
  365. <!-- 검색조건 영역 : 종료 -->
  366. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  367. <tr>
  368. <td height="1">
  369. <table border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  370. <tr>
  371. <td>
  372. </td>
  373. </tr>
  374. </table>
  375. </td>
  376. </tr>
  377. </table>
  378. </form>