edi
This commit is contained in:
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box" nzBordered >
|
||||
<nz-card class="content-box" nzBordered>
|
||||
<nz-tabset [nzTabBarExtraContent]="extraTemplate" (nzSelectedIndexChange)="selectChange($event)">
|
||||
<nz-tab nzTitle="待受理"></nz-tab>
|
||||
<nz-tab nzTitle="处理中"></nz-tab>
|
||||
@ -50,20 +50,11 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<st
|
||||
#st
|
||||
size="small"
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_invoice_requested_page"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
|
||||
<st #st [data]="service.$api_get_invoice_requested_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)">
|
||||
<ng-template st-row="vatappcode" let-item let-index="index" let-column="column">
|
||||
{{ item.vatappcode }} <br> <label class="text-primary">待受理</label>
|
||||
</ng-template>
|
||||
|
||||
@ -27,45 +27,35 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
_$expand = false;
|
||||
|
||||
totalCallNo = 0;
|
||||
selectedRows: any[] = [];
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
get reqParams() {
|
||||
// if (this.sf) {
|
||||
// Object.assign(requestOptions.body, {
|
||||
// ...this.sf.value,
|
||||
// sts: this?.resourceStatus,
|
||||
// createTime: {
|
||||
// start: this.sf.value.createTime?.[0] || null,
|
||||
// end: this.sf.value.createTime?.[1] || null
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
const a:any = {};
|
||||
if(this.resourceStatus) {
|
||||
a.sts = this.resourceStatus
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.resourceStatus) {
|
||||
Object.assign(requestOptions.body, { sts: this.resourceStatus });
|
||||
}
|
||||
return {
|
||||
...a,
|
||||
...this.sf?.value,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || null,
|
||||
end: this.sf?.value?.createTime?.[1] || null
|
||||
}
|
||||
};
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || null,
|
||||
end: this.sf?.value?.createTime?.[1] || null
|
||||
}
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item) => item.checked) || [];
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.applyAmount, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// stChange(e: STChange): void {
|
||||
// switch (e.type) {
|
||||
// case 'checkbox':
|
||||
// this.selectedRows = e.checkbox!;
|
||||
// this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
rejectAction(item: any[]) {
|
||||
const modal = this.nzModalService.create({
|
||||
@ -122,21 +112,19 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
type: 'default',
|
||||
label: '手工处理',
|
||||
onClick: () => {
|
||||
console.log('11111')
|
||||
const params = {
|
||||
ficoVatappBillVOList: this.selectedRows,
|
||||
ficoVatappBillVOList: this.selectedRows
|
||||
// id: this.id
|
||||
}
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('开票成功!')
|
||||
console.log(res);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
modal.destroy();
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg)
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
}
|
||||
})
|
||||
modal.destroy();
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -144,13 +132,15 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
label: '自动开票',
|
||||
onClick: () => {
|
||||
const params = {
|
||||
ficoVatappBillVOList: this.selectedRows,
|
||||
ficoVatappBillVOList: this.selectedRows
|
||||
// id: this.id
|
||||
}
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
})
|
||||
modal.destroy();
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
modal.destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -164,7 +154,7 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
nzWidth: 1200,
|
||||
nzComponentParams: {
|
||||
id: item.id
|
||||
},
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
@ -357,16 +347,17 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
}
|
||||
orderDetail(item: any){
|
||||
console.log(item)
|
||||
this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id,
|
||||
{
|
||||
queryParams: { id : item?.id }
|
||||
}
|
||||
])
|
||||
orderDetail(item: any) {
|
||||
console.log(item);
|
||||
this.router.navigate([
|
||||
'/ticket/invoice-requested/detail/' + item?.id,
|
||||
{
|
||||
queryParams: { id: item?.id }
|
||||
}
|
||||
]);
|
||||
}
|
||||
selectChange(e: any) {
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
this.resourceStatus = e;
|
||||
this.initST();
|
||||
setTimeout(() => {
|
||||
|
||||
@ -9,19 +9,18 @@
|
||||
<app-requested-detail [id]="id"></app-requested-detail>
|
||||
|
||||
<st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }}"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)" >
|
||||
<ng-template st-row="billHCode" let-item let-index="index" let-column="column">
|
||||
<a class="text-primary" > {{ item.billHCode }}</a>
|
||||
</ng-template>
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }}"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)">
|
||||
<ng-template st-row="billHCode" let-item let-index="index" let-column="column">
|
||||
<a class="text-primary"> {{ item.billHCode }}</a>
|
||||
</ng-template>
|
||||
</st>
|
||||
<div class="modal-footer text-center">
|
||||
|
||||
<button nz-button type="button" >移除</button>
|
||||
<button nz-button type="button">移除</button>
|
||||
<button nz-button type="button" (click)="saveManage()">手工处理</button>
|
||||
<button nz-button type="submit" nzType="primary"
|
||||
[nzLoading]="service.http.loading" (click)="saveManage()">自动开票</button>
|
||||
</div>
|
||||
|
||||
<button nz-button type="submit" nzType="primary" [nzLoading]="service.http.loading"
|
||||
(click)="saveManage()">自动开票</button>
|
||||
</div>
|
||||
Reference in New Issue
Block a user