edit
This commit is contained in:
@ -87,12 +87,22 @@ export class InvoiceRequestedDetailComponent implements OnInit {
|
|||||||
this.service.msgSrv.warning('请选择订单!');
|
this.service.msgSrv.warning('请选择订单!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let rows: any[] = [];
|
||||||
|
if (status === '1') {
|
||||||
|
rows = this.st._data.map(item => {
|
||||||
|
const rs = Object.assign({}, { ...item });
|
||||||
|
delete rs._values;
|
||||||
|
return rs;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
rows = [...this.selectedRows];
|
||||||
|
}
|
||||||
const modal = this.nzModalService.create({
|
const modal = this.nzModalService.create({
|
||||||
nzTitle: '开票',
|
nzTitle: '开票',
|
||||||
nzContent: RequestedDetailComponent,
|
nzContent: RequestedDetailComponent,
|
||||||
nzWidth: 800,
|
nzWidth: 800,
|
||||||
nzComponentParams: {
|
nzComponentParams: {
|
||||||
i: this.selectedRows,
|
i: rows,
|
||||||
status: status,
|
status: status,
|
||||||
Id: this.id
|
Id: this.id
|
||||||
},
|
},
|
||||||
@ -102,14 +112,14 @@ export class InvoiceRequestedDetailComponent implements OnInit {
|
|||||||
label: '手工处理',
|
label: '手工处理',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
const params = {
|
const params = {
|
||||||
ficoVatappBillVOList: this.selectedRows,
|
ficoVatappBillVOList: rows,
|
||||||
id: this.id
|
id: this.id
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.loadHeadInfo();
|
this.loadHeadInfo();
|
||||||
this.st.load(1);
|
this.st.load(1);
|
||||||
this.service.msgSrv.success('开票成功');
|
this.service.msgSrv.success('提交成功');
|
||||||
modal.destroy();
|
modal.destroy();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -120,14 +130,14 @@ export class InvoiceRequestedDetailComponent implements OnInit {
|
|||||||
label: '自动开票',
|
label: '自动开票',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
const params = {
|
const params = {
|
||||||
ficoVatappBillVOList: this.selectedRows,
|
ficoVatappBillVOList: rows,
|
||||||
id: this.id
|
id: this.id
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.loadHeadInfo();
|
this.loadHeadInfo();
|
||||||
this.st.load(1);
|
this.st.load(1);
|
||||||
this.service.msgSrv.success('开票成功');
|
this.service.msgSrv.success('提交成功');
|
||||||
modal.destroy();
|
modal.destroy();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user