fix: printPaaiResult 전역 함수로 변경
- async function → window.printPaaiResult = async function - WebSocket 이벤트에서 호출 가능하도록 전역 노출
This commit is contained in:
@@ -2678,8 +2678,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PAAI 결과 인쇄
|
// PAAI 결과 인쇄 (전역)
|
||||||
async function printPaaiResult(preSerial, patientName, result) {
|
window.printPaaiResult = async function(preSerial, patientName, result) {
|
||||||
if (!autoPrintEnabled) {
|
if (!autoPrintEnabled) {
|
||||||
console.log('[AutoPrint] 비활성화됨');
|
console.log('[AutoPrint] 비활성화됨');
|
||||||
return;
|
return;
|
||||||
@@ -2687,7 +2687,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('[AutoPrint] 인쇄 요청:', preSerial);
|
console.log('[AutoPrint] 인쇄 요청:', preSerial);
|
||||||
const response = await fetch('/pmr/api/paai/print', {
|
var response = await fetch('/pmr/api/paai/print', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {'Content-Type': 'application/json'},
|
headers: {'Content-Type': 'application/json'},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
@@ -2697,7 +2697,7 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
var data = await response.json();
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
console.log('[AutoPrint] 인쇄 완료');
|
console.log('[AutoPrint] 인쇄 완료');
|
||||||
showToast('인쇄 완료: ' + patientName, 'success');
|
showToast('인쇄 완료: ' + patientName, 'success');
|
||||||
|
|||||||
Reference in New Issue
Block a user