UI
This commit is contained in:
@ -2,28 +2,34 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { SearchDrawerService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { BasicTableComponent } from 'src/app/routes/commom';
|
||||
import { TicketService } from '../../services/ticket.service';
|
||||
import { TransactionDetailsComponent } from './transaction-details/transaction-details.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-etc-invoiced-list',
|
||||
templateUrl: './etc-invoiced-list.component.html',
|
||||
styleUrls: ['../../../commom/less/box.less']
|
||||
styleUrls: ['../../../commom/less/commom-table.less']
|
||||
})
|
||||
export class ETCInvoicedListComponent implements OnInit {
|
||||
export class ETCInvoicedListComponent extends BasicTableComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
schema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, public searchDrawerService: SearchDrawerService) {
|
||||
super(searchDrawerService);
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
search() {
|
||||
this.st?.load(1);
|
||||
}
|
||||
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
@ -52,22 +58,6 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/expand', this._$expand);
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
@ -106,10 +96,7 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'etc:invoicing:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
@ -122,10 +109,7 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }),
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q })
|
||||
}
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
@ -135,9 +119,6 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
asyncData: () => this.service.getNetworkFreightForwarder()
|
||||
},
|
||||
default: ''
|
||||
|
||||
Reference in New Issue
Block a user