123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- <%--
- - FileName : OwnList.jsp
- - Author(s) : gyeongmo an
- - Date : 2014.7.2
- --%>
- <%@ 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 event = storage.getEvent();
-
- ValueObject vo = storage.getValueObject("ownListRowSet");
-
- String post_no1 = "";
- String post_no2 = "";
- if(!"".equals(vo.get("post_no"))) {
- post_no1 = vo.get("post_no").substring(0,3);
- post_no2 = vo.get("post_no").substring(3,6);
- }
- %>
- <script type="text/javascript">
- function _onReady(){
- jQuery("#btnSave").click(function() {
- // 사업자번호 체크
- if($("#corp_reg_no").val().trim() != "")
- {
- var regNum = /^[0-9]*$/;
- var corpRegNo = $("#corp_reg_no").val().trim();
-
- if(!regNum.test($("#corp_reg_no").val().trim()))
- {
- alert("사업자 번호는 숫자만 입력해 주세요.");
- $("#corp_reg_no").focus();
- return false;
- }
- if(corpRegNo.length < 10) {
- alert("사업자번호는 10자리로 입력해 주세요.");
- $("#corp_reg_no").focus();
- return false;
- }
- }
- else
- {
- alert("사업자 번호를 입력해 주세요");
- $("#corp_reg_no").focus();
- return false;
- }
-
-
- if($("#copr_no").val().trim() != "")
- {
- var regNum = /^[0-9]*$/;
- var corpRegNo = $("#copr_no").val().trim();
-
- if(!regNum.test($("#copr_no").val().trim()))
- {
- alert("법인번호는 숫자만 입력해 주세요.");
- $("#copr_no").focus();
- return false;
- }
- if(corpRegNo.length < 13) {
- alert("법인번호는 13자리로 입력해 주세요.");
- $("#copr_no").focus();
- return false;
- }
- }
- else
- {
- alert("법인번호를 입력해 주세요");
- $("#copr_no").focus();
- return false;
- }
-
-
- if($("#rep_name").val().trim() == "")
- {
- alert("대표자명을 입력해 주세요");
- $("#rep_name").focus();
- return false;
- } else if($("#rep_name").val().trim().length > 200) {
- alert("대표자명은 200자 까지 입력할 수 있습니다.");
- $("#rep_name").focus();
- return false;
- }
-
- if($("#corp_kor").val().trim().length > 200) {
- alert("한글 업체명은 200자 까지 입력할 수 있습니다.");
- $("#corp_kor").focus();
- return false;
- }
- if($("#corp_eng").val().trim().length > 200) {
- alert("영문 업체명은 200자 까지 입력할 수 있습니다.");
- $("#corp_eng").focus();
- return false;
- }
- if($("#corp_sts").val().trim().length > 100) {
- alert("업태는 100자리까지 입력할 수 있습니다.");
- $("#corp_sts").focus();
- return false;
- }
- if($("#biz_form").val().trim().length > 100) {
- alert("업종은 100자리까지 입력할 수 있습니다.");
- $("#biz_form").focus();
- return false;
- }
-
- if($("#post_no1").val().trim() == "" || $("#post_no2").val().trim() == "")
- {
- alert("우편번호를 선택해 주세요.");
- $("#post_no1").focus();
- return false;
- }
-
- var regExp = /^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
-
- if($("#corp_tel").val().trim() == "") {
- alert("전화번호를 입력하세요.");
- $("#corp_tel").focus();
- return false;
- }
- else if (!regExp.test($("#corp_tel").val().trim())) {
- alert("잘못된 전화번호입니다. 숫자, - 를 포함한 숫자만 입력하세요. 예) 050-XXXX-XXXX");
- $("#corp_tel").focus();
- return false;
- } else if($("#corp_tel").val().trim().length > 100) {
- alert("전화번호는 100자리까지 입력할 수 있습니다.");
- $("#corp_tel").focus();
- return false;
- }
-
- if($("#address").val().trim().length > 500) {
- alert("주소는 500자리까지 입력할 수 있습니다.");
- $("#address").focus();
- return false;
- }
-
- if(confirm("수정하시겠습니까?")) {
- submitXmlRequest("/sycs/own/OwnList_form.screen", "SAVE_OWN_LIST", document.form1);
- }
- });
- }
-
-
- function doResult(resultObj) {
- try {
- document.form1.isSubmit = false;
- if( resultObj.getRequestEvent() == "SAVE_OWN_LIST") {
- if( resultObj.getSuccess() )
- {
- alert("수정되었습니다.");
- }
- }
- }
- catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
-
- function searchPostCode() {
- /*
- var url = "/common/lib/dlgSearchZipCode.screen";
- result = window.showModalDialog(url,'zipCode','dialogWidth:550px;dialogHeight:540px;center:yes;help:no;status:no;scroll:no;resizable:no');
- if ( result == null ) {
- return;
- } else {
- document.form1.address.value = result[2];
- document.form1.post_no1.value = result[0].substring(0,3);
- document.form1.post_no2.value = result[0].substring(4,7);
- }
- */
-
- var win_id = "_searchPostCode";
- var link = "/common/lib/dlgSearchZipCode.screen";
- link += "?pop_win_id="+win_id;
- fLayerPop(win_id, link, 550,540, '', '', 'NO');
- }
-
- function searchPostCodeClose(result) {
- if( result != null ){
- document.form1.address.value = result[2];
- document.form1.post_no1.value = result[0].substring(0,3);
- document.form1.post_no2.value = result[0].substring(4,7);
- }
- fLayerPopClose('_searchPostCode');
- }
- </script>
- <form id="form1" name="form1" method="post">
- <INPUT type="hidden" name="fevent" id="fevent" value="">
- <!-- 제목 및 버튼 -->
- <table width="100%">
- <colgroup>
- <col width="500" />
- <col width="*" />
- </colgroup>
- <tr>
- <th>
- <div align="left" id="title">
- <ul>
- <li>본사관리</li>
- </ul>
- </div>
- </th>
- <td align="right">
- <span class="btnSearch center"><a href="javascript:void(0);" id="btnSave">수정</a></span>
- </td>
- </tr>
- </table>
-
- <TABLE class="form-table">
- <col width="150px">
- <col>
- <col width="150px">
- <col>
-
- <tr height="25">
- <!-- 검색조건 타이틀 1 -->
- <th class="required">
- 사업자번호
- </th>
- <td>
- <input type="text" name="corp_reg_no" id="corp_reg_no" numberOnly="true" style="width: 90%;" maxlength="10" value="<%=vo.get("corp_reg_no")%>"/>
- </td>
- <th class="required">
- 법인번호
- </th>
- <td>
- <input type="text" name="copr_no" id="copr_no" numberOnly="true" style="width: 90%;" maxlength="13" value="<%=vo.get("copr_no")%>"/>
- </td>
- </tr>
- <tr height="25">
- <Th class="required">
- 업체명(한글)
- </th>
- <td>
- <input type="text" name="corp_kor" id="corp_kor" style="width: 90%;" value="<%=vo.get("corp_kor")%>"/>
- </td>
- <th class="required">
- 업체명(영문)
- </th>
- <td>
- <input type="text" name="corp_eng" id="corp_eng" style="width: 90%;" value="<%=vo.get("corp_eng")%>"/>
- </td>
- </tr>
- <tr height="25">
- <th class="required">
- 업태
- </th>
- <td>
- <input type="text" name="corp_sts" id="corp_sts" style="width: 90%;" value="<%=vo.get("corp_sts")%>"/>
- </td>
- <th class="required">
- 업종
- </th>
- <td>
- <input type="text" name="biz_form" id="biz_form" style="width: 90%;" value="<%=vo.get("biz_form")%>"/>
- </td>
- </tr>
- <tr height="25">
- <th class="required">
- 대표자명
- </th>
- <td>
- <input type="text" name="rep_name" id="rep_name" style="width: 90%;" value="<%=vo.get("rep_name")%>"/>
- </td>
- <th class="required">
- 전화번호
- </th>
- <td colspan="3" >
- <input type="text" name="corp_tel" id="corp_tel" style="width: 90%;" value="<%=vo.get("corp_tel")%>"/>
- </td>
- </tr>
- <tr height="25">
- <th class="required">
- 주소
- </th>
- <td colspan="3">
- <%= InputText.get("post_no1", post_no1, 3, 3, "desc=우편번호,readOnly,center") %>-
- <%= InputText.get("post_no2", post_no2, 3, 3, "desc=우편번호,readOnly,center") %>
- <IMG onclick="searchPostCode();" src="/img/buyer/button/bt_search_right.gif" alt="우편번호검색" border="0" align="absmiddle" style="cursor:hand;">
- <input type="text" name="address" id="address" style="width: 88%;" value="<%=vo.get("address")%>"/>
- </td>
- </tr>
- </table>
- </form>
|