This commit is contained in:
Taric Xin
2022-03-23 10:30:58 +08:00
parent 5d9b136898
commit 0cce1559f3
2 changed files with 26 additions and 7 deletions

View File

@ -33,7 +33,12 @@ export class InvoiceRequestedComponent {
totalCallNo = 0; totalCallNo = 0;
selectedRows: any[] = []; selectedRows: any[] = [];
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router,public shipperservice: ShipperBaseService,) {} constructor(
public service: TicketService,
private nzModalService: NzModalService,
private router: Router,
public shipperservice: ShipperBaseService
) {}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
if (this.resourceStatus) { if (this.resourceStatus) {
@ -226,6 +231,16 @@ export class InvoiceRequestedComponent {
}); });
} }
downloadPdf(item: any) {
this.service.request(this.service.$api_downloadPdf, { vatappHId: item.id }).subscribe(res => {
if (res?.reconciliationUrl) {
this.service.reviewPDF(res.reconciliationUrl);
} else {
this.service.msgSrv.warning('获取对账单失败');
}
});
}
/** /**
* 重置表单 * 重置表单
*/ */
@ -305,7 +320,7 @@ export class InvoiceRequestedComponent {
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
}, }
}, },
createTime: { createTime: {
title: '申请时间', title: '申请时间',
@ -349,7 +364,7 @@ export class InvoiceRequestedComponent {
}, },
asyncData: () => this.shipperservice.getCRM() asyncData: () => this.shipperservice.getCRM()
} }
}, }
} }
}; };
} }
@ -441,11 +456,12 @@ export class InvoiceRequestedComponent {
text: '查看原因<br/>', text: '查看原因<br/>',
click: item => this.showReason(item), click: item => this.showReason(item),
iif: item => item.sts === '4' iif: item => item.sts === '4'
},
{
text: '下载对账单',
iif: item => item.sts === '3',
click: item => this.downloadPdf(item)
} }
// {
// text: '下载对账单'
// // click: item => this.rejectAction(item)
// }
] ]
} }
]; ];

View File

@ -108,6 +108,9 @@ export class TicketService extends ShipperBaseService {
// 查询快递轨迹 // 查询快递轨迹
$api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes'; $api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes';
// 下载对账单文件
$api_downloadPdf = '/api/fcc/ficoVatappBill/downloadPdf';
constructor(public injector: Injector, public eaCacheSrv: EACacheService) { constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
super(injector, eaCacheSrv); super(injector, eaCacheSrv);
} }