From 1e7d839973441608e5d289c71ae1f4aacc86c5f8 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 12 Apr 2022 15:44:07 +0800 Subject: [PATCH] edit --- .../individual-income.component.html | 2 +- .../individual-income.component.ts | 21 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.html b/src/app/routes/tax-management/components/individual-income/individual-income.component.html index dedb0881..56db2766 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.html +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.html @@ -36,7 +36,7 @@ + [req]="{ process: beforeReq }" [page]="{}" [loading]="service.http.loading" (change)="stChange($event)"> diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index c55b07de..15583442 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; +import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; @@ -32,16 +32,15 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { constructor(public service: TaxManagementService) {} - /** - * 查询参数 - */ - get reqParams() { - const params = Object.assign({}, this.sf?.value || {}, { - declareStatus: this.selectedIndex - }); - delete params._$expand; - return { ...params }; - } + beforeReq = (requestOptions: STRequestOptions) => { + Object.assign(requestOptions.body, { declareStatus: this.selectedIndex }); + if (this.sf) { + Object.assign(requestOptions.body, { ...this.sf.value }); + delete requestOptions.body._$expand; + } + this.selectedRows = []; + return requestOptions; + }; stChange(e: STChange): void { switch (e.type) {