This commit is contained in:
Taric Xin
2022-04-25 19:09:33 +08:00
parent c9c1f8108f
commit c5ca59239f
29 changed files with 481 additions and 897 deletions

View File

@ -2,7 +2,9 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { TicketService } from 'src/app/routes/ticket-management/services/ticket.service';
import { FreightAccountService } from '../../services/freight-account.service';
@ -10,23 +12,30 @@ import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-payment-order',
templateUrl: './payment-order.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class PaymentOrderComponent implements OnInit {
export class PaymentOrderComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
schema: SFSchema = this.initSF();
selectedRows: any[] = [];
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
let params = { ...this.sf.value };
@ -68,31 +77,9 @@ export class PaymentOrderComponent 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: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
paycode: {
type: 'string',
title: '付款单号'
@ -135,10 +122,7 @@ export class PaymentOrderComponent implements OnInit {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
arto: {
@ -147,10 +131,7 @@ export class PaymentOrderComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
}
allowClear: true
}
},
billCode: {
@ -159,10 +140,7 @@ export class PaymentOrderComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
}
allowClear: true
}
},
payDate: {
@ -170,10 +148,7 @@ export class PaymentOrderComponent 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
},
payDate2: {
@ -181,20 +156,12 @@ export class PaymentOrderComponent 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
},
waybillCode: {
type: 'string',
title: '运单号',
ui: {
visibleIf: {
expand: (value: boolean) => value
}
}
title: '运单号'
},
// feeCode: {
// type: 'string',
@ -210,20 +177,14 @@ export class PaymentOrderComponent 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
},
payRemarks: {
type: 'string',
title: '付款备注',
ui: {
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
}
}
@ -233,9 +194,9 @@ export class PaymentOrderComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox', fixed: 'left', className: 'text-center' },
{ title: '付款单号', index: 'payCode', type: 'link', width: 180 },
{ title: '网络货运人', index: 'ltdName', width: 180 },
{ title: '运单号', index: 'waybillCode', width: 180 },
{ title: '付款单号', index: 'payCode', className: 'text-left', type: 'link', width: 180 },
{ title: '网络货运人', index: 'ltdName', className: 'text-left', width: 180 },
{ title: '运单号', index: 'waybillCode', className: 'text-left', width: 180 },
// { title: '费用号', index: 'feeCode', width: 180 },
{ title: '要求付款日期', index: 'payDate', type: 'date', className: 'text-center', width: 150 },
{