378 lines
11 KiB
Plaintext
378 lines
11 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" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
</head>
|
|
<link rel="stylesheet" href="/css/ions-basic.css">
|
|
<script type="text/javascript" src="/js/ions-common.js" ></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$('.select2').select2();
|
|
|
|
fnc_makeDatepick();
|
|
|
|
// 업체 검색
|
|
$("#btnPartSearch").click(function(){
|
|
window.open("/common/itemMgmt/searchVendor.do", "searchProduct", "width=1024, height=710", "menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
// 신규등록
|
|
$("#btnReg").click(function(){
|
|
fn_init();
|
|
});
|
|
|
|
// 저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
// 삭제
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
|
|
// 닫기
|
|
$("#btnClose").click(function(){
|
|
opener.fn_search();
|
|
self.close();
|
|
});
|
|
});
|
|
|
|
//폼 초기화
|
|
function fn_init() {
|
|
document.hiddenForm.actionType.value = "regist";
|
|
document.hiddenForm.suVndCd.value = "";
|
|
document.hiddenForm.upStartDt.value = "";
|
|
document.hiddenForm.action = "/imItem/vendorPriceFormPopup.do";
|
|
document.hiddenForm.submit();
|
|
}
|
|
|
|
// 업체단가 정보 등록
|
|
function fn_save(){
|
|
if(fnc_valitate("form1")){
|
|
if(confirm("등록 하시겠습니까?")){
|
|
saveProcess();
|
|
}
|
|
}
|
|
}
|
|
|
|
// 등록
|
|
function saveProcess(){
|
|
$.ajax({
|
|
url:"/imItem/saveVendorPrice.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.RESULT.msg);
|
|
|
|
if (data.RESULT.result) {
|
|
fn_init();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
// 업체단가 정보 삭제
|
|
function fn_delete() {
|
|
if(confirm("삭제 하시겠습니까?")){
|
|
deleteProcess();
|
|
}
|
|
}
|
|
|
|
// 삭제
|
|
function deleteProcess(){
|
|
$.ajax({
|
|
url:"/imItem/deleteVendorPrice.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.RESULT.msg);
|
|
|
|
if (data.RESULT.result) {
|
|
fn_init();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
// 업체 선택
|
|
function verndorSelected(selectedItem) {
|
|
form1.suVndCd.value = selectedItem.suVndCd;
|
|
form1.suVndNm.value = selectedItem.suVndNm;
|
|
}
|
|
|
|
// 업체단가 조회
|
|
function searchVendor(imItemId, suVndCd, upStartDt) {
|
|
document.form1.imItemId.value = imItemId;
|
|
document.form1.suVndCd.value = suVndCd;
|
|
document.form1.upStartDt.value = upStartDt;
|
|
|
|
document.hiddenForm.actionType.value = "modify";
|
|
document.hiddenForm.imItemId.value = imItemId;
|
|
document.hiddenForm.suVndCd.value = suVndCd;
|
|
document.hiddenForm.upStartDt.value = upStartDt;
|
|
document.hiddenForm.action = "/imItem/vendorPriceFormPopup.do";
|
|
document.hiddenForm.submit();
|
|
}
|
|
</script>
|
|
<body>
|
|
<form name="hiddenForm" id="hiddenForm" method="get" onsubmit="return false;">
|
|
<input type="hidden" name="actionType" id="actionType" value="${param.actionType}" />
|
|
<input type="hidden" name="imItemId" id="imItemId" value="${param.imItemId}" /> <!-- 품번코드 -->
|
|
<input type="hidden" name="suVndCd" id="suVndCd" /> <!-- 발주업체코드 -->
|
|
<input type="hidden" name="upStartDt" id="upStartDt" /> <!-- 단가적용일 -->
|
|
</form>
|
|
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="imItemId" id="imItemId" value="${param.imItemId}" /> <!-- 품번코드 -->
|
|
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>업체단가정보 등록</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap" >
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="10%"/>
|
|
<col width="10%"/>
|
|
<col width="80%"/>
|
|
</colgroup>
|
|
<tr><td colspan="3" style="height:15px;"></td></tr>
|
|
<tr>
|
|
<td rowspan="4" class="sub_title">품목정보</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">품목번호</label></td>
|
|
<td>
|
|
<input type="text" name="imItemNo" id="imItemNo" value="${imItem.IMITEMNO}" readonly style="width:130px;background-color:#efefef;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">품명</label></td>
|
|
<td>
|
|
<input type="text" name="imItemNm" id="imItemNm" value="${imItem.IMITEMNM}" readonly style="width:90%;background-color:#efefef;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">규격</label></td>
|
|
<td>
|
|
<input type="text" name="imItemSpec" id="imItemSpec" value="${imItem.IMITEMSPEC}" readonly style="width:130px;background-color:#efefef;" />
|
|
</td>
|
|
</tr>
|
|
<tr><td colspan="3" style="height:15px;"></td></tr>
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="10%"/>
|
|
<col width="10%"/>
|
|
<col width="80%"/>
|
|
</colgroup>
|
|
<tr>
|
|
<td colspan="3" style="height:15px;"></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="4" class="sub_title">업체정보</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label5">* 업체코드</label></td>
|
|
<td>
|
|
<input type="text" name="suVndCd" id="suVndCd" required reqTitle="업체코드" value="${info.SUVNDCD}" readonly style="width:130px;float:left;background-color:#fefefe;" />
|
|
<input type="button" value="?" class="gray_btns" id="btnPartSearch" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label5">업체명</label></td>
|
|
<td>
|
|
<input type="text" name="suVndNm" id="suVndNm" value="${info.SUVNDNM}" disabled style="width:90%;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label5">* 순위</label></td>
|
|
<td>
|
|
<input type="text" name="siSeq" id="siSeq" required reqTitle="순위" value="${info.SISEQ}" maxlength="2" style="width:130px;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="height:15px;"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p></p>
|
|
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="10%"/>
|
|
<col width="10%"/>
|
|
<col width="80%"/>
|
|
</colgroup>
|
|
<tr>
|
|
<td colspan="3" style="height:15px;"></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="5" class="sub_title">단가정보</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label6">* 단가</label></td>
|
|
<td>
|
|
<input type="text" name="upPrice" id="upPrice" required reqTitle="단가" value="${info.UPPRICE}" maxlength="9" style="width:130px;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label6">* 단가적용일</label></td>
|
|
<td>
|
|
<input type="text" name="upStartDt" id="upStartDate" required reqTitle="단가적용일" value="${info.UPSTARTDT}" class="date_icon" style="width:100px !important;background-color:#fff;" autocomplete="off" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label6">* 품의번호</label></td>
|
|
<td>
|
|
<input type="text" name="upConformNo" id="upConformNo" required reqTitle="품의번호" value="${info.UPCONFORMNO}" maxlength="13" style="width:130px;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label6">특기사항</label></td>
|
|
<td>
|
|
<input type="text" name="bigo" id="bigo" value="${info.BIGO}" maxlength="50" style="width:90%;" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="height:15px;"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p></p>
|
|
<p></p>
|
|
<p></p>
|
|
|
|
<!--// 업체단가 정보 -->
|
|
<div id="plmSearchZon">
|
|
<table style="width:100%">
|
|
<tbody>
|
|
<tr>
|
|
<td class="align_l" style="width:80%">
|
|
<h3 class="tit">업체단가 정보</h3>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="7%" />
|
|
<col width="8%" />
|
|
<col width="17%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="8%" />
|
|
<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>
|
|
<td>담당자</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
<div style="height:300px;overflow-y:scroll;margin-right:-10px;">
|
|
<table class="plm_table table-hover">
|
|
<colgroup>
|
|
<col width="7%" />
|
|
<col width="8%" />
|
|
<col width="17%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="8%" />
|
|
<col width="10%" />
|
|
</colgroup>
|
|
<tbody>
|
|
<c:choose>
|
|
<c:when test="${empty vendorPriceList}">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="9">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${vendorPriceList}" varStatus="varStatus">
|
|
<tr onclick="searchVendor('${item.IMITEMID}', '${item.SUVNDCD}', '${item.UPSTARTDT}');"
|
|
${param.imItemId eq item.IMITEMID and param.suVndCd eq item.SUVNDCD and param.upStartDt eq item.UPSTARTDT ? 'class=selected':''}
|
|
>
|
|
<td>${item.SISEQ}</td>
|
|
<td>${item.SUVNDCD}</td>
|
|
<td>${item.SUVNDNM}</td>
|
|
<td>${item.UPPRICE}</td>
|
|
<td>${item.UPSTARTDT}</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 class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="신규등록" id="btnReg" class="plm_btns">
|
|
<c:if test="${(param.actionType ne 'view' and info.REG_USER_ID eq connectUserId) or 'regist' eq param.actionType or 'plm_admin' eq connectUserId}">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
</c:if>
|
|
<c:if test="${(param.actionType eq 'modify' and info.REG_USER_ID eq connectUserId) or 'plm_admin' eq connectUserId}">
|
|
<input type="button" value="삭제" id="btnDelete" class="plm_btns">
|
|
</c:if>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |