diff --git a/src/app/routes/partner/account-management/components/list/list.component.html b/src/app/routes/partner/account-management/components/list/list.component.html index 482ccb06..eff67eb6 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.html +++ b/src/app/routes/partner/account-management/components/list/list.component.html @@ -1,9 +1,35 @@ - - - 新建 - - - - + + 查询 + 重置 + 导出 + + + + + + + {{item.yskmoney}} + + + {{item.approvalStatus1 | currency:' '}} + + + {{item.yskmoney | currency:' + '}} + + + + {{item.yskmoney | currency:' '}} + + + {{item.armoney | currency:' '}} + + diff --git a/src/app/routes/partner/account-management/components/list/list.component.ts b/src/app/routes/partner/account-management/components/list/list.component.ts index f4133c97..e072fc3c 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.ts +++ b/src/app/routes/partner/account-management/components/list/list.component.ts @@ -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; + @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' + }, + }, } } - }; - @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' }, - ] - } - ]; + 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()); } } diff --git a/src/app/routes/partner/account-management/services/account-managemant.service.ts b/src/app/routes/partner/account-management/services/account-managemant.service.ts new file mode 100644 index 00000000..3ca08cb0 --- /dev/null +++ b/src/app/routes/partner/account-management/services/account-managemant.service.ts @@ -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) + } +} diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 47be637f..68b60fe7 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -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) }, @@ -92,4 +92,4 @@ const routes: Routes = [ ], exports: [RouterModule] }) -export class RouteRoutingModule {} +export class RouteRoutingModule { }