This commit is contained in:
2026-08-06 19:03:13 +08:00
parent 7034a40aa8
commit 8695eee8c8
28 changed files with 1100 additions and 162 deletions
@@ -42,10 +42,11 @@ type ExpressCompanyFilters = QueryModel & {
const filters = ref<ExpressCompanyFilters>({ keyword: '', status: '' })
const appliedFilters = ref<ExpressCompanyFilters>({ ...filters.value })
const queryFields = computed<QueryField[]>(() => [
{ key: 'keyword', type: 'input', placeholder: '快递公司名称或编码', props: { maxlength: 128, 'aria-label': '快递公司关键词' } },
{ key: 'keyword', type: 'input', label: '快递公司关键词', placeholder: '快递公司名称或编码', props: { maxlength: 128, 'aria-label': '快递公司关键词' } },
{
key: 'status',
type: 'select',
label: '状态',
placeholder: '全部状态',
props: { 'aria-label': '快递公司状态' },
options: [
@@ -115,11 +116,11 @@ function formatUpdatedAt(value?: string | null) {
const expressCompanyColumns: DataTableColumn[] = [
{ key: 'actions', label: '操作', width: 170, fixed: 'left', slotName: 'actions' },
{ key: 'company', label: '快递公司', minWidth: 210, slotName: 'company' },
{ prop: 'servicePhone', label: '客服电话', minWidth: 130, formatter: (row: PlatformExpressCompanyResource) => row.servicePhone || '—' },
{ key: 'servicePhone', prop: 'servicePhone', label: '客服电话', minWidth: 130, formatter: (row: PlatformExpressCompanyResource) => row.servicePhone || '—' },
{ key: 'website', label: '官方网站', minWidth: 210, slotName: 'website' },
{ key: 'trackingUrlTemplate', label: '轨迹查询模板', minWidth: 260, slotName: 'trackingUrlTemplate' },
{ key: 'remark', label: '备注', minWidth: 200, slotName: 'remark' },
{ prop: 'updatedAt', label: '更新时间', minWidth: 150, formatter: (row: PlatformExpressCompanyResource) => formatUpdatedAt(row.updatedAt) },
{ key: 'updatedAt', prop: 'updatedAt', label: '更新时间', minWidth: 150, formatter: (row: PlatformExpressCompanyResource) => formatUpdatedAt(row.updatedAt) },
{ key: 'status', label: '状态', width: 100, slotName: 'status' },
]
@@ -279,7 +280,7 @@ onMounted(() => {
<el-button size="small" @click="loadExpressCompanies()">重新查询</el-button>
</el-alert>
<QueryToolbar v-model="filters" class="surface-panel" ariaLabel="快递公司筛选" :fields="queryFields" @search="applyFilters" />
<QueryToolbar v-model="filters" class="surface-panel" ariaLabel="快递公司筛选" :fields="queryFields" preference-key="express-companies-query" @search="applyFilters" />
<section class="surface-panel table-panel">
<div class="panel-heading">
@@ -297,6 +298,7 @@ onMounted(() => {
v-model:page-size="pageSize"
:data="rows"
:columns="expressCompanyColumns"
preference-key="express-companies-table"
:loading="loading"
:total="total"
:page-sizes="[20, 50, 100]"