557 lines
18 KiB
Plaintext
557 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 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>
|
|
</head>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
$("#moldNoObjId").change(function(){
|
|
fn_getMoldInfo();
|
|
});
|
|
|
|
$("#statusSel").change(function(){
|
|
$("#status").val(this.value);
|
|
});
|
|
|
|
fnc_setFileDropZone("image1DropZone", "${resultMap.OBJID}", "CUSTOMER_MNG_IMG_01", "고객관리 형상 및 분석 이미지1", "fileAreaDraw",true,null,null,null);
|
|
fnc_setFileDropZone("image2DropZone", "${resultMap.OBJID}", "CUSTOMER_MNG_IMG_02", "고객관리 형상 및 분석 이미지2", "fileAreaDraw",true,null,null,null);
|
|
fnc_setFileDropZone("image3DropZone", "${resultMap.OBJID}", "CUSTOMER_MNG_IMG_03", "고객관리 조치내역 이미지1", "fileAreaDraw",true,null,null,null);
|
|
fnc_setFileDropZone("customerMngDropZone", "${resultMap.OBJID}", "CUSTOMER_MNG_FILE", "고객관리 첨부파일", "fileAreaDraw",false,null,null);
|
|
|
|
fileAreaDraw();
|
|
|
|
fnc_datepick();
|
|
|
|
fn_getApprovalLine();
|
|
|
|
fnc_getCodeListAppend("<%=Constants.MNG_TYPE_CD%>","MNG_TYPE","${resultMap.MNG_TYPE}");
|
|
fnc_getCodeListAppend("<%=Constants.PRODUCT_DIVISION_CD%>","PRODUCT_DIVISION","${resultMap.PRODUCT_DIVISION}");
|
|
fnc_getCodeListAppend("<%=Constants.PERFORMER_CD%>","PERFORMER","${resultMap.PERFORMER}");
|
|
fnc_getCodeListAppend("<%=Constants.MEASURE_TYPE_CD%>","MEASURE_TYPE","${resultMap.MEASURE_TYPE}");
|
|
fn_getCodeListAppend("<%=Constants.CUSTOMER_MNG_STATUS_CD%>","STATUS","${resultMap.STATUS}");
|
|
fn_getProjectNoList("PROJECT_OBJID","${resultMap.PROJECT_OBJID}");
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
|
|
//codeId를 부모로 사용하는 코드의 정보목록을 가져온다.
|
|
function fn_getCodeListAppend(codeId,selectboxId,selectedVal){
|
|
var resultList = fnc_getCodeList(codeId);
|
|
|
|
if(0 < resultList.length){
|
|
$("#"+selectboxId).empty();
|
|
|
|
$("#"+selectboxId).append("<option value=''>선택</option>");
|
|
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
var commonCodeId = resultList[i].CODE_ID;
|
|
var commonCodeName = resultList[i].CODE_NAME;
|
|
var appendText = "";
|
|
|
|
if(commonCodeName == "결재중" || commonCodeName == "반려" || commonCodeName == "결재완료"){
|
|
appendText = "disabled";
|
|
}
|
|
|
|
$("#"+selectboxId).append("<option value='"+commonCodeId+"' "+appendText+">"+commonCodeName+"</option>");
|
|
}
|
|
$("#"+selectboxId).val(selectedVal);
|
|
}
|
|
}
|
|
|
|
function fn_getProjectNoList(selectboxId,selectedVal){
|
|
$.ajax({
|
|
url:"/common/getProjectNoList.do",
|
|
type:"POST",
|
|
data:{},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
var resultList = data;
|
|
|
|
if(0 < resultList.length){
|
|
$("#"+selectboxId).empty();
|
|
|
|
$("#"+selectboxId).append("<option value=''>선택</option>");
|
|
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
var projectNoObjId = resultList[i].ORDER_MGMT_OBJID;
|
|
var projectNo = resultList[i].PROJECT_NO;
|
|
$("#"+selectboxId).append("<option value='"+projectNoObjId+"'>"+projectNo+"</option>");
|
|
}
|
|
$("#"+selectboxId).val(selectedVal);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//결재정보를 가져온다.
|
|
function fn_getApprovalLine(){
|
|
var scheduleList = new Array();
|
|
|
|
<c:forEach items="${approvalList}" var="approvalItem">
|
|
var seq = "${approvalItem.SEQ}";
|
|
var targetUserName = "${approvalItem.TARGET_USER_NAME}";
|
|
var procDate = "${approvalItem.PROC_DATE}";
|
|
|
|
if(1 == seq){
|
|
$("#reviewerName").append(targetUserName);
|
|
$("#reviewerDate").append(procDate);
|
|
}
|
|
|
|
if(2 == seq){
|
|
$("#confirmName").append(targetUserName);
|
|
$("#confirmDate").append(procDate);
|
|
}
|
|
</c:forEach>
|
|
}
|
|
|
|
function fileAreaDraw(){
|
|
fn_fileCallback("image1","CUSTOMER_MNG_IMG_01");
|
|
fn_fileCallback("image2","CUSTOMER_MNG_IMG_02");
|
|
fn_fileCallback("image3","CUSTOMER_MNG_IMG_03");
|
|
fn_fileCallback2("customerMng","CUSTOMER_MNG_FILE");
|
|
}
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_fileCallback(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${resultMap.OBJID}", "docType":fileType},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
|
|
//첨부파일 목록 영역 show
|
|
$("#"+areaId+"FileArea").empty();
|
|
|
|
if(0 < $("#"+areaId+"DropZone").length){
|
|
$("#"+areaId+"DropZone").hide();
|
|
$("#"+areaId+"FileArea").show();
|
|
}
|
|
|
|
$.each(data, function(i){
|
|
var realFileName = data[i].REAL_FILE_NAME;
|
|
|
|
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+realFileName+"&savedFileName="+data[i].SAVED_FILE_NAME+"&attDir="+data[i].FILE_PATH);
|
|
|
|
var appendText = "";
|
|
var appendImgText = ""
|
|
|
|
appendText+= "<a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
appendText+= "<a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
|
|
appendImgText = "<img src='"+srcLocation+"' height='210px' width='99%' onclick='openImagePopUp(this.src)' style='cursor:pointer;' />"
|
|
|
|
// $("#"+areaId+"FileArea").css({"background":"url('"+imageFilePath+"')"});
|
|
$("#"+areaId+"FileArea").append(appendImgText+appendText);
|
|
});
|
|
}else{
|
|
$("#"+areaId+"DropZone").show();
|
|
$("#"+areaId+"FileArea").empty();
|
|
$("#"+areaId+"FileArea").hide();
|
|
$("#"+areaId+"FileName").empty();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}//파일 첨부 END
|
|
|
|
function fn_fileCallback2(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${resultMap.OBJID}", "docType":fileType},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
|
|
//첨부파일 목록 영역 show
|
|
$("#"+areaId+"FileArea").empty();
|
|
|
|
if(0 < $("#"+areaId+"DefaultRow").length){
|
|
$("#"+areaId+"DefaultRow").hide();
|
|
}
|
|
|
|
$.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 += "<colgroup>";
|
|
appendText +=" <col width='10%''>";
|
|
appendText +=" <col width='*'>";
|
|
appendText +=" <col width='20%'>";
|
|
appendText +=" </colgroup>";
|
|
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>";
|
|
$("#"+areaId+"FileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#"+areaId+"DropZone").show();
|
|
$("#"+areaId+"AttachFileList").hide();
|
|
$("#"+areaId+"FileArea").empty();
|
|
var appendText = "";
|
|
appendText += "<tr>";
|
|
appendText += "<td>첨부 파일이 없습니다.</td>";
|
|
appendText +="</tr>";
|
|
$("#"+areaId+"FileArea").append(appendText);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}//파일 첨부 END
|
|
|
|
function openImagePopUp(url){
|
|
var img=new Image();
|
|
img.src=url;
|
|
var img_width=img.width;
|
|
var img_height=img.height;
|
|
var win_width=img.width+25;
|
|
var height=img.height+30;
|
|
|
|
window.open(url,"problemImgPopUp","width="+img_width+",height="+height+", menubars=no, scrollbars=yes'");
|
|
}
|
|
|
|
/*첨부 파일 삭제 */
|
|
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){
|
|
fileAreaDraw();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_save(){
|
|
|
|
if(fnc_validate('form1')){
|
|
if(confirm("저장하시겠습니까?")){
|
|
|
|
var status = $("#STATUS").val();
|
|
|
|
if("" == status){
|
|
$("#STATUS").val(fnc_getCodeId("<%=Constants.CUSTOMER_MNG_STATUS_CD%>","등록중"));
|
|
}
|
|
|
|
$.ajax({
|
|
url:"/customerMng/saveCustomerMng.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.message);
|
|
opener.fn_search();
|
|
self.close();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style>
|
|
.input_title {border-left:1px solid #ccc;}
|
|
.input_sub_title {border-left:1px solid #ccc;}
|
|
.pmsPopupForm tr:last-child td{border-bottom:1px solid #ccc;}
|
|
</style>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="OBJID" id="OBJID" value="${resultMap.OBJID}">
|
|
<input type="hidden" name="objId" id="objId" value="${resultMap.OBJID}">
|
|
<input type="hidden" name="division" id="division" value="${resultMap.DIVISION}">
|
|
<input type="hidden" name="actionType" id="actionType" value="${param.actionType}">
|
|
<section>
|
|
<div class="plm_menu_name" style="display:flex;">
|
|
<h2 style="width:50%;text-align:center;margin-top:15px;">
|
|
<span style="font-size:30px;">Customer Service Report</span>
|
|
</h2>
|
|
<table class="pmsPopupForm" style="width:50%;background:white;">
|
|
<colgroup>
|
|
<col width="20%">
|
|
<col width="20%">
|
|
<col width="20%">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
|
<td class="input_title" rowspan="3" style="text-align:center;">
|
|
<label>결재</label>
|
|
</td>
|
|
<td class="input_title" style="text-align:center;">
|
|
<label>작성자</label>
|
|
</td>
|
|
<td class="input_title" style="text-align:center;">
|
|
<label>검토</label>
|
|
</td>
|
|
<td class="input_title" style="text-align:center;">
|
|
<label>승인</label>
|
|
</td>
|
|
</tr>
|
|
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;">
|
|
<td class="input_sub_title" style="text-align:center;">
|
|
${resultMap.WRITER_TITLE}<!-- 작성자이름 -->
|
|
</td>
|
|
<td class="input_sub_title" style="text-align:center;" id="reviewerName"></td>
|
|
<td class="input_sub_title" style="text-align:center;" id="confirmName"></td>
|
|
</tr>
|
|
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
|
<td class="input_sub_title" style="text-align:center;">
|
|
${resultMap.REGDATE_TITLE}<!-- 작성일자 -->
|
|
</td>
|
|
<td class="input_sub_title" style="text-align:center;" id="reviewerDate"></td>
|
|
<td class="input_sub_title" style="text-align:center;" id="confirmDate"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<!-- <div class="form_popup_title"> 영업활동 등록</div> -->
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="8%">
|
|
<col width="17%">
|
|
<col width="8%">
|
|
<col width="17%">
|
|
<col width="8%">
|
|
<col width="17%">
|
|
<col width="8%%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">No.</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
<input type="hidden" name="MNG_NUMBER" id="MNG_NUMBER" value="${resultMap.MNG_NUMBER}">
|
|
<input type="text" value="${resultMap.MNG_NUMBER}" placeholder="${null eq resultMap.MNG_NUMBER ? '저장 시 자동체번됩니다.':''}" disabled>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">유형</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="MNG_TYPE" id="MNG_TYPE"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">제품구분</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="PRODUCT_DIVISION" id="PRODUCT_DIVISION"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">Project No.</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="PROJECT_OBJID" id="PROJECT_OBJID"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">접수일</label>
|
|
</td>
|
|
<td class="input_sub_title" >
|
|
<input type="text" name="RECEPTION_DATE" id="reception_date" value="${resultMap.RECEPTION_DATE_TITLE}">
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">발생장소</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="EVENT_LOCATION" id="EVENT_LOCATION" value="${resultMap.EVENT_LOCATION}">
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">조치일</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="ACTION_DATE" id="action_date" value="${resultMap.ACTION_DATE_TITLE}">
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">고객사명</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="CUSTOMER_NAME" id="CUSTOMER_NAME" value="${resultMap.CUSTOMER_NAME}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">제목</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="3">
|
|
<input type="text" name="TITLE" id="TITLE" value="${resultMap.TITLE}">
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">수행사</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="PERFORMER" id="PERFORMER"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">작성자</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.WRITER_TITLE}</td>
|
|
</tr>
|
|
</table>
|
|
<table class="pmsPopupForm" style="margin-top:10px;">
|
|
<colgroup>
|
|
<col width="30%">
|
|
<col width="30%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title" colspan="2">
|
|
<label for="">현상 및 분석</label>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">조치내역</label>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_sub_title" colspan="2" style="height:150px;">
|
|
<textarea id="ANALYSIS" name="ANALYSIS" style="width:99.9%;resize:none;height:100%;" placeholder="특이사항을 입력하세요.">${resultMap.ANALYSIS}</textarea>
|
|
</td>
|
|
<td class="input_sub_title" style="height:150px;">
|
|
<textarea id="MEASURE" name="MEASURE" style="width:99.9%;resize:none;height:100%;" placeholder="조치내역을 입력하세요.">${resultMap.MEASURE}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_sub_title" style="height:210px;">
|
|
<div id="image1DropZone" class="dropzone" style="width:99%;height:90%;border: 2px dotted rgb(130, 150, 194);">Drag & Drop Files Here</div>
|
|
<div id="image1FileArea" style="display:none;"></div>
|
|
</td>
|
|
<td class="input_sub_title" style="height:210px;">
|
|
<div id="image2DropZone" class="dropzone" style="width:99%;height:90%;border: 2px dotted rgb(130, 150, 194);">Drag & Drop Files Here</div>
|
|
<div id="image2FileArea" style="display:none;"></div>
|
|
</td>
|
|
<td class="input_sub_title" style="height:210px;">
|
|
<div id="image3DropZone" class="dropzone" style="width:99%;height:90%;border: 2px dotted rgb(130, 150, 194);">Drag & Drop Files Here</div>
|
|
<div id="image3FileArea" style="display:none;"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="pmsPopupForm" style="margin-top:10px;">
|
|
<colgroup>
|
|
<col width="8%">
|
|
<col width="*">
|
|
<col width="8%">
|
|
<col width="17%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title" rowspan="2">
|
|
<label for="">파일첨부</label>
|
|
</td>
|
|
<td>
|
|
<div id="customerMngDropZone" class="dropzone"style="width:99% !important;">Drag & Drop Files Here</div>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">비용구분</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="MEASURE_TYPE" id="MEASURE_TYPE"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div class="project_form_in_table"style="width:100%" id="customerMngFileAreaTable" >
|
|
<div style="overflow-y:scroll;">
|
|
<table class="" 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 class="plm_table">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
</table>
|
|
<table id="customerMngFileArea" class="fileListscrollTbody">
|
|
<tr>
|
|
<td colspan="3">첨부 파일이 없습니다.</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">조치비용(원)</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<input type="number" name="MEASURE_AMOUNT" id="MEASURE_AMOUNT" value="${resultMap.MEASURE_AMOUNT}">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="btn_wrap input_sub_title" style="text-align:right;padding-right:10px;">
|
|
상태: <select name="STATUS" id="STATUS"></select>
|
|
</div>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<c:choose>
|
|
<c:when test="${resultMap.WRITER eq connectUserId or param.actionType eq 'regist' or 'plm_admin' eq connectUserId}">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns create">
|
|
</c:when>
|
|
<c:otherwise></c:otherwise>
|
|
</c:choose>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |