272 lines
9.2 KiB
Plaintext
272 lines
9.2 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<%
|
|
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
|
String connector = person.getUserId();
|
|
%>
|
|
<!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}" />
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
<c:set var="connector" value="<%=connector %>" />
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
});
|
|
|
|
//파일 팝업
|
|
$(".File").click(function(){
|
|
var objId = $(this).attr("data-OBJID");
|
|
var docType =$(this).attr("data-docType");
|
|
var docTypeName = $(this).attr("data-docTypeName");
|
|
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
|
window.open("/projectConcept/FileRegistPopup.do"+params, "", "width=800, height=335");
|
|
});
|
|
|
|
//등록 팝업
|
|
$(".btnRegist").click(function(){
|
|
var params = "?actionType=regist"
|
|
window.open("/optionMng/optionMngInfoFormPopup.do"+params, "", "width=680, height=550","menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
//체크박스 전체선택/전체해제
|
|
$("#allCheck").click(function(){
|
|
if($("#allCheck").prop("checked")) {
|
|
$("input[type=checkbox]").prop("checked",true);
|
|
} else {
|
|
$("input[type=checkbox]").prop("checked",false);
|
|
}
|
|
});
|
|
|
|
//삭제
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
});
|
|
|
|
function fn_delete(){
|
|
if(0 < $("input[name=chk_objId]:checked").length){
|
|
if(confirm("선택한 정보를 삭제하시겠습니까?")){
|
|
var param = $("#form1").serialize();
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/optionMng/deleteOptionMngInfo.do",
|
|
data: param,
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(data.result == 'true'){
|
|
Swal.fire("삭제되었습니다.");
|
|
fn_search();
|
|
};
|
|
}
|
|
,error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
Swal.fire("선택한 항목이 없습니다.");
|
|
}
|
|
}
|
|
|
|
// 상세
|
|
function fn_Detail(objId){
|
|
window.open("/optionMng/optionMngInfoFormPopup.do?objId="+objId, "", "width=650, height=600","menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
// 옵션 상세
|
|
function fn_History(objId){
|
|
window.open("/optionMng/optionPriceHistory.do?objId="+objId, "", "width=650, height=600","menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
function fn_search(){
|
|
document.form1.action = "/optionMng/optionList.do";
|
|
document.form1.submit();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<div class="content-box">
|
|
<div class="content-box-s">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>옵션관리</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div id="plmSearchZon">
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<label for="search_option_name">Option Name</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="search_optionName" id="search_optionName" value="${param.search_optionName}" style="width: 200px;"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<section class="contents_page_basic_margin">
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap">
|
|
<input type="button" value="삭제" class="plm_btns delete" id="btnDelete">
|
|
<input type="button" value="등록" class="plm_btns btnRegist create">
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch" name="btnSearch">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="plm_table_wrap">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="20px">
|
|
<col width="100px"><!-- NO -->
|
|
<col width="100px"><!-- 대 -->
|
|
<col width="100px"><!-- 중 -->
|
|
<col width="100px"><!-- 소 -->
|
|
<col width="100px"><!-- OPTION NAME -->
|
|
<!-- <col width="100px">영문명 -->
|
|
<!-- <col width="100px"> --><!-- 표준코드 -->
|
|
<col width="100px"><!-- TYPE -->
|
|
<col width="100px"><!-- TYPE -->
|
|
<col width="100px"><!-- 등록일 -->
|
|
<col width="100px"><!-- 등록자 -->
|
|
<col width="100px"><!-- 도면유무 -->
|
|
<col width="100px"><!-- 상태 -->
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td><input type="checkbox" id="allCheck"></td>
|
|
<td>NO</td>
|
|
<td>대분류</td>
|
|
<td>중분류</td>
|
|
<td>소분류</td>
|
|
<td>옵션 명</td>
|
|
<!-- <td>영문 명</td> -->
|
|
<!-- <td>표준코드</td> -->
|
|
<td>규격</td>
|
|
<td>판매가(원)</td>
|
|
<td>등록일</td>
|
|
<td>등록자</td>
|
|
<td>도면유무</td>
|
|
<td>상태</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<c:choose>
|
|
<c:when test="${!empty LIST}">
|
|
<c:forEach var="info" items="${LIST}" varStatus="status">
|
|
<tr>
|
|
<td><input style="width: 15px; height: 15px" type="checkbox" value="${info.OBJID}" name="chk_objId" id="chk_objId" data-objId="${info.OBJID}"></td>
|
|
<td title="${info.OPTION_NO}"><a href="#" onclick="javascript:fn_Detail('${info.OBJID}')">${info.OPTION_NO}</a></td>
|
|
<td title="${info.HIGH_NAME}">${info.HIGH_NAME}</td>
|
|
<td title="${info.MID_NAME}">${info.MID_NAME}</td>
|
|
<td title="${info.LOW_NAME}">${info.LOW_NAME}</td>
|
|
<td title="${info.OPTION_NAME}">${info.OPTION_NAME}</td>
|
|
<%-- <td title="${info.OPTION_NAME_ENG}">${info.OPTION_NAME_ENG}</td> --%>
|
|
<%-- <td title="${info.STD_CODE}" style="text-align: center;">${info.STD_CODE}</td> --%>
|
|
<td title="${info.OPTION_TYPE}" style="text-align: center;">${info.OPTION_TYPE}</td>
|
|
<td title="${info.PRICE}" style="text-align:right; padding-right: 8px;"><a href="#" onclick="javascript:fn_History('${info.OBJID}')"><fmt:formatNumber value="${info.PRICE}" pattern="#,###" /></a></td>
|
|
<td title="${info.REG_DATE}" style="text-align: center;">${info.REG_DATE}</td>
|
|
<td title="${info.WRITER}">${info.WRITER}</td>
|
|
<td><a href="#" class="File file_${info.FILE_CNT eq 0?'empty_':''}icon" data-OBJID="${info.OBJID}" data-docType="optionMng01" data-docTypeName="optionMng01"></a></td>
|
|
<td>
|
|
<c:choose>
|
|
<c:when test="${info.STATUS eq 'active'}">
|
|
활성화
|
|
</c:when>
|
|
<c:otherwise>
|
|
비활성화
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</td>
|
|
<%-- <td title="${info.STATUS}">${info.STATUS}</td> --%>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<tr>
|
|
<td colspan="10" align="center">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="pdm_page">
|
|
<input type="hidden" name="page" id="page" value="${nPage}">
|
|
<c:if test="${!empty LIST}">
|
|
<div class="page_pro">
|
|
<table style="text-align: center;" >
|
|
<tr>
|
|
<c:choose>
|
|
<c:when test="${nPage > 1}">
|
|
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">prev</td>
|
|
<td> </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>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td><a
|
|
href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
|
|
<td> </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>
|
|
<c:if test="${!empty LIST}">
|
|
<p id="adminPageCount">총 ${totalCount}건</p>
|
|
</c:if>
|
|
</div>
|
|
</c:if>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |