edi
This commit is contained in:
@ -27,45 +27,35 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
_$expand = false;
|
||||
|
||||
totalCallNo = 0;
|
||||
selectedRows: any[] = [];
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
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
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.resourceStatus) {
|
||||
Object.assign(requestOptions.body, { sts: this.resourceStatus });
|
||||
}
|
||||
return {
|
||||
...a,
|
||||
...this.sf?.value,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || null,
|
||||
end: this.sf?.value?.createTime?.[1] || null
|
||||
}
|
||||
};
|
||||
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
|
||||
}
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
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.applyAmount, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 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({
|
||||
@ -122,21 +112,19 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
type: 'default',
|
||||
label: '手工处理',
|
||||
onClick: () => {
|
||||
console.log('11111')
|
||||
const params = {
|
||||
ficoVatappBillVOList: this.selectedRows,
|
||||
ficoVatappBillVOList: this.selectedRows
|
||||
// id: this.id
|
||||
}
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('开票成功!')
|
||||
console.log(res);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
modal.destroy();
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg)
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
}
|
||||
})
|
||||
modal.destroy();
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -144,13 +132,15 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
label: '自动开票',
|
||||
onClick: () => {
|
||||
const params = {
|
||||
ficoVatappBillVOList: this.selectedRows,
|
||||
ficoVatappBillVOList: this.selectedRows
|
||||
// id: this.id
|
||||
}
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
})
|
||||
modal.destroy();
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
modal.destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -164,7 +154,7 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
nzWidth: 1200,
|
||||
nzComponentParams: {
|
||||
id: item.id
|
||||
},
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
@ -357,16 +347,17 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
}
|
||||
orderDetail(item: any){
|
||||
console.log(item)
|
||||
this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id,
|
||||
{
|
||||
queryParams: { id : item?.id }
|
||||
}
|
||||
])
|
||||
orderDetail(item: any) {
|
||||
console.log(item);
|
||||
this.router.navigate([
|
||||
'/ticket/invoice-requested/detail/' + item?.id,
|
||||
{
|
||||
queryParams: { id: item?.id }
|
||||
}
|
||||
]);
|
||||
}
|
||||
selectChange(e: any) {
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
this.resourceStatus = e;
|
||||
this.initST();
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user