505 lines
18 KiB
Plaintext
505 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" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<!-- 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}" />
|
|
<script>
|
|
$(function(){
|
|
$(".btnTable").click(function(){
|
|
var url = $(this).attr("url");
|
|
document.dfmeaForm.action = url;
|
|
document.dfmeaForm.submit();
|
|
});
|
|
|
|
$(".btnFile").click(function(){
|
|
window.open("businessChanceFilePopup.html", "", "width=466, height=380");
|
|
});
|
|
|
|
//수주품목 팝업
|
|
$(".orderItemList").click(function(){
|
|
var objId = $(this).attr("data-OBJID");
|
|
window.open("/project/projectOrderItemListPopup.do?objId="+objId, "", "width=620, height=342");
|
|
});
|
|
|
|
$(".btnChart").click(function(){
|
|
var url = $(this).attr("url");
|
|
var carType = $(this).attr("carType");
|
|
var productType = $(this).attr("productType");
|
|
|
|
var pageUrl = url+"_"+carType+"_"+productType+".html";
|
|
|
|
window.open(pageUrl, "" ,"width=1000, height=400");
|
|
});
|
|
|
|
fnc_datepick();
|
|
|
|
//조회
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
|
|
});
|
|
|
|
// 전체 선택
|
|
$("#checkbox_all").click(function(){
|
|
if($("#checkbox_all").prop("checked")){
|
|
$("input[name=projectCheckBox]").prop("checked",true);
|
|
}else{
|
|
$("input[name=projectCheckBox]").prop("checked",false);
|
|
}
|
|
})
|
|
|
|
// 부분체크해제
|
|
$("input[name=projectCheckBox]").click(function(){
|
|
if($("#checkbox_all").is(":checked")){
|
|
$("#checkbox_all").prop("checked",false);
|
|
}
|
|
})
|
|
|
|
//엔터키로 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
$(document).ready(function(){
|
|
|
|
//고객사 목록 조회
|
|
fn_setOEMList();
|
|
fn_setCarTypeList("${param.search_oem}");
|
|
|
|
//고객사별 차종 목록 조회
|
|
$("#search_oem").change(function(){
|
|
var oemObjId = $(this).val();
|
|
fn_setCarTypeList(oemObjId);
|
|
});
|
|
|
|
//제품군 목록 조회
|
|
fn_setProductGroupList();
|
|
fn_setProductTypeList("${param.search_productGroup}");
|
|
|
|
//제품군 제품 목록 조회
|
|
$("#search_productGroup").change(function(){
|
|
var productGroup = $(this).val();
|
|
fn_setProductTypeList(productGroup);
|
|
});
|
|
});
|
|
</script>
|
|
<script>
|
|
//프로젝트의 form,detail 팝업을 보여준다.
|
|
function openProjectFormPopUp(objId){
|
|
window.open("","projectFormPopUp","width=1150, height=676");
|
|
var params = "?actionType=regist"
|
|
var url = "/project/projectFormPopUp.do"+params;
|
|
if("" != objId){
|
|
url = "/project/projectDetailPopUp.do";
|
|
}
|
|
var form = document.form1;
|
|
form.objId.value = objId;
|
|
form.action = url;
|
|
form.target = "projectFormPopUp";
|
|
form.submit();
|
|
}
|
|
|
|
//프로젝트 검색기능
|
|
function fn_search(){
|
|
var form = document.form1;
|
|
form.target="_self";
|
|
form.action = "";
|
|
form.actionType.value = "";
|
|
form.submit();
|
|
}
|
|
|
|
//oem 목록 조회
|
|
function fn_setOEMList(){
|
|
$.ajax({
|
|
url:"/common/getOEMList.do",
|
|
type:"POST",
|
|
data:{"isJson":true},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].OEM_NAME+"("+data[i].OEM_CODE+")</option>";
|
|
});
|
|
|
|
var paramValue = "${param.search_oem}";
|
|
$("#search_oem").append(appendCode);
|
|
$("#search_oem").trigger("change");
|
|
if(paramValue != ""){
|
|
$("#search_oem > option[value=${param.search_oem}]").attr("selected", "true");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//car 목록 조회
|
|
function fn_setCarTypeList(oemObjId){
|
|
if(oemObjId !=""){
|
|
$.ajax({
|
|
url:"/admin/getOEMsCarList.do",
|
|
type:"POST",
|
|
data:{
|
|
"status" : "active" , "oemObjId" : oemObjId},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
appendCode += "<option value=''>선택</option>";
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].CAR_CODE+"("+data[i].CAR_NAME+")</option>";
|
|
});
|
|
$("#search_carType").children().remove();
|
|
$("#search_carType").append(appendCode);
|
|
$("#search_carType > option[value=${param.search_carType}]").attr("selected", "true");
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}else{
|
|
$("#search_carType").children().remove();
|
|
$("#search_carType").append("<option value=''>선택</option>");
|
|
}
|
|
}
|
|
|
|
//제품군 목록 조회
|
|
function fn_setProductGroupList(){
|
|
$.ajax({
|
|
url:"/common/getProductGroupList.do",
|
|
type:"POST",
|
|
data:{"isJson":true},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
var appendCode = "";
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].PRODUCT_GROUP_NAME+"</option>";
|
|
});
|
|
|
|
var paramValue = "${param.search_productGroup}";
|
|
$("#search_productGroup").append(appendCode);
|
|
$("#search_productGroup").trigger("change");
|
|
if(paramValue != ""){
|
|
$("#search_productGroup > option[value=${param.search_productGroup}]").attr("selected", "true");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//제품 목록 조회
|
|
function fn_setProductTypeList(productGroup){
|
|
if(productGroup != ""){
|
|
$.ajax({
|
|
url:"/common/getProductList.do",
|
|
type:"POST",
|
|
data:{"isJson":true, "search_productGroupObjId":productGroup},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
appendCode += "<option value=''>선택</option>";
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].PRODUCT_NAME+"("+data[i].PRODUCT_CODE+")</option>";
|
|
});
|
|
|
|
$("#search_product").children().remove();
|
|
$("#search_product").append(appendCode);
|
|
$("#search_product > option[value=${param.search_product}]").attr("selected", "true");
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}else{
|
|
$("#search_product").children().remove();
|
|
$("#search_product").append("<option value=''>선택</option>");
|
|
}
|
|
}
|
|
|
|
//프로젝트 등록 Excel Export
|
|
function excelExport(){
|
|
document.form1.action = "/project/projectTempList.do?actionType=excel";
|
|
document.form1.submit();
|
|
}
|
|
|
|
//프로젝트에 해당하는 WBS Task 목록 PopUp을 호출한다.
|
|
function fn_openProjectWBSTask(){
|
|
if(null != projectObjId){
|
|
window.open("/project/wbs/wbsTaskListPopUp.do?objId="+projectObjId, "", "width=1200, height=960");
|
|
}else{
|
|
alert("잘못된 접근입니다.");
|
|
}
|
|
}
|
|
|
|
//선택된 프로젝트의 상태를 확정 상태로 변경한다.
|
|
function fn_changeProjectStatus(){
|
|
//if(fn_checkMyProject()){
|
|
if(confirm("선택된 프로젝트를 확정 상태로 변경하시겠습니까? \n 확정된 프로젝트는 WBS Task를 구성합니다.")){
|
|
document.form1.status.value = "confirm";
|
|
$.ajax({
|
|
url:"/project/changeProjectStatus.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(data.result){
|
|
alert("변경되었습니다..");
|
|
fn_search();
|
|
}else{
|
|
alert("오류가 발생하였습니다.");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
//}
|
|
}
|
|
|
|
//확정시 로그인한사람의 프로젝트만 확정할수있다.
|
|
function fn_checkMyProject(){
|
|
var connectedUserId = "${connectUserId}";
|
|
|
|
var chk = $("input[name=projectCheckBox]:checked");
|
|
if(chk.length == 0){
|
|
alert("선택된 Project가 없습니다.");
|
|
return false;
|
|
}
|
|
|
|
$(chk).each(function(){
|
|
var writer = $(this).attr("data-WRITER");
|
|
if(writer != connectedUserId){
|
|
alert("본인이 등록한 Project만 확정시킬 수 있습니다.");
|
|
return false;
|
|
}
|
|
});
|
|
|
|
return true;
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="objId" id="objId">
|
|
<input type="hidden" name="actionType" id="actionType">
|
|
<input type="hidden" name="status" id="status">
|
|
<div id="pageMinWidth">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>프로젝트 신규등록</span>
|
|
</h2>
|
|
</div>
|
|
<div id="plmSearchZon">
|
|
<table>
|
|
<tr>
|
|
<td><label for="">지역</label></td>
|
|
<td>
|
|
<select name="search_region" id="search_region">
|
|
<option value="">선택</option>
|
|
<option value="D" ${param.search_region eq 'D'?'selected':''}>국내</option>
|
|
<option value="F" ${param.search_region eq 'F'?'selected':''}>해외</option>
|
|
</select>
|
|
</td>
|
|
<td><label for="">Project Type</label></td>
|
|
<td>
|
|
<select name="search_bidding" id="search_bidding">
|
|
<option value="">선택</option>
|
|
<option value="NEW"${param.search_bidding eq 'NEW'? 'selected' :''}>신차</option>
|
|
<option value="DERIVATIVE"${param.search_bidding eq 'DERIVATIVE' ? 'selected' :''}>파생차</option>
|
|
<option value="SAMPLE"${param.search_bidding eq'SAMPLE' ? 'selected':''}>시작차</option>
|
|
</select>
|
|
</td>
|
|
<td><label for="">고객사</label></td>
|
|
<td>
|
|
<select name="search_oem" id="search_oem">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td><label for="">차종</label></td>
|
|
<td>
|
|
<select name="search_carType" id="search_carType">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td><label for="">제품군</label></td>
|
|
<td>
|
|
<select name="search_productGroup" id="search_productGroup">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td><label for="">제품</label></td>
|
|
<td>
|
|
<select name="search_product" id="search_product" style="width:250px;">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="">CFT장</label></td>
|
|
<td>
|
|
<select name="cft_userid" id="cft_userid" style="">
|
|
<option value="">선택</option>
|
|
${code_map.cft_userid}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<section class="contents_page_basic_margin">
|
|
<div class="plm_table_wrap">
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap">
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch">
|
|
<input type="button" value="확정" class="plm_btns" onclick="fn_changeProjectStatus();">
|
|
<input type="button" value="프로젝트 등록" class="plm_btns" onclick="openProjectFormPopUp('');">
|
|
<!-- <input type="button" value="Excel Export" class="plm_btns" onclick="excelExport()"> -->
|
|
</div>
|
|
</div>
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="2%">
|
|
<col width="2%">
|
|
<col width="3%">
|
|
<col width="8%"> <!-- 프로젝트 타입 -->
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="8%">
|
|
<col width="6%">
|
|
<col width="4%">
|
|
<col width="6%">
|
|
<col width="4%">
|
|
<!-- <col width="*"> -->
|
|
<col width="4%">
|
|
<col width="4%">
|
|
<col width="4%">
|
|
<col width="4%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td rowspan="2"><input type="checkbox" id="checkbox_all"></td>
|
|
<td rowspan="2">No</td>
|
|
<td rowspan="2">지역</td>
|
|
<td rowspan="2">Project Type</td>
|
|
<td rowspan="2">고객사</td>
|
|
<td rowspan="2">차종</td>
|
|
<td rowspan="2">Supplier nominated</td>
|
|
<td rowspan="2">SOP</td>
|
|
<td rowspan="2">개발품목</td>
|
|
<td rowspan="2">생산공장</td>
|
|
<!-- <td rowspan="2">라인설치장소</td>
|
|
<td rowspan="2">라인면적</td> -->
|
|
<td colspan="2">프로젝트 책임자</td>
|
|
<td rowspan="2">상태</td>
|
|
<td rowspan="2">프로젝트<br>상세</td>
|
|
<td rowspan="2">개발품목<br>상세</td>
|
|
</tr>
|
|
<tr class="plm_sub_thead">
|
|
<td>팀명</td>
|
|
<td>CFT장</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<c:choose>
|
|
<c:when test="${empty projectList}">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="14">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${projectList}" varStatus="varStatus">
|
|
<tr>
|
|
<input type="hidden" name="${item.OBJID}_carObjId" value="${item.CAR_OBJID}">
|
|
<input type="hidden" name="${item.OBJID}_oemObjId" value="${item.OEM_OBJID}">
|
|
<input type="hidden" name="${item.OBJID}_status" value="${item.STATUS}">
|
|
<td><input type="checkbox" value="${item.OBJID}" name="projectCheckBox" data-WRITER="${item.WRITER}"></td>
|
|
<td title="${item.RNUM}">${item.RNUM}</td>
|
|
<td title="${item.FOREIGN_TYPE}">${item.FOREIGN_TYPE}</td>
|
|
<td title="${item.PROJECT_TYPE}">${item.PROJECT_TYPE}</td>
|
|
<td title="${item.OEM_NAME}">${item.OEM_NAME}</td>
|
|
<td title="${item.CAR_CODE} (${item.CAR_NAME})">${item.CAR_CODE} (${item.CAR_NAME})</td>
|
|
<td title="${item.SUP_DATE}">${item.SUP_DATE}</td>
|
|
<td title="${item.SOP_DATE}">${item.SOP_DATE}</td>
|
|
<td title="${item.PRODUCT_CNT}">${item.PRODUCT_CNT}</td>
|
|
<%-- <td title="${item.FACTORY_NAME}">${item.FACTORY_NAME}</td> --%>
|
|
<td title="${item.AREA_NAME}">${item.AREA_NAME}</td>
|
|
<%-- <td title="${item.LINE_INSTL_SITE_AREA}" class="align_r"><fmt:formatNumber value="${item.LINE_INSTL_SITE_AREA}" pattern="#,###"/> </td> --%>
|
|
<td title="${item.CFT_TEAMNAME}">${item.CFT_TEAMNAME}</td>
|
|
<td title="${item.CFT_USERNAME}">${item.CFT_USERNAME}</td>
|
|
<td title="${item.STATUS_TITLE}">${item.STATUS_TITLE}</td>
|
|
<td><a href="#" class="file_icon" onclick="openProjectFormPopUp('${item.OBJID}');"></a></td>
|
|
<td><a href="#" class="file_icon orderItemList" data-OBJID="${item.OBJID}"></a></td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="pdm_page">
|
|
<input type="hidden" name="page" id="page" value="${nPage}">
|
|
<c:if test="${!empty projectList}">
|
|
<div class="page_pro">
|
|
<table>
|
|
<tr>
|
|
<c:choose>
|
|
<c:when test="${nPage > 1}">
|
|
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">prev</td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<c:forEach var="v" begin="${nPage>5?nPage-5:1}"
|
|
end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
|
|
<c:if test="${status.index -1 < maxPage}">
|
|
<c:choose>
|
|
<c:when test="${status.index eq nPage}">
|
|
<td><a href="#" class="now_page">${nPage}</a></td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:if>
|
|
</c:forEach>
|
|
<c:choose>
|
|
<c:when test="${nPage < maxPage}">
|
|
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">next</td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tr>
|
|
</table>
|
|
<c:if test="${!empty projectList}">
|
|
<p id="adminPageCount">총 ${totalCount}건</p>
|
|
</c:if>
|
|
</div>
|
|
</c:if>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |