- Add Docker Compose configurations for dev, prod, and standalone environments - Add database initialization scripts (init-db.sh, init-db-docker.sh) - Add enhanced start-docker-linux.sh with DB init support - Add comprehensive database initialization guide - Support for automatic dbexport.pgsql import on first run - Include safety checks for production environment
392 lines
14 KiB
Plaintext
392 lines
14 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 sabun = CommonUtils.checkNull(person.getSabun());
|
|
String userName = CommonUtils.checkNull(person.getUserName());
|
|
String deptName = CommonUtils.checkNull(person.getDeptName());
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script src="//t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
|
|
$('.select2').select2();
|
|
|
|
//첨부파일
|
|
fnc_setFileDropZone("contractMgmt01DropZone", "${OBJID}", "contractMgmt01", "contractMgmt01", "fileAreaDraw",false,null,null);
|
|
fileAreaDraw();
|
|
|
|
//상담지역1
|
|
if("${info.COUNSELING_AREA1}"!=""){
|
|
fnc_address2List("${info.COUNSELING_AREA1}","counseling_area2", "${info.COUNSELING_AREA2}");
|
|
}
|
|
//날짜
|
|
_fnc_datepick();
|
|
|
|
//저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
$("#counseling_area1").change(function(){
|
|
|
|
fnc_address2List(this.value,"counseling_area2", "");
|
|
});
|
|
|
|
$("#btnClose").click(function(){
|
|
self.close();
|
|
});
|
|
|
|
//버튼
|
|
$(".btn_address").click(function(){
|
|
Postcode()
|
|
});
|
|
});
|
|
|
|
|
|
function Postcode() {
|
|
new daum.Postcode({
|
|
oncomplete: function(data) {
|
|
// 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
|
|
|
|
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
|
|
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
|
|
var addr = ''; // 주소 변수
|
|
var extraAddr = ''; // 참고항목 변수
|
|
|
|
//사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
|
|
if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
|
|
addr = data.roadAddress;
|
|
} else { // 사용자가 지번 주소를 선택했을 경우(J)
|
|
addr = data.jibunAddress;
|
|
}
|
|
|
|
// 사용자가 선택한 주소가 도로명 타입일때 참고항목을 조합한다.
|
|
if(data.userSelectedType === 'R'){
|
|
// 법정동명이 있을 경우 추가한다. (법정리는 제외)
|
|
// 법정동의 경우 마지막 문자가 "동/로/가"로 끝난다.
|
|
if(data.bname !== '' && /[동|로|가]$/g.test(data.bname)){
|
|
extraAddr += data.bname;
|
|
}
|
|
// 건물명이 있고, 공동주택일 경우 추가한다.
|
|
if(data.buildingName !== '' && data.apartment === 'Y'){
|
|
extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
|
|
}
|
|
// 표시할 참고항목이 있을 경우, 괄호까지 추가한 최종 문자열을 만든다.
|
|
if(extraAddr !== ''){
|
|
extraAddr = ' (' + extraAddr + ')';
|
|
}
|
|
// 조합된 참고항목을 해당 필드에 넣는다.
|
|
// document.getElementById("detailed_address").value = extraAddr;
|
|
addr = addr+extraAddr;
|
|
} else {
|
|
// document.getElementById("detailed_address").value = '';
|
|
}
|
|
|
|
// 우편번호와 주소 정보를 해당 필드에 넣는다.
|
|
document.getElementById('zip_code').value = data.zonecode;
|
|
document.getElementById("address").value = addr;
|
|
// 커서를 상세주소 필드로 이동한다.
|
|
document.getElementById("address").focus();
|
|
}
|
|
}).open();
|
|
}
|
|
|
|
|
|
function fn_save(){
|
|
//if(fnc_valitate("form1")){
|
|
var message="수정";
|
|
if("${actionType}"=='regist'){
|
|
message="등록";
|
|
}
|
|
if(confirm(message+"하시겠습니까?")){
|
|
|
|
$.ajax({
|
|
url:"/contractMgmt/savecounselingInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.RESULT.msg);
|
|
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":"${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="OBJID" id="OBJID" value="${OBJID}">
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>상담관리_상당등록</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>영업사원정보</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="20%">
|
|
<col width="80%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">사번</label></td>
|
|
<td class="input_sub_title">
|
|
<%=sabun%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="supply_code">이름</label></td>
|
|
<td class="input_sub_title">
|
|
<%=userName%>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="area_cd">소속</label></td>
|
|
<td class="input_sub_title">
|
|
<%=deptName%>
|
|
</td>
|
|
|
|
</tr>
|
|
<!-- <tr>
|
|
<td class="input_title"><label for="">지사</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="charge_user_name" id="charge_user_name" maxlength="20" readonly disabled="disabled" />
|
|
</td>
|
|
</tr> -->
|
|
</table>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>상담내역</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="16.6%">
|
|
<col width="16.6%">
|
|
<col width="16.6%">
|
|
<col width="16.6%">
|
|
<col width="16.6%">
|
|
<col width="16.6%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="area_cd">상담일자</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" class="date_icon" name="reg_date" id="reg_date" value="${info.REG_DATE}" />
|
|
</td>
|
|
|
|
<td class="input_title"><label for="area_cd">거래유형</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="trans_type" id="trans_type" required reqTitle="거래유형" type="select" class="select2"><option value="">선택</option>${code_map.trans_type}</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="area_cd">상담구분</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="counseling_category" id="counseling_category" required reqTitle="상담구분" type="select" class="select2"><option value="">선택</option>${code_map.counseling_category}</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="area_cd">상담유형</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="counseling_type" id="counseling_type" required reqTitle="상담유형" type="select" class="select2"><option value="">선택</option>${code_map.counseling_type}</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="area_cd">상담지역1</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="counseling_area1" id="counseling_area1" required reqTitle="상담지역1" type="select" class="select2"><option value="">선택</option>${code_map.counseling_area1}</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="area_cd">상담지역2</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="counseling_area2" id="counseling_area2" required reqTitle="상담지역2" type="select" class="select2"><option value="">선택</option></select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="area_cd">우편번호</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="zip_code" id="zip_code" class="btn_address" readonly value="${info.ZIP_CODE}" />
|
|
</td>
|
|
|
|
<td class="input_title"><label for="area_cd">주소</label></td>
|
|
<td class="input_sub_title" colspan="3">
|
|
<input type="text" name="address" id="address" value="${info.ADDRESS}" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="client_name">거래처명</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="client_name" id="client_name" value="${info.CLIENT_NAME}" />
|
|
</td>
|
|
<td class="input_title"><label for="client_name">연락처</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="phone" id="phone" value="${info.PHONE}" />
|
|
</td>
|
|
<td class="input_title"><label for="customer_name">고객명(담당자)</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="customer_name" id="customer_name" value="${info.CUSTOMER_NAME}" />
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="grade">등급</label></td>
|
|
<td class="input_sub_title" colspan="2">
|
|
<select name="grade" id="grade" required reqTitle="등급" type="select" class="select2"><option value="">선택</option>${code_map.grade}</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="industry">업종</label></td>
|
|
<td class="input_sub_title" colspan="2">
|
|
<select name="industry" id="industry" required reqTitle="업종" type="select" class="select2"><option value="">선택</option>${code_map.industry}</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="equipment_yn">장비보유여부</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="equipment_yn" id="equipment_yn" required reqTitle="장비보유여부" type="select" class="select2"><option value="">선택</option>${code_map.equipment_yn}</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="qty">보유대수</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="qty" id="qty" required reqTitle="보유대수" type="select" class="select2"><option value="">선택</option>${code_map.qty}</select>
|
|
</td>
|
|
<td class="input_title"><label for="rep_model">대표관심모델</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="rep_model" id="rep_model" required reqTitle="대표관심모델" type="select" class="select2"><option value="">선택</option>${code_map.rep_model}</select>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="note">특이사항</label></td>
|
|
<td class="input_sub_title">
|
|
<textarea name="note" id="note" rows="10" cols="135" >${info.NOTE} </textarea>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<c:choose>
|
|
<c:when test="${actionType eq 'regist'}">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input type="button" value="수정" id="btnSave" class="plm_btns">
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |