주문서첨부 2종류 변경, 버튼css 수정
This commit is contained in:
298
WebContent/WEB-INF/view/contractMgmt/FileRegistPopup.jsp
Normal file
298
WebContent/WEB-INF/view/contractMgmt/FileRegistPopup.jsp
Normal file
@@ -0,0 +1,298 @@
|
||||
<%@ 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>
|
||||
</head>
|
||||
<script>
|
||||
var callbackFnc = "${param.callbackFnc}";
|
||||
var _isChanged = false;
|
||||
var _fileCnt = 0;
|
||||
var _fileCntFtc = 0; // FTC주문서 파일 개수
|
||||
var _fileCntOrder = 0; // 주문서 파일 개수
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#btn_close").click(function(){
|
||||
//opener.fn_search();
|
||||
openerCallback();
|
||||
self.close(0);
|
||||
});
|
||||
|
||||
// FTC주문서 첨부 파일 기능
|
||||
fnc_setFileDropZone("ftcDropZone", "${param.targetObjId}", "FTC_ORDER", "FTC주문서", "ftcAreaDraw",false,null,null,null, "${param.parentTargetObjId}");
|
||||
|
||||
// 주문서 첨부 파일 기능
|
||||
fnc_setFileDropZone("orderDropZone", "${param.targetObjId}", "ORDER", "주문서", "orderAreaDraw",false,null,null,null, "${param.parentTargetObjId}");
|
||||
|
||||
ftcAreaDraw();
|
||||
orderAreaDraw();
|
||||
|
||||
// FTC주문서 업로드 버튼
|
||||
$("#btnUploadFtc").click(function(){
|
||||
var files = $("#fileFtc")[0].files;
|
||||
if(files.length > 0){
|
||||
fnc_fileMultiUpload(files, null, "${param.targetObjId}", "FTC_ORDER", "FTC주문서", null, "ftcAreaDraw",null, "${param.parentTargetObjId}");
|
||||
$("#fileFtc").val("");
|
||||
}else{
|
||||
Swal.fire("선택된 File이 없습니다.");
|
||||
}
|
||||
});
|
||||
|
||||
// 주문서 업로드 버튼
|
||||
$("#btnUploadOrder").click(function(){
|
||||
var files = $("#fileOrder")[0].files;
|
||||
if(files.length > 0){
|
||||
fnc_fileMultiUpload(files, null, "${param.targetObjId}", "ORDER", "주문서", null, "orderAreaDraw",null, "${param.parentTargetObjId}");
|
||||
$("#fileOrder").val("");
|
||||
}else{
|
||||
Swal.fire("선택된 File이 없습니다.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function refeshAttachFileArea(){
|
||||
ftcAreaDraw();
|
||||
orderAreaDraw();
|
||||
}
|
||||
|
||||
// FTC주문서 영역을 display 한다.
|
||||
function ftcAreaDraw(){
|
||||
fn_fileCallback("ftc","FTC_ORDER");
|
||||
}
|
||||
|
||||
// 주문서 영역을 display 한다.
|
||||
function orderAreaDraw(){
|
||||
fn_fileCallback("order","ORDER");
|
||||
}
|
||||
|
||||
function openerCallback(){
|
||||
// 전체 파일 개수 합산
|
||||
_fileCnt = _fileCntFtc + _fileCntOrder;
|
||||
|
||||
if( (fnc_isEmpty(callbackFnc) || callbackFnc == "fnc_tabulCallbackFnc") && opener.fnc_tabulCallbackFnc){
|
||||
opener.fnc_tabulCallbackFnc("${param.targetObjId}", "${param.docType}", "${param.columnField}", _fileCnt);
|
||||
}else if(fnc_checkNull(callbackFnc) != ""){
|
||||
opener.eval(callbackFnc+"();");
|
||||
}
|
||||
}
|
||||
|
||||
//첨부파일 목록을 가져온다.
|
||||
function fn_fileCallback(areaId,fileType){
|
||||
//Swal.fire("areaId : "+areaId+", fileType : "+fileType+", targetObjId : ${param.targetObjId}");
|
||||
var fileList = [];
|
||||
var filesize=0;
|
||||
|
||||
var param = {"targetObjId":"${param.targetObjId}", "docType":fileType};
|
||||
var searchAllInParent = fnc_checkNull(${param.searchAllInParent});
|
||||
if(searchAllInParent && "${param.parentTargetObjId}"){
|
||||
param["parentTargetObjId"] = "${param.parentTargetObjId}";
|
||||
param["targetObjId"] = "";
|
||||
}
|
||||
$.ajax({
|
||||
url:"/common/getFileList.do",
|
||||
type:"POST",
|
||||
data:param,
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
|
||||
// 파일 타입별로 개수 저장
|
||||
if(areaId == "ftc"){
|
||||
_fileCntFtc = data.length;
|
||||
}else if(areaId == "order"){
|
||||
_fileCntOrder = data.length;
|
||||
}
|
||||
|
||||
filesize = data.length;
|
||||
if(0 < data.length){
|
||||
|
||||
//첨부파일 목록 영역 show
|
||||
$("#"+areaId+"FileArea").empty();
|
||||
|
||||
if(0 < $("#"+areaId+"DefaultRow").length){
|
||||
$("#"+areaId+"DefaultRow").hide();
|
||||
}
|
||||
|
||||
$.each(data, function(i){
|
||||
|
||||
var appendText = "";
|
||||
if("ftc" == areaId || "order" == areaId){
|
||||
var path = data[i].FILE_PATH;
|
||||
var fileName = data[i].SAVED_FILE_NAME;
|
||||
var fileExt = data[i].UPPER_FILE_EXT;
|
||||
var DOC_TYPE = data[i].DOC_TYPE;
|
||||
|
||||
// 번호를 거꾸로 표시 (최신 파일이 1차)
|
||||
var displayNum = data.length - i;
|
||||
|
||||
appendText+= "<tr>";
|
||||
appendText+= " <td>"+displayNum+"차</td>";
|
||||
appendText+= " <td class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
||||
if(data[i].WRITER=="${connectUserId}" || 'plm_admin'== "${connectUserId}" || DOC_TYPE.indexOf("CAD") > -1){
|
||||
appendText+= "<a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\",\""+fileType+"\")'><div class='delete_btn'></div></a>";
|
||||
}
|
||||
|
||||
appendText+= "</td>";
|
||||
appendText+= " <td>"+data[i].REGDATE+"</td>"
|
||||
appendText+= " <td>"+data[i].FILE_SIZE+"</td>"
|
||||
appendText+= "</tr>";
|
||||
|
||||
fileList.push(fileName);
|
||||
}
|
||||
$("#"+areaId+"FileArea").append(appendText);
|
||||
});
|
||||
}else{
|
||||
$("#"+areaId+"DropZone").show();
|
||||
$("#"+areaId+"AttachFileList").hide();
|
||||
$("#"+areaId+"FileArea").empty();
|
||||
var appendText = "";
|
||||
appendText += "<tr>";
|
||||
appendText += "<td colspan='4'>첨부 파일이 없습니다.</td>";
|
||||
appendText +="</tr>";
|
||||
$("#"+areaId+"FileArea").append(appendText);
|
||||
}
|
||||
|
||||
openerCallback();
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
|
||||
if(fnc_checkNull(callbackFnc) != ""){
|
||||
opener.eval(callbackFnc+"('"+fileType+"','"+filesize+"');");
|
||||
}
|
||||
|
||||
|
||||
/* $("#fileList").val(fileList.join(",") );
|
||||
var fileList = $("#fileList").val();
|
||||
var callstr = "${param.callbackFnc}('"+fileList+"');";
|
||||
try{
|
||||
opener.${param.callbackFnc}(fileList);
|
||||
}catch(e){
|
||||
} */
|
||||
}//파일 첨부 END
|
||||
|
||||
|
||||
/*첨부 파일 삭제 */
|
||||
function fileDelete(fileObjId, areaId, fileType){
|
||||
if(confirm("파일을 삭제하시겠습니까?")){
|
||||
$.ajax({
|
||||
url:"/common/deleteFileInfo.do",
|
||||
type:"POST",
|
||||
data:{"objId":fileObjId},
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
fn_fileCallback(areaId, fileType);
|
||||
if(fnc_checkNull(callbackFnc) != ""){
|
||||
opener.eval(callbackFnc+"();");
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<form name="form1" action="" method="post">
|
||||
<input type="hidden" name="fileList" id="fileList" />
|
||||
<section class="business_staff_popup_min_width">
|
||||
<div class="plm_menu_name">
|
||||
<h2>
|
||||
<span>파일등록</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="businessPopupFormWrap">
|
||||
<!--
|
||||
<div class="form_popup_title"> 자료등록</div>
|
||||
-->
|
||||
<table class="pmsPopupForm">
|
||||
<!-- FTC주문서 첨부 영역 -->
|
||||
<tr>
|
||||
<td class="input_title align_c">FTC주문서</td>
|
||||
<td colspan="8">
|
||||
<div style="width: 100%; overflow: hidden; box-sizing: border-box;">
|
||||
<div id="ftcDropZone" class="dropzone" style="width: 100% !important; max-width: 100%; box-sizing: border-box; margin-bottom: 5px;">Drag & Drop Files Here</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<input type="file" name="fileFtc" id="fileFtc" multiple>
|
||||
<input type="button" id="btnUploadFtc" value="Upload" class="upload_btns">
|
||||
</div>
|
||||
<div id="ftcFileAreaTable" class="spec_data_in_table">
|
||||
<div style="height: 150px; overflow-y: auto; border: 1px solid #cacaca;">
|
||||
<table id="" class="fileListscrollTbody" style="width:100%; table-layout: fixed;">
|
||||
<colgroup>
|
||||
<col style="width: 60px;">
|
||||
<col style="width: calc(100% - 260px);">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
</colgroup>
|
||||
<thead style="position: sticky; top: 0; background-color: #9e9e9e; z-index: 1;">
|
||||
<tr>
|
||||
<td style="text-align: center;">No</td>
|
||||
<td style="text-align: center;">파일명</td>
|
||||
<td style="text-align: center;">등록일</td>
|
||||
<td style="text-align: center;">Size</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="ftcFileArea">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 주문서 첨부 영역 -->
|
||||
<tr>
|
||||
<td class="input_title align_c">주문서</td>
|
||||
<td colspan="8">
|
||||
<div style="width: 100%; overflow: hidden; box-sizing: border-box;">
|
||||
<div id="orderDropZone" class="dropzone" style="width: 100% !important; max-width: 100%; box-sizing: border-box; margin-bottom: 5px;">Drag & Drop Files Here</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<input type="file" name="fileOrder" id="fileOrder" multiple>
|
||||
<input type="button" id="btnUploadOrder" value="Upload" class="upload_btns">
|
||||
</div>
|
||||
<div id="orderFileAreaTable" class="spec_data_in_table">
|
||||
<div style="height: 150px; overflow-y: auto; border: 1px solid #cacaca;">
|
||||
<table id="" class="fileListscrollTbody" style="width:100%; table-layout: fixed;">
|
||||
<colgroup>
|
||||
<col style="width: 60px;">
|
||||
<col style="width: calc(100% - 260px);">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
</colgroup>
|
||||
<thead style="position: sticky; top: 0; background-color: #9e9e9e; z-index: 1;">
|
||||
<tr>
|
||||
<td style="text-align: center;">No</td>
|
||||
<td style="text-align: center;">파일명</td>
|
||||
<td style="text-align: center;">등록일</td>
|
||||
<td style="text-align: center;">Size</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="orderFileArea">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="btn_wrap">
|
||||
<div class="plm_btn_wrap_center">
|
||||
<input type="button" value="닫기" id="btn_close" class="plm_btns">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -223,36 +223,34 @@ body {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.plm_btns:first-child {
|
||||
margin-left: 600px;
|
||||
}
|
||||
/* .plm_btns {
|
||||
/* 견적서 전용 버튼 스타일 */
|
||||
.estimate-btn {
|
||||
display: inline-block;
|
||||
padding: 12px 40px;
|
||||
margin: 0 5px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
padding: 5px 15px;
|
||||
margin: 0 2px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
border: 2px solid #007bff;
|
||||
background-color: #007bff;
|
||||
border: 1px solid #60a5fa;
|
||||
background-color: #60a5fa;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
} */
|
||||
}
|
||||
|
||||
.plm_btns:hover {
|
||||
background-color: #0056b3;
|
||||
border-color: #0056b3;
|
||||
.estimate-btn:hover {
|
||||
background-color: #1e3a8a;
|
||||
border-color: #1e3a8a;
|
||||
box-shadow: 0 2px 6px rgba(0,123,255,0.4);
|
||||
}
|
||||
|
||||
.plm_btns:active {
|
||||
background-color: #004085;
|
||||
border-color: #004085;
|
||||
box-shadow: 0 1px 3px rgba(0,123,255,0.2);
|
||||
.estimate-btn:active {
|
||||
background-color: #1e3a8a;
|
||||
border-color: #1e3a8a;
|
||||
box-shadow: 0 1px 3px rgba(96,165,250,0.3);
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
@@ -1267,10 +1265,10 @@ function fn_save() {
|
||||
|
||||
<!-- 버튼 영역 -->
|
||||
<div class="btn-area no-print">
|
||||
<button type="button" id="btnAddRow" class="plm_btns">행 추가</button>
|
||||
<button type="button" id="btnPrint" class="plm_btns">인쇄</button>
|
||||
<button type="button" id="btnSave" class="plm_btns">저장</button>
|
||||
<button type="button" id="btnClose" class="plm_btns">닫기</button>
|
||||
<button type="button" id="btnAddRow" class="estimate-btn">행 추가</button>
|
||||
<button type="button" id="btnPrint" class="estimate-btn">인쇄</button>
|
||||
<button type="button" id="btnSave" class="estimate-btn">저장</button>
|
||||
<button type="button" id="btnClose" class="estimate-btn">닫기</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -254,13 +254,13 @@ function approval_form(APPROVAL_OBJID,ROUTE_OBJID){
|
||||
|
||||
function fn_FileRegist(objId, docType, docTypeName){
|
||||
var popup_width = 800;
|
||||
var popup_height = 350;
|
||||
var popup_height = 650;
|
||||
|
||||
var objId = objId;
|
||||
var docType = docType;
|
||||
var docTypeName = docTypeName;
|
||||
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
||||
var url = "/common/FileRegistPopup.do"+params;
|
||||
var url = "/contractMgmt/FileRegistPopup.do"+params;
|
||||
|
||||
fn_centerPopup(popup_width, popup_height, url);
|
||||
}
|
||||
|
||||
@@ -2250,4 +2250,11 @@ public class ContractMgmtController {
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@RequestMapping("/contractMgmt/FileRegistPopup.do")
|
||||
public String FileRegistPopup(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
request.setAttribute("docType", CommonUtils.checkNull(paramMap.get("docType")));
|
||||
request.setAttribute("docTypeName", CommonUtils.checkNull(paramMap.get("docTypeName")));
|
||||
return "/contractMgmt/FileRegistPopup";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@
|
||||
,TO_CHAR(REGDATE,'YYYY-MM-DD') AS REG_DATE
|
||||
,WRITER
|
||||
,(SELECT USER_NAME FROM USER_INFO AS O WHERE O.USER_ID = T.WRITER ) AS WRITER_NAME
|
||||
,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID = T.OBJID AND DOC_TYPE='ORDER_DOC' AND UPPER(STATUS) = 'ACTIVE') AS CU01_CNT
|
||||
,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID = T.OBJID AND DOC_TYPE IN ('FTC_ORDER', 'ORDER') AND UPPER(STATUS) = 'ACTIVE') AS CU01_CNT
|
||||
<!-- ,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID = T.OBJID AND DOC_TYPE='contractMgmt01' AND UPPER(STATUS) = 'ACTIVE') AS CU01_CNT
|
||||
,(SELECT COUNT(1) FROM ATTACH_FILE_INFO WHERE TARGET_OBJID = T.OBJID AND DOC_TYPE='contractMgmt02' AND UPPER(STATUS) = 'ACTIVE') AS CU02_CNT -->
|
||||
,(CASE WHEN (RESULT_CD is null or RESULT_CD ='') and (SPEC_RESULT_CD is null or RESULT_CD ='') and (EST_RESULT_CD is null or RESULT_CD ='') then '0'
|
||||
|
||||
Reference in New Issue
Block a user