232 lines
8.7 KiB
Plaintext
232 lines
8.7 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">
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
fnc_setFileDropZone("dropzone", "${distributionInfo.OBJID}", "${DISTRIBUTE_FILE_CODE}", "${DISTRIBUTE_FILE_NAME}", "fn_fileCallback",true,null,null);
|
|
fnc_datepick();
|
|
fnc_getDistributeList();
|
|
});
|
|
|
|
$('#btn_close').click(function(){
|
|
self.close();
|
|
});
|
|
|
|
fn_fileCallback();
|
|
|
|
});
|
|
|
|
function fnc_getDistributeList(){
|
|
var search_carObjid = $('#search_carObjid').val();
|
|
|
|
$.ajax({
|
|
url:"/distribution/getDistributeList.do",
|
|
type:"POST",
|
|
data:{"search_carObjid":search_carObjid},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(distributeList){
|
|
|
|
var distribute = "";
|
|
$.each(distributeList, function(){
|
|
distribute += this.DEPT_NAME + " " + this.USER_NAME + "/";
|
|
});
|
|
$('#distribute').val(distribute);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
}
|
|
});
|
|
}
|
|
|
|
function fnc_mergeDistribution(){
|
|
if(fnc_valitate('form1')){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/distribution/mergeDistribution.do",
|
|
type:"POST",
|
|
data:$('#form1').serialize(),
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
Swal.fire(data.message);
|
|
top.opener.window.location.reload();
|
|
self.close();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_fileCallback(){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${distributionInfo.OBJID}", "docType":"${DISTRIBUTE_FILE_CODE}"},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
//파일드롭다운 영역 hide
|
|
$("#dropzone").hide();
|
|
//첨부파일 목록 영역 show
|
|
$("#distributeFileList").show();
|
|
$("#distributeFileArea").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>";
|
|
$("#distributeFileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#dropzone").show();
|
|
$("#distributeFileList").hide();
|
|
$("#distributeFileArea").empty();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body class="backcolor_light_blue">
|
|
<form id="form1" name="form1" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${distributionInfo.OBJID}">
|
|
<input type="hidden" name="status" id="status" value="${distributionInfo.STATUS}">
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>비정규배포</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<div class="form_popup_title"> 비정규배포 등록</div>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="20%">
|
|
<col width="8%">
|
|
<col width="20%">
|
|
<col width="18%">
|
|
<col width="8%">
|
|
<col width="13%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label>차종</label>
|
|
</td>
|
|
<td>
|
|
<select id="search_carObjid" type="select" title="차종" name="search_carObjid" onchange="javascript:fnc_getDistributeList()" required>
|
|
<option value="">선택</option>
|
|
<c:forEach var="car" items="${carMngList}">
|
|
<option value="${car.OBJID}" ${distributionInfo.CAR_OBJID eq car.OBJID ? 'selected':''}>${car.CAR_NAME}${!empty car.CAR_CODE? '(':''}${car.CAR_CODE}${!empty car.CAR_CODE? ')':''}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label>접수처</label>
|
|
</td>
|
|
<td>
|
|
<select id="receiveType" name="receiveType" type="select" title="접수처" required>
|
|
<option value="">선택</option>
|
|
<option value="hkmc" ${distributionInfo.RECEIVE_TYPE eq 'hkmc' ? 'selected':''}>HKMC</option>
|
|
<option value="supporter" ${distributionInfo.RECEIVE_TYPE eq 'supporter' ? 'selected':''}>협력업체</option>
|
|
<option value="etc" ${distributionInfo.RECEIVE_TYPE eq 'etc' ? 'selected':''}>기타</option>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<select id="subReceiveType" name="subReceiveType" type="select" title="접수처" required>
|
|
<option value="">선택</option>
|
|
<option value="structure" ${distributionInfo.SUB_RECEIVE_TYPE eq 'structure' ? 'selected':''}>스트럭쳐설계</option>
|
|
<option value="startCar" ${distributionInfo.SUB_RECEIVE_TYPE eq 'startCar' ? 'selected':''}>시작차체팀</option>
|
|
<option value="chinaLab" ${distributionInfo.SUB_RECEIVE_TYPE eq 'chinaLab' ? 'selected':''}>중국기술연구소</option>
|
|
<option value="etc" ${distributionInfo.SUB_RECEIVE_TYPE eq 'etc' ? 'selected':''}>기타</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">접수일</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" id="search_fromDate" title="접수일" name="receiveDate" class="text_area" readonly required value="${distributionInfo.RECEIVE_DATE}">
|
|
</td>
|
|
<td>
|
|
<input type="button" class="date_delete" value="x" onclick="javascript:fnc_date_empty()">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label>제목</label>
|
|
</td>
|
|
<td colspan="7">
|
|
<input type="text" name="subject" title="제목" class="text_area" style="width:100%;" required value="${distributionInfo.SUBJECT}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">내용</label>
|
|
</td>
|
|
<td colspan="7">
|
|
<textarea name="contents" rows="6" cols="4" style="width:100%;">${distributionInfo.CONTENTS}</textarea>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">첨부파일</label>
|
|
</td>
|
|
<td colspan="7">
|
|
<div id="dropzone" style="width:99.5%;">Drag & Drop Files Here</div>
|
|
<div id="distributeFileList">
|
|
<table id="distributeFileAreaTable" class="spec_data_in_table">
|
|
<tbody id="distributeFileArea">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">배포처</label>
|
|
</td>
|
|
<td colspan="7">
|
|
<textarea type="text" class="text_area" id="distribute" style="width:100%; height:50px;" name="distribute" value="" readonly> </textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn_wrap" style="clear:both;">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" class="plm_btns" onclick="fnc_mergeDistribution()">
|
|
<input type="button" value="닫기" id="btn_close" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |