수입검사관리 검색조건, 파트 상세창 등 수정

This commit is contained in:
2025-12-05 18:25:15 +09:00
parent a3b916eded
commit c2e48f4cbb
4 changed files with 65 additions and 18 deletions

View File

@@ -72,8 +72,11 @@ $(document).ready(function(){
fnc_getJsonAllDataListBySqlId({"sqlId": "common.getUserselect"})
);
// 오늘 날짜 기본 설정
if($("#INSPECTION_DATE").val() == ''){
// 검사일 기본 설정 (저장된 값 없으면 오늘 날짜)
var savedInspectionDate = "${info.inspection_date}";
if(savedInspectionDate != '' && savedInspectionDate != 'null'){
$("#INSPECTION_DATE").val(savedInspectionDate);
} else if($("#INSPECTION_DATE").val() == ''){
$("#INSPECTION_DATE").val("${today}");
}
@@ -159,10 +162,24 @@ function editCheckInspection(cell) {
return rowData.INSPECTION_YN === '검사';
}
// 품목상세 팝업
function fn_openPartDetailPopUp(partObjId) {
if (!partObjId) return;
var popup_width = 1200;
var popup_height = 900;
var url = "/partMng/partMngDetailPopUp.do?OBJID=" + partObjId;
window.open(url, "partMngDetailPopUp", "width=" + popup_width + ",height=" + popup_height + ",scrollbars=yes,resizable=yes");
}
function fn_search() {
var columns = [
//{formatter:"rowSelection", titleFormatter:"rowSelection", hozAlign:"center", headerSort:false, width:30},
{title:'품번', field:'PART_NO', headerHozAlign:'center', hozAlign:'left', width:180, editor:false},
{title:'품번', field:'PART_NO', headerHozAlign:'center', hozAlign:'left', width:180, editor:false,
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell) {
fn_openPartDetailPopUp(cell.getData().PART_OBJID);
}
},
{title:'품명', field:'PART_NAME', headerHozAlign:'center', hozAlign:'left', width:180, editor:false},
{title:'입고일', field:'DELIVERY_DATE', headerHozAlign:'center', hozAlign:'center', width:100, editor:false},
{title:'입고수량', field:'DELIVERY_QTY', headerHozAlign:'center', hozAlign:'right', width:80, editor:false,

View File

@@ -239,22 +239,23 @@ function fn_excelDownload(){
<td><label for="">프로젝트번호</label></td>
<td>
<select name="project_no" id="project_no" style="width:200px;" class="select2" autocomplete="off" multiple="multiple">
<select name="project_no" id="project_no" style="width:210px;" class="select2" autocomplete="off" multiple="multiple">
<option value="">선택</option>
${code_map.project_no}
</select>
</td>
<td><label for="">품번</label></td>
<td><input type="text" name="search_part_no" id="search_part_no" style="width:120px;" autocomplete="off" value="${param.search_part_no}"></td>
<td><input type="text" name="search_part_no" id="search_part_no" style="width:170px;" autocomplete="off" value="${param.search_part_no}"></td>
<td><label for="">품명</label></td>
<td><input type="text" name="search_part_name" id="search_part_name" style="width:120px;" autocomplete="off" value="${param.search_part_name}"></td>
<td><input type="text" name="search_part_name" id="search_part_name" style="width:170px;" autocomplete="off" value="${param.search_part_name}"></td>
<td><label for="">공급업체</label></td>
<td><select name="search_partner" id="search_partner" class="select2" autocomplete="off" style="width:250px;"><option value="">선택</option>${code_map.partner_objid}</select></td>
</tr>
<tr>
<td><label for="">공급업체</label></td>
<td><select name="partner_objid" id="partner_objid" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.partner_objid}</select></td>
<td><label for="">입고결과</label></td>
<td>
<select name="search_delivery_status" id="search_delivery_status" class="select2" autocomplete="off" style="width:120px;">
@@ -265,11 +266,14 @@ function fn_excelDownload(){
</td>
<td><label for="">검사자</label></td>
<td><select name="inspector_id" id="inspector_id" class="select2" autocomplete="off" style="width:200px;"><option value="">선택</option>${code_map.inspector_id}</select></td>
<td><label for="">검사일</label></td>
<td><input type="text" name="search_inspection_date" id="search_inspection_date" class="date_icon" style="width:120px;" autocomplete="off" value="${param.search_inspection_date}"></td>
<td><select name="inspector_id" id="inspector_id" class="select2" autocomplete="off" style="width:120px;"><option value="">선택</option>${code_map.inspector_id}</select></td>
<td class=""><label>검사일</label></td>
<td>
<input type="text" name="inspection_start_date" id="inspection_start_date" style="width:100px;" autocomplete="off" value="${param.inspection_start_date}" class="date_icon">~
<input type="text" name="inspection_end_date" id="inspection_end_date" style="width:100px;" autocomplete="off" value="${param.inspection_end_date }" class="date_icon">
</td>
<td><label for="">검사결과</label></td>
<td>
<select name="search_inspection_result" id="search_inspection_result" class="select2" autocomplete="off" style="width:120px;">

View File

@@ -272,8 +272,8 @@ public class QualityController {
try {
// 프로젝트번호
code_map.put("project_no", commonService.bizMakeOptionList("", (String)paramMap.get("project_no"), "common.getProjectNameList"));
// 공급업체
code_map.put("partner_objid", commonService.bizMakeOptionList("", (String)paramMap.get("partner_objid"), "common.getmatersupplyselect"));
// 공급업체 (CLIENT_MNG)
code_map.put("partner_objid", commonService.bizMakeOptionList("", (String)paramMap.get("partner_objid"), "common.getClientMngSupplySelect"));
// 검사자
code_map.put("inspector_id", commonService.bizMakeOptionList("", (String)paramMap.get("inspector_id"), "common.getUserselect"));
@@ -319,8 +319,8 @@ public class QualityController {
// 기존 검사 정보 조회 (검사자, 검사일 가져오기)
Map info = service.getIncomingInspectionDetailInfo(paramMap);
String savedInspectorId = "";
if(info != null && info.get("INSPECTOR_ID") != null) {
savedInspectorId = (String) info.get("INSPECTOR_ID");
if(info != null && info.get("inspector_id") != null) {
savedInspectorId = (String) info.get("inspector_id");
request.setAttribute("info", info);
} else {
// 저장된 값 없으면 로그인 사용자로 기본 설정

View File

@@ -761,11 +761,37 @@
AND UPPER((SELECT CLIENT_NM FROM CLIENT_MNG WHERE OBJID::VARCHAR = POM.PARTNER_OBJID)) LIKE UPPER('%' || #{search_partner_name} || '%')
</if>
<if test="search_delivery_status != null and search_delivery_status != ''">
AND (CASE WHEN 0 <![CDATA[ >= ]]> ((SELECT SUM(REAL_ORDER_QTY::NUMERIC) FROM PURCHASE_ORDER_PART AS O WHERE POM.OBJID::VARCHAR = O.PURCHASE_ORDER_MASTER_OBJID) - COALESCE(S1.TOTAL_DELIVERY_QTY, 0)) THEN '입고완료'
AND (CASE WHEN 0 <![CDATA[ >= ]]> ((SELECT SUM(ORDER_QTY::NUMERIC) FROM PURCHASE_ORDER_PART AS O WHERE POM.OBJID::VARCHAR = O.PURCHASE_ORDER_MASTER_OBJID) - COALESCE(S1.TOTAL_DELIVERY_QTY, 0)) THEN '입고완료'
WHEN TO_CHAR(NOW(),'YYYY-MM-DD') <![CDATA[ > ]]> POM.DELIVERY_DATE THEN '지연'
ELSE '입고중'
END) = #{search_delivery_status}
</if>
<!-- 프로젝트번호 (multi select) -->
<if test="project_nos != null and project_nos != ''">
AND CM.PROJECT_NO IN
<foreach item="item" collection="project_nos.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!-- 검사자 -->
<if test="inspector_id != null and inspector_id != ''">
AND IID.INSPECTOR_ID = #{inspector_id}
</if>
<!-- 검사일 (시작) -->
<if test="inspection_start_date != null and inspection_start_date != ''">
AND IID.INSPECTION_DATE <![CDATA[ >= ]]> #{inspection_start_date}
</if>
<!-- 검사일 (종료) -->
<if test="inspection_end_date != null and inspection_end_date != ''">
AND IID.INSPECTION_DATE <![CDATA[ <= ]]> #{inspection_end_date}
</if>
<!-- 검사결과 -->
<if test="search_inspection_result != null and search_inspection_result != ''">
AND (CASE WHEN IID.NG_COUNT > 0 THEN 'NG'
WHEN IID.TOTAL_COUNT > 0 AND IID.TOTAL_COUNT = IID.INSPECTED_COUNT THEN 'OK'
WHEN IID.INSPECTED_COUNT > 0 THEN '검사중'
ELSE '' END) = #{search_inspection_result}
</if>
ORDER BY POM.REGDATE DESC
</select>