- 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
370 lines
11 KiB
Plaintext
370 lines
11 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());
|
|
request.setAttribute("userName", person.getUserName());
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
|
|
|
|
$("input:text[numberOnly]").on("keyup", function() {
|
|
$(this).val(addComma($(this).val().replace(/[^0-9]/g,"")));
|
|
});
|
|
|
|
//첨부파일
|
|
fnc_setFileDropZone("optionMng01DropZone", "${objId}", "optionMng01", "optionMng01", "fileAreaDraw",false,null,null);
|
|
fileAreaDraw();
|
|
|
|
//저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
//닫기
|
|
$("#btnClose").click(function(){
|
|
self.close();
|
|
});
|
|
|
|
if("${info.HIGH_CD}"!=""){
|
|
fnc_OptionChildlist("${info.HIGH_CD}","mid","mid", "");
|
|
}
|
|
|
|
|
|
if("${info.MID_CD}"!=""){
|
|
$("#mid").val("${info.MID_CD}");
|
|
}
|
|
|
|
$("#high").change(function(){
|
|
|
|
if(this.value==""){
|
|
$("#category").val("high");
|
|
}else{
|
|
$("#category").val("mid");
|
|
}
|
|
$("#parent_objid").val(this.value);
|
|
fnc_OptionChildlist(this.value,"mid","mid", "");
|
|
});
|
|
|
|
$("#mid").change(function(){
|
|
|
|
if(this.value==""){
|
|
$("#category").val("mid");
|
|
}else{
|
|
$("#category").val("low");
|
|
}
|
|
$("#parent_objid").val(this.value);
|
|
|
|
//fnc_OptionChildlist(this.value,"mid","mid", "");
|
|
});
|
|
|
|
|
|
$("#price").change(function(){
|
|
var price = $(this).val().replace(/,/gi,"");
|
|
if (isNaN(price)) final_price = 0;
|
|
$("#price").val(addComma(price));
|
|
});
|
|
});
|
|
|
|
function fn_save(){
|
|
//if(fnc_valitate("form1")){
|
|
var message="수정";
|
|
if("${actionType}"=='regist'){
|
|
message="등록";
|
|
}
|
|
|
|
if(confirm(message+"하시겠습니까?")){
|
|
|
|
$("#price").val($("#price").val().replace(/,/gi,""));
|
|
//// 날짜 - 제거
|
|
//var $dateinput = $("input.date_icon");
|
|
//for(var i=0; i<$dateinput.length; i++){
|
|
// $dateinput.eq(i).val( $dateinput.eq(i).val().replace(/-/gi,"") );
|
|
//}
|
|
if($("#parent_objid").val()==""){
|
|
$("#category").val("high");
|
|
}
|
|
|
|
$.ajax({
|
|
url:"/optionMng/saveOptionMngInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.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("optionMng01","optionMng01");
|
|
}
|
|
//첨부파일 목록을 가져온다.
|
|
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=="optionMng01"){
|
|
fileAreaDraw();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fnc_numberOnly(obj){
|
|
$("#"+obj.attr("id")).val(addComma(obj.val().replace(/[^0-9]/g,"")));
|
|
//.replace(/[^0-9]/g,""))
|
|
}
|
|
|
|
function addComma(data) {
|
|
return data.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${objId}">
|
|
<input type="hidden" name="category" id="category" value="${info.CATEGORY}">
|
|
<input type="hidden" name="parent_objid" id="parent_objid" value="${info.PARENT_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="25%">
|
|
<col width="75%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="option_no">NO</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="option_no" id="option_no" value="${actionType eq 'regist'?'자동생성':info.OPTION_NO}" readonly maxlength="100" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="option_no">대</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="high" id="high" required reqTitle="대" type="select">
|
|
<option value="">선택</option>${code_map.category_cd}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="option_no">중</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="mid" id="mid" required reqTitle="중" type="select">
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- <tr>
|
|
<td class="input_title"><label for="option_no">소</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="low" id="low" required reqTitle="소" type="select">
|
|
</select>
|
|
</td>
|
|
</tr> -->
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="option_name">옵션명</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="option_name" id="option_name" value="${info.OPTION_NAME}" maxlength="100" />
|
|
</td>
|
|
</tr>
|
|
<%-- <tr>
|
|
<td class="input_title"><label for="option_name_eng">영문 명</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="option_name_eng" id="option_name_eng" value="${info.OPTION_NAME_ENG}" maxlength="100" />
|
|
</td>
|
|
</tr> --%>
|
|
<%-- <tr>
|
|
<td class="input_title"><label for="std_code">표준코드</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="std_code" id="std_code" value="${info.STD_CODE}" maxlength="100" />
|
|
</td>
|
|
</tr> --%>
|
|
<tr>
|
|
<td class="input_title"><label for="option_type">규격</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="option_type" id="option_type" value="${info.OPTION_TYPE}" maxlength="100" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="reg_date">등록일</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="reg_date" id="reg_date" value="${actionType eq 'regist'?'현재일자 자동입력':info.REG_DATE}" maxlength="100" disabled="disabled" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="writer">등록자</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="writer" id="writer" value="${actionType eq 'regist'?userName:info.WRITER}" readonly maxlength="100" disabled="disabled" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="price">옵션가</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="price" id="price" value="<fmt:formatNumber value="${info.PRICE}" pattern="#,###" />" maxlength="100" onKeyup='javascript:fnc_numberOnly($(this))' />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" rowspan="3" ><label for="attach_yn">도면유무</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div id="optionMng01DropZone" class="dropzone"style="width:99%; height:50px; !important;">Drag & Drop Files Here</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div class="project_form_in_table" style="width: 100%" id="optionMng01FileAreaTable">
|
|
<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="optionMng01FileArea" class="fileListscrollTbody">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="status">상태</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="status" id="status" required type="select" title="활성화여부">
|
|
<option value="">선택</option>
|
|
<option value="active" ${'active' eq info.STATUS ? 'selected' : ''}>활성화</option>
|
|
<option value="inActive" ${'inActive' eq info.STATUS ? 'selected' : ''}>비활성화</option>
|
|
</select>
|
|
</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>
|
|
<c:if test="${info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
<input type="button" value="수정" id="btnSave" class="plm_btns">
|
|
</c:if>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |