ERP-node/WebContent/WEB-INF/view/ions/itemmgmt/imItem/imItemList.jsp

613 lines
23 KiB
Plaintext

<%
/**
* 품목관리
* @since 2021.11.16
* @author kim
* @version 1.0
*
* << 개정 이력 >>
*
* 수정일 수정자 수정내용
* ---------------- --------------------- --------------------------------------------------------
* 2021.11.16 김효일 최초작성
**/
%>
<%@ 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="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<c:set var="sysMonth"><fmt:formatDate value="${now}" pattern="MM" /></c:set>
<c:set var="connector" value="<%=connector %>" />
<link rel="stylesheet" href="/css/ions-basic.css">
<script type="text/javascript" src="/js/ions-common.js" ></script>
<script type="text/javascript">
$(function(){
$(document).ready(function(){
$('.select2').select2();
// 품목관리 조회
$("#btnSearch").click(function(){
fn_search();
});
// 품목관리 등록 팝업
$("#btnReg").click(function(){
window.open("/imItem/imItemFormPopup.do?actionType=regist", "imItemFormPopup", "width=1440, height=900", "menubars=no, scrollbars=yes, resizable=yes");
});
// 업체단가 등록 팝업
$("#btnVendorPriceReg").click(function() {
var url = "/imItem/vendorPriceFormPopup.do";
var imItemId = $("#imItemId").val();
if (imItemId === undefined || imItemId === '') {
Swal.fire('제품리스트의 항목을 선택 후 등록 하세요.');
return false;
}
var param = "";
param += "?actionType=regist";
param += "&imItemId=" + imItemId;
window.open(url + param, "vendorPriceFormPopup", "width=1440, height=900", "menubars=no, scrollbars=yes, resizable=yes");
});
});
});
// 품목관리 등록 팝업
function openImItemFormPopup(imItemId, imItemNo){
var url = "/imItem/imItemFormPopup.do";
var param = "";
param += "?actionType=modify";
param += "&imItemId=" + imItemId;
window.open(url + param, "imItemFormPopup", "width=1440, height=900", "menubars=no, scrollbars=yes, resizable=yes");
}
// 검색
function fn_search() {
document.form1.action = "/imItem/imItemAll.do";
document.form1.submit();
}
// 품목 클릭
function imItemClick(imItemId) {
document.form1.imItemId.value = imItemId;
// 탭 검색
fn_search();
}
</script>
</head>
<body class="backcolor">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name_ieg">
<h2>
<span>품목관리> 품목관리</span>
</h2>
</div>
<form name="form1" id="form1" method="get" onsubmit="return false;">
<input type="hidden" name="imItemId" id="imItemId" value="${imItemId}" />
<!--// search -->
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="align_r"><label for="label" class="">Assay 품목</label></td>
<td>
<select name="condImAssy" id="condImAssy" style="width: 120px;" class="select2" autocomplete="off">
<option value="">전체</option>
<option value="Y" ${param.condImAssy eq 'Y' ? 'selected' : ''}>Assay</option>
<option value="N" ${param.condImAssy eq 'N' ? 'selected' : ''}>단품</option>
</select>
</td>
<td style="padding-right:15px;">
<td class="align_r"><label for="label" class="">품목구분 </label></td>
<td>
<select name="condImItemTp" id="condImItemTp" style="width: 120px;" class="select2" autocomplete="off">
<option value="">전체</option>
<option value="P" ${param.condImItemTp eq 'P' ? 'selected' : ''}>제품</option>
<option value="A" ${param.condImItemTp eq 'A' ? 'selected' : ''}>반제품</option>
<option value="E" ${param.condImItemTp eq 'E' ? 'selected' : ''}>단품</option>
</select>
</td>
<td class="align_r"><label for="label" class="">사용구분</label></td>
<td>
<select name="condImItemFlag" id="condImItemFlag" style="width: 120px;" class="select2" autocomplete="off">
<option value="">전체</option>
<option value="1" ${param.condImItemFlag eq '1' ? 'selected' : ''}>기술설계</option>
<option value="2" ${param.condImItemFlag eq '2' ? 'selected' : ''}>구매</option>
<option value="3" ${param.condImItemFlag eq '3' ? 'selected' : ''}>A/S</option>
<option value="4" ${param.condImItemFlag eq '4' ? 'selected' : ''}>사용불가</option>
</select>
</td>
<td class="align_r"><label for="label" class="">조달형태</label></td>
<td class="align_r">
<select name="condImSourcingTp" id="condImSourcingTp" style="width: 120px;" class="select2" autocomplete="off">
<option value="">전체</option>
<option value="I" ${param.condImSourcingTp eq 'I' ? 'selected' : ''}>도입</option>
<option value="M" ${param.condImSourcingTp eq 'M' ? 'selected' : ''}>자체제작</option>
<option value="O" ${param.condImSourcingTp eq 'D' ? 'selected' : ''}>외주</option>
<option value="P" ${param.condImSourcingTp eq 'P' ? 'selected' : ''}>일반구매</option>
</select>
</td>
</tr>
<tr>
<td class="align_r"><label for="label" class="">자재관리등급</label></td>
<td>
<select name="condImABC" id="condImABC" style="width: 120px;" class="select2" autocomplete="off">
<option value="">전체</option>
<option value="A" ${param.condImABC eq 'A' ? 'selected' : ''}>A급</option>
<option value="B" ${param.condImABC eq 'B' ? 'selected' : ''}>B급</option>
<option value="C" ${param.condImABC eq 'C' ? 'selected' : ''}>C급</option>
</select>
</td>
<td style="padding-right:15px;">
<td class="align_r"><label for="label" class="">사급여부 </label></td>
<td>
<select name="condImSagupTp" id="condImSagupTp" style="width: 120px;" class="select2" autocomplete="off">
<option value="">전체</option>
<option value="S" ${param.condImSagupTp eq 'S' ? 'selected' : ''}>사급</option>
<option value="K" ${param.condImSagupTp eq 'K' ? 'selected' : ''}>사내조립</option>
<option value="M" ${param.condImSagupTp eq 'M' ? 'selected' : ''}>사내제작</option>
<option value="V" ${param.condImSagupTp eq 'V' ? 'selected' : ''}>Vendor</option>
</select>
</td>
<td class="align_r"><label for="label" class=""> 원부자재 </label></td>
<td>
<select name="condImMaterialTp" id="condImMaterialTp" style="width: 120px;" class="select2" autocomplete="off">
<option value="">전체</option>
<option value="1" ${param.condImMaterialTp eq '1' ? 'selected' : ''}>원자재</option>
<option value="2" ${param.condImMaterialTp eq '2' ? 'selected' : ''}>부자재</option>
<option value="3" ${param.condImMaterialTp eq '3' ? 'selected' : ''}>소모품</option>
<option value="4" ${param.condImMaterialTp eq '4' ? 'selected' : ''}>공구</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<!--// search -->
<!--// section -->
<section class="contents_page_basic_margin">
<h3 class="tit">품목 리스트</h3>
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="등록" class="plm_btns" id="btnReg">
</div>
</div>
<!--// 품목 리스트 -->
<div class="plm_table_wrap">
<div>
<table class="plm_table table-hover">
<colgroup>
<col width="8%" />
<col width="*" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
</colgroup>
<thead>
<tr class="plm_thead">
<td>품목번호</td>
<td>품명</td>
<td>규격</td>
<td>재질</td>
<td>형상</td>
<td>색상</td>
<td>단위</td>
<td>Assay</td>
<td>사용구분</td>
<td>도면번호</td>
<td>조달구분</td>
<td>조달소요</td>
<td>기종코드</td>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align:center;">
<td align="center" colspan="13">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr onclick="imItemClick('${item.IMITEMID}');"
${imItemId eq item.IMITEMID ? 'class=selected':''}
>
<td><a href="javascript:;" onclick="openImItemFormPopup('${item.IMITEMID}', '${item.IMITEMNO}')">${item.IMITEMNO}</a></td>
<td>${item.IMITEMNM}</td>
<td>${item.IMITEMSPEC}</td>
<td>${item.IMMATERIAL}</td>
<td>${item.IMSHAPECDNM}</td>
<td>${item.IMCOLORNM}</td>
<td>${item.IMUNIT}</td>
<td>${item.IMASSY}</td>
<td>${item.IMITEMFLAG}</td>
<td>${item.IMDRAWINGNO}</td>
<td>${item.IMSOURCEINGTPNM}</td>
<td>${item.IMDELIVERY}</td>
<td>${item.IMPRODNONM}</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</div>
<!--// 품목 리스트 -->
<!--// pdm_page -->
<%@include file="../../common/paging.jsp" %>
<!--// pdm_page -->
<table style="width:100%">
<tr>
<td style="width:45%" valign="top">
<!--// 형상정보 -->
<table class="pmsPopupForm">
<colgroup>
<col width="12%"/>
<col width="15%"/>
<col width="15%"/>
<col width="15%"/>
<col width="15%"/>
<col width="15%"/>
<col width="15%"/>
</colgroup>
<tr>
<td colspan="7" style="height:15px;"></td>
</tr>
<tr>
<td rowspan="8" class="sub_title">형상정보</td>
<td class="input_title" ><label for="label2">품목번호</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMITEMNO}" disabled style="width:130px;" />
</td>
<td colspan="2" class="input_sub_title">&nbsp;</td>
<td class="input_title" ><label for="label2">도면번호</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMDRAWINGNO}" disabled style="width:100px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label2">품명</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMITEMNM}" disabled style="width:130px;" />
</td>
<td colspan="2" class="input_sub_title">&nbsp;</td>
<td class="input_title" ><label for="label2">규격</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMITEMSPEC}" disabled style="width:100px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label2">재질</label></td>
<td width="21%" class="input_sub_title">
<input type="text" value="${info.IMMATERIAL}" disabled style="width:130px;" />
</td>
<td colspan="4" class="input_sub_title">&nbsp;</td>
</tr>
<tr>
<td class="input_title" ><label for="label2">형상</label></td>
<td width="21%" class="input_sub_title">
<input type="text" value="${info.IMSHAPECDNM}" disabled style="width:130px;" />
</td>
<td colspan="2" class="input_sub_title">&nbsp;</td>
<td class="input_title" >&nbsp;</td>
<td class="input_sub_title">&nbsp;</td>
</tr>
<tr>
<td class="input_title" ><label for="label2">색상</label></td>
<td width="21%" class="input_sub_title">
<input type="text" value="${info.IMCOLORNM}" disabled style="width:130px;" />
</td>
<td colspan="2" class="input_sub_title">&nbsp;</td>
<td class="input_title" ><label for="label2">기종코드</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMPRODNO}" disabled style="width:100px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label2">단위</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMUNIT}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label2">단중</label></td>
<td width="21%" class="input_sub_title">
<input type="text" value="${info.IMWEIGHT}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label2">대체재질 </label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMCHNGMATERIAL}" disabled style="width:100px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label2">Assay</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMASSYNM}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label2">품목구분</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMITEMTPNM}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label2">사용구분</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMITEMFLAGNM}" disabled style="width:100px;" />
</td>
</tr>
<tr>
<td height="29" colspan="7" style="height:15px;"></td>
</tr>
</table>
<!--// 형상정보 -->
<br/>
<!--// 기종코드정보 -->
<div class="plm_table_wrap">
<div>
<h3 class="tit">기종코드정보</h3>
<table class="plm_table">
<colgroup>
<col width="10%" />
<col width="*" />
<col width="10%" />
<col width="10%" />
<col width="20%" />
<col width="10%" />
</colgroup>
<thead>
<tr class="plm_thead">
<td>제품코드</td>
<td>제품명</td>
<td>규격</td>
<td>단위</td>
<td>제품그룹</td>
<td>보증기간</td>
</tr>
</thead>
</table>
<div style="height:200px;overflow-y:scroll;margin-right:-10px;">
<table class="plm_table">
<colgroup>
<col width="10%" />
<col width="*" />
<col width="10%" />
<col width="10%" />
<col width="20%" />
<col width="10%" />
</colgroup>
<tbody>
<c:choose>
<c:when test="${empty goodsList}">
<tr style="text-align:center;">
<td align="center" colspan="6">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${goodsList}" varStatus="varStatus">
<tr>
<td>${item.GOODSCD}</td>
<td>${item.GOODSNM}</td>
<td>${item.GOODSSPEC}</td>
<td>${item.GOODSUNIT}</td>
<td>${item.C_CLASSNM}</td>
<td>
<c:if test="${item.GOODSGUARANTEE >= 0}">
${item.GOODSGUARANTEE}개월
</c:if>
</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</div>
</div>
<!--// 기종코드정보 -->
</td>
<td style="width:45%;padding-left:20px;" align="right" valign="top">
<!--// 자재정보 -->
<table class="pmsPopupForm mal10">
<colgroup>
<col width="10%"/>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
<col width="25%"/>
</colgroup>
<tr>
<td colspan="5" style="height:15px;"></td>
</tr>
<tr>
<td rowspan="8" class="sub_title">자재정보</td>
<td class="input_title" ><label for="label3">내/외자</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMNATIONNM}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label3">조달소요일</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMDELIVERY}" disabled style="width:130px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label3">조달구분</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMSOURCINGTPNM}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label3">구매담당자</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMCARDEXNM}" disabled style="width:130px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label3">사급자재</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMSAGUPTPNM}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label3">검수여부</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMINSPECTIONNM}" disabled style="width:130px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label3">등급</label></td>
<td width="21%" class="input_sub_title">
<input type="text" value="${info.IMABCNM}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label3">포장규격</label></td>
<td class="input_sub_title">
<input type="text" value="${info.IMPACKSIZE}" disabled style="width:130px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label3">원부자재</label></td>
<td width="21%" class="input_sub_title">
<input type="text" value="${info.IMMATERIALTPNM}" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label3">포장수량</label></td>
<td class="input_sub_title">
<input type="text" value="<fmt:formatNumber value="${info.IMPACKQTY}" type="number" maxFractionDigits="3" />" disabled style="width:130px;" />
</td>
</tr>
<tr>
<td class="input_title" ><label for="label3">생산안전재고</label></td>
<td width="21%" class="input_sub_title">
<input type="text" value="<fmt:formatNumber value="${info.IMSAFETYQTY}" type="number" maxFractionDigits="3" />" disabled style="width:130px;" />
</td>
<td class="input_title" ><label for="label3">최소발주량</label></td>
<td class="input_sub_title">
<input type="text" value="<fmt:formatNumber value="${info.IMMINORDERQTY}" type="number" maxFractionDigits="3" />" disabled style="width:130px;" />
</td>
</tr>
<tr>
<td colspan="5" style="height:40px;"></td>
</tr>
</table>
<!--// 자재정보 -->
<br/>
<!--// 업체단가정보 -->
<div class="plm_table_wrap">
<div class="mal10">
<h3 class="tit">업체단가정보</h3>
<div class="plm_btn_wrap">
<input type="button" value="등록" id="btnVendorPriceReg" class="plm_btns">
</div>
<table class="plm_table">
<colgroup>
<col width="7%" />
<col width="*" />
<col width="20%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
</colgroup>
<thead>
<tr class="plm_thead">
<td>순위</td>
<td>업체명</td>
<td>단가</td>
<td>단가적용일</td>
<td>품의번호</td>
<td>등록일자</td>
<td>사번</td>
<td>담당자</td>
</tr>
</thead>
</table>
<div style="height:200px;overflow-y:scroll;margin-right:-10px;">
<table class="plm_table">
<colgroup>
<col width="7%" />
<col width="*" />
<col width="20%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
</colgroup>
<tbody>
<c:choose>
<c:when test="${empty vendorList}">
<tr style="text-align:center;">
<td align="center" colspan="8">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${vendorList}" varStatus="varStatus">
<tr>
<td>${item.SISEQ}</td>
<td>${item.SUVNDNM}</td>
<td>
<fmt:formatNumber value="${item.UPPRICE}" type="number" maxFractionDigits="3" />
</td>
<td>
<fmt:parseDate var="upStartDt" value="${item.UPSTARTDT}" pattern="yyyyMMdd"/>
<fmt:formatDate value="${upStartDt}" pattern="yyyy-MM-dd" />
</td>
<td>${item.UPCONFORMNO}</td>
<td>
<fmt:formatDate value="${item.UPUPDATEDT}" pattern="yyyy-MM-dd" />
</td>
<td>${item.UPMANAGER}</td>
<td>${item.UPMANAGERNAME}</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
</div>
</div>
<!--// 업체단가정보 -->
</td>
</tr>
</table>
</section>
<!--// section -->
</form>
</div>
</div>
</body>
</html>