구매관리
This commit is contained in:
@@ -67,18 +67,18 @@
|
||||
|
||||
.item-table thead th {
|
||||
background-color: #f8f9fa;
|
||||
padding: 6px;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
border: 1px solid #dee2e6;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.item-table tbody td {
|
||||
padding: 5px;
|
||||
padding: 8px;
|
||||
border: 1px solid #dee2e6;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.item-table tbody td.text-left {
|
||||
@@ -149,72 +149,72 @@ $(function() {
|
||||
<div class="section-title">품목정보</div>
|
||||
<table class="item-table">
|
||||
<colgroup>
|
||||
<col width="3%">
|
||||
<col width="7%">
|
||||
<col width="7%">
|
||||
<col width="6%">
|
||||
<col width="10%">
|
||||
<col width="5%">
|
||||
<col width="6%">
|
||||
<col width="10%">
|
||||
<col width="15%">
|
||||
<col width="8%">
|
||||
<col width="8%">
|
||||
<col width="7%">
|
||||
<col width="8%">
|
||||
<%-- <col width="3%"> --%><%-- No 컬럼 제거 --%>
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<col width="16%">
|
||||
<col width="14%">
|
||||
<col width="14%">
|
||||
<%-- <col width="10%"> --%><%-- 품번 컬럼 제거 --%>
|
||||
<%-- <col width="15%"> --%><%-- 품명 컬럼 제거 --%>
|
||||
<%-- <col width="8%"> --%><%-- S/N 컬럼 제거 --%>
|
||||
<%-- <col width="8%"> --%><%-- 요청납기 컬럼 제거 --%>
|
||||
<col width="14%">
|
||||
<%-- <col width="8%"> --%><%-- 고객요청사항 컬럼 제거 --%>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<%-- <th>No</th> --%><%-- No 컬럼 제거 --%>
|
||||
<th>주문유형</th>
|
||||
<th>제품구분</th>
|
||||
<th>국내/해외</th>
|
||||
<th>고객사</th>
|
||||
<th>유/무상</th>
|
||||
<th>견적환종</th>
|
||||
<th>품번</th>
|
||||
<th>품명</th>
|
||||
<th>S/N</th>
|
||||
<th>요청납기</th>
|
||||
<%-- <th>품번</th> --%><%-- 품번 컬럼 제거 --%>
|
||||
<%-- <th>품명</th> --%><%-- 품명 컬럼 제거 --%>
|
||||
<%-- <th>S/N</th> --%><%-- S/N 컬럼 제거 --%>
|
||||
<%-- <th>요청납기</th> --%><%-- 요청납기 컬럼 제거 --%>
|
||||
<th>반납사유</th>
|
||||
<th>고객요청사항</th>
|
||||
<%-- <th>고객요청사항</th> --%><%-- 고객요청사항 컬럼 제거 --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${empty itemList}">
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<%-- <td>1</td> --%><%-- No 컬럼 제거 --%>
|
||||
<td>${info["CATEGORY_NAME"]}</td>
|
||||
<td>${info["PRODUCT_NAME"]}</td>
|
||||
<td>${info["AREA_NAME"]}</td>
|
||||
<td>${info["CUSTOMER_NAME"]}</td>
|
||||
<td>${info["PAID_TYPE_NAME"]}</td>
|
||||
<td>${info["CONTRACT_CURRENCY_NAME"]}</td>
|
||||
<%-- <td>-</td> --%><%-- 품번 컬럼 제거 --%>
|
||||
<%-- <td>-</td> --%><%-- 품명 컬럼 제거 --%>
|
||||
<%-- <td>-</td> --%><%-- S/N 컬럼 제거 --%>
|
||||
<%-- <td>-</td> --%><%-- 요청납기 컬럼 제거 --%>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<%-- <td>-</td> --%><%-- 고객요청사항 컬럼 제거 --%>
|
||||
</tr>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:forEach items="${itemList}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td>${status.count}</td>
|
||||
<%-- <td>${status.count}</td> --%><%-- No 컬럼 제거 --%>
|
||||
<td>${info["CATEGORY_NAME"]}</td>
|
||||
<td>${info["PRODUCT_NAME"]}</td>
|
||||
<td>${info["AREA_NAME"]}</td>
|
||||
<td>${info["CUSTOMER_NAME"]}</td>
|
||||
<td>${info["PAID_TYPE_NAME"]}</td>
|
||||
<td>${info["CONTRACT_CURRENCY_NAME"]}</td>
|
||||
<td>${item.part_no}</td>
|
||||
<td class="text-left">${item.part_name}</td>
|
||||
<td>${item.serial_nos}</td>
|
||||
<td>${item.due_date}</td>
|
||||
<%-- <td>${item.part_no}</td> --%><%-- 품번 컬럼 제거 --%>
|
||||
<%-- <td class="text-left">${item.part_name}</td> --%><%-- 품명 컬럼 제거 --%>
|
||||
<%-- <td>${item.serial_nos}</td> --%><%-- S/N 컬럼 제거 --%>
|
||||
<%-- <td>${item.due_date}</td> --%><%-- 요청납기 컬럼 제거 --%>
|
||||
<td>${item.return_reason}</td>
|
||||
<td class="text-left">${item.customer_request}</td>
|
||||
<%-- <td class="text-left">${item.customer_request}</td> --%><%-- 고객요청사항 컬럼 제거 --%>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</c:otherwise>
|
||||
|
||||
@@ -140,24 +140,23 @@ var columns = [
|
||||
field: 'PRODUCT_NAME'
|
||||
},
|
||||
|
||||
// 부대표님이 컬럼 삭제하라고하심!(251128 국내/해외, 접수일, 고객사)
|
||||
// 5. 국내/해외
|
||||
// {
|
||||
// headerHozAlign: 'center',
|
||||
// hozAlign: 'center',
|
||||
// width: 90,
|
||||
// title: '국내/해외',
|
||||
// field: 'AREA_NAME'
|
||||
// },
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'center',
|
||||
width: 90,
|
||||
title: '국내/해외',
|
||||
field: 'AREA_NAME'
|
||||
},
|
||||
|
||||
// 6. 접수일
|
||||
// {
|
||||
// headerHozAlign: 'center',
|
||||
// hozAlign: 'center',
|
||||
// width: 80,
|
||||
// title: '접수일',
|
||||
// field: 'RECEIPT_DATE'
|
||||
// },
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'center',
|
||||
width: 100,
|
||||
title: '접수일',
|
||||
field: 'RECEIPT_DATE'
|
||||
},
|
||||
|
||||
// 7. 고객사
|
||||
{
|
||||
@@ -169,13 +168,13 @@ var columns = [
|
||||
},
|
||||
|
||||
// 8. 유/무상
|
||||
// {
|
||||
// headerHozAlign: 'center',
|
||||
// hozAlign: 'center',
|
||||
// width: 80,
|
||||
// title: '유/무상',
|
||||
// field: 'PAID_TYPE_NAME'
|
||||
// },
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'center',
|
||||
width: 80,
|
||||
title: '유/무상',
|
||||
field: 'PAID_TYPE_NAME'
|
||||
},
|
||||
|
||||
// 9. 품번
|
||||
{
|
||||
@@ -248,55 +247,13 @@ var columns = [
|
||||
}
|
||||
},
|
||||
|
||||
// 16. 작성자 (M-BOM 작성자)
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'center',
|
||||
width: 90,
|
||||
title: '작성자',
|
||||
field: 'MBOM_EDITOR'
|
||||
},
|
||||
|
||||
// 16. 최종저장일 (M-BOM 작성일)
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'center',
|
||||
width: 90,
|
||||
title: '저장일',
|
||||
width: 100,
|
||||
title: '최종저장일',
|
||||
field: 'MBOM_REGDATE'
|
||||
},
|
||||
|
||||
// 17. 버전 (M-BOM 버전)
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'center',
|
||||
width: 70,
|
||||
title: '버전',
|
||||
field: 'MBOM_VERSION',
|
||||
cellClick: function(e, cell) {
|
||||
var data = cell.getRow().getData();
|
||||
if(data.MBOM_HEADER_OBJID) {
|
||||
fn_showMbomHistory(data.MBOM_HEADER_OBJID);
|
||||
} else {
|
||||
alert('M-BOM 이력이 없습니다.');
|
||||
}
|
||||
},
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
if(value) {
|
||||
return '<span style="color: #0066cc; cursor: pointer; text-decoration: underline;">' + value + '</span>';
|
||||
}
|
||||
return '-';
|
||||
}
|
||||
},
|
||||
|
||||
// 18. 구매리스트 생성일
|
||||
{
|
||||
headerHozAlign: 'center',
|
||||
hozAlign: 'center',
|
||||
width: 130,
|
||||
title: '구매리스트 생성일',
|
||||
field: 'PURCHASE_LIST_DATE'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -78,56 +78,58 @@ $(document).ready(function(){
|
||||
});
|
||||
|
||||
var columns = [
|
||||
|
||||
/* {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '년도', field : 'CM_YEAR' }, */
|
||||
{headerHozAlign : 'center', hozAlign : 'left', width : '120', title : '고객사', field : 'CUSTOMER_NAME' },
|
||||
//{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '프로젝트명', field : 'CUSTOMER_PROJECT_NAME' },
|
||||
//{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '유닛명', field : 'UNIT_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '130', title : '프로젝트번호', field : 'PROJECT_NO',
|
||||
/* formatter:fnc_createGridAnchorTag,
|
||||
cellClick:function(e, cell){
|
||||
var objid = fnc_checkNull(cell.getData().CONTRACT_OBJID);
|
||||
openProjectFormPopUp(objid);
|
||||
} */
|
||||
// 요구사항: 품의서 No, 발주서 No, 프로젝트번호, 품번, 품명, 공급업체, 발주수량, 입고수량, 미입고수량, 검사성적서, 입고결과
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 130, widthGrow : 1, title : '품의서 No', field : 'PROPOSAL_NO',
|
||||
formatter:fnc_createGridAnchorTag,
|
||||
cellClick:function(e, cell){
|
||||
var proposalObjId = fnc_checkNull(cell.getData().PROPOSAL_OBJID);
|
||||
if(proposalObjId != ''){
|
||||
fn_openProposalPopUp(proposalObjId);
|
||||
}
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '130', title : '발주번호', field : 'PURCHASE_ORDER_NO',
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 130, widthGrow : 1, title : '발주서 No', field : 'PURCHASE_ORDER_NO',
|
||||
formatter:fnc_createGridAnchorTag,
|
||||
cellClick:function(e, cell){
|
||||
var objId = fnc_checkNull(cell.getData().OBJID);
|
||||
fn_formPopUp(objId);
|
||||
}
|
||||
},
|
||||
//{headerHozAlign : 'center', hozAlign : 'center', /*width : '73',*/ title : '동시', field : "MULTI_YN" },
|
||||
{headerHozAlign : 'center', hozAlign : 'left', /* width : '180',*/ title : '발주서_제목', field : 'TITLE' },
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고요청일', field : 'DELIVERY_DATE' },
|
||||
{headerHozAlign : 'center', hozAlign : 'left', width : '170', title : '구매/제작업체명', field : 'PARTNER_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '구매담당', field : 'SALES_MNG_USER_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '발주일', field : 'REGDATE' },
|
||||
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '발주수량', field : 'TOTAL_PO_QTY',
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 140, widthGrow : 1, title : '프로젝트번호', field : 'PROJECT_NO'},
|
||||
{headerHozAlign : 'center', hozAlign : 'left', minWidth : 140, widthGrow : 2, title : '품번', field : 'PART_NO' },
|
||||
{headerHozAlign : 'center', hozAlign : 'left', minWidth : 180, widthGrow : 3, title : '품명', field : 'PART_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'left', minWidth : 150, widthGrow : 2, title : '공급업체', field : 'PARTNER_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '발주수량', field : 'TOTAL_PO_QTY',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고일', field : 'CUR_DELIVERY_DATE' },
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고자', field : 'CUR_RECEIVER_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '입고수량', field : 'TOTAL_DELIVERY_QTY',
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '입고수량', field : 'TOTAL_DELIVERY_QTY',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '미입고수량', field : 'NON_DELIVERY_QTY',
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '미입고수량', field : 'NON_DELIVERY_QTY',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
/* {headerHozAlign : 'center', hozAlign : 'right', width : '90', title : '부적합수량', field : 'TOTAL_DEFECT_QTY',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
}, */
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고결과', field : 'DELIVERY_STATUS',
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 100, widthGrow : 1, title : '검사성적서', field : 'INSPECTION_FILE',
|
||||
formatter: function(cell, formatterParams, onRendered){
|
||||
var fileYn = fnc_checkNull(cell.getValue());
|
||||
if(fileYn === 'Y'){
|
||||
return '<a href="#" class="file_icon" style="display:inline-block; width:20px; height:20px;"></a>';
|
||||
}
|
||||
return '<a href="#" class="file_empty_icon" style="display:inline-block; width:20px; height:20px;"></a>';
|
||||
},
|
||||
cellClick:function(e, cell){
|
||||
var objId = fnc_checkNull(cell.getData().OBJID);
|
||||
fn_openInspectionFilePopUp(objId);
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 90, widthGrow : 1, title : '입고결과', field : 'DELIVERY_STATUS',
|
||||
formatter:fnc_createGridAnchorTag,
|
||||
cellClick:function(e, cell){
|
||||
var objId = fnc_checkNull(cell.getData().OBJID);
|
||||
var DELIVERY_STATUS = fnc_checkNull(cell.getData().DELIVERY_STATUS);
|
||||
var purchaseOrderNo = fnc_checkNull(cell.getData().PURCHASE_ORDER_NO);
|
||||
fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS);
|
||||
//fn_deliveryResultPopUp(objId,purchaseOrderNo);
|
||||
}
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
//var grid;
|
||||
@@ -282,6 +284,22 @@ function fn_formPopUp(objId){
|
||||
hiddenForm.submit();
|
||||
}
|
||||
|
||||
// 품의서 팝업
|
||||
function fn_openProposalPopUp(proposalObjId){
|
||||
var popup_width = 1200;
|
||||
var popup_height = 900;
|
||||
var url = "/salesMng/proposalFormPopUp.do?PROPOSAL_OBJID=" + proposalObjId;
|
||||
window.open(url, "proposalFormPopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes");
|
||||
}
|
||||
|
||||
// 검사성적서 파일 팝업
|
||||
function fn_openInspectionFilePopUp(objId){
|
||||
var popup_width = 700;
|
||||
var popup_height = 500;
|
||||
var url = "/common/FileRegistPopup.do?docType=INSPECTION_FILE&targetObjId=" + objId + "&docTypeName=검사성적서";
|
||||
window.open(url, "inspectionFilePopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes");
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<form name="hiddenForm" id="hiddenForm" method="post">
|
||||
@@ -302,10 +320,11 @@ function fn_formPopUp(objId){
|
||||
</h2>
|
||||
<div class="btnArea">
|
||||
<input type="button" class="plm_btns" value="조회" id="btnSearch">
|
||||
<input type="button" class="plm_btns" value="입고결과등록" id="btnAccept">
|
||||
<input type="button" class="plm_btns" value="부적합등록" id="btnInvaild">
|
||||
<input type="button" class="plm_btns" value="입고등록" id="btnAccept">
|
||||
<%-- <input type="button" class="plm_btns" value="부적합등록" id="btnInvaild"> --%>
|
||||
</div>
|
||||
</div>
|
||||
<%-- 검색필터 주석처리
|
||||
<div id="plmSearchZon">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -314,7 +333,6 @@ function fn_formPopUp(objId){
|
||||
<select name="Year" id="Year" class="select2" autocomplete="off" style="width:170px;">
|
||||
<option value="">선택</option>
|
||||
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
|
||||
<%-- <option value="${req_year}" ${(param.Year eq req_year) or (empty param.Year and req_year eq sysYear) ? 'selected':'' }>${req_year}</option> --%>
|
||||
<option value="${req_year}"${param.Year eq req_year ? 'selected':'' }>${req_year}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
@@ -323,9 +341,6 @@ function fn_formPopUp(objId){
|
||||
<td><label for="">고객사</label></td>
|
||||
<td><select name="customer_cd" id="customer_cd" class="select2" autocomplete="off" style="width:170px;"><option value="">선택</option>${code_map.customer_cd}</select></td>
|
||||
|
||||
<%-- <td><label for="">고객사프로젝트명</label></td>
|
||||
<td><input type="text" name="customer_project_name" id="customer_project_name" autocomplete="off" value="${param.customer_project_name}" style="width:170px;"/></td> --%>
|
||||
|
||||
<td><label for="project_no">프로젝트번호</label></td>
|
||||
<td>
|
||||
<select name="project_no" id="project_no" style="width:260px;" class="select2" autocomplete="off" multiple="multiple">
|
||||
@@ -333,12 +348,6 @@ function fn_formPopUp(objId){
|
||||
${code_map.project_no}
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<!-- <td><label for="unit_code">유닛명</label></td>
|
||||
<td>
|
||||
<select name="unit_code" id="unit_code" style="width:190px;" class="select2" autocomplete="off" type="select" reqTitle="유닛명">
|
||||
</select>
|
||||
</td> -->
|
||||
|
||||
<td><label for="">발주No.</label></td>
|
||||
<td><input type="text" name="purchase_order_no" id="purchase_order_no" autocomplete="off" value="${param.purchase_order_no}" style="width:185px;"/></td>
|
||||
@@ -385,6 +394,7 @@ function fn_formPopUp(objId){
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
|
||||
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -387,6 +387,7 @@ function fn_search(){
|
||||
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/purchaseOrder/purchaseOrderListPaging.do", columns, true, null, null, null, null, null, null, false, rowSelectionControl); //_tabul_layout_fitColumns _tabul_layout_fitDataStretch
|
||||
_tabulGrid.on("rowSelectionChanged", rowSelectionControl);
|
||||
|
||||
/* 총발주금액 주석처리
|
||||
var _sum=0;
|
||||
var _sum2=0;
|
||||
var text =" <font size='2px' color='red'>총발주금액(원) : ";
|
||||
@@ -409,6 +410,7 @@ function fn_search(){
|
||||
//text2 = '';
|
||||
//$(".purchaseOrderSum").html(text+text2);
|
||||
$(".purchaseOrderSum").html(text);
|
||||
*/
|
||||
}
|
||||
|
||||
function rowSelectionControl (data, rows) {
|
||||
@@ -810,6 +812,7 @@ function fn_openMailFormPopup(purchaseOrderObjId){
|
||||
|
||||
</div>
|
||||
|
||||
<%-- 검색필터 주석처리
|
||||
<div id="plmSearchZon">
|
||||
<table class="">
|
||||
|
||||
@@ -827,17 +830,8 @@ function fn_openMailFormPopup(purchaseOrderObjId){
|
||||
<td><label for="">고객사</label></td>
|
||||
<td><select name="customer_cd" id="customer_cd" class="select2" autocomplete="off" style=""><option value="">선택</option>${code_map.customer_cd}</select></td>
|
||||
|
||||
<%-- <td><label for="">고객사 프로젝트명</label></td>
|
||||
<td><select name="customer_project_name" id="customer_project_name" class="select2" autocomplete="off" style="width:120px"><option value="">선택</option>${code_map.customer_project_name}</select></td> --%>
|
||||
|
||||
<td><label for="">프로젝트번호</label></td>
|
||||
<td><select name="project_no" id="project_no" class="select2" autocomplete="off" style="width:190px;" multiple="multiple"><option value="">선택</option>${code_map.project_no}</select></td>
|
||||
|
||||
<!-- <td><label for="unit_code">유닛명</label></td>
|
||||
<td>
|
||||
<select name="unit_code" id="unit_code" style="" class="select2" autocomplete="off" type="select" reqTitle="유닛명">
|
||||
</select>
|
||||
</td> -->
|
||||
|
||||
<td><label for="">발주No.</label></td>
|
||||
<td><input type="text" name="purchase_order_no" id="purchase_order_no" autocomplete="off" value="${param.purchase_order_no}" style=""/></td>
|
||||
@@ -879,28 +873,14 @@ function fn_openMailFormPopup(purchaseOrderObjId){
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td><label for="">상태</label></td>
|
||||
<td>
|
||||
<select name="appr_status" id="appr_status" class="select2" autocomplete="off" style="">
|
||||
<option value="">선택</option>
|
||||
<%-- ${code_map.appr_status} --%>
|
||||
<option value="create">작성중</option>
|
||||
<option value="inProcess">결재중</option>
|
||||
<option value="reject">반려</option>
|
||||
<option value="complete">결재완료</option>
|
||||
<option value="cancel">취소</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="">규격</label></td>
|
||||
<td><input type="text" name="SEARCH_PART_SPEC" id="SEARCH_PART_SPEC" autocomplete="off" value="${param.SEARCH_PART_SPEC }" style="width:;"/></td>
|
||||
</tr> -->
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
|
||||
<%-- 총발주금액 주석처리
|
||||
<div style="width:50%;float:left; color: RED;" class="purchaseOrderSum">
|
||||
</div>
|
||||
--%>
|
||||
|
||||
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -238,6 +238,7 @@ function _fnc_datepick(){
|
||||
<input type="button" value="발주서생성" class="plm_btns" id="btnCreatePO" style="background:#28a745; color:white;">
|
||||
</div>
|
||||
</div>
|
||||
<%-- 검색필터 주석처리
|
||||
<div id="plmSearchZon">
|
||||
<table>
|
||||
<tbody>
|
||||
@@ -269,6 +270,7 @@ function _fnc_datepick(){
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--%>
|
||||
|
||||
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -48,13 +48,20 @@ body, html {
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.info-table td {
|
||||
padding: 5px 10px;
|
||||
padding: 8px 15px;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.info-table label {
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
color: #555;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.info-table span {
|
||||
color: #333;
|
||||
}
|
||||
.content {
|
||||
flex: 1;
|
||||
@@ -66,11 +73,52 @@ body, html {
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h3 style="margin: 0 0 10px 0; float: left;">구매리스트</h3>
|
||||
<div style="float: right;">
|
||||
<input type="button" value="저장" class="plm_btns" onclick="fn_save();" style="margin-right: 5px;">
|
||||
<input type="button" value="닫기" class="plm_btns" onclick="window.close();" style="margin-right: 5px;">
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<!-- 프로젝트 정보 -->
|
||||
<table class="info-table" style="margin-top: 10px;">
|
||||
<tr>
|
||||
<td>
|
||||
<label>프로젝트번호:</label>
|
||||
<span id="infoProjectNo">${resultMap.PROJECT_NO}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label>고객사:</label>
|
||||
<span id="infoCustomer">${resultMap.CUSTOMER_NAME}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label>품번:</label>
|
||||
<span id="infoPartNo">${resultMap.PART_NO}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label>품명:</label>
|
||||
<span id="infoPartName">${resultMap.PART_NAME}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>구매유형:</label>
|
||||
<span id="infoPurchaseType">${resultMap.PURCHASE_TYPE_NAME}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label>요청번호:</label>
|
||||
<span id="infoRequestNo">${resultMap.REQUEST_MNG_NO}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label>요청인:</label>
|
||||
<span id="infoRequestUser">${resultMap.REQUEST_USER_NAME}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label>입고요청일:</label>
|
||||
<span id="infoDeliveryDate">${resultMap.DELIVERY_REQUEST_DATE}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -654,6 +654,7 @@ function fn_callbackFnc(){
|
||||
<col width="15%">
|
||||
</colgroup>
|
||||
|
||||
<!-- 1행: 구매유형, 프로젝트번호, 구매유형, 주문유형 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="">구매유형<span class="required-mark">*</span></label></td>
|
||||
<td>
|
||||
@@ -667,20 +668,27 @@ function fn_callbackFnc(){
|
||||
<option value="">선택</option> ${code_map.project_no}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">구매유형<span class="required-mark">*</span></label></td>
|
||||
<td>
|
||||
<select name="PURCHASE_TYPE2" id="PURCHASE_TYPE2" reqTitle="구매유형" required type="select" class="select2" style="width: 100%;">
|
||||
<option value="">선택</option> ${code_map.purchase_type}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label for="">주문유형<span class="required-mark">*</span></label></td>
|
||||
<td>
|
||||
<select name="ORDER_TYPE" id="ORDER_TYPE" reqTitle="주문유형" required type="select" class="select2" style="width: 100%;">
|
||||
<option value="">선택</option> ${code_map.category_cd}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 2행: 제품구분, 국내/해외, 고객사, 유/무상 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="">제품구분<span class="required-mark">*</span></label></td>
|
||||
<td>
|
||||
<select name="PRODUCT_NAME" id="PRODUCT_NAME" reqTitle="제품구분" required type="select" class="select2" style="width: 100%;">
|
||||
<option value="">선택</option> ${code_map.product_name}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for="">국내/해외<span class="required-mark">*</span></label></td>
|
||||
<td>
|
||||
<select name="AREA_CD" id="AREA_CD" reqTitle="국내/해외" required type="select" class="select2" style="width: 100%;">
|
||||
@@ -689,7 +697,6 @@ function fn_callbackFnc(){
|
||||
</td>
|
||||
<td class="input_title"><label for="">고객사<span class="required-mark">*</span></label></td>
|
||||
<td>
|
||||
<!-- <input type="text" name="CUSTOMER_NAME" id="CUSTOMER_NAME" value="${resultMap.CUSTOMER_NAME}" readonly> -->
|
||||
<select name="CUSTOMER_OBJID" id="CUSTOMER_OBJID" reqTitle="고객사" required type="select" class="select2" style="width: 100%;">
|
||||
<option value="">선택</option> ${code_map.customer_objid}
|
||||
</select>
|
||||
@@ -700,11 +707,20 @@ function fn_callbackFnc(){
|
||||
<option value="">선택</option> ${code_map.paid_type}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 3행: 입고요청일 -->
|
||||
<tr>
|
||||
<td class="input_title"><label for="">입고요청일</label></td>
|
||||
<td>
|
||||
<input type="text" class="date_icon" name="DELIVERY_REQUEST_DATE" id="DELIVERY_REQUEST_DATE" reqTitle="입고요청일" value="${resultMap.DELIVERY_REQUEST_DATE}" disabled>
|
||||
<input type="text" class="date_icon" name="DELIVERY_REQUEST_DATE" id="DELIVERY_REQUEST_DATE" reqTitle="입고요청일" value="${resultMap.DELIVERY_REQUEST_DATE}">
|
||||
<input type="hidden" name="REQUEST_USER_ID" id="REQUEST_USER_ID" value="${resultMap.REQUEST_USER_ID}">
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -211,8 +211,28 @@ var columns = [
|
||||
}
|
||||
}
|
||||
}
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "요청인", field :"REQUEST_USER_NAME" , widthGrow:1.1 }
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "입고요청일", field :"DELIVERY_REQUEST_DATE" , widthGrow:1.1 }
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "요청인", field :"REQUEST_USER_NAME" , widthGrow:1.1,
|
||||
// 요청인: 구매요청서 작성 시에만 표시
|
||||
formatter: function(cell, formatterParams, onRendered){
|
||||
var data = cell.getData();
|
||||
var hasPurchaseRequest = fnc_checkNull(data.HAS_PURCHASE_REQUEST);
|
||||
if(hasPurchaseRequest == 'Y') {
|
||||
return fnc_checkNull(data.REQUEST_USER_NAME);
|
||||
}
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "입고요청일", field :"DELIVERY_REQUEST_DATE" , widthGrow:1.1,
|
||||
// 입고요청일: 구매요청서 작성 시에만 표시
|
||||
formatter: function(cell, formatterParams, onRendered){
|
||||
var data = cell.getData();
|
||||
var hasPurchaseRequest = fnc_checkNull(data.HAS_PURCHASE_REQUEST);
|
||||
if(hasPurchaseRequest == 'Y') {
|
||||
return fnc_checkNull(data.DELIVERY_REQUEST_DATE);
|
||||
}
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "작성일", field :"REGDATE_TITLE" , widthGrow:1.1 }
|
||||
];
|
||||
|
||||
|
||||
@@ -712,12 +712,30 @@ VALUES
|
||||
|
||||
-- 저장된 값 우선, 없으면 조인으로 가져오기
|
||||
COALESCE(NULLIF(SRM.PURCHASE_TYPE, ''), POM.TYPE) AS PURCHASE_TYPE, -- 구매유형
|
||||
(SELECT CODE_NAME FROM COMM_CODE WHERE CODE_ID = COALESCE(NULLIF(SRM.PURCHASE_TYPE, ''), POM.TYPE)) AS PURCHASE_TYPE_NAME, -- 구매유형명
|
||||
COALESCE(NULLIF(SRM.ORDER_TYPE, ''), POM.ORDER_TYPE_CD) AS ORDER_TYPE, -- 주문유형
|
||||
COALESCE(NULLIF(SRM.PRODUCT_NAME, ''), PM.PRODUCT) AS PRODUCT_NAME, -- 제품구분
|
||||
COALESCE(NULLIF(SRM.AREA_CD, ''), SM.AREA_CD) AS AREA_CD, -- 국내/해외
|
||||
COALESCE(NULLIF(SRM.CUSTOMER_OBJID, ''), SM.OBJID::VARCHAR) AS CUSTOMER_OBJID, -- 고객사
|
||||
COALESCE(NULLIF(SRM.PAID_TYPE, ''), CM.PAID_TYPE) AS PAID_TYPE, -- 유/무상
|
||||
CM.CATEGORY_CD AS CATEGORY_CD -- 제품유형 코드 ID (드롭다운 선택용)
|
||||
CM.CATEGORY_CD AS CATEGORY_CD, -- 제품유형 코드 ID (드롭다운 선택용)
|
||||
-- 품번/품명: 첫 번째 품목 + 외 N건 형태
|
||||
(SELECT
|
||||
CASE
|
||||
WHEN (SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) > 1 THEN
|
||||
COALESCE((SELECT PM2.PART_NO FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '') || ' 외 ' || ((SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) - 1)::TEXT || '건'
|
||||
ELSE
|
||||
COALESCE((SELECT PM2.PART_NO FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '')
|
||||
END
|
||||
) AS PART_NO,
|
||||
(SELECT
|
||||
CASE
|
||||
WHEN (SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) > 1 THEN
|
||||
COALESCE((SELECT PM2.PART_NAME FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '') || ' 외 ' || ((SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) - 1)::TEXT || '건'
|
||||
ELSE
|
||||
COALESCE((SELECT PM2.PART_NAME FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '')
|
||||
END
|
||||
) AS PART_NAME
|
||||
|
||||
FROM
|
||||
SALES_REQUEST_MASTER SRM
|
||||
@@ -3402,11 +3420,12 @@ ORDER BY V.PATH2
|
||||
WHERE DOC_TYPE = 'PURCHASE_REQUEST' OR DOC_TYPE IS NULL
|
||||
</select>
|
||||
|
||||
<!-- 다음 품의서 번호 생성 (P + YYYYMMDD + - + 3자리 순번) - 품의서용 -->
|
||||
<!-- 다음 품의서 번호 생성 (RPS + YY + - + MMDD + - + 2자리 순번) 예: RPS25-0926-01 -->
|
||||
<select id="getNextProposalNo" resultType="string">
|
||||
SELECT 'P'||TO_CHAR(NOW(),'YYYYMMDD')||'-'||LPAD((COALESCE(MAX(SUBSTR(REQUEST_MNG_NO,11,13)),'0')::INTEGER+1)::TEXT,3,'0')
|
||||
SELECT 'RPS'||TO_CHAR(NOW(),'YY')||'-'||TO_CHAR(NOW(),'MMDD')||'-'||LPAD((COALESCE(MAX(SUBSTR(REQUEST_MNG_NO,12,2)),'0')::INTEGER+1)::TEXT,2,'0')
|
||||
FROM SALES_REQUEST_MASTER
|
||||
WHERE DOC_TYPE = 'PROPOSAL'
|
||||
AND REQUEST_MNG_NO LIKE 'RPS'||TO_CHAR(NOW(),'YY')||'-'||TO_CHAR(NOW(),'MMDD')||'%'
|
||||
</select>
|
||||
|
||||
<!-- M-BOM에서 구매리스트 생성 - SALES_REQUEST_MASTER만 생성 (SALES_REQUEST_PART는 생성 안 함) -->
|
||||
|
||||
Reference in New Issue
Block a user