feat: standardize default page size to 20, add pagination to pick list, and fix table horizontal scrollbar visibility

This commit is contained in:
DXC
2026-03-23 14:38:08 +08:00
parent c5974ff05c
commit 08c921fe66
4 changed files with 41 additions and 7 deletions

View File

@ -139,6 +139,7 @@
highlight-current-row
header-cell-class-name="table-header-gray"
@sort-change="handleSortChange"
height="calc(100vh - 300px)"
>
<template v-for="col in allColumns" :key="col.prop">
<el-table-column
@ -239,7 +240,7 @@
v-model:current-page="queryParams.page"
v-model:page-size="queryParams.pageSize"
:total="total"
:page-sizes="[100, 200, 500, 1000]"
:page-sizes="[20, 50, 100, 200]"
layout="total, sizes, prev, pager, next, jumper"
background
@size-change="fetchData"
@ -794,7 +795,7 @@ const companyOptions = ref<string[]>([])
const queryParams = reactive({
page: 1,
pageSize: 50,
pageSize: 20,
keyword: '',
searchField: 'all',
sku: '',

View File

@ -143,6 +143,7 @@
header-cell-class-name="table-header-gray"
@sort-change="handleSortChange"
:key="hasColumnPermission('sn_bn') ? 'sn' : 'nosn'"
height="calc(100vh - 300px)"
>
<template v-for="col in allColumns" :key="col.prop">
<el-table-column
@ -231,7 +232,17 @@
</el-table-column>
</el-table>
<el-pagination class="pagination-bar" v-model:current-page="queryParams.page" v-model:page-size="queryParams.pageSize" :total="total" layout="total, sizes, prev, pager, next" background @change="fetchData" />
<el-pagination
class="pagination-bar"
v-model:current-page="queryParams.page"
v-model:page-size="queryParams.pageSize"
:total="total"
:page-sizes="[20, 50, 100, 200]"
layout="total, sizes, prev, pager, next, jumper"
background
@size-change="fetchData"
@current-change="fetchData"
/>
<el-dialog v-model="visible" :title="dialogStatus === 'create' ? '成品入库' : '编辑成品'" width="min(1000px, 95vw)" top="5vh" :close-on-click-modal="!isUploading" :close-on-press-escape="!isUploading" :show-close="!isUploading" class="stylish-dialog compact-layout">
<div class="dialog-scroll-container">
@ -615,7 +626,7 @@ const formRef = ref()
// 上传锁定状态
const isUploading = ref(false)
const queryParams = reactive({ page: 1, pageSize: 50, keyword: '', searchField: 'all', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
const queryParams = reactive({ page: 1, pageSize: 20, keyword: '', searchField: 'all', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
const categoryOptions = ref<string[]>([])
const typeOptions = ref<string[]>([])
const companyOptions = ref<string[]>([]) // [新增]

View File

@ -155,6 +155,7 @@
highlight-current-row
header-cell-class-name="table-header-gray"
@sort-change="handleSortChange"
height="calc(100vh - 300px)"
>
<template v-for="col in allColumns" :key="col.prop">
<el-table-column
@ -263,7 +264,7 @@
v-model:current-page="queryParams.page"
v-model:page-size="queryParams.pageSize"
:total="total"
:page-sizes="[100, 200, 500, 1000]"
:page-sizes="[20, 50, 100, 200]"
layout="total, sizes, prev, pager, next, jumper"
background
@size-change="fetchData"
@ -684,7 +685,7 @@ const formRef = ref()
// 上传锁定状态
const isUploading = ref(false)
const queryParams = reactive({ page: 1, pageSize: 50, keyword: '', searchField: 'all', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
const queryParams = reactive({ page: 1, pageSize: 20, keyword: '', searchField: 'all', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
const categoryOptions = ref<string[]>([])
const typeOptions = ref<string[]>([])
const companyOptions = ref<string[]>([]) // [新增]