+
+ 標籤印表機監控(In Development)
+
+
+ 監控「印表機」設定中 type=Label 的設備:TCP 連線檢測,Zebra 機型另讀取內建里程表(odometer)。
+ 應用層列印統計來自 Bag3 標籤機提交(LABEL channel),不含網頁直接列印。
+
+
+ {offlineCount > 0 && (
+
+ 有 {offlineCount} 台標籤印表機無法連線,請檢查電源、網路或 IP/Port。
+
+ )}
+
+ {summary && (
+
+
+
+
+
+ {summary.unchecked > 0 && (
+
+ )}
+
+ )}
+
+ {error &&
{error}}
+
+
+ 標籤印表機狀態
+
+
+
+
+
+ 狀態
+ 印表機
+ 品牌
+ IP:Port
+
+
+ 累計里程
+
+
+
+
+
+
+
+ 自上次檢查
+
+
+
+
+
+ 延遲 (ms)
+ 最後檢查
+
+
+
+ {loading && printers.length === 0 ? (
+
+
+
+
+
+ ) : printers.length === 0 ? (
+
+
+ 沒有 Label 類型印表機
+
+
+ ) : (
+ printers.map((row) => {
+ const st = STATUS_LABEL[row.status] ?? STATUS_LABEL.unchecked;
+ const showOdometer = isZebra(row.brand);
+ return (
+
+
+
+
+
+
+ {row.name || row.code || `#${row.id}`}
+
+ {row.code && row.name && (
+
+ {row.code}
+
+ )}
+ {row.errorMessage && (
+
+ {row.errorMessage}
+
+ )}
+
+ {row.brand ?? "—"}
+
+ {row.ip ? `${row.ip}:${row.port ?? 9100}` : "—"}
+
+
+ {showOdometer
+ ? row.odometerTotal != null
+ ? row.odometerTotal.toLocaleString()
+ : "—"
+ : "—"}
+
+
+ {showOdometer && row.deltaSincePrevious != null
+ ? row.deltaSincePrevious.toLocaleString()
+ : "—"}
+
+
+ {row.latencyMs != null ? row.latencyMs : "—"}
+
+ {formatApiDateTime(row.lastCheckAt)}
+
+ );
+ })
+ )}
+
+
+
+
+
+ 應用層標籤列印(LABEL)
+
+ {labelStats && (
+
+
+
+
+ )}
+
+
+
+
+ 時間
+ 工單
+ 數量
+
+
+
+ {!labelStats?.recentSubmits?.length ? (
+
+
+ 尚無 LABEL 列印提交記錄
+
+
+ ) : (
+ labelStats.recentSubmits.map((row) => (
+
+ {formatApiDateTime(row.created)}
+
+ {row.jobCode ?? (row.jobOrderId != null ? `#${row.jobOrderId}` : "—")}
+
+ {row.qty ?? "—"}
+
+ ))
+ )}
+
+
+
+
+ {loading && printers.length > 0 && (
+
+
+
+ )}
+
+ );
+}
diff --git a/src/components/DoSearch/DoReplenishmentTab.tsx b/src/components/DoSearch/DoReplenishmentTab.tsx
index 3e77785..c69bbdd 100644
--- a/src/components/DoSearch/DoReplenishmentTab.tsx
+++ b/src/components/DoSearch/DoReplenishmentTab.tsx
@@ -1172,6 +1172,7 @@ const DoReplenishmentTab: React.FC = () => {
)}
+
{sourceDo && (