133 lines
3.7 KiB
TypeScript
133 lines
3.7 KiB
TypeScript
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-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) {
|
|
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
this.initST();
|
|
this.initSF();
|
|
}
|
|
|
|
resetSF() {
|
|
this._$expand = false;
|
|
this.sf.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' },
|
|
{ title: '类型', render: 'carModelLabel', className: 'text-center' },
|
|
{ title: '注册时间', index: 'carNo', className: 'text-center' },
|
|
{ title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true },
|
|
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true },
|
|
{ title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-center', sort: true },
|
|
{ title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true },
|
|
{ title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true },
|
|
{ title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true },
|
|
];
|
|
}
|
|
|
|
goBack() {
|
|
window.history.go(-1);
|
|
}
|
|
|
|
}
|