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

@ -2,27 +2,29 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema } 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';
@Component({
selector: 'app-billing-order',
templateUrl: './billing-order.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class BillingOrderComponent implements OnInit {
export class BillingOrderComponent 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, private ar: ActivatedRoute) {}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
@ -38,22 +40,6 @@ export class BillingOrderComponent implements OnInit {
this.router.navigateByUrl(`/order-management/vehicle/vehicle-detail/${item.billId}`);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
export() {
this.service.exportStart({ ...this.sf?.value, pageSize: -1 }, this.service.$api_export_InvoicedBillInfoPage);
}
@ -118,20 +104,14 @@ export class BillingOrderComponent implements OnInit {
type: 'string',
title: '申请编号',
ui: {
autocomplete: 'off',
visibleIf: {
expand: (value: boolean) => value
}
autocomplete: 'off'
}
},
vatinvcode: {
type: 'string',
title: '分票编号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vatappdate: {
@ -140,10 +120,7 @@ export class BillingOrderComponent implements OnInit {
ui: {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd HH:mm:ss',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd HH:mm:ss'
} as SFDateWidgetSchema
},
sts: {
@ -152,10 +129,7 @@ export class BillingOrderComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'etc:invoicing:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
invoiceno: {
@ -163,10 +137,7 @@ export class BillingOrderComponent implements OnInit {
title: '发票号码',
ui: {
placeholder: '请输入',
autocomplete: 'off',
visibleIf: {
expand: (value: boolean) => value
}
autocomplete: 'off'
}
},
invoicedate: {
@ -175,10 +146,7 @@ export class BillingOrderComponent implements OnInit {
ui: {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
enterpriseInfoId: {
@ -188,9 +156,6 @@ export class BillingOrderComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
},
asyncData: () => this.service.getNetworkFreightForwarder()
}
}