业务统计

This commit is contained in:
潘晓云
2022-02-24 20:10:36 +08:00
parent 607ee45d88
commit d370708e98
15 changed files with 212 additions and 23 deletions

View File

@ -2,7 +2,7 @@
</page-header-wrapper> </page-header-wrapper>
<ng-template #tpTab> <ng-template #tpTab>
<nz-tabset [(nzSelectedIndex)]="selectedIndex" (nzSelectChange)="change($event)"> <nz-tabset [(nzSelectedIndex)]="selectedIndex">
<nz-tab [nzTitle]="item.name" *ngFor="let item of tabs"> <nz-tab [nzTitle]="item.name" *ngFor="let item of tabs">
</nz-tab> </nz-tab>
</nz-tabset> </nz-tabset>

View File

@ -26,9 +26,7 @@ export class PartnerBusinessStatisticsIndexComponent implements OnInit {
constructor() { } constructor() { }
change(e: any) {
console.log(this.selectedIndex);
}
ngOnInit(): void { } ngOnInit(): void { }

View File

@ -38,5 +38,8 @@
</nz-card> </nz-card>
<nz-card> <nz-card>
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns"></st> <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{x:'1500px'}"
[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] }"></st>
</nz-card> </nz-card>

View File

@ -4,8 +4,8 @@
} }
.letf-box { .letf-box {
width: 250px;
display: inline-block; display: inline-block;
width: 250px;
} }
} }

View File

@ -41,6 +41,10 @@ export class PartnerPartnerCustomDetailComponent implements OnInit {
} }
get reqParams() {
return { ...this.sf?.value };
}
ngOnInit(): void { ngOnInit(): void {
this.initST(); this.initST();
this.initSF(); this.initSF();
@ -113,18 +117,37 @@ export class PartnerPartnerCustomDetailComponent implements OnInit {
*/ */
initST() { initST() {
this.columns = [ this.columns = [
{ title: '合伙人名称', index: 'carNo', className: 'text-center' }, { title: '客户名称', index: 'carNo', className: 'text-center', width: 150 },
{ title: '类型', render: 'carModelLabel', className: 'text-center' }, { title: '客户状态', render: 'carModelLabel', className: 'text-center', width: 120 },
{ title: '注册时间', index: 'carNo', className: 'text-center' }, { title: '结算时间', index: 'carNo', className: 'text-center', width: 200 },
{ title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true }, { title: '本月交易数', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
{ title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-center', sort: true }, { title: '累计交易数', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 },
{ title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, { title: '本月已结算订单', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 },
{ title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, { title: '累计已结算订单', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 },
{ title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true }, { title: '本月交易金额(元)', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 },
{ title: '累计交易金额(元)', index: 'approvalStatus6', className: 'text-right', sort: true, type: 'currency', width: 180 },
{ title: '本月已结算金额(元)', index: 'approvalStatus7', className: 'text-right', sort: true, type: 'currency', width: 200 },
{ title: '累计已结算金额(元)', index: 'approvalStatus8', className: 'text-right', sort: true, type: 'currency', width: 200 },
{ title: '本月已开票金额(元)', index: 'approvalStatus9', className: 'text-right', sort: true, type: 'currency', width: 200 },
{ title: '累计已开票金额(元)', index: 'approvalStatus10', className: 'text-right', sort: true, type: 'currency', width: 200 },
{ title: '本月申请开票金额(元)', index: 'approvalStatus11', className: 'text-right', sort: true, type: 'currency', width: 200 },
{
title: '操作',
width: 150,
buttons: [
{
text: '查看订单明细',
click: (_record) => this.viewOrderDetail(_record)
}
]
},
]; ];
} }
viewOrderDetail(record: any) {
}
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
} }

View File

@ -0,0 +1,9 @@
<page-header [action]="phActionTpl">
<ng-template #phActionTpl>
<button (click)="add()" nz-button nzType="primary">新建</button>
</ng-template>
</page-header>
<nz-card>
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
<st #st [data]="url" [columns]="columns"></st>
</nz-card>

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { PartnerPartnerCustomOrderDetailComponent } from './partner-custom-order-detail.component';
describe('PartnerPartnerCustomOrderDetailComponent', () => {
let component: PartnerPartnerCustomOrderDetailComponent;
let fixture: ComponentFixture<PartnerPartnerCustomOrderDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PartnerPartnerCustomOrderDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PartnerPartnerCustomOrderDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,45 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFSchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
@Component({
selector: 'app-partner-partner-custom-order-detail',
templateUrl: './partner-custom-order-detail.component.html',
})
export class PartnerPartnerCustomOrderDetailComponent implements OnInit {
url = `/user`;
searchSchema: SFSchema = {
properties: {
no: {
type: 'string',
title: '编号'
}
}
};
@ViewChild('st') private readonly st!: STComponent;
columns: STColumn[] = [
{ title: '编号', index: 'no' },
{ title: '调用次数', type: 'number', index: 'callNo' },
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
{ title: '时间', type: 'date', index: 'updatedAt' },
{
title: '',
buttons: [
// { text: '查看', click: (item: any) => `/form/${item.id}` },
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
]
}
];
constructor(private http: _HttpClient, private modal: ModalHelper) { }
ngOnInit(): void { }
add(): void {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
}

View File

@ -5,7 +5,7 @@
<nz-card> <nz-card>
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns"> <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns">
<ng-template st-row="approvalStatus" let-item> <ng-template st-row="approvalStatus" let-item>
<a [routerLink]="'/partner/partner-custom/detail/'+item?.id">{{item.yskmoney}}</a> <a [routerLink]="'/partner/business-statistics/partner-custom/detail/'+item?.id">{{item.yskmoney}}</a>
</ng-template> </ng-template>
<ng-template st-row="approvalStatus1" let-item> <ng-template st-row="approvalStatus1" let-item>
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div> <div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>

View File

@ -82,4 +82,5 @@ export class PartnerPartnerStatisticsComponent implements OnInit {
} }
} }

View File

@ -0,0 +1,9 @@
<page-header [action]="phActionTpl">
<ng-template #phActionTpl>
<button (click)="add()" nz-button nzType="primary">新建</button>
</ng-template>
</page-header>
<nz-card>
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
<st #st [data]="url" [columns]="columns"></st>
</nz-card>

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { PartnerSalePartnerDetailComponent } from './sale-partner-detail.component';
describe('PartnerSalePartnerDetailComponent', () => {
let component: PartnerSalePartnerDetailComponent;
let fixture: ComponentFixture<PartnerSalePartnerDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PartnerSalePartnerDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PartnerSalePartnerDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,45 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFSchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
@Component({
selector: 'app-partner-sale-partner-detail',
templateUrl: './sale-partner-detail.component.html',
})
export class PartnerSalePartnerDetailComponent implements OnInit {
url = `/user`;
searchSchema: SFSchema = {
properties: {
no: {
type: 'string',
title: '编号'
}
}
};
@ViewChild('st') private readonly st!: STComponent;
columns: STColumn[] = [
{ title: '编号', index: 'no' },
{ title: '调用次数', type: 'number', index: 'callNo' },
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
{ title: '时间', type: 'date', index: 'updatedAt' },
{
title: '',
buttons: [
// { text: '查看', click: (item: any) => `/form/${item.id}` },
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
]
}
];
constructor(private http: _HttpClient, private modal: ModalHelper) { }
ngOnInit(): void { }
add(): void {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
}

View File

@ -18,14 +18,20 @@ import { ParterChannelSalesListComponent } from './channel-sales/components/list
import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component'; import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component';
import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; import { ParterLevelConfigListComponent } from './level-config/components/list/list.component';
import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component';
import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component';
import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component';
const routes: Routes = [ const routes: Routes = [
{ {
path: 'business-statistics', children: [ path: 'business-statistics',
children: [
{ path: '', redirectTo: 'index' }, { path: '', redirectTo: 'index' },
{ path: 'index', component: PartnerBusinessStatisticsIndexComponent }, { path: 'index', component: PartnerBusinessStatisticsIndexComponent },
{ path: 'sale-custom/detail/:id', component: PartnerSaleCustomDetailComponent }, { path: 'partner/order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent },
{ path: 'partner-custom/detail/:id', component: PartnerPartnerCustomDetailComponent }, { path: 'partner/custom-detail/:id', component: PartnerPartnerCustomDetailComponent },
{ path: 'partner/custom-order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent },
{ path: 'sale/custom-detail/:id', component: PartnerSaleCustomDetailComponent },
{ path: 'sale/partner-detail/:id', component: PartnerSalePartnerDetailComponent },
] ]
}, },
{ {
@ -49,9 +55,7 @@ const routes: Routes = [
children: [ children: [
{ path: 'particulars', component: ParterRebateManageMentParticularsComponent }, { path: 'particulars', component: ParterRebateManageMentParticularsComponent },
] ]
}, }];
];
@NgModule({ @NgModule({
imports: [RouterModule.forChild(routes)], imports: [RouterModule.forChild(routes)],
exports: [RouterModule] exports: [RouterModule]

View File

@ -12,6 +12,8 @@ import { PartnerSaleStatisticsComponent } from './business-statistics/components
import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component'; import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component';
import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.component'; import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.component';
import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component';
import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component';
import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component';
const COMPONENTS: any[] = [ const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent, PartnerBusinessStatisticsIndexComponent,
@ -24,7 +26,9 @@ const COMPONENTS: any[] = [
PartnerPartnerCustomDetailComponent, PartnerPartnerCustomDetailComponent,
PartnerPartnerCustomDetailComponent, PartnerPartnerCustomDetailComponent,
PartnerSaleCustomDetailComponent, PartnerSaleCustomDetailComponent,
ParterRebateManageMentParticularsComponent ParterRebateManageMentParticularsComponent,
PartnerSalePartnerDetailComponent,
PartnerPartnerCustomOrderDetailComponent
]; ];
@NgModule({ @NgModule({