diff --git a/src/components/Modal/HWModal.ts b/src/components/Modal/HWModal.ts index 9a9fce4..511b007 100644 --- a/src/components/Modal/HWModal.ts +++ b/src/components/Modal/HWModal.ts @@ -28,6 +28,10 @@ const HW_MODAL_HTML = ` +
+ + +
@@ -189,6 +193,7 @@ function fillHwFormData(asset: HardwareAsset) { (document.getElementById('hw-RAM') as HTMLInputElement).value = asset.RAM || ''; (document.getElementById('hw-SSD1') as HTMLInputElement).value = asset.SSD1 || ''; (document.getElementById('hw-SSD2') as HTMLInputElement).value = asset.SSD2 || ''; + (document.getElementById('hw-구매일') as HTMLInputElement).value = asset.구매일 || ''; (document.getElementById('hw-담당자_정') as HTMLInputElement).value = asset.담당자_정 || asset.관리자 || ''; (document.getElementById('hw-담당자_부') as HTMLInputElement).value = asset.담당자_부 || ''; (document.getElementById('hw-품의서명') as HTMLElement).textContent = asset.품의서명 || ''; @@ -289,6 +294,7 @@ export function initHwModal() { RAM: (document.getElementById('hw-RAM') as HTMLInputElement).value, SSD1: (document.getElementById('hw-SSD1') as HTMLInputElement).value, SSD2: (document.getElementById('hw-SSD2') as HTMLInputElement).value, + 구매일: (document.getElementById('hw-구매일') as HTMLInputElement).value, 담당자_정: (document.getElementById('hw-담당자_정') as HTMLInputElement).value, 관리자: (document.getElementById('hw-담당자_정') as HTMLInputElement).value, 담당자_부: (document.getElementById('hw-담당자_부') as HTMLInputElement).value, diff --git a/src/core/realServerData.ts b/src/core/realServerData.ts index ead448d..c071f14 100644 --- a/src/core/realServerData.ts +++ b/src/core/realServerData.ts @@ -609,7 +609,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "NAS", "용도": "GSIM NAS", @@ -629,7 +629,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "NAS", "용도": "그래픽스개발팀 데이터 백업 NAS", @@ -649,7 +649,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "공통 GIT 서버", @@ -669,7 +669,7 @@ export const realServerData = [ "SSD2": "1TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "BUILD 서버", @@ -689,7 +689,7 @@ export const realServerData = [ "SSD2": "10TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "HmEG 테스트 서버", @@ -709,7 +709,7 @@ export const realServerData = [ "SSD2": "1TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "산하 ERP 개발서버", @@ -729,7 +729,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "공간정보 신청", @@ -749,7 +749,7 @@ export const realServerData = [ "SSD2": "931GB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "AI 관련", @@ -769,7 +769,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "한종 테스트", @@ -789,7 +789,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "GSIM 언리얼 서버", @@ -809,7 +809,7 @@ export const realServerData = [ "SSD2": "8TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "AutoCAD 테스트 서버", @@ -829,7 +829,7 @@ export const realServerData = [ "SSD2": "2TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "GSIM 테스트 서버", @@ -849,7 +849,7 @@ export const realServerData = [ "SSD2": "512GB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "공간데이터 서버", @@ -869,7 +869,7 @@ export const realServerData = [ "SSD2": "8 TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "PC", "용도": "가평 VM 원격 서버", @@ -889,7 +889,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "서버", "용도": "GSIM 협업", @@ -909,7 +909,7 @@ export const realServerData = [ "SSD2": "1.88TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "스토리지", "용도": "GSIM 협업 스토리지", @@ -929,7 +929,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "서버", "용도": "GSIM META 서버", @@ -949,7 +949,7 @@ export const realServerData = [ "SSD2": "4TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "서버", "용도": "GSIM 서버", @@ -969,7 +969,7 @@ export const realServerData = [ "SSD2": "4TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "스토리지", "용도": "GSIM 스토리지", @@ -989,7 +989,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "서버", "용도": "함양-합천 서버", @@ -1009,7 +1009,7 @@ export const realServerData = [ "SSD2": "10TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "서버", "용도": "HM MapService 2.0 서버", @@ -1029,7 +1029,7 @@ export const realServerData = [ "SSD2": "40 TB" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "스토리지", "용도": "HM MapService 2.0 스토리지", @@ -1049,7 +1049,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "서버", "용도": "Gitlab Runner", @@ -1069,7 +1069,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "기술개발센터", + "법인": "", "자산코드": "", "storage유형": "서버", "용도": "전산모사", @@ -1089,7 +1089,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "1", "storage유형": "NAS", "용도": "NAS 2", @@ -1105,7 +1105,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "2", "storage유형": "NAS", "용도": "NAS 1", @@ -1121,7 +1121,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "3", "storage유형": "NAS", "용도": "NAS 4", @@ -1137,7 +1137,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "4", "storage유형": "NAS", "용도": "NAS 5", @@ -1153,7 +1153,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "5", "storage유형": "NAS", "용도": "NAS 6", @@ -1169,7 +1169,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "6", "storage유형": "NAS", "용도": "NAS7", @@ -1185,7 +1185,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "7", "storage유형": "NAS", "용도": "총괄기획실 NAS", @@ -1201,7 +1201,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "8", "storage유형": "NAS", "용도": "한맥 NAS 1", @@ -1217,7 +1217,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "9", "storage유형": "NAS", "용도": "한맥 NAS 2", @@ -1233,7 +1233,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "10", "storage유형": "NAS", "용도": "한맥 NAS 3", @@ -1249,7 +1249,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "11", "storage유형": "NAS", "용도": "NAS 13", @@ -1265,7 +1265,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "12", "storage유형": "PC", "용도": "회계", @@ -1281,7 +1281,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "13", "storage유형": "PC", "용도": "한맥CAD", @@ -1297,9 +1297,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "14", - "storage유형": "서버(타워)", + "storage유형": "PC", "용도": "Ai-Cell-Util", "상세": "깃티, 매터모스트 등 70여종", "위치": "한맥빌딩(MDF 실)", @@ -1313,7 +1313,7 @@ export const realServerData = [ "SSD2": "8 TB" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "15", "storage유형": "PC", "용도": "한라CAD", @@ -1329,7 +1329,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "16", "storage유형": "NAS", "용도": "디자인팀1 NAS", @@ -1345,7 +1345,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "17", "storage유형": "NAS", "용도": "디자인팀2 NAS", @@ -1361,9 +1361,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "18", - "storage유형": "서버(미니워크스테이션)", + "storage유형": "PC", "용도": "인사정보 서버", "상세": "인사정보 PM", "위치": "한맥빌딩(MDF 실)", @@ -1377,9 +1377,9 @@ export const realServerData = [ "SSD2": "2 TB" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "19", - "storage유형": "서버(타워)", + "storage유형": "PC", "용도": "BEPs 서버", "상세": "BEPs 개발서버, Outline 협업서비스", "위치": "한맥빌딩(MDF 실)", @@ -1393,9 +1393,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "20", - "storage유형": "서버(타워)", + "storage유형": "PC", "용도": "Ai-Cell-A100-1", "상세": "OCR, Local LLM 등 30여종", "위치": "한맥빌딩(MDF 실)", @@ -1409,9 +1409,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "21", - "storage유형": "서버(타워)", + "storage유형": "PC", "용도": "빌드서버", "상세": "인스톨 쉴드, 지라", "위치": "한맥빌딩(MDF 실)", @@ -1425,9 +1425,9 @@ export const realServerData = [ "SSD2": "4TB" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "22", - "storage유형": "PC\n서버(랙)", + "storage유형": "PC", "용도": "저장소 및 전산모사\n구)스마트건설 서버", "상세": "ParaView, CFDCore\n디지털화설문, 검색WIKI 웹서비스", "위치": "한맥빌딩(MDF 실)", @@ -1441,9 +1441,9 @@ export const realServerData = [ "SSD2": "2TB" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "23", - "storage유형": "서버(랙)", + "storage유형": "서버", "용도": "IDC 산하ERP서버", "상세": "XR 가상화 메인 서버 → IDC 산하ERP서버", "위치": "한맥빌딩(MDF 실)", @@ -1457,9 +1457,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "24", - "storage유형": "스토리지(랙)", + "storage유형": "스토리지", "용도": "WAS Storage", "상세": "", "위치": "한맥빌딩(MDF 실)", @@ -1473,9 +1473,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "25", - "storage유형": "서버(랙)", + "storage유형": "서버", "용도": "한맥 백업 서버", "상세": "가족사 인트라넷 소스 백업 서버", "위치": "한맥빌딩(MDF 실)", @@ -1489,9 +1489,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "26", - "storage유형": "서버(랙)", + "storage유형": "서버", "용도": "한라 백업 서버", "상세": "한라 웹 소스 및 Miso DB 백업 서버", "위치": "한맥빌딩(MDF 실)", @@ -1505,7 +1505,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "27", "storage유형": "NAS", "용도": "기술개발센터 NAS", @@ -1521,7 +1521,7 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "28", "storage유형": "NAS", "용도": "-", @@ -1537,9 +1537,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "29", - "storage유형": "스토리지(랙)", + "storage유형": "스토리지", "용도": "Backup Storage", "상세": "", "위치": "한맥빌딩(MDF 실)", @@ -1553,9 +1553,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "30", - "storage유형": "스토리지(랙)", + "storage유형": "스토리지", "용도": "-", "상세": "", "위치": "한맥빌딩(MDF 실)", @@ -1569,9 +1569,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "31", - "storage유형": "서버(랙)", + "storage유형": "서버", "용도": "XR WAS Server", "상세": "", "위치": "한맥빌딩(MDF 실)", @@ -1585,9 +1585,9 @@ export const realServerData = [ "SSD2": "" }, { - "법인": "한맥빌딩", + "법인": "", "자산코드": "32", - "storage유형": "서버(랙)", + "storage유형": "서버", "용도": "WAS Storage", "상세": "", "위치": "한맥빌딩(MDF 실)", diff --git a/src/views/AssetTableView.ts b/src/views/AssetTableView.ts index 5a91d63..11cb056 100644 --- a/src/views/AssetTableView.ts +++ b/src/views/AssetTableView.ts @@ -27,7 +27,7 @@ export function renderTable(mainContent: HTMLElement) { } function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainContent: HTMLElement) { - const list = state.masterData.hw.filter(a => a.type === state.activeSubTab); + const fullList = state.masterData.hw.filter(a => a.type === state.activeSubTab); const tableWrapper = document.createElement('div'); tableWrapper.className = 'table-container'; @@ -37,8 +37,8 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont container.appendChild(tableWrapper); mainContent.appendChild(container); const tbody = document.getElementById('dynamic-tbody')!; - if (list.length === 0) { tbody.innerHTML = `등록된 자산이 없습니다.`; return; } - list.forEach((asset, idx) => { + if (fullList.length === 0) { tbody.innerHTML = `등록된 자산이 없습니다.`; return; } + fullList.forEach((asset, idx) => { const tr = document.createElement('tr'); tr.style.cursor = 'pointer'; tr.innerHTML = `${idx+1}${asset.법인}${asset.자산코드}${asset.사용자||''}${asset.위치||''}${asset.CPU||''}${asset.GPU||''}${asset.RAM||''}${asset.SSD1||'-'}${asset.SSD2||'-'}${asset.HDD1||'-'}${asset.HDD2||'-'}${asset.구매일||''}${asset.금액||''}${asset.납품업체||''}${asset.품의서명 ? '' : '-'}`; @@ -51,42 +51,116 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont container.appendChild(tableWrapper); mainContent.appendChild(container); const tbody = document.getElementById('dynamic-tbody')!; - if (list.length === 0) { tbody.innerHTML = `등록된 자산이 없습니다.`; return; } - list.forEach((asset, idx) => { + if (fullList.length === 0) { tbody.innerHTML = `등록된 자산이 없습니다.`; return; } + fullList.forEach((asset, idx) => { const tr = document.createElement('tr'); tr.style.cursor = 'pointer'; tr.innerHTML = `${idx+1}${asset.법인}${asset.storage유형||''}${asset.자산코드}${asset.명칭}${asset.위치||''}${asset.모델명||''}${asset.용량||''}${asset.담당자_정||''}${asset.IP주소||''}${asset.구매일||''}${asset.금액||''}`; tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openStorageModal(asset); }); tbody.appendChild(tr); }); - } else { - // 서버 또는 전산비품 - if (state.activeSubTab === '서버') { - table.innerHTML = `No법인자산번호유형용도상세설치위치담당자모델명OSCPURAMStorage`; - } else { - table.innerHTML = `No법인${state.activeSubTab === '전산비품' ? '유형' : ''}자산코드명칭위치관리자구매일금액관리`; - } + } else if (state.activeSubTab === '서버') { + // --- 서버 전용 필터 및 검색 기능 --- + const filterBar = document.createElement('div'); + filterBar.className = 'search-bar'; + // 법인, 유형, 위치 고유값 추출 + const corps = Array.from(new Set(fullList.map(a => a.법인))).filter(Boolean).sort(); + const types = Array.from(new Set(fullList.map(a => a.storage유형))).filter(Boolean).sort(); + const locations = Array.from(new Set(fullList.map(a => { + const loc = String(a.위치 || ''); + if (loc.startsWith('서관') || loc.startsWith('동관')) return 'IDC'; + return loc.split(' ')[0]; // 첫 단어 기준 (본사, 지사, 마천사무실 등) + }))).filter(Boolean).sort(); + + filterBar.innerHTML = ` +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + `; + container.appendChild(filterBar); + + table.innerHTML = `No법인자산번호유형용도상세설치위치담당자모델명OSCPURAMStorage`; tableWrapper.appendChild(table); container.appendChild(tableWrapper); mainContent.appendChild(container); - const tbody = document.getElementById('dynamic-tbody')!; - const colCount = state.activeSubTab === '서버' ? 13 : (state.activeSubTab === '전산비품' ? 11 : 10); - if (list.length === 0) { tbody.innerHTML = `등록된 자산이 없습니다.`; return; } - - list.forEach((asset, idx) => { - const tr = document.createElement('tr'); - tr.style.cursor = 'pointer'; - const formatInline = (v: any) => String(v || '').replace(/\n/g, ' / ').trim(); - const getBadge = (text: string, bgColor: string) => `${text}`; - if (state.activeSubTab === '서버') { + const tbody = document.getElementById('dynamic-tbody')!; + + const updateTable = () => { + const keyword = (document.getElementById('filter-keyword') as HTMLInputElement).value.toLowerCase().trim(); + const corp = (document.getElementById('filter-corp') as HTMLSelectElement).value; + const type = (document.getElementById('filter-type') as HTMLSelectElement).value; + const location = (document.getElementById('filter-location') as HTMLSelectElement).value; + + const filtered = fullList.filter(asset => { + const formatAsset = (v: any) => String(v || '').toLowerCase(); + const matchKeyword = !keyword || + formatAsset(asset.자산코드).includes(keyword) || + formatAsset(asset.용도).includes(keyword) || + formatAsset(asset.상세).includes(keyword) || + formatAsset(asset.모델명).includes(keyword) || + formatAsset(asset.담당자_정).includes(keyword) || + formatAsset(asset.담당자_부).includes(keyword); + + const matchCorp = !corp || asset.법인 === corp; + const matchType = !type || asset.storage유형 === type; + + let matchLocation = true; + if (location) { + const loc = String(asset.위치 || ''); + if (location === 'IDC') { + matchLocation = loc.startsWith('서관') || loc.startsWith('동관'); + } else { + matchLocation = loc.includes(location); + } + } + + return matchKeyword && matchCorp && matchType && matchLocation; + }); + + tbody.innerHTML = ''; + if (filtered.length === 0) { + tbody.innerHTML = `검색 결과가 없습니다.`; + return; + } + + filtered.forEach((asset, idx) => { + const tr = document.createElement('tr'); + tr.style.cursor = 'pointer'; + const formatInline = (v: any) => String(v || '').replace(/\n/g, ' / ').trim(); + const getBadge = (text: string, bgColor: string) => `${text}`; + const mainManager = asset.담당자_정 || ''; const subManager = asset.담당자_부 || ''; const managerHtml = [mainManager ? `${getBadge('정', '#1E5149')} ${mainManager}` : '', subManager ? `${getBadge('부', '#9CA3AF')} ${subManager}` : ''].filter(v => v !== '').join(' / '); const storageInfo = [asset.SSD1, asset.SSD2].filter(v => v && v !== '').join(' / '); - // 위치 정보 가공 (서관/동관 -> IDC) let locationHtml = formatInline(asset.위치); if (locationHtml.startsWith('서관') || locationHtml.startsWith('동관')) { locationHtml = `IDC(${locationHtml})`; @@ -108,10 +182,42 @@ function renderHwTable(table: HTMLTableElement, container: HTMLElement, mainCont ${formatInline(storageInfo)} `; tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset); }); - } else { - tr.innerHTML = `${idx+1}${asset.법인}${state.activeSubTab === '전산비품' ? `${asset.비품유형||'-'}` : ''}${asset.자산코드}${asset.명칭}${asset.위치}${asset.관리자}${asset.구매일||''}${asset.금액||''}`; - tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset); }); - } + tbody.appendChild(tr); + }); + createIcons({ icons: { RefreshCcw, Paperclip } }); + }; + + const keywordInput = document.getElementById('filter-keyword') as HTMLInputElement; + const corpSelect = document.getElementById('filter-corp') as HTMLSelectElement; + const typeSelect = document.getElementById('filter-type') as HTMLSelectElement; + const locationSelect = document.getElementById('filter-location') as HTMLSelectElement; + const resetBtn = document.getElementById('btn-reset-filters') as HTMLButtonElement; + + keywordInput.addEventListener('input', updateTable); + corpSelect.addEventListener('change', updateTable); + typeSelect.addEventListener('change', updateTable); + locationSelect.addEventListener('change', updateTable); + resetBtn.addEventListener('click', () => { + keywordInput.value = ''; corpSelect.value = ''; typeSelect.value = ''; locationSelect.value = ''; + updateTable(); + }); + + updateTable(); + } else { + // 전산비품 + table.innerHTML = `No법인${state.activeSubTab === '전산비품' ? '유형' : ''}자산코드명칭위치관리자구매일금액관리`; + tableWrapper.appendChild(table); + container.appendChild(tableWrapper); + mainContent.appendChild(container); + const tbody = document.getElementById('dynamic-tbody')!; + const colCount = state.activeSubTab === '전산비품' ? 11 : 10; + if (fullList.length === 0) { tbody.innerHTML = `등록된 자산이 없습니다.`; return; } + + fullList.forEach((asset, idx) => { + const tr = document.createElement('tr'); + tr.style.cursor = 'pointer'; + tr.innerHTML = `${idx+1}${asset.법인}${state.activeSubTab === '전산비품' ? `${asset.비품유형||'-'}` : ''}${asset.자산코드}${asset.명칭}${asset.위치}${asset.관리자}${asset.구매일||''}${asset.금액||''}`; + tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset); }); tbody.appendChild(tr); }); }