This commit is contained in:
Taric Xin
2022-03-30 14:29:38 +08:00
parent 2d668eb4fa
commit ca10c07690
9 changed files with 132 additions and 70 deletions

View File

@ -0,0 +1,13 @@
<h2>转移客户数:{{changeST?.total}}</h2>
<st #changeST [data]="service.$api_get_partner_change_list" [columns]="columns.changeColumn"
[req]="{params:{id:id ,type:1}}" [loading]="service.http.loading" bordered size="small"
[page]="{ show: false }" [scroll]="{ x: '750px' }">
</st>
<h2>不转移客户数:{{noChangeST?.total}}</h2>
<st #noChangeST [data]="service.$api_get_partner_change_list" [columns]="columns.beChangeColumn"
[req]="{params:{id:id ,type:2}}" [res]="{reName: { list: 'data' }}"
[loading]="service.http.loading" bordered size="small" [page]="{ show: false }" [scroll]="{ x: '750px' }">
</st>
<p>
客户转移客户跟着上级合伙人转移一并到新渠道销售下会同步发起CRM《客户转移》流程不转移的客户会与上级合伙人解绑修改成功后修改时间也是合伙人与客户的结算结束时间成为原来渠道销售的直客。
</p>

View File

@ -0,0 +1,34 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { PartnerListService } from '../../services/partner-list.service';
@Component({
selector: 'app-channel-log-modal',
templateUrl: './channel-log-modal.component.html'
})
export class ChannelLogModalComponent implements OnInit {
columns: { changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST();
id = '';
constructor(public service: PartnerListService, public route: ActivatedRoute) {}
ngOnInit(): void {}
private initST(): { changeColumn: STColumn[]; beChangeColumn: STColumn[] } {
return {
changeColumn: [
{ title: '客户名称', index: 'payCode', width: 180 },
{ title: '合伙人', index: 'ltdName', width: 160 },
{ title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 },
{ title: 'CRM审核状态', index: 'payDate', width: 150 },
{ title: '生效时间', index: 'payDate', className: 'text-center', width: 130 }
],
beChangeColumn: [
{ title: '客户名称', index: 'payCode', width: 180 },
{ title: '合伙人', index: 'ltdName', width: 160 },
{ title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 },
{ title: '生效时间', index: 'payDate', className: 'text-center', width: 130 }
]
};
}
}

View File

@ -269,7 +269,6 @@
</sv>
</sv-container>
<nz-divider></nz-divider>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>渠道销售信息</sv-title>
<sv label="姓名"> {{ detailData?.channelName }} </sv>
@ -282,7 +281,7 @@
<sv-container col="3" class="mt16">
<sv-title>修改渠道销售记录</sv-title>
<sv label="">
<st #st [data]="service.$api_get_personal_channel_list" [columns]="columns.logsColumn"
<st #st [data]="service.$api_get_personal_channel_list" [columns]="columns"
[req]="{params:{partnerId:route.snapshot.params.id}}" [loading]="service.http.loading" bordered size="small"
[page]="{ show: false }" [scroll]="{ x: '1200px' }">
</st>
@ -317,19 +316,3 @@
</div>
</nz-upload>
</ng-template>
<ng-template #logModal>
<h2>转移客户数:{{changeST?.total}}</h2>
<st #changeST [data]="service.$api_get_partner_change_list" [columns]="columns.changeColumn"
[req]="{params:{partnerId:route.snapshot.params.id ,type:1}}" [loading]="service.http.loading" bordered size="small"
[page]="{ show: false }" [scroll]="{ x: '750px' }">
</st>
<h2>不转移客户数:{{noChangeST?.total}}</h2>
<st #noChangeST [data]="service.$api_get_partner_change_list" [columns]="columns.beChangeColumn"
[req]="{params:{partnerId:route.snapshot.params.id ,type:2}}" [res]="{reName: { list: 'data' }}"
[loading]="service.http.loading" bordered size="small" [page]="{ show: false }" [scroll]="{ x: '750px' }">
</st>
<p>
客户转移客户跟着上级合伙人转移一并到新渠道销售下会同步发起CRM《客户转移》流程不转移的客户会与上级合伙人解绑修改成功后修改时间也是合伙人与客户的结算结束时间成为原来渠道销售的直客。
</p>
</ng-template>

View File

@ -9,6 +9,7 @@ import { NzTreeSelectComponent } from 'ng-zorro-antd/tree-select';
import { Subscription, fromEvent } from 'rxjs';
import { PartnerListService } from '../../services/partner-list.service';
import { ChannelLogModalComponent } from '../channel-log-modal/channel-log-modal.component';
import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component';
@Component({
@ -18,12 +19,10 @@ import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit
providers: [DatePipe]
})
export class PartnerDetailComponent implements OnInit, OnDestroy {
@ViewChild('logModal')
logModal: any;
@ViewChild('areaTreeSelect')
areaTreeSelect!: NzTreeSelectComponent;
columns: { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST();
columns: STColumn[] = this.initST();
detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentity: { name: '' } };
tempalateData = { ...this.detailData };
@ -145,16 +144,6 @@ export class PartnerDetailComponent implements OnInit, OnDestroy {
});
}
showChangeDetail() {
const modal = this.nzModalService.create({
nzTitle: '详情',
nzContent: this.logModal,
nzNoAnimation: true,
nzWidth: 700,
nzFooter: null
});
}
ratify() {
this.isEdit = true;
// 搜索展开省份并选中节点
@ -365,9 +354,8 @@ export class PartnerDetailComponent implements OnInit, OnDestroy {
});
}
private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } {
return {
logsColumn: [
private initST(): STColumn[] {
return [
{ title: '修改后渠道销售', index: 'newChannelIdLabel', width: 180 },
{ title: '修改前渠道销售', index: 'originalChannelIdLabel', width: 160 },
{ title: '转移客户数', index: 'quantity', className: 'text-center', width: 130 },
@ -382,24 +370,10 @@ export class PartnerDetailComponent implements OnInit, OnDestroy {
buttons: [
{
text: '详情',
click: () => this.showChangeDetail()
click: (item) => this.service.showChangeDetail(item.id)
}
]
}
],
changeColumn: [
{ title: '客户名称', index: 'payCode', width: 180 },
{ title: '合伙人', index: 'ltdName', width: 160 },
{ title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 },
{ title: 'CRM审核状态', index: 'payDate', width: 150 },
{ title: '生效时间', index: 'payDate', className: 'text-center', width: 130 }
],
beChangeColumn: [
{ title: '客户名称', index: 'payCode', width: 180 },
{ title: '合伙人', index: 'ltdName', width: 160 },
{ title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 },
{ title: '生效时间', index: 'payDate', className: 'text-center', width: 130 }
]
};
];
}
}

View File

@ -151,6 +151,25 @@
</ng-template>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>渠道销售信息</sv-title>
<sv label="姓名"> {{ detailData?.channelName }} </sv>
<sv label="手机号"> {{ detailData?.channelMobile }} </sv>
<sv label="绑定时间"> {{ detailData?.bindChannelTime }} </sv>
</sv-container>
</nz-card>
<nz-card>
<sv-container col="3" class="mt16">
<sv-title>修改渠道销售记录</sv-title>
<sv label="">
<st #st [data]="service.$api_get_personal_channel_list" [columns]="columns"
[req]="{params:{partnerId:route.snapshot.params.id}}" [loading]="service.http.loading" bordered size="small"
[page]="{ show: false }" [scroll]="{ x: '1200px' }">
</st>
</sv>
</sv-container>
</nz-card>
<ng-template #PopconfirmTempalte let-title="title" let-content="content">

View File

@ -21,6 +21,8 @@ export class PersonalPartnerDetailComponent implements OnInit {
@ViewChild('areaTreeSelect')
areaTreeSelect!: NzTreeSelectComponent;
columns: STColumn[] = this.initST();
detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentity: { name: '' } };
tempalateData = { ...this.detailData };
@ -35,7 +37,7 @@ export class PersonalPartnerDetailComponent implements OnInit {
constructor(
public service: PartnerListService,
private route: ActivatedRoute,
public route: ActivatedRoute,
private nzModalService: NzModalService,
private datePipe: DatePipe
) {}
@ -266,4 +268,27 @@ export class PersonalPartnerDetailComponent implements OnInit {
}
});
}
private initST(): STColumn[] {
return [
{ title: '修改后渠道销售', index: 'newChannelIdLabel', width: 180 },
{ title: '修改前渠道销售', index: 'originalChannelIdLabel', width: 160 },
{ title: '转移客户数', index: 'quantity', className: 'text-center', width: 130 },
{ title: '生效节点', index: 'effectiveNode', width: 150, type: 'enum', enum: { 1: '立即生效', 2: 'CRM审核后生效' } },
{ title: '备注', index: 'remark', className: 'text-center', width: 150 },
{ title: '修改时间', index: 'effectiveTime', className: 'text-center', width: 180, type: 'date' },
{ title: '操作人', index: 'modifyUserIdLabel', width: 180 },
{
title: '操作',
fixed: 'right',
width: '140px',
buttons: [
{
text: '详情',
click: (item) => this.service.showChangeDetail(item.id)
}
]
}
];
}
}

View File

@ -2,6 +2,7 @@ import { Injectable, Injector } from '@angular/core';
import { BaseService, EACacheService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
import { ChannelLogModalComponent } from '../components/channel-log-modal/channel-log-modal.component';
@Injectable()
export class PartnerListService extends ShipperBaseService {
@ -60,4 +61,15 @@ export class PartnerListService extends ShipperBaseService {
};
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
}
showChangeDetail(id: string) {
const modal = this.nzModalService.create({
nzTitle: '详情',
nzContent: ChannelLogModalComponent,
nzComponentParams: { id },
nzNoAnimation: true,
nzWidth: 800,
nzFooter: null
});
}
}

View File

@ -62,6 +62,7 @@ import { PersonalPartnerDetailComponent } from './partner-list/components/person
import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component';
import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component';
import { ParterRebateManageMentAddPartnerListComponent } from './rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component';
import { ChannelLogModalComponent } from './partner-list/components/channel-log-modal/channel-log-modal.component';
const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent,
@ -113,7 +114,8 @@ const COMPONENTS: any[] = [
PersonalPartnerDetailComponent,
ParterAdviceFeedbackListComponent,
ParterAdviceFeedbackDetailComponent,
ParterRebateManageMentAddPartnerListComponent
ParterRebateManageMentAddPartnerListComponent,
ChannelLogModalComponent
];
@NgModule({