ERP-node/WebContent/WEB-INF/view/distribution/getDistributionMngList.jsp

264 lines
8.8 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>
<!-- //JSTL 변수선언 -->
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
<c:set var="nPage" value="${empty param.page?1:param.page}" />
<c:set var="pageIndex" value="${(nPage-1)/10}" />
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
<script>
$(function(){
$(document).ready(function(){
fnc_datepick();
$("#btn_search").click(function(){
fn_search();
});
//엔터키로 조회
$("input").keyup(function(e){
if(e.keyCode == 13){
fn_search();
}
});
});
});
//팝업 호출
function fn_distributionPopup(type,objId){
var url = "";
var target = "";
if(objId == ""){
url = "/distribution/distributionFormPopup.do";
target = "distributionPopup";
}else{
url = "/distribution/distributionDetailViewPopup.do";
target = objId;
}
if(url == ""){
Swal.fire("유효하지 않은 접근 입니다.");
}else{
window.open("", target, "width=920, height=415, resizable=no");
var form = document.form1;
form.objId.value = objId;
form.actionType.value = type;
form.target = target;
form.action = url;
form.submit();
}
}
function fn_search(){
if(fnc_dateFormChk($("#search_fromDate").val(),$("#search_toDate").val())){
document.form1.target="_self";
document.form1.action="/distribution/getDistributionMngList.do";
document.form1.submit();
}
}
//배포된 정보를 배포처 인워이 확인하였는지 확인한다.
function getDistributeMemberList(objId){
window.open("", "distributeMemberList", "width=650, height=460, resizable=no");
var form = document.form1;
form.action = "/distribution/getDistributeMemberList.do";
form.objId.value = objId;
form.target = "distributeMemberList";
form.submit();
}
</script>
</head>
<body class="backcolor">
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="objId" id="objId">
<input type="hidden" name="actionType" id="actionType">
<section class="min_part_search">
<div class="plm_menu_name">
<h2>
<span>비정규배포</span>
</h2>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="align_r">
<label>차종</label>
</td>
<td>
<select id="search_carObjid" name="search_carObjid">
<option value="">전체</option>
<c:forEach var="car" items="${carMngList}">
<option value="${car.OBJID}" ${param.search_carObjid eq car.OBJID?'selected':''}>${car.CAR_CODE}</option>
</c:forEach>
</select>
</td>
<td class="align_r">
<label>접수일</label>
</td>
<td style="">
<input type="text" id="search_fromDate" name="search_fromDate" value="${param.search_fromDate}" class="input_date" readonly> ~
<input type="text" id="search_toDate" name="search_toDate" value="${param.search_toDate}" class="input_date" readonly>
<input type="button" class="date_delete" value="x" onclick="javascript:fnc_date_empty()">
</td>
<td class="align_r">
<label>접수처</label>
</td>
<td>
<select id="search_receiveType" name="search_receiveType">
<option value="">전체</option>
<option value="HKMC" ${param.search_receiveType eq 'HKMC'?'selected':''}>HKMC</option>
<option value="협력업체" ${param.search_receiveType eq '협력업체'?'selected':''}>협력업체</option>
<option value="기타" ${param.search_receiveType eq '기타'?'selected':''}>기타</option>
</select>
</td>
<td class="align_r">
<label>접수처</label>
</td>
<td>
<select id="search_subReceiveType" name="search_subReceiveType">
<option value="">전체</option>
<option value="스트럭쳐 설계" ${param.search_subReceiveType eq '스트럭쳐 설계'?'selected':''}>스트럭쳐 설계</option>
<option value="시작차체팀" ${param.search_subReceiveType eq '시작차체팀'?'selected':''}>시작차체팀</option>
<option value="중국기술연구소" ${param.search_subReceiveType eq '중국기술연구소'?'selected':''}>중굴기술연구소</option>
<option value="기타" ${param.search_subReceiveType eq '기타'?'selected':''}>기타</option>
</select>
</td>
<td class="align_r">
<label>제목</label>
</td>
<td>
<input type="text" id="search_subject" name="search_subject" value="${param.subject}" style="width:250px;">
</td>
</tr>
</tbody>
</table>
</div>
<div class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="비정규배포 등록" class="plm_btns" onclick="fn_distributionPopup('regist','')">
<input type="button" value="조회" class="plm_btns" id="btn_search">
</div>
</div>
<div class="plm_table_wrap">
<table class="plm_table">
<colgroup>
<col width="3%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="*" />
<col width="10%" />
<col width="10%" />
</colgroup>
<tr class="plm_thead">
<td>No</td>
<td>접수일</td>
<td>접수처</td>
<td>차종</td>
<td>제목</td>
<td>배포일</td>
<td>상태</td>
</tr>
<c:choose>
<c:when test="${distributionMngList.size() eq 0}">
<tr>
<td colspan="7">조회된 정보가 없습니다.</td>
</c:when>
<c:otherwise>
<c:forEach var="distribution" items="${distributionMngList}">
<tr>
<td>${distribution.RNUM}</td>
<td>${distribution.RECEIVE_DATE}</td>
<td>
<c:choose>
<c:when test="${distribution.RECEIVE_TYPE eq 'hkmc'}">HKMC</c:when>
<c:when test="${distribution.RECEIVE_TYPE eq 'supporter'}">협력업체</c:when>
<c:when test="${distribution.RECEIVE_TYPE eq 'etc'}">기타</c:when>
<c:otherwise></c:otherwise>
</c:choose>
<c:choose>
<c:when test="${distribution.SUB_RECEIVE_TYPE eq 'structure'}">스트럭쳐설계</c:when>
<c:when test="${distribution.SUB_RECEIVE_TYPE eq 'startCar'}">시작차체팀</c:when>
<c:when test="${distribution.SUB_RECEIVE_TYPE eq 'chinaLab'}">중국기술연구소</c:when>
<c:when test="${distribution.SUB_RECEIVE_TYPE eq 'etc'}">기타</c:when>
<c:otherwise></c:otherwise>
</c:choose>
</td>
<td>${distribution.CAR_NAME}</td>
<td><a href="#" onclick="fn_distributionPopup('','${distribution.OBJID}')">${distribution.SUBJECT}</a></td>
<td>${distribution.RELEASE_DATE_TITLE}</td>
<td>
<c:choose>
<c:when test="${distribution.WRITER eq userId}">
<a href="#" onclick="getDistributeMemberList('${distribution.OBJID}');">${distribution.STATUS_TITLE}</a>
</c:when>
<c:otherwise>${distribution.STATUS_TITLE}</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
</div>
<div class="pdm_page">
<input type="hidden" name="page" id="page" value="${nPage}">
<c:if test="${!empty distributionMngList}">
<div class="page_pro">
<table>
<tr>
<c:choose>
<c:when test="${nPage > 1}">
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
</c:when>
<c:otherwise>
<td class="no_more_page">prev</td>
</c:otherwise>
</c:choose>
<c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
<c:if test="${status.index -1 < maxPage}">
<c:choose>
<c:when test="${status.index eq nPage}">
<td><a href="#" class="now_page">${nPage}</a></td>
</c:when>
<c:otherwise>
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
</c:otherwise>
</c:choose>
</c:if>
</c:forEach>
<c:choose>
<c:when test="${nPage < maxPage}">
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
</c:when>
<c:otherwise>
<td class="no_more_page">next</td>
</c:otherwise>
</c:choose>
</tr>
</table>
<p class="page_counter">총 ${totalCount}건</p>
</div>
</c:if>
</div>
</div>
</section>
</form>
</body>
</html>