This commit is contained in:
Taric Xin
2022-03-10 20:46:28 +08:00
parent 268919bda5
commit 6ef3718fbc
3 changed files with 25 additions and 8 deletions

View File

@ -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),