This commit is contained in:
Taric Xin
2022-02-23 17:01:01 +08:00
parent f763db279d
commit 53a8809f64
2 changed files with 34 additions and 30 deletions

View File

@ -141,25 +141,6 @@ export class CancellationInvoiceComponent implements OnInit {
});
}
/**
* 推送发票
* @param item
*/
pushInvoice(item: any) {
this.nzModalService.warning({
nzTitle: '确定将所选待处理开票申请推送开票?',
nzContent: '推送开票后发票信息不可修改,待系统开票完成后会自动返回开票结果',
nzOnOk: () => {
this.service.request(this.service.$api_push_invoic, { id: item.id }).subscribe(res => {
if (res) {
this.service.msgSrv.success('推送开票成功');
this.st.load(1);
}
});
}
});
}
/**
* 撤回
* @param item
@ -179,11 +160,10 @@ export class CancellationInvoiceComponent implements OnInit {
/**
* 移除
* @param item
* @returns
*/
batchRemove(item?: any) {
if (this.selectedRows?.length <= 0 && !item) {
batchRemove() {
if (this.selectedRows?.length <= 0) {
this.service.msgSrv.warning('请选择开票申请');
return;
}
@ -194,6 +174,27 @@ export class CancellationInvoiceComponent implements OnInit {
});
}
/**
* 作废发票
* @param item
* @returns
*/
removeInvocie(item?: any) {
this.nzModalService.warning({
nzTitle: '确定将所选已确认开票申请作废?',
nzContent: '作废后发票信息不可修改',
nzOnOk: () => {
this.service.request(this.service.$api_cancel_invoic, { id: item.id }).subscribe(res => {
if (res) {
this.service.msgSrv.success('发票作废成功');
this.st.load(1);
}
});
return false;
}
});
}
/**
* 推送发票
* @param item
@ -205,10 +206,10 @@ export class CancellationInvoiceComponent implements OnInit {
nzComponentParams: { id: item.id },
nzWidth: 1200,
nzOnOk: () => {
this.service.request(this.service.$api_apply_fico, { vatinvHid: item.id }).subscribe(res => {
this.service.request(this.service.$api_push_invoic, { id: item.id }).subscribe(res => {
if (res) {
this.service.msgSrv.success('开票成功');
modal.destroy;
this.service.msgSrv.success('推送开票成功');
this.st.load(1);
}
});
return false;
@ -373,12 +374,13 @@ export class CancellationInvoiceComponent implements OnInit {
{
text: '推送开票',
iif: item => item.sts === '1',
click: item => this.pushInvoice(item)
click: item => this.pushInvoiceAction(item)
},
// {
// text: '移除',
// click: item => this.batchRemove(item)
// },
{
text: '作废发票',
iif: item => item.sts === '3',
click: item => this.removeInvocie(item)
}
// {
// text: '确认'
// // click: item => this.rejectAction(item)

View File

@ -38,6 +38,8 @@ export class TicketService extends ShipperBaseService {
$api_push_invoic = '/api/fcc/ficoVatinvH/crmPushInvo';
// 运营端批量推送开票-E税云开票
$api_batch_push_invoic = '/api/fcc/ficoVatinvH/crmPushInvoBath';
// 发票作废
$api_cancel_invoic = '/api/fcc/ficoInpinvH/inpinvHCancel';
// 获取汇总下单路径
$api_get_order_summary_path = '/api/fcc/ficoExpressH/getSummaryOrderAddress';