File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%
/**
* @Class Name : AddrAgencyInsert.jsp
* @Description : AddrAgencyInsert화면
* @Modification Information
* @
* @ 수정일 수정자 수정내용
* @ ------- -------- ---------------------------
* @ 2009.02.01 박정규 최초 생성
* 2016.06.13 김연호 표준프레임워크 v3.6 개선
*
* @author 공통서비스팀
* @since 2009.02.01
* @version 1.0
* @see
*
*/
%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>팝업창관리 관리</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<c:url value='/js/EgovMultiFile.js'/>"></script>
<!-- for validator #1 -->
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%>
<!-- for validator #1 -->
<!-- for validator #2 -->
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
<validator:javascript formName="addrAgencyVO" staticJavascript="false" xhtml="true" cdata="false" />
<!-- for validator #2 -->
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
<c:if test="${!empty mjPhoneMemberVO.phmId}">
$('.no_modi').find('input').prop('readonly', true);
$('.userId').find('input').prop('readonly', true);
/* $('.contWrap').find('textarea').prop('readonly', true); */
/* $('select[name=agentCode] option').not(":selected").attr("disabled", "disabled"); */
</c:if>
<c:if test="${empty mjPhoneMemberVO.phmId}">
$('.no_modi').remove();
//문자 바이트수 계산하기
var ibyte = 0;
$('textarea[name=smsTxt]').keyup(function(e){
ibyte = calByte.getByteLength($(this).val());
if(ibyte > 200){
alert("내용은 200Byte를 넣을수 없습니다.");
$('textarea[name=smsTxt]').val(calByte.cutByteLength($(this).val(), 200));
$('.byte').find('span').html(calByte.getByteLength($('textarea[name=smsTxt]').val()));
return false ;
}else{
$('.byte').find('span').html( ibyte) ;
}
});//문자 바이트수 계산하기 끝
</c:if>
});
/* 등록 */
function fn_insert(){
if (!validateAddrAgencyVO(document.addrAgencyVO)) return;
goWebSave1();
}
/* 글 저장 function */
function goWebSave1(method_parm){ //method_parm :관리자로그 메소드에서 사용.(파일업로드 부분 공통으로 사용하여, 페이지 구분을 위해)
var _fileForm2 = new Array();
if(undefined !=$("input[name=limitcount]").val() && ""!=$("input[name=limitcount]").val() ){
if($('#atchFileNece').length > 0 ){
if($('#tbody_fiielist').find('tr').length == 0){
alert("첨부파일을 추가해 주십시오");
return false;
}
}
}
var msg;
msg = "해당 첨부파일을 수정하시겠습니까?";
var data = new FormData(document.addrAgencyVO == undefined ? document.board : document.addrAgencyVO);
_fileForm2.forEach(function(obj, idx) {
if (obj) data.append("file"+idx, obj.fileObj);
});
var url = "";
url = "/uss/ion/addragency/insertAddrAgencyAjax.do";
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: url,
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
//timeout: 600000,
success: function (returnData, status) {
//alert(returnData.message);
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
if("success"==returnData.result){
alert("저장 되었습니다.");
//$("#addrAgencyVO")[0].reset();
//listLoad();
location.href="/uss/ion/addragency/selectAddrAgencyList.do";
}else{
alert(returnData.message);
return;
}
} else if(status== 'fail'){
alert("저장에 실패하였습니다. !!");
}
},
error: function (request,status,error) {
//alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
alert("저장에 실패하였습니다.");
console.log("ERROR : ", e);
}
});
}
function changeValue(obj){
$('#atFileBasicWrite').val(obj.value);
}
</script>
</head>
<body>
<!-- for validator #3 -->
<form:form commandName="addrAgencyVO" name="addrAgencyVO" id="addrAgencyVO" method="post" enctype="multipart/form-data">
<input type="hidden" name="bbsId" value="BBSMSTR_000000000751" />
<!-- for validator #3 -->
<input type="hidden" name="addrAgencyId" value="${AddrAgencyVO.addrAgencyId}" />
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">주소록 입력 대행(무료) 리스트</h2>
<p class="tType6 c_999999">사용자가 신청한 주소록 입력 대행(무료) 현황 리스트입니다.</p>
</div>
<div class="pageCont">
<table class="tbType2">
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<tr class="userId">
<th>아이디</th>
<td colspan="3">${loginVO.id}
</td>
</tr>
<tr class="userId">
<th>신규 그룹명</th>
<td colspan="3">
<input type="text" name="addrGrpNm" value="${AddrAgencyVO.addrGrpNm}" title="신규 그룹명" maxlength="100" />
</td>
</tr>
<tr class="userId">
<th>휴대폰 번호</th>
<td colspan="3">
<input type="text" name="addrPhoneNo" value="${AddrAgencyVO.addrPhoneNo}"
maxlength="12"
oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');"
title="휴대폰 번호" />
</td>
</tr>
<tr class="userId">
<th>주소록 파일</th>
<td class="attachedFile_wrap">
<label for="" class="label">주소록 파일첨부</label>
<input type="text" placeholder="* 첨부가능 파일 xlsx, xls, hwp, txt, doc, docx, csv 각 10MB 이내" readonly
id="atFileBasicWrite"
name="atFileBasicWrite"/>
<input type="file" name="file" id="file" style="display:none"
accept=".xlsx, .xls, .hwp, .txt, .doc, .docx, .csv"
onchange="changeValue(this); return false;"/>
<button type="button" class="btnType btnType9"
onclick="document.all.file.click(); return false;"
>파일첨부</button>
<span class="reqTxt6">※ 컴퓨터 파일(엑셀, 한셀, 한글, 텍스트)만 등록 가능합니다.</span>
</td>
</tr>
<tr>
<th scope="row" class="vTop">요청사항</th>
<td class="adress_textarea">
<label for="nttCn" class="label">요청사항 입력</label>
<textarea path="nttCn"
style="width: 700px;height: 200px;"
id="nttCn"
name="nttCn"
placeholder="요청사항을 기재해주세요."
maxlength="4000"
onfocus="this.placeholder=''" onblur="this.placeholder='요청사항을 기재해주세요.'"></textarea>
</td>
</tr>
<tr>
<th>처리상태</th>
<td colspan="3">
<ec:select codeId="ITN043" name="processStatus" id="processStatus" css="class='select'" />
</td>
</tr>
</tbody>
</table>
<div class="btnWrap">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick='location.href="/uss/ion/addragency/selectAddrAgencyList.do";'>
<input type="button" class="btnType1" value="저 장" onclick="fn_insert(); return false;">
</div>
</div>
</div>
</form:form>
</body>
</html>