품질관리 _수입검사관리 그리드 상단 수량정보 표시 추가

This commit is contained in:
2026-02-02 17:27:16 +09:00
parent 99d4a3b8d7
commit 654e50554d
2 changed files with 92 additions and 5 deletions

View File

@@ -50,6 +50,9 @@ String menuName = CommonUtils.getMenuName(menuObjId, "수입검사 진행");
margin: 0;
padding: 0;
}
.totalCntArea {
height: 0px !important;
}
</style>
<script type="text/javascript">
@@ -58,6 +61,15 @@ $(document).ready(function(){
$('.select2').select2();
fnc_datepick();
// DOM 렌더링 완료 후 그리드 높이 계산
setTimeout(function() {
fnc_calculateContentHeight("gridDiv", 20);
}, 100);
$(window).resize(function() {
fnc_calculateContentHeight("gridDiv", 20);
});
// 품번/품명 Select2 AJAX 초기화
initPartSelect2Ajax("#search_part_no", "#search_part_name", "#search_part_objid");
@@ -173,8 +185,70 @@ function fn_search(){
value: selectedProjectNos
}).appendTo('#form1');
// 신규 API 호출 (입고품목 상세 기준)
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/quality/incomingInspectionProgressGridList.do", columns, true);
var formData = $("#form1").serializeObject();
$.ajax({
url: "/quality/incomingInspectionProgressGridList.do",
type: "POST",
data: formData,
dataType: "json",
beforeSend: function(){
_startLoading("Loading...");
},
complete: function(){
_endLoading();
},
success: function(response) {
// 그리드 데이터 설정
if(_tabulGrid){
_tabulGrid.setData(response.RESULTLIST || []);
} else {
_tabulGrid = new Tabulator("#mainGrid", {
height: "100%",
layout: _tabul_layout_fitColumns,
columns: columns,
data: response.RESULTLIST || [],
selectable: true
});
}
// Total 합계 계산
var totalDeliveryQty = 0; // 총 입고수량
var totalInspectionQty = 0; // 총 검사수량
var totalGoodQty = 0; // 총 양품수량
var totalDefectQty = 0; // 총 불량수량
if(response.RESULTLIST && response.RESULTLIST.length > 0) {
response.RESULTLIST.forEach(function(row) {
var deliveryQty = parseFloat(row.DELIVERY_QTY || 0);
var inspectionQty = parseFloat(row.INSPECTION_QTY || 0);
var defectQty = parseFloat(row.DEFECT_QTY_SUM || 0);
totalDeliveryQty += deliveryQty;
totalInspectionQty += inspectionQty;
totalDefectQty += defectQty;
// 양품수량 = 검사수량 - 불량수량
totalGoodQty += (inspectionQty - defectQty);
});
}
// 합계 표시
$("#totalDeliveryQty").text(Number(totalDeliveryQty).toLocaleString());
$("#totalInspectionQty").text(Number(totalInspectionQty).toLocaleString());
$("#totalGoodQty").text(Number(totalGoodQty).toLocaleString());
$("#totalDefectQty").text(Number(totalDefectQty).toLocaleString());
// 페이징 HTML 업데이트
if(response.PAGE_HTML){
$(".table_paging_wrap").html(response.PAGE_HTML);
}
},
error: function(xhr, status, error) {
_endLoading();
alert("데이터 조회 중 오류가 발생했습니다.");
console.error("Error:", error);
}
});
}
// =====================================================
@@ -383,6 +457,16 @@ function fn_deliveryAcceptanceViewPopUp(objId, deliveryStatus){
</table>
</div>
<!-- Total 합계 표시 영역 -->
<div style="padding:5px 10px; background: #f5f5f5; border: 1px solid #ddd;">
<span style="font-weight: bold; font-size: 13px;">
Total 입고수량: <span id="totalDeliveryQty" style="color: #2196F3;">0</span>EA &nbsp;&nbsp;
Total 검사수량: <span id="totalInspectionQty" style="color: #FF9800;">0</span>EA &nbsp;&nbsp;
Total 양품수량: <span id="totalGoodQty" style="color: #4CAF50;">0</span>EA &nbsp;&nbsp;
Total 불량수량: <span id="totalDefectQty" style="color: #dc3545;">0</span>EA
</span>
</div>
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>

View File

@@ -50,6 +50,9 @@ String menuName = CommonUtils.getMenuName(menuObjId, "반제품검사 관리");
margin: 0;
padding: 0;
}
.totalCntArea {
height: 0px !important;
}
</style>
<script type="text/javascript">
@@ -60,11 +63,11 @@ $(document).ready(function(){
// DOM 렌더링 완료 후 그리드 높이 계산
setTimeout(function() {
fnc_calculateContentHeight("gridDiv", 10);
fnc_calculateContentHeight("gridDiv", 20);
}, 100);
$(window).resize(function() {
fnc_calculateContentHeight("gridDiv", 10);
fnc_calculateContentHeight("gridDiv", 20);
});
$("input").keyup(function(e){
@@ -462,7 +465,7 @@ function fn_registPopUp(){
</div>
<!-- Total 합계 표시 영역 -->
<div style="padding:5px 10px; background: #f5f5f5; border: 1px solid #ddd; margin-bottom: 5px;">
<div style="padding:5px 10px; background: #f5f5f5; border: 1px solid #ddd;">
<span style="font-weight: bold; font-size: 13px;">
Total 총 입고수량: <span id="totalReceiptQty" style="color: #2196F3;">0</span>EA &nbsp;&nbsp;
Total 총 양품수량: <span id="totalGoodQty" style="color: #4CAF50;">0</span>EA &nbsp;&nbsp;