-
+
-
- 3?? λ―Έμ¬??/div>
-
κΈ΄κΈ μ²λ¦¬ ?μ
+ 3λ
+ λ―Έμ¬μ©
+ κΈ΄κΈ μ²λ¦¬ νμ
-
+
-
- 2?? λ―Έμ¬??/div>
-
κ²??κΆμ₯
+ 2λ
+ λ―Έμ¬μ©
+ κ²ν κΆμ₯
-
+
-
- λ―Έκ²°??/div>
-
pending ?ν
+ λ―Έκ²°μ
+ pending μν
-
-
+
-
+
-
- ?체 ?보
+ μ 체 ν보
-
+
@@ -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 = ` `;
+ tbody.innerHTML = ` `;
}
} catch (err) {
- tbody.innerHTML = ` `;
+ 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)}
- ?ν λ³κ²?/button>
+ μν λ³κ²½
`;
@@ -1088,12 +750,12 @@
const pagination = document.getElementById('pagination');
if (totalPages <= 1) {
- pagination.innerHTML = `μ΄?${totalItems}κ±?/span>`;
+ pagination.innerHTML = `μ΄ ${totalItems}건`;
return;
}
let html = `Β« `;
- html += `??/button>`;
+ html += `βΉ `;
const maxVisible = 5;
let startPage = Math.max(1, currentPage - Math.floor(maxVisible / 2));
@@ -1104,9 +766,9 @@
html += `${i} `;
}
- html += `??/button>`;
+ html += `βΊ `;
html += `Β» `;
- html += `μ΄?${totalItems}κ±?/span>`;
+ html += `μ΄ ${totalItems}건`;
pagination.innerHTML = html;
}
@@ -1127,27 +789,27 @@
@@ -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 = ' ';
+ 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 => `
${h.date}
${h.quantity.toLocaleString()}
@@ -1260,10 +922,10 @@
`).join('');
}
} else {
- tbody.innerHTML = ` `;
+ tbody.innerHTML = ` `;
}
} catch (err) {
- tbody.innerHTML = ` `;
+ tbody.innerHTML = ` `;
}
}
@@ -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();
});
-
-
- μ΄??μκ°??κΈμ‘
- ?체 λ°ν ???/div>
+
νμκ°λ₯ κΈμ‘
+ μ 체 λ°ν κ°μΉ
-
+
-
+
-
+
-
+
-
+
-
+
-
- 3?? κΈμ‘
- κΈ΄κΈ ?μ ???/div>
+
3λ
+ κΈμ‘
+ κΈ΄κΈ μ²λ¦¬ κ°μΉ
-
+
-
+
-
+
-
- 2?? κΈμ‘
- μ£Όμ ???/div>
+
2λ
+ κΈμ‘
+ κ²ν κ°μΉ
- ?‘ ???λΈ?΄λ¦ ???
κ³ ?΄λ ₯ ?μΈ (?λ§€???°λ½μ²?
+ π‘ ν λλΈν΄λ¦ β μ
κ³ μ΄λ ₯ νμΈ (λλ§€μ μ°λ½μ²)
| κΈ΄κΈ | -?½ν | -?μΉ | -?μ¬κ³?/th> - | ?¨κ? | -?μκ°?₯κΈ??/th> - | λ§μ?λ§?μ²λ°© | -λ―Έμ¬??/th> - | λ§μ?λ§?? κ³ | -?ν | -?‘μ | +μ½ν | +μμΉ | +νμ¬κ³ | +λ¨κ° | +νμκ°λ₯κΈμ‘ | +λ§μ§λ§ μ²λ°© | +λ―Έμ¬μ© | +λ§μ§λ§ μ κ³ | +μν | +μ‘μ |
-
?°μ΄??λ‘λ© μ€?..
+ λ°μ΄ν° λ‘λ© μ€...
|
@@ -857,70 +520,70 @@
|---|
?°μ΄??λ‘λ© μ€?..
λ°μ΄ν° λ‘λ© μ€...
?€λ₯: ${data.error}
μ€λ₯: ${data.error}
λ°μ΄ν° λ‘λ μ€ν¨
?΄λΉ 쑰건??λ°ν ?λ³΄κ° ?μ΅?λ€
ν΄λΉ 쑰건μ λ°ν νλ³΄κ° μμ΅λλ€
${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 + 'κ°μ' : '-'}
??/div>
? κ³ ?΄λ ₯ μ‘°ν μ€?..
β³
μ κ³ μ΄λ ₯ μ‘°ν μ€...
?
? κ³ ?΄λ ₯???μ΅?λ€
π
μ κ³ μ΄λ ₯μ΄ μμ΅λλ€
${escapeHtml(h.supplier)}
- ${h.supplier_tel ? `? ${h.supplier_tel}
` : ''}
+ ${h.supplier_tel ? `π ${h.supplier_tel}
` : ''}
? οΈ
μ‘°ν ?€ν¨: ${data.error}
β οΈ
μ‘°ν μ€ν¨: ${data.error}
??/div>
?€λ₯: ${err.message}
β
μ€λ₯: ${err.message}