463 lines
18 KiB
Plaintext
463 lines
18 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<%
|
|
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
|
String connector = person.getUserId();
|
|
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
|
|
<link rel="stylesheet" href="/css/basicDash.css">
|
|
<!-- //JSTL 페이징 변수선언 -->
|
|
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
|
|
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
|
|
<c:set var="nPage" value="${empty param.page?1:param.page}" />
|
|
<c:set var="pageIndex" value="${(nPage-1)/10}" />
|
|
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
|
|
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
|
|
<c:set var="connector" value="<%=connector %>" />
|
|
<style>
|
|
#plmSearchZon table td {
|
|
border: none;
|
|
}
|
|
.table_paging_wrap {
|
|
display: none;
|
|
}
|
|
.sch_table tr td {
|
|
height: 30px;
|
|
}
|
|
|
|
.sch_table tr td .gantt .b1 {
|
|
margin-top : 5px !important;
|
|
}
|
|
</style>
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
//날짜
|
|
_fnc_datepick();
|
|
|
|
$('.select2').select2();
|
|
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
fn_drawGantt();
|
|
});
|
|
|
|
//SR자료등록 팝업
|
|
$(".File").click(function(){
|
|
var popup_width = 800;
|
|
var popup_height = 250;
|
|
|
|
var objId = $(this).attr("data-OBJID");
|
|
var docType =$(this).attr("data-docType");
|
|
var docTypeName = $(this).attr("data-docTypeName");
|
|
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
|
var url = "/projectConcept/FileRegistPopup.do"+params;
|
|
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
});
|
|
|
|
//영업활동 등록 팝업
|
|
$("#btnCreate").click(function(){
|
|
var popup_width = 1830;
|
|
var popup_height = 730;
|
|
var url = "/project/projectMgmtCreateList.do";
|
|
//window.open("/ordermgmt/ordermgmtUpdateFormPopup.do"+params, "", "width=650, height=750","menubars=no, scrollbars=yes, resizable=yes");
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
});
|
|
|
|
//wbs 등록
|
|
$(".wbs").click(function(){
|
|
var popup_width = 1800;
|
|
var popup_height = 800;
|
|
var objId = $(this).attr("data-OBJID");
|
|
var params = "?OBJID="+objId;
|
|
var url = "/project/wbsTaskProductFormPopUp.do"+params;
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
});
|
|
|
|
//고객 등록 팝업
|
|
$(".supplyMng").click(function(){
|
|
//window.open("/ordermgmt/ordermgmtUpdateFormPopup.do"+params, "", "width=650, height=750","menubars=no, scrollbars=yes, resizable=yes");
|
|
window.open("/contractMgmt/supplyMngPagingList.do", "", "width=1150, height=676","menubars=no, scrollbars=no, resizable=yes");
|
|
});
|
|
|
|
|
|
//엔터 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
//삭제
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
|
|
//프로젝트 현황 row 클릭시 프로젝트 선택되게
|
|
$(".trProject").on("click", function(e){
|
|
//$("input[name=ckBoxProject]").attr("checked", ""); //reset
|
|
//$(this).find("input[name=ckBoxProject]").attr("checked", true); //default 처음건 선택
|
|
$(this).find("input[name=ckBoxProject]").trigger("click");
|
|
});
|
|
|
|
//프로젝트 선택 시
|
|
$("input[name=ckBoxProject]").on("click change", function(e){
|
|
e.stopPropagation(); // 이벤트 전파 차단
|
|
var projectObjId = $('input[name=ckBoxProject]:checked').val();
|
|
|
|
$(".highlighted").removeClass("highlighted");
|
|
$(this).parent().parent().addClass("highlighted");
|
|
|
|
_startLoading();
|
|
_endLoading();
|
|
});
|
|
fn_drawGantt();
|
|
|
|
});
|
|
|
|
function _fnc_datepick(){
|
|
var $dateinput = $("input.date_icon");
|
|
for(var i=0; i<$dateinput.length; i++){
|
|
$dateinput.eq(i).attr("size","10");
|
|
$dateinput.eq(i).datepicker({
|
|
changeMonth:true,
|
|
changeYear:true
|
|
});
|
|
}
|
|
}
|
|
|
|
//프로젝트의 form,detail 팝업을 보여준다.
|
|
function openProjectFormPopUp(objId){
|
|
var popup_width = 420;
|
|
var popup_height = 350;
|
|
var objId = objId;
|
|
var params = "?OBJID="+objId;
|
|
var url = "/project/projectmodifyPopUp.do"+params;
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
function projectListPopup(division,division1,division2,status){
|
|
|
|
var popup_width = 1700;
|
|
var popup_height = 800;
|
|
var objId = objId;
|
|
var params = "?division="+division+"&division1="+division1+"&division2="+division2+"&status="+status;
|
|
//var url = "/project/wbsTaskProductGanttFormPopUp.do"+params;
|
|
var url = "/project/projectMgmtWbsList.do"+params;
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
function fundMgmtListPopup(division,division1,division2){
|
|
|
|
var popup_width = 1700;
|
|
var popup_height = 800;
|
|
var objId = objId;
|
|
var params = "?division="+division+"&division1="+division1+"&division2="+division2;
|
|
//var url = "/project/wbsTaskProductGanttFormPopUp.do"+params;
|
|
var url = "/fundMgmt/fundMgmtList.do"+params;
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
function expenseListPopup(division,division1,division2){
|
|
|
|
var popup_width = 1700;
|
|
var popup_height = 800;
|
|
var objId = objId;
|
|
var params = "?division="+division+"&division1="+division1+"&division2="+division2;
|
|
//var url = "/project/wbsTaskProductGanttFormPopUp.do"+params;
|
|
var url = "/costMgmt/expenseList.do"+params;
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
<c:set var="ganttTotalWidth" value="1300"/>
|
|
/*
|
|
<c:set var="ganttTotalCnt" value="36"/>
|
|
<c:set var="ganttTotalCnt" value="24"/>
|
|
*/
|
|
<c:set var="ganttTotalCnt" value="30"/>
|
|
<c:set var="ganttTdWidth" value="${ganttTotalWidth/ganttTotalCnt}"/>
|
|
function fn_drawGantt(){
|
|
var tdWidth = ${ganttTdWidth}; //30
|
|
var quarterWidth = tdWidth*3; //90
|
|
var yyyyPre = Number('${yyyyPre}'); //2023
|
|
var curYear = Number('${yyyy}'); //2024
|
|
var yyyyNext = Number('${yyyyNext}'); //2025
|
|
var today = '${today2}'; // 2024-07-25
|
|
var arrDate = today.split('-'); //2024,07,25
|
|
var sYear = Number(arrDate[0]); //2024
|
|
if( !(sYear > yyyyNext || sYear < yyyyPre)){
|
|
fn_drawGanttRow('divTodayVline','','${today2}','${today2}'); //today
|
|
}else{
|
|
//$(".divTodayVline").hide();
|
|
}
|
|
|
|
<c:choose>
|
|
<c:when test="${!empty projectList}">
|
|
<c:forEach var="info" items="${projectList}" varStatus="status">
|
|
fn_drawGanttRow('b1','${info.OBJID}','${info.CONTRACT_DATE}','${info.REQ_DEL_DATE}'); //사업기간
|
|
//fn_drawGanttRow('b2','${info.OBJID}','${info.AS_START_DATE}','${info.AS_END_DATE}'); //AS기간
|
|
//fn_drawGanttRow('b1','${info.OBJID}','2023-08-01','2024-09-31'); //사업기간
|
|
</c:forEach>
|
|
</c:when>
|
|
</c:choose>
|
|
}
|
|
|
|
function fn_drawGanttRow(classPrefix, OBJID, START_DATE, END_DATE ){
|
|
|
|
var isSmall = ${ganttTotalCnt == 30}; //true
|
|
var baseXPosition = 0;
|
|
var days = 30.4;
|
|
var tdWidth = ${ganttTdWidth}; //30 start용
|
|
var tdWidth2 = ${ganttTdWidth}; //30
|
|
//var tdWidth2 = 39; //30
|
|
var dayWidth = tdWidth2/days;
|
|
var quarterCnt = 4;
|
|
var monthCntInQuarter = 3;
|
|
var yearMonthCnt = quarterCnt * monthCntInQuarter; //12
|
|
var quarterWidth = tdWidth * monthCntInQuarter;
|
|
var yyyyPre = '${yyyyPre}';
|
|
var curYear = '${yyyy}';
|
|
var yyyyNext = '${yyyyNext}';
|
|
|
|
var START_DATE = fnc_checkNull(START_DATE);
|
|
var END_DATE = fnc_checkNull(END_DATE);
|
|
|
|
if(fnc_isEmpty(START_DATE) && fnc_isEmpty(END_DATE)){
|
|
$("."+classPrefix+OBJID).hide();
|
|
return;
|
|
}
|
|
|
|
if(fnc_isEmpty(START_DATE)){
|
|
START_DATE = END_DATE;
|
|
}
|
|
if(fnc_isEmpty(END_DATE)){
|
|
END_DATE = START_DATE;
|
|
}
|
|
|
|
// END_DATE가 yyyyNext보다 큰 경우 yyyyNext의 마지막 날로 변경
|
|
var endDateObj = new Date(END_DATE);
|
|
var yyyyNextLastDay = new Date(yyyyNext, 11, 31); // 12월 31일 (0-based month)
|
|
|
|
if(endDateObj > yyyyNextLastDay) {
|
|
END_DATE = yyyyNext + '-12-31';
|
|
}
|
|
//alert("END_DATE:"+END_DATE);
|
|
var arrDate = START_DATE.split('-');
|
|
var arrDate2 = END_DATE.split('-');
|
|
|
|
var sYear = Number(arrDate[0]);
|
|
var sMonth = Number(arrDate[1]);
|
|
var sDate = Number(arrDate[2]);
|
|
var sAllMonth = sYear*12 + sMonth;
|
|
|
|
var eYear = Number(arrDate2[0]);
|
|
var eMonth = Number(arrDate2[1]);
|
|
var eDate = Number(arrDate2[2]);
|
|
|
|
var eAllMonth = eYear*12 + eMonth;
|
|
var sYearIndex = Number(sYear) - Number(curYear) + 2;
|
|
var eYearIndex = Number(eYear) - Number(curYear) + 2;
|
|
|
|
var gapMonth = (eAllMonth - sAllMonth) - 1;
|
|
if(gapMonth < 0) gapMonth = 0;
|
|
|
|
//일 width 계산
|
|
var sDateWidth = 0;
|
|
var eDateWidth = 0;
|
|
var sDateStart = 0;
|
|
sDateWidth = (1+days - sDate) * dayWidth;
|
|
eDateWidth = eDate * dayWidth;
|
|
sDateStart = sDate * dayWidth;
|
|
/* */
|
|
//if(sMonth != eMonth){
|
|
if(eAllMonth - sAllMonth == 0){ //같은월
|
|
sDateWidth = (1+eDate - sDate) * dayWidth;
|
|
eDateWidth = 0;
|
|
}else if(eAllMonth - sAllMonth == 1){
|
|
//sDateWidth = (1+days - sDate) * dayWidth;
|
|
//eDateWidth = eDate * dayWidth;
|
|
}else if(eAllMonth - sAllMonth > 1){
|
|
|
|
}
|
|
//}
|
|
|
|
var quarterIndex = sMonth%3 == 0 ? 3 : sMonth%3;
|
|
var quarter = Math.floor((sMonth-1)/3+1); //내림
|
|
|
|
var eQuarterIndex = eMonth%3 == 0 ? 3 : eMonth%3;
|
|
var eQuarter = Math.floor((eMonth-1)/3+1); //내림
|
|
|
|
//var xSize = ( ((eYearIndex-1)*yearMonthCnt + ( (eQuarter-1)*monthCntInQuarter+eQuarterIndex-1)) - ((sYearIndex-1)*yearMonthCnt+( (quarter-1)*monthCntInQuarter+quarterIndex-1)) /*+1*/) *tdWidth2 - sDateWidth + eDateWidth;
|
|
var xSize = gapMonth * tdWidth2 + sDateWidth + eDateWidth; //(gapMonth < 1 ? sDateWidth : -sDateWidth)
|
|
var xStart = ((sYearIndex-1)*yearMonthCnt + ((quarter-1)*monthCntInQuarter+quarterIndex-1)) * tdWidth + sDateStart;
|
|
//alert("xSize:"+xSize+"xStart:"+xStart);
|
|
if(isSmall) xStart -= quarterWidth*2;
|
|
|
|
if(xSize < 3)
|
|
xSize += 1; //최소width 보정
|
|
|
|
xStart -= 5; //위치 보정
|
|
|
|
xStart = xStart - baseXPosition;
|
|
if(xStart < baseXPosition) {
|
|
xStart = baseXPosition;
|
|
//xSize -= (baseXPosition - xStart)
|
|
}
|
|
var classNum = classPrefix.substring(1);
|
|
var pClassName = '.b'+(classNum-1);
|
|
|
|
var todayLeftMargin = 390;
|
|
if(classPrefix == 'divTodayVline'){ //today
|
|
//alert("xStart:"+xStart);
|
|
$("."+classPrefix).css('left', (todayLeftMargin+xStart)+"px"); //margin-left
|
|
$("."+classPrefix).show();
|
|
$("."+classPrefix).css('height', $("#tableProject").height()+0); //buffer
|
|
$(".divQuarterVline").css('height', $("#tableProject").height()+0);
|
|
//alert($("#tableProject").height()+100);
|
|
}else{
|
|
$("."+classPrefix+OBJID).css('width', xSize+"px");
|
|
$("."+classPrefix+OBJID).css('margin-left', xStart+"px");
|
|
$("."+classPrefix+OBJID).show();
|
|
}
|
|
|
|
var fixHeight = 4;
|
|
var sameLine = true; //true/false
|
|
if(classPrefix == 'b1' || classPrefix == 'b2'){ //개발 테스트
|
|
var upGantt = $("."+classPrefix+OBJID).parent().parent().find(pClassName);
|
|
if(upGantt && upGantt.is(':visible')){ //조립있으면 같은 라인 표시
|
|
var gHeight = upGantt.height()+fixHeight;
|
|
if(sameLine) $("."+classPrefix+OBJID).css('margin-top', -gHeight);
|
|
}else{
|
|
var upGantt = $("."+classPrefix+OBJID).parent().parent().find('.b2');
|
|
if(upGantt && upGantt.is(':visible')){ //조립있으면 같은 라인 표시
|
|
var gHeight = upGantt.height()+fixHeight;
|
|
if(sameLine) $("."+classPrefix+OBJID).css('margin-top', -gHeight);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body class="bodyNoScroll">
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="actionType" value="" />
|
|
<div class="min_part_enroll">
|
|
<div class="content-box">
|
|
<div class="content-box-s">
|
|
<div class="plm_menu_name_gdnsi">
|
|
<h2>
|
|
<span>프로젝트 전체 일정</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div class="n_wrap2" style="margin-top:10px">
|
|
<div class="float_l w100" style="height: 800px;width:100%;">
|
|
|
|
|
|
<div class="tableBox1 sch_table_wrap " style="height: 820px;border: 1px solid #5e5e5e; ">
|
|
|
|
<!-- 오늘 세로선 -->
|
|
<div class="divTodayVline" id="divTodayVline" style="min-height:450px;display:none;position:absolute;border:2px dotted;border-left:none; top:70px;left:900px; width:0.1px; height:85%; border-color:orange;/* background:orange;color:orange; */ z-index;999"></div>
|
|
|
|
<c:forEach begin="${0}" end="${ganttTotalCnt/3}" var="seq" varStatus="status">
|
|
<div class="divQuarterVline" id="divQuarterVline" style="min-height:450px;display:;position:absolute;border:2px dotted;border-left:none; top:70px;left:${381+(status.count*130)}px; width:0.1px; height:auto; border-color:grey;/* background:orange;color:orange; */ z-index;998"></div>
|
|
</c:forEach>
|
|
|
|
<table class="n_table sch_table" id="tableProject">
|
|
<colgroup>
|
|
<!-- <col width="25px"> -->
|
|
<col width="110px">
|
|
<col width="110px">
|
|
<col width="170px">
|
|
|
|
<c:forEach begin="${1}" end="${ganttTotalCnt}" var="seq" varStatus="status">
|
|
<col width="${ganttTdWidth}px">
|
|
</c:forEach>
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<!-- <th rowspan="2">선택</th> -->
|
|
<th rowspan="2">고객사명</th>
|
|
<th rowspan="2">프로젝트번호</th>
|
|
<th rowspan="2">프로젝트명</th>
|
|
<th colspan="${ganttTotalCnt == 36 ? 12 : 6}"><div class="block_1"> ${yyyyPre}년</div></th>
|
|
<th colspan="12"><div class="block_2">${yyyy}년</div></th>
|
|
<th colspan="12"><div class="block_3">${yyyyNext}년</div></th>
|
|
<%-- <th colspan="${ganttTotalCnt == 36 ? 12 : 6}"><div class="block_3">${yyyyNext}년</div></th> --%>
|
|
<!-- <th>계획종료일</th>
|
|
<th rowspan="2">진행율(%)</th>
|
|
<th rowspan="2">상태</th> -->
|
|
</tr>
|
|
<tr class="sub_thead">
|
|
<c:if test="${ganttTotalCnt == 36}">
|
|
<th colspan="3">1분기</th>
|
|
<th colspan="3">2분기</th>
|
|
</c:if>
|
|
<th colspan="3">3분기</th>
|
|
<th colspan="3">4분기</th>
|
|
<!-- 올해 -->
|
|
<th colspan="3">1분기</th>
|
|
<th colspan="3">2분기</th>
|
|
<th colspan="3">3분기</th>
|
|
<th colspan="3">4분기</th>
|
|
|
|
<th colspan="3">1분기</th>
|
|
<th colspan="3">2분기</th>
|
|
<%-- <c:if test="${ganttTotalCnt == 36}"> --%>
|
|
<th colspan="3">3분기</th>
|
|
<th colspan="3">4분기</th>
|
|
<%-- </c:if> --%>
|
|
<!-- <th>변경종료일</th> -->
|
|
</thead>
|
|
<tbody id="tbodyProject">
|
|
<c:choose>
|
|
<c:when test="${!empty projectList}">
|
|
<c:forEach var="info" items="${projectList}" varStatus="status">
|
|
<tr style="" class="b1 trProject highlighted"> <!-- background-color:#EFEFEF -->
|
|
<%-- <td rowspan="" title="${info.CONCEPT_OBJID}"><input type="radio" value="${info.OBJID}" name="ckBoxProject" data-objId="${info.OBJID}" data-CATEGORY_CD="${info.CATEGORY_CD}" data-CUR_TYPE="${info.CUR_TYPE}"></td> --%>
|
|
<%-- <td rowspan="" title="${info.PROJECT_NO}" ><a href="#" onclick="openProjectFormPopUp('${info.OBJID}')" class="p_name">${info.PROJECT_NO}</a></td> --%>
|
|
<td rowspan="" title="${info.SUPPLY_NAME}" class="align_l">${info.SUPPLY_NAME}</td>
|
|
<td rowspan="" title="${info.PROJECT_NO}" class="align_l" style="height:15px !important">${info.PROJECT_NO}</td>
|
|
<td rowspan="" title="${info.PROJECT_NAME}" class="align_l" style="height:15px !important">${info.PROJECT_NAME}</td>
|
|
|
|
<td rowspan="" colspan="${ganttTotalCnt}" class="ganttTd">
|
|
<div class="gantt"><div class="ganttLine b1 b1${info.OBJID}" style="display:none;width:0px;/*width: 100px; margin-left: 80px; */" title="사업기간"></div></div>
|
|
<div class="gantt"><div class="ganttLine b2 b2${info.OBJID}" style="display:none;width:0px;/*width: 100px; margin-left: 80px; */" title="AS기간"></div></div>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<tr>
|
|
<td colspan="44" align="center">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |