车辆对接
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { query } from '@angular/animations';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
@ -19,38 +20,52 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
sf!: SFComponent;
|
||||
@ViewChild('rejectModal', { static: false })
|
||||
rejectModal!: any;
|
||||
resourceStatus!: any;
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
|
||||
selectedRows: any[] = [];
|
||||
totalCallNo = 0;
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf.value.createTime?.[0] || null,
|
||||
end: this.sf.value.createTime?.[1] || null
|
||||
}
|
||||
});
|
||||
get reqParams() {
|
||||
// if (this.sf) {
|
||||
// Object.assign(requestOptions.body, {
|
||||
// ...this.sf.value,
|
||||
// sts: this?.resourceStatus,
|
||||
// createTime: {
|
||||
// start: this.sf.value.createTime?.[0] || null,
|
||||
// end: this.sf.value.createTime?.[1] || null
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
const a:any = {};
|
||||
if(this.resourceStatus) {
|
||||
a.sts = this.resourceStatus
|
||||
}
|
||||
return requestOptions;
|
||||
return {
|
||||
...a,
|
||||
...this.sf?.value,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || null,
|
||||
end: this.sf?.value?.createTime?.[1] || null
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
|
||||
break;
|
||||
}
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item) => item.checked) || [];
|
||||
}
|
||||
// stChange(e: STChange): void {
|
||||
// switch (e.type) {
|
||||
// case 'checkbox':
|
||||
// this.selectedRows = e.checkbox!;
|
||||
// this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
rejectAction(item: any[]) {
|
||||
const modal = this.nzModalService.create({
|
||||
@ -330,7 +345,7 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
text: '订单明细',
|
||||
click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item.vatappcode])
|
||||
click: item => this.orderDetail(item)
|
||||
},
|
||||
{
|
||||
text: '下载对账单'
|
||||
@ -340,4 +355,20 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
}
|
||||
orderDetail(item: any){
|
||||
console.log(item)
|
||||
this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id,
|
||||
{
|
||||
queryParams: { vatappHId : item?.id }
|
||||
}
|
||||
])
|
||||
}
|
||||
selectChange(e: any) {
|
||||
console.log(e)
|
||||
this.resourceStatus = e;
|
||||
this.initST();
|
||||
setTimeout(() => {
|
||||
this.st.load();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user