From 5bce83793a2a6b6cb9c04684b45015407afd5c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B1=EC=98=81?= Date: Tue, 18 Nov 2025 13:31:25 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9E=88=EC=8A=A4=ED=86=A0=EB=A6=AC=20?= =?UTF-8?q?=EC=A7=84=ED=96=89=EC=A4=91...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VehicleApiHistoryController.java | 44 ++- .../history/model/CarLedgerFrmbkVO.java | 4 + .../carInspectionPenalty/callApi/inquiry.jsp | 330 ++++++++---------- .../history/basicInfoPopup.jsp | 95 +++++ .../history/ledgerInfoPopup.jsp | 117 +++++++ .../carInspectionPenalty/history/list.jsp | 20 +- .../registration/list.jsp | 49 ++- .../webapp/resources/css/vehicleInfoPopup.css | 232 ++++++++++++ 8 files changed, 699 insertions(+), 192 deletions(-) create mode 100644 src/main/webapp/WEB-INF/views/carInspectionPenalty/history/basicInfoPopup.jsp create mode 100644 src/main/webapp/WEB-INF/views/carInspectionPenalty/history/ledgerInfoPopup.jsp create mode 100644 src/main/webapp/resources/css/vehicleInfoPopup.css diff --git a/src/main/java/go/kr/project/carInspectionPenalty/history/Controller/VehicleApiHistoryController.java b/src/main/java/go/kr/project/carInspectionPenalty/history/Controller/VehicleApiHistoryController.java index 195555e..b0799d7 100644 --- a/src/main/java/go/kr/project/carInspectionPenalty/history/Controller/VehicleApiHistoryController.java +++ b/src/main/java/go/kr/project/carInspectionPenalty/history/Controller/VehicleApiHistoryController.java @@ -86,16 +86,16 @@ public class VehicleApiHistoryController { /** * 자동차 기본정보 조회 이력 상세를 조회합니다. * - * @param carBassMatterInqire 자동차 기본 사항 조회 ID + * @param carBassMatterInqireId 자동차 기본 사항 조회 ID * @return 자동차 기본정보 조회 이력 상세 */ @GetMapping("/carBassMatterInqire/selectOne.ajax") @Operation(summary = "자동차 기본정보 조회 이력 상세 조회", description = "자동차 기본정보 조회 이력 상세를 조회합니다.") public ResponseEntity selectCarBassMatterInqireOne( - @Parameter(description = "자동차 기본 사항 조회 ID") @RequestParam String carBassMatterInqire) { - log.debug("자동차 기본정보 조회 이력 상세 조회 요청 - ID: {}", carBassMatterInqire); + @Parameter(description = "자동차 기본 사항 조회 ID") @RequestParam String carBassMatterInqireId) { + log.debug("자동차 기본정보 조회 이력 상세 조회 요청 - ID: {}", carBassMatterInqireId); - CarBassMatterInqireVO result = service.selectCarBassMatterInqireOne(carBassMatterInqire); + CarBassMatterInqireVO result = service.selectCarBassMatterInqireOne(carBassMatterInqireId); if (result != null) { return ApiResponseUtil.success(result, "조회가 완료되었습니다."); } else { @@ -189,4 +189,40 @@ public class VehicleApiHistoryController { return ApiResponseUtil.error("해당 정보를 찾을 수 없습니다."); } } + + /** + * 자동차 기본정보 조회 팝업 + * + * @param carBassMatterInqireId 자동차 기본 사항 조회 ID + * @param model 모델 객체 + * @return 자동차 기본정보 조회 팝업 화면 + */ + @GetMapping("/carBassMatterInqire/popup.do") + @Operation(summary = "자동차 기본정보 조회 팝업", description = "자동차 기본정보를 조회하는 팝업 화면을 제공합니다.") + public String basicInfoPopup(@RequestParam String carBassMatterInqireId, Model model) { + log.debug("자동차 기본정보 조회 팝업 요청 - ID: {}", carBassMatterInqireId); + CarBassMatterInqireVO result = service.selectCarBassMatterInqireOne(carBassMatterInqireId); + model.addAttribute("data", result); + return "carInspectionPenalty/history/basicInfoPopup" + TilesConstants.POPUP; + } + + /** + * 자동차 등록원부(갑) 조회 팝업 + * + * @param carLedgerFrmbkId 자동차 등록 원부 갑 ID + * @param model 모델 객체 + * @return 자동차 등록원부(갑) 조회 팝업 화면 + */ + @GetMapping("/carLedgerFrmbk/popup.do") + @Operation(summary = "자동차 등록원부(갑) 조회 팝업", description = "자동차 등록원부(갑) 정보를 조회하는 팝업 화면을 제공합니다.") + public String ledgerInfoPopup(@RequestParam String carLedgerFrmbkId, Model model) { + log.debug("자동차 등록원부(갑) 조회 팝업 요청 - ID: {}", carLedgerFrmbkId); + CarLedgerFrmbkVO result = service.selectCarLedgerFrmbkOne(carLedgerFrmbkId); + if (result != null) { + List details = service.selectCarLedgerFrmbkDtlList(carLedgerFrmbkId); + result.setRecord(details); + } + model.addAttribute("data", result); + return "carInspectionPenalty/history/ledgerInfoPopup" + TilesConstants.POPUP; + } } diff --git a/src/main/java/go/kr/project/carInspectionPenalty/history/model/CarLedgerFrmbkVO.java b/src/main/java/go/kr/project/carInspectionPenalty/history/model/CarLedgerFrmbkVO.java index 909645a..0e41307 100644 --- a/src/main/java/go/kr/project/carInspectionPenalty/history/model/CarLedgerFrmbkVO.java +++ b/src/main/java/go/kr/project/carInspectionPenalty/history/model/CarLedgerFrmbkVO.java @@ -5,6 +5,7 @@ import lombok.*; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; +import java.util.List; /** * packageName : go.kr.project.carInspectionPenalty.history.model @@ -268,4 +269,7 @@ public class CarLedgerFrmbkVO { /** 등록자 */ private String rgtr; + + /** 등록원부 변경 이력 */ + private List record; } diff --git a/src/main/webapp/WEB-INF/views/carInspectionPenalty/callApi/inquiry.jsp b/src/main/webapp/WEB-INF/views/carInspectionPenalty/callApi/inquiry.jsp index e89f93d..d67ee2f 100644 --- a/src/main/webapp/WEB-INF/views/carInspectionPenalty/callApi/inquiry.jsp +++ b/src/main/webapp/WEB-INF/views/carInspectionPenalty/callApi/inquiry.jsp @@ -84,7 +84,7 @@ .result-empty { text-align: center; - padding: 40px; + padding: 0px; color: #999; font-size: 14px; } @@ -120,6 +120,22 @@ margin-bottom: 10px; font-weight: bold; border-radius: 4px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.collapse-btn { + cursor: pointer; + font-size: 12px; + font-weight: normal; + padding: 2px 8px; + background-color: rgba(255,255,255,0.2); + border-radius: 3px; +} + +.collapse-btn:hover { + background-color: rgba(255,255,255,0.4); } .result-section-title:first-child { @@ -324,7 +340,39 @@ emdNm: "역삼동", prvntccnt: "0", xportFlflAtSttemntDe: "", - partnRqrcno: "" + partnRqrcno: "", + record: [ + { + mainchk: "Y", + changeJobSeCode: "01", + mainno: "001", + subno: "001", + dtls: "신규등록 - 차량번호: 12가3456, 소유자: 홍길동", + rqrcno: "2021031500001", + vhmno: "V202103150001", + ledgerGroupNo: "1234567890", + ledgerIndvdlzNo: "001", + gubunNm: "신규", + changeDe: "20210315", + detailSn: "001", + flag: "N" + }, + { + mainchk: "N", + changeJobSeCode: "02", + mainno: "001", + subno: "002", + dtls: "주소변경 - 이전: 서울특별시 강남구 역삼동 123 -> 변경: 서울특별시 강남구 테헤란로 123", + rqrcno: "2022012000001", + vhmno: "V202103150001", + ledgerGroupNo: "1234567890", + ledgerIndvdlzNo: "001", + gubunNm: "변경", + changeDe: "20220120", + detailSn: "002", + flag: "N" + } + ] } }; }, @@ -667,36 +715,41 @@ * 통합 조회 결과 표시 */ displayIntegratedResult: function(data) { + if (!data || (!data.basicInfo && !data.ledgerInfo)) { + $("#resultContent").html('
조회된 데이터가 없습니다.
'); + return; + } + var html = ''; - // 기본 정보 - displayBasicResult와 동일하게 모든 필드 표시 if (data.basicInfo) { - html += '
자동차 기본사항 정보 (전체 필드)
'; - html += ''; - html += ''; - // BasicResponse의 모든 90개 필드 표시 - html += this.getBasicInfoTableRows(data.basicInfo); - html += '
'; + html += this.getBasicInfoHtml(data.basicInfo); } - // 등록원부 정보 - displayLedgerResult와 동일하게 모든 필드 표시 if (data.ledgerInfo) { - html += '
자동차 등록원부 정보 (전체 필드)
'; - html += ''; - html += ''; - // LedgerResponse의 모든 44개 필드 표시 - html += this.getLedgerInfoTableRows(data.ledgerInfo); - html += '
'; + html += this.getLedgerInfoHtml(data.ledgerInfo); } $("#resultContent").html(html); }, /** - * BasicInfo 테이블 행 생성 (90개 필드) + * 기본사항 조회 결과 표시 */ - getBasicInfoTableRows: function(data) { - var html = ''; + displayBasicResult: function(data) { + var html = this.getBasicInfoHtml(data); + $("#resultContent").html(html); + }, + + /** + * 기본사항 조회 결과 HTML 생성 + */ + getBasicInfoHtml: function(data) { + var html = '
자동차 기본사항 정보[접기]
'; + html += '
'; + html += ''; + html += ''; + html += ''; html += ''; html += ''; @@ -781,11 +834,73 @@ html += ''; html += ''; html += ''; + html += '
생산년도' + this.nvl(data.prye) + '등록일자' + this.nvl(data.registDe) + '
말소등록구분코드' + this.nvl(data.ersrRegistSeCode) + '최초최대적재량' + this.nvl(data.frstMxmmLdg) + '
연료소비율' + this.nvl(data.fuelCnsmpRt) + '전기복합연료소비율' + this.nvl(data.elctyCmpndFuelCnsmpRt) + '
'; + html += '
'; return html; }, /** - * LedgerInfo 테이블 행 생성 (44개 필드) + * 등록원부 조회 결과 표시 + */ + displayLedgerResult: function(data) { + var html = this.getLedgerInfoHtml(data); + $("#resultContent").html(html); + }, + + /** + * 등록원부 조회 결과 HTML 생성 + */ + getLedgerInfoHtml: function(data) { + var html = '
자동차 등록원부 정보[접기]
'; + html += '
'; + html += ''; + html += ''; + html += this.getLedgerInfoTableRows(data); + html += '
'; + html += '
'; + + if (data.record && data.record.length > 0) { + html += '
등록원부 변경 이력 (' + data.record.length + '건)[접기]
'; + html += '
'; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + for (var i = 0; i < data.record.length; i++) { + var rec = data.record[i]; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + } + + html += ''; + html += '
번호메인체크변경작업구분코드주번호부번호구분명변경일자원부그룹번호원부개별번호신청번호차량관리번호상세내역상세일련번호플래그
' + (i + 1) + '' + this.nvl(rec.mainchk) + '' + this.nvl(rec.changeJobSeCode) + '' + this.nvl(rec.mainno) + '' + this.nvl(rec.subno) + '' + this.nvl(rec.gubunNm) + '' + this.nvl(rec.changeDe) + '' + this.nvl(rec.ledgerGroupNo) + '' + this.nvl(rec.ledgerIndvdlzNo) + '' + this.nvl(rec.rqrcno) + '' + this.nvl(rec.vhmno) + '' + this.nvl(rec.dtls) + '' + this.nvl(rec.detailSn) + '' + this.nvl(rec.flag) + '
'; + html += '
'; + } + return html; + }, + + /** + * LedgerInfo 테이블 행 생성 */ getLedgerInfoTableRows: function(data) { var html = ''; @@ -852,166 +967,6 @@ return html; }, - /** - * 기본사항 조회 결과 표시 - */ - displayBasicResult: function(data) { - var html = '
자동차 기본사항 정보 (전체 필드)
'; - html += ''; - html += ''; - - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += '
생산년도' + this.nvl(data.prye) + '등록일자' + this.nvl(data.registDe) + '
말소등록구분코드' + this.nvl(data.ersrRegistSeCode) + '말소등록구분명' + this.nvl(data.ersrRegistSeNm) + '
말소등록일자' + this.nvl(data.ersrRegistDe) + '등록상세코드' + this.nvl(data.registDetailCode) + '
배기량' + this.nvl(data.dsplvl) + '사용본거지법정동코드' + this.nvl(data.useStrnghldLegaldongCode) + '
사용본거지행정동코드' + this.nvl(data.useStrnghldAdstrdCode) + '사용본거지산' + this.nvl(data.useStrnghldMntn) + '
사용본거지번지' + this.nvl(data.useStrnghldLnbr) + '사용본거지호' + this.nvl(data.useStrnghldHo) + '
사용본거지주소명' + this.nvl(data.useStrnghldAdresNm) + '사용본거지도로명코드' + this.nvl(data.useStrnghldRoadNmCode) + '
사용본거지지하건물구분코드' + this.nvl(data.usgsrhldUndgrndBuldSeCode) + '사용본거지건물본번' + this.nvl(data.useStrnghldBuldMainNo) + '
사용본거지건물부번' + this.nvl(data.useStrnghldBuldSubNo) + '사용본거지우편번호코드' + this.nvl(data.useStrnghldGrcCode) + '
사용본거지주소전체' + this.nvl(data.usgsrhldAdresFull) + '
소유자구분코드' + this.nvl(data.mberSeCode) + '소유자명' + this.nvl(data.mberNm) + '
소유자구분번호' + this.nvl(data.mberSeNo) + '전화번호' + this.nvl(data.telno) + '
소유자법정동코드' + this.nvl(data.ownerLegaldongCode) + '소유자행정동코드' + this.nvl(data.ownerAdstrdCode) + '
소유자산' + this.nvl(data.ownerMntn) + '소유자번지' + this.nvl(data.ownerLnbr) + '
소유자호' + this.nvl(data.ownerHo) + '소유자주소명' + this.nvl(data.ownerAdresNm) + '
소유자도로명코드' + this.nvl(data.ownerRoadNmCode) + '소유자지하건물구분코드' + this.nvl(data.ownerUndgrndBuldSeCode) + '
소유자건물본번' + this.nvl(data.ownerBuldMainNo) + '소유자건물부번' + this.nvl(data.ownerBuldSubNo) + '
소유자주소전체' + this.nvl(data.ownerAdresFull) + '
변경후차량번호' + this.nvl(data.aftrVhrno) + '사용연료코드' + this.nvl(data.useFuelCode) + '
용도구분코드' + this.nvl(data.prposSeCode) + '제작사명' + this.nvl(data.mtrsFomNm) + '
변경전차량번호' + this.nvl(data.frntVhrno) + '차량번호' + this.nvl(data.vhrno) + '
차대번호' + this.nvl(data.vin) + '차명' + this.nvl(data.cnm) + '
차량총중량' + this.nvl(data.vhcleTotWt) + '자동차보험종료일자' + this.nvl(data.caagEndde) + '
변경일자' + this.nvl(data.changeDe) + '차종분류코드' + this.nvl(data.vhctyAsortCode) + '
차종유형코드' + this.nvl(data.vhctyTyCode) + '차종구분코드' + this.nvl(data.vhctySeCode) + '
최대적재량' + this.nvl(data.mxmmLdg) + '차종분류명' + this.nvl(data.vhctyAsortNm) + '
차종유형명' + this.nvl(data.vhctyTyNm) + '차종구분명' + this.nvl(data.vhctySeNm) + '
최초등록일자' + this.nvl(data.frstRegistDe) + '형식명' + this.nvl(data.fomNm) + '
취득일자' + this.nvl(data.acqsDe) + '취득종료일자' + this.nvl(data.acqsEndDe) + '
연식월' + this.nvl(data.yblMd) + '이전등록일자' + this.nvl(data.transrRegistDe) + '
특정등록상태코드' + this.nvl(data.spcfRegistSttusCode) + '색상명' + this.nvl(data.colorNm) + '
저당건수' + this.nvl(data.mrtgCo) + '압류건수' + this.nvl(data.seizrCo) + '
압인건수' + this.nvl(data.stmdCo) + '번호판보관여부' + this.nvl(data.nmplCsdyAt) + '
번호판보관반납일자' + this.nvl(data.nmplCsdyRemnrDe) + '원산지구분코드' + this.nvl(data.originSeCode) + '
번호판규격코드' + this.nvl(data.nmplStndrdCode) + '취득금액' + this.nvl(data.acqsAmount) + '
검사유효기간시작일자' + this.nvl(data.insptValidPdBgnde) + '검사유효기간종료일자' + this.nvl(data.insptValidPdEndde) + '
화물차승차정원수' + this.nvl(data.tkcarPscapCo) + '사양번호' + this.nvl(data.spmnno) + '
주행거리' + this.nvl(data.trvlDstnc) + '최초등록신청번호' + this.nvl(data.frstRegistRqrcno) + '
자진말소예방공지일자' + this.nvl(data.vlntErsrPrvntcNticeDe) + '등록기관명' + this.nvl(data.registInsttNm) + '
처리불가사유코드' + this.nvl(data.processImprtyResnCode) + '처리불가사유상세' + this.nvl(data.processImprtyResnDtls) + '
차체길이' + this.nvl(data.cbdLt) + '차체너비' + this.nvl(data.cbdBt) + '
차체높이' + this.nvl(data.cbdHg) + '최초최대적재량' + this.nvl(data.frstMxmmLdg) + '
연료소비율' + this.nvl(data.fuelCnsmpRt) + '전기복합연료소비율' + this.nvl(data.elctyCmpndFuelCnsmpRt) + '
'; - - $("#resultContent").html(html); - }, - - /** - * 등록원부 조회 결과 표시 - */ - displayLedgerResult: function(data) { - var html = '
등록원부 기본 정보 (전체 필드)
'; - html += ''; - html += ''; - // LedgerResponse의 모든 44개 필드 표시 - html += this.getLedgerInfoTableRows(data); - html += '
'; - - // 등록원부 변경 이력 (record 리스트) - 12개 필드 모두 표시 - if (data.record && data.record.length > 0) { - html += '
등록원부 변경 이력 (' + data.record.length + '건) - 전체 필드
'; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - - for (var i = 0; i < data.record.length; i++) { - var rec = data.record[i]; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += ''; - } - - html += ''; - html += '
번호메인체크변경작업구분코드주번호부번호구분명변경일자원부그룹번호원부개별번호신청번호차량관리번호상세내역상세일련번호플래그
' + (i + 1) + '' + this.nvl(rec.mainchk) + '' + this.nvl(rec.changeJobSeCode) + '' + this.nvl(rec.mainno) + '' + this.nvl(rec.subno) + '' + this.nvl(rec.gubunNm) + '' + this.nvl(rec.changeDe) + '' + this.nvl(rec.ledgerGroupNo) + '' + this.nvl(rec.ledgerIndvdlzNo) + '' + this.nvl(rec.rqrcno) + '' + this.nvl(rec.vhmno) + '' + this.nvl(rec.dtls) + '' + this.nvl(rec.detailSn) + '' + this.nvl(rec.flag) + '
'; - } - - $("#resultContent").html(html); - }, - /** * null 값 처리 */ @@ -1078,6 +1033,21 @@ self.displayLedgerResult(sampleData); $("#btnResultClose").show(); }); + + // 섹션 접기/펼치기 이벤트 + $("#resultContent").on('click', '.collapsible-title', function() { + var targetId = $(this).data('target'); + var $content = $(targetId); + var $btn = $(this).find('.collapse-btn'); + + $content.slideToggle('fast', function() { + if ($content.is(':visible')) { + $btn.text('[접기]'); + } else { + $btn.text('[펼치기]'); + } + }); + }); }, /** diff --git a/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/basicInfoPopup.jsp b/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/basicInfoPopup.jsp new file mode 100644 index 0000000..12378b9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/basicInfoPopup.jsp @@ -0,0 +1,95 @@ +<%-- + ~ Copyright (c) 2024. + ~ + ~ @author : wck + ~ @date : 2024-11-18 + ~ @description : 차량기본정보 상세 팝업 + ~ + ~ ----------------------------------------------------------------------------------------------------------------- + ~ Date | author | description + ~ ----------------------------------------------------------------------------------------------------------------- + ~ 2024-11-18 wck 최초 생성 + ~ ----------------------------------------------------------------------------------------------------------------- + ~ + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%-- + 참고: 이 JSP의 구조는 'IBMS_NEW' 프로젝트의 참조 파일 없이 'vehicleInfoPopup.js'를 기반으로 생성된 임시 placeholder입니다. + 요청에 따라 정확한 HTML/CSS 구조를 적용하기 위해서는 원본 프로젝트('IBMS_NEW')의 JSP 파일 내용이 필요합니다. +--%> + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/ledgerInfoPopup.jsp b/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/ledgerInfoPopup.jsp new file mode 100644 index 0000000..f1c4185 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/ledgerInfoPopup.jsp @@ -0,0 +1,117 @@ +<%-- + ~ Copyright (c) 2024. + ~ + ~ @author : wck + ~ @date : 2024-11-18 + ~ @description : 차량등록원부(갑) 상세 팝업 + ~ + ~ ----------------------------------------------------------------------------------------------------------------- + ~ Date | author | description + ~ ----------------------------------------------------------------------------------------------------------------- + ~ 2024-11-18 wck 최초 생성 + ~ ----------------------------------------------------------------------------------------------------------------- + ~ + --%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%-- + 참고: 이 JSP의 구조는 'IBMS_NEW' 프로젝트의 참조 파일 없이 'vehicleInfoPopup.js'를 기반으로 생성된 임시 placeholder입니다. + 요청에 따라 정확한 HTML/CSS 구조를 적용하기 위해서는 원본 프로젝트('IBMS_NEW')의 JSP 파일 내용이 필요합니다. +--%> + + + diff --git a/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/list.jsp b/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/list.jsp index 3e8db10..882a5b5 100644 --- a/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/list.jsp +++ b/src/main/webapp/WEB-INF/views/carInspectionPenalty/history/list.jsp @@ -460,8 +460,14 @@ // 더블클릭 이벤트 this.instance.on('dblclick', function(ev) { var rowData = self.instance.getRow(ev.rowKey); - if (rowData) { - VehicleApiHistoryList.showDetailModalBasic(rowData.carBassMatterInqireId); + if (rowData && rowData.carBassMatterInqireId) { + // 공통 팝업 모듈 사용 + if (window.VehicleInfoPopup) { + window.VehicleInfoPopup.openBasicInfoPopup(rowData.carBassMatterInqireId); + } else { + // 공통 모듈 로드 전 fallback + VehicleApiHistoryList.showDetailModalBasic(rowData.carBassMatterInqireId); + } } }); } @@ -649,8 +655,14 @@ // 더블클릭 이벤트 this.instance.on('dblclick', function(ev) { var rowData = self.instance.getRow(ev.rowKey); - if (rowData) { - VehicleApiHistoryList.showDetailModalLedger(rowData.carLedgerFrmbkId); + if (rowData && rowData.carLedgerFrmbkId) { + // 공통 팝업 모듈 사용 + if (window.VehicleInfoPopup) { + window.VehicleInfoPopup.openLedgerInfoPopup(rowData.carLedgerFrmbkId); + } else { + // 공통 모듈 로드 전 fallback + VehicleApiHistoryList.showDetailModalLedger(rowData.carLedgerFrmbkId); + } } }); } diff --git a/src/main/webapp/WEB-INF/views/carInspectionPenalty/registration/list.jsp b/src/main/webapp/WEB-INF/views/carInspectionPenalty/registration/list.jsp index 69195ba..637bdfa 100644 --- a/src/main/webapp/WEB-INF/views/carInspectionPenalty/registration/list.jsp +++ b/src/main/webapp/WEB-INF/views/carInspectionPenalty/registration/list.jsp @@ -10,7 +10,7 @@
과태료 대상 목록
- + @@ -339,8 +339,30 @@ } }, { header: '비고', name: 'rmrk', align: 'left', width: 200 }, - { header: '차량기본사항조회ID', name: 'carBassMatterInqireId', align: 'center', width: 150 }, - { header: '차량등록원부ID', name: 'carLedgerFrmbkId', align: 'center', width: 150 }, + { + header: '차량기본사항조회ID', + name: 'carBassMatterInqireId', + align: 'center', + width: 150, + formatter: function(e) { + if (e.value) { + return '' + e.value + ''; + } + return ''; + } + }, + { + header: '차량등록원부ID', + name: 'carLedgerFrmbkId', + align: 'center', + width: 150, + formatter: function(e) { + if (e.value) { + return '' + e.value + ''; + } + return ''; + } + }, { header: '등록일시', name: 'regDt', align: 'center', width: 150 }, { header: '등록자ID', name: 'rgtr', align: 'center', width: 100, hidden: true }, { header: '등록자', name: 'rgtrNm', align: 'center', width: 100 }, @@ -676,7 +698,6 @@ }, error: function(xhr, status, error) { console.error("API 호출 실패:", error); - alert("API 호출 중 오류가 발생했습니다."); } }); } @@ -689,4 +710,24 @@ })(window, jQuery); + /** + * 차량 기본정보 팝업 열기 (전역 함수) + */ + function openBasicPopup(carBassMatterInqireId) { + console.log(carBassMatterInqireId); + var popupUrl = '?carBassMatterInqireId=' + encodeURIComponent(carBassMatterInqireId); + var popup = openPopup(popupUrl, 800, 450, 'carBassMatterInqirePopup'); + } + + /** + * 차량 등록원부 팝업 열기 (전역 함수) + */ + function openLedgerPopup(carLedgerFrmbkId) { + console.log(carLedgerFrmbkId); + var popupUrl = '?carLedgerFrmbkId=' + encodeURIComponent(carLedgerFrmbkId); + var popup = openPopup(popupUrl, 800, 450, 'carLedgerFrmbkPopup'); + } + diff --git a/src/main/webapp/resources/css/vehicleInfoPopup.css b/src/main/webapp/resources/css/vehicleInfoPopup.css new file mode 100644 index 0000000..a86d251 --- /dev/null +++ b/src/main/webapp/resources/css/vehicleInfoPopup.css @@ -0,0 +1,232 @@ +/** + * Vehicle Info Popup Common CSS + * 차량 정보 팝업 공통 스타일 + */ + +/* 팝업 모달 스타일 */ +.vehicle-info-modal .modal-dialog { + max-width: 90%; + margin: 1.75rem auto; +} + +.vehicle-info-modal .modal-content { + border-radius: 8px; +} + +.vehicle-info-modal .modal-header { + background-color: #f8f9fa; + border-bottom: 2px solid #dee2e6; + padding: 1rem 1.5rem; +} + +.vehicle-info-modal .modal-title { + font-weight: 600; + color: #333; + font-size: 1.25rem; +} + +.vehicle-info-modal .modal-body { + padding: 1.5rem; + max-height: calc(100vh - 200px); + overflow-y: auto; +} + +.vehicle-info-modal .modal-footer { + border-top: 1px solid #dee2e6; + padding: 1rem 1.5rem; +} + +/* 차량 정보 테이블 스타일 */ +.vehicle-info-table { + width: 100%; + border-collapse: collapse; + margin-bottom: 1.5rem; + background-color: #fff; + font-size: 14px; +} + +.vehicle-info-table th, +.vehicle-info-table td { + padding: 10px 12px; + border: 1px solid #dee2e6; + text-align: left; + vertical-align: middle; +} + +.vehicle-info-table th { + background-color: #f1f3f5; + font-weight: 600; + color: #495057; + width: 20%; + white-space: nowrap; +} + +.vehicle-info-table td { + background-color: #fff; + color: #212529; + width: 30%; +} + +/* 테이블 행 호버 효과 */ +.vehicle-info-table tbody tr:hover { + background-color: #f8f9fa; +} + +/* 빈 값 스타일 */ +.vehicle-info-table td:empty::before { + content: "-"; + color: #adb5bd; +} + +/* 변경 이력 테이블 스타일 */ +.vehicle-history-section { + margin-top: 2rem; + padding-top: 1.5rem; + border-top: 2px solid #dee2e6; +} + +.vehicle-history-section h5 { + font-weight: 600; + color: #333; + margin-bottom: 1rem; + font-size: 1.1rem; +} + +.vehicle-history-table { + width: 100%; + border-collapse: collapse; + background-color: #fff; + font-size: 13px; + table-layout: auto; +} + +.vehicle-history-table th, +.vehicle-history-table td { + padding: 8px 10px; + border: 1px solid #dee2e6; + text-align: center; + vertical-align: middle; + white-space: nowrap; +} + +.vehicle-history-table th { + background-color: #e9ecef; + font-weight: 600; + color: #495057; + position: sticky; + top: 0; + z-index: 10; +} + +.vehicle-history-table td { + background-color: #fff; + color: #212529; +} + +/* 변경 이력 테이블 행 호버 */ +.vehicle-history-table tbody tr:hover { + background-color: #f8f9fa; +} + +/* 변경 이력 테이블 스크롤 컨테이너 */ +.vehicle-history-wrapper { + max-height: 400px; + overflow-y: auto; + overflow-x: auto; + border: 1px solid #dee2e6; + border-radius: 4px; + margin-top: 0.5rem; +} + +/* 변경 이력 없을 때 */ +.no-history-message { + text-align: center; + padding: 2rem; + color: #6c757d; + font-style: italic; +} + +/* 로딩 스피너 */ +.vehicle-info-loading { + text-align: center; + padding: 3rem; +} + +.vehicle-info-loading .spinner-border { + width: 3rem; + height: 3rem; + border-width: 0.3rem; +} + +/* 에러 메시지 */ +.vehicle-info-error { + text-align: center; + padding: 2rem; + color: #dc3545; +} + +.vehicle-info-error i { + font-size: 3rem; + margin-bottom: 1rem; +} + +/* 반응형 디자인 */ +@media (max-width: 768px) { + .vehicle-info-modal .modal-dialog { + max-width: 95%; + margin: 0.5rem auto; + } + + .vehicle-info-table th { + width: 30%; + } + + .vehicle-info-table td { + width: 70%; + } + + .vehicle-info-table, + .vehicle-history-table { + font-size: 12px; + } + + .vehicle-info-table th, + .vehicle-info-table td, + .vehicle-history-table th, + .vehicle-history-table td { + padding: 6px 8px; + } +} + +/* 작은 화면에서 테이블 스크롤 */ +@media (max-width: 576px) { + .vehicle-info-modal .modal-dialog { + max-width: 100%; + margin: 0; + } + + .vehicle-info-table { + display: block; + overflow-x: auto; + white-space: nowrap; + } +} + +/* 데이터 강조 */ +.vehicle-info-table .highlight-data { + font-weight: 600; + color: #0d6efd; +} + +/* 날짜 데이터 스타일 */ +.vehicle-info-table .date-data { + color: #6c757d; +} + +/* 코드 데이터 스타일 */ +.vehicle-info-table .code-data { + font-family: 'Courier New', monospace; + background-color: #f8f9fa; + padding: 2px 6px; + border-radius: 3px; +}