123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442 |
- <%--
- - FileName : ChargeList.jsp
- - Author(s) : Sung Min Lee
- - Date : 2014.06.24
- -
- - Description: 담당자 관리 목록
- --%>
-
- <%@ page contentType="text/html; charset=utf-8" %>
- <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
- <%@ page import="com.udapsoft.waf.common.ui.*" %>
- <%@ page import="kr.co.hsnc.common.util.*"%>
- <%@ page import="kr.co.hsnc.common.sql.*" %>
- <%@ include file="/jsp/work/taglib.jsp" %>
- <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
- <%
- ctx.init(request, response);
- HandlerStorage storage = ctx.getHandlerStorage();
- ValueObject params = storage.getParams();
- ValueObject user = storage.getUser();
- String fevent = storage.getEvent();
-
- ValueObject vo = storage.getValueObject("SuppJoinRequest");
-
- String defaultYn = vo.get("default_yn");
-
- %>
- <SCRIPT language="JavaScript" src="/js/common.js"></SCRIPT>
- <script type="text/javascript">
- <!--
- /*예약함수*/
- var sheet1 = new ibsheetObject();
- var sheet1Row;
- var sheet1PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
-
- function _onReady()
- {
-
- }
-
-
- $(document).on("keyup", "input:text[numberOnly]", function() {$(this).val( $(this).val().replace(/[^0-9]/gi,"") );});
-
- //숫자,특문-만
- $(document).on("keyup", "input:text[noHangelEng]", function() {$(this).val( $(this).val().replace( /[^0-9-]/gi, "") );});
-
- $(function(){
-
-
- var defaultYn = "<%=defaultYn%>";
- var my_id = "<%=vo.get("user_id")%>";
-
- if(defaultYn == "Y" || my_id == "")
- {
- $("#btn_delete").css("display", "none");
- }
-
-
- $("#btn_list").click(function(){
-
- $("#form1").attr("action", "/portal/own/ChargeList.screen");
- $("#form1").submit();
- });
-
-
- $("#btn_delete").click(function(){
-
- var f = document.form1;
-
- if(confirm("삭제 하시겠습니까?"))
- {
- $("#fevent").val("DELETE_CHARGE");
- submitXmlRequest("/portal/own/ChargeDetail_form.screen", "DELETE_CHARGE", f, "VALUEOBJECT");
- }
- });
-
-
- $("#btn_save").click(function(){
-
- var f = document.form1;
-
- //2016.12.27
- if ("<%=vo.get("default_yn")%>" == "Y" && $(':radio[name="use_yn"]:checked').val() == "N"){
- alert("관리자는 미사용 처리할수 없습니다.");
- return false;
- }
-
- if($("#p_user_name").val().trim() == "")
- {
- alert("담당자명을 입력해 주세요.");
- $("#p_user_name").focus();
- return false;
- }
- if($("#user_id").val().trim() == "")
- {
- alert("담당자 ID를 입력해 주세요.");
- $("#user_id").focus();
- return false;
- }
- if($("#p_passwd").val().trim() == "")
- {
- alert("비밀번호를 입력해 주세요.");
- $("#p_passwd").focus();
- return false;
- }
- if(!$("#p_repasswd").val().trim())
- {
- alert("비밀번호확인을 입력해 주세요.");
- $("#p_repasswd").focus();
- return false;
- }else
- {
- if($("#p_passwd").val().trim() != $("#p_repasswd").val().trim())
- {
- alert("비밀번호와 비밀번호 확인 입력값이 일치하지 않습니다.");
- $("#p_repasswd").focus();
- return;
- }
- }
- //2016.10.11 비밀번호확인
- var argObj = new Object();
- argObj.user_id = $("#user_id").val();
- argObj.passwd01 = $("#p_passwd").val();
- argObj.passwd02 = $("#p_repasswd").val();
- argObj.tel_no = $("#p_tel_num").val();
- argObj.fax_no = $("#p_fax_num").val();
- argObj.hand_tel = $("#p_hp1").val() + $("#p_hp2").val() + $("#p_hp3").val();
- var rMsg = doValidPassWord(argObj)
- if( rMsg != "" ) {
- ErrMsg($("#p_repasswd") , rMsg);
- return;
- }
-
-
- if($("#p_division").val().trim() == "")
- {
- alert("부서명을 입력해 주세요.");
- $("#p_division").focus();
- return false;
- }
- if($("#p_position").val().trim() == "")
- {
- alert("직위를 입력해 주세요.");
- $("#p_position").focus();
- return false;
- }
- if($("#p_tel_num").val().trim() == "")
- {
- alert("전화번호를 입력해 주세요.");
- $("#p_tel_num").focus();
- return false;
- }
- if($("#p_fax_num").val().trim() == "")
- {
- alert("팩스번호를 입력해 주세요.");
- $("#p_fax_num").focus();
- return false;
- }
- if($("#p_hp1").val().trim() == "" || $("#p_hp2").val().trim() == "" || $("#p_hp3").val().trim() == "")
- {
- alert("핸드폰 번호를 입력해 주세요.");
- if(!$("#p_hp1").val())
- {
- $("#p_hp1").focus();
- }else if(!$("#p_hp2").val())
- {
- $("#p_hp2").focus();
- }else if(!$("#p_hp3").val())
- {
- $("#p_hp3").focus();
- }
- return false;
- }
- if($("#p_email").val().trim() == "")
- {
- alert("이메일을 입력해 주세요.");
- return $("#p_email").focus();
- }else
- {
- // 정규식 - 이메일 유효성 검사
- 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})(\]?)$/;
- if(!regEmail.test($("#p_email").val().trim()))
- {
- alert("이메일 주소가 유효하지 않습니다");
- $("#p_email").focus();
- return false;
- }
- }
-
- if ( stringByteSize4UTF($("#p_user_name").val()) > 200 ) {
- alert("담당자명은 200자까지 입력하실 수 있습니다.");
- return;
- }
-
- if ( stringByteSize4UTF($("#p_passwd").val()) > 100 ) {
- alert("비밀번호는 100자까지 입력하실 수 있습니다.");
- return;
- }
-
- if ( stringByteSize4UTF($("#p_division").val()) > 50 ) {
- alert("부서는 50자까지 입력하실 수 있습니다.");
- return;
- }
-
- if ( stringByteSize4UTF($("#p_position").val()) > 20 ) {
- alert("직위는 20자까지 입력하실 수 있습니다.");
- return;
- }
-
- if ( stringByteSize4UTF($("#p_tel_num").val()) > 50 ) {
- alert("전화번호는 50자까지 입력하실 수 있습니다.");
- return;
- }
-
- if ( stringByteSize4UTF($("#p_fax_num").val()) > 50 ) {
- alert("팩스번호는 50자까지 입력하실 수 있습니다.");
- return;
- }
-
- if ( stringByteSize4UTF($("#p_email").val()) > 250 ) {
- alert("이메일은 250자까지 입력하실 수 있습니다.");
- return;
- }
-
- if(confirm("입력한 담당자 정보를 저장 하시겠습니까?"))
- {
- $("#fevent").val("SAVE_CHARGE");
- submitXmlRequest("/portal/own/ChargeDetail_form.screen", "SAVE_CHARGE", f, "VALUEOBJECT");
- }
-
- });
- });
-
-
-
-
-
- function doResult(resultObj) {
- try
- {
- document.form1.isSubmit = false;
-
- if( resultObj.getRequestEvent() == "SAVE_CHARGE")
- {
- if( resultObj.getSuccess() )
- {
- alert("저장되었습니다.");
-
- $("#fevent").val("GET_DETAIL");
-
- if($("#p_my_user_id").val() != "")
- {
- $("#form1").attr("action", "/portal/own/ChargeDetail.screen");
- $("#form1").submit();
- }
- else
- {
- location.href="/portal/own/ChargeList.screen";
- }
- }
- else
- {
- // dlgErrorMsg(resultObj.getMessage);
- alert(resultObj.getValueObject().get("errMsg"));
- }
- }
- else if( resultObj.getRequestEvent() == "DELETE_CHARGE")
- {
- if( resultObj.getSuccess() )
- {
- alert("삭제되었습니다.");
- location.href="/portal/own/ChargeList.screen";
- }
- else
- {
- alert(resultObj.getValueObject().get("errMsg"));
- }
- }
- }
- catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
-
-
- //-->
- </script>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <form id="form1" name="form1" method="post" modular:type="search">
- <INPUT type="hidden" name="fevent" id="fevent" value="">
- <input type="hidden" name="p_user_id" id="p_user_id" value="<%=params.get("p_user_id") %>" />
- <input type="hidden" name="s_user_id" id="s_user_id" value="<%=params.get("s_user_id") %>" />
- <input type="hidden" name="p_corp_id" id="p_corp_id" value="<%=params.get("p_corp_id") %>" />
- <input type="hidden" name="p_my_user_id" id="p_my_user_id" value="<%=vo.get("USER_ID") %>" />
- <input type="hidden" name="s_user_name" id="s_user_name" value="<%=params.get("s_user_name") %>" />
- <!-- 제목 및 버튼 -->
- <table width="100%">
- <colgroup>
- <col width="500" />
- <col width="*" />
- </colgroup>
- <tr>
- <th>
- <div align="left" id="title">
- <ul>
- <li><span id="resultListDivTitle">담당자 관리 상세</span></li>
- </ul>
- </div>
- </th>
- <td align="right">
- <div style="float: right; margin-top: 16px;">
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">목록</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_delete">삭제</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_save">저장</a></span>
- </div>
- </td>
- </tr>
- </table>
-
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">담당자 정보</span>
- </div>
- <div class="application-location"></div>
- </div>
- <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: auto;">
- <!-- 검색조건 영역 : 시작 -->
- <tr>
- <td height="1">
- <table class="form-table">
- <col width="10%">
- <col width="30%">
- <col width="10%">
- <col width="30%">
-
- <tr height="25">
- <!-- 검색조건 타이틀 1 -->
- <th class="required" style="text-align: left;">담당자명</th>
- <td >
- <input type="text" name="p_user_name" id="p_user_name" style="width: 85%;" value="<%=vo.get("USER_NAME")%>" />
- </td>
- <th class="required" style="text-align: left;">담당자 ID</th>
- <td >
- <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\" " %> />
- </td>
- </tr>
- <tr height="25">
- <!-- 검색조건 타이틀 1 -->
- <th class="required" style="text-align: left;">비밀번호</th>
- <td >
- <input type="password" name="p_passwd" id="p_passwd" style="width: 85%; border: 1px solid #CBCBCB;" value="<%=vo.get("PASSWD")%>" />
- </td>
- <th class="required" style="text-align: left;">비밀번호 확인</th>
- <td valign="center">
- <input type="password" name="p_repasswd" id="p_repasswd" style="width: 85%; border: 1px solid #CBCBCB;" value="<%=vo.get("PASSWD")%>"/>
- <br><span style="color: red; font-size: 11px;">*숫자,영문자 조합 8-15자리. 연속된 숫자,문자 4자리 이상 불가</span>
- </td>
- </tr>
- <tr height="25">
- <!-- 검색조건 타이틀 1 -->
- <th class="required" style="text-align: left;">부서</th>
- <td >
- <input type="text" name="p_division" id="p_division" style="width: 85%;" value="<%=vo.get("DIVISION") %>" />
- </td>
- <th class="required" style="text-align: left;">직위</th>
- <td >
- <input type="text" name="p_position" id="p_position" style="width: 85%;" value="<%=vo.get("POSITION") %>" />
- </td>
- </tr>
- <tr height="25">
- <!-- 검색조건 타이틀 1 -->
- <th class="required" style="text-align: left;">전화번호</th>
- <td >
- <input type="text" name="p_tel_num" id="p_tel_num" style="width: 64%;" value="<%=vo.get("TEL_NUM") %>" noHangelEng="true" /> <span style="color: red; font-size: 11px;">ex)000-0000-0000</span>
- </td>
- <th class="required" style="text-align: left;">팩스번호</th>
- <td >
- <input type="text" name="p_fax_num" id="p_fax_num" style="width: 64%;" value="<%=vo.get("FAX_NUM") %>" noHangelEng="true" /> <span style="color: red; font-size: 11px;">ex)000-0000-0000</span>
- </td>
- </tr>
- <tr height="25">
- <!-- 검색조건 타이틀 1 -->
- <th class="required" style="text-align: left;">핸드폰</th>
- <td >
- <input type="text" name="p_hp1" id="p_hp1" size="3" value="<%=vo.get("HP1") %>" numberOnly="true" maxlength="3"/> -
- <input type="text" name="p_hp2" id="p_hp2" size="4" value="<%=vo.get("HP2") %>" numberOnly="true" maxlength="4"/> -
- <input type="text" name="p_hp3" id="p_hp3" size="4" value="<%=vo.get("HP3") %>" numberOnly="true" maxlength="4"/>
- </td>
- <th class="required" style="text-align: left;">이메일</th>
- <td >
- <input type="text" name="p_email" id="p_email" style="width: 85%;" value="<%=vo.get("EMAIL")%>"/>
- </td>
- </tr>
- <tr height="25">
- <th class="required" style="text-align: left;">사용자 관리구분</th>
- <td style="vertical-align: middle;">
- <%=vo.get("default_yn").equals("Y") ? "관리자" : "사용자" %>
- </td>
-
- <th class="required" style="text-align: left;">사용여부</th>
- <td style="vertical-align: middle;">
- <input type="radio" name="use_yn" id="use_yn_1" value="Y" <%=vo.get("use_yn").equals("Y") ? "checked=\"checked\" " : "" %> /> 사용
- <input type="radio" name="use_yn" id="use_yn_2" value="N" <%=vo.get("use_yn").equals("N") ? "checked=\"checked\" " : "" %>/> 미사용
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <!-- 검색조건 영역 : 종료 -->
- <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
- <tr>
- <td height="1">
- <table border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
- <tr>
- <td>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
-
-
|