task-284(收尾/在途批次): 页头按钮归位卡内toolbar+店铺数据记录改名+弹窗报错清除; Java page_size配对/按角色数据范围过滤/撞款导出XLSX/Excel图改WPS DISPIMG/V110查询索引
This commit is contained in:
@@ -299,10 +299,6 @@ onMounted(loadTree)
|
||||
<h2>商品类目</h2>
|
||||
<p>维护商品类目树与类目名称/说明;有子类目节点不可删除。</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<el-button type="primary" @click="openCreate(null)">新增类目</el-button>
|
||||
<el-button @click="exportCategories">导出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" style="margin-bottom: 14px">
|
||||
@@ -314,6 +310,14 @@ onMounted(loadTree)
|
||||
</el-card>
|
||||
|
||||
<el-card v-if="!searching" shadow="never">
|
||||
<div class="table-toolbar">
|
||||
<div class="tb-buttons">
|
||||
<el-button type="primary" @click="openCreate(null)">新增类目</el-button>
|
||||
<el-button :disabled="!selected" @click="openCreate(selected)">新增子类目</el-button>
|
||||
<el-button @click="exportCategories">导出</el-button>
|
||||
</div>
|
||||
<span class="dim">{{ selected ? `已选:${selected.path || selected.name}` : '未选中节点' }}</span>
|
||||
</div>
|
||||
<el-table v-loading="loading" :data="treeRows" row-key="node.id" :class="{ 'tree-table': true }">
|
||||
<el-table-column label="类目名称" min-width="320">
|
||||
<template #default="{ row }">
|
||||
@@ -379,18 +383,15 @@ onMounted(loadTree)
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="tree-actions">
|
||||
<span class="dim">{{ selected ? `已选:${selected.path || selected.name}` : '未选中节点' }}</span>
|
||||
<span class="btn-group">
|
||||
<el-button size="small" :disabled="!selected" @click="openCreate(selected)">新增子类目</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card v-else shadow="never">
|
||||
<div class="search-head">
|
||||
<span>搜索结果:共 {{ searchTotal.toLocaleString() }} 条</span>
|
||||
<span class="dim">{{ keyword }}</span>
|
||||
<div class="table-toolbar">
|
||||
<div class="tb-buttons">
|
||||
<el-button type="primary" @click="openCreate(null)">新增类目</el-button>
|
||||
<el-button @click="exportCategories">导出</el-button>
|
||||
</div>
|
||||
<span class="dim">搜索结果:共 {{ searchTotal.toLocaleString() }} 条{{ keyword ? ` · ${keyword}` : '' }}</span>
|
||||
</div>
|
||||
<el-table v-loading="searchLoading" :data="searchRows" stripe border>
|
||||
<el-table-column prop="name" label="类目名称" min-width="180" />
|
||||
@@ -449,13 +450,10 @@ onMounted(loadTree)
|
||||
|
||||
<style scoped>
|
||||
.page-heading { display: flex; justify-content: space-between; align-items: center; }
|
||||
.actions { display: flex; align-items: center; gap: 10px; }
|
||||
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
|
||||
.tb-buttons { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.filter-row { display: flex; gap: 10px; align-items: center; }
|
||||
.tree-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; border-top: 1px solid var(--el-border-color-lighter); padding-top: 12px; }
|
||||
.dim { color: var(--el-text-color-secondary); font-size: 12px; }
|
||||
.btn-group { display: inline-flex; gap: 6px; }
|
||||
.search-head { display: flex; justify-content: space-between; margin-bottom: 12px; }
|
||||
.load-more-row { text-align: center; margin-top: 12px; }
|
||||
/* 树形表格(对齐旧版 panel-product-categories):缩进 + [+/−] 折叠标记 + 粗体名称。 */
|
||||
.tree-name-cell { display: flex; align-items: center; gap: 8px; min-height: 24px; }
|
||||
.tree-indent { flex: 0 0 auto; width: var(--indent, 0px); }
|
||||
|
||||
@@ -25,7 +25,7 @@ export async function searchProductCategories(
|
||||
page: number,
|
||||
pageSize: number,
|
||||
): Promise<ProductCategorySearchPage> {
|
||||
const params: Record<string, string | number> = { page, pageSize }
|
||||
const params: Record<string, string | number> = { page, page_size: pageSize }
|
||||
const trimmed = keyword.trim()
|
||||
if (trimmed) params.keyword = trimmed
|
||||
const { data } = await http.get<unknown>(`${PRODUCT_CATEGORY_ENDPOINT}/search`, { params })
|
||||
|
||||
Reference in New Issue
Block a user