edit
This commit is contained in:
@ -79,34 +79,40 @@ export class CancellationInvoiceComponent implements OnInit {
|
||||
*/
|
||||
requestedAction(item: any) {
|
||||
this.openInfo = { invoicedate: null, invoiceno: null, invoiceno2: null };
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '发票确认',
|
||||
nzContent: this.requestedModal,
|
||||
nzOnOk: () => {
|
||||
if (!this.openInfo?.invoicedate || !this.openInfo?.invoiceno) {
|
||||
this.service.msgSrv.warning('请填开票信息');
|
||||
return false;
|
||||
}
|
||||
const params = {
|
||||
invoiceno: this.openInfo.invoiceno,
|
||||
invoicedate: dateTimePickerUtil.format(this.openInfo.invoicedate),
|
||||
invoiceno2: this.openInfo.invoiceno2
|
||||
};
|
||||
this.service
|
||||
.request(this.service.$api_apply_fico_invoic, {
|
||||
id: item.id,
|
||||
vatinvcode: item.vatinvcode,
|
||||
...params
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功');
|
||||
this.st.load(1);
|
||||
modal.destroy();
|
||||
this.service.request(this.service.$api_get_apply_fico_info, { id: item.vatappHId }).subscribe(info => {
|
||||
if (info) {
|
||||
console.log(info);
|
||||
Object.assign(this.openInfo, { ...info });
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '发票确认',
|
||||
nzContent: this.requestedModal,
|
||||
nzOnOk: () => {
|
||||
if (!this.openInfo?.invoicedate || !this.openInfo?.invoiceno) {
|
||||
this.service.msgSrv.warning('请填开票信息');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
const params = {
|
||||
invoiceno: this.openInfo.invoiceno,
|
||||
invoicedate: dateTimePickerUtil.format(this.openInfo.invoicedate),
|
||||
invoiceno2: this.openInfo.invoiceno2
|
||||
};
|
||||
this.service
|
||||
.request(this.service.$api_apply_fico_invoic, {
|
||||
id: item.id,
|
||||
vatinvcode: item.vatinvcode,
|
||||
...params
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功');
|
||||
this.st.load(1);
|
||||
modal.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user