This commit is contained in:
Taric Xin
2022-05-06 14:24:12 +08:00
parent 2c8f8250e4
commit 1851f9e6d8
25 changed files with 409 additions and 637 deletions

View File

@ -1,28 +1,29 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { BasicTableComponent } from 'src/app/routes/commom';
import { TicketService } from '../../services/ticket.service';
@Component({
selector: 'app-etc-invoiced-logs',
templateUrl: './etc-invoiced-logs.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class ETCInvoicedLogsComponent implements OnInit {
export class ETCInvoicedLogsComponent extends BasicTableComponent {
@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 router: Router, public searchDrawerService: SearchDrawerService) {
super(searchDrawerService);
}
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
@ -46,22 +47,6 @@ export class ETCInvoicedLogsComponent implements OnInit {
this.router.navigate(['/ticket/invoice-requested-detail/1']);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
const params = { listSource: 1, pageSize: -1 };
if (this.sf) {
@ -107,10 +92,7 @@ export class ETCInvoicedLogsComponent implements OnInit {
type: 'string',
title: '车牌号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
exTime: {
@ -118,10 +100,7 @@ export class ETCInvoicedLogsComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
invoiceMakeTime: {
@ -129,20 +108,14 @@ export class ETCInvoicedLogsComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
sellerName: {
type: 'string',
title: '销售方',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
ltdId: {
@ -152,9 +125,6 @@ export class ETCInvoicedLogsComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
},
asyncData: () => this.service.getNetworkFreightForwarder()
},
default: ''