merge partner

This commit is contained in:
Taric Xin
2022-03-23 14:24:21 +08:00
226 changed files with 15751 additions and 993 deletions

View File

@ -0,0 +1,11 @@
<page-header-wrapper [title]="''" [tab]="tpTab">
</page-header-wrapper>
<ng-template #tpTab>
<nz-tabset [(nzSelectedIndex)]="selectedIndex">
<nz-tab [nzTitle]="item.name" *ngFor="let item of tabs">
</nz-tab>
</nz-tabset>
</ng-template>
<app-partner-partner-statistics *ngIf="selectedIndex === 0"></app-partner-partner-statistics>
<app-partner-sale-statistics *ngIf="selectedIndex === 1"></app-partner-sale-statistics>

View File

@ -0,0 +1,37 @@
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-business-statistics-index',
templateUrl: './index.component.html',
})
export class PartnerBusinessStatisticsIndexComponent implements OnInit {
url = `/user`;
schema!: SFSchema;
@ViewChild('st') private readonly st!: STComponent;
columns: STColumn[] = [];
selectedIndex = 0;
tabs = [
{
name: '合伙人统计',
value: '0'
},
{
name: '渠道销售统计',
value: '1'
}
]
constructor() { }
ngOnInit(): void { }
add(): void {
}
}

View File

@ -0,0 +1,44 @@
<page-header-wrapper [title]="'客户明细'" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<div class="user-info border-1" nz-row>
<div nz-col nzSpan="24" class="d-flex p-md">
<img class="user-logo" [src]="detailInfo?.logo" />
<div style="flex: 1;">
<div>
<h3>{{detailInfo?.company}}</h3>
<div class="mb-sm">
<span class="letf-box text-grey-dark">{{detailInfo?.code}}</span>
<span class="mr-xs">{{detailInfo?.proxy}}</span>
</div>
<div>
<span class="letf-box">添加时间:{{detailInfo?.createTime}}</span>
<span>所属城市:{{detailInfo?.belongCity}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="mt-md" nz-row>
<div nz-col [nzSpan]="12">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"> </sf>
</div>
<div nz-col [nzSpan]="8">
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="search()">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
</div>
</div>
</nz-card>
<nz-card>
<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>

View File

@ -0,0 +1,11 @@
:host {
.user-logo {
width: 90px;
}
.letf-box {
display: inline-block;
width: 250px;
}
}

View File

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

View File

@ -0,0 +1,163 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
@Component({
selector: 'app-partner-partner-custom-detail',
templateUrl: './partner-custom-detail.component.html',
styleUrls: ['./partner-custom-detail.component.less']
})
export class PartnerPartnerCustomDetailComponent implements OnInit {
schema: SFSchema = {};
ui!: SFUISchema;
detailInfo: any = {
logo: './assets/images/user/logo.svg',
company: '张三',
code: '91440300357887492H',
proxy: '企业合伙人',
belongCity: '深圳、上海、北京',
createTime: '2021-09-23 14:43:31'
}
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent;
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' },
]
}
];
_$expand = false;
constructor(public service: BussinessStatisticsService, public router: Router) {
}
get reqParams() {
return { ...this.sf?.value };
}
ngOnInit(): void {
this.initST();
this.initSF();
}
resetSF() {
this._$expand = false;
this.sf.reset();
setTimeout(() => {
this.st.reset();
})
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
add(): void {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
search() {
this.st.load(1);
}
export() {
}
initSF() {
this.schema = {
properties: {
abnormalCause: {
title: '客户名称',
type: 'string',
ui: {
placeholder: '请输入',
},
},
abnormalCause1: {
title: '客户状态',
type: 'string',
default: '',
enum: [
{
label: '全部',
value: ''
},
{
label: '个人',
value: '1'
},
{
label: '企业',
value: '2'
}
],
ui: {
widget: 'select'
},
},
}
}
this.ui = {
'*': { spanLabelFixed: 100, grid: { span: 11, gutter: 4 } },
};
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '客户名称', index: 'carNo', className: 'text-center', width: 150 },
{ title: '客户状态', render: 'carModelLabel', className: 'text-center', width: 120 },
{ title: '结算时间段', index: 'carNo', className: 'text-center', width: 200 },
{ title: '本月交易数', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
{ title: '累计交易数', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 },
{ title: '本月已结算订单', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 },
{ title: '累计已结算订单', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 },
{ 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)
}
]
},
];
}
/**
* 查看订单明细
* @param record 当前对象
*/
viewOrderDetail(record: any) {
this.router.navigate([`/partner/business-statistics/partner/custom-order-detail/${record?.id}`])
}
goBack() {
window.history.go(-1);
}
}

View File

@ -0,0 +1,44 @@
<page-header-wrapper [title]="'客户明细'" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<div class="user-info border-1" nz-row>
<div nz-col nzSpan="24" class="d-flex p-md">
<img class="user-logo" [src]="detailInfo?.logo" />
<div style="flex: 1;">
<div>
<h3>{{detailInfo?.company}}</h3>
<div class="mb-sm">
<span class="letf-box text-grey-dark">{{detailInfo?.code}}</span>
<span class="mr-xs">{{detailInfo?.proxy}}</span>
</div>
<div>
<span class="letf-box">添加时间:{{detailInfo?.createTime}}</span>
<span c>所属城市:{{detailInfo?.belongCity}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="mt-md" nz-row>
<div nz-col [nzSpan]="18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"> </sf>
</div>
<div nz-col [nzSpan]="6">
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="search()">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
</div>
</div>
</nz-card>
<nz-card>
<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>

View File

@ -0,0 +1,11 @@
:host {
.user-logo {
width: 90px;
}
.letf-box {
display: inline-block;
width: 250px;
}
}

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,162 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
@Component({
selector: 'app-partner-partner-custom-order-detail',
templateUrl: './partner-custom-order-detail.component.html',
styleUrls: ['./partner-custom-order-detail.component.less']
})
export class PartnerPartnerCustomOrderDetailComponent implements OnInit {
schema: SFSchema = {};
ui!: SFUISchema;
detailInfo: any = {
logo: './assets/images/user/logo.svg',
company: '张三',
code: '91440300357887492H',
proxy: '企业合伙人',
belongCity: '深圳、上海、北京',
createTime: '2021-09-23 14:43:31'
}
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = [];
_$expand = false;
constructor(public service: BussinessStatisticsService) {
}
get reqParams() {
return { ...this.sf?.value };
}
ngOnInit(): void {
this.initST();
this.initSF();
}
resetSF() {
this._$expand = false;
this.sf.reset();
setTimeout(() => {
this.st.reset();
})
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
add(): void {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
search() {
this.st.load(1);
}
export() {
}
initSF() {
this.schema = {
properties: {
abnormalCause: {
title: '订单号',
type: 'string',
ui: {
placeholder: '请输入',
},
},
abnormalCause1: {
title: '订单状态',
type: 'string',
default: '',
enum: [
{
label: '全部',
value: ''
},
{
label: '个人',
value: '1'
},
{
label: '企业',
value: '2'
}
],
ui: {
widget: 'select'
},
},
abnormalCause2: {
title: '开票状态',
type: 'string',
default: '',
enum: [
{
label: '全部',
value: ''
},
{
label: '个人',
value: '1'
},
{
label: '企业',
value: '2'
}
],
ui: {
widget: 'select'
},
},
}
}
this.ui = {
'*': { spanLabelFixed: 100, grid: { span: 7, gutter: 4 } },
};
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '订单号', index: 'carNo', className: 'text-center', width: 150 },
{ title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 },
{ title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 },
{ title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
{ title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
{ title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 },
{ title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 },
{ title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 },
{ title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 },
{
title: '操作',
width: 150,
buttons: [
{
text: '查看订单详情',
click: (_record) => this.viewOrderDetail(_record)
}
]
},
];
}
viewOrderDetail(record: any) {
}
goBack() {
window.history.go(-1);
}
}

View File

@ -0,0 +1,49 @@
<page-header-wrapper [title]="'客户明细'" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<div class="user-info border-1" nz-row>
<div nz-col nzSpan="24" class="d-flex p-md">
<img class="user-logo" [src]="detailInfo?.logo" />
<div style="flex: 1;">
<div>
<h3>{{detailInfo?.company}}</h3>
<div class="mb-sm">
<span class="letf-box text-grey-dark">{{detailInfo?.code}}</span>
<span class="mr-xs">{{detailInfo?.proxy}}</span>
</div>
<div>
<span class="letf-box">添加时间:{{detailInfo?.createTime}}</span>
<span c>所属城市:{{detailInfo?.belongCity}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="mt-md" nzGutter="8" nz-row>
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card>
<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>

View File

@ -0,0 +1,11 @@
:host {
.user-logo {
width: 90px;
}
.letf-box {
display: inline-block;
width: 250px;
}
}

View File

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

View File

@ -0,0 +1,174 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
@Component({
selector: 'app-partner-partner-order-detail',
templateUrl: './partner-order-detail.component.html',
styleUrls: ['./partner-order-detail.component.less']
})
export class PartnerPartnerOrderDetailComponent implements OnInit {
schema: SFSchema = {};
ui!: SFUISchema;
detailInfo: any = {
logo: './assets/images/user/logo.svg',
company: '张三',
code: '91440300357887492H',
proxy: '企业合伙人',
belongCity: '深圳、上海、北京',
createTime: '2021-09-23 14:43:31'
}
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = [];
_$expand = false;
constructor(public service: BussinessStatisticsService) {
}
get reqParams() {
return { ...this.sf?.value };
}
ngOnInit(): void {
this.initST();
this.initSF();
}
resetSF() {
this._$expand = false;
this.sf.reset();
setTimeout(() => {
this.st.reset();
})
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
add(): void {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
search() {
this.st.load(1);
}
export() {
}
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
abnormalCause: {
title: '订单号',
type: 'string',
ui: {
placeholder: '请输入',
},
},
abnormalCause1: {
title: '订单状态',
type: 'string',
default: '',
enum: [
{
label: '全部',
value: ''
},
{
label: '个人',
value: '1'
},
{
label: '企业',
value: '2'
}
],
ui: {
widget: 'select'
},
},
abnormalCause2: {
title: '开票状态',
type: 'string',
default: '',
enum: [
{
label: '全部',
value: ''
},
{
label: '个人',
value: '1'
},
{
label: '企业',
value: '2'
}
],
ui: {
widget: 'select'
},
},
abnormalCause3: {
title: '客户名称',
type: 'string',
ui: {
placeholder: '请输入',
visibleIf: {
_$expand: (value: boolean) => value,
},
},
},
}
}
this.ui = {
'*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } },
};
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '订单号', index: 'carNo', className: 'text-center', width: 150 },
{ title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 },
{ title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 },
{ title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
{ title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
{ title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 },
{ title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 },
{ title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 },
{ title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 },
{
title: '操作',
width: 150,
buttons: [
{
text: '查看订单详情',
click: (_record) => this.viewOrderDetail(_record)
}
]
},
];
}
viewOrderDetail(record: any) {
}
goBack() {
window.history.go(-1);
}
}

View File

@ -0,0 +1,35 @@
<nz-card>
<sf mode="search" [schema]="schema" [ui]="ui" [button]="'none'" (formSubmit)="st.load(1)" (formReset)="resetSF()" #sf>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
</sf>
</nz-card>
<nz-card>
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }"
[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] }"
[loading]="service.http.loading">
<ng-template st-row="approvalStatus" let-item>
<a [routerLink]="'/partner/business-statistics/partner/custom-detail/'+item?.id">{{item.yskmoney}}</a>
</ng-template>
<ng-template st-row="approvalStatus1" let-item>
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus2" let-item>
<a class="text-right text-blue-dark"
[routerLink]="'/partner/business-statistics/partner/order-detail/'+item?.id">{{item.yskmoney | currency:'
'}}</a>
</ng-template>
<ng-template st-row="approvalStatus3" let-item>
<div class="text-right">{{item.yskmoney | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus4" let-item>
<div class="text-right">{{item.armoney | currency:' '}}</div>
</ng-template>
</st>
</nz-card>

View File

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

View File

@ -0,0 +1,99 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
@Component({
selector: 'app-partner-partner-statistics',
templateUrl: './partner-statistics.component.html',
})
export class PartnerPartnerStatisticsComponent implements OnInit {
url = `/user`;
schema!: SFSchema;
ui!: SFUISchema;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = [];
constructor(public service: BussinessStatisticsService) { }
/**
* 查询参数
*/
get reqParams() {
const params = { ...this.sf?.value };
return params
}
ngOnInit(): void {
this.initSF();
this.initST();
}
initSF() {
this.schema = {
properties: {
abnormalCause: {
title: '合伙人名称',
type: 'string',
ui: {
placeholder: '请输入',
},
},
abnormalCause1: {
title: '类型',
type: 'string',
default: '',
enum: [
{
label: '全部',
value: ''
},
{
label: '个人',
value: '1'
},
{
label: '企业',
value: '2'
}
],
ui: {
widget: 'select'
},
},
}
}
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } };
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 },
{ title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 },
{ title: '注册时间', index: 'carNo', className: 'text-center', width: 150 },
{ title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
{ title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 },
{ title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 },
{ title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 },
{ title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 },
];
}
resetSF() {
this.sf.reset();
setTimeout(() => {
this.st.reset();
})
}
export() {
}
}

View File

@ -0,0 +1,27 @@
<page-header-wrapper [title]="''" [content]="content">
<ng-template #content>
<div class="user-info border-1" nz-row>
<div nz-col nzSpan="24" class="d-flex p-md">
<img class="user-logo" [src]="detailInfo?.logo" />
<div style="flex: 1;">
<div>
<h3>{{detailInfo?.name}}</h3>
<div>
<span class="mr-md">{{detailInfo?.phone}}</span>
<span class="mr-xs">{{detailInfo?.proxy}}</span>
<span>{{detailInfo?.level}}</span>
</div>
<p>添加时间:{{detailInfo?.createTime}}</p>
</div>
</div>
</div>
</div>
</ng-template>
</page-header-wrapper>
<nz-card>
</nz-card>
<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 { PartnerSaleCustomDetailComponent } from './sale-custom-detail.component';
describe('PartnerSaleCustomDetailComponent', () => {
let component: PartnerSaleCustomDetailComponent;
let fixture: ComponentFixture<PartnerSaleCustomDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PartnerSaleCustomDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PartnerSaleCustomDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,53 @@
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-custom-detail',
templateUrl: './sale-custom-detail.component.html',
})
export class PartnerSaleCustomDetailComponent implements OnInit {
url = `/user`;
searchSchema: SFSchema = {
properties: {
no: {
type: 'string',
title: '编号'
}
}
};
detailInfo: any = {
logo: './assets/images/user/logo.svg',
name: '张三',
phone: '1399999999',
proxy: '城市代理',
level: '二级',
createTime: '添加时间'
}
@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

@ -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

@ -0,0 +1,30 @@
<nz-card>
<sf mode="search" [schema]="schema" [button]="'none'" #sf>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
</sf>
</nz-card>
<nz-card>
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }"
[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] }"
[loading]="service.http.loading">
<ng-template st-row="approvalStatus" let-item>
<a [routerLink]="'/'">{{item.yskmoney | currency:' ':false:'1.0-2'}}</a>
</ng-template>
<ng-template st-row="approvalStatus1" let-item>
<div>{{item.approvalStatus1 | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus2" let-item>
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus3" let-item>
<div class="text-right">{{item.yskmoney | currency:' '}}</div>
</ng-template>
</st>
</nz-card>

View File

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

View File

@ -0,0 +1,79 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
@Component({
selector: 'app-partner-sale-statistics',
templateUrl: './sale-statistics.component.html',
})
export class PartnerSaleStatisticsComponent implements OnInit {
url = `/user`;
schema!: SFSchema;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = [];
ui!: SFUISchema;
constructor(public service: BussinessStatisticsService) { }
/**
* 查询参数
*/
get reqParams() {
const params = { ...this.sf?.value };
return params
}
ngOnInit(): void {
this.initSF();
this.initST();
}
initSF() {
this.schema = {
properties: {
abnormalCause: {
title: '渠道销售姓名',
type: 'string',
ui: {
placeholder: '请输入',
},
},
abnormalCause1: {
title: '手机号',
type: 'string',
ui: {
placeholder: '请输入'
},
},
}
};
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 8 } } };
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '联系人', index: 'carNo', className: 'text-center' },
{ title: '手机号', render: 'carModelLabel', className: 'text-center' },
{ title: '添加时间', index: 'carNo', className: 'text-center' },
{ title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true },
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true },
{ title: '本月新增合伙人', render: 'approvalStatus1', className: 'text-center', sort: true },
{ title: '合伙人总数', render: 'approvalStatus1', className: 'text-center', sort: true },
{ title: '本月已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true },
{ title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-right', sort: true },
];
}
export() {
}
resetSF() {
this.sf.reset();
setTimeout(() => {
this.st.reset();
})
}
}

View File

@ -0,0 +1,13 @@
import { Injectable, Injector } from '@angular/core';
import { BaseService } from '@shared';
@Injectable({
providedIn: 'root'
})
export class BussinessStatisticsService extends BaseService {
$api_get_partner_statistics_page = `/api/fcc/ficoBrmH/list/page`;
constructor(public injector: Injector) {
super(injector);
}
}