312 lines
11 KiB
Plaintext
312 lines
11 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*"%>
|
|
<%@include file="/init.jsp"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function(){
|
|
fnc_setFileDropZone("reqDropzone", "${boardInfo.OBJID}", "${REQUEST_ATTACH_CODE}", "${REQUEST_ATTACH_NAME}", "fn_reqFileCallback",false);
|
|
|
|
fn_reqFileCallback();
|
|
|
|
//$("#systemType").val("${boardInfo.SYSTEM_TYPE}");
|
|
|
|
fn_changeSelectBox("${boardInfo.SYSTEM_TYPE}","category");
|
|
|
|
$("#category").val("${boardInfo.CATEGORY}");
|
|
|
|
fn_changeSelectBox("${boardInfo.REQ_CATEGORY}","reqCategory");
|
|
|
|
$("#reqCategory").val("${boardInfo.REQ_CATEGORY}");
|
|
|
|
});
|
|
|
|
function save(){
|
|
if(fnc_valitate("form1")){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/qna/saveReqQna.do",
|
|
data:$("#form1").serialize(),
|
|
dataType:"JSON",
|
|
async:false,
|
|
error: function(jqxhr, status, error){
|
|
},
|
|
success: function(result){
|
|
alert(result.message);
|
|
opener.fn_search();
|
|
self.close();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
//댓글작성
|
|
function fn_openNoticeContentsFormPopUp(parentObjId,objId){
|
|
window.open("","openNoticeContentsFormPopUp","width=526 height=341 menubar=no status=no");
|
|
|
|
var url = "/notice/openComentsFormPopUp.do";
|
|
var hiddenForm = document.hiddenForm;
|
|
|
|
hiddenForm.parentObjId.value = parentObjId;
|
|
hiddenForm.objId.value = objId;
|
|
hiddenForm.target = "openNoticeContentsFormPopUp";
|
|
hiddenForm.action = url;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function fn_reqFileCallback(){
|
|
fn_fileCallback('req',"${REQUEST_ATTACH_CODE}");
|
|
}
|
|
|
|
function fn_fileCallback(type,docType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${boardInfo.OBJID}", "docType":docType},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
//파일드롭다운 영역 hide
|
|
//첨부파일 목록 영역 show
|
|
$("#"+type+"AttachFileList").show();
|
|
$("#"+type+"UploadedFileArea").empty();
|
|
|
|
$.each(data, function(i){
|
|
|
|
var appendText = "";
|
|
appendText+= "<tr>";
|
|
appendText+= " <td><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>"+data[i].REAL_FILE_NAME+"</a></td>";
|
|
appendText+= " <td><div class='delete_btn' onclick='javascript:fnc_deleteFile(\""+data[i].OBJID+"\", \"fn_fileCallback\")'></div></td>";
|
|
appendText+= "</tr>";
|
|
|
|
$("#"+type+"UploadedFileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#"+type+"AttachFileList").hide();
|
|
$("#"+type+"UploadedFileArea").empty();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//시스템 구분에 따라서 카테고리 값을 보여준다.
|
|
function fn_changeSelectBox(selectValue,targetAreaId){
|
|
|
|
if("" != selectValue){
|
|
$("#"+targetAreaId).empty();
|
|
}
|
|
|
|
if("category" == targetAreaId){
|
|
if("pms" == selectValue){
|
|
$("#category").append("<option value=''>선택</option>");
|
|
}else if("pdm" == selectValue){
|
|
$("#"+targetAreaId).append("<option value=''>선택</option>");
|
|
$("#"+targetAreaId).append("<option value='Part'>Part</option>");
|
|
$("#"+targetAreaId).append("<option value='EO'>EO</option>");
|
|
$("#"+targetAreaId).append("<option value='BOM'>BOM</option>");
|
|
$("#"+targetAreaId).append("<option value='기술자료'>기술자료</option>");
|
|
$("#"+targetAreaId).append("<option value='기타'>기타</option>");
|
|
}
|
|
/* else if("viewer" == selectValue){
|
|
$("#category").append("<option value=''>준비중입니다.</option>");
|
|
} */
|
|
}else if("reqCategory" == targetAreaId){
|
|
$("#"+targetAreaId).append("<option value=''>선택</option>");
|
|
$("#"+targetAreaId).append("<option value='문의'>문의</option>");
|
|
$("#"+targetAreaId).append("<option value='확인요청'>확인요청</option>");
|
|
$("#"+targetAreaId).append("<option value='개선요청'>개선요청</option>");
|
|
$("#"+targetAreaId).append("<option value='데이터변경요청'>데이터변경요청</option>");
|
|
$("#"+targetAreaId).append("<option value='데이터삭제요청'>데이터삭제요청</option>");
|
|
$("#"+targetAreaId).append("<option value='오류'>오류</option>");
|
|
$("#"+targetAreaId).append("<option value='기타'>기타</option>");
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body class="backcolor_light_blue">
|
|
<form name="form1" id="form1" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${boardInfo.OBJID}">
|
|
<input type="hidden" name="boardType" id="boardType" value="qna">
|
|
<input type="hidden" name="systemType" id="systemType" value="pms">
|
|
<input type="hidden" name="actionType" id="actionType" value="${param.actionType}">
|
|
<input type="hidden" name="reqDate" id="reqDate" value="${boardInfo.REQ_REGDATE_TITLE}">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>Q&A</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="14%">
|
|
<col width="30%">
|
|
<col width="30%">
|
|
<col width="30%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="" class="">구분</label></td>
|
|
<%--
|
|
<td>
|
|
<select name="systemType" id="systemType" style="width:100%:" onchange="fn_changeSelectBox(this.value,'category');">
|
|
<option value="">선택</option>
|
|
<option value="pms" ${'pms' eq boardInfo.SYSTEM_TYPE?'selected':''}>PMS</option>
|
|
<option value="pdm" ${'pdm' eq boardInfo.SYSTEM_TYPE?'selected':''}>PDM</option>
|
|
<option value="viewer" ${'viewer' eq boardInfo.SYSTEM_TYPE?'selected':''}>Viewer</option>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<select name="category" id="category" style="width:100%;" onchange="fn_changeSelectBox(this.value,'reqCategory');">
|
|
</select>
|
|
</td>
|
|
--%>
|
|
<td>
|
|
<select name="reqCategory" id="reqCategory" style="width:100%" required reqTitle="구분" type="select"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="" class="">제목</label></td>
|
|
<td colspan="3">
|
|
<input type="text" maxlength="100" style="width:100%;" name="title" id="title" value="${boardInfo.TITLE}" required reqTitle="제목">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">상세내용</label><br/>(필요부분 작성)</td>
|
|
<td colspan="3">
|
|
<c:choose>
|
|
<c:when test="${!empty boardInfo and !empty boardInfo.TITLE}">
|
|
<textarea class="big_text_area" rows="20" style="width:100%;" name="reqContents" id="reqContents" placeholder="내용을 입력하세요." required reqTitle="내용">${boardInfo.REQ_CONTENTS}</textarea>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<textarea class="big_text_area" rows="20" style="width:100%;" name="reqContents" id="reqContents" placeholder="내용을 입력하세요." required reqTitle="내용">메뉴 :
|
|
|
|
해당데이터 :
|
|
|
|
내용 :
|
|
</textarea>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" rowspan="1">
|
|
<label for="">첨부파일</label>
|
|
</td>
|
|
<td colspan="3">
|
|
<div id="reqDropzone" class="dropzone" style="width:98.8%;">Drag & Drop Files Here</div>
|
|
<div id="reqAttachFileList" style="height:50px;">
|
|
<table id="reqUploadedFileAreaTable" class="spec_data_in_table">
|
|
<colgroup>
|
|
<col width="*">
|
|
<col width="3%">
|
|
</colgroup>
|
|
<tbody id="reqUploadedFileArea">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="3" class="input_title"><label for="">이미지</label></td>
|
|
<td colspan="3" rowspan="3" >
|
|
<jsp:include page="/WEB-INF/view/common/fileWidget_include.jsp">
|
|
<jsp:param name="fileType" value="REQUEST_ATTACH" />
|
|
<jsp:param name="fileTypeTxt" value="Request Attach File" />
|
|
<jsp:param name="viewType" value="IMG1" />
|
|
<jsp:param name="imgStyle" value="width:96% !important; height:132px; margin:0;padding:0;" />
|
|
<jsp:param name="isModify" value="false" />
|
|
<jsp:param name="targetObjid" value="${boardInfo.OBJID}" />
|
|
<jsp:param name="actionType" value="${param.actionType}" />
|
|
<jsp:param name="writer" value="${boardInfo.REQ_WRITER}" />
|
|
<jsp:param name="connectUserId" value="${connectUserId}" />
|
|
</jsp:include>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
</table>
|
|
<div class="btnCenterWrap">
|
|
<div class="center_btns_wrap">
|
|
<input type="button" id="saveBtn" value="저장" class="plm_btns" onclick="javascript:save();">
|
|
<input type="button" id="closeBtn" value="닫기" class="plm_btns" onclick="javascript:self.close();">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 댓글영역 -->
|
|
<%--
|
|
<div class="contents_page_basic_margin">
|
|
<br id="title" style="float: left;">COMMENTS
|
|
<div class="ascendig_text" style="float: right; padding-right: 14px;">
|
|
<a href="#" class="plm_btns" style="height: 20px" onclick="fn_openNoticeContentsFormPopUp('${boardInfo.OBJID}','');">댓글작성</a>
|
|
<input type="button" id="btnDelete" value="삭제" class="plm_btns" onclick="javascript:fn_delete()">
|
|
</div>
|
|
|
|
<div class="in_table_scroll_wrap _table2" style="height:130px; width:99.4%;;">
|
|
<table class="plm_table" style="width: 100%">
|
|
<colgroup>
|
|
<col width="2.5%" />
|
|
<col width="3.5%" />
|
|
<col width="15%" />
|
|
<col width="52%" />
|
|
<col width="15%" />
|
|
<col width="10%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td><input type="checkbox" id="allCheck" class="checkBox"></td>
|
|
<td>no</td>
|
|
<td>작성자</td>
|
|
<td>내용</td>
|
|
<td>작성일</td>
|
|
<td>첨부파일</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="2.5%" />
|
|
<col width="3.5%" />
|
|
<col width="15%" />
|
|
<col width="52%" />
|
|
<col width="15%" />
|
|
<col width="10%" />
|
|
</colgroup>
|
|
<c:forEach var="item" items="${postComments}" varStatus="status">
|
|
<tr>
|
|
<td><input type='checkbox' name='commentCheck' value="${item.COMMENT_OBJID}"></td>
|
|
<td title="${item.RNUM}">${item.RNUM}</td>
|
|
<td title="${item.U_NAME}">${item.U_NAME}</td>
|
|
<td title="${item.CONTENTS}">${item.CONTENTS}</td>
|
|
<td>${item.REGDATE_Y_M_D}</td>
|
|
<td><a href="#" class="File file_${item.FILE_CNT eq 0?'empty_':''}icon" data-OBJID="${item.OBJID}" data-docType="CONTENTS_ATTACH_CODE" data-docTypeName="댓글 첨부파일"></a></td>
|
|
</tr>
|
|
</c:forEach>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
--%>
|
|
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html>
|