feat: 전산비품 및 모바일기기 관리 기능 확장 (보관위치, 상태관리, 분출이력)
This commit is contained in:
@@ -28,7 +28,23 @@ export function renderEquipmentList(container: HTMLElement) {
|
||||
const tableWrapper = document.createElement('div');
|
||||
tableWrapper.className = 'table-container';
|
||||
const table = document.createElement('table');
|
||||
table.innerHTML = `<thead><tr><th>No</th><th>구매법인</th><th>현 사용조직</th><th>유형</th><th>자산번호</th><th>모델명</th><th>관리자</th><th>구매일</th><th>금액</th><th>관리</th></tr></thead><tbody id="dynamic-tbody"></tbody>`;
|
||||
table.innerHTML = `
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">No.</th>
|
||||
<th style="text-align:center;">상태</th>
|
||||
<th style="text-align:center;">구매법인</th>
|
||||
<th style="text-align:center;">유형</th>
|
||||
<th style="text-align:center;">자산번호</th>
|
||||
<th style="text-align:center;">모델명</th>
|
||||
<th style="text-align:center;">보관위치</th>
|
||||
<th style="text-align:center;">관리자</th>
|
||||
<th style="text-align:center;">구매일</th>
|
||||
<th style="text-align:center;">금액</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="dynamic-tbody"></tbody>
|
||||
`;
|
||||
|
||||
tableWrapper.appendChild(table);
|
||||
container.appendChild(tableWrapper);
|
||||
@@ -56,19 +72,31 @@ export function renderEquipmentList(container: HTMLElement) {
|
||||
filtered.forEach((asset, idx) => {
|
||||
const tr = document.createElement('tr');
|
||||
tr.style.cursor = 'pointer';
|
||||
|
||||
const statusColors: Record<string, string> = {
|
||||
'대여중': '#3b82f6',
|
||||
'보관중': '#1E5149',
|
||||
'수리중': '#ef4444',
|
||||
'기타': '#6b7280'
|
||||
};
|
||||
const statusColor = statusColors[asset.현재상태 || '보관중'] || '#6b7280';
|
||||
const statusBadge = `<span style="background:${statusColor}; color:white; padding:2px 6px; border-radius:4px; font-size:0.75rem; font-weight:bold;">${asset.현재상태 || '보관중'}</span>`;
|
||||
|
||||
tr.innerHTML = `
|
||||
<td>${idx+1}</td>
|
||||
<td>${asset.법인}</td>
|
||||
<td>${asset.현사용조직||''}</td>
|
||||
<td>${asset.type}</td>
|
||||
<td>${asset.자산코드}</td>
|
||||
<td>${formatInline(asset.모델명)}</td>
|
||||
<td>${formatInline(asset.담당자_정 || asset.관리자)}</td>
|
||||
<td>${asset.구매일||''}</td>
|
||||
<td>${asset.금액||''}</td>
|
||||
<td><button class="btn btn-outline btn-sm">수정</button></td>
|
||||
<td style="text-align:center;">${idx + 1}</td>
|
||||
<td style="text-align:center;">${statusBadge}</td>
|
||||
<td style="text-align:center;">${asset.법인}</td>
|
||||
<td style="text-align:center;">${asset.type}</td>
|
||||
<td style="font-weight:600; color:var(--primary-color);">${asset.자산코드 || '-'}</td>
|
||||
<td>${formatInline(asset.모델명 || asset.명칭)}</td>
|
||||
<td style="text-align:center;">${asset.보관위치 || '-'}</td>
|
||||
<td style="text-align:center;">${formatInline(asset.담당자_정 || asset.관리자)}</td>
|
||||
<td style="text-align:center;">${asset.구매일 || ''}</td>
|
||||
<td style="text-align:right;">${asset.금액 || '0'}</td>
|
||||
`;
|
||||
tr.addEventListener('click', (e) => { if (!(e.target as HTMLElement).closest('button')) openHwModal(asset, 'view'); });
|
||||
tr.addEventListener('click', (e) => {
|
||||
if (!(e.target as HTMLElement).closest('button')) openHwModal(asset, 'view');
|
||||
});
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user