310 lines
10 KiB
Plaintext
310 lines
10 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
<%@ page import="com.pms.common.utils.*"%>
|
||
<%@ page import="java.util.*" %>
|
||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||
<%@include file= "/init.jsp" %>
|
||
<%
|
||
Map info = (HashMap)(request.getAttribute("info"));
|
||
boolean isModify = true;
|
||
String actionType = "regist";
|
||
if(info!=null &&
|
||
( CommonUtils.checkNull(info.get("APPR_STATUS_NAME")).equals( "결재중" )
|
||
||CommonUtils.checkNull(info.get("APPR_STATUS_NAME")).equals( "결재완료" )
|
||
)
|
||
){
|
||
isModify = false;
|
||
actionType = "";
|
||
}
|
||
%>
|
||
<c:set var="isModify" value="<%= isModify %>"/>
|
||
<c:set var="actionType" value="<%= actionType %>"/>
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<style>
|
||
#DEFECT_ACTION_IMG_01DropZone {
|
||
margin-top: 45px !important;
|
||
margin-left: 10px;
|
||
}
|
||
</style>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title><%=Constants.SYSTEM_NAME%></title>
|
||
<script>
|
||
$(document).ready(function(){
|
||
|
||
$('.select2').select2();
|
||
fnc_datepick();
|
||
|
||
fn_getApprLine(); //결재라인
|
||
|
||
$("#btn_close").click(function(){
|
||
self.close();
|
||
opener.fn_search();
|
||
});
|
||
|
||
<% if(isModify){ %>
|
||
$("#btnSave" ).click(function(){ saveOEMInfo(); });
|
||
|
||
$("#btnAppr").click(function(){ //결재상신
|
||
if(fnc_valitate("oemForm")){
|
||
/*
|
||
gridPartFn.closeEdit();
|
||
gridWorkFn.closeEdit();
|
||
|
||
if(gridPart.getRowData().length == 0){
|
||
Swal.fire('저장할 사용부품이 존재 하지 않습니다');
|
||
gridPartFn.opennEdit()
|
||
gridWorkFn.opennEdit();
|
||
return;
|
||
}
|
||
|
||
if(gridWork.getRowData().length == 0){
|
||
Swal.fire('저장할 작업시간이 존재 하지 않습니다');
|
||
gridPartFn.opennEdit()
|
||
gridWorkFn.opennEdit();
|
||
return;
|
||
}
|
||
gridPartFn.opennEdit()
|
||
gridWorkFn.opennEdit();
|
||
*/
|
||
|
||
var objId = "${info.OBJID}";
|
||
var title = encodeURIComponent("부적합품 통보서 상신 - " + $("#defect_action_title").val());
|
||
window.open("/approval/registApproval.do?targetType=DEFECT_ACTION&targetObjId="+objId+"&approvalTitle="+title+"&callbackFnc=fn_save_appr_process","registApproval","width=700,height=700");
|
||
}
|
||
});
|
||
<% }else{ %>
|
||
|
||
<% } %>
|
||
|
||
});
|
||
|
||
//상신된 결재라인가져오기
|
||
function fn_getApprLine(){
|
||
if(fnc_isEmpty('${info.OBJID}')){
|
||
return;
|
||
}
|
||
$.ajax({
|
||
url:"/common/getApprovalLine.do",
|
||
type:"POST",
|
||
data:{"objId":"${info.OBJID}"},
|
||
dataType:"json",
|
||
async:false,
|
||
success:function(data){
|
||
$.each(data.RESULT, function(i,o){
|
||
if(i==0){
|
||
$("#appr"+i ).text( o.WRITER );
|
||
$("#appr"+i+"_date").text( o.REGDATE );
|
||
}
|
||
$("#appr"+(i+1) ).text( o.TARGET_USER_NAME );
|
||
$("#appr"+(i+1)+"_date").text( fnc_checkNull(o.PROC_DATE)!=""?o.PROC_DATE:" " );
|
||
});
|
||
},
|
||
error: function(jqxhr, status, error){
|
||
}
|
||
});
|
||
}
|
||
|
||
function fn_save_appr_process(){
|
||
$("#status").val("0000101"); //결재중
|
||
fn_save_process();
|
||
}
|
||
function fn_save_process(){
|
||
|
||
//합계 콤마 제거
|
||
//$("input[id^=TOTAL]", $(".footrow")).each(function(i,o){ $(this).val( $(this).val().replaceAll(",","") ); });
|
||
|
||
$.ajax({
|
||
url:"/purchaseOrder/invalidAction.do",
|
||
type:"POST",
|
||
data:$("#oemForm").serialize(),
|
||
dataType:"json",
|
||
async:true,
|
||
success:function(data){
|
||
if(data.result!=''){
|
||
Swal.fire('저장되었습니다');
|
||
}
|
||
opener.fn_search();
|
||
self.close();
|
||
},
|
||
error: function(jqxhr, status, error){
|
||
}
|
||
});
|
||
}
|
||
|
||
function saveOEMInfo(){
|
||
if(fnc_valitate("oemForm")){
|
||
if(confirm("저장하시겠습니까?")){
|
||
fn_save_process();
|
||
}
|
||
}
|
||
}
|
||
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<form name="oemForm" id="oemForm" action="" method="post">
|
||
|
||
<input type="hidden" name="objId" id="objId" value="${info.OBJID }">
|
||
<input type="hidden" name="status" id="status" value="${info.APPR_STATUS }">
|
||
<input type="hidden" name="checkArr" id="checkArr" value="${checkArr}">
|
||
|
||
<section>
|
||
<div class="plm_menu_name" style="display:flex;vertical-align:middle;">
|
||
<h2 style="width:50%;text-align:center;margin-top:10px;">
|
||
<br/>
|
||
<span style="font-size:28px;">부적합품 통보서</span>
|
||
</h2>
|
||
<table class="pmsPopupForm" style="width:50%;background:white;">
|
||
<colgroup>
|
||
<col width="20%">
|
||
<col width="20%">
|
||
<col width="20%">
|
||
<col width="20%">
|
||
</colgroup>
|
||
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
||
<td class="input_title" style="text-align:center;" rowspan="3" >
|
||
<label>결재</label>
|
||
</td>
|
||
<td class="input_title" style="text-align:center;">
|
||
<label>작성</label>
|
||
</td>
|
||
<td class="input_title" style="text-align:center;">
|
||
<label>검토</label>
|
||
</td>
|
||
<!--
|
||
<td class="input_title" style="text-align:center;">
|
||
<label>구매팀(검토)</label>
|
||
</td>
|
||
-->
|
||
<td class="input_title" style="text-align:center;">
|
||
<label>승인</label>
|
||
</td>
|
||
</tr>
|
||
<tr style="border-spacing: 0;border-bottom:1px solid #ccc; height: 50px;">
|
||
<td class="input_sub_title" style="text-align:center;" id="appr0"></td>
|
||
<td class="input_sub_title" style="text-align:center;" id="appr1"></td>
|
||
<td class="input_sub_title" style="text-align:center;" id="appr2"></td>
|
||
<!--
|
||
<td class="input_sub_title" style="text-align:center;" id="appr3"></td>
|
||
-->
|
||
</tr>
|
||
<tr style="border-spacing: 0;border-bottom:1px solid #ccc;border-left:1px solid #ccc;">
|
||
<td class="input_sub_title" style="text-align:center;" id="appr0_date"></td>
|
||
<td class="input_sub_title" style="text-align:center;" id="appr1_date"></td>
|
||
<td class="input_sub_title" style="text-align:center;" id="appr2_date"></td>
|
||
<!--
|
||
<td class="input_sub_title" style="text-align:center;" id="appr3_date"></td>
|
||
-->
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div id="businessPopupFormWrap">
|
||
<table class="pmsPopupForm">
|
||
<colgroup>
|
||
<col width="10%">
|
||
<col width="23%">
|
||
<col width="10%">
|
||
<col width="12%">
|
||
<col width="12%">
|
||
<col width="10%">
|
||
<col width="23%">
|
||
</colgroup>
|
||
<tr>
|
||
<td colspan="" class="input_title">프로젝트번호</td>
|
||
<td colspan="">${info.PROJECT_NO}</td>
|
||
<td colspan="" class="input_title">프로젝트명</td>
|
||
<td colspan="2">${info.PROJECT_NAME}</td>
|
||
<td colspan="" class="input_title">품번</td>
|
||
<td colspan="">${info.PART_NO}</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="" class="input_title">품명</td>
|
||
<td colspan="">${info.PART_NAME}</td>
|
||
<td colspan="" class="input_title">사양(규격)</td>
|
||
<td colspan="2">${info.SPEC}</td>
|
||
<td colspan="" class="input_title">입고일</td>
|
||
<td colspan="">${info.RECEIPT_DATE}</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="" class="input_title">공급업체</td>
|
||
<td colspan="">${info.PARTNER_NAME}</td>
|
||
<td colspan="" class="input_title">검사일</td>
|
||
<td colspan="2">${info.INSPECT_DATE}</td>
|
||
<td colspan="" class="input_title">부적합수량</td>
|
||
<td colspan="">${info.ERROR_QTY}</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="" class="input_title">부적합사유</td>
|
||
<td colspan="">${info.ERROR_REASON}</td>
|
||
<td colspan="" class="input_title">귀책</td>
|
||
<td colspan="2">${info.ATTRIBUTION}</td>
|
||
<td colspan="" class="input_title">작성자</td>
|
||
<td colspan="">${info.SALES_MNG_USER_NAME}</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="" class="input_title">제목</td>
|
||
<td colspan="6">
|
||
<input type="text" name="defect_action_title" id="defect_action_title" required reqTitle="제목" style="width:100%;" value="${info.DEFECT_ACTION_TITLE}" class="">
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td class="input_title"><label for="">부적합내용</label></td>
|
||
<td class="input_sub_title" colspan="3">
|
||
<textarea name="defect_content" id="defect_content" rows="20" style="width:100%; border-radius:2px;" required reqTitle="부적합내용" type="textarea">${info.DEFECT_CONTENT}</textarea>
|
||
</td>
|
||
<td colspan="3" style="border:1px solid rgb(118, 118, 118); text-align:center; border-radius:2px;" >
|
||
<jsp:include page="/WEB-INF/view/common/fileWidget_include.jsp">
|
||
<jsp:param name="fileType" value="DEFECT_ACTION_IMG_01" />
|
||
<jsp:param name="fileTypeTxt" value="부적합품 이미지01" />
|
||
<jsp:param name="viewType" value="IMG1" />
|
||
<jsp:param name="imgStyle" value="width:96% !important; height:202px; margin:0;padding:0;" />
|
||
<jsp:param name="isModify" value="<%=isModify %>" />
|
||
<jsp:param name="targetObjid" value="${info.OBJID}" />
|
||
<jsp:param name="actionType" value="${actionType}" />
|
||
<jsp:param name="writer" value="${info.WRITER}" />
|
||
<jsp:param name="connectUserId" value="${connectUserId}" />
|
||
</jsp:include>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="input_title"><label for="">조치내역</label></td>
|
||
<td class="input_sub_title">
|
||
<select name="defect_action" id="defect_action" required reqTitle="조치내역" type="select" class="select2" autocomplete="off">
|
||
<option value="">선택</option>
|
||
${code_map.defect_action}
|
||
</select>
|
||
</td>
|
||
<td class="input_title"><label for="">조치일</label></td>
|
||
<td colspan="2" class="input_sub_title">
|
||
<input type="text" name="defect_action_date" id="defect_action_date" required reqTitle="조치일" style="width:220px" value="${info.DEFECT_ACTION_DATE}" class="date_icon">
|
||
</td>
|
||
<td class="input_title"><label for="">납품예정일</label></td>
|
||
<td class="input_sub_title">
|
||
<input type="text" name="delivery_plan_date" id="delivery_plan_date" required reqTitle="납품예정일" style="width:210px;" value="${info.RE_ARRIVAL_PLAN_DATE}" class="date_icon">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="input_title"><label for="">비고</label></td>
|
||
<td class="input_sub_title" colspan="6">
|
||
<textarea name="defect_note" id="defect_note" rows="12" style="width:100%; border-radius:2px;" reqTitle="비고" type="textarea">${info.DEFECT_NOTE}</textarea>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="btn_wrap">
|
||
<div class="plm_btn_wrap_center">
|
||
<% if(isModify){ %>
|
||
<input type="button" value="결재상신" id="btnAppr" class="plm_btns">
|
||
<input type="button" value="저장" id="btnSave" class="plm_btns create">
|
||
<% } %>
|
||
<input type="button" value="닫기" name="" id="btn_close" class="plm_btns" onclick="javascript:self.close();">
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</form>
|
||
</body>
|
||
</html> |