This commit is contained in:
2026-09-30 14:01:58 +08:00
parent f14e1a2ea3
commit 8c51e9c1cf
109 changed files with 1525 additions and 651 deletions
@@ -483,7 +483,25 @@ onMounted(() => {
<template>
<AdminPage as="div" class="location-page admin-density">
<ListPageLayout aria-label="库位列表页面">
<template #toolbar>
<section aria-label="库位列表区域"><DataTable appearance="integrated" :stripe="false" column-settings-mode="show" :results-visible="!loadError"
v-model:page="page"
v-model:page-size="pageSize"
:data="rows"
:columns="columns"
border
preference-key="locations-table"
:loading="loading"
:total="total"
:page-sizes="[20, 50, 100, 200]"
row-key="id"
aria-label="库位列表"
:empty-text="emptyDescription"
>
<template #toolbar-start><h1>库位管理</h1></template>
<template #filters>
<QueryToolbar
v-model="filters"
ariaLabel="库位筛选"
@@ -492,7 +510,7 @@ onMounted(() => {
@search="applyFilters"
/>
</template>
<template #state>
<template #notices>
<LoadErrorState
v-if="warehouseError"
title="仓库列表加载失败"
@@ -512,25 +530,9 @@ onMounted(() => {
/>
</template>
<section v-if="!loadError" class="surface-panel table-panel" aria-label="库位列表区域">
<DataTable
v-model:page="page"
v-model:page-size="pageSize"
:data="rows"
:columns="columns"
border
stripe
preference-key="locations-table"
:loading="loading"
:total="total"
:page-sizes="[20, 50, 100, 200]"
row-key="id"
aria-label="库位列表"
:empty-text="emptyDescription"
>
<template #toolbar-actions><el-button v-if="access.can('platform:location:create')" type="primary" @click="openCreate"><Plus :size="16" />新增库位</el-button></template>
<template #actions="{ row }">
<div class="location-actions density-actions">
<template #actions="{ row }"><div class="location-actions density-actions row-actions admin-text-actions">
<el-button
v-if="canEdit(row as PlatformLocationResource)"
size="small"
@@ -554,8 +556,7 @@ onMounted(() => {
:disabled="loading || actionLoadingIds.has(String((row as PlatformLocationResource).id))"
@click="removeLocation(row as PlatformLocationResource)"
>删除</el-button>
</div>
</template>
</div></template>
<template #location="{ row }">
<div class="location-cell">
<span><MapPin :size="17" /></span>
@@ -593,8 +594,7 @@ onMounted(() => {
</el-empty>
</template>
<template #pagination-left="{ total: tableTotal }"><span>共 {{ tableTotal }} 个库位</span></template>
</DataTable>
</section>
</DataTable></section>
</ListPageLayout>
<AppDialog