liting2017 7 years ago
parent
commit
2cbc1a6640

+ 6 - 3
js/component/manageCenter/customer/customerData/companyCustomer.jsx

@@ -130,10 +130,13 @@ const PublicCustomer = Form.create()(React.createClass({
 							locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
 						});
 					};
-
+					this.state.pagination.current = data.data.pageNo;
+				    this.state.pagination.total = data.data.totalCount;
 				};
-				this.state.pagination.current = data.data.pageNo ? data.data.pageNo : '0';
-				this.state.pagination.total = data.data.totalCount ? data.data.totalCount : '0';
+				if(!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				}
 				this.setState({
 					dataSource: theArr,
 					pagination: this.state.pagination,

+ 6 - 3
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -128,10 +128,13 @@ const MyClient = Form.create()(React.createClass({
 							locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
 						});
 					};
-
+					this.state.pagination.current = data.data.pageNo;
+				    this.state.pagination.total = data.data.totalCount;
 				};
-				this.state.pagination.current = data.data.pageNo ? data.data.pageNo : '0';
-				this.state.pagination.total = data.data.totalCount ? data.data.totalCount : '0';
+				if(!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
 				this.setState({
 					dataSource: theArr,
 					pagination: this.state.pagination,

+ 4 - 1
js/component/manageCenter/customer/customerService/myBusiness.jsx

@@ -59,7 +59,10 @@ const MyBusiness = Form.create()(React.createClass({
                     this.state.pagination.current = data.data.pageNo;
                	    this.state.pagination.total = data.data.totalCount;
                 };
-                
+                if(!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				}
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination,

+ 4 - 1
js/component/manageCenter/customer/customerService/serviceQuery.jsx

@@ -56,7 +56,10 @@ const ServiceQuery= Form.create()(React.createClass({
                     this.state.pagination.current = data.data.pageNo;
                     this.state.pagination.total = data.data.totalCount;
                 };
-               
+                if(!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				}
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination,

+ 5 - 2
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx

@@ -136,9 +136,12 @@ const IndividualCustomer = Form.create()(React.createClass({
 						});
 					};
 					this.state.pagination.current = data.data.pageNo;
-					this.state.pagination.total = data.data.totalCount;
+				    this.state.pagination.total = data.data.totalCount;
 				};
-
+				if(!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				}
 				this.setState({
 					dataSource: theArr,
 					pagination: this.state.pagination,

+ 4 - 1
js/component/manageCenter/customer/individualCustomer/queryCustomer.jsx

@@ -139,7 +139,10 @@ const QueryCustomer = Form.create()(React.createClass({
 					this.state.pagination.current = data.data.pageNo ;
 					this.state.pagination.total = data.data.totalCount ;
 				};
-				
+				if(!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
 				this.setState({
 					dataSource: theArr,
 					pagination: this.state.pagination,

+ 4 - 0
js/component/manageCenter/customer/statistics/followStatistics.jsx

@@ -78,6 +78,10 @@ const FollowStatistics = React.createClass({
 					this.state.pagination.current = data.data.pageNo;
 					this.state.pagination.total = data.data.totalCount;
 				};
+				if(!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				}
 				this.setState({
 					dataSource: theArr,
 					pagination: this.state.pagination,

+ 4 - 0
js/component/manageCenter/customer/statistics/statusStatistics.jsx

@@ -77,6 +77,10 @@ const StatusStatistics = React.createClass({
 					this.state.pagination.current = data.data.pageNo;
 					this.state.pagination.total = data.data.totalCount;
 				};
+				if(!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				}
 				this.setState({
 					dataSource: theArr,
 					pagination: this.state.pagination

+ 4 - 0
js/component/manageCenter/customer/statistics/visitStatistics.jsx

@@ -77,6 +77,10 @@ const VisitStatistics = React.createClass({
 					this.state.pagination.current = data.data.pageNo;
 					this.state.pagination.total = data.data.totalCount;
 				};
+				if(!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				}
 				this.setState({
 					dataSource: theArr,
 					pagination: this.state.pagination