diff --git a/backend/templates/admin_return_management.html b/backend/templates/admin_return_management.html index 2b23e12..af04976 100644 --- a/backend/templates/admin_return_management.html +++ b/backend/templates/admin_return_management.html @@ -3,7 +3,7 @@ - λ°˜ν’ˆ κ΄€λ¦?- μ²?Ά˜?½κ΅­ + λ°˜ν’ˆ 관리 - μ²­μΆ˜μ•½κ΅­ @@ -38,7 +38,7 @@ min-height: 100vh; } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• ?€λ” ?β•?β•?β•?β•?β•?β•?β•?β•?β• */ + /* ══════════════════ 헀더 ══════════════════ */ .header { background: linear-gradient(135deg, #dc2626 0%, #f97316 50%, #f59e0b 100%); padding: 20px 24px; @@ -89,14 +89,14 @@ background: rgba(255,255,255,0.25); } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• 컨텐μΈ??β•?β•?β•?β•?β•?β•?β•?β•?β• */ + /* ══════════════════ 컨텐츠 ══════════════════ */ .content { max-width: 1800px; margin: 0 auto; padding: 24px; } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• ?΅κ³„ μΉ΄λ“œ (2μ€? ?β•?β•?β•?β•?β•?β•?β•?β•?β• */ + /* ══════════════════ 톡계 μΉ΄λ“œ ══════════════════ */ .stats-row { display: flex; gap: 16px; @@ -129,40 +129,19 @@ .stat-card.purple::before { background: var(--accent-purple); } .stat-card.gold::before { background: var(--accent-gold); } - .stat-icon { - font-size: 20px; - margin-bottom: 8px; - } - .stat-value { - font-size: 24px; - font-weight: 700; - letter-spacing: -1px; - margin-bottom: 2px; - } - .stat-value.small { - font-size: 18px; - } + .stat-icon { font-size: 20px; margin-bottom: 8px; } + .stat-value { font-size: 24px; font-weight: 700; letter-spacing: -1px; margin-bottom: 2px; } + .stat-value.small { font-size: 18px; } .stat-card.rose .stat-value { color: var(--accent-rose); } .stat-card.amber .stat-value { color: var(--accent-amber); } .stat-card.cyan .stat-value { color: var(--accent-cyan); } .stat-card.emerald .stat-value { color: var(--accent-emerald); } .stat-card.purple .stat-value { color: var(--accent-purple); } .stat-card.gold .stat-value { color: var(--accent-gold); } - - .stat-label { - font-size: 11px; - font-weight: 600; - color: var(--text-muted); - text-transform: uppercase; - letter-spacing: 0.5px; - } - .stat-sub { - font-size: 10px; - color: var(--text-muted); - margin-top: 2px; - } + .stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; } + .stat-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• ?„ν„° λ°??β•?β•?β•?β•?β•?β•?β•?β•?β• */ + /* ══════════════════ ν•„ν„° λ°” ══════════════════ */ .filter-bar { background: var(--bg-card); border-radius: 16px; @@ -174,18 +153,8 @@ flex-wrap: wrap; align-items: flex-end; } - .filter-group { - display: flex; - flex-direction: column; - gap: 6px; - } - .filter-group label { - font-size: 11px; - font-weight: 600; - color: var(--text-muted); - text-transform: uppercase; - letter-spacing: 0.5px; - } + .filter-group { display: flex; flex-direction: column; gap: 6px; } + .filter-group label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; } .filter-group select, .filter-group input { padding: 10px 14px; background: var(--bg-primary); @@ -213,17 +182,10 @@ cursor: pointer; transition: all 0.2s; } - .filter-btn:hover { - transform: translateY(-1px); - box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4); - } + .filter-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4); } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• κΈ΄κΈ‰?????β•?β•?β•?β•?β•?β•?β•?β•?β• */ - .urgency-tabs { - display: flex; - gap: 8px; - margin-bottom: 16px; - } + /* ══════════════════ 긴급도 νƒ­ ══════════════════ */ + .urgency-tabs { display: flex; gap: 8px; margin-bottom: 16px; } .urgency-tab { padding: 10px 20px; border-radius: 10px; @@ -238,35 +200,19 @@ align-items: center; gap: 6px; } - .urgency-tab:hover { - border-color: var(--text-muted); - } - .urgency-tab.active { - background: linear-gradient(135deg, var(--accent-orange), #ea580c); - border-color: transparent; - color: #fff; - } - .urgency-tab .count { - background: rgba(255,255,255,0.2); - padding: 2px 8px; - border-radius: 100px; - font-size: 11px; - } - .urgency-tab.active .count { - background: rgba(255,255,255,0.3); - } + .urgency-tab:hover { border-color: var(--text-muted); } + .urgency-tab.active { background: linear-gradient(135deg, var(--accent-orange), #ea580c); border-color: transparent; color: #fff; } + .urgency-tab .count { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 100px; font-size: 11px; } + .urgency-tab.active .count { background: rgba(255,255,255,0.3); } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• ?Œμ΄λΈ??β•?β•?β•?β•?β•?β•?β•?β•?β• */ + /* ══════════════════ ν…Œμ΄λΈ” ══════════════════ */ .table-wrap { background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); overflow: hidden; } - .data-table { - width: 100%; - border-collapse: collapse; - } + .data-table { width: 100%; border-collapse: collapse; } .data-table th { padding: 14px 12px; font-size: 11px; @@ -283,43 +229,18 @@ } .data-table th.center { text-align: center; } .data-table th.right { text-align: right; } - .data-table td { - padding: 12px; - font-size: 13px; - border-bottom: 1px solid rgba(255,255,255,0.05); - vertical-align: middle; - } - .data-table tr:hover { - background: rgba(255,255,255,0.02); - } - .data-table tr.urgent-critical { - background: rgba(244, 63, 94, 0.08); - } - .data-table tr.urgent-warning { - background: rgba(249, 115, 22, 0.05); - } + .data-table td { padding: 12px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; } + .data-table tr:hover { background: rgba(255,255,255,0.02); } + .data-table tr.urgent-critical { background: rgba(244, 63, 94, 0.08); } + .data-table tr.urgent-warning { background: rgba(249, 115, 22, 0.05); } - /* ?½ν’ˆ ?€ */ - .drug-cell { - display: flex; - flex-direction: column; - gap: 2px; - } - .drug-name { - font-weight: 600; - color: var(--text-primary); - font-size: 12px; - } - .drug-code { - font-family: 'JetBrains Mono', monospace; - font-size: 10px; - color: var(--text-muted); - } + /* μ•½ν’ˆ μ…€ */ + .drug-cell { display: flex; flex-direction: column; gap: 2px; } + .drug-name { font-weight: 600; color: var(--text-primary); font-size: 12px; } + .drug-code { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); } - /* ?„μΉ˜ ?€ */ - .location-cell { - text-align: center; - } + /* μœ„μΉ˜ μ…€ */ + .location-cell { text-align: center; } .location-badge { display: inline-block; background: rgba(251, 191, 36, 0.2); @@ -330,42 +251,16 @@ border-radius: 6px; font-family: 'JetBrains Mono', monospace; } - .location-empty { - color: var(--text-muted); - font-size: 12px; - } + .location-empty { color: var(--text-muted); font-size: 12px; } - /* κΈ΄κΈ‰??λ°°μ? */ - .urgency-badge { - display: inline-flex; - align-items: center; - gap: 4px; - padding: 4px 8px; - border-radius: 6px; - font-size: 10px; - font-weight: 600; - } - .urgency-badge.critical { - background: rgba(244, 63, 94, 0.2); - color: var(--accent-rose); - } - .urgency-badge.warning { - background: rgba(249, 115, 22, 0.2); - color: var(--accent-orange); - } - .urgency-badge.normal { - background: rgba(100, 116, 139, 0.2); - color: var(--text-muted); - } + /* 긴급도 λ°°μ§€ */ + .urgency-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 600; } + .urgency-badge.critical { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); } + .urgency-badge.warning { background: rgba(249, 115, 22, 0.2); color: var(--accent-orange); } + .urgency-badge.normal { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); } - /* ?νƒœ λ°°μ? */ - .status-badge { - display: inline-block; - padding: 4px 10px; - border-radius: 6px; - font-size: 11px; - font-weight: 600; - } + /* μƒνƒœ λ°°μ§€ */ + .status-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; } .status-badge.pending { background: rgba(249, 115, 22, 0.2); color: var(--accent-orange); } .status-badge.reviewed { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); } .status-badge.returned { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); } @@ -373,475 +268,243 @@ .status-badge.disposed { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); } .status-badge.resolved { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); } - /* ?˜λŸ‰/? μ§œ/κΈˆμ•‘ ?€ */ - .qty-cell { - font-family: 'JetBrains Mono', monospace; - font-weight: 600; - text-align: center; - font-size: 12px; - } - .date-cell { - font-size: 11px; - color: var(--text-secondary); - } - .months-cell { - font-family: 'JetBrains Mono', monospace; - font-weight: 700; - font-size: 12px; - } + /* μˆ˜λŸ‰/λ‚ μ§œ/κΈˆμ•‘ μ…€ */ + .qty-cell { font-family: 'JetBrains Mono', monospace; font-weight: 600; text-align: center; font-size: 12px; } + .date-cell { font-size: 11px; color: var(--text-secondary); } + .months-cell { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 12px; } .months-cell.critical { color: var(--accent-rose); } .months-cell.warning { color: var(--accent-orange); } .months-cell.normal { color: var(--text-muted); } + .amount-cell { font-family: 'JetBrains Mono', monospace; font-weight: 600; text-align: right; font-size: 12px; color: var(--accent-gold); } + .amount-cell.zero { color: var(--text-muted); } - .amount-cell { - font-family: 'JetBrains Mono', monospace; - font-weight: 600; - text-align: right; - font-size: 12px; - color: var(--accent-gold); - } - .amount-cell.zero { - color: var(--text-muted); - } + /* μ•‘μ…˜ λ²„νŠΌ */ + .action-btn { padding: 6px 12px; border: none; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; } + .action-btn.primary { background: linear-gradient(135deg, var(--accent-orange), #ea580c); color: #fff; } + .action-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4); } - /* ?‘μ…˜ λ²„νŠΌ */ - .action-btn { - padding: 6px 12px; - border: none; - border-radius: 6px; - font-size: 11px; - font-weight: 600; - cursor: pointer; - transition: all 0.2s; - } - .action-btn.primary { - background: linear-gradient(135deg, var(--accent-orange), #ea580c); - color: #fff; - } - .action-btn.primary:hover { - transform: translateY(-1px); - box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4); - } - - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• ?˜μ΄μ§€?€μ΄???β•?β•?β•?β•?β•?β•?β•?β•?β• */ - .pagination { - display: flex; - justify-content: center; - align-items: center; - gap: 8px; - padding: 20px; - } - .page-btn { - padding: 8px 14px; - border: 1px solid var(--border); - border-radius: 8px; - background: var(--bg-secondary); - color: var(--text-secondary); - font-size: 13px; - font-weight: 500; - cursor: pointer; - transition: all 0.2s; - } + /* ══════════════════ νŽ˜μ΄μ§€λ„€μ΄μ…˜ ══════════════════ */ + .pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 20px; } + .page-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; } .page-btn:hover { border-color: var(--accent-orange); color: var(--accent-orange); } .page-btn.active { background: linear-gradient(135deg, var(--accent-orange), #ea580c); border-color: transparent; color: #fff; } .page-btn:disabled { opacity: 0.3; cursor: not-allowed; } .page-info { color: var(--text-muted); font-size: 13px; } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• λͺ¨λ‹¬ ?β•?β•?β•?β•?β•?β•?β•?β•?β• */ - .modal-overlay { - position: fixed; - inset: 0; - background: rgba(0,0,0,0.7); - display: none; - align-items: center; - justify-content: center; - z-index: 1000; - } + /* ══════════════════ λͺ¨λ‹¬ ══════════════════ */ + .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 1000; } .modal-overlay.open { display: flex; } - .modal { - background: var(--bg-card); - border-radius: 20px; - padding: 28px; - width: 90%; - max-width: 500px; - border: 1px solid var(--border); - box-shadow: 0 20px 60px rgba(0,0,0,0.5); - } - .modal-header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 24px; - } + .modal { background: var(--bg-card); border-radius: 20px; padding: 28px; width: 90%; max-width: 500px; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.5); } + .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; } .modal-title { font-size: 18px; font-weight: 700; } .modal-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; } .modal-body { margin-bottom: 24px; } .form-group { margin-bottom: 16px; } .form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; } - .form-group select, .form-group textarea { - width: 100%; - padding: 12px 16px; - background: var(--bg-primary); - border: 1px solid var(--border); - border-radius: 10px; - font-size: 14px; - font-family: inherit; - color: var(--text-primary); - } + .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--text-primary); } .form-group textarea { min-height: 100px; resize: vertical; } .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-orange); } .modal-footer { display: flex; justify-content: flex-end; gap: 12px; } - .modal-btn { - padding: 12px 24px; - border-radius: 10px; - font-size: 14px; - font-weight: 600; - cursor: pointer; - transition: all 0.2s; - } + .modal-btn { padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; } .modal-btn.cancel { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-secondary); } .modal-btn.submit { background: linear-gradient(135deg, var(--accent-orange), #ea580c); border: none; color: #fff; } .modal-btn.submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4); } - .drug-detail { - background: var(--bg-secondary); - border-radius: 12px; - padding: 16px; - margin-bottom: 20px; - } + .drug-detail { background: var(--bg-secondary); border-radius: 12px; padding: 16px; margin-bottom: 20px; } .drug-detail-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; } .drug-detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 13px; } .drug-detail-item { display: flex; justify-content: space-between; } .drug-detail-label { color: var(--text-muted); } .drug-detail-value { font-weight: 600; font-family: 'JetBrains Mono', monospace; } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• λ‘œλ”©/λΉ??νƒœ ?β•?β•?β•?β•?β•?β•?β•?β•?β• */ + /* ══════════════════ λ‘œλ”©/빈 μƒνƒœ ══════════════════ */ .loading-state, .empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); } - .loading-spinner { - width: 40px; height: 40px; - border: 3px solid var(--border); - border-top-color: var(--accent-orange); - border-radius: 50%; - animation: spin 1s linear infinite; - margin: 0 auto 16px; - } + .loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent-orange); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; } @keyframes spin { to { transform: rotate(360deg); } } .empty-icon { font-size: 48px; margin-bottom: 16px; } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• ? μŠ€???β•?β•?β•?β•?β•?β•?β•?β•?β• */ - .toast { - position: fixed; - bottom: 32px; - left: 50%; - transform: translateX(-50%) translateY(20px); - padding: 14px 28px; - background: var(--bg-card); - border: 1px solid var(--border); - border-radius: 12px; - color: var(--text-primary); - font-size: 14px; - font-weight: 500; - box-shadow: 0 8px 32px rgba(0,0,0,0.3); - opacity: 0; - transition: all 0.3s; - z-index: 300; - } + /* ══════════════════ ν† μŠ€νŠΈ ══════════════════ */ + .toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px); padding: 14px 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; color: var(--text-primary); font-size: 14px; font-weight: 500; box-shadow: 0 8px 32px rgba(0,0,0,0.3); opacity: 0; transition: all 0.3s; z-index: 300; } .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } .toast.success { border-color: var(--accent-emerald); } .toast.error { border-color: var(--accent-rose); } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• λ°˜μ‘???β•?β•?β•?β•?β•?β•?β•?β•?β• */ - @media (max-width: 1200px) { - .stats-row { flex-wrap: wrap; } - .stat-card { min-width: calc(33% - 12px); } - } - @media (max-width: 768px) { - .stat-card { min-width: calc(50% - 8px); } - .header-nav { display: none; } - .filter-bar { flex-direction: column; } - .filter-group { width: 100%; } - .filter-group select, .filter-group input { width: 100%; } - .urgency-tabs { flex-wrap: wrap; } - } + /* ══════════════════ λ°˜μ‘ν˜• ══════════════════ */ + @media (max-width: 1200px) { .stats-row { flex-wrap: wrap; } .stat-card { min-width: calc(33% - 12px); } } + @media (max-width: 768px) { .stat-card { min-width: calc(50% - 8px); } .header-nav { display: none; } .filter-bar { flex-direction: column; } .filter-group { width: 100%; } .filter-group select, .filter-group input { width: 100%; } .urgency-tabs { flex-wrap: wrap; } } - /* ?β•?β•?β•?β•?β•?β•?β•?β•?β• ?…κ³ ?΄λ ₯ λͺ¨λ‹¬ ?β•?β•?β•?β•?β•?β•?β•?β•?β• */ - .purchase-modal { - position: fixed; - inset: 0; - background: rgba(0,0,0,0.8); - display: none; - align-items: center; - justify-content: center; - z-index: 1100; - backdrop-filter: blur(4px); - } + /* ══════════════════ μž…κ³ μ΄λ ₯ λͺ¨λ‹¬ ══════════════════ */ + .purchase-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 1100; backdrop-filter: blur(4px); } .purchase-modal.open { display: flex; } - .purchase-modal-content { - background: var(--bg-card); - border-radius: 20px; - width: 95%; - max-width: 650px; - max-height: 80vh; - overflow: hidden; - display: flex; - flex-direction: column; - border: 1px solid var(--border); - box-shadow: 0 20px 60px rgba(0,0,0,0.5); - } - .purchase-modal-header { - padding: 20px 24px; - background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); - color: #fff; - } - .purchase-modal-header h3 { - margin: 0 0 6px 0; - font-size: 18px; - display: flex; - align-items: center; - gap: 8px; - } - .purchase-modal-header .drug-name { - font-size: 14px; - opacity: 0.9; - } - .purchase-modal-body { - padding: 16px 24px 24px; - overflow-y: auto; - flex: 1; - } - .purchase-history-table { - width: 100%; - border-collapse: collapse; - } - .purchase-history-table th { - background: var(--bg-secondary); - padding: 12px 10px; - font-size: 12px; - font-weight: 600; - color: var(--text-secondary); - text-align: left; - border-bottom: 2px solid var(--border); - position: sticky; - top: 0; - } - .purchase-history-table td { - padding: 14px 10px; - font-size: 13px; - border-bottom: 1px solid var(--border); - color: var(--text-primary); - } - .purchase-history-table tr:hover td { - background: var(--bg-card-hover); - } - .supplier-name { - font-weight: 600; - color: var(--accent-cyan); - } - .supplier-tel { - font-size: 12px; - color: var(--accent-blue); - cursor: pointer; - } - .supplier-tel:hover { - text-decoration: underline; - } - .purchase-date { - color: var(--text-secondary); - font-family: 'JetBrains Mono', monospace; - font-size: 12px; - } - .purchase-qty { - font-weight: 600; - color: var(--accent-emerald); - } - .purchase-price { - color: var(--accent-gold); - font-family: 'JetBrains Mono', monospace; - } - .purchase-empty { - text-align: center; - padding: 40px 20px; - color: var(--text-muted); - } - .purchase-empty .icon { - font-size: 40px; - margin-bottom: 12px; - } - .purchase-modal-footer { - padding: 16px 24px; - border-top: 1px solid var(--border); - display: flex; - justify-content: flex-end; - } - .purchase-modal-btn { - padding: 10px 24px; - border: none; - border-radius: 8px; - cursor: pointer; - font-weight: 500; - font-size: 14px; - background: var(--bg-secondary); - color: var(--text-secondary); - transition: all 0.15s; - } - .purchase-modal-btn:hover { - background: var(--bg-card-hover); - color: var(--text-primary); - } - /* ?Œμ΄λΈ????”λΈ”?΄λ¦­ κ°€???œμ‹œ */ - #dataTableBody tr { - cursor: pointer; - } - #dataTableBody tr:active { - background: var(--bg-card-hover) !important; - } + .purchase-modal-content { background: var(--bg-card); border-radius: 20px; width: 95%; max-width: 650px; max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.5); } + .purchase-modal-header { padding: 20px 24px; background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); color: #fff; } + .purchase-modal-header h3 { margin: 0 0 6px 0; font-size: 18px; display: flex; align-items: center; gap: 8px; } + .purchase-modal-header .drug-name { font-size: 14px; opacity: 0.9; } + .purchase-modal-body { padding: 16px 24px 24px; overflow-y: auto; flex: 1; } + .purchase-history-table { width: 100%; border-collapse: collapse; } + .purchase-history-table th { background: var(--bg-secondary); padding: 12px 10px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: left; border-bottom: 2px solid var(--border); position: sticky; top: 0; } + .purchase-history-table td { padding: 14px 10px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text-primary); } + .purchase-history-table tr:hover td { background: var(--bg-card-hover); } + .supplier-name { font-weight: 600; color: var(--accent-cyan); } + .supplier-tel { font-size: 12px; color: var(--accent-blue); cursor: pointer; } + .supplier-tel:hover { text-decoration: underline; } + .purchase-date { color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 12px; } + .purchase-qty { font-weight: 600; color: var(--accent-emerald); } + .purchase-price { color: var(--accent-gold); font-family: 'JetBrains Mono', monospace; } + .purchase-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); } + .purchase-empty .icon { font-size: 40px; margin-bottom: 12px; } + .purchase-modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; } + .purchase-modal-btn { padding: 10px 24px; border: none; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 14px; background: var(--bg-secondary); color: var(--text-secondary); transition: all 0.15s; } + .purchase-modal-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); } + #dataTableBody tr { cursor: pointer; } + #dataTableBody tr:active { background: var(--bg-card-hover) !important; }
-

?“¦ λ°˜ν’ˆ ?„보 κ΄€λ¦?/h1> -

?₯κΈ° 미사???˜μ•½??λ°˜ν’ˆ/?κΈ° κ΄€λ¦?/p> +

πŸ“¦ λ°˜ν’ˆ 후보 관리

+

μž₯κΈ° λ―Έμ‚¬μš© μ˜μ•½ν’ˆ λ°˜ν’ˆ/폐기 관리

- +
-
?”΄
+
πŸ”΄
-
-
3?? 미사??/div> -
κΈ΄κΈ‰ 처리 ?„μš”
+
3λ…„+ λ―Έμ‚¬μš©
+
κΈ΄κΈ‰ 처리 ν•„μš”
-
?Ÿ 
+
🟠
-
-
2?? 미사??/div> -
κ²€??ꢌμž₯
+
2λ…„+ λ―Έμ‚¬μš©
+
κ²€ν†  ꢌμž₯
-
?“‹
+
πŸ“‹
-
-
λ―Έκ²°??/div> -
pending ?νƒœ
+
λ―Έκ²°μ •
+
pending μƒνƒœ
-
??/div> +
βœ…
-
-
처리?„λ£Œ
+
μ²˜λ¦¬μ™„λ£Œ
-
?“Š
+
πŸ“Š
-
-
?„체 ?„보
+
전체 후보
- +
-
?’°
+
πŸ’°
-
-
μ΄??Œμˆ˜κ°€??κΈˆμ•‘
-
?„체 λ°˜ν’ˆ ?€??/div> +
νšŒμˆ˜κ°€λŠ₯ κΈˆμ•‘
+
전체 λ°˜ν’ˆ κ°€μΉ˜
-
?”΄?’΅
+
πŸ”΄πŸ’°
-
-
3?? κΈˆμ•‘
-
κΈ΄κΈ‰ ?Œμˆ˜ ?€??/div> +
3λ…„+ κΈˆμ•‘
+
κΈ΄κΈ‰ 처리 κ°€μΉ˜
-
?Ÿ ?’΅
+
πŸŸ πŸ’°
-
-
2?? κΈˆμ•‘
-
주의 ?€??/div> +
2λ…„+ κΈˆμ•‘
+
κ²€ν†  κ°€μΉ˜
- +
- +
-
- - + +
- +
- +
- +
- +
- ?’‘ ???”λΈ”?΄λ¦­ ???…κ³ ?΄λ ₯ ?•인 (?„λ§€???°λ½μ²? + πŸ’‘ ν–‰ 더블클릭 β†’ μž…κ³ μ΄λ ₯ 확인 (도맀상 μ—°λ½μ²˜)
- - - - - - - + + + + + + + + + + @@ -849,7 +512,7 @@ @@ -857,70 +520,70 @@
κΈ΄κΈ‰?½ν’ˆ?„μΉ˜?„μž¬κ³?/th> - ?¨κ??Œμˆ˜κ°€?₯금??/th> - 마μ?λ§?μ²˜λ°©λ―Έμ‚¬??/th> - 마μ?λ§??…κ³ ?νƒœ?‘μ…˜μ•½ν’ˆμœ„μΉ˜ν˜„μž¬κ³ λ‹¨κ°€νšŒμˆ˜κ°€λŠ₯κΈˆμ•‘λ§ˆμ§€λ§‰ μ²˜λ°©λ―Έμ‚¬μš©λ§ˆμ§€λ§‰ μž…κ³ μƒνƒœμ•‘μ…˜
-
?°μ΄??λ‘œλ”© μ€?..
+
데이터 λ‘œλ”© 쀑...
- +
- + - +
- +
-

?“¦ ?…κ³  ?΄λ ₯

+

πŸ“¦ μž…κ³  이λ ₯

-
- - + + + + - +
?„λ§€??/th> - ?…κ³ ??/th> - ?˜λŸ‰?¨κ?λ„λ§€μƒμž…κ³ μΌμˆ˜λŸ‰λ‹¨κ°€
?“­

λ‘œλ”© μ€?..

πŸ“­

λ‘œλ”© 쀑...

@@ -940,7 +603,7 @@ async function loadData() { const tbody = document.getElementById('dataTableBody'); - tbody.innerHTML = `
?°μ΄??λ‘œλ”© μ€?..
`; + tbody.innerHTML = `
데이터 λ‘œλ”© 쀑...
`; const status = document.getElementById('filterStatus').value; const urgency = document.getElementById('filterUrgency').value; @@ -964,10 +627,10 @@ currentPage = 1; renderTable(); } else { - tbody.innerHTML = `
? οΈ
?€λ₯˜: ${data.error}
`; + tbody.innerHTML = `
⚠️
였λ₯˜: ${data.error}
`; } } catch (err) { - tbody.innerHTML = `
??/div>
?°μ΄??λ‘œλ“œ ?€νŒ¨
`; + tbody.innerHTML = `
❌
데이터 λ‘œλ“œ μ‹€νŒ¨
`; } } @@ -978,23 +641,22 @@ document.getElementById('statProcessed').textContent = stats.processed || 0; document.getElementById('statTotal').textContent = stats.total || 0; - // κΈˆμ•‘ ?œμ‹œ document.getElementById('statTotalAmount').textContent = formatAmount(stats.total_amount || 0); document.getElementById('statCriticalAmount').textContent = formatAmount(stats.critical_amount || 0); document.getElementById('statWarningAmount').textContent = formatAmount(stats.warning_amount || 0); } function formatAmount(amount) { - if (!amount || amount === 0) return '??'; + if (!amount || amount === 0) return 'β‚©0'; if (amount >= 1000000) { - return '?? + (amount / 10000).toFixed(0).replace(/\B(?=(\d{3})+(?!\d))/g, ',') + 'λ§?; + return 'β‚©' + (amount / 10000).toFixed(0).replace(/\B(?=(\d{3})+(?!\d))/g, ',') + '만'; } - return '?? + Math.round(amount).toLocaleString(); + return 'β‚©' + Math.round(amount).toLocaleString(); } function formatPrice(price) { if (!price || price === 0) return '-'; - return '?? + Math.round(price).toLocaleString(); + return 'β‚©' + Math.round(price).toLocaleString(); } function updateTabs() { @@ -1036,7 +698,7 @@ } if (filteredData.length === 0) { - tbody.innerHTML = `
?“¦
?΄λ‹Ή 쑰건??λ°˜ν’ˆ ?„보가 ?†μŠ΅?ˆλ‹€
`; + tbody.innerHTML = `
πŸ“¦
ν•΄λ‹Ή 쑰건의 λ°˜ν’ˆ 후보가 μ—†μŠ΅λ‹ˆλ‹€
`; document.getElementById('pagination').innerHTML = ''; return; } @@ -1055,7 +717,7 @@ - ${urgency === 'critical' ? '?”΄' : urgency === 'warning' ? '?Ÿ ' : '??} + ${urgency === 'critical' ? 'πŸ”΄' : urgency === 'warning' ? '🟠' : 'βšͺ'} @@ -1067,7 +729,7 @@ ${item.location ? `${escapeHtml(item.location)}` : '-'} ${item.current_stock || 0} ${formatPrice(item.unit_price)} - ${hasAmount ? '?? + Math.round(item.recoverable_amount).toLocaleString() : '-'} + ${hasAmount ? 'β‚©' + Math.round(item.recoverable_amount).toLocaleString() : '-'} ${formatDate(item.last_prescription_date) || '-'} ${item.months_since_use ? item.months_since_use + 'κ°œμ›”' : '-'} @@ -1075,7 +737,7 @@ ${formatDate(item.last_purchase_date) || '-'} ${getStatusLabel(item.status)} - `; @@ -1088,12 +750,12 @@ const pagination = document.getElementById('pagination'); if (totalPages <= 1) { - pagination.innerHTML = `μ΄?${totalItems}κ±?/span>`; + pagination.innerHTML = `총 ${totalItems}건`; return; } let html = ``; - html += ``; const maxVisible = 5; let startPage = Math.max(1, currentPage - Math.floor(maxVisible / 2)); @@ -1104,9 +766,9 @@ html += ``; } - html += ``; html += ``; - html += `μ΄?${totalItems}κ±?/span>`; + html += `총 ${totalItems}건`; pagination.innerHTML = html; } @@ -1127,27 +789,27 @@
${escapeHtml(item.drug_name)}
- ?½ν’ˆμ½”λ“œ + μ•½ν’ˆμ½”λ“œ ${item.drug_code}
- ?„μž¬κ³?/span> + ν˜„μž¬κ³  ${item.current_stock || 0}
- ?¨κ? + 단가 ${formatPrice(item.unit_price)}
- ?Œμˆ˜κ°€?₯금??/span> - ${hasAmount ? '?? + Math.round(item.recoverable_amount).toLocaleString() : '-'} + νšŒμˆ˜κ°€λŠ₯κΈˆμ•‘ + ${hasAmount ? 'β‚©' + Math.round(item.recoverable_amount).toLocaleString() : '-'}
- 마μ?λ§?처방 + λ§ˆμ§€λ§‰ 처방 ${formatDate(item.last_prescription_date) || '-'}
- 미사??κΈ°κ°„ + λ―Έμ‚¬μš© κΈ°κ°„ ${item.months_since_use ? item.months_since_use + 'κ°œμ›”' : '-'}
@@ -1170,7 +832,7 @@ const reason = document.getElementById('modalReason').value; if (status === 'keep' && !reason.trim()) { - showToast('보λ₯˜ ?νƒœ?μ„œ???¬μœ  ?…λ ₯???„μˆ˜?…λ‹ˆ??, 'error'); + showToast('보λ₯˜ μƒνƒœμ—μ„œλŠ” μ‚¬μœ  μž…λ ₯이 ν•„μˆ˜μž…λ‹ˆλ‹€', 'error'); return; } @@ -1184,14 +846,14 @@ const data = await res.json(); if (data.success) { - showToast('?νƒœκ°€ λ³€κ²½λ˜?ˆμŠ΅?ˆλ‹€', 'success'); + showToast('μƒνƒœκ°€ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€', 'success'); closeModal(); loadData(); } else { - showToast('λ³€κ²??€νŒ¨: ' + data.error, 'error'); + showToast('λ³€κ²½ μ‹€νŒ¨: ' + data.error, 'error'); } } catch (err) { - showToast('?œλ²„ ?€λ₯˜', 'error'); + showToast('μ„œλ²„ 였λ₯˜', 'error'); } } @@ -1212,12 +874,12 @@ function getStatusLabel(status) { const labels = { - 'pending': 'λ―Έκ²°??, - 'reviewed': 'κ²€? λ¨', - 'returned': 'λ°˜ν’ˆ?„λ£Œ', + 'pending': 'λ―Έκ²°μ •', + 'reviewed': '검토됨', + 'returned': 'λ°˜ν’ˆμ™„λ£Œ', 'keep': '보λ₯˜', - 'disposed': '?κΈ°', - 'resolved': '?¬κ³ ?Œμ§„' + 'disposed': '폐기', + 'resolved': 'μž¬κ³ μ†Œμ§„' }; return labels[status] || status; } @@ -1229,14 +891,14 @@ setTimeout(() => { toast.classList.remove('show'); }, 3000); } - // ?β•?β•?β•?β•?β•?β•?β•?β•?β• ?…κ³ ?΄λ ₯ λͺ¨λ‹¬ ?β•?β•?β•?β•?β•?β•?β•?β•?β• + // ══════════════════ μž…κ³ μ΄λ ₯ λͺ¨λ‹¬ ══════════════════ async function openPurchaseModal(drugCode, drugName) { const modal = document.getElementById('purchaseModal'); const nameEl = document.getElementById('purchaseDrugName'); const tbody = document.getElementById('purchaseHistoryBody'); nameEl.textContent = drugName || drugCode; - tbody.innerHTML = '
??/div>

?…κ³ ?΄λ ₯ 쑰회 μ€?..

'; + tbody.innerHTML = '
⏳

μž…κ³ μ΄λ ₯ 쑰회 쀑...

'; modal.classList.add('open'); try { @@ -1245,13 +907,13 @@ if (data.success) { if (data.history.length === 0) { - tbody.innerHTML = '
?“­

?…κ³  ?΄λ ₯???†μŠ΅?ˆλ‹€

'; + tbody.innerHTML = '
πŸ“­

μž…κ³  이λ ₯이 μ—†μŠ΅λ‹ˆλ‹€

'; } else { tbody.innerHTML = data.history.map(h => `
${escapeHtml(h.supplier)}
- ${h.supplier_tel ? `
?“ž ${h.supplier_tel}
` : ''} + ${h.supplier_tel ? `
πŸ“ž ${h.supplier_tel}
` : ''} ${h.date} ${h.quantity.toLocaleString()} @@ -1260,10 +922,10 @@ `).join(''); } } else { - tbody.innerHTML = `
? οΈ

쑰회 ?€νŒ¨: ${data.error}

`; + tbody.innerHTML = `
⚠️

쑰회 μ‹€νŒ¨: ${data.error}

`; } } catch (err) { - tbody.innerHTML = `
??/div>

?€λ₯˜: ${err.message}

`; + tbody.innerHTML = `
❌

였λ₯˜: ${err.message}

`; } } @@ -1273,7 +935,7 @@ function copyToClipboard(text) { navigator.clipboard.writeText(text).then(() => { - showToast(`?“‹ ${text} 볡사??, 'success'); + showToast(`πŸ“‹ ${text} 볡사됨`, 'success'); }).catch(() => { const input = document.createElement('input'); input.value = text; @@ -1281,14 +943,14 @@ input.select(); document.execCommand('copy'); document.body.removeChild(input); - showToast(`?“‹ ${text} 볡사??, 'success'); + showToast(`πŸ“‹ ${text} 볡사됨`, 'success'); }); } - // λͺ¨λ‹¬ ?Έλ? ?΄λ¦­ ???«κΈ° + // λͺ¨λ‹¬ μ™ΈλΆ€ 클릭 μ‹œ λ‹«κΈ° document.getElementById('purchaseModal').addEventListener('click', function(e) { if (e.target === this) closePurchaseModal(); }); - + \ No newline at end of file