311 lines
8.9 KiB
Plaintext
311 lines
8.9 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>
|
|
<script>
|
|
$(function(){
|
|
//고객사 setting
|
|
fn_setOEMList();
|
|
|
|
//고객사별 차종 목록 조회
|
|
$("#oemObjId").change(function(){
|
|
var oemObjId = $(this).val();
|
|
|
|
fn_setCarTypeList(oemObjId);
|
|
});
|
|
|
|
//단계 change
|
|
$("#step1").change(function(){
|
|
fnc_setStep2($(this).val(), "${info.STEP2}");
|
|
});
|
|
|
|
//단계1 change trigger
|
|
$("#step1").trigger("change");
|
|
|
|
$(".searchPart").click(function(){
|
|
fn_openSearchPart();
|
|
});
|
|
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
|
|
fnc_datepick();
|
|
});
|
|
</script>
|
|
<script>
|
|
function fn_save(){
|
|
if(fn_validate()){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/problem/saveProblemContinualReflectHistoryInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.msg);
|
|
if(data.result == "true"){
|
|
opener.fn_refresh();
|
|
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("${info.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 = "";
|
|
|
|
$.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=${info.CAR_OBJID}]").attr("selected", "true");
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}else{
|
|
$("#carObjId").children().remove();
|
|
$("#carObjId").append("<option value=''>선택</option>");
|
|
}
|
|
|
|
}
|
|
|
|
//search part
|
|
function fn_openSearchPart(){
|
|
var targetObjId = $("#objId").val();
|
|
var url = "/common/openSearchPartPopup.do?callback=setPartInfo";
|
|
window.open(url, "searchPart", "width=600, height=400");
|
|
}
|
|
|
|
function setPartInfo(partObjId, partNo, partName){
|
|
$("#partNo").val(partNo);
|
|
$("#partName").val(partName);
|
|
}
|
|
|
|
//정합성체크
|
|
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($("#partNo").val() == null || $("#partNo").val() == ""){
|
|
Swal.fire("품번/품명을 조회해주시기 바랍니다.");
|
|
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;
|
|
}
|
|
|
|
if($("#reflectDate").val() == null || $("#reflectDate").val() == ""){
|
|
Swal.fire("반영일자를 입력해 주시기 바랍니다.");
|
|
$("#reflectDate").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#reflectResult").val() == null || $("#reflectResult").val() == ""){
|
|
Swal.fire("반영여부를 선택해 주시기 바랍니다.");
|
|
$("#reflectResult").focus();
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${info.OBJID}" />
|
|
<input type="hidden" name="targetObjId" id="targetObjId" value="${empty info.TARGET_OBJID?param.targetObjId:info.TARGET_OBJID}" />
|
|
<section class="">
|
|
<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="10%"/>
|
|
<col width="26%"/>
|
|
<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" style="width:96%;">
|
|
<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="5">
|
|
<input type="text" name="partNo" id="partNo" value="${info.PART_NO}" class="searchPart" style="width:90%;" readonly><span class="search_btn searchPart"></span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">품명</label>
|
|
</td>
|
|
<td colspan="5">
|
|
<input type="text" name="partName" id="partName" value="${info.PART_NAME}" class="searchPart" style="width:96%; readonly">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" rowspan="2">
|
|
<label for="">조치시점</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<label for="">단계1</label>
|
|
</td>
|
|
<td>
|
|
<select name="step1" id="step1" style="width:96%;">
|
|
<option value="">선택</option>
|
|
<option value="design" ${info.STEP1 eq 'design'?'selected':''}>설계</option>
|
|
<option value="develop" ${info.STEP1 eq 'develop'?'selected':''}>개발</option>
|
|
<option value="production" ${info.STEP1 eq 'production'?'selected':''}>양산</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">반영일자</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<input type="text" name="reflectDate" id="reflectDate" value="${info.REFLECT_DATE}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_sub_title">
|
|
<label for="">단계2</label>
|
|
</td>
|
|
<td>
|
|
<select name="step2" id="step2" style="width:96%;">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">반영여부</label>
|
|
</td>
|
|
<td colspan="2">
|
|
<select name="reflectResult" id="reflectResult">
|
|
<option value="">선택</option>
|
|
<option value="Y" ${info.REFLECT_RESULT eq 'Y'?'selected':''}>반영</option>
|
|
<option value="N" ${info.REFLECT_RESULT eq 'N'?'selected':''}>미반영</option>
|
|
<option value="U" ${info.REFLECT_RESULT eq 'U'?'selected':''}>해당없음</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">반영내용</label>
|
|
</td>
|
|
<td colspan="5">
|
|
<textarea name="reflectContents" id="reflectContents" style="width:96%; height:50px; border:1px solid #ccc; border-radius:3px;">${info.REFLECT_CONTENTS}</textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<c:choose>
|
|
<c:when test="${empty info}">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:if test="${connector eq info.WRITER}">
|
|
<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>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |