From 0cce1559f3ef178aff9402942216bfa689e8b046 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 23 Mar 2022 10:30:58 +0800 Subject: [PATCH] edit --- .../invoice-requested.component.ts | 30 ++++++++++++++----- .../services/ticket.service.ts | 3 ++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts index 12465791..4cf2df39 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts @@ -33,7 +33,12 @@ export class InvoiceRequestedComponent { totalCallNo = 0; 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) => { 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: { expand: (value: boolean) => value } - }, + } }, createTime: { title: '申请时间', @@ -349,7 +364,7 @@ export class InvoiceRequestedComponent { }, asyncData: () => this.shipperservice.getCRM() } - }, + } } }; } @@ -441,11 +456,12 @@ export class InvoiceRequestedComponent { text: '查看原因
', click: item => this.showReason(item), iif: item => item.sts === '4' + }, + { + text: '下载对账单', + iif: item => item.sts === '3', + click: item => this.downloadPdf(item) } - // { - // text: '下载对账单' - // // click: item => this.rejectAction(item) - // } ] } ]; diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 71facc39..759dd0aa 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -108,6 +108,9 @@ export class TicketService extends ShipperBaseService { // 查询快递轨迹 $api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes'; + // 下载对账单文件 + $api_downloadPdf = '/api/fcc/ficoVatappBill/downloadPdf'; + constructor(public injector: Injector, public eaCacheSrv: EACacheService) { super(injector, eaCacheSrv); }