444 lines
12 KiB
Plaintext
444 lines
12 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 type="text/javascript">
|
|
|
|
$(document).ready(function(){
|
|
fnc_setFileDropZone("dropzone", "${info.OBJID}", "${ISSUE_ATTACH_CODE}", "${ISSUE_ATTACH_NAME}", "fn_fileCallback",false);
|
|
|
|
fn_fileCallback();
|
|
|
|
$("#btnUpload").click(function(){
|
|
var files = $("#file1")[0].files;
|
|
if(files.length > 0){
|
|
fnc_fileMultiUpload(files, null, "${info.OBJID}", "${ISSUE_ATTACH_CODE}", "${ISSUE_ATTACH_NAME}", null, "fn_fileCallback");
|
|
//file객체 초기화
|
|
$("#file1").val("");
|
|
}else{
|
|
Swal.fire("선택된 File이 없습니다.");
|
|
}
|
|
});
|
|
|
|
//고객사 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);
|
|
});
|
|
|
|
//취소
|
|
$("#btnCancel").click(function(){
|
|
var objId = $(this).attr("data-OBJID");
|
|
var params = "?objId="+objId;
|
|
document.form1.action ="/project/gate/issueDetailPopup.do"+params;
|
|
document.form1.submit();
|
|
});
|
|
|
|
//저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
fnc_datepick();
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
function fn_fileCallback(){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${info.OBJID}", "docType":"${ISSUE_ATTACH_CODE}"},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
//파일드롭다운 영역 hide
|
|
//첨부파일 목록 영역 show
|
|
$("#issueAttachFileList").show();
|
|
$("#uploadedFileArea").empty();
|
|
|
|
$.each(data, function(i){
|
|
|
|
var appendText = "";
|
|
appendText+= "<tr>";
|
|
appendText+= " <td><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>"+data[i].REAL_FILE_NAME+"</a></td>";
|
|
/* appendText+= " <td><div class='delete_btn' onclick='javascript:fnc_deleteFile(\""+data[i].OBJID+"\", \"fn_fileCallback\")'></div></td>"; */
|
|
appendText+= "</tr>";
|
|
|
|
$("#uploadedFileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#dropzone").show();
|
|
$("#issueAttachFileList").hide();
|
|
$("#uploadedFileArea").empty();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//save
|
|
function fn_save(){
|
|
if(fn_validate()){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/project/gate/saveIssueInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.msg);
|
|
if(data.result == "true"){
|
|
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("${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 = "<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=${info.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("${info.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);
|
|
$("#prodObjId > option[value=${info.PROD_OBJID}]").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("${info.TEST_TYPE_OBJID}");
|
|
if(dbVal != ""){
|
|
$("#testTypeObjId > option[value="+dbVal+"]").attr("selected", "true");
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//정합성체크
|
|
function fn_validate(){
|
|
|
|
if($("#region").val() == null || $("#region").val() == ""){
|
|
Swal.fire("지역을 선택해 주시기 바랍니다.");
|
|
$("#region").focus();
|
|
return false;
|
|
}
|
|
|
|
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($("#subject").val() == null || $("#subject").val() == ""){
|
|
Swal.fire("제목을 입력해 주시기 바랍니다.");
|
|
$("#subject").focus();
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
<body class="backcolor_light_blue">
|
|
<form name="form1" id="form1" method="post">
|
|
<input type="hidden" name="objId" id="objId" value="${info.OBJID}">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>이슈등록</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="80px;">
|
|
<col width="*">
|
|
<col width="80px;">
|
|
<col width="*">
|
|
<col width="80px;">
|
|
<col width="*">
|
|
<col width="80px;">
|
|
<col width="*">
|
|
<col width="80px;">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class=input_title><label for="" class="">지역</label></td>
|
|
<td>
|
|
<select name="region" id="region" style="width:100%;">
|
|
<option value="">선택</option>
|
|
<option value="D" ${info.REGION eq 'D'?'selected':''}>국내</option>
|
|
<option value="F" ${info.REGION eq 'F'?'selected':''}>해외</option>
|
|
</select>
|
|
</td>
|
|
<td class=input_title><label for="" class="">고객사</label></td>
|
|
<td>
|
|
<select name="oemObjId" id="oemObjId" style="width:100%;">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td class=input_title><label for="" class="">차종</label></td>
|
|
<td>
|
|
<select name="carObjId" id="carObjId" style="width:100%;">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title"><label for="">제품군</label></td>
|
|
<td>
|
|
<select name="prodGroupObjId" id="prodGroupObjId" style="width:100%;">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td class=input_title><label for="" class="">제품</label></td>
|
|
<td>
|
|
<select name="prodObjId" id="prodObjId" style="width:100%;">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class=input_title><label for="" class="">이슈 명</label></td>
|
|
<td colspan="9">
|
|
<input type="text" style="width:100%;" maxlength="100" class="" name="subject" id="subject" value="${info.SUBJECT}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">이슈상세</label></td>
|
|
<td colspan="4">
|
|
<textarea class="" style="width:100%;" rows="20" name="issueContents" id="issueContents" placeholder="내용을 입력하세요." maxlength="1800">${info.ISSUE_CONTENTS}</textarea>
|
|
</td>
|
|
<td class="input_title"><label for="">이슈해결방안<br> (협의결과)</label></td>
|
|
<td colspan="4">
|
|
<textarea class="" style="width:100%;" rows="20" name="issueResultContents" id="issueResultContents" placeholder="내용을 입력하세요." maxlength="1800">${info.ISSUE_RESULT_CONTENTS}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class=input_title><label for="" class="">수행팀</label></td>
|
|
<td>
|
|
<input type="text" name="picDept" id="picDept" value="${info.PIC_DEPT}" style="width:100%;" maxlength="30">
|
|
</td>
|
|
<td class=input_title><label for="" class="">완료예정일</label></td>
|
|
<td>
|
|
<input type="text" name="completePlanDate" id="completePlanDate" value="${info.COMPLETE_PLAN_DATE}" style="width:100%;" maxlength="15">
|
|
</td>
|
|
<td class=input_title><label for="" class="">완료일</label></td>
|
|
<td>
|
|
<input type="text" name="completeDate" id="completeDate" value="${info.COMPLETE_DATE}" style="width:100%;" maxlength="15">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" rowspan="2">
|
|
<label for="">첨부파일</label>
|
|
</td>
|
|
<td colspan="9" class="tr_data_border_bottom">
|
|
<div id="dropzone" class="dropzone" style="width:98.8%;">Drag & Drop Files Here</div>
|
|
<input type="file" name="file1" id="file1" multiple>
|
|
<input type="button" id="btnUpload" value="Upload" class="upload_btns">
|
|
<div id="issueAttachFileList" style="height:50px; overflow-y:scroll;">
|
|
<table id="uploadedFileAreaTable" class="spec_data_in_table">
|
|
<colgroup>
|
|
<col width="*">
|
|
<col width="3%">
|
|
</colgroup>
|
|
<tbody id="uploadedFileArea">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btnCenterWrap">
|
|
<center class="center_btns_wrap">
|
|
<input type="button" id="btnSave" value="저장" 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="${info.OBJID}">
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<input type="button" id="btnClose" value="닫기" class="plm_btns">
|
|
</center>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |