This commit is contained in:
Taric Xin
2022-04-19 10:09:34 +08:00
parent d948069b5e
commit 094ca57d6a
2 changed files with 58 additions and 37 deletions

View File

@ -1,32 +1,26 @@
<!-- 页头 -->
<page-header-wrapper [title]="'开票数据报表'"></page-header-wrapper>
<nz-card nzTitle="开票数据报表">
<st
#st
[data]="service.$api_findInvoiceReport"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data', total: 'data.total' }}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loadingDelay]="500"
>
<ng-template st-row="totalInvoicedAmount" let-item let-index="index">
{{item.totalInvoicedAmount | currency}}
</ng-template>
<ng-template st-row="invAmountMonth" let-item let-index="index">
{{item.invAmountMonth | currency}}
</ng-template>
<ng-template st-row="applyWaitInvAmount" let-item let-index="index">
{{item.applyWaitInvAmount | currency}}
</ng-template>
<ng-template st-row="unInvoicedAmountHistory" let-item let-index="index">
{{item.unInvoicedAmountHistory | currency}}
</ng-template>
<ng-template st-row="unInvoicedAmountCurMonth" let-item let-index="index">
{{item.unInvoicedAmountCurMonth | currency}}
</ng-template>
<ng-template st-row="invoicedAmount" let-item let-index="index">
{{item.invoicedAmount | currency}}
</ng-template>
<st #st [data]="service.$api_findInvoiceReport" [columns]="columns" [scroll]="{ x: '1200px' }"
[req]="{ params: reqParams }" [res]="{ reName: { list: 'data', total: 'data.total' }}" [page]="{ show: false }"
[loadingDelay]="500">
<ng-template st-row="totalInvoicedAmount" let-item let-index="index">
{{item.totalInvoicedAmount | currency}}
</ng-template>
<ng-template st-row="invAmountMonth" let-item let-index="index">
{{item.invAmountMonth | currency}}
</ng-template>
<ng-template st-row="applyWaitInvAmount" let-item let-index="index">
{{item.applyWaitInvAmount | currency}}
</ng-template>
<ng-template st-row="unInvoicedAmountHistory" let-item let-index="index">
{{item.unInvoicedAmountHistory | currency}}
</ng-template>
<ng-template st-row="unInvoicedAmountCurMonth" let-item let-index="index">
{{item.unInvoicedAmountCurMonth | currency}}
</ng-template>
<ng-template st-row="invoicedAmount" let-item let-index="index">
{{item.invoicedAmount | currency}}
</ng-template>
</st>
</nz-card>

View File

@ -6,71 +6,98 @@ import { DataService } from '../../services/data.service';
@Component({
selector: 'app-datatable-invoicetable',
templateUrl: './invoicetable.component.html',
templateUrl: './invoicetable.component.html'
})
export class DatatableInvoicetableComponent implements OnInit {
@ViewChild('st', { static: false })
st!: STComponent;
columns!: STColumn[];
data=[{name1:1111}]
constructor(private http: _HttpClient, private modal: ModalHelper,public service :DataService) { }
data = [{ name1: 1111 }];
constructor(private http: _HttpClient, private modal: ModalHelper, public service: DataService) {}
/**
* 查询参数
*/
get reqParams() {
return { };
get reqParams() {
return {};
}
ngOnInit(): void {
this.initST();
}
initST() {
this.columns = [
{
title: '运营主体',
index: 'operationName'
index: 'operationName',
width: 220
},
{
title: '已开票总金额',
index: 'totalInvoicedAmount',
render: 'totalInvoicedAmount',
className: 'text-right',
width: 150
},
{
title: '当月已开票金额',
index: 'invAmountMonth',
render: 'invAmountMonth',
className: 'text-right',
width: 150
},
{
title: '当月已开票张数',
index: 'numInvAmountMonth',
className: 'text-right',
width: 150
},
{
title: '已申请待开金额',
index: 'applyWaitInvAmount',
render: 'applyWaitInvAmount',
className: 'text-right',
width: 150
},
{
title: '申请待开客户',
index: 'applyWaitCustomer',
className: 'text-right',
width: 150
},
{
title: '已开票金额',
index: 'invoicedAmount',
render: 'invoicedAmount',
className: 'text-right',
width: 150
},
{
title: '未申请开票金额(历史)',
index: 'unInvoicedAmountHistory',
render: 'unInvoicedAmountHistory',
className: 'text-right',
width: 200
},
{
title: '未申请开票金额(当月)',
index: 'unInvoicedAmountCurMonth',
render: 'unInvoicedAmountCurMonth',
className: 'text-right',
width: 200
},
{
title: '当月发票张数',
index: 'unInvoicedAmountHistory1',
className: 'text-right',
width: 150
},
{
title: '剩余发票张数',
index: 'unInvoicedAmountCurMonth1',
className: 'text-right',
width: 150
}
];
}
}