123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734 |
- <%--
- - FileName : SuppJoinRequest.jsp
- - Author(s) : 이성민
- - Date : 2014-06-24
- --%>
-
- <%@ 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("SuppJoinRequest");
-
- String status = "";
- status = params.get("status");
-
- String job_gubun = "";
-
- if(params.get("job_div").equals("P"))
- {
- job_gubun = "구매";
- }
- else
- {
- job_gubun = "외주";
- }
-
- %>
- <script type="text/javascript">
- <!--
- $(function(){
-
- var event = "<%=event%>";
- var status = "<%=vo.get("STATUS_CODE")%>";
- var f = document.form1;
-
- if(event == "")
- {
- $("#btn_confim_area").css("display", "none");
- //$("#btn_save_area").css("display", "inline");
- $("#btn_confim2_area").css("display", "inline");
- $("#btn_delete_area").css("display", "none");
- }
- else if(event == "GET_DETAIL")
- {
- $("#corp_reg_no").attr("readonly", true);
- $("#corp_reg_no").css("background-color", "#f0f0f0");
- $("#btn_confim2_area").css("display", "none");
-
- if(status == "AA")
- {
- // $("#btn_confim").css("display", "inline");
- // $("#btn_save").css("display", "none");
- $("#btn_delete_area").css("display", "inline");
- }
- else
- {
- // $("#btn_confim").css("display", "inline");
- //$("#btn_save_area").css("display", "none");
- //$("#btn_save_area").css("display", "inline");
- $("#btn_confim2_area").css("display", "none");
- // $("#btn_delete").css("display", "inline");
- $("#corp_reg_no").attr("readonly", true);
- $("#corp_reg_no").addClass("bg_gry");
- }
- }
-
-
- //숫자만 입력받기.
- $(document).on("keyup", "input:text[numberOnly]", function() {$(this).val( $(this).val().replace(/[^0-9]/gi,"") );});
-
-
-
- $("#btn_list").click(function(){
- var job_div = $("#job_div").val();
-
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequestList.screen");
- $("#form1").attr("target", "_self");
- $("#form1").attr("method", "post");
- $("#form1").submit();
- });
-
-
- $("#btn_confim2").click(function(){
-
- var u_email = $("#email");
- //var u_phone = $('#user_phone');
-
-
- // 정규식 - 이메일 유효성 검사
- 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})(\]?)$/;
-
- // 정규식 -전화번호 유효성 검사
- //var regPhone = /^((01[1|6|7|8|9])[1-9]+[0-9]{6,7})|(010[1-9][0-9]{7})$/;
-
-
- //입력값 체크
- if($("#corp_reg_no").val().trim() != "")
- {
- var regNum = /^[0-9]{10}$/;
-
- if(!regNum.test($("#corp_reg_no").val().trim()))
- {
- alert("사업자 번호를 확인해 주세요.");
- $("#corp_reg_no").focus();
- return false;
- }
-
- /*
- if(!chkVenderNum($("#corp_reg_no").val().trim()))
- {
- alert("사업자번호 형식이 아닙니다.");
- $("#corp_reg_no").focus();
- return false;
- }
- */
- }
- else
- {
- alert("사업자 번호를 입력해 주세요");
- $("#corp_reg_no").focus();
- return false;
- }
-
- if($("#corp_kor").val().trim() == "")
- {
- alert("업체명을 입력해 주세요");
- $("#corp_kor").focus();
- return false;
- }
- else if($("#rep_name").val().trim() == "")
- {
- alert("대표자명을 입력해 주세요");
- $("#rep_name").focus();
- return false;
- }
- else if($("#user_name").val().trim() == "")
- {
- alert("담당자명을 입력해 주세요");
- $("#user_name").focus();
- return false;
- }
- if(u_email.val().trim() == "")
- {
- alert("이메일주소를 입력 해 주세요");
- u_email.focus();
- return false;
- }
- else
- {
- if(!regEmail.test(u_email.val()))
- {
- alert("이메일 주소가 유효하지 않습니다");
- u_email.focus();
- return false;
- }
- }
-
- if($("#h_phon_1").val().trim() == "" || $("#h_phon_2").val().trim() == "" || $("#h_phon_3").val().trim() == "" )
- {
- alert("휴대전화 번호를 입력해 주시기 바랍니다.");
- return false;
- }
-
- if(confirm("가입요청 하시겠습니까?"))
- {
- $("#p_status").val("00");
- submitXmlRequest("/supplier/purchase/SuppJoinRequest_form.screen", "SAVE_DATA2", f, "VALUEOBJECT");
- }
-
- });
-
- $("#btn_confim").click(function(){
-
- var u_email = $("#email");
- //var u_phone = $('#user_phone');
-
-
- // 정규식 - 이메일 유효성 검사
- 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})(\]?)$/;
-
- // 정규식 -전화번호 유효성 검사
- //var regPhone = /^((01[1|6|7|8|9])[1-9]+[0-9]{6,7})|(010[1-9][0-9]{7})$/;
-
-
- //입력값 체크
- if($("#corp_reg_no").val().trim() != "")
- {
- var regNum = /^[0-9]{10}$/;
-
- if(!regNum.test($("#corp_reg_no").val().trim()))
- {
- alert("사업자 번호를 확인해 주세요.");
- $("#corp_reg_no").focus();
- return false;
- }
-
- /*
- if(!chkVenderNum($("#corp_reg_no").val().trim()))
- {
- alert("사업자번호 형식이 아닙니다.");
- $("#corp_reg_no").focus();
- return false;
- }
- */
- }
- else
- {
- alert("사업자 번호를 입력해 주세요");
- $("#corp_reg_no").focus();
- return false;
- }
-
- if($("#corp_kor").val().trim() == "")
- {
- alert("업체명을 입력해 주세요");
- $("#corp_kor").focus();
- return false;
- }
- else if($("#rep_name").val().trim() == "")
- {
- alert("대표자명을 입력해 주세요");
- $("#rep_name").focus();
- return false;
- }
- else if($("#user_name").val().trim() == "")
- {
- alert("담당자명을 입력해 주세요");
- $("#user_name").focus();
- return false;
- }
- if(u_email.val().trim() == "")
- {
- alert("이메일주소를 입력 해 주세요");
- u_email.focus();
- return false;
- }
- else
- {
- if(!regEmail.test(u_email.val()))
- {
- alert("이메일 주소가 유효하지 않습니다");
- u_email.focus();
- return false;
- }
- }
-
- if($("#h_phon_1").val().trim() == "" || $("#h_phon_2").val().trim() == "" || $("#h_phon_3").val().trim() == "" )
- {
- alert("휴대전화 번호를 입력해 주시기 바랍니다.");
- return false;
- }
-
- if(confirm("가입요청 하시겠습니까?"))
- {
- $("#p_status").val("00");
- submitXmlRequest("/supplier/purchase/SuppJoinRequest_form.screen", "UPDATE_DATA", f);
- }
- });
-
-
-
- $("#btn_save").click(function(){
-
- var u_email = $("#email");
- //var u_phone = $('#user_phone');
-
-
- // 정규식 - 이메일 유효성 검사
- 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})(\]?)$/;
-
- // 정규식 -전화번호 유효성 검사
- //var regPhone = /^((01[1|6|7|8|9])[1-9]+[0-9]{6,7})|(010[1-9][0-9]{7})$/;
-
-
-
-
- //입력값 체크
- if($("#corp_reg_no").val().trim() != "")
- {
- var regNum = /^[0-9]{10}$/;
-
- if(!regNum.test($("#corp_reg_no").val().trim()))
- {
- alert("사업자 번호를 확인해 주세요.");
- $("#corp_reg_no").focus();
- return false;
- }
- else
- {
- /*
- if(!chkVenderNum($("#corp_reg_no").val().trim()))
- {
- alert("사업자번호 형식이 아닙니다.");
- $("#corp_reg_no").focus();
- return false;
- }
- */
- }
- }
- else
- {
- alert("사업자 번호를 입력해 주세요");
- $("#corp_reg_no").focus();
- return false;
- }
-
- if($("#corp_kor").val().trim() == "")
- {
- alert("업체명을 입력해 주세요");
- $("#corp_kor").focus();
- return false;
- }
- else if($("#rep_name").val().trim() == "")
- {
- alert("대표자명을 입력해 주세요");
- $("#rep_name").focus();
- return false;
- }
- else if($("#user_name").val().trim() == "")
- {
- alert("담당자명을 입력해 주세요");
- $("#user_name").focus();
- return false;
- }
- else if($("#h_phon_1").val().trim() == "" || $("#h_phon_2").val().trim() == "" || $("#h_phon_3").val().trim() == "" )
- {
- alert("휴대전화 번호를 입력해 주시기 바랍니다.");
- return false;
- }
-
- if(u_email.val().trim() == "")
- {
- alert("이메일주소를 입력 해 주세요");
- u_email.focus();
- return false;
- }
- else
- {
- if(!regEmail.test(u_email.val()))
- {
- alert("이메일 주소가 유효하지 않습니다");
- u_email.focus();
- return false;
- }
- }
-
- if(confirm("저장 하시겠습니까?"))
- {
- if(status == "AA")
- {
- $("#p_status").val("AA");
- submitXmlRequest("/supplier/purchase/SuppJoinRequest_form.screen", "UPDATE_DATA", f);
- }
- else
- {
- $("#p_status").val("AA");
- submitXmlRequest("/supplier/purchase/SuppJoinRequest_form.screen", "SAVE_DATA", f, "VALUEOBJECT");
- }
- }
- });
-
- $("#btn_save2").click(function(){
-
- var u_email = $("#email");
-
-
- // 정규식 - 이메일 유효성 검사
- 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($("#corp_reg_no").val().trim() != "")
- {
- var regNum = /^[0-9]{10}$/;
-
- if(!regNum.test($("#corp_reg_no").val().trim()))
- {
- alert("사업자 번호를 확인해 주세요.");
- $("#corp_reg_no").focus();
- return false;
- }
- }
- else
- {
- alert("사업자 번호를 입력해 주세요");
- $("#corp_reg_no").focus();
- return false;
- }
-
- if($("#corp_kor").val().trim() == "")
- {
- alert("업체명을 입력해 주세요");
- $("#corp_kor").focus();
- return false;
- }
- else if($("#rep_name").val().trim() == "")
- {
- alert("대표자명을 입력해 주세요");
- $("#rep_name").focus();
- return false;
- }
- else if($("#user_name").val().trim() == "")
- {
- alert("담당자명을 입력해 주세요");
- $("#user_name").focus();
- return false;
- }
- else if($("#h_phon_1").val().trim() == "" || $("#h_phon_2").val().trim() == "" || $("#h_phon_3").val().trim() == "" )
- {
- alert("휴대전화 번호를 입력해 주시기 바랍니다.");
- return false;
- }
-
- if(u_email.val().trim() == "")
- {
- alert("이메일주소를 입력 해 주세요");
- u_email.focus();
- return false;
- }
- else
- {
- if(!regEmail.test(u_email.val()))
- {
- alert("이메일 주소가 유효하지 않습니다");
- u_email.focus();
- return false;
- }
- }
-
- if( status == "" ) {
- if( confirm("저장 하시겠습니까? ") ) {
- $("#p_status").val("AA");
- submitXmlRequest("/supplier/purchase/SuppJoinRequest_form.screen", "NEW_SAVE_DATA", f, "VALUEOBJECT");
- }
- } else {
- if( confirm("수정 하시겠습니까? ") ) {
- $("#p_status").val("AA");
- submitXmlRequest("/supplier/purchase/SuppJoinRequest_form.screen", "NEW_UPDATE_DATA", f, "VALUEOBJECT");
- }
- }
- });
-
-
-
- $("#btn_delete").click(function(){
- if(confirm("삭제 하시겠습니까?"))
- {
- submitXmlRequest("/supplier/purchase/SuppJoinRequest_form.screen", "DELETE_DATA", f);
- }
- });
-
-
- });
-
-
-
- function doResult(resultObj) {
-
- try {
- if( resultObj.getRequestEvent() == "SAVE_DATA") {
- if( resultObj.getSuccess() )
- {
- alert("등록되었습니다.");
- var job_div = $("#job_div").val();
-
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequestList.screen");
- $("#form1").attr("target", "_self");
- $("#form1").attr("method", "post");
- $("#form1").submit();
- document.form1.isSubmit = false;
- }
- else
- {
- // dlgErrorMsg(resultObj.getMessage);
- alert(resultObj.getValueObject().get("errMsg"));
- document.form1.isSubmit = false;
- }
- }
- else if( resultObj.getRequestEvent() == "SAVE_DATA2")
- {
- if( resultObj.getSuccess() )
- {
- alert("가입요청 되었습니다.");
- var job_div = $("#job_div").val();
-
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequestList.screen");
- $("#form1").attr("target", "_self");
- $("#form1").attr("method", "post");
- $("#form1").submit();
- document.form1.isSubmit = false;
- }
- else
- {
- // dlgErrorMsg(resultObj.getMessage);
- alert(resultObj.getValueObject().get("errMsg"));
- document.form1.isSubmit = false;
- }
- }
- else if(resultObj.getRequestEvent() == "UPDATE_DATA")
- {
- if( resultObj.getSuccess() )
- {
- document.form1.isSubmit = false;
-
- if($("#p_status").val() == "AA")
- {
- alert("저장 하였습니다.");
-
- $("#fevent").val("GET_DETAIL");
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequest.screen");
- $("#form1").submit();
-
- }
- else
- {
- alert("가입요청 하였습니다.");
- // $("#fevent").val("GET_DETAIL");
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequestList.screen");
- $("#form1").attr("target", "_self");
- $("#form1").attr("method", "post");
- $("#form1").submit();
- }
-
- }
- else
- {
- document.form1.isSubmit = false;
- // dlgErrorMsg(resultObj);
- alert("수정이 실패하였습니다.");
- }
- }
- else if(resultObj.getRequestEvent() == "DELETE_DATA")
- {
- if( resultObj.getSuccess() )
- {
- document.form1.isSubmit = false;
-
- alert("삭제 되었습니다.");
-
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequestList.screen");
- $("#form1").attr("target", "_self");
- $("#form1").attr("method", "post");
- $("#form1").submit();
-
- }
- else
- {
- document.form1.isSubmit = false;
- // dlgErrorMsg(resultObj);
- alert("삭제가 실패하였습니다.");
- }
- } else if( resultObj.getRequestEvent() == "NEW_SAVE_DATA" ) {
- if( resultObj.getSuccess() )
- {
- alert("저장 하였습니다.");
- var job_div = $("#job_div").val();
-
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequestList.screen");
- $("#form1").attr("target", "_self");
- $("#form1").attr("method", "post");
- $("#form1").submit();
- document.form1.isSubmit = false;
- }
- else
- {
- // dlgErrorMsg(resultObj.getMessage);
- alert(resultObj.getValueObject().get("errMsg"));
- document.form1.isSubmit = false;
- }
- } else if ( resultObj.getRequestEvent() == "NEW_UPDATE_DATA" ) {
- if( resultObj.getSuccess() )
- {
- document.form1.isSubmit = false;
-
- alert("수정 하였습니다.");
-
- $("#fevent").val("GET_DETAIL");
- $("#form1").attr("action", "/supplier/purchase/SuppJoinRequest.screen");
- $("#form1").submit();
- }
- else
- {
- document.form1.isSubmit = false;
- alert("수정 실패하였습니다.");
- }
- }
- }
- 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_corp_id" id="p_corp_id" value="<%=params.get("p_corp_id") %>" />
- <input type="hidden" name="p_charge_seq" id="p_charge_seq" value="<%=vo.get("CHARGE_SEQ") %>" />
- <input type="hidden" name="job_div" id="job_div" value="<%=params.get("job_div") %>" />
- <input type="hidden" name="p_status" id="p_status" value="" />
- <!-- 목록 파라메터 -->
- <input type="hidden" name="corp_no" id="corp_no" value="<%=params.get("corp_no") %>" />
- <input type="hidden" name="corp_name" id="corp_name" value="<%=params.get("corp_name") %>" />
- <input type="hidden" name="corp_status" id="corp_status" value="<%=params.get("corp_status") %>" />
- <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;">
- <tr>
- <td style="text-align: left;">
- <div align="left" id="title" style="float: left;">
- <ul>
- <li><%=job_gubun %>_협력업체가입요청 상세(<%=vo.get("status").equals("") ? "작성중" : vo.get("status")%>)</li>
- <li>
- </ul>
- </div>
- </td>
- <td style="text-align: right; vertical-align: bottom;">
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">목록</a></span>
- <!-- <span class="btnSearch center" id="btn_save_area"><a href="javascript:void(0);" id="btn_save">저장</a></span> -->
- <span class="btnSearch center" id="btn_save_area"><a href="javascript:void(0);" id="btn_save2">저장</a></span>
- <span class="btnSearch center" id="btn_delete_area"><a href="javascript:void(0);" id="btn_delete">삭제</a></span>
- <span class="btnSearch center" id="btn_confim_area"><a href="javascript:void(0);" id="btn_confim">가입요청</a></span>
- <span class="btnSearch center" id="btn_confim2_area"><a href="javascript:void(0);" id="btn_confim2">가입요청</a></span>
- </td>
- </tr>
- </table>
- <!-- 발주의뢰정보 : 시작 -->
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">회사정보</span>
- </div>
- </div>
- <table cellspacing="1" cellpadding="0" class="form-table">
- <colgroup>
- <col width="100px"/>
- <col WIDTH="25%"/>
- <col width="100px"/>
- <col WIDTH="25%"/>
- <col width="100px"/>
- <col WIDTH="25%"/>
- </colgroup>
- <!-- 검색조건 타이틀 1 -->
- <TH class="required">
- 사업자번호
- </th>
- <td>
- <input type="text" name="corp_reg_no" id="corp_reg_no" numberOnly="true" SIZE="10" maxlength="10" value="<%=vo.get("corp_reg_no")%>" />
- </td>
- <TH class="required">
- 업체명
- </th>
- <td>
- <input type="text" name="corp_kor" id="corp_kor" style="width: 85%;" value="<%=vo.get("corp_kor")%>" />
- </td>
- <TH class="required">
- 대표자명
- </th>
- <td>
- <input type="text" name="rep_name" id="rep_name" style="width: 85%;" value="<%=vo.get("rep_name")%>"/>
- </td>
- </tr>
-
- <tr height="25">
- <th>
- 상태
- </th>
- <td COLSPAN="5">
- <%=vo.get("status").equals("") ? "작성중" : vo.get("status")%>
- </td>
- </tr>
- </table>
- <div class="application-info magT20">
- <div class="application-sub-title">
- <span class="title">담당자 정보</span>
- </div>
- </div>
- <table cellspacing="1" cellpadding="0" class="form-table">
- <colgroup>
- <col width="100px"/>
- <col WIDTH="25%"/>
- <col width="100px"/>
- <col WIDTH="25%"/>
- <col width="100px"/>
- <col WIDTH="25%"/>
- </colgroup>
-
- <tr height="25">
- <TH class="required">
- 담당자명
- </th>
- <td class="search_table_data">
- <input type="text" name="user_name" id="user_name" style="width: 85%;" value="<%=vo.get("user_name")%>"/>
- </td>
- <TH class="required">
- 이메일
- </th>
- <td class="search_table_data">
- <input type="text" name="email" id="email" style="width: 85%;ime-mode:inactive" value="<%=vo.get("email")%>"/>
- </td>
- <TH class="required">
- 휴대전화
- </th>
- <td class="search_table_data">
- <input type="text" name="h_phon_1" id="h_phon_1" SIZE="3" numberOnly="true" maxlength="3" value="<%=vo.get("HP1")%>"/> -
- <input type="text" name="h_phon_2" id="h_phon_2" SIZE="4" numberOnly="true" maxlength="4" value="<%=vo.get("hp2")%>"/> -
- <input type="text" name="h_phon_3" id="h_phon_3" SIZE="4" numberOnly="true" maxlength="4" value="<%=vo.get("hp3")%>"/>
- </td>
- </tr>
- </table>
- </form>
|