This commit is contained in:
Taric Xin
2022-03-25 16:01:23 +08:00
parent 5412720930
commit 5b95e6416f
12 changed files with 72 additions and 42 deletions

View File

@ -20,7 +20,7 @@ module.exports = {
// }
'//api': {
target: {
host: 'tms-api-test.eascs.com',
host: 'tms-api-dev.eascs.com',
protocol: 'https:',
port: 443
},

View File

@ -80,7 +80,7 @@ export class FreightAccountComponent implements OnInit {
}
exportList() {
this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 });
this.service.asyncExport({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_shipper);
}
private initSF(): SFSchema {

View File

@ -42,6 +42,8 @@ export class FreightAccountService extends ShipperBaseService {
// 货主端获取账户余额交易明细
$api_get_balance_by_shipper = '/api/fcc/accountBalanceDetail/getAccountBalanceByShipperPage';
// 运营端导出货主账户明细信息
$api_export_shipper = '/api/fcc/accountBalance/reportShipperAccountBalanceByOperator';
// 查询订单支付申请表
$api_get_order_payment_page = '/api/fcc/billPaymentApplicationOBC/list/page';

View File

@ -33,7 +33,7 @@
<ng-template #editTemplate>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="合伙人名称"> {{selectItem?.enterpriseName}} </se>
<se [col]="1" label="合伙人名称"> {{selectItem?.enterpriseName || selectItem?.contactName}} </se>
<se [col]="1" label="返佣模板" required>
<nz-select [(ngModel)]="templateId" style="width: 100%">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of customers"></nz-option>
@ -62,7 +62,8 @@
<st #rest [data]="service.$api_get_enterprice_rel_list" [columns]="[
{ title: '', index: 'key', type: 'checkbox' },
{ title: '客户名称', index: 'enterpriceName' }
]" [req]="{ process: beforeReq }" [loading]="service.http.loading" [page]="{show:false}">
]" [req]="{ process: beforeReq,params:{effectiveStatus:2 ,newPartnerId:selectItem.id} }"
[loading]="service.http.loading" [page]="{show:false}">
</st>
</se>
<se label="生效节点" required>

View File

@ -49,7 +49,7 @@ export class PartnerListComponent {
return requestOptions;
};
loadSelectOptions(){
loadSelectOptions() {
this.service.getRebateConfig().subscribe(res => {
if (res) {
this.customers = res;
@ -57,7 +57,7 @@ export class PartnerListComponent {
});
this.service.getChannel().subscribe(res => {
if (res) {
this.customers = res;
this.cannels = res;
}
});
}
@ -66,13 +66,14 @@ export class PartnerListComponent {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: PartnerAuditModalComponent,
nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName } },
nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName },sourcePage:'合伙人审核列表' },
nzFooter: null
});
}
editTemplateAction(item: any) {
this.selectItem = item;
this.templateId = item.templateId || null;
const modal = this.nzModalService.create({
nzTitle: '修改返佣模板',
nzContent: this.editTemplate,
@ -87,7 +88,7 @@ export class PartnerListComponent {
});
}
confirmEditTemplate() {
private confirmEditTemplate() {
const modal = this.nzModalService.confirm({
nzTitle: '确定要修改返佣模板吗?',
nzOnOk: () => {
@ -108,16 +109,21 @@ export class PartnerListComponent {
}
editCannelAction(item: any) {
this.selectItem = item;
const modal = this.nzModalService.create({
nzTitle: '修改渠道销售',
nzWidth: 650,
nzContent: this.editCannel,
nzOnOk: () => {
this.confirmEditCannel(item);
return false;
// 校验合伙人是否可修改渠道销售 true:可以修改 false不可以修改
this.service.request(this.service.$api_check_partenr_change_channel,{id:item.id}).subscribe(res=>{
if(res){
this.selectItem = item;
const modal = this.nzModalService.create({
nzTitle: '修改渠道销售',
nzWidth: 650,
nzContent: this.editCannel,
nzOnOk: () => {
this.confirmEditCannel(item);
return false;
}
});
}
});
})
}
confirmEditCannel(item: any) {
@ -321,7 +327,12 @@ export class PartnerListComponent {
private initST(): STColumn[] {
return [
{ title: '合伙人名称', index: 'enterpriseName', width: 180, format: item => `${item.enterpriseName || item.contactName}` },
{
title: '合伙人名称',
index: 'enterpriseName',
width: 180,
format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '')
},
{ title: '付款编码', index: 'payCode', width: 160 },
{ title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 },
{ title: '企业管理员', index: 'contactName', width: 150 },
@ -386,6 +397,7 @@ export class PartnerListComponent {
{ type: 'divider' },
{
text: '详情',
iif: item => item.id,
click: item => {
if (item.partnerType === 1) {
this.router.navigate([`/partner/partner-list/etp-detail/${item.id}`]);
@ -396,19 +408,23 @@ export class PartnerListComponent {
},
{
text: '审核<br>',
iif: item => item.id,
click: item => this.auditPartner(item)
},
{
text: '修改返佣模板',
iif: item => item.id,
click: item => this.editTemplateAction(item)
},
{
text: '修改渠道销售',
iif: item => item.id,
click: item => this.editCannelAction(item)
},
{
text: '重发CRM流程',
click: item => this.reSendCRM(item)
click: item => item.id && this.reSendCRM(item),
iif: item => item.crmStatus === 10
}
]
}

View File

@ -14,6 +14,7 @@ export class PartnerAuditModalComponent implements OnInit {
@Input()
info: any;
schema!: SFSchema;
sourcePage = '';
constructor(private nzModalService: NzModalService, public service: PartnerListService) {}
ngOnInit(): void {
@ -53,13 +54,11 @@ export class PartnerAuditModalComponent implements OnInit {
channelId: {
title: '渠道销售',
type: 'string',
enum: [
{ value: true, label: '通过' },
{ value: false, label: '驳回' }
],
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getChannel(),
hidden: this.info.isPass === false,
visibleIf: {
status: value => value
@ -115,7 +114,8 @@ export class PartnerAuditModalComponent implements OnInit {
.request(this.service.$api_audit_partner, {
auditStatusEnum: params.auditStatusEnum,
id: params.id,
approvalOpinion: params.approvalOpinion
approvalOpinion: params.approvalOpinion,
sourcePage: this.sourcePage
})
.subscribe(res => {
if (res) {

View File

@ -125,7 +125,8 @@
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
</nz-date-picker>
-
<ng-container *ngIf="!isEdit && !detailData?.adminUserInfo.validEndTime && detailData?.adminUserInfo.validStartTime">
<ng-container
*ngIf="!isEdit && !detailData?.adminUserInfo.validEndTime && detailData?.adminUserInfo.validStartTime">
<label style="padding-left: 11px">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.adminUserInfo.validEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
@ -281,7 +282,8 @@
<sv-title>修改渠道销售记录</sv-title>
<sv label="">
<st #st [data]="service.$api_get_personal_channel_list" [columns]="columns.logsColumn"
[loading]="service.http.loading" bordered size="small" [page]="{ show: false }" [scroll]="{ x: '1200px' }">
[req]="{params:{partnerId:route.snapshot.params.id}}" [loading]="service.http.loading" bordered size="small"
[page]="{ show: false }" [scroll]="{ x: '1200px' }">
</st>
</sv>
</sv-container>
@ -316,13 +318,15 @@
</ng-template>
<ng-template #logModal>
<h2>转移客户数:10</h2>
<st #st [data]="service.$mock_url" [columns]="columns.changeColumn" [loading]="service.http.loading" bordered
size="small" [page]="{ show: false }" [scroll]="{ x: '750px' }">
<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>不转移客户数:10</h2>
<st #st [data]="service.$mock_url" [columns]="columns.beChangeColumn" [loading]="service.http.loading" bordered
size="small" [page]="{ show: false }" [scroll]="{ x: '750px' }">
<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《客户转移》流程不转移的客户会与上级合伙人解绑修改成功后修改时间也是合伙人与客户的结算结束时间成为原来渠道销售的直客。

View File

@ -47,7 +47,7 @@ export class PartnerDetailComponent implements OnInit, OnDestroy {
subscribeScoll!: Subscription;
constructor(
public service: PartnerListService,
private route: ActivatedRoute,
public route: ActivatedRoute,
private nzModalService: NzModalService,
private datePipe: DatePipe
) {}
@ -138,7 +138,7 @@ export class PartnerDetailComponent implements OnInit, OnDestroy {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: PartnerAuditModalComponent,
nzComponentParams: { info: { ...this.detailData, isPass } },
nzComponentParams: { info: { ...this.detailData, isPass },sourcePage:'合伙人审核详情' },
nzFooter: null
});
}
@ -366,13 +366,13 @@ export class PartnerDetailComponent implements OnInit, OnDestroy {
private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } {
return {
logsColumn: [
{ title: '修改后渠道销售', index: 'newChannelName', width: 180 },
{ title: '修改前渠道销售', index: 'originalChannelName', width: 160 },
{ 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: 130, type: 'date' },
{ title: '操作人', index: 'modifyUserId', width: 130 },
{ title: '修改时间', index: 'effectiveTime', className: 'text-center', width: 180, type: 'date' },
{ title: '操作人', index: 'modifyUserIdLabel', width: 180 },
{
title: '操作',
fixed: 'right',

View File

@ -113,7 +113,10 @@ export class PersonalPartnerDetailComponent implements OnInit {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: PartnerAuditModalComponent,
nzComponentParams: { info: { ...this.detailData, isPass, enterpriseName: this.detailData.adminUserInfo?.name } },
nzComponentParams: {
info: { ...this.detailData, isPass, enterpriseName: this.detailData.adminUserInfo?.name },
sourcePage: '合伙人审核详情'
},
nzFooter: null
});
}

View File

@ -28,7 +28,11 @@ export class PartnerListService extends ShipperBaseService {
// 查询合伙人修改渠道渠道销售记录
$api_get_personal_channel_list = '/api/mdc/partnerChannelRelLog/list/page';
// 查询客户关系列表-不分页
$api_get_enterprice_rel_list = '/api/mdc/enterpriceRelLog/list';
$api_get_enterprice_rel_list = '/api/mdc/EnterpriseRelLog/list';
// 校验合伙人是否可修改渠道销售 true:可以修改 false不可以修改
$api_check_partenr_change_channel = '/api/mdc/partner/updateChannelCheck';
// 渠道销售修改详情
$api_get_partner_change_list = '/api/mdc/partnerChannelRelLog/partnerChannelUpdateDetaiList';
// 冻结/启用企业业
$api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';

View File

@ -29,7 +29,7 @@ export class ShipperBaseService extends BaseService {
/**
* 获取无车承运人
* @returns
* @returns
*/
getCarlessCarrier() {
const params = {};
@ -267,7 +267,7 @@ export class ShipperBaseService extends BaseService {
map(res => {
if (res) {
return res.map((m: any) => {
return { label: m.name, value: m.id };
return { label: `${m.employeeVO?.empName}/${m.employeeVO?.mobile}`, value: m.id };
});
} else {
return [];