Browse Source

修复分页bug

dev-xx
qb 9 months ago
parent
commit
a03e49b465
  1. 20
      src/views/warehouse/prewarehousing/PreStoragePackage.vue

20
src/views/warehouse/prewarehousing/PreStoragePackage.vue

@ -98,9 +98,9 @@
background background
@size-change="sizeChange" @size-change="sizeChange"
@current-change="currentChange" @current-change="currentChange"
:current-page="page.currentPage" :current-page="page.current"
:page-sizes="[30, 50, 80, 120]" :page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize" :page-size="page.size"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="page.total" :total="page.total"
> >
@ -207,8 +207,8 @@ const details = reactive<any>({
drawerShow: false, drawerShow: false,
/** 分页参数 */ /** 分页参数 */
page: { page: {
currentPage: 1, current: 1,
pageSize: 30, size: 30,
total: 0, total: 0,
}, },
/** 列表Dom节点 */ /** 列表Dom节点 */
@ -262,7 +262,7 @@ const onLoad = async (params = {}) => {
}; };
const initOnLoad = (params = {}) => { const initOnLoad = (params = {}) => {
details.page.pageNum = 1; details.page.current = 1;
details.page.total = 0; details.page.total = 0;
onLoad(params); onLoad(params);
}; };
@ -278,7 +278,7 @@ const searchChange = () => {
const searchReset = () => { const searchReset = () => {
details.query = {}; details.query = {};
details.stockupDate = []; details.stockupDate = [];
details.page.currentPage = 1; details.page.current = 1;
handleClearTableQuery(details.columnList); handleClearTableQuery(details.columnList);
initOnLoad(); initOnLoad();
}; };
@ -326,14 +326,14 @@ const selectionChange = (list: any) => {
}; };
/** 每页数量改变执行的回调 */ /** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => { const sizeChange = (size: number) => {
details.page.pageSize = pageSize; details.page.size = size;
initOnLoad(); initOnLoad();
}; };
/** 页码改变执行的回调 */ /** 页码改变执行的回调 */
const currentChange = pageNum => { const currentChange = current => {
details.page.pageNum = pageNum; details.page.current = current;
onLoad(); onLoad();
}; };

Loading…
Cancel
Save