- 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
478 lines
14 KiB
Plaintext
478 lines
14 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);
|
|
});
|
|
|
|
$("#btnEdit").click(function(){
|
|
fn_edit();
|
|
});
|
|
|
|
//명칭 변경 시
|
|
$("#RESOURCE_TITLE").change(function(){
|
|
|
|
$("#PRODUCT_TITLE").empty();
|
|
|
|
if("" != this.value){
|
|
fnc_getCodeListAppend(this.value,"PRODUCT_TITLE","${resultMap.PRODUCT_TITLE_ORG}");
|
|
}else{
|
|
$("#PRODUCT_TITLE").append("<option value=''>선택</option>");
|
|
}
|
|
});
|
|
|
|
fnc_setFileDropZone("resourceMasterMngDropZone", "${resultMap.OBJID}", "RESOURCE_MASTER_MNG_FILE", "자재마스터 첨부파일", "fileAreaDraw",false,null,null);
|
|
|
|
fileAreaDraw();
|
|
|
|
fnc_datepick();
|
|
|
|
//명칭기준정보 목록을 가져온다.
|
|
fnc_getCodeListAppend("<%=Constants.RESOURCE_TITLE_CD%>","RESOURCE_TITLE","${resultMap.RESOURCE_TITLE_ORG}");
|
|
|
|
if("" != "${resultMap.RESOURCE_TITLE_ORG}"){
|
|
fnc_getCodeListAppend("${resultMap.RESOURCE_TITLE_ORG}","PRODUCT_TITLE","${resultMap.PRODUCT_TITLE_ORG}");
|
|
}
|
|
|
|
//원단가 목록을 가져온다.
|
|
fn_getResourcePriceList();
|
|
|
|
$("#resourceMasterMngDropZone").hide();
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
|
|
function fileAreaDraw(){
|
|
fn_fileCallback2("resourceMasterMng","RESOURCE_MASTER_MNG_FILE");
|
|
}
|
|
|
|
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 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("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/resourceMasterMng/saveResourceMasterMng.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){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
function fn_getResourcePriceList(){
|
|
$.ajax({
|
|
url:"/resourceMasterMng/resourcePriceList.do",
|
|
type:"POST",
|
|
data:{"OBJID":"${resultMap.OBJID}"},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
var resultList = data;
|
|
|
|
console.log("resultList:"+resultList);
|
|
|
|
if(0 < resultList.length){
|
|
$("#resourcePriceAera").empty();
|
|
|
|
var appendHtml = "";
|
|
appendHtml += "<colgroup>";
|
|
appendHtml += " <col width='6%'>";
|
|
appendHtml += " <col width='20%'>";
|
|
appendHtml += " <col width='20%'>";
|
|
appendHtml += " <col width='20%'>";
|
|
appendHtml += " <col width='15%'>";
|
|
appendHtml += " <col width='*'>";
|
|
appendHtml += "</colgroup>";
|
|
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
console.log(resultList[i]);
|
|
var resourPriceObjId = resultList[i].OBJID;
|
|
var no = resultList[i].RNUM;
|
|
var unitPrice = resultList[i].UNIT_PRICE;
|
|
|
|
var personPrice = resultList[i].PERSON_PRICE;
|
|
var agencyPrice = resultList[i].AGENCY_PRICE;
|
|
var remark = resultList[i].REMARK;
|
|
var regdateTitle = resultList[i].APPLY_DATE_TITLE;
|
|
|
|
appendHtml += "<tr>";
|
|
appendHtml += " <input type='hidden' name='resourPriceObjId' value='"+resourPriceObjId+"'>";
|
|
appendHtml += " <td>"+no+"</td>";
|
|
appendHtml += " <td>"+fnc_addComma(unitPrice);+"</td>";
|
|
if(personPrice==undefined){
|
|
appendHtml += " <td>0</td>";
|
|
}else{
|
|
appendHtml += " <td>"+fnc_addComma(personPrice);+"</td>";
|
|
}
|
|
if(agencyPrice==undefined){
|
|
appendHtml += " <td>0</td>";
|
|
}else{
|
|
appendHtml += " <td>"+fnc_addComma(agencyPrice);+"</td>";
|
|
}
|
|
|
|
appendHtml += " <td>"+regdateTitle+"</td>";
|
|
appendHtml += " <td class='align_l'>"+remark+"</td>";
|
|
appendHtml += "</tr>";
|
|
|
|
}
|
|
$("#resourcePriceAera").append(appendHtml);
|
|
}else{
|
|
var appendHtml = "";
|
|
appendHtml += "<tr id='emptyRow'>";
|
|
appendHtml += " <td colspan='6'>등록된 내용이 없습니다.</td>";
|
|
appendHtml += "</tr>";
|
|
|
|
$("#resourcePriceAera").append(appendHtml);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
function fn_addResourcePrice(){
|
|
|
|
var newObjectId = "";
|
|
|
|
$.ajax({
|
|
url:"/common/createObjectId.do",
|
|
type:"POST",
|
|
data:{},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var resultMap = data;
|
|
|
|
if(null != resultMap){
|
|
|
|
$("#emptyRow").hide();
|
|
|
|
var no = $("input[name=resourPriceObjId]").length+1;
|
|
|
|
var appendHtml = "";
|
|
appendHtml += "<tr>";
|
|
appendHtml += " <input type='hidden' name='resourPriceObjId' value='"+resultMap.OBJID+"'>";
|
|
appendHtml += " <td>"+no+"</td>";
|
|
appendHtml += " <td><input type='number' name='UNIT_PRICE_"+resultMap.OBJID+"'></td>";
|
|
appendHtml += " <td><input type='text' name='APPLY_DATE_"+resultMap.OBJID+"' id='applyDate_"+resultMap.OBJID+"' ></td>";
|
|
appendHtml += " <td><input type='text' name='REMARK_"+resultMap.OBJID+"'></td>";
|
|
appendHtml += "</tr>";
|
|
|
|
if(0 < $("#resourcePriceAera tr:first").length){
|
|
$("#resourcePriceAera tr:first").before(appendHtml);
|
|
}else{
|
|
$("#resourcePriceAera").append(appendHtml);
|
|
}
|
|
|
|
}
|
|
|
|
fnc_datepick();
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
function fn_edit(){
|
|
if(confirm("수정하시겠습니까?")){
|
|
var form1 = document.form1;
|
|
form1.action = "/resourceMasterMng/resourceMasterMngFormPopUp.do";
|
|
form1.submit();
|
|
}
|
|
}
|
|
|
|
</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}">
|
|
<section>
|
|
<div class="plm_menu_name" style="display:flex;">
|
|
<h2>
|
|
<span>자재마스터 상세</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<!-- <div class="form_popup_title"> 영업활동 등록</div> -->
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="10%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<!-- <label for="">명칭</label> -->
|
|
<label for="">품번</label>
|
|
</td>
|
|
<td class="input_sub_title" >${resultMap.PART_NO}</td>
|
|
<td class="input_title">
|
|
<!-- <label for="">품명</label> -->
|
|
<label for="">품명</label>
|
|
</td>
|
|
<td class="input_sub_title" >${resultMap.PART_NAME}</td>
|
|
<td class="input_title">
|
|
<label for="">규격</label>
|
|
</td>
|
|
<td class="input_sub_title" >${resultMap.SPEC}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<!-- <label for="">중량</label> -->
|
|
<label for="">재질</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.MATERIAL}</td>
|
|
<td class="input_title">
|
|
<label for="">단위</label>
|
|
</td>
|
|
<td class="input_sub_title" >${resultMap.UNIT}</td>
|
|
<td class="input_title">
|
|
<!-- <label for="">Unit</label> -->
|
|
<label for="">중량</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.WEIGHT}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">두께</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.THICKNESS}</td>
|
|
<td class="input_title">
|
|
<label for="">가로</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.WIDTH}</td>
|
|
<td class="input_title">
|
|
<label for="">세로</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.HEIGHT}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">외경</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.OUT_DIAMETER}</td>
|
|
<td class="input_title">
|
|
<label for="">내경</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.IN_DIAMETER}</td>
|
|
<td class="input_title">
|
|
<label for="">길이</label>
|
|
</td>
|
|
<td class="input_sub_title">${resultMap.LENGTH}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap" style="margin-top:10px;">
|
|
<table class="pmsPopupForm">
|
|
<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="6%">
|
|
<col width="20%">
|
|
<col width="20%">
|
|
<col width="20%">
|
|
<col width="15%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>No</td>
|
|
<td>원단가</td>
|
|
<td>판가(개인)</td>
|
|
<td>판가(대리점)</td>
|
|
<td>등록일</td>
|
|
<td>비고</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="plm_scroll_table" style="height:190px;">
|
|
<table id="resourcePriceAera" class="fileListscrollTbody">
|
|
<colgroup>
|
|
<col width="6.2%">
|
|
<col width="20.2%">
|
|
<col width="20.2%">
|
|
<col width="20.2%">
|
|
<col width="15%">
|
|
<col width="*">
|
|
</colgroup>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="businessPopupFormWrap" style="margin-top:10px;">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td>
|
|
<div id="resourceMasterMngDropZone" class="dropzone"style="width:99% !important;">Drag & Drop Files Here</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div class="project_form_in_table"style="width:100%" id="resourceMasterMngFileAreaTable" >
|
|
<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="resourceMasterMngFileArea" class="fileListscrollTbody">
|
|
<tr>
|
|
<td colspan="3">첨부 파일이 없습니다.</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<c:choose>
|
|
<c:when test="${resultMap.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
|
|
<input type="button" value="수정" id="btnEdit" 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> |