This commit is contained in:
Taric Xin
2022-05-06 15:45:47 +08:00
parent 9f499e7536
commit cddcc53a0c
7 changed files with 137 additions and 266 deletions

View File

@ -1,27 +1,20 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom';
import { TaxManagementService } from '../../services/tax-management.service';
// import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component';
// import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component';
@Component({
selector: 'app-tax-management-individual-declare',
templateUrl: './individual-declare.component.html',
styleUrls: ['./individual-declare.component.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class TaxManagementIndividualDeclareComponent implements OnInit {
_$expand = false;
ui!: SFUISchema;
schema!: SFSchema;
export class TaxManagementIndividualDeclareComponent extends BasicTableComponent implements OnInit {
columns!: STColumn[];
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
tabType!: string;
tabs: any[] = [
{ name: '待申报', value: '0' },
@ -37,16 +30,10 @@ export class TaxManagementIndividualDeclareComponent implements OnInit {
public service: TaxManagementService,
private router: Router,
private ar: ActivatedRoute,
public shipperservice: ShipperBaseService,
private modal: NzModalService,
public shipperSrv: ShipperBaseService
) {}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
@ -70,21 +57,6 @@ export class TaxManagementIndividualDeclareComponent implements OnInit {
return this.st?.list.filter((item: any) => item.checked) || [];
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 程序初始化入口
*/
@ -134,13 +106,10 @@ export class TaxManagementIndividualDeclareComponent implements OnInit {
placeholder: '请选择',
widget: 'dict-select',
params: { dictKey: 'taxincome:declare:status' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containsAllLabel: true
}
},
isOvertime: {
title: '是否逾期',
type: 'string',
@ -152,10 +121,7 @@ export class TaxManagementIndividualDeclareComponent implements OnInit {
ui: {
placeholder: '请选择',
widget: 'select',
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containsAllLabel: true
},
default: ''
},
@ -165,10 +131,7 @@ export class TaxManagementIndividualDeclareComponent implements OnInit {
ui: {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
declareDate: {
@ -177,10 +140,7 @@ export class TaxManagementIndividualDeclareComponent implements OnInit {
ui: {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
ltdId: {
@ -190,18 +150,11 @@ export class TaxManagementIndividualDeclareComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
asyncData: () => this.service.getNetworkFreightForwarder()
}
}
}
};
this.ui = {
'*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.search() },
$time: { grid: { span: 24 } }
};
}
/**