244 lines
7.5 KiB
Plaintext
244 lines
7.5 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init_new.jsp" %>
|
|
<%
|
|
String menuObjId = request.getParameter("menuObjId");
|
|
String menuName = CommonUtils.getMenuName(menuObjId, "고객 이슈 등록");
|
|
String actionType = CommonUtils.checkNull(request.getParameter("actionType"));
|
|
|
|
|
|
// info Map 가져오기
|
|
Map info = (Map) request.getAttribute("info");
|
|
if(info == null) info = new HashMap();
|
|
|
|
// OBJID가 없으면 신규 생성 (첨부파일 연결용)
|
|
String objId = CommonUtils.checkNull(info.get("objid"));
|
|
boolean isNew = objId.isEmpty() || "new".equals(actionType);
|
|
if(objId.isEmpty()){
|
|
objId = String.valueOf(CommonUtils.createObjId());
|
|
}
|
|
|
|
// 접수자/작성자
|
|
String writerName = CommonUtils.checkNull(info.get("writer_name"));
|
|
if(writerName.isEmpty()) writerName = connectUserName;
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<style>
|
|
body { min-height: auto !important; }
|
|
</style>
|
|
</head>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
fnc_datepick();
|
|
$('.select2').select2();
|
|
|
|
// 수정 모드인 경우 기존 값 선택
|
|
var savedBlameDecision = "${info.blame_decision}";
|
|
var savedStatus = "${info.status}";
|
|
if(savedBlameDecision) $("#BLAME_DECISION").val(savedBlameDecision).trigger('change');
|
|
if(savedStatus) $("#STATUS").val(savedStatus).trigger('change');
|
|
|
|
|
|
// 저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
// 닫기
|
|
$("#btnClose").click(function(){
|
|
window.close();
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// PDF 미리보기
|
|
function fnc_viewPdfFile(fileObjId){
|
|
window.open("/common/downloadFile.do?objId=" + fileObjId, "_blank");
|
|
}
|
|
|
|
|
|
function fn_save(){
|
|
// 유효성 검사
|
|
if(!fnc_valitate("form1")){
|
|
return;
|
|
}
|
|
|
|
Swal.fire({
|
|
title: '저장하시겠습니까?',
|
|
icon: 'question',
|
|
showCancelButton: true,
|
|
confirmButtonText: '저장',
|
|
cancelButtonText: '취소'
|
|
}).then((result) => {
|
|
if(result.isConfirmed){
|
|
$.ajax({
|
|
url: "/quality/saveCustomerCsDefect.do",
|
|
type: "POST",
|
|
data: $("#form1").serialize(),
|
|
dataType: "json",
|
|
success: function(result){
|
|
if(result.RESULT == "SUCCESS"){
|
|
Swal.fire({
|
|
title: '저장되었습니다.',
|
|
icon: 'success'
|
|
}).then(() => {
|
|
if(window.opener && window.opener.fn_search){
|
|
window.opener.fn_search();
|
|
}
|
|
window.close();
|
|
});
|
|
} else {
|
|
Swal.fire({
|
|
title: '저장 실패',
|
|
text: result.MESSAGE || '저장 중 오류가 발생했습니다.',
|
|
icon: 'error'
|
|
});
|
|
}
|
|
},
|
|
error: function(xhr, status, error){
|
|
Swal.fire({
|
|
title: '저장 실패',
|
|
text: '서버 통신 오류가 발생했습니다.',
|
|
icon: 'error'
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<body>
|
|
<form name="form1" id="form1" method="post">
|
|
<input type="hidden" name="OBJID" id="OBJID" value="<%=objId%>">
|
|
<input type="hidden" name="ATTACH_FILE_OBJID" id="ATTACH_FILE_OBJID" value="<%=objId%>">
|
|
<input type="hidden" name="IS_NEW" id="IS_NEW" value="<%=isNew%>">
|
|
|
|
<section class="business_staff_popup_min_width">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span><%=menuName%></span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div id="EntirePopupFormWrap">
|
|
<div class="form_popup_title">
|
|
<span>기본정보</span>
|
|
</div>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%" />
|
|
<col width="35%" />
|
|
<col width="15%" />
|
|
<col width="35%" />
|
|
</colgroup>
|
|
|
|
<tr>
|
|
<td class="input_title"><label>접수일 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<input type="text" name="RECEIPT_DATE" id="RECEIPT_DATE" class="date_icon" required reqTitle="접수일" value="${info.receipt_date}">
|
|
</td>
|
|
<td class="input_title"><label>접수자</label></td>
|
|
<td>
|
|
<input type="text" id="ACTION_USER_NAME" value="<%=writerName%>" readonly>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label>고객사 <span style="color:red;">*</span></label></td>
|
|
<td colspan="3">
|
|
<select name="CUSTOMER_OBJID" id="CUSTOMER_OBJID" class="select2" required reqTitle="고객사" type="select" style="width:100%;">
|
|
<option value="">선택</option>
|
|
${code_map.customer_cd}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label>수량 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<input type="text" name="QTY" id="QTY" value="${info.qty}" required reqTitle="수량">
|
|
</td>
|
|
<td class="input_title"><label>제품구분 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<select name="MODEL_NAME" id="MODEL_NAME" class="select2" required reqTitle="제품구분" type="select" style="width:100%;">
|
|
<option value="">선택</option>
|
|
${code_map.product_cd}
|
|
</select>
|
|
</td>
|
|
<!-- <td class="input_title"><label>모델명 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<input type="text" name="MODEL_NAME" id="MODEL_NAME" value="${info.model_name}" required reqTitle="모델명">
|
|
</td> -->
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label>품명 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<input type="text" name="PRODUCT_NAME" id="PRODUCT_NAME" value="${info.product_name}" required reqTitle="품명">
|
|
</td>
|
|
<td class="input_title"><label>품번 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<input type="text" name="PRODUCT_NO" id="PRODUCT_NO" value="${info.product_no}" required reqTitle="품번">
|
|
</td>
|
|
</tr>
|
|
|
|
<!-- <tr>
|
|
<td class="input_title"><label>부품품명 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<input type="text" name="PART_NAME" id="PART_NAME" value="${info.part_name}" required reqTitle="부품품명">
|
|
</td>
|
|
<td class="input_title"><label>부품품번 <span style="color:red;">*</span></label></td>
|
|
<td>
|
|
<input type="text" name="PART_NO" id="PART_NO" value="${info.part_no}" required reqTitle="부품품번">
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label>생산일</label></td>
|
|
<td>
|
|
<input type="text" name="PRODUCTION_DATE" id="PRODUCTION_DATE" class="date_icon" value="${info.production_date}">
|
|
</td>
|
|
<td class="input_title"><label>판매일</label></td>
|
|
<td>
|
|
<input type="text" name="SALES_DATE" id="SALES_DATE" class="date_icon" value="${info.sales_date}">
|
|
</td>
|
|
</tr> -->
|
|
<tr>
|
|
<td class="input_title"><label>S/N</label></td>
|
|
<td>
|
|
<input type="text" name="SERIAL_NO" id="SERIAL_NO" value="${info.serial_no}">
|
|
</td>
|
|
<td class="input_title"><label>제조사</label></td>
|
|
<td>
|
|
<input type="text" name="MANUFACTURER" id="MANUFACTURER" value="${info.manufacturer}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label>이슈내용 <span style="color:red;">*</span></label></td>
|
|
<td colspan="3">
|
|
<textarea name="COMPLAINT_CONTENT" id="COMPLAINT_CONTENT" rows="3" style="width:100%;" required reqTitle="불만내용" type="text">${info.complaint_content}</textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html>
|