fix(query-tool): export all selected CIDs instead of single, fix hold detail float precision

Export was sending only one container_id while the detail table loaded
data for all selected CIDs (including subtree), causing "查無資料" errors.
Now sends container_ids array and uses batch service functions.

Also rounds hold detail age KPI cards to 1 decimal place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
egg
2026-02-24 18:41:24 +08:00
parent bb6eec6a87
commit 7fffa812a3
4 changed files with 623 additions and 452 deletions

View File

@@ -17,7 +17,8 @@ function formatAge(value) {
if (value === null || value === undefined || value === '-') {
return '-';
}
return `${value}`;
const num = Number(value);
return `${Number.isFinite(num) ? num.toFixed(1) : value}`;
}
</script>

View File

@@ -378,9 +378,9 @@ export function useLotDetail(initial = {}) {
async function exportSubTab(tab) {
const normalized = normalizeSubTab(tab);
const exportType = EXPORT_TYPE_MAP[normalized];
const containerId = selectedContainerId.value;
const cids = getActiveCids();
if (!exportType || !containerId) {
if (!exportType || cids.length === 0) {
return false;
}
@@ -389,7 +389,7 @@ export function useLotDetail(initial = {}) {
try {
const params = {
container_id: containerId,
container_ids: cids,
};
if (normalized === 'jobs') {