From d14b265066f2798c76e61263317a27d15266dcc5 Mon Sep 17 00:00:00 2001 From: "yang.yongquan" <3395816735@qq.com> Date: Mon, 2 Jan 2023 10:18:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=95=8C=E9=9D=A2=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Invoice/mine/InvoiceListView.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/pages/Invoice/mine/InvoiceListView.tsx b/src/pages/Invoice/mine/InvoiceListView.tsx index 248aa0c..7dce463 100644 --- a/src/pages/Invoice/mine/InvoiceListView.tsx +++ b/src/pages/Invoice/mine/InvoiceListView.tsx @@ -258,21 +258,22 @@ class InvoiceListView extends React.Component { invoiceNo: null, invoiceCode: null, invoiceSearchOption: new InvoiceSearchOption(), - pageNum: 1, - pageSize: 20, - totalNum: 2, - PaginationKey: -2 + totalNum : 200, + PaginationKey : -200 } } - + pageNum:Number = 1; + pageSize:Number = 20; componentDidMount(){ this.searchInvoiceContent() } onChange = (pageCurrentNum: Number, pageCurrentSize: Number) => { console.log(pageCurrentNum, pageCurrentSize) - this.setState({pageNum: pageCurrentNum, pageSize: pageCurrentSize}) - console.log(this.state.pageNum, this.state.pageSize) + // this.setState({pageNum: pageCurrentNum, pageSize: pageCurrentSize}) + this.pageNum = pageCurrentNum; + this.pageSize = pageCurrentSize + console.log(this.pageNum, this.pageSize) this.searchInvoiceContent() } @@ -289,8 +290,9 @@ class InvoiceListView extends React.Component { params[key] = null } }) - params['pageNum'] = this.state.pageNum-1 - params['pageSize'] = this.state.pageSize + // @ts-ignore + params['pageNum'] = this.pageNum-1 + params['pageSize'] = this.pageSize axiosInstance({ url: 'common/invoice', method: 'get',