|
@@ -95,7 +95,10 @@
|
|
|
|
|
|
|
|
<a-table row-key="id" :loading="loading" :pagination="pagination" :summary="true" summary-text="汇总"
|
|
<a-table row-key="id" :loading="loading" :pagination="pagination" :summary="true" summary-text="汇总"
|
|
|
:columns="(cloneColumns as TableColumnData[])" :scroll="scroll" :scrollbar="scrollbar"
|
|
:columns="(cloneColumns as TableColumnData[])" :scroll="scroll" :scrollbar="scrollbar"
|
|
|
- :data="renderData" :bordered="false" :size="size" :load-more="loadMore" @page-change="onPageChange">
|
|
|
|
|
|
|
+ :data="renderData" :bordered="false" :size="size" :load-more="loadMore" @page-change="onPageChange"
|
|
|
|
|
+ @page-size-change="onPageSizeChange">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<template #xAxis="{ record }">
|
|
<template #xAxis="{ record }">
|
|
|
{{ dayjs(record.belongTime).format('YYYY-MM-DD') }}
|
|
{{ dayjs(record.belongTime).format('YYYY-MM-DD') }}
|
|
|
</template>
|
|
</template>
|
|
@@ -190,6 +193,13 @@ const basePagination: Pagination = {
|
|
|
};
|
|
};
|
|
|
const pagination = reactive({
|
|
const pagination = reactive({
|
|
|
...basePagination,
|
|
...basePagination,
|
|
|
|
|
+ showTotal: true,
|
|
|
|
|
+ showJumper: true,
|
|
|
|
|
+ showMore: true,
|
|
|
|
|
+ showPageSize: true,
|
|
|
|
|
+ pageSizeOptions: [10, 20, 30, 31, 50, 100, 200, 500],
|
|
|
|
|
+ sizePageSize: true,
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
const densityList = computed(() => [
|
|
const densityList = computed(() => [
|
|
|
{
|
|
{
|
|
@@ -286,12 +296,14 @@ const toAmount = (val: any): any => {
|
|
|
const fetchData = async (
|
|
const fetchData = async (
|
|
|
params: TkSettleBillsParams = {
|
|
params: TkSettleBillsParams = {
|
|
|
current: 1,
|
|
current: 1,
|
|
|
- pageSize: 30,
|
|
|
|
|
|
|
+ pageSize: basePagination.pageSize,
|
|
|
sort: 'belongTime',
|
|
sort: 'belongTime',
|
|
|
order: 'descending',
|
|
order: 'descending',
|
|
|
}
|
|
}
|
|
|
) => {
|
|
) => {
|
|
|
|
|
+ console.log(basePagination, params)
|
|
|
setLoading(true);
|
|
setLoading(true);
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
console.log(params)
|
|
console.log(params)
|
|
|
if (params.keyword) {
|
|
if (params.keyword) {
|
|
@@ -385,6 +397,17 @@ const onPageChange = (current: number) => {
|
|
|
current
|
|
current
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+const onPageSizeChange = (current: number) => {
|
|
|
|
|
+ basePagination.pageSize = current;
|
|
|
|
|
+ pagination.pageSize = current;
|
|
|
|
|
+ fetchData({
|
|
|
|
|
+ ...basePagination,
|
|
|
|
|
+ ...formModel.value,
|
|
|
|
|
+ pageSize: current,
|
|
|
|
|
+ current: 1,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
fetchData({ ...formModel.value } as unknown as TkSettleBillsParams);
|
|
fetchData({ ...formModel.value } as unknown as TkSettleBillsParams);
|
|
|
const reset = () => {
|
|
const reset = () => {
|
|
|
formModel.value = generateFormModel();
|
|
formModel.value = generateFormModel();
|