This commit is contained in:
2026-08-26 20:39:55 +08:00
parent 7b50e92baf
commit 38031b0fa0
13 changed files with 122 additions and 71 deletions
@@ -11,14 +11,14 @@ import ListPageLayout from '@/shared/components/ListPageLayout.vue'
import LoadErrorState from '@/shared/components/LoadErrorState.vue'
import QueryToolbar, { type QueryField, type QueryModel } from '@/shared/components/QueryToolbar.vue'
import { getInventorySummary, listInventoryBalances, type InventoryDashboardDto } from '../api/inventory'
import { listCustomerWarehouses, type CustomerWarehouseDto } from '../api/pallets'
import { listReceivingOverseasWarehouses, type ReceivingOverseasWarehouseDto } from '../api/pallets'
import { toInventoryListItem } from '../inventoryPresentation'
import { overseasWarehousePermissions } from '../permissions'
import type { InventoryListItem } from '../types'
const router = useRouter()
const access = useAccessPreviewStore()
const warehouses = ref<CustomerWarehouseDto[]>([])
const warehouses = ref<ReceivingOverseasWarehouseDto[]>([])
const rows = ref<InventoryListItem[]>([])
const summary = ref<InventoryDashboardDto | null>(null)
const loading = ref(false)
@@ -59,7 +59,7 @@ const columns: DataTableColumn[] = [
async function loadWarehouses() {
if (!access.can(overseasWarehousePermissions.warehouseList)) return
contextLoading.value = true; loadError.value = null
try { warehouses.value = (await listCustomerWarehouses()).records }
try { warehouses.value = (await listReceivingOverseasWarehouses()).records }
catch (error) { loadError.value = getApiErrorDetails(error, '海外仓列表加载失败,请重试') }
finally { contextLoading.value = false }
}