-
This commit is contained in:
@ -1,9 +1,35 @@
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFSchema } from '@delon/form';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { BussinessStatisticsService } from '../../../business-statistics/services/bussiness-statistics.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-list',
|
||||
@ -9,37 +10,88 @@ import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
})
|
||||
export class PartnerAccountManagementListComponent implements OnInit {
|
||||
url = `/user`;
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
no: {
|
||||
type: 'string',
|
||||
title: '编号'
|
||||
}
|
||||
}
|
||||
};
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
@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' },
|
||||
@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: [
|
||||
{
|
||||
title: '',
|
||||
buttons: [
|
||||
// { text: '查看', click: (item: any) => `/form/${item.id}` },
|
||||
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
|
||||
]
|
||||
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 },
|
||||
];
|
||||
}
|
||||
|
||||
constructor(private http: _HttpClient, private modal: ModalHelper) { }
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
|
||||
ngOnInit(): void { }
|
||||
export() {
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AccountManagemantService extends BaseService {
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
}
|
||||
}
|
||||
@ -72,7 +72,7 @@ const routes: Routes = [
|
||||
path: 'download',
|
||||
loadChildren: () => import('./download/download.module').then(m => m.DownloadModule)
|
||||
}
|
||||
{ path: 'account-management', loadChildren: () => import('./account-management/account-management.module').then((m) => m.AccountManagementModule) },]
|
||||
]
|
||||
},
|
||||
// passport
|
||||
{ path: '', loadChildren: () => import('./passport/passport.module').then(m => m.PassportModule) },
|
||||
|
||||
Reference in New Issue
Block a user