From 6ccb5ced18b477c9f2fe9df1a0fa92f1a30614ac Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Tue, 15 Mar 2022 17:02:13 +0800 Subject: [PATCH 01/21] e --- src/app/core/startup/startup.service.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index 5c3efc42..04aef8a0 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -49,9 +49,9 @@ export class StartupService { let data; if (this.coreSrv.loginStatus) { // 本地菜单 - data = this.loadMockData(); + // data = this.loadMockData(); // 远程菜单 - // data = this.loadRemoteData(); + data = this.loadRemoteData(); } else { data = this.loadMockData(); } @@ -134,12 +134,12 @@ export class StartupService { const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data)); // 菜单数据 - const menuData = this.httpClient - .post(this.coreSrv.$api_get_current_user_menus, { - appId: this.coreSrv.envSrv.getEnvironment().appId - }) - .pipe(map((res: any) => res.data)); - // const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); + // const menuData = this.httpClient + // .post(this.coreSrv.$api_get_current_user_menus, { + // appId: this.coreSrv.envSrv.getEnvironment().appId + // }) + // .pipe(map((res: any) => res.data)); + const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); return zip(appData, userData, menuData); } From 3539bd2a079e47e14a792aec1af4f90673ba9b30 Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Tue, 15 Mar 2022 17:32:24 +0800 Subject: [PATCH 02/21] edit --- src/app/global-config.module.ts | 9 ++- .../dashboard/dashboard.component.html | 13 ++++ .../dashboard/dashboard.component.less | 0 .../dashboard/dashboard.component.ts | 66 +++++++++++++++++++ .../regulatory-data-routing.module.ts | 12 ++++ .../regulatory-data/regulatory-data.module.ts | 14 ++++ .../services/regulatory-data.service.ts | 9 +++ src/app/routes/routes-routing.module.ts | 4 +- src/app/shared/index.ts | 1 + src/app/shared/shared-g2.module.ts | 6 ++ src/assets/mocks/menu-data.json | 10 +++ 11 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 src/app/routes/regulatory-data/components/dashboard/dashboard.component.html create mode 100644 src/app/routes/regulatory-data/components/dashboard/dashboard.component.less create mode 100644 src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts create mode 100644 src/app/routes/regulatory-data/regulatory-data-routing.module.ts create mode 100644 src/app/routes/regulatory-data/regulatory-data.module.ts create mode 100644 src/app/routes/regulatory-data/services/regulatory-data.service.ts create mode 100644 src/app/shared/shared-g2.module.ts diff --git a/src/app/global-config.module.ts b/src/app/global-config.module.ts index 163c16c9..d92a7840 100644 --- a/src/app/global-config.module.ts +++ b/src/app/global-config.module.ts @@ -20,7 +20,14 @@ const alainConfig: AlainConfig = { sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } }, pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, auth: { login_url: '/passport/login' }, - acl: { guard_url: '/exception/403' } + acl: { guard_url: '/exception/403' }, + chart: { + // 以下是默认配置,如果项目无法外网访问,可以根据 `angular.json` 配置将依赖包直接使用 `./assets***` 路径 + libs: [ + 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.4/dist/g2.min.js', + 'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.7/dist/data-set.js' + ] + } }; const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()]; diff --git a/src/app/routes/regulatory-data/components/dashboard/dashboard.component.html b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.html new file mode 100644 index 00000000..06139f88 --- /dev/null +++ b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.html @@ -0,0 +1,13 @@ + + diff --git a/src/app/routes/regulatory-data/components/dashboard/dashboard.component.less b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts new file mode 100644 index 00000000..d895eedc --- /dev/null +++ b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts @@ -0,0 +1,66 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { G2PieClickItem, G2PieComponent, G2PieData } from '@delon/chart/pie'; +import { NzMessageService } from 'ng-zorro-antd/message'; + +@Component({ + selector: 'app-dashboard', + templateUrl: './dashboard.component.html', + styleUrls: ['./dashboard.component.less'] +}) +export class DashboardComponent implements OnInit { + @ViewChild('pie', { static: false }) readonly pie!: G2PieComponent; + salesPieData: G2PieData[] = []; + total = ''; + + constructor(private msg: NzMessageService) { + this.refresh(); + } + ngOnInit(): void { + throw new Error('Method not implemented.'); + } + + refresh(): void { + const rv = (min: number = 0, max: number = 5000) => Math.floor(Math.random() * (max - min + 1) + min); + this.salesPieData = [ + { + x: '家用电器', + y: rv() + }, + { + x: '食用酒水', + y: rv() + }, + { + x: '个护健康', + y: rv() + }, + { + x: '服饰箱包', + y: rv() + }, + { + x: '母婴产品', + y: rv() + } + ]; + if (Math.random() > 0.5) { + this.salesPieData.push({ + x: '其他', + y: rv() + }); + } + this.total = `¥ ${this.salesPieData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`; + if (this.pie) { + // 等待组件渲染 + setTimeout(() => this.pie.changeData()); + } + } + + format(val: number): string { + return `¥ ${val.toFixed(2)}`; + } + + handleClick(data: G2PieClickItem): void { + this.msg.info(`${data.item.x} - ${data.item.y}`); + } +} diff --git a/src/app/routes/regulatory-data/regulatory-data-routing.module.ts b/src/app/routes/regulatory-data/regulatory-data-routing.module.ts new file mode 100644 index 00000000..bb68bd97 --- /dev/null +++ b/src/app/routes/regulatory-data/regulatory-data-routing.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { DashboardComponent } from './components/dashboard/dashboard.component'; + +const routes: Routes = [{ path: 'dashboard', component: DashboardComponent }]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class RegulatoryDataRoutingModule {} diff --git a/src/app/routes/regulatory-data/regulatory-data.module.ts b/src/app/routes/regulatory-data/regulatory-data.module.ts new file mode 100644 index 00000000..c76d3521 --- /dev/null +++ b/src/app/routes/regulatory-data/regulatory-data.module.ts @@ -0,0 +1,14 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { SharedModule, SHARED_G2_MODULES } from '@shared'; + +import { DashboardComponent } from './components/dashboard/dashboard.component'; +import { RegulatoryDataRoutingModule } from './regulatory-data-routing.module'; + +const COMPONENTS: any = [DashboardComponent]; +const NOTROUTECOMPONENTS: any = []; +@NgModule({ + declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], + imports: [CommonModule, RegulatoryDataRoutingModule, SharedModule, SHARED_G2_MODULES] +}) +export class RegulatoryDataModule {} diff --git a/src/app/routes/regulatory-data/services/regulatory-data.service.ts b/src/app/routes/regulatory-data/services/regulatory-data.service.ts new file mode 100644 index 00000000..7206840f --- /dev/null +++ b/src/app/routes/regulatory-data/services/regulatory-data.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class RegulatoryDataService { + + constructor() { } +} diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 68b60fe7..712e39ec 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -15,6 +15,7 @@ import { RouterModule, Routes } from '@angular/router'; import { LayoutProComponent } from '@brand'; import { EATokenGuard } from '@core'; import { environment } from '@env/environment'; + import { AuthGuard } from '../core/guards/auth.guard'; // dashboard pages @@ -68,6 +69,7 @@ const routes: Routes = [ }, { path: 'menu-management', loadChildren: () => import('./menu-manager/menu-manager.module').then(m => m.MenuManagerModule) }, { path: 'partner', loadChildren: () => import('./partner/partner.module').then(m => m.PartnerModule) }, + { path: 'regulatory-data', loadChildren: () => import('./regulatory-data/regulatory-data.module').then(m => m.RegulatoryDataModule) }, { path: 'download', loadChildren: () => import('./download/download.module').then(m => m.DownloadModule) @@ -92,4 +94,4 @@ const routes: Routes = [ ], exports: [RouterModule] }) -export class RouteRoutingModule { } +export class RouteRoutingModule {} diff --git a/src/app/shared/index.ts b/src/app/shared/index.ts index d8f2d2d9..7ea8c70d 100644 --- a/src/app/shared/index.ts +++ b/src/app/shared/index.ts @@ -33,4 +33,5 @@ export * from './shared.module'; export * from './shared-delon.module'; export * from './shared-zorro.module'; export * from './shared-third.module'; +export * from './shared-g2.module'; export * from './widget/st-widget.module'; diff --git a/src/app/shared/shared-g2.module.ts b/src/app/shared/shared-g2.module.ts new file mode 100644 index 00000000..685f05bc --- /dev/null +++ b/src/app/shared/shared-g2.module.ts @@ -0,0 +1,6 @@ +import { G2BarModule } from '@delon/chart/bar'; +import { G2MiniAreaModule } from '@delon/chart/mini-area'; +import { G2PieModule } from '@delon/chart/pie'; +import { G2TimelineModule } from '@delon/chart/timeline'; + +export const SHARED_G2_MODULES = [G2BarModule, G2PieModule, G2TimelineModule, G2MiniAreaModule]; diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 82dcd221..22c0317b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -630,6 +630,16 @@ } ] + }, + { + "text": "数据监管", + "icon": "iconfont icon-hetong-copy", + "group": true, + "children": [{ + "text": "数据报表", + "link": "/regulatory-data/dashboard" + } + ] } ] }] From 259effd5b5f0a93cd02a960f73f4174e6a0bc4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 17 Mar 2022 17:24:45 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E5=85=A5=E8=B4=A6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/detail/detail.component.html | 37 ++--- .../components/detail/detail.component.ts | 126 +++++++++--------- .../components/record/record.component.html | 5 +- .../components/record/record.component.ts | 101 ++++++++------ .../recorded/services/recorded.service.ts | 17 +++ 5 files changed, 161 insertions(+), 125 deletions(-) create mode 100644 src/app/routes/partner/recorded/services/recorded.service.ts diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.html b/src/app/routes/partner/recorded/components/detail/detail.component.html index f3d36121..714483bc 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.html +++ b/src/app/routes/partner/recorded/components/detail/detail.component.html @@ -18,9 +18,9 @@

待审批

- +
@@ -31,48 +31,49 @@
- {{formData?.ltdName}} + {{formData?.accountName}} {{formData?.ltdName}} - {{formData?.refundApplyCode}} + {{formData?.entryNumber}} - {{formData?.bankType==='1'?'平安银行':'浦发银行'}} + {{formData?.bankName}} - {{formData?.virtualAccount}} + {{formData?.fictitiousAccount}} - {{formData?.createTime}} + {{formData?.submitTime}} - {{formData?.amount | currency}} + {{formData?.invoiceAmount | currency}} - {{formData?.amount | currency}} + {{formData?.taxPersonal | currency}} - {{formData?.amount | currency}} + {{formData?.recordedAmount | currency}} - {{formData?.refundStatusLabel}} + {{formData?.stsLabel}} - + + - - {{formData?.bankCardNumber}} + {{formData?.expressName}} - + + - - {{formData?.bankSerialNumber}} + {{formData?.bankFlow}}
diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.ts b/src/app/routes/partner/recorded/components/detail/detail.component.ts index e1dc2eba..f2782ef5 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.ts +++ b/src/app/routes/partner/recorded/components/detail/detail.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; +import { RecordedService } from '../../services/recorded.service'; @Component({ @@ -16,7 +17,7 @@ export class PartnerRecordedDetailComponent implements OnInit { msg = ''; id = ''; - constructor(public service: FreightAccountService, private route: ActivatedRoute, private nzModalService: NzModalService) { + constructor(public service: RecordedService, private route: ActivatedRoute, private nzModalService: NzModalService) { this.id = route.snapshot.params.id; this.loadRefundDetail(this.id); } @@ -24,49 +25,49 @@ export class PartnerRecordedDetailComponent implements OnInit { ngOnInit(): void { } loadRefundDetail(id: string) { - this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => { + this.service.request(this.service.$api_get_recorded_record_detail, { id }).subscribe(res => { if (res) { this.formData = res; // 处理流程节点数据 // 流程是否结束 - let isEnd = false; - if (res.successTime) { - isEnd = true; - if (res.refundStatus === '3') { - this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); - } else { - this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' }); - } - } - if (res.agreeTime && res.refundStatus !== '4') { - this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); - } - if (res.agreeTime) { - if (res.refundStatus === '4') { - isEnd = true; - this.timeLineData.push({ - time: res.agreeTime, - value: `拒绝提现
操作人员:${res.handlerUserIdLabel}`, - color: 'red' - }); - } else { - this.timeLineData.push({ - time: res.agreeTime, - value: `审核通过
操作人员:${res.handlerUserIdLabel}`, - color: 'gray' - }); - } - } - if (res.createTime) { - this.timeLineData.push({ - time: res.createTime, - value: `提交提现申请
提现${res.amount}元至${res.bankName}(${res.bankCardNumber})
操作人员:${res.userIdLabel}`, - color: 'gray' - }); - } - if (this.timeLineData?.length > 0 && !isEnd) { - this.timeLineData[0].color = 'green'; - } + // let isEnd = false; + // if (res.successTime) { + // isEnd = true; + // if (res.refundStatus === '3') { + // this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); + // } else { + // this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' }); + // } + // } + // if (res.agreeTime && res.refundStatus !== '4') { + // this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); + // } + // if (res.agreeTime) { + // if (res.refundStatus === '4') { + // isEnd = true; + // this.timeLineData.push({ + // time: res.agreeTime, + // value: `拒绝提现
操作人员:${res.handlerUserIdLabel}`, + // color: 'red' + // }); + // } else { + // this.timeLineData.push({ + // time: res.agreeTime, + // value: `审核通过
操作人员:${res.handlerUserIdLabel}`, + // color: 'gray' + // }); + // } + // } + // if (res.createTime) { + // this.timeLineData.push({ + // time: res.createTime, + // value: `提交提现申请
提现${res.amount}元至${res.bankName}(${res.bankCardNumber})
操作人员:${res.userIdLabel}`, + // color: 'gray' + // }); + // } + // if (this.timeLineData?.length > 0 && !isEnd) { + // this.timeLineData[0].color = 'green'; + // } } }); } @@ -85,37 +86,20 @@ export class PartnerRecordedDetailComponent implements OnInit { onClick: () => { if (!this.msg || this.msg.trim().length === 0) { this.service.msgSrv.warning('请填写拒绝原因 '); - return false; + return; } - this.service - .request(this.service.$api_disagree_refund, { - refundApplicationId: params, - msg: this.msg - }) - .subscribe(res => { - if (res) { - this.service.msgSrv.success('审核拒绝成功'); - modal.destroy(true); - } - }); - return false; + this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => { + modal.destroy(true); + }, '审核拒绝成功'); } }, { label: '通过', type: 'primary', onClick: () => { - this.service - .request(this.service.$api_agree_refund, { - refundApplicationId: params, - msg: this.msg - }) - .subscribe(res => { - if (res) { - this.service.msgSrv.success('审核通过成功'); - modal.destroy(true); - } - }); + this.audit({ id: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => { + modal.destroy(true); + }, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`); } } ] @@ -129,4 +113,18 @@ export class PartnerRecordedDetailComponent implements OnInit { goBack() { history.go(-1); } + + /** + * 审核 + */ + audit(params: any, callback: Function, msg = '成功') { + this.service + .request(this.service.$api_audit_recored, ...params) + .subscribe(res => { + if (res) { + this.service.msgSrv.success(msg); + callback(); + } + }); + } } diff --git a/src/app/routes/partner/recorded/components/record/record.component.html b/src/app/routes/partner/recorded/components/record/record.component.html index 60aa8d08..e6233910 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.html +++ b/src/app/routes/partner/recorded/components/record/record.component.html @@ -41,8 +41,9 @@
- diff --git a/src/app/routes/partner/recorded/components/record/record.component.ts b/src/app/routes/partner/recorded/components/record/record.component.ts index 4b97ba2c..7e154473 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.ts +++ b/src/app/routes/partner/recorded/components/record/record.component.ts @@ -2,9 +2,11 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import Big from 'src/app/shared/utils/deal-precision'; +import { RecordedService } from '../../services/recorded.service'; @Component({ @@ -39,7 +41,8 @@ export class PartnerRecordedRecordComponent implements OnInit { accountName = ''; // 账户名称 - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { + constructor(public service: RecordedService, private nzModalService: NzModalService, + private router: Router, public ar: ActivatedRoute, public shipperSrv: ShipperBaseService) { this.accountName = this.ar.snapshot.queryParams?.userIdLabel || ''; this.ltdId = this.ar.snapshot.queryParams?.ltdId || ''; @@ -139,39 +142,34 @@ export class PartnerRecordedRecordComponent implements OnInit { onClick: () => { if (!this.msg || this.msg.trim().length === 0) { this.service.msgSrv.warning('请填写拒绝原因 '); - return false; + return; } - this.service - .request(this.service.$api_disagree_refund, { - refundApplicationId: params, - msg: this.msg - }) - .subscribe(res => { - if (res) { - this.service.msgSrv.success('审核拒绝成功'); - modal.destroy(); - this.st.load(1); - } - }); - return false; + this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => { + modal.destroy(); + this.st.load(1); + }, '审核拒绝成功'); + // this.service + // .request(this.service.$api_disagree_recorded, { + // id: params, + // rejectReason: this.msg + // }) + // .subscribe(res => { + // if (res) { + // this.service.msgSrv.success('审核拒绝成功'); + // modal.destroy(); + // this.st.load(1); + // } + // }); } }, { label: '通过', type: 'primary', onClick: () => { - this.service - .request(this.service.$api_agree_refund, { - refundApplicationId: params, - msg: this.msg - }) - .subscribe(res => { - if (res) { - this.service.msgSrv.success('审核通过成功'); - modal.destroy(); - this.st.load(1); - } - }); + this.audit({ id: params, rejectReason: this.msg, sts: '1' }, () => { + modal.destroy(); + this.st.load(1); + }, '审核通过成功'); } } ] @@ -230,12 +228,19 @@ export class PartnerRecordedRecordComponent implements OnInit { placeholder: '请输入' } }, - refundStatus: { + sts: { type: 'string', title: '入账状态', + default: '', + enum: [ + { label: '全部', value: '' }, + { label: '待初审', value: 0 }, + { label: '待复核', value: 1 }, + { label: '已入账', value: 2 }, + { label: '已拒绝', value: 3 }, + ], ui: { - widget: 'dict-select', - params: { dictKey: 'refund:apply:status' }, + widget: 'select', placeholder: '请选择' } }, @@ -247,10 +252,10 @@ export class PartnerRecordedRecordComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - asyncData: () => this.service.getNetworkFreightForwarder(), + asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), } }, - createTime: { + submitTime: { title: '提交时间', type: 'string', ui: { @@ -270,9 +275,9 @@ export class PartnerRecordedRecordComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox', className: 'text-center' }, - { title: '账户名称', index: 'createTime', width: 180, className: 'text-center' }, - { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, - { title: '入账单号', index: 'refundApplyCode', width: 190, className: 'text-center' }, + { title: '账户名称', index: 'accountName', width: 180, className: 'text-center' }, + { title: '虚拟账户', index: 'fictitiousAccount', width: 180, className: 'text-center' }, + { title: '入账单号', index: 'entryNumber', width: 190, className: 'text-center' }, { title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' }, { title: '开票金额', @@ -284,7 +289,7 @@ export class PartnerRecordedRecordComponent implements OnInit { }, { title: '代缴个税', - index: 'amount', + index: 'taxPersonal', width: 150, type: 'widget', className: 'text-right', @@ -292,15 +297,15 @@ export class PartnerRecordedRecordComponent implements OnInit { }, { title: '入账金额', - index: 'amount', + index: 'entryAmount', width: 150, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } }, - { title: '提交时间', index: 'bankSerialNumber', width: 160, className: 'text-center' }, - { title: '入账状态', index: 'refundStatusLabel', width: 100, className: 'text-center' }, + { title: '提交时间', index: 'submitTime', width: 160, className: 'text-center' }, + { title: '入账状态', index: 'stsLabel', width: 100, className: 'text-center' }, { title: '操作', fixed: 'right', @@ -308,12 +313,12 @@ export class PartnerRecordedRecordComponent implements OnInit { buttons: [ { text: '审核', - iif: item => item.refundStatus === '1', + iif: item => item.refundStatus === '0', click: item => this.auditAction(item) }, { text: '复审', - iif: item => item.refundStatus === '2', + iif: item => item.sts === '1', click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) }, { @@ -324,4 +329,18 @@ export class PartnerRecordedRecordComponent implements OnInit { } ]; } + + /** + * 审核 + */ + audit(params: any, callback: Function, msg = '成功') { + this.service + .request(this.service.$api_audit_recored, ...params) + .subscribe(res => { + if (res) { + this.service.msgSrv.success(msg); + callback(); + } + }); + } } diff --git a/src/app/routes/partner/recorded/services/recorded.service.ts b/src/app/routes/partner/recorded/services/recorded.service.ts new file mode 100644 index 00000000..bb27a3dc --- /dev/null +++ b/src/app/routes/partner/recorded/services/recorded.service.ts @@ -0,0 +1,17 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root' +}) +export class RecordedService extends BaseService { + + $api_get_recorded_page = `/api/bpc/partnerInvoice/getDetail`; // 查询合伙人发票入账主表 + $api_get_recorded_record_detail = `api/bpc/partnerInvoice/getDetailByOpration`; // 入账记录详情 + $api_disagree_recorded = ``; // 拒绝审核 + $api_agree_recorded = ``; // 同意审核 + $api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据 + constructor(public injector: Injector) { + super(injector); + } +} From 9c5fdabab97caae22b60550881def7cd433484c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 17 Mar 2022 19:35:35 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E3=80=81=E8=B4=A6=E6=88=B7=E6=98=8E=E7=BB=86=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list/list.component.html | 17 +++++----- .../components/list/list.component.ts | 19 ++++++------ .../virtual-account-detail.component.html | 15 +++++++-- .../virtual-account-detail.component.ts | 31 ++++++++++--------- .../withdrawals-record.component.html | 2 +- .../withdrawals-record.component.ts | 3 +- .../services/account-managemant.service.ts | 5 ++- 7 files changed, 53 insertions(+), 39 deletions(-) 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 d071efc2..e4e84339 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 @@ -18,21 +18,18 @@ [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"> - - {{item.yskmoney}} + +
{{item.allBalance | currency:' '}}
- -
{{item.approvalStatus1 | currency:' '}}
-
- + {{item.yskmoney | currency:' + [routerLink]="'/partner/account-management/am/recorded/detail/'+item?.id">{{item.unEntryAmount | currency:' '}} - - -
{{item.yskmoney | currency:' '}}
+ +
{{item.availableBalance | 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 84e281a5..7e58f5e1 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 @@ -36,14 +36,14 @@ export class PartnerAccountManagementListComponent implements OnInit { initSF() { this.schema = { properties: { - abnormalCause: { + userName: { title: '合伙人名称', type: 'string', ui: { placeholder: '请输入', }, }, - abnormalCause1: { + phone: { title: '手机号', type: 'string', ui: { @@ -59,14 +59,15 @@ export class PartnerAccountManagementListComponent implements OnInit { */ initST() { this.columns = [ - { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 300 }, - { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 200 }, - { title: '账户总额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 200 }, - { title: '待入账余额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 200 }, - { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 250 }, - { title: '虚拟账户', index: 'approvalStatus4', className: 'text-center', width: 200 }, + { title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 }, + { title: '手机号', index: 'phone', className: 'text-center', width: 200 }, + { title: '账户总额(元)', render: 'allBalance', className: 'text-right', sort: true, width: 200 }, + { title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', sort: true, width: 200 }, + { title: '可用余额(元)', render: 'availableBalance', className: 'text-right', sort: true, width: 250 }, + { title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 200 }, { title: '操作', + width: 100, buttons: [ { text: '虚拟账户明细', @@ -94,7 +95,7 @@ export class PartnerAccountManagementListComponent implements OnInit { nzTitle: '虚拟账户明细', nzContent: PartnerAccountManagementVirtualAccountDetailComponent, nzComponentParams: { - id: _record?.id + roleId: _record?.roleId }, nzWidth: '85%', nzFooter: null diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html index 649ddc1c..ae98a690 100644 --- a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html @@ -14,12 +14,23 @@
- + [loading]="service.http.loading"> + +
+ {{item.allBalance}} +
+
+ +
+ {{item.availableBalance}} +
+
+
- diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts index 6a428518..8abf556f 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts @@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import Big from 'src/app/shared/utils/deal-precision'; +import { AccountManagemantService } from '../../services/account-managemant.service'; @Component({ @@ -27,7 +28,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni refundStatus: any = ''; msg = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { } + constructor(public service: FreightAccountService, public amService: AccountManagemantService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { } ngOnInit(): void { } 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 index d88522a1..8b9d9acb 100644 --- a/src/app/routes/partner/account-management/services/account-managemant.service.ts +++ b/src/app/routes/partner/account-management/services/account-managemant.service.ts @@ -6,7 +6,10 @@ import { BaseService } from '@shared'; }) export class AccountManagemantService extends BaseService { - $api_get_account_management_page = `/api/fcc/ficoBrmH/list/page`; + $api_get_account_management_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceByOperator`; // 账户管理 + $api_get_virtual_detail_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceInfoByOperator`;//虚拟账户明细 + $api_get_withdraw_record_page = `/api/fcc/refundApplicationOBC/list/partnerPage`;// 提现记录 + constructor(public injector: Injector) { super(injector) } From a6193fbddc54d7926430271b3f8313b2fe22302d Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Fri, 18 Mar 2022 14:56:14 +0800 Subject: [PATCH 05/21] edit --- .../add-etp-partner.component.ts | 26 +- .../add-personal-partner.component.ts | 39 +- .../index/partner-list.component.html | 165 ++-- .../index/partner-list.component.ts | 143 +++- .../partner-detail.component.html | 778 +++++++++++------- .../partner-detail.component.ts | 70 +- .../personal-partner-detail.component.html | 253 ++++++ .../personal-partner-detail.component.less | 30 + .../personal-partner-detail.component.ts | 240 ++++++ .../services/partner-list.service.ts | 13 + .../routes/partner/partner-routing.module.ts | 54 +- src/app/routes/partner/partner.module.ts | 6 +- src/styles.less | 26 +- 13 files changed, 1325 insertions(+), 518 deletions(-) create mode 100644 src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html create mode 100644 src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less create mode 100644 src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts diff --git a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts index 00540e31..38f07c5a 100644 --- a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { apiConf } from '@conf/api.conf'; import { @@ -14,6 +14,7 @@ import { } from '@delon/form'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { of } from 'rxjs'; + import { PartnerListService } from '../../services/partner-list.service'; const IMAGECONFIG = { @@ -43,7 +44,7 @@ const DATECONFIG = { templateUrl: './add-etp-partner.component.html', styleUrls: ['./add-etp-partner.component.less'] }) -export class AddEtpPartnerComponent implements OnInit { +export class AddEtpPartnerComponent { @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = this.initBasicInfoSF(); @@ -65,10 +66,9 @@ export class AddEtpPartnerComponent implements OnInit { }; constructor(private router: Router, public service: PartnerListService) {} - ngOnInit() {} submitForm() { - if (!this.sf.valid ) { + if (!this.sf.valid) { this.sf.validator({ emitError: true }); this.service.msgSrv.warning('请修改填写错误信息'); return; @@ -118,7 +118,9 @@ export class AddEtpPartnerComponent implements OnInit { } } ); - // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { + console.log(params); + + // this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => { // if (res) { // this.service.msgSrv.success('企业新增成功'); // this.goBack(); @@ -549,7 +551,7 @@ export class AddEtpPartnerComponent implements OnInit { } as SFCheckboxWidgetSchema } }, - required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber','operatingStartTime'] + required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'operatingStartTime'] }, // 所属城市 _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, @@ -568,7 +570,7 @@ export class AddEtpPartnerComponent implements OnInit { { title: '已支付', key: 'TRADE_SUCCESS' }, { title: '交易完成', key: 'TRADE_FINISHED' } ]) - } as SFTreeSelectWidgetSchema, + } as SFTreeSelectWidgetSchema }, // 渠道销售 _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, @@ -586,7 +588,15 @@ export class AddEtpPartnerComponent implements OnInit { } } }, - required: ['_licenseTips', 'licensePhotoWatermark', 'unifiedSocialCreditCode', 'enterpriseName', 'operatingStartTime', 'status3','channel'] + required: [ + '_licenseTips', + 'licensePhotoWatermark', + 'unifiedSocialCreditCode', + 'enterpriseName', + 'operatingStartTime', + 'status3', + 'channel' + ] }; } } diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts index ed2eac4f..4dffa7bf 100644 --- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts @@ -1,9 +1,20 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { apiConf } from '@conf/api.conf'; -import { SFUploadWidgetSchema, SFComponent, SFSchema, SFUISchema, SFDateWidgetSchema, SFCheckboxWidgetSchema, SFTreeSelectWidgetSchema } from '@delon/form'; +import { + SFUploadWidgetSchema, + SFComponent, + SFSchema, + SFUISchema, + SFDateWidgetSchema, + SFCheckboxWidgetSchema, + SFTreeSelectWidgetSchema +} from '@delon/form'; +import { NzTreeNode } from 'ng-zorro-antd/tree'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { of } from 'rxjs'; +import { map } from 'rxjs/operators'; + import { PartnerListService } from '../../services/partner-list.service'; const IMAGECONFIG = { @@ -33,7 +44,7 @@ const DATECONFIG = { templateUrl: './add-personal-partner.component.html', styleUrls: ['./add-personal-partner.component.less'] }) -export class AddPersonalPartnerComponent implements OnInit { +export class AddPersonalPartnerComponent { @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = this.initBasicInfoSF(); @@ -55,7 +66,6 @@ export class AddPersonalPartnerComponent implements OnInit { }; constructor(private router: Router, public service: PartnerListService) {} - ngOnInit() {} submitForm() { if (!this.sf.valid) { @@ -305,18 +315,22 @@ export class AddPersonalPartnerComponent implements OnInit { status3: { type: 'string', title: '所属城市', - default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'], ui: { widget: 'tree-select', grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请选择城市(最多3个)', checkable: true, + class: 'city-tree-select', asyncData: () => - of([ - { title: '待支付', key: 'WAIT_BUYER_PAY' }, - { title: '已支付', key: 'TRADE_SUCCESS' }, - { title: '交易完成', key: 'TRADE_FINISHED' } - ]) + this.getRegionDetailByCode('').pipe( + map((res: any) => + res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, disabled: true, isDisableCheckbox: true })) + ) + ), + expandChange: ({ node }: { node: NzTreeNode }) => + this.getRegionDetailByCode(node.key).pipe( + map((res: any) => res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, isLeaf: true }))) + ) } as SFTreeSelectWidgetSchema }, // 渠道销售 @@ -335,10 +349,7 @@ export class AddPersonalPartnerComponent implements OnInit { } } }, - required: [ - 'status3', - 'channel' - ] + required: ['status3', 'channel'] }; } } diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.html b/src/app/routes/partner/partner-list/components/index/partner-list.component.html index 1e4aa340..b5652c72 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.html +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.html @@ -1,95 +1,100 @@ - - + -
-
- -
-
- - - -
+
+
+
+
+ + + +
+
-
- - -
+
+ + +
- - + +
-
-
- - 深圳某某有限公司 - - - - - - - -
+
+
+ 深圳某某有限公司 + + + + + +
-

说明:修改模板后,当月开始返佣收益将会按新模板计算

+
+

说明:修改模板后,当月开始返佣收益将会按新模板计算

-
-
- - 深圳某某有限公司 - - - 张三/13999999999 - - - - - - - - - - - -

已选(0)

- - - - - 客户名称 - - - - - - {{ data.name }} - - - -
- - - - - - -
+
+
+ 深圳某某有限公司 + 张三/13999999999 + + + + + + + + + + +

已选(0)

+ + + + + 客户名称 + + + + + + {{ data.name }} + + + +
+ + + + + +
-

客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客

- \ No newline at end of file +
+

客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客

+ diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts index 219a9d6b..4f415651 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -1,9 +1,10 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; + import { PartnerListService } from '../../services/partner-list.service'; import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component'; @@ -12,7 +13,7 @@ import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit templateUrl: './partner-list.component.html', styleUrls: ['../../../../commom/less/box.less'] }) -export class PartnerListComponent implements OnInit { +export class PartnerListComponent { @ViewChild('st', { static: true }) st!: STComponent; @ViewChild('sf', { static: false }) @@ -30,8 +31,6 @@ export class PartnerListComponent implements OnInit { constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {} - ngOnInit(): void {} - beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { let params = { ...this.sf.value }; @@ -122,19 +121,19 @@ export class PartnerListComponent implements OnInit { hidden: true } }, - paycode: { + enterpriseName: { type: 'string', title: '合伙人名称' }, - paycode2: { + contactName: { type: 'string', title: '企业管理员' }, - paycod3e: { + contactMobile: { type: 'string', title: '手机号' }, - paycod31e: { + channelId: { type: 'string', title: '渠道销售', ui: { @@ -144,32 +143,37 @@ export class PartnerListComponent implements OnInit { } } }, - orderS2n: { + partnerType: { type: 'string', title: '类型', + enum: [ + { value: '', label: '全部' }, + { value: 1, label: '企业' }, + { value: 2, label: '个人' } + ], ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'refund:apply:status' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } - } + }, + default: '' }, - paytype: { + approvalStatus: { type: 'string', title: '认证审核状态', ui: { widget: 'dict-select', containsAllLabel: true, + params: { dictKey: 'pay:mode' }, placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } } }, - paymode: { + signStatus: { type: 'string', title: '签约状态', ui: { @@ -182,7 +186,7 @@ export class PartnerListComponent implements OnInit { } } }, - paymo1de: { + crmStatus: { type: 'string', title: 'CRM状态', ui: { @@ -198,41 +202,47 @@ export class PartnerListComponent implements OnInit { paymo11de: { type: 'string', title: '注册渠道', + enum: [ + { value: '', label: '全部' }, + { value: 1, label: '合伙人注册' }, + { value: 2, label: '平台添加' } + ], ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'pay:mode' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } - } + }, + default: '' }, - paymo11d1e: { + templateId: { type: 'string', title: '返佣模板', ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'pay:mode' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } } }, - paymo11d11e: { + lockedStatus: { type: 'string', title: '合伙人状态', + enum: [ + { value: '', label: '全部' }, + { value: 0, label: '启用' }, + { value: 1, label: '冻结' } + ], ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'pay:mode' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } - } + }, + default: '' }, createTime: { title: '注册时间', @@ -251,20 +261,63 @@ export class PartnerListComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '合伙人名称', index: 'payCode', width: 180 }, + { title: '合伙人名称', index: 'enterpriseName', width: 180 }, { title: '付款编码', index: 'ltdName', width: 160 }, - { title: '邀请码', index: 'payDate', className: 'text-center', width: 130 }, - { title: '企业管理员', index: 'payDate', width: 150 }, - { title: '手机号', index: 'payDate', className: 'text-center', width: 150 }, - { title: '类型', index: 'payDate', className: 'text-center', width: 130 }, + { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 }, + { title: '企业管理员', index: 'contactName', width: 150 }, + { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, + { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '注册渠道', index: 'payDate', type: 'date', width: 130 }, - { title: '注册时间', index: 'payDate', className: 'text-center', width: 170 }, + { title: '注册时间', index: 'createTime', className: 'text-center', width: 170 }, { title: '渠道销售', index: 'payDate', width: 170 }, - { title: '返佣模板', index: 'payDate', width: 150 }, - { title: '认证审核状态', index: 'payDate', width: 150 }, - { title: '签约状态', index: 'payDate', width: 150 }, - { title: 'CRM状态', index: 'payDate', width: 150 }, - { title: '合伙人状态', index: 'payDate', className: 'text-center', width: 140 }, + { title: '返佣模板', index: 'templateName', width: 150 }, + { + title: '认证审核状态', + index: 'approvalStatus', + width: 150, + type: 'badge', + badge: { + 0: { text: '草稿', color: 'default' }, + 10: { text: '待审核', color: 'processing' }, + 20: { text: '审核通过', color: 'success' }, + 30: { text: '驳回', color: 'error' } + } + }, + { + title: '签约状态', + index: 'signStatus', + width: 150, + type: 'badge', + badge: { + 10: { text: '待合伙人签约', color: 'default' }, + 15: { text: '签约中', color: 'processing' }, + 20: { text: '平台签约完成', color: 'success' }, + 30: { text: '驳回', color: 'error' } + } + }, + { + title: 'CRM状态', + index: 'crmStatus', + width: 150, + type: 'badge', + badge: { + 0: { text: '未发起', color: 'default' }, + 10: { text: '待审核', color: 'processing' }, + 20: { text: '审核通过', color: 'success' }, + 30: { text: '驳回', color: 'error' } + } + }, + { + title: '合伙人状态', + index: 'lockedStatus', + className: 'text-center', + width: 140, + type: 'badge', + badge: { + 0: { text: '启用', color: 'success' }, + 1: { text: '冻结', color: 'error' } + } + }, { title: '操作', fixed: 'right', @@ -273,7 +326,13 @@ export class PartnerListComponent implements OnInit { { type: 'divider' }, { text: '详情
', - click: item => this.router.navigate(['/partner/partner-list/detail/' + item.id]) + click: item => { + if (item.partnerType === 1) { + this.router.navigate([`/partner/partner-list/etp-detail/${item.appUserId}`]); + } else { + this.router.navigate([`/partner/partner-list/personal-detail/${item.appUserId}`]); + } + } }, { text: '修改返佣模板', @@ -289,7 +348,7 @@ export class PartnerListComponent implements OnInit { }, { text: '重发CRM流程', - click: item => this.router.navigate(['/partner/account-management/list/detail/' + item.id]) + click: item => this.router.navigate([`/partner/account-management/list/detail/${item.id}`]) } ] } diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html index f242099c..e00cd880 100644 --- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html @@ -1,328 +1,492 @@ - - - - - - -