From d198a69eefa262081d2e7e95cd2362faa605350c Mon Sep 17 00:00:00 2001 From: heqinghang Date: Thu, 24 Feb 2022 14:11:57 +0800 Subject: [PATCH 1/3] 666 --- .../components/edit/edit.component.html | 7 + .../components/edit/edit.component.ts | 114 +++++++++++ .../components/list/list.component.html | 28 +++ .../components/list/list.component.ts | 175 +++++++++++++++++ .../services/channel-sales.service.ts | 12 ++ .../components/edit/edit.component.html | 7 + .../components/edit/edit.component.ts | 88 +++++++++ .../components/list/list.component.html | 28 +++ .../components/list/list.component.ts | 180 ++++++++++++++++++ .../services/level-config.service.ts | 12 ++ .../routes/partner/partner-routing.module.ts | 20 +- src/app/routes/partner/partner.module.ts | 11 +- 12 files changed, 680 insertions(+), 2 deletions(-) create mode 100644 src/app/routes/partner/channel-sales/components/edit/edit.component.html create mode 100644 src/app/routes/partner/channel-sales/components/edit/edit.component.ts create mode 100644 src/app/routes/partner/channel-sales/components/list/list.component.html create mode 100644 src/app/routes/partner/channel-sales/components/list/list.component.ts create mode 100644 src/app/routes/partner/channel-sales/services/channel-sales.service.ts create mode 100644 src/app/routes/partner/level-config/components/edit/edit.component.html create mode 100644 src/app/routes/partner/level-config/components/edit/edit.component.ts create mode 100644 src/app/routes/partner/level-config/components/list/list.component.html create mode 100644 src/app/routes/partner/level-config/components/list/list.component.ts create mode 100644 src/app/routes/partner/level-config/services/level-config.service.ts diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.html b/src/app/routes/partner/channel-sales/components/edit/edit.component.html new file mode 100644 index 00000000..ba3e7981 --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.html @@ -0,0 +1,7 @@ + + + +
+ + +
diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts new file mode 100644 index 00000000..5e5d6e85 --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -0,0 +1,114 @@ +import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { map } from 'rxjs/operators'; +import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { ChannelSalesService } from '../../services/channel-sales.service'; + +@Component({ + selector: 'app-parter-channel-sales-edit', + templateUrl: './edit.component.html' +}) +export class ParterChannelSalesEditComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema!: SFSchema; + ui!: SFUISchema; + i: any; + type: any; + + constructor( + public http: _HttpClient, + private cdr: ChangeDetectorRef, + private route: ActivatedRoute, + private modalService: NzModalService, + public service: ChannelSalesService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name1: { + title: '业务员选择', + type: 'string', + enum: [ + { label: '王武', value: '1'}, + ], + ui: { + widget: 'select', + placeholder:'请选择' + } as SFSelectWidgetSchema, + }, + name2: { + type: 'string', + title: '授权登录运营后台', + enum: [ + { label: '否', value: '0' }, + { label: '是', value: '1' } + ], + ui: { + widget: 'radio', + } as SFRadioWidgetSchema, + default: 'A', + }, + name: { + title: '', + type: 'string', + enum: [ + { label: '管理员', value: '1'}, + ], + ui: { + widget: 'select', + placeholder:'授权角色', + visibleIf: { name2: (value: string) => value === '1' } + } as SFSelectWidgetSchema, + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请输入50字符' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name1', 'name2'] + }; + this.ui = { + '*': { + spanLabelFixed: 150, + grid: { span: 24 } + }, + $name:{ spanLabelFixed: 10, grid: { span: 12 }}, + $name2:{ grid: { span: 12 }}, + + }; + } + + close() { + this.modalRef.destroy(); + } + save() { + this.sf.validator({ emitError: true }); + if(!this.sf.valid) return; + // this.service.request('', { ...this.sf.value }).subscribe(res => { + // if (res) { + // this.modalRef.destroy(true); + // } else { + // this.service.msgSrv.error(res.msg); + // } + // }); + } +} diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.html b/src/app/routes/partner/channel-sales/components/list/list.component.html new file mode 100644 index 00000000..6cc8f619 --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/list/list.component.html @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts new file mode 100644 index 00000000..2debda3f --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -0,0 +1,175 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { ChannelSalesService } from '../../services/channel-sales.service'; +import { ParterChannelSalesEditComponent } from '../edit/edit.component'; + +@Component({ + selector: 'app-parter-channel-sales-list', + templateUrl: './list.component.html' +}) +export class ParterChannelSalesListComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: ChannelSalesService, + private modalService: NzModalService + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '销售渠道姓名' + }, + phone: { + type: 'string', + title: '手机号' + }, + } + }; + this.ui = { + '*': { + grid: { span: 8, gutter: 4 } + } + }; + } + + initST() { + this.columns = [ + { + title: '销售渠道姓名', + index: 'name1' + }, + { + title: '手机号', + index: 'name1' + }, + { + title: '所属组织', + index: 'name1' + }, + { + title: '职级', + index: 'name1' + }, + { + title: '等级', + index: 'name1' + }, + { + title: '省市', + index: 'name1' + }, + { + title: '邀请码', + index: 'name1' + }, + { + title: '操作', + className: 'text-center', + buttons: [ + { + text: '编辑', + click: (_record, _modal, _instance) => this.edit(_record), + }, + { + text: '查看', + click: (_record, _modal, _instance) => this.view(_record), + }, + { + text: '冻结', + click: (_record, _modal, _instance) => this.stop(_record.id), + } + ] + } + ]; + } + + add() { + const modalRef = this.modalService.create({ + nzWidth:600, + nzTitle: '新增', + nzContent: ParterChannelSalesEditComponent, + nzComponentParams: { type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + edit(record: STData) { + const modalRef = this.modalService.create({ + nzWidth:600, + nzTitle: '编辑', + nzContent: ParterChannelSalesEditComponent, + nzComponentParams: { i: record, type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + view(record: STData) { + const modalRef = this.modalService.create({ + nzTitle: '查看', + nzContent: ParterChannelSalesEditComponent, + nzComponentParams: { i: record } + }); + } + + stop(id: any) { + this.modalService.confirm({ + nzTitle: '冻结确认', + nzContent: `确定冻结该账号吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } + + +} diff --git a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts new file mode 100644 index 00000000..6e7cb18c --- /dev/null +++ b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class ChannelSalesService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/app/routes/partner/level-config/components/edit/edit.component.html b/src/app/routes/partner/level-config/components/edit/edit.component.html new file mode 100644 index 00000000..ba3e7981 --- /dev/null +++ b/src/app/routes/partner/level-config/components/edit/edit.component.html @@ -0,0 +1,7 @@ + + + +
+ + +
diff --git a/src/app/routes/partner/level-config/components/edit/edit.component.ts b/src/app/routes/partner/level-config/components/edit/edit.component.ts new file mode 100644 index 00000000..35bc59a3 --- /dev/null +++ b/src/app/routes/partner/level-config/components/edit/edit.component.ts @@ -0,0 +1,88 @@ +import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { map } from 'rxjs/operators'; +import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { ChannelSalesService } from '../../services/level-config.service'; + +@Component({ + selector: 'app-parter-LevelConfig-edit', + templateUrl: './edit.component.html' +}) +export class ParterLevelConfigEditComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema!: SFSchema; + ui!: SFUISchema; + i: any; + type: any; + + constructor( + public http: _HttpClient, + private cdr: ChangeDetectorRef, + private route: ActivatedRoute, + private modalService: NzModalService, + public service: ChannelSalesService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name: { + title: '合伙人等级', + type: 'string', + enum: [ + { label: '管理员', value: '1'}, + ], + ui: { + widget: 'select', + placeholder:'请选择', + visibleIf: { name2: (value: string) => value === '1' } + } as SFSelectWidgetSchema, + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请输入50字符' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name1', 'name2'] + }; + this.ui = { + '*': { + spanLabelFixed: 120, + grid: { span: 24 } + }, + }; + } + + close() { + this.modalRef.destroy(); + } + save() { + this.sf.validator({ emitError: true }); + if(!this.sf.valid) return; + // this.service.request('', { ...this.sf.value }).subscribe(res => { + // if (res) { + // this.modalRef.destroy(true); + // } else { + // this.service.msgSrv.error(res.msg); + // } + // }); + } +} diff --git a/src/app/routes/partner/level-config/components/list/list.component.html b/src/app/routes/partner/level-config/components/list/list.component.html new file mode 100644 index 00000000..6cc8f619 --- /dev/null +++ b/src/app/routes/partner/level-config/components/list/list.component.html @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/src/app/routes/partner/level-config/components/list/list.component.ts b/src/app/routes/partner/level-config/components/list/list.component.ts new file mode 100644 index 00000000..25e56d43 --- /dev/null +++ b/src/app/routes/partner/level-config/components/list/list.component.ts @@ -0,0 +1,180 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { ChannelSalesService } from '../../services/level-config.service'; +import { ParterLevelConfigEditComponent } from '../edit/edit.component'; + +@Component({ + selector: 'app-parter-LevelConfig-list', + templateUrl: './list.component.html' +}) +export class ParterLevelConfigListComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: ChannelSalesService, + private modalService: NzModalService + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '等级姓名' + }, + phone: { + type: 'string', + title: '状态' + }, + } + }; + this.ui = { + '*': { + grid: { span: 8, gutter: 4 } + } + }; + } + + initST() { + this.columns = [ + { + title: '等级姓名', + index: 'name1' + }, + { + title: '备注', + index: 'name1' + }, + { + title: '创建时间', + index: 'name1' + }, + { + title: '启用时间', + index: 'name1' + }, + { + title: '状态', + index: 'name1' + }, + { + title: '操作', + className: 'text-center', + buttons: [ + { + text: '编辑', + click: (_record, _modal, _instance) => this.edit(_record), + }, + { + text: '禁用', + click: (_record, _modal, _instance) => this.stop(_record), + }, + { + text: '启用', + click: (_record, _modal, _instance) => this.restart(_record), + } + ] + } + ]; + } + + add() { + const modalRef = this.modalService.create({ + nzWidth:500, + nzTitle: '新增', + nzContent: ParterLevelConfigEditComponent, + nzComponentParams: { type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + edit(record: STData) { + const modalRef = this.modalService.create({ + nzWidth:500, + nzTitle: '编辑', + nzContent: ParterLevelConfigEditComponent, + nzComponentParams: { i: record, type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + view(record: STData) { + const modalRef = this.modalService.create({ + nzTitle: '查看', + nzContent: ParterLevelConfigEditComponent, + nzComponentParams: { i: record } + }); + } + + restart(id: any) { + this.modalService.confirm({ + nzTitle: '冻结确认', + nzContent: `确定启用该账号吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + stop(id: any) { + this.modalService.confirm({ + nzTitle: '冻结确认', + nzContent: `确定禁用该账号吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } + + +} diff --git a/src/app/routes/partner/level-config/services/level-config.service.ts b/src/app/routes/partner/level-config/services/level-config.service.ts new file mode 100644 index 00000000..6e7cb18c --- /dev/null +++ b/src/app/routes/partner/level-config/services/level-config.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class ChannelSalesService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 9b76c2c4..95585b24 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -1,9 +1,27 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; +import { ParterChannelSalesEditComponent } from './channel-sales/components/edit/edit.component'; +import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component'; +import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component'; +import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; const routes: Routes = [ - { path: 'index', component: PartnerBusinessStatisticsIndexComponent }]; + { path: 'index', component: PartnerBusinessStatisticsIndexComponent }, + { path: 'channel-sales', + children:[ + {path: 'list', component: ParterChannelSalesListComponent}, + {path: 'edit', component: ParterChannelSalesEditComponent}, + ] + }, + { path: 'level-config', + children:[ + {path: 'list', component: ParterLevelConfigListComponent}, + {path: 'edit', component: ParterLevelConfigEditComponent}, + ] + }, + +]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index c1198f85..bb93e84d 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -3,9 +3,18 @@ import { CommonModule } from '@angular/common'; import { SharedModule } from '@shared'; import { PartnerRoutingModule } from './partner-routing.module'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; +import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component'; +import { ParterChannelSalesEditComponent } from './channel-sales/components/edit/edit.component'; +import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component'; +import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; const COMPONENTS: any[] = [ - PartnerBusinessStatisticsIndexComponent]; + PartnerBusinessStatisticsIndexComponent, + ParterChannelSalesListComponent, + ParterChannelSalesEditComponent, + ParterLevelConfigListComponent, + ParterLevelConfigEditComponent +]; @NgModule({ declarations: [...COMPONENTS], imports: [CommonModule, PartnerRoutingModule, SharedModule] From d6a5eab32069f2222a3a9bbd9b49798447c5def1 Mon Sep 17 00:00:00 2001 From: heqinghang Date: Thu, 24 Feb 2022 14:21:29 +0800 Subject: [PATCH 2/3] 666 --- src/app/routes/partner/partner-routing.module.ts | 2 ++ src/assets/mocks/menu-data.json | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 822197ac..f268d89d 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -14,12 +14,14 @@ const routes: Routes = [ { path: 'sale-statistics', component: PartnerSaleStatisticsComponent }, { path: 'channel-sales', children:[ + {path: '', component: ParterChannelSalesListComponent}, {path: 'list', component: ParterChannelSalesListComponent}, {path: 'edit', component: ParterChannelSalesEditComponent}, ] }, { path: 'level-config', children:[ + {path: '', component: ParterLevelConfigListComponent}, {path: 'list', component: ParterLevelConfigListComponent}, {path: 'edit', component: ParterLevelConfigEditComponent}, ] diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 28ac960c..0ee7956f 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -508,10 +508,20 @@ { "text": "合伙人管理", "icon": "anticon anticon-dashboard", - "children": [{ + "children": [ + { "text": "业务统计", "link": "/partner/business-statistics/index" - }] + }, + { + "text": "销售渠道管理", + "link": "/partner/channel-sales/list" + }, + { + "text": "等级配置", + "link": "/partner/level-config/list" + } + ] } ] }] From 2870adbe6e9a49336aaa7e8b1acef62f272a120c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 15:36:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routes/partner/partner-routing.module.ts | 16 ++ src/app/routes/partner/partner.module.ts | 4 +- .../list/particulars.component.html | 27 +++ .../components/list/particulars.component.ts | 165 ++++++++++++++++++ .../services/rebate-management.service.ts | 12 ++ src/assets/mocks/menu-data.json | 18 ++ 6 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 src/app/routes/partner/rebate-management/components/list/particulars.component.html create mode 100644 src/app/routes/partner/rebate-management/components/list/particulars.component.ts create mode 100644 src/app/routes/partner/rebate-management/services/rebate-management.service.ts diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index f268d89d..c4ca409f 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-02-24 15:07:57 + * @LastEditors : Shiming + * @LastEditTime : 2022-02-24 15:23:48 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-routing.module.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; @@ -7,6 +17,7 @@ import { ParterLevelConfigEditComponent } from './level-config/components/edit/e import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; +import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; const routes: Routes = [ { path: 'index', component: PartnerBusinessStatisticsIndexComponent }, @@ -26,6 +37,11 @@ const routes: Routes = [ {path: 'edit', component: ParterLevelConfigEditComponent}, ] }, + { path: 'rebate', + children:[ + {path: 'particulars', component: ParterRebateManageMentParticularsComponent}, + ] +}, ]; @NgModule({ diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index cb08d463..844832b6 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -9,6 +9,7 @@ import { ParterLevelConfigEditComponent } from './level-config/components/edit/e import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; +import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -17,7 +18,8 @@ const COMPONENTS: any[] = [ ParterLevelConfigListComponent, ParterLevelConfigEditComponent, PartnerPartnerStatisticsComponent, - PartnerSaleStatisticsComponent + PartnerSaleStatisticsComponent, + ParterRebateManageMentParticularsComponent ]; @NgModule({ diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.html b/src/app/routes/partner/rebate-management/components/list/particulars.component.html new file mode 100644 index 00000000..f252aa0e --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/list/particulars.component.html @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.ts b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts new file mode 100644 index 00000000..5894e71d --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts @@ -0,0 +1,165 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../services/rebate-management.service'; + +@Component({ + selector: 'app-parter-channel-rebate-management-particulars', + templateUrl: './particulars.component.html' +}) +export class ParterRebateManageMentParticularsComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: RebateManagementService, + private modalService: NzModalService, + public shipperservice: ShipperBaseService + + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '订单号' + }, + phone: { + type: 'string', + title: '付款单号' + }, + phone2: { + type: 'string', + title: '下单客户' + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), + }, + }, + phone3: { + type: 'string', + title: '合伙人名称' + }, + deadlineTime: { + title: '时间范围', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + } as SFDateWidgetSchema, + }, + } + }; + this.ui = { + '*': { + grid: { span: 8, gutter: 4 } + } + }; + } + + initST() { + this.columns = [ + { + title: '订单号', + index: 'name1' + }, + { + title: '订单金额(元)', + index: 'name1' + }, + { + title: '付款金额(元)', + index: 'name1' + }, + { + title: '返佣金额(元)', + index: 'name1' + }, + { + title: '附加费率', + index: 'name1' + }, + { + title: '下单客户', + index: 'name1' + }, + { + title: '网络货运人', + index: 'name1' + }, + { + title: '合伙人名称', + index: 'name1' + }, + { + title: '网络货运人', + index: 'name1' + }, + { + title: '合伙人等级', + index: 'name1' + }, + { + title: '管理费比例', + index: 'name1' + }, + { + title: '固定结算费率', + index: 'name1' + }, + { + title: '返佣时间', + index: 'name1' + }, + + ]; + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } + + +} diff --git a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts new file mode 100644 index 00000000..5430876a --- /dev/null +++ b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class RebateManagementService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 0ee7956f..90c2212b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -513,6 +513,24 @@ "text": "业务统计", "link": "/partner/business-statistics/index" }, + { + "text": "返佣管理", + "group": true, + "children": [ + { + "text": "返佣配置", + "link": "/partner/rebate/" + }, + { + "text": "返佣明细", + "link": "/partner/rebate/particulars" + }, + { + "text": "返佣记录", + "link": "/partner/rebate/" + } + ] + }, { "text": "销售渠道管理", "link": "/partner/channel-sales/list"