From 6ef3718fbce2610e821907e726d733942090a25d Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 10 Mar 2022 20:46:28 +0800 Subject: [PATCH] edit --- .../payment-record.component.ts | 2 +- .../invoiced-list/invoiced-list.component.ts | 28 ++++++++++++++----- .../services/ticket.service.ts | 3 ++ 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts index 527501d6..0f070c54 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts @@ -282,7 +282,7 @@ export class PaymentRecordComponent implements OnInit { { title: '申请人', index: 'applyUserName', width: 90 }, { title: '处理时间', index: 'handlerTime', width: 180 }, { title: '处理人', index: 'handlerUserName', width: 90 }, - { title: '失败原因', index: 'failCause', width: 250 }, + { title: '备注', index: 'failCause', width: 250 }, { title: '操作', fixed: 'right', diff --git a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts index 1678a9ad..71c1c95e 100644 --- a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts +++ b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts @@ -56,15 +56,24 @@ export class InvoicedListComponent implements OnInit { } } - deletedInvoice() { - if (this.selectedRows?.length <= 0) { - this.service.msgSrv.warning('请选择发票'); - return; - } - this.nzModalService.warning({ + deletedInvoice(item: any) { + // if (this.selectedRows?.length <= 0) { + // this.service.msgSrv.warning('请选择发票'); + // return; + // } + const modal = this.nzModalService.warning({ nzTitle: '确定将所选发票作废?', nzCancelText: '取消', - nzOnOk: () => {} + nzOnOk: () => { + this.service.request(this.service.$api_cancel_invoice, { id: item.id }).subscribe(res => { + if (res) { + this.service.msgSrv.success('发票作废成功'); + } + modal.destroy(); + this.st.load(1); + }); + return false; + } }); } @@ -243,6 +252,11 @@ export class InvoicedListComponent implements OnInit { queryParams: { expressno: item.expressno, type: 2, ltdId: item.ltdId } }) }, + { + text: '发票作废', + click: item => this.deletedInvoice(item), + iif: item => item.sts === '1' + }, { text: '查看物流', click: item => this.showlogosticsLogs(item), diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 690eea09..71facc39 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -52,6 +52,9 @@ export class TicketService extends ShipperBaseService { // 已开发票查询 $api_get_invoice_page = '/api/fcc/ficoVatinvH/list/page'; + + // 发票作废 + $api_cancel_invoice = '/api/fcc/ficoVatinvH/inpinvHCancel'; // 获取销项发票抬头 $api_get_invoice_header_detail = '/api/fcc/ficoVatinvH/get'; // 获取分票发票抬头开票申请订单明细