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 @@ - - - - - - -