diff --git a/WebContent/jsp/common/include/portal.jsp b/WebContent/jsp/common/include/portal.jsp index e50f0889..d61eea0c 100644 --- a/WebContent/jsp/common/include/portal.jsp +++ b/WebContent/jsp/common/include/portal.jsp @@ -228,13 +228,16 @@ } // 사업자등록번호 포맷팅 function formatCompanyRegNo(value) { + if (!value) return ''; return value.replace(/(\d{3})(\d{2})(\d{5})/, "$1-$2-$3"); } // 법인등록번호 포맷팅 function formatCorpRegNo(value) { + if (!value) return ''; return value.replace(/(\d{6})(\d{7})/, "$1-$2"); } function removeHyphen(text) { + if (!text) return ''; return text.replace(/-/g, ''); } // 전화번호 포맷팅 (일반전화, 휴대폰, 대표번호 등) diff --git a/WebContent/jsp/onl/apim/portaluser/portalUserManDetail.jsp b/WebContent/jsp/onl/apim/portaluser/portalUserManDetail.jsp index 0926a999..749d9eca 100644 --- a/WebContent/jsp/onl/apim/portaluser/portalUserManDetail.jsp +++ b/WebContent/jsp/onl/apim/portaluser/portalUserManDetail.jsp @@ -218,18 +218,42 @@ /*법인정보 표시*/ function setOrgInfo(portalOrgData) { - $('#orgNameInfo').text(portalOrgData.orgName); - $('#orgCodeInfo').text(portalOrgData.orgCode); - $('#ceoNameInfo').text(portalOrgData.ceoName); - $('#compRegNoInfo').text(formatCompanyRegNo(portalOrgData.compRegNo)); - $('#orgAddrInfo').text(portalOrgData.orgAddr); - $('#corpRegNoInfo').text(formatCorpRegNo(portalOrgData.corpRegNo)); - $('#orgSectorsInfo').text(portalOrgData.orgSectors); - $('#orgStatusDescription').text(portalOrgData.orgStatusDescription); - $('#orgIndustryTypeInfo').text(portalOrgData.orgIndustryType); - $('#orgPhoneNumberInfo').text(formatPhoneDisplay(portalOrgData.orgPhoneNumber)); - $('#serviceNameInfo').text(portalOrgData.serviceName); - $('#scPhoneNumberInfo').text(formatPhoneDisplay(portalOrgData.scPhoneNumber)); + if (portalOrgData.orgName) { + $('#orgNameInfo').text(portalOrgData.orgName); + } + if (portalOrgData.orgCode) { + $('#orgCodeInfo').text(portalOrgData.orgCode); + } + if (portalOrgData.ceoName) { + $('#ceoNameInfo').text(portalOrgData.ceoName); + } + if (portalOrgData.compRegNo) { + $('#compRegNoInfo').text(formatCompanyRegNo(portalOrgData.compRegNo)); + } + if (portalOrgData.orgAddr) { + $('#orgAddrInfo').text(portalOrgData.orgAddr); + } + if (portalOrgData.corpRegNo) { + $('#corpRegNoInfo').text(formatCorpRegNo(portalOrgData.corpRegNo)); + } + if (portalOrgData.orgSectors) { + $('#orgSectorsInfo').text(portalOrgData.orgSectors); + } + if (portalOrgData.orgStatusDescription) { + $('#orgStatusDescription').text(portalOrgData.orgStatusDescription); + } + if (portalOrgData.orgIndustryType) { + $('#orgIndustryTypeInfo').text(portalOrgData.orgIndustryType); + } + if (portalOrgData.orgPhoneNumber) { + $('#orgPhoneNumberInfo').text(formatPhoneDisplay(portalOrgData.orgPhoneNumber)); + } + if (portalOrgData.serviceName) { + $('#serviceNameInfo').text(portalOrgData.serviceName); + } + if (portalOrgData.scPhoneNumber) { + $('#scPhoneNumberInfo').text(formatPhoneDisplay(portalOrgData.scPhoneNumber)); + } } /*파일정보 표시*/