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 : EgovHpcmRegist.jsp
* @Description : EgovHpcmRegist 화면
* @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>
<script type="text/javaScript" language="javascript">
$( document ).ready(function(){
var radioVal = $('input[name="customType"]:checked').val();
chkCustomType(radioVal)
});
var uploadFileCount = 0; // 제작비용에 따른 첨부이미지 수량 변경
function chkCustomType(val){
/* if(val == '03'){
uploadFileCount = "3";
}else {
} */
uploadFileCount = "1";
$("input[name=limitcount]").val(uploadFileCount);
$('.limitcount_li').text(uploadFileCount);
}
function goList(){
var form = document.searchVO;
form.submit();
// location.href = "/uss/ion/custom/selectMjonMsgCustomList.do";
}
function handleFileUpload(files,obj) //업로드 function
{
//엑셀 및 TXT 파일만 업로드 할수 있도록 체크하기
var fileNm = files[0].name;
var fileExt = fileNm.split('.').pop().toLowerCase();
if (fileExt != "") {
if($.inArray(fileExt, ['jpg','jpeg','png']) == -1) {
alert('img, jpeg, png 파일만 업로드 할수 있습니다.');
return;
}
var limitsize = 1*300*1024; //파일 제한 체크(300kb)
var limitcount = $("input[name=limitcount]").val()*1 ;
if($('#tbody_fiielist').find('tr').length + files.length > limitcount ){
alert("업로드 파일은 최대 "+limitcount+"개 입니다.");
return ;
}
if($("#customFileCnt").val() + files.length > limitcount){
alert("업로드 파일은 최대 "+limitcount+"개 입니다.");
return ;
}
for (var i = 0; i < files.length; i++){
if(files[i].size > limitsize){
alert(files[i].name+"파일 사이즈가"+getStrFileSize(files[i].size)+"로 300kb 이하만 업로드 가능합니다.");
return ;
}
}
for (var i = 0; i < files.length; i++){
var fd = new FormData();
fd.append('file', files[i]);
var tmpObj = new Object();
tmpObj.name = "file_" + _fileIdx;
tmpObj.fileObj = files[i];
_fileForm2.push(tmpObj);
sendFileToServer(fd, obj, files[i], _fileIdx);
_fileIdx++;
var totalfileSize = 0;
$('.totalfileCount').text($('.item_file_size').length) ;
$('.item_file_size').each(function(){
totalfileSize += $(this).val()*1 ;
});
$('.totalfileSize').text(getStrFileSize(totalfileSize)) ;
}
}
}
function fn_delete(){
if(!confirm("주문취소 하시겠습니까?")){
return false;
}
var userId = $("#userId").val();
var customId = $("#customId").val();
var customAmount = $('input:radio[name=customType]:checked').val();
//alert(userId +" "+customId +" "+customAmount);
$.ajax({
type: "POST"
, url: "/uss/ion/msg/deletMsgCustomInfoAjax.do"
, data:{ "userId" : userId, "customId" : customId , "customPaymentYn" : "06", "customAmount" : customAmount}
, dataType:'json'
, cache: false
, async: false
, timeout: 600000
, success: function (returnData, status) {
if(status == 'success'){
if("fail"==returnData.result){
alert(returnData.message);
return;
}
alert("주문 취소되었습니다.");
goList();
} else if(status== 'fail'){
alert("저장에 실패하였습니다. !!");
}
}
,error: function (e) {
console.log("ERROR : ", e);
alert("삭제처리에 실패하였습니다.");
}
});
}
/* 등록 */
function fn_update(){
var paymentSelect = $("#customPaymentYn option:selected").val();
var data = new FormData(document.writeForm);
if(paymentSelect == "05"){
if(_fileForm2 == ""){
alert("등록 첨부파일이 없습니다.");
return;
}
_fileForm2.forEach(function(obj, idx) {
if (obj) data.append("file"+idx, obj.fileObj);
});
}else{
if(_fileForm2 != ""){
alert("제작완료인 경우만 첨부파일을 등록 할 수 있습니다.");
return;
}
}
$.ajax({
type: "POST",
enctype: 'multipart/form-data',
url: "/uss/ion/msg/updateMsgCustomInfoAjax.do",
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
//timeout: 600000,
success: function (returnData, status) {
if(status == 'success'){
if("fail"==returnData.result){
alert(returnData.message);
return;
}
alert("저장 되었습니다.");
goList();
} else if(status== 'fail'){
alert("저장에 실패하였습니다. !!");
}
},
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
});
}
function fnSelectMber(mberId) {
document.modiForm.mberId.value = mberId;
window.open("about:blank", 'popupSelectMber', 'width=900, height=1800, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=no');
document.modiForm.action = "<c:url value='/uss/umt/user/EgovGnrlselectedUserView.do'/>";
document.modiForm.target = "popupSelectMber";
document.modiForm.submit();
}
//문자맞춤제작 첨부파일 삭제 - 맞춤제작 테이블 CustomUploadImg 값 지워주기
function delCustomUploadImg() {
if(!confirm("업로드 파일을 삭제하시겠습니까?")){
return false;
}
var data = new FormData(document.writeForm);
$.ajax({
type: "POST",
url: "/uss/ion/msg/updateMsgCustomFileNullAjax.do",
data: data,
dataType:'json',
async: false,
processData: false,
contentType: false,
cache: false,
//timeout: 600000,
success: function (returnData, status) {
if(status == 'success'){
alert("삭제 되었습니다.");
location.reload();
} else if(status== 'fail'){
alert("삭제 실패하였습니다. !!");
}
},
error: function (e) { alert("삭제에 실패하였습니다."); console.log("ERROR : ", e); }
});
}
</script>
<style type="text/css">
.custom_put1_list {width:450px;}
.custom_put1_list:after {content:'';display:block;clear:both;}
.custom_put1_list .price {float:right;}
</style>
</head>
<body>
<form name="writeForm" id="writeForm" method="post">
<input type="hidden" id="customId" name="customId" value="${mjonMsgCustomInfo.customId}">
<input type="hidden" id="userId" name="userId" value="${mjonMsgCustomInfo.userId}">
<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>
<th>아이디</th>
<td>
<a href="#" onclick="javascript:fnSelectMber('<c:out value="${mjonMsgCustomInfo.userId}"/>'); return false;">
<c:out value="${mjonMsgCustomInfo.userId}"/>
</a>
</td>
</tr>
<tr>
<th>등록일자</th>
<td colspan="3">
<c:out value="${mjonMsgCustomInfo.frstRegistPnttm}"/>
</td>
</tr>
<tr>
<th>제작비용</th>
<td>
<c:forEach var="code" items="${codeResult}" varStatus="status">
<div class="custom_put1_list" id="customType${code.code}">
<input id="radio${status.count}" type="radio" name="customType" value="${code.codeDc}"
<c:if test="${mjonMsgCustomInfo.customType eq code.code}">checked="checked"</c:if> disabled="disabled">
<label for="radio${status.count}">${code.codeNm}</label>
<span class="price">
<span><fmt:formatNumber value="${code.codeDc}" type="number" pattern="####,###"/></span>원
</span>
</div>
</c:forEach>
</td>
</tr>
<tr>
<th>
제공방법
</th>
<td>
<input type="checkbox" checked="checked" disabled> <label for="">내보관함</label>
<input id="radio5" type="radio" name="customProvision" disabled="disabled" <c:if test="${mjonMsgCustomInfo.customProvision eq '1'}">checked="checked"</c:if>>
<label for="radio5">카카오톡</label>
<input id="radio6" type="radio" name="customProvision" disabled="disabled" <c:if test="${mjonMsgCustomInfo.customProvision eq '2'}">checked="checked"</c:if>>
<label for="radio6">이메일</label>
</td>
</tr>
<tr>
<th>연락처</th>
<td>
<c:out value="${mjonMsgCustomInfo.customPhoneNo}"/>
</td>
</tr>
<tr>
<th>요청사항</th>
<td>
<c:out value="${mjonMsgCustomInfo.customRequest}"/>
</td>
</tr>
<tr>
<th>요청 이미지</th>
<td>
<c:import url="/uss/ion/custom/selectMsgCustomSampleImgList.do" charEncoding="utf-8">
<c:param name="atchFileId" value="${mjonMsgCustomInfo.customChoiceImg}" />
<c:param name="fileSn" value="${mjonMsgCustomInfo.customChoiceImgFileSn}" />
</c:import>
</td>
</tr>
<tr>
<th><span class="reqArea">요청상태</span></th>
<td>
<%-- <ec:select codeId="ITN040" name="customPaymentYn" id="customPaymentYn" css="class='select'" selectedValue="${mjonMsgCustomInfo.customPaymentYn}" defaultValue="" defaultText="선택" /> --%>
<select name="customPaymentYn" id="customPaymentYn" class="select">
<c:forEach var="progCodeInfo" items="${progCodeList}">
<c:choose>
<c:when test="${mjonMsgCustomInfo.customPaymentYn eq '06'}">
<c:if test="${progCodeInfo.code eq '06'}">
<option value="${progCodeInfo.code}" <c:if test="${mjonMsgCustomInfo.customPaymentYn eq progCodeInfo.code}">selected="selected"</c:if>>${progCodeInfo.codeNm}</option>
</c:if>
</c:when>
<c:when test="${mjonMsgCustomInfo.customPaymentYn eq '05'}">
<c:if test="${progCodeInfo.code eq '05'}">
<option value="${progCodeInfo.code}" <c:if test="${mjonMsgCustomInfo.customPaymentYn eq progCodeInfo.code}">selected="selected"</c:if>>${progCodeInfo.codeNm}</option>
</c:if>
</c:when>
<c:otherwise>
<c:if test="${progCodeInfo.code ne '06'}">
<option value="${progCodeInfo.code}" <c:if test="${mjonMsgCustomInfo.customPaymentYn eq progCodeInfo.code}">selected="selected"</c:if>>${progCodeInfo.codeNm}</option>
</c:if>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th>맞춤제작 첨부파일 목록</th>
<td>
<c:import url="/uss/ion/custom/selectMsgCustomImgList.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${mjonMsgCustomInfo.customUploadImg}" />
<c:param name="fileType" value="customDown" />
</c:import>
</td>
</tr>
<tr>
<th>맞춤제작 업로드 목록</th>
<td>
<c:import url="/uss/ion/custom/selectMsgCustomImgList.do" charEncoding="utf-8">
<c:param name="param_atchFileId" value="${mjonMsgCustomInfo.customResultImg}" />
<c:param name="fileType" value="customUpload" />
<c:param name="customPaymentYn" value="${mjonMsgCustomInfo.customPaymentYn}" />
</c:import>
</td>
</tr>
<!-- 주문완료도 첨부파일 재업로드 가능하게 수정 23.01.25 -->
<c:if test="${mjonMsgCustomInfo.customPaymentYn ne '06'}">
<tr>
<th>파일 첨부</th>
<td class="upload_area">
<input type="hidden" name="limitcount" value="1" />
<div class="file_upload_box no_img_box fileWrap">
<table>
<colgroup>
<col style="width: 60%">
<col style="width: 10%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<tr>
<th>파일명</th>
<th>크기</th>
<th>등록일시</th>
<th>삭제</th>
</tr>
</thead>
</table>
</div>
<div class="fileWrap fileAfter file_list_div">
<table>
<colgroup>
<col style="width: 50%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 10%">
</colgroup>
<thead>
<tr>
<th>파일명</th>
<th>크기</th>
<th>등록일시</th>
<th>삭제</th>
</tr>
</thead>
<tbody id="tbody_fiielist">
<c:forEach var="fileList" items="${fileList}" varStatus="status">
<tr class="item_${fileList.atchFileId}_${fileList.fileSn} uploaded_obj">
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileMg}">
<td class="file_name">
<a href="javascript:fn_egov_downFile('${fileList.atchFileId}','${fileList.fileSn}')">
<img src="/direct/img/upload_hwp_img.png" alt="" />
<span class="file_name_text">${fileList.orignlFileNm}</span>
</a>
</td>
<td>
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"></span>
</td>
<td>
<c:out value="${fileList.creatDt}"/>
</td>
<td>
<input type="button" class="delBtn" onclick="delCustomUploadImg(); return false;">
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div class="fileInfo file_list_div">
<ul class="inline">
<li>
<p>최대 <span class="c_e40000 fwBold limitcount_li">1</span>개 | <span class="c_e40000 fwBold upload_number">300KB</span>제한</p>
</li>
<li>
<p><span class="c_456ded fwBold totalfileCount">1</span>개 | <span class="c_456ded fwBold totalfileSize">72.01KB</span></p>
</li>
</ul>
</div>
<div class="uploadBtm">
<input type="file" name="file_temp" id="file_temp" class="uploadFile">
</div>
</td>
</tr>
</c:if>
</tbody>
</table>
<div class="btnWrap">
<input type="button" class="btnType1 bg_888888" value="목 록" onclick="goList(); return false;">
<c:if test="${mjonMsgCustomInfo.customPaymentYn ne '06'}">
<input type="button" class="btnType1" value="수 정" onclick="fn_update(); return false;">
<c:if test="${mjonMsgCustomInfo.customPaymentYn ne '05'}">
<input type="button" class="btnType2 bg_888888" value="주문취소" onclick="fn_delete(); return false;">
</c:if>
</c:if>
</div>
</div>
</div>
</form>
<form name="searchVO" id="searchVO" method="post" action="/uss/ion/custom/selectMjonMsgCustomList.do">
<input type="hidden" name="searchSortCnd" value="<c:out value="${searchVO.searchSortCnd}" />"/>
<input type="hidden" name="searchSortOrd" value="<c:out value="${searchVO.searchSortOrd}" />"/>
<input type="hidden" name="searchCondition" value="<c:out value='${searchVO.searchCondition}'/>"/>
<input type="hidden" name="searchKeyword" value="<c:out value='${searchVO.searchKeyword}'/>"/>
<input type="hidden" name="pageUnit" value="<c:out value='${searchVO.pageUnit}'/>"/>
<input type="hidden" name="PageIndex" value="<c:out value='${searchVO.pageIndex}' default='1' /> "/>
</form>
<form name="modiForm" id="modiForm" method="post">
<input name="mberId" type="hidden" />
</form>
</body>
</html>