退款记录

This commit is contained in:
潘晓云
2022-02-24 11:23:05 +08:00
parent c8e2c088ea
commit 0eb12cdf75
13 changed files with 799 additions and 573 deletions

View File

@ -49,9 +49,9 @@ export class StartupService {
let data; let data;
if (this.coreSrv.loginStatus) { if (this.coreSrv.loginStatus) {
// 本地菜单 // 本地菜单
// data = this.loadMockData(); data = this.loadMockData();
// 远程菜单 // 远程菜单
data = this.loadRemoteData(); // data = this.loadRemoteData();
} else { } else {
data = this.loadMockData(); data = this.loadMockData();
} }

View File

@ -1,9 +1,11 @@
<page-header [action]="phActionTpl"> <page-header-wrapper [title]="''" [tab]="tpTab">
<ng-template #phActionTpl>
<button (click)="add()" nz-button nzType="primary">新建</button> </page-header-wrapper>
</ng-template> <ng-template #tpTab>
</page-header> <nz-tabset [(nzSelectedIndex)]="selectedIndex" (nzSelectChange)="change($event)">
<nz-card> <nz-tab [nzTitle]="item.name" *ngFor="let item of tabs">
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf> </nz-tab>
<st #st [data]="url" [columns]="columns"></st> </nz-tabset>
</nz-card> </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

@ -9,37 +9,31 @@ import { ModalHelper, _HttpClient } from '@delon/theme';
}) })
export class PartnerBusinessStatisticsIndexComponent implements OnInit { export class PartnerBusinessStatisticsIndexComponent implements OnInit {
url = `/user`; url = `/user`;
searchSchema: SFSchema = { schema!: SFSchema;
properties: {
no: {
type: 'string',
title: '编号'
}
}
};
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
columns: STColumn[] = [ columns: STColumn[] = [];
{ title: '编号', index: 'no' }, selectedIndex = 0;
{ title: '调用次数', type: 'number', index: 'callNo' }, tabs = [
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
{ title: '时间', type: 'date', index: 'updatedAt' },
{ {
title: '', name: '合伙人统计',
buttons: [ value: '0'
// { text: '查看', click: (item: any) => `/form/${item.id}` }, },
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, {
] name: '渠道销售统计',
value: '1'
} }
]; ]
constructor(private http: _HttpClient, private modal: ModalHelper) { } constructor() { }
change(e: any) {
console.log(this.selectedIndex);
}
ngOnInit(): void { } ngOnInit(): void { }
add(): void { add(): void {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
} }
} }

View File

@ -0,0 +1,24 @@
<nz-card>
<sf mode="search" [schema]="schema" [ui]="ui" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
</nz-card>
<nz-card>
<st #st [data]="url" [columns]="columns">
<ng-template st-row="approvalStatus" let-item>
<a [routerLink]="'/'">{{item.approvalStatus}}</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>
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus3" let-item>
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus4" let-item>
<div class="text-right">{{item.approvalStatus1 | 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,79 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
@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;
columns: STColumn[] = [];
constructor(private http: _HttpClient, private modal: ModalHelper) { }
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' },
{ 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: 'approvalStatus2', className: 'text-center', sort: true },
{ title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true },
{ title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true },
];
}
}

View File

@ -0,0 +1,21 @@
<nz-card>
<sf mode="search" [schema]="schema" (formSubmit)="st.load(1)" (formReset)="st.reset($event)"></sf>
</nz-card>
<nz-card>
<st #st [data]="url" [columns]="columns">
<ng-template st-row="approvalStatus" let-item>
<a [routerLink]="'/'">{{item.approvalStatus}}</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.approvalStatus1 | 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,62 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
@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;
columns: STColumn[] = [];
ui!: SFUISchema;
constructor(private http: _HttpClient, private modal: ModalHelper) { }
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-center', sort: true },
{ title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true },
];
}
}

View File

@ -1,9 +1,13 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component';
import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component';
import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component';
const routes: Routes = [ const routes: Routes = [
{ path: 'index', component: PartnerBusinessStatisticsIndexComponent }]; { path: 'business-statistics/index', component: PartnerBusinessStatisticsIndexComponent },
{ path: 'partner-statistics', component: PartnerPartnerStatisticsComponent },
{ path: 'sale-statistics', component: PartnerSaleStatisticsComponent }];
@NgModule({ @NgModule({
imports: [RouterModule.forChild(routes)], imports: [RouterModule.forChild(routes)],

View File

@ -3,9 +3,13 @@ import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared'; import { SharedModule } from '@shared';
import { PartnerRoutingModule } from './partner-routing.module'; import { PartnerRoutingModule } from './partner-routing.module';
import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component';
import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component';
import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component';
const COMPONENTS: any[] = [ const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent]; PartnerBusinessStatisticsIndexComponent,
PartnerPartnerStatisticsComponent,
PartnerSaleStatisticsComponent];
@NgModule({ @NgModule({
declarations: [...COMPONENTS], declarations: [...COMPONENTS],
imports: [CommonModule, PartnerRoutingModule, SharedModule] imports: [CommonModule, PartnerRoutingModule, SharedModule]

View File

@ -152,22 +152,22 @@ export class EAUserService extends BaseService {
* 加载用户菜单 * 加载用户菜单
*/ */
async loadUserMenus() { async loadUserMenus() {
return this.asyncRequest(this.$api_get_user_menus, { // return this.asyncRequest(this.$api_get_user_menus, {
appId: this.envSrv.getEnvironment().appId // appId: this.envSrv.getEnvironment().appId
}).then(res => { // }).then(res => {
this.cacheSrv.set(cacheConf.menu, res); // this.cacheSrv.set(cacheConf.menu, res);
this.menuService.add(res); // this.menuService.add(res);
});
// this.request('assets/mocks/menu-data.json', {}, 'GET').subscribe((res: any) => {
// this.cacheSrv.set(cacheConf.menu, res.menu);
// this.menuService.add(res.menu);
// }); // });
this.request('assets/mocks/menu-data.json', {}, 'GET').subscribe((res: any) => {
this.cacheSrv.set(cacheConf.menu, res.menu);
this.menuService.add(res.menu);
});
} }
/** /**
* 加载用户角色 * 加载用户角色
*/ */
loadUserRoles() {} loadUserRoles() { }
/** /**
* 登出 * 登出

View File

@ -1,20 +1,16 @@
{ {
"success": true, "success": true,
"data": { "data": {
"menu": [ "menu": [{
{
"text": "主导航", "text": "主导航",
"hideInBreadcrumb": true, "hideInBreadcrumb": true,
"children": [ "children": [{
{
"text": "用户中心", "text": "用户中心",
"icon": "iconfont icon-yonghu-copy", "icon": "iconfont icon-yonghu-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "货主管理", "text": "货主管理",
"children": [ "children": [{
{
"text": "企业列表", "text": "企业列表",
"link": "/usercenter/freight/list" "link": "/usercenter/freight/list"
}, },
@ -56,8 +52,7 @@
{ {
"text": "司机管理", "text": "司机管理",
"link": "/demo/zorro", "link": "/demo/zorro",
"children": [ "children": [{
{
"text": "司机列表", "text": "司机列表",
"link": "/usercenter/driver" "link": "/usercenter/driver"
}, },
@ -82,8 +77,7 @@
"text": "运力管理", "text": "运力管理",
"icon": "iconfont icon-yunli-copy", "icon": "iconfont icon-yunli-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "车辆列表", "text": "车辆列表",
"link": "/vehicle/list" "link": "/vehicle/list"
}, },
@ -107,8 +101,7 @@
"text": "货源管理", "text": "货源管理",
"icon": "iconfont icon-huoyuan-copy", "icon": "iconfont icon-huoyuan-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "货源管理", "text": "货源管理",
"link": "/supply-management/index", "link": "/supply-management/index",
"reuse": true "reuse": true
@ -144,8 +137,7 @@
"text": "订单管理", "text": "订单管理",
"icon": "iconfont icon-dingdan-copy", "icon": "iconfont icon-dingdan-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "整车订单", "text": "整车订单",
"link": "/order-management/vehicle" "link": "/order-management/vehicle"
}, },
@ -185,8 +177,7 @@
"text": "运单管理", "text": "运单管理",
"icon": "iconfont icon-yundan-copy", "icon": "iconfont icon-yundan-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "整车运单", "text": "整车运单",
"link": "/waybill-management/vehicle" "link": "/waybill-management/vehicle"
}, },
@ -214,19 +205,16 @@
"text": "保险管理", "text": "保险管理",
"icon": "iconfont icon-yundan-copy", "icon": "iconfont icon-yundan-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "保险列表", "text": "保险列表",
"link": "/insurance-management/list" "link": "/insurance-management/list"
} }]
]
}, },
{ {
"text": "财务管理", "text": "财务管理",
"icon": "iconfont icon-caiwu-copy", "icon": "iconfont icon-caiwu-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "费用管理", "text": "费用管理",
"link": "/financial-management/cost-management" "link": "/financial-management/cost-management"
}, },
@ -332,11 +320,9 @@
"text": "票务管理", "text": "票务管理",
"icon": "iconfont icon-piaowu-copy", "icon": "iconfont icon-piaowu-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "销项发票", "text": "销项发票",
"children": [ "children": [{
{
"text": "开票申请", "text": "开票申请",
"link": "/ticket/invoice-requested" "link": "/ticket/invoice-requested"
}, },
@ -371,8 +357,7 @@
}, },
{ {
"text": "ETC发票", "text": "ETC发票",
"children": [ "children": [{
{
"text": "申请发票", "text": "申请发票",
"link": "/ticket/etc-invoice-requested" "link": "/ticket/etc-invoice-requested"
}, },
@ -410,8 +395,7 @@
"text": "合同管理", "text": "合同管理",
"icon": "iconfont icon-hetong-copy", "icon": "iconfont icon-hetong-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "保单管理", "text": "保单管理",
"link": "/contract-management/policy" "link": "/contract-management/policy"
}, },
@ -429,12 +413,10 @@
"text": "系统设置", "text": "系统设置",
"icon": "iconfont icon-shezhi-copy", "icon": "iconfont icon-shezhi-copy",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "员工管理", "text": "员工管理",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "员工管理", "text": "员工管理",
"link": "/system/staff-management" "link": "/system/staff-management"
}, },
@ -447,8 +429,7 @@
{ {
"text": "操作日志", "text": "操作日志",
"group": true, "group": true,
"children": [ "children": [{
{
"text": "系统操作日志", "text": "系统操作日志",
"link": "/logs/system-logs" "link": "/logs/system-logs"
}, },
@ -523,9 +504,16 @@
"link": "/system/goods-name-config" "link": "/system/goods-name-config"
} }
] ]
},
{
"text": "合伙人管理",
"icon": "anticon anticon-dashboard",
"children": [{
"text": "业务统计",
"link": "/partner/business-statistics/index"
}]
} }
] ]
} }]
]
} }
} }