- 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
428 lines
11 KiB
Plaintext
428 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.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<!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(){
|
|
//고객사 setting
|
|
fn_setOEMList();
|
|
|
|
//제품군 setting
|
|
fn_setProductGroupList();
|
|
|
|
//검사명 setting
|
|
fn_setTestTypeList();
|
|
|
|
//고객사별 차종 목록 조회
|
|
$("#oemObjId").change(function(){
|
|
var oemObjId = $(this).val();
|
|
|
|
fn_setCarTypeList(oemObjId);
|
|
});
|
|
|
|
//제품군별 제품 목록 조회
|
|
$("#prodGroupObjId").change(function(){
|
|
var productGroupObjId = $(this).val();
|
|
|
|
fn_setProductList(productGroupObjId);
|
|
});
|
|
|
|
//닫기
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
|
|
//저장
|
|
$("#btnSave").click(function(){
|
|
if(!fn_duplicateCheck()){
|
|
fn_save();
|
|
}
|
|
});
|
|
|
|
//취소
|
|
$("#btnCancel").click(function(){
|
|
var targetObjId = $(this).attr("data-OBJID");
|
|
var params = "?targetObjId="+targetObjId;
|
|
document.form1.action ="/quality/qualityTestDetailFormPopup.do"+params;
|
|
document.form1.submit();
|
|
});
|
|
|
|
//단계 change
|
|
$("#step1").change(function(){
|
|
fnc_setStep2($(this).val(), "${resultMap.STEP2}");
|
|
});
|
|
|
|
//단계1 change trigger
|
|
$("#step1").trigger("change");
|
|
});
|
|
</script>
|
|
<script>
|
|
//save
|
|
function fn_save(){
|
|
if(fn_validate()){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/quality/saveQualityTestInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.msg);
|
|
if(fnc_checkTrue(data.result)){
|
|
opener.fn_search();
|
|
self.close(0);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
//oem 목록 조회
|
|
function fn_setOEMList(){
|
|
$.ajax({
|
|
url:"/common/getOEMList.do",
|
|
type:"POST",
|
|
data:{"isJson":true},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].OEM_NAME+"("+data[i].OEM_CODE+")</option>";
|
|
});
|
|
|
|
$("#oemObjId").append(appendCode);
|
|
|
|
var dbVal = fnc_checkNull("${resultMap.OEM_OBJID}");
|
|
if(dbVal != ""){
|
|
$("#oemObjId > option[value="+dbVal+"]").attr("selected", "true");
|
|
$("#oemObjId").trigger("change");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//car 목록 조회
|
|
function fn_setCarTypeList(oemObjId){
|
|
|
|
if(fnc_checkNull(oemObjId) != ""){
|
|
$.ajax({
|
|
url:"/common/getCarTypeList.do",
|
|
type:"POST",
|
|
data:{"isJson":true, "search_oemObjId":oemObjId},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "<option value=''>선택</option>";
|
|
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].CAR_CODE+"("+data[i].CAR_NAME+")</option>";
|
|
});
|
|
|
|
$("#carObjId").children().remove();
|
|
$("#carObjId").append(appendCode);
|
|
$("#carObjId > option[value=${resultMap.CAR_OBJID}]").attr("selected", "true");
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}else{
|
|
$("#carObjId").children().remove();
|
|
$("#carObjId").append("<option value=''>선택</option>");
|
|
}
|
|
|
|
}
|
|
|
|
//product group 목록 조회
|
|
function fn_setProductGroupList(){
|
|
$.ajax({
|
|
url:"/common/getProductGroupList.do",
|
|
type:"POST",
|
|
data:{"isJson":true},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].PRODUCT_GROUP_NAME+"</option>";
|
|
});
|
|
|
|
$("#prodGroupObjId").append(appendCode);
|
|
|
|
var dbVal = fnc_checkNull("${resultMap.PROD_GROUP_OBJID}");
|
|
if(dbVal != ""){
|
|
$("#prodGroupObjId > option[value="+dbVal+"]").attr("selected", "true");
|
|
$("#prodGroupObjId").trigger("change");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//product 목록 조회
|
|
function fn_setProductList(productGroupObjId){
|
|
|
|
if(fnc_checkNull(productGroupObjId) != ""){
|
|
$.ajax({
|
|
url:"/common/getProductList.do",
|
|
type:"POST",
|
|
data:{"isJson":true, "search_productGroupObjId":productGroupObjId},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "<option value=''>선택</option>";
|
|
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].PRODUCT_NAME+"</option>";
|
|
});
|
|
|
|
$("#prodObjId").children().remove();
|
|
$("#prodObjId").append(appendCode);
|
|
var dbVal = fnc_checkNull("${resultMap.PROD_OBJID}");
|
|
if(dbVal != ""){
|
|
$("#prodObjId > option[value="+dbVal+"]").attr("selected", "true");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}else{
|
|
$("#prodObjId").children().remove();
|
|
$("#prodObjId").append("<option value=''>선택</option>");
|
|
}
|
|
|
|
}
|
|
|
|
//검사명 목록 조회
|
|
function fn_setTestTypeList(){
|
|
$.ajax({
|
|
url:"/common/getTestTypeList.do",
|
|
type:"POST",
|
|
data:{"isJson":true},
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].TEST_TYPE_NAME+"</option>";
|
|
});
|
|
|
|
$("#testTypeObjId").append(appendCode);
|
|
|
|
var dbVal = fnc_checkNull("${resultMap.TEST_TYPE_OBJID}");
|
|
if(dbVal != ""){
|
|
$("#testTypeObjId > option[value="+dbVal+"]").attr("selected", "true");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//정합성체크
|
|
function fn_validate(){
|
|
|
|
if($("#oemObjId").val() == null || $("#oemObjId").val() == ""){
|
|
Swal.fire("고객사를 선택해 주시기 바랍니다.");
|
|
$("#oemObjId").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#carObjId").val() == null || $("#carObjId").val() == ""){
|
|
Swal.fire("차종을 선택해 주시기 바랍니다.");
|
|
$("#carObjId").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#prodGroupObjId").val() == null || $("#prodGroupObjId").val() == ""){
|
|
Swal.fire("제품군을 선택해 주시기 바랍니다.");
|
|
$("#prodGroupObjId").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#prodObjId").val() == null || $("#prodObjId").val() == ""){
|
|
Swal.fire("제품을 선택해 주시기 바랍니다.");
|
|
$("#prodObjId").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#testTypeObjId").val() == null || $("#testTypeObjId").val() == ""){
|
|
Swal.fire("검사명을 선택해 주시기 바랍니다.");
|
|
$("#testTypeObjId").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#step1").val() == null || $("#step1").val() == ""){
|
|
Swal.fire("상위단계를 선택해 주시기 바랍니다.");
|
|
$("#step1").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#step2").val() == null || $("#step2").val() == ""){
|
|
Swal.fire("하위단계를 선택해 주시기 바랍니다.");
|
|
$("#step2").focus();
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
//중복체크
|
|
function fn_duplicateCheck(){
|
|
var result = false;
|
|
|
|
var carObjId = $("#carObjId").val();
|
|
var prodObjId = $("#prodObjId").val();
|
|
var testTypeObjId = $("#testTypeObjId").val();
|
|
var step1 = $("#step1").val();
|
|
var step2 = $("#step2").val();
|
|
|
|
$.ajax({
|
|
url:"/quality/checkDuplicateQualityTestInfo.do",
|
|
type:"POST",
|
|
data:{"carObjId":carObjId, "prodObjId":prodObjId, "testTypeObjId":testTypeObjId, "step1":step1, "step2":step2},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
if(data.result == "true"){
|
|
Swal.fire("이미 등록된 내용이 있습니다.\n품질결과는 차종, 제품, 검사명, 단계별 1개만 등록 가능합니다.");
|
|
result = true;
|
|
}else{
|
|
result = false;
|
|
}
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
|
|
return result;
|
|
}
|
|
</script>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${resultMap.OBJID}" />
|
|
<section style="min-width:300px;">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>품질검사현황</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<div class="form_popup_title"> 품질검사현황 정보입력</div>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="13%"/>
|
|
<col width="18%"/>
|
|
<col width="18%"/>
|
|
<col width="15%"/>
|
|
<col width="20%"/>
|
|
<col width="*"/>
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">고객사</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="oemObjId" id="oemObjId">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">차종</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="carObjId" id="carObjId">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">제품군</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="prodGroupObjId" id="prodGroupObjId">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">제품</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="prodObjId" id="prodObjId">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">검사명</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="testTypeObjId" id="testTypeObjId">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td><td><td colspans="2"></td>
|
|
<!--
|
|
<td class="input_title">
|
|
<label for="">담당자</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<input type="text" style="width:77%;">
|
|
<span class="search_btn"></span>
|
|
|
|
</td>
|
|
-->
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">단계1</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="step1" id="step1">
|
|
<option value="">선택</option>
|
|
<option value="design" ${resultMap.STEP1 eq 'design'?'selected':''}>설계</option>
|
|
<option value="develop" ${resultMap.STEP1 eq 'develop'?'selected':''}>개발</option>
|
|
<option value="production" ${resultMap.STEP1 eq 'production'?'selected':''}>양산</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">단계2</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="step2" id="step2">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
<c:choose>
|
|
<c:when test="${param.actionType eq 'regist'}">
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input type="button" id="btnCancel" value="취소" class="plm_btns" data-OBJID="${resultMap.OBJID}">
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |