567 lines
18 KiB
Plaintext
567 lines
18 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@include file= "/init.jsp" %>
|
|
<%
|
|
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
|
String userId = CommonUtils.checkNull(person.getUserId());
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script type="text/javascript">
|
|
var isEditMode = "true";
|
|
var oEditors = [];
|
|
|
|
$(function(){
|
|
|
|
|
|
nhn.husky.EZCreator.createInIFrame({
|
|
oAppRef: oEditors,
|
|
elPlaceHolder: 'content',
|
|
sSkinURI: '/SE2/SmartEditor2Skin.html',
|
|
fCreator: 'createSEditor2',
|
|
htParams : {
|
|
bUseToolbar : true,
|
|
bUseVerticalResizer : true,
|
|
bUseModeChanger : true,
|
|
}
|
|
});
|
|
//첨부파일
|
|
//fnc_setFileDropZone("contractMgmt01DropZone", "${objId}", "contractMgmt01", "contractMgmt01", "fileAreaDraw",false,null,null);
|
|
//fileAreaDraw();
|
|
|
|
//날짜
|
|
_fnc_datepick();
|
|
|
|
//저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
$("#btnClose").click(function(){
|
|
self.close();
|
|
});
|
|
|
|
//옵션 리스트 선택
|
|
//fn_setoption();
|
|
|
|
$("#contractMgmt01DropZone").hide();
|
|
|
|
$(".File2").click(function(){
|
|
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;
|
|
window.open("/common/FileRegistPopup.do"+params, "", "width=800, height=335");
|
|
});
|
|
|
|
});
|
|
|
|
function fn_save(){
|
|
if(fnc_valitate("form1")){
|
|
if(confirm("저장하시겠습니까?")){
|
|
|
|
oEditors.getById["content"].exec("UPDATE_CONTENTS_FIELD",[]);
|
|
var flag = false;
|
|
var contents = $("#content").val();
|
|
$("#contents").val(contents);
|
|
|
|
|
|
$.ajax({
|
|
url:"/Production/savePlanningInsert.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.msg);
|
|
|
|
if(data.result){
|
|
opener.fn_search();
|
|
self.close();
|
|
}
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
});
|
|
}
|
|
}
|
|
|
|
function fileAreaDraw(){
|
|
fn_fileCallback("contractMgmt01","contractMgmt01");
|
|
}
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_fileCallback(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${resultMap.ORDER_PLAN_OBJID}", "docType":fileType},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
if(data.length > 0){
|
|
//첨부파일 목록 영역 show
|
|
$("#"+areaId+"FileArea").empty();
|
|
|
|
if($("#"+areaId+"DefaultRow").length > 0){
|
|
$("#"+areaId+"DefaultRow").hide();
|
|
}
|
|
|
|
var appendText = "";
|
|
appendText +="<colgroup>";
|
|
appendText +=" <col width='10%''>";
|
|
appendText +=" <col width='*'>";
|
|
appendText +=" <col width='20%'>";
|
|
appendText +="</colgroup>";
|
|
|
|
$.each(data, function(i){
|
|
var _appendText = "";
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
|
|
_appendText += "<tr>";
|
|
_appendText += " <td>"+[i+1]+"</td>";
|
|
_appendText += " <td class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
<c:if test="${param.actionType eq 'regist' or info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
_appendText += " <a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
</c:if>
|
|
_appendText += " </td>";
|
|
_appendText += " <td>"+data[i].REGDATE+"</td>";
|
|
_appendText += "</tr>";
|
|
appendText += _appendText;
|
|
});
|
|
$("#"+areaId +"FileArea").append(appendText);
|
|
$("#"+areaId+"FileArea").show();
|
|
}else{
|
|
$("#"+areaId+"DropZone").show();
|
|
$("#"+areaId+"FileArea").empty();
|
|
$("#"+areaId+"FileArea").hide();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
//첨부 파일 삭제
|
|
function fileDelete(fileObjId, areaId){
|
|
var type =areaId;
|
|
if(confirm("파일을 삭제하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/common/deleteFileInfo.do",
|
|
type:"POST",
|
|
data:{"objId":fileObjId},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
if(type=="contractMgmt01"){
|
|
fileAreaDraw();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="ORDER_PLAN_OBJID" id="ORDER_PLAN_OBJID" value="${resultMap.ORDER_PLAN_OBJID}">
|
|
<input type="hidden" name="PARENT_OBJID" id="CONTRACT_OBJID" value="${resultMap.CONTRACT_OBJID}">
|
|
<input type="hidden" name="PRODUCT_GROUP" id="PRODUCT_GROUP" value="${resultMap.PRODUCT_GROUP}">
|
|
<input type="hidden" name="PRODUCT" id="PRODUCT" value="${resultMap.PRODUCT}">
|
|
|
|
<input type="hidden" name="objId" id="objId" value="${resultMap.ORDER_PLAN_OBJID}">
|
|
<input type="hidden" name="option" id="option">
|
|
<input type="hidden" name="contents" id="contents">
|
|
|
|
<div class="plm_menu_name_myungjin">
|
|
<h2>
|
|
<span>생산관리_생산계획수립 등록</span>
|
|
</h2>
|
|
</div>
|
|
<section style="float:left;width:70%;">
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>고객정보</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">고객명</label></td>
|
|
<td class="input_sub_title">${resultMap.SUPPLY_NAME}</td>
|
|
|
|
<td class="input_title"><label for="supply_code">고객구분</label></td>
|
|
<td class="input_sub_title">${resultMap.SUPPLY_CODE}</td>
|
|
|
|
<td class="input_title"><label for="area_cd">지역</label></td>
|
|
<td class="input_sub_title">${resultMap.AREA_CD}</td>
|
|
<td class="input_title"><label for="">대표자명</label></td>
|
|
<td class="input_sub_title">${resultMap.CHARGE_USER_NAME}</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td class="input_title"><label for="">실사용자명</label></td>
|
|
<td class="input_sub_title">${resultMap.REG_ID}</td>
|
|
<td class="input_title"><label for="">사업자등록번호</label></td>
|
|
<td class="input_sub_title">${resultMap.BUS_REG_NO}</td>
|
|
<td class="input_title"><label for="">법인/주민번호</label></td>
|
|
<td class="input_sub_title">${resultMap.REG_NO}</td>
|
|
<td class="input_title"><label for="">업태</label></td>
|
|
<td class="input_sub_title">${resultMap.SUPPLY_BUSNAME}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">업종</label></td>
|
|
<td class="input_sub_title">${resultMap.SUPPLY_STOCKNAME}</td>
|
|
<td class="input_title"><label for="">핸드폰</label></td>
|
|
<td class="input_sub_title">${resultMap.SUPPLY_TEL_NO}</td>
|
|
<td class="input_title"><label for="">E-MAIL</label></td>
|
|
<td class="input_sub_title">${resultMap.EMAIL}</td>
|
|
<td class="input_title"><label for="">OFFICE NO</label></td>
|
|
<td class="input_sub_title">${resultMap.OFFICE_NO}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">주소</label></td>
|
|
<td class="input_sub_title" colspan="5">${resultMap.SUPPLY_ADDRESS}</td>
|
|
<td class="input_title"><label for="">FAX NO</label></td>
|
|
<td class="input_sub_title">${resultMap.SUPPLY_FAX_NO}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>계약제품</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="11%">
|
|
<col width="11%">
|
|
<col width="11%">
|
|
<col width="11%">
|
|
<col width="11%">
|
|
<col width="11%">
|
|
<col width="11%">
|
|
<col width="11%">
|
|
<col width="11%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">제품구분</label></td>
|
|
<td class="input_title"><label for="">제품</label></td>
|
|
<td class="input_title"><label for="">기종(모델)</label></td>
|
|
<td class="input_title"><label for="">수량</label></td>
|
|
<td class="input_title"><label for="">차량</label></td>
|
|
<td class="input_title"><label for="">적재함확장</label></td>
|
|
<td class="input_title"><label for="">보증기간</label></td>
|
|
<td class="input_title"><label for="">주행거리(km)</label></td>
|
|
<td class="input_title"><label for="">금액(원)</label></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_sub_title">
|
|
${resultMap.CATEGORY_CD_NAME}
|
|
</td>
|
|
<td class="input_sub_title">
|
|
${resultMap.PRODUCT_GROUP_NAME}
|
|
</td>
|
|
<td class="input_sub_title">
|
|
${resultMap.PRODUCT_NAME}
|
|
</td>
|
|
<td class="input_sub_title">
|
|
${resultMap.QTY}
|
|
</td>
|
|
<td class="input_sub_title">
|
|
${resultMap.VEHICLE_CD_NAME}
|
|
</td>
|
|
<td class="input_sub_title">
|
|
${resultMap.LOAD_BOX_CD_NAME}
|
|
</td>
|
|
|
|
<td class="input_sub_title" >
|
|
${resultMap.WARRANTY}
|
|
</td>
|
|
|
|
<td class="input_sub_title" >
|
|
${resultMap.WARRANTY_KM}
|
|
</td>
|
|
|
|
<td class="input_sub_title" >
|
|
${resultMap.CONTRACT_PRODUCT_PRICE}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>계약금액</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
<col width="15%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title" colspan="6"><label for="">제품가 합계금액(원)</label></td>
|
|
<td class="input_sub_title">
|
|
<fmt:formatNumber value="${resultMap.PRODUCT_PRICE}" pattern="#,###" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" colspan="6"><label for="">옵션가 합계금액(원)</label></td>
|
|
<td class="input_sub_title">
|
|
<fmt:formatNumber value="${resultMap.OPTION_PRICE}" pattern="#,###" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" colspan="6"><label for="">기타비용(원)</label></td>
|
|
<td class="input_sub_title">
|
|
<fmt:formatNumber value="${resultMap.OTHER_PRICE}" pattern="#,###" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td class="input_title"><label for="">총 계약금액(원)</label></td>
|
|
<td class="input_sub_title" colspan="6">
|
|
<fmt:formatNumber value="${resultMap.TOTAL_PRICE}" pattern="#,###" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">특별할인(%)</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.SALE}
|
|
</td>
|
|
<td class="input_title" colspan="4"><label for="">계약 체결금액(원)</label></td>
|
|
<td class="input_sub_title">
|
|
<fmt:formatNumber value="${resultMap.FINAL_TOTAL_PRICE}" pattern="#,###" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" rowspan="3" ><label for="">첨부파일</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="6">
|
|
<div id="contractMgmt01DropZone" class="dropzone"style="width:99%; height:50px; !important;">Drag & Drop Files Here</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="6">
|
|
<div class="project_form_in_table" style="width: 100%" id="contractMgmt01FileAreaTable">
|
|
<div style="overflow-y: scroll;">
|
|
<table style="width: 100%;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>No</td>
|
|
<td>첨부파일명</td>
|
|
<td>등록일</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="plm_scroll_table" style="height: 75px;">
|
|
<table id="contractMgmt01FileArea" class="fileListscrollTbody">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>계약담당</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">담당자</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.CONTRACT_USER_NAME}
|
|
</td>
|
|
<td class="input_title"><label for="">계약일</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.CONTRACT_DATE}
|
|
</td>
|
|
<td class="input_title"><label for="">핸드폰</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.CONTRACT_PHONE}
|
|
</td>
|
|
<td class="input_title"><label for="">E-MAIL</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.CONTRACT_EMAIL}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">OFFICE NO</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.CONTRACT_OFFICE_NO}
|
|
</td>
|
|
<td class="input_title"><label for="">FAX NO</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.CONTRACT_FAX_NO}
|
|
</td>
|
|
<td class="input_title"><label for="">출고예정일</label></td>
|
|
<td class="input_sub_title">
|
|
${resultMap.EST_RELEASE_DATE}
|
|
</td>
|
|
<td class="input_sub_title">
|
|
${resultMap.EST_RELEASE_DATE1}
|
|
</td>
|
|
<td class="input_sub_title">
|
|
${resultMap.EST_RELEASE_DATE2}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>생산계획 정보</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
<col width="10%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">생산계획 제목</label></td>
|
|
<td class="input_sub_title" colspan="9">
|
|
<input type="text" name="TITLE" id="TITLE" value="${resultMap.TITLE}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">밀링(예상시작일)</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="STEP1_START_DATE" id="STEP1_START_DATE" value="${resultMap.STEP1_START_DATE}" class="date_icon">
|
|
</td>
|
|
|
|
|
|
<td class="input_title"><label for="">선반(예상시작일)</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="STEP2_START_DATE" id="STEP2_START_DATE" value="${resultMap.STEP2_START_DATE}" class="date_icon">
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">CNC(예상시작일)</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="STEP3_START_DATE" id="STEP3_START_DATE" value="${resultMap.STEP3_START_DATE}" class="date_icon">
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">재관(예상시작일)</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="STEP4_START_DATE" id="STEP4_START_DATE" value="${resultMap.STEP4_START_DATE}" class="date_icon">
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">레디알(예상시작일)</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="STEP5_START_DATE" id="STEP5_START_DATE" value="${resultMap.STEP5_START_DATE}" class="date_icon">
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">밀링 담당자</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="STEP1_USER_ID" id="STEP1_USER_ID" required reqTitle="밀링 담당자" type="select"><option value="">선택</option>${code_map.STEP1_USER_ID}</select>
|
|
</td>
|
|
<td class="input_title"><label for="">선반 담당자</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="STEP2_USER_ID" id="STEP2_USER_ID" required reqTitle="선반 담당자" type="select"><option value="">선택</option>${code_map.STEP2_USER_ID}</select>
|
|
</td>
|
|
<td class="input_title"><label for="">CNC 담당자</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="STEP3_USER_ID" id="STEP3_USER_ID" required reqTitle="CNC 담당자" type="select"><option value="">선택</option>${code_map.STEP3_USER_ID}</select>
|
|
</td>
|
|
<td class="input_title"><label for="">재관 담당자</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="STEP4_USER_ID" id="STEP4_USER_ID" required reqTitle="재관 담당자" type="select"><option value="">선택</option>${code_map.STEP4_USER_ID}</select>
|
|
</td>
|
|
<td class="input_title"><label for="">레디알 담당자</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="STEP5_USER_ID" id="STEP5_USER_ID" required reqTitle="레디알 담당자" type="select"><option value="">선택</option>${code_map.STEP5_USER_ID}</select>
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</section>
|
|
<aside style="float:right;width:30%;">
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>생산계획 정보</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="35%">
|
|
<col width="*">
|
|
</colgroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr style="width:100%;">
|
|
<td colspan="2" style="border-right:1px solid #000000;text-align:center;" >
|
|
<textarea id="content" rows="20" cols="100" style="width:100%; height: 600px;">${resultMap.CONTENTS}</textarea>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</aside>
|
|
<footer style="width:100%;height:10px;clear:both;">
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</form>
|
|
</body>
|
|
</html> |