diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html index 8dd9149..282b88a 100644 --- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html +++ b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.html @@ -114,6 +114,7 @@ [nzLoading]="tableLoading" [nzPageIndex]="whereObject.pageNum" (nzPageIndexChange)="requestData($event)" + (nzPageSizeChange)="pageSizeChange($event)" [nzScroll]="{ x: '1150px'}"> diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts index c4186a5..e1eaa15 100644 --- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts +++ b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts @@ -10,7 +10,7 @@ import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {TySalesmanService} from '../../../services/ty-salesman.service'; import {TyAgentPriceService} from '../../../services/ty-agent-price.service'; import {GasService} from '../../../services/gas.service'; -import {CommonsService} from "../../../services/commons.service"; +import {CommonsService} from '../../../services/commons.service'; @Component({ selector: 'app-petrol-station-manage', @@ -29,7 +29,9 @@ export class PetrolStationManageComponent implements OnInit { tableLoading = true; searchForm: FormGroup; pageNum: number; - whereObject: any = {}; + whereObject: any = { + pageSize: 10 + }; allChecked = false; checkedData = []; @@ -122,7 +124,6 @@ export class PetrolStationManageComponent implements OnInit { requestData(pageNum) { this.tableLoading = true; this.whereObject['pageNum'] = pageNum; - this.whereObject['pageSize'] = 10; this.tyAgentOilStationService.getOilStationList(this.whereObject, data => { if (data['return_code'] === '000000') { this.dataObject = data['return_data']; @@ -829,7 +830,7 @@ export class PetrolStationManageComponent implements OnInit { } submitOilDisabled(oilStationId: number, oilNo: string) { - this.gasService.disabledOil({ storeId: oilStationId, oilNo: oilNo }, data => { + this.gasService.disabledOil({ storeId: oilStationId, oilNo }, data => { if (data['return_code'] === '000000') { this.modal.success({ nzTitle: '提示', @@ -849,7 +850,7 @@ export class PetrolStationManageComponent implements OnInit { * 油品启用提示 */ showOilEnableConfirm(oilStationId: number, oilNo: string): void { - this.gasService.enableOil({ storeId: oilStationId, oilNo: oilNo }, data => { + this.gasService.enableOil({ storeId: oilStationId, oilNo }, data => { if (data['return_code'] === '000000') { this.modal.success({ nzTitle: '提示', @@ -885,6 +886,11 @@ export class PetrolStationManageComponent implements OnInit { } }); } + + pageSizeChange(pageSize: number) { + this.whereObject.pageSize = pageSize; + this.requestData(1); + } } export class PetrolStationManage {