공정검사관리 수정(251218)

This commit is contained in:
2025-12-19 11:43:19 +09:00
parent fede2e3cef
commit d7f5d45e67
3 changed files with 71 additions and 48 deletions

View File

@@ -42,6 +42,8 @@ String connector = person.getUserId();
/* 검사결과 스타일 */
.inspection-ng { color: #dc3545; font-weight: bold; }
.inspection-ok { color: #28a745; font-weight: bold; }
/* 공통에서 추가되는 초기화, Excel Download 버튼 숨기기 */
.resetBtn, .excelBtn { display: none !important; }
</style>
<script type="text/javascript">
@@ -170,6 +172,16 @@ function fn_search(){
var columns = [
{formatter:"rowSelection", titleFormatter:"rowSelection", hozAlign:"center", headerSort:false, width:30},
{title:'검사일', field:'INSPECTION_DATE', headerHozAlign:'center', hozAlign:'center', width:110,
editor:"date"
},
{title:'검사자', field:'INSPECTOR_ID', headerHozAlign:'center', hozAlign:'center', width:100,
editor: fnc_customSelectEditor,
formatter: function(cell) {
return fnc_customSelectFormatter(cell, {valueId:"CODE", labelId:"NAME", values:_INSPECTOR_LIST});
},
editorParams: {valueId:"CODE", labelId:"NAME", values:_INSPECTOR_LIST}
},
{title:'진행공정', field:'PROCESS_CD', headerHozAlign:'center', hozAlign:'center', width:130,
editor: fnc_customSelectEditor,
formatter: function(cell) {
@@ -259,10 +271,10 @@ function fn_search(){
editor:"input",
formatter:"money", formatterParams:{thousand:",", precision:false}
},
{title:'불량수량', field:'DEFECT_QTY', headerHozAlign:'center', hozAlign:'right', width:80,
editor:"input",
formatter:"money", formatterParams:{thousand:",", precision:false}
},
// {title:'불량수량', field:'DEFECT_QTY', headerHozAlign:'center', hozAlign:'right', width:80,
// editor:"input",
// formatter:"money", formatterParams:{thousand:",", precision:false}
// },
{title:'작업환경상태', field:'WORK_ENV_STATUS', headerHozAlign:'center', hozAlign:'center', width:100,
editor: fnc_customSelectEditor,
formatter: function(cell) {
@@ -277,6 +289,16 @@ function fn_search(){
},
editorParams: {valueId:"CODE", labelId:"NAME", values:_MEASURING_DEVICE_LIST}
},
{title:'검사결과', field:'INSPECTION_RESULT', headerHozAlign:'center', hozAlign:'center', width:80,
editor: fnc_customSelectEditor,
formatter: function(cell) {
var val = cell.getValue();
if(val === 'NG') return '<span class="inspection-ng">NG</span>';
if(val === 'OK') return '<span class="inspection-ok">OK</span>';
return fnc_customSelectFormatter(cell, {valueId:"CODE", labelId:"NAME", values:_INSPECTION_RESULT_LIST});
},
editorParams: {valueId:"CODE", labelId:"NAME", values:_INSPECTION_RESULT_LIST}
},
{title:'담당팀', field:'DEPT_CD', headerHozAlign:'center', hozAlign:'center', width:100,
editor: fnc_customSelectEditor,
formatter: function(cell) {
@@ -291,32 +313,14 @@ function fn_search(){
},
editorParams: {valueId:"CODE", labelId:"NAME", values:_USER_LIST}
},
{title:'검사일', field:'INSPECTION_DATE', headerHozAlign:'center', hozAlign:'center', width:110,
editor:"date"
},
{title:'검사자', field:'INSPECTOR_ID', headerHozAlign:'center', hozAlign:'center', width:100,
editor: fnc_customSelectEditor,
formatter: function(cell) {
return fnc_customSelectFormatter(cell, {valueId:"CODE", labelId:"NAME", values:_INSPECTOR_LIST});
},
editorParams: {valueId:"CODE", labelId:"NAME", values:_INSPECTOR_LIST}
},
{title:'특이사항', field:'REMARK', headerHozAlign:'center', hozAlign:'left', width:150,
editor:"input"
},
{title:'조치현황', field:'ACTION_STATUS', headerHozAlign:'center', hozAlign:'left', width:150,
editor:"input"
},
{title:'검사결과', field:'INSPECTION_RESULT', headerHozAlign:'center', hozAlign:'center', width:80,
editor: fnc_customSelectEditor,
formatter: function(cell) {
var val = cell.getValue();
if(val === 'NG') return '<span class="inspection-ng">NG</span>';
if(val === 'OK') return '<span class="inspection-ok">OK</span>';
return fnc_customSelectFormatter(cell, {valueId:"CODE", labelId:"NAME", values:_INSPECTION_RESULT_LIST});
},
editorParams: {valueId:"CODE", labelId:"NAME", values:_INSPECTION_RESULT_LIST}
},
{title:'이미지파일', field:'IMAGE_FILE_CNT', headerHozAlign:'center', hozAlign:'center', width:90,
formatter: fnc_subInfoValueFormatter,
cellClick: function(e, cell) {
@@ -327,18 +331,18 @@ function fn_search(){
Swal.fire("먼저 저장 후 이미지를 등록할 수 있습니다.");
}
}
},
{title:'첨부파일', field:'ATTACH_FILE_CNT', headerHozAlign:'center', hozAlign:'center', width:90,
formatter: fnc_subInfoValueFormatter,
cellClick: function(e, cell) {
var objId = fnc_checkNull(cell.getData().OBJID);
if(objId) {
fn_openAttachFilePopUp(objId);
} else {
Swal.fire("먼저 저장 후 파일을 등록할 수 있습니다.");
}
}
}
// {title:'첨부파일', field:'ATTACH_FILE_CNT', headerHozAlign:'center', hozAlign:'center', width:90,
// formatter: fnc_subInfoValueFormatter,
// cellClick: function(e, cell) {
// var objId = fnc_checkNull(cell.getData().OBJID);
// if(objId) {
// fn_openAttachFilePopUp(objId);
// } else {
// Swal.fire("먼저 저장 후 파일을 등록할 수 있습니다.");
// }
// }
// }
];
// 그리드가 없으면 생성

View File

@@ -88,7 +88,8 @@ $(document).ready(function(){
// 컬럼: 검사일, 프로젝트번호, 품번, 품명, 불량수량, 작업환경상태, 측정기, 검사자, 검사결과
var columns = [
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'검사일', field:'INSPECTION_DATE' },
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'검사자', field:'INSPECTOR_NAME'},
{headerHozAlign:'center', hozAlign:'center', minWidth:150, widthGrow:2, title:'프로젝트번호', field:'PROJECT_NO'},
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'제품구분', field:'PRODUCT_NAME'},
{headerHozAlign:'center', hozAlign:'left', minWidth:180, widthGrow:2, title:'품번', field:'PART_NO'},
@@ -96,24 +97,28 @@ var columns = [
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1, title:'검사수량 합계', field:'INSPECTION_QTY',
formatter:"money", formatterParams:{thousand:",", precision:false}
},
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1, title:'불량수량 합계', field:'DEFECT_QTY',
formatter:"money", formatterParams:{thousand:",", precision:false}
},
{headerHozAlign:'center', hozAlign:'center', minWidth:120, widthGrow:1, title:'작업환경상태', field:'WORK_ENV_STATUS'},
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'측정기', field:'MEASURING_DEVICE'},
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'검사일', field:'INSPECTION_DATE',
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell){
fn_openFormPopUp(cell.getData().OBJID);
}
},
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'검사자', field:'INSPECTOR_NAME'},
// {headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1, title:'불량수량 합계', field:'DEFECT_QTY',
// formatter:"money", formatterParams:{thousand:",", precision:false}
// },
// {headerHozAlign:'center', hozAlign:'center', minWidth:120, widthGrow:1, title:'작업환경상태', field:'WORK_ENV_STATUS'},
// {headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'측정기', field:'MEASURING_DEVICE'},
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'검사결과', field:'INSPECTION_RESULT',
formatter: function(cell, formatterParams, onRendered){
var val = fnc_checkNull(cell.getValue());
if(val === 'NG') return '<span class="inspection-ng">NG</span>';
if(val === 'OK') return '<span class="inspection-ok">OK</span>';
return val;
},
cellClick: function(e, cell){
fn_openFormPopUp(cell.getData().OBJID);
}
},
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'첨부파일', field:'PROCESS_INSPECTION_FILE_CNT',
formatter: fnc_subInfoValueFormatter,
cellClick: function(e, cell){
var objId = fnc_checkNull(cell.getData().OBJID);
fn_openAttachFilePopUp(objId);
}
}
];
@@ -151,6 +156,19 @@ function fn_registPopUp(){
window.open(url, "processInspectionPopUp", "width=" + popup_width + ",height=" + popup_height + ",scrollbars=yes,resizable=yes");
}
function fn_openAttachFilePopUp(objId) {
_filePopupOpen = true; // 파일 팝업 열림 플래그 설정
var popup_width = 800;
var popup_height = 300;
var params = "?targetObjId=" + objId + "&docType=PROCESS_INSPECTION_FILE&docTypeName=공정검사첨부";
var url = "/common/FileRegistPopup.do" + params;
var popup = window.open(url, "attachFilePopUp", "width=" + popup_width + ",height=" + popup_height + ",scrollbars=yes,resizable=yes");
// 팝업 닫힘 감지하여 해당 행의 파일 카운트만 업데이트
fn_watchPopupClose(popup, objId, 'ATTACH_FILE_CNT', 'PROCESS_INSPECTION_FILE');
}
</script>
<body>