-
+
+
-
\ No newline at end of file
+
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..8ad008d2 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,19 +1,19 @@
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { Router } from '@angular/router';
+import { Component, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf';
import {
SFUploadWidgetSchema,
SFComponent,
SFSchema,
SFUISchema,
- SFCascaderWidgetSchema,
- SFTextareaWidgetSchema,
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 = {
@@ -43,7 +43,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();
@@ -64,66 +64,54 @@ export class AddEtpPartnerComponent implements OnInit {
}
};
- constructor(private router: Router, public service: PartnerListService) {}
- ngOnInit() {}
+ constructor(public service: PartnerListService) {}
submitForm() {
- if (!this.sf.valid ) {
+ if (!this.sf.valid) {
this.sf.validator({ emitError: true });
this.service.msgSrv.warning('请修改填写错误信息');
return;
}
- const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime);
- const operatingStartTime = new Date(this.sf.value.operatingStartTime);
- if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) {
- this.service.msgSrv.warning('营业期限不能小于成立日期');
+ if (this.sf.value.cityCodesList?.length > 3) {
+ this.sf.validator({ emitError: true });
+ this.service.msgSrv.warning('所属城市不能超过3个');
return;
}
- if (this.sf.value.operatingEndTime) {
- const operatingEndTime = new Date(this.sf.value.operatingEndTime);
- if (operatingStartTime.getTime() > operatingEndTime.getTime()) {
- this.service.msgSrv.warning('营业期限不能小于期限开始日期');
- return;
- }
+ // 校验企业营业期限
+ const operatingStartTime = new Date(this.sf.value.operatingStartTime);
+ const operatingEndTime = new Date(this.sf.value.operatingEndTime);
+ if (operatingStartTime.getTime() > operatingEndTime.getTime()) {
+ this.service.msgSrv.warning('营业截止日期不能小于开始日期');
+ return;
}
- const validStartTime = new Date(this.sf.value.legalPersonIdentityDTO.validStartTime);
- if (this.sf.value.legalPersonIdentityDTO.validEndTime) {
- const validEndTime = new Date(this.sf.value.legalPersonIdentityDTO.validEndTime);
+ // 校验法人证件有效期限
+ if (this.sf.value.legalPersonIdentity.validEndTime) {
+ const validStartTime = new Date(this.sf.value.legalPersonIdentity.validStartTime);
+ const validEndTime = new Date(this.sf.value.legalPersonIdentity.validEndTime);
if (validStartTime.getTime() > validEndTime.getTime()) {
- this.service.msgSrv.warning('法人证件有效截止日期小于开始日期');
+ this.service.msgSrv.warning('法人证件有效截止日期不能小于开始日期');
return;
}
}
- const sfVlaue = this.sf.value;
- const params = {};
- Object.assign(
- params,
- { ...this.sf.value },
- {
- enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2],
- oftenUsedServices: sfVlaue.oftenUsedServices,
- registerAddress: sfVlaue.registerAddress,
- registerPhone: sfVlaue.registerPhone,
- creditPhoto: sfVlaue.creditPhoto,
- creditPhotoWatermark: sfVlaue.creditPhotoWatermark,
- promotersTelephone: sfVlaue.promotersTelephone,
- networkTransporter: sfVlaue.networkTransporter,
- adminUserInfo: {
- certificateNumber: sfVlaue.certificateNumber,
- certificatePhotoBack: sfVlaue.certificatePhotoBack,
- certificatePhotoBackWatermark: sfVlaue.certificatePhotoBackWatermark,
- certificatePhotoFront: sfVlaue.certificatePhotoFront,
- certificatePhotoFrontWatermark: sfVlaue.certificatePhotoFrontWatermark,
- name: sfVlaue.name
- }
+ // 校验管理员证件有效期限
+ if (this.sf.value.adminUserInfo.validEndTime) {
+ const validStartTime = new Date(this.sf.value.adminUserInfo.validStartTime);
+ const validEndTime = new Date(this.sf.value.adminUserInfo.validEndTime);
+ if (validStartTime.getTime() > validEndTime.getTime()) {
+ this.service.msgSrv.warning('管理员证件有效截止日期小于开始日期');
+ return;
}
- );
- // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
- // if (res) {
- // this.service.msgSrv.success('企业新增成功');
- // this.goBack();
- // }
- // });
+ }
+ const params = {};
+ Object.assign(params, { ...this.sf.value, source: 2 });
+ // console.log(params);
+
+ this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('新增企业合伙人成功');
+ this.goBack();
+ }
+ });
}
/*
@@ -146,23 +134,23 @@ export class AddEtpPartnerComponent implements OnInit {
if (isFront === 'front') {
// 正面
if (res.name) {
- this.sf.setValue('/legalPersonIdentityDTO/name', res.name);
+ this.sf.setValue('/legalPersonIdentity/name', res.name);
}
if (res.number) {
- this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0);
- this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number);
+ this.sf.setValue('/legalPersonIdentity/certificateType', 0);
+ this.sf.setValue('/legalPersonIdentity/certificateNumber', res.number);
}
}
if (isFront === 'back') {
// 背面
if (res.validFrom) {
- this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom);
+ this.sf.setValue('/legalPersonIdentity/validStartTime', res.validFrom);
}
if (res.validTo) {
- this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo);
- this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
+ this.sf.setValue('/legalPersonIdentity/validEndTime', res.validTo);
+ this.sf.setValue('/legalPersonIdentity/_isLoingDate', false);
} else {
- this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true);
+ this.sf.setValue('/legalPersonIdentity/_isLoingDate', true);
}
}
}
@@ -171,10 +159,22 @@ export class AddEtpPartnerComponent implements OnInit {
if (isFront === 'front') {
// 正面
if (res.name) {
- this.sf.setValue('/name', res.name);
+ this.sf.setValue('/adminUserInfo/name', res.name);
}
if (res.number) {
- this.sf.setValue('/certificateNumber', res.number);
+ this.sf.setValue('/adminUserInfo/certificateNumber', res.number);
+ }
+ }
+ if (isFront === 'back') {
+ // 背面
+ if (res.validFrom) {
+ this.sf.setValue('/adminUserInfo/validStartTime', res.validFrom);
+ }
+ if (res.validTo) {
+ this.sf.setValue('/adminUserInfo/validEndTime', res.validTo);
+ this.sf.setValue('/adminUserInfo/_isLoingDate', false);
+ } else {
+ this.sf.setValue('/adminUserInfo/_isLoingDate', true);
}
}
}
@@ -192,29 +192,15 @@ export class AddEtpPartnerComponent implements OnInit {
if (res.name) {
this.sf.setValue('/enterpriseName', res.name);
}
- if (res.type) {
- this.sf.setValue('/enterpriseType', res.type);
- }
- if (res.addressRegionCodes) {
- this.sf.setValue('/enterpriseAddressCode', res.addressRegionCodes);
- }
- if (res.address) {
- this.sf.setValue('/enterpriseAddress', res.address);
- }
- if (res.foundDate) {
- this.sf.setValue('/enterpriseRegistrationTime', res.foundDate);
- }
if (res.businessTermStartDate) {
this.sf.setValue('/operatingStartTime', res.businessTermStartDate);
}
if (res.businessTermEndDate) {
this.sf.setValue('/operatingEndTime', res.businessTermEndDate);
+ this.sf.setValue('/_isLoingDate', false);
} else {
this.sf.setValue('/_isLoingDate', true);
}
- if (res.businessScope) {
- this.sf.setValue('/businessScope', res.businessScope);
- }
}
});
}
@@ -308,7 +294,7 @@ export class AddEtpPartnerComponent implements OnInit {
},
// 法人信息
- legalPersonIdentityDTO: {
+ legalPersonIdentity: {
type: 'object',
properties: {
_legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } },
@@ -322,7 +308,7 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
change: args => {
if (args.type === 'success') {
- this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
+ this.sf.setValue('/legalPersonIdentity/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1);
}
}
@@ -339,7 +325,7 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
change: args => {
if (args.type === 'success') {
- this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
+ this.sf.setValue('/legalPersonIdentity/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1);
}
}
@@ -404,7 +390,7 @@ export class AddEtpPartnerComponent implements OnInit {
required: '请选择截止日期'
},
change: i => {
- this.sf?.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
+ this.sf?.setValue('/legalPersonIdentity/_isLoingDate', false);
}
} as SFDateWidgetSchema
},
@@ -416,7 +402,7 @@ export class AddEtpPartnerComponent implements OnInit {
grid: { span: 6 },
class: 'input-back',
widget: 'checkbox',
- change: i => this.sf?.setValue('/legalPersonIdentityDTO/validEndTime', null)
+ change: i => this.sf?.setValue('/legalPersonIdentity/validEndTime', null)
} as SFCheckboxWidgetSchema
}
},
@@ -430,23 +416,23 @@ export class AddEtpPartnerComponent implements OnInit {
'validStartTime'
]
},
+ _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
+ adminMobile: {
+ title: ' 企业管理员手机号',
+ type: 'string',
+ minLength: 1,
+ format: 'mobile',
+ maxLength: 11,
+ ui: {
+ grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
+ placeholder: '请输入企业管理员手机号',
+ errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }
+ }
+ },
// 企业管理员信息
adminUserInfo: {
type: 'object',
properties: {
- _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
- adminMobile: {
- title: ' 企业管理员手机号',
- type: 'string',
- minLength: 1,
- format: 'mobile',
- maxLength: 11,
- ui: {
- grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
- placeholder: '请输入企业管理员手机号',
- errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }
- }
- },
_adminCertificatePhotoTipsA: {
title: '企业管理员证件照',
type: 'string',
@@ -465,7 +451,7 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
change: args => {
if (args.type === 'success') {
- this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
+ this.sf.setValue('/adminUserInfo/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0);
}
}
@@ -487,7 +473,8 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
change: args => {
if (args.type === 'success') {
- this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
+ this.sf.setValue('/adminUserInfo/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
+ this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 0);
}
}
} as SFUploadWidgetSchema
@@ -512,7 +499,7 @@ export class AddEtpPartnerComponent implements OnInit {
placeholder: '请输入企业管理员身份证号'
}
},
- operatingStartTime: {
+ validStartTime: {
title: '身份证有效开始日期',
type: 'string',
ui: {
@@ -523,7 +510,7 @@ export class AddEtpPartnerComponent implements OnInit {
}
} as SFDateWidgetSchema
},
- operatingEndTime: {
+ validEndTime: {
title: '身份证有效截止日期',
type: 'string',
ui: {
@@ -545,34 +532,38 @@ export class AddEtpPartnerComponent implements OnInit {
grid: { span: 6 },
class: 'input-back',
widget: 'checkbox',
- change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null)
+ change: i => this.sf?.setValue('/adminUserInfo/validEndTime', null)
} as SFCheckboxWidgetSchema
}
},
- required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber','operatingStartTime']
+ required: ['_adminCertificatePhotoTipsA', 'name', 'certificateNumber', 'operatingStartTime']
},
// 所属城市
_addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
- status3: {
+ cityCodesList: {
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' }
- ])
- } as SFTreeSelectWidgetSchema,
+ 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
},
// 渠道销售
_channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
- channel: {
+ invitationCode: {
title: '渠道销售邀请码',
type: 'string',
minLength: 1,
@@ -586,7 +577,16 @@ export class AddEtpPartnerComponent implements OnInit {
}
}
},
- required: ['_licenseTips', 'licensePhotoWatermark', 'unifiedSocialCreditCode', 'enterpriseName', 'operatingStartTime', 'status3','channel']
+ required: [
+ '_licenseTips',
+ 'licensePhotoWatermark',
+ 'unifiedSocialCreditCode',
+ 'enterpriseName',
+ 'operatingStartTime',
+ 'cityCodesList',
+ 'adminMobile',
+ 'invitationCode'
+ ]
};
}
}
diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html
index e476071d..cb94b51b 100644
--- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html
+++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html
@@ -1,44 +1,42 @@
-
-
-
- 合伙人信息
-
-
-
-
-
-
-
+
+
+
+ 合伙人信息
+
+
+
+
+
+
+
-
-
- 所属城市
-
+
+
+ 所属城市
+
-
-
- 渠道销售
-
-
+
+
+ 渠道销售
+
+
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
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..eca02366 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) {
@@ -63,57 +73,28 @@ export class AddPersonalPartnerComponent implements OnInit {
this.service.msgSrv.warning('请修改填写错误信息');
return;
}
- const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime);
- const operatingStartTime = new Date(this.sf.value.operatingStartTime);
- if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) {
- this.service.msgSrv.warning('营业期限不能小于成立日期');
+ if (this.sf.value.cityCodesList?.length > 3) {
+ this.sf.validator({ emitError: true });
+ this.service.msgSrv.warning('所属城市不能超过3个');
return;
}
- if (this.sf.value.operatingEndTime) {
- const operatingEndTime = new Date(this.sf.value.operatingEndTime);
- if (operatingStartTime.getTime() > operatingEndTime.getTime()) {
- this.service.msgSrv.warning('营业期限不能小于期限开始日期');
- return;
- }
- }
- const validStartTime = new Date(this.sf.value.legalPersonIdentityDTO.validStartTime);
- if (this.sf.value.legalPersonIdentityDTO.validEndTime) {
- const validEndTime = new Date(this.sf.value.legalPersonIdentityDTO.validEndTime);
+ if (this.sf.value.validEndTime) {
+ const validStartTime = new Date(this.sf.value.validStartTime);
+ const validEndTime = new Date(this.sf.value.validEndTime);
if (validStartTime.getTime() > validEndTime.getTime()) {
- this.service.msgSrv.warning('法人证件有效截止日期小于开始日期');
+ this.service.msgSrv.warning('身份证有效截止日期不能小于开始日期');
return;
}
}
- const sfVlaue = this.sf.value;
const params = {};
- Object.assign(
- params,
- { ...this.sf.value },
- {
- enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2],
- oftenUsedServices: sfVlaue.oftenUsedServices,
- registerAddress: sfVlaue.registerAddress,
- registerPhone: sfVlaue.registerPhone,
- creditPhoto: sfVlaue.creditPhoto,
- creditPhotoWatermark: sfVlaue.creditPhotoWatermark,
- promotersTelephone: sfVlaue.promotersTelephone,
- networkTransporter: sfVlaue.networkTransporter,
- adminUserInfo: {
- certificateNumber: sfVlaue.certificateNumber,
- certificatePhotoBack: sfVlaue.certificatePhotoBack,
- certificatePhotoBackWatermark: sfVlaue.certificatePhotoBackWatermark,
- certificatePhotoFront: sfVlaue.certificatePhotoFront,
- certificatePhotoFrontWatermark: sfVlaue.certificatePhotoFrontWatermark,
- name: sfVlaue.name
- }
+ Object.assign(params, { ...this.sf.value, source: 2 });
+
+ this.service.request(this.service.$api_save_personal_partner, params).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('新增个人合伙人成功');
+ this.goBack();
}
- );
- // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
- // if (res) {
- // this.service.msgSrv.success('企业新增成功');
- // this.goBack();
- // }
- // });
+ });
}
/*
@@ -124,48 +105,34 @@ export class AddPersonalPartnerComponent implements OnInit {
}
// 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证
- checkIdCard(imgurl: any, isFront: string, type: number) {
+ checkIdCard(imgurl: any, isFront: string) {
const params = {
idCardUrl: imgurl,
side: isFront
};
this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
if (res) {
- if (type === 1) {
- // 法定代表人证件照
- if (isFront === 'front') {
- // 正面
- if (res.name) {
- this.sf.setValue('/legalPersonIdentityDTO/name', res.name);
- }
- if (res.number) {
- this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0);
- this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number);
- }
+ // 法定代表人证件照
+ if (isFront === 'front') {
+ // 正面
+ if (res.name) {
+ this.sf.setValue('/adminUserInfo/name', res.name);
}
- if (isFront === 'back') {
- // 背面
- if (res.validFrom) {
- this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom);
- }
- if (res.validTo) {
- this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo);
- this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
- } else {
- this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true);
- }
+ if (res.number) {
+ this.sf.setValue('/adminUserInfo/certificateType', 0);
+ this.sf.setValue('/adminUserInfo/certificateNumber', res.number);
}
}
- // 企业管理员证件照
- if (type === 0) {
- if (isFront === 'front') {
- // 正面
- if (res.name) {
- this.sf.setValue('/name', res.name);
- }
- if (res.number) {
- this.sf.setValue('/certificateNumber', res.number);
- }
+ if (isFront === 'back') {
+ // 背面
+ if (res.validFrom) {
+ this.sf.setValue('/adminUserInfo/validStartTime', res.validFrom);
+ }
+ if (res.validTo) {
+ this.sf.setValue('/adminUserInfo/validEndTime', res.validTo);
+ this.sf.setValue('/adminUserInfo/_isLoingDate', false);
+ } else {
+ this.sf.setValue('/adminUserInfo/_isLoingDate', true);
}
}
}
@@ -179,23 +146,23 @@ export class AddPersonalPartnerComponent implements OnInit {
private initBasicInfoSF(): SFSchema {
return {
properties: {
+ _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
+ mobile: {
+ title: ' 手机号',
+ type: 'string',
+ minLength: 1,
+ format: 'mobile',
+ maxLength: 11,
+ ui: {
+ grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
+ placeholder: '请输入手机号',
+ errors: { required: '请输入手机号', format: '手机号格式错误' }
+ }
+ },
// 合伙人信息
adminUserInfo: {
type: 'object',
properties: {
- _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
- adminMobile: {
- title: ' 手机号',
- type: 'string',
- minLength: 1,
- format: 'mobile',
- maxLength: 11,
- ui: {
- grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
- placeholder: '请输入手机号',
- errors: { required: '请输入手机号', format: '手机号格式错误' }
- }
- },
_adminCertificatePhotoTipsA: {
title: '证件照',
type: 'string',
@@ -206,6 +173,7 @@ export class AddPersonalPartnerComponent implements OnInit {
},
certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } },
certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } },
+ certificateType: { title: '', type: 'string', ui: { hidden: true }, default: 0 },
certificatePhotoFrontWatermark: {
type: 'string',
title: '',
@@ -214,8 +182,8 @@ export class AddPersonalPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
change: args => {
if (args.type === 'success') {
- this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
- this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0);
+ this.sf.setValue('/adminUserInfo/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
+ this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front');
}
}
} as SFUploadWidgetSchema
@@ -236,7 +204,8 @@ export class AddPersonalPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
change: args => {
if (args.type === 'success') {
- this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
+ this.sf.setValue('/adminUserInfo/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
+ this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back');
}
}
} as SFUploadWidgetSchema
@@ -261,7 +230,7 @@ export class AddPersonalPartnerComponent implements OnInit {
placeholder: '请输入身份证号'
}
},
- operatingStartTime: {
+ validStartTime: {
title: '身份证有效开始日期',
type: 'string',
ui: {
@@ -272,7 +241,7 @@ export class AddPersonalPartnerComponent implements OnInit {
}
} as SFDateWidgetSchema
},
- operatingEndTime: {
+ validEndTime: {
title: '身份证有效截止日期',
type: 'string',
ui: {
@@ -294,34 +263,38 @@ export class AddPersonalPartnerComponent implements OnInit {
grid: { span: 6 },
class: 'input-back',
widget: 'checkbox',
- change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null)
+ change: i => this.sf?.setValue('/adminUserInfo/validEndTime', null)
} as SFCheckboxWidgetSchema
}
},
- required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'operatingStartTime']
+ required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'validStartTime']
},
// 所属城市
_addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
- status3: {
+ cityCodesList: {
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
},
// 渠道销售
_channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
- channel: {
+ invitationCode: {
title: '渠道销售邀请码',
type: 'string',
minLength: 1,
@@ -335,10 +308,7 @@ export class AddPersonalPartnerComponent implements OnInit {
}
}
},
- required: [
- 'status3',
- 'channel'
- ]
+ required: ['cityCodesList', 'invitationCode']
};
}
}
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..f2f058ee 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,87 @@
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
- 深圳某某有限公司
-
-
-
-
-
-
-
-
+
+
+ {{selectItem?.enterpriseName}}
+
+
+
+
+
-
说明:修改模板后,当月开始返佣收益将会按新模板计算
+
+
说明:修改模板后,当月开始返佣收益将会按新模板计算
-
-
-
- 深圳某某有限公司
-
-
- 张三/13999999999
-
-
-
-
-
-
-
-
-
-
-
- 已选(0)
-
-
-
- |
- 客户名称 |
-
-
-
-
- |
- {{ data.name }} |
-
-
-
-
-
-
-
-
-
-
-
+
+
+
深圳某某有限公司
+
张三/13999999999
+
+
+
+
+
+
+
+
+
+
+ 已选(0)
+
+
+
+ |
+ 客户名称 |
+
+
+
+
+ |
+ {{ data.name }} |
+
+
+
+
+
+
+
+
+
+
-
客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客
+
+
客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客
\ No newline at end of file
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..eaa21889 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 })
@@ -23,14 +24,22 @@ export class PartnerListComponent implements OnInit {
@ViewChild('editTemplate', { static: true })
editTemplate: any;
+ templateId: any;
+ templates: any[] = [];
@ViewChild('editCannel', { static: true })
editCannel: any;
customers: any[] = [];
- constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {}
+ selectItem: any = {};
- ngOnInit(): void {}
+ constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {
+ this.service.getRebateConfig().subscribe(res => {
+ if (res) {
+ this.customers = res;
+ }
+ });
+ }
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
@@ -47,16 +56,21 @@ export class PartnerListComponent implements OnInit {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: PartnerAuditModalComponent,
- nzComponentParams: { info: item },
+ nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName } },
nzFooter: null
});
}
editTemplateAction(item: any) {
+ this.selectItem = item;
const modal = this.nzModalService.create({
nzTitle: '修改返佣模板',
nzContent: this.editTemplate,
nzOnOk: () => {
+ if (!this.templateId) {
+ this.service.msgSrv.warning('请选择返佣模板');
+ return false;
+ }
this.confirmEditTemplate();
return false;
}
@@ -67,24 +81,36 @@ export class PartnerListComponent implements OnInit {
const modal = this.nzModalService.confirm({
nzTitle: '确定要修改返佣模板吗?',
nzOnOk: () => {
- this.nzModalService.closeAll();
- }
- });
- }
-
- editCannelAction(item: any) {
- const modal = this.nzModalService.create({
- nzTitle: '修改返佣模板',
- nzWidth: 650,
- nzContent: this.editCannel,
- nzOnOk: () => {
- this.confirmEditCannel();
+ this.service
+ .request(this.service.$api_update_partner_template, {
+ id: this.selectItem.id,
+ templateId: this.templateId
+ })
+ .subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('修改成功');
+ this.nzModalService.closeAll();
+ }
+ });
return false;
}
});
}
- confirmEditCannel() {
+ editCannelAction(item: any) {
+ this.selectItem = item;
+ const modal = this.nzModalService.create({
+ nzTitle: '修改渠道销售',
+ nzWidth: 650,
+ nzContent: this.editCannel,
+ nzOnOk: () => {
+ this.confirmEditCannel(item);
+ return false;
+ }
+ });
+ }
+
+ confirmEditCannel(item: any) {
const modal = this.nzModalService.confirm({
nzTitle: '确定提交吗?',
nzOnOk: () => {
@@ -93,6 +119,29 @@ export class PartnerListComponent implements OnInit {
});
}
+ /**
+ * 重新发起crm
+ * @param item
+ */
+ reSendCRM(item: any) {
+ const modal = this.nzModalService.confirm({
+ nzTitle: '是否确定重新发起CRM?',
+ nzOnOk: () => {
+ this.service
+ .request(this.service.$api_resend_crm, {
+ id: item.id
+ })
+ .subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('发起成功');
+ } else {
+ this.service.msgSrv.warning('发起失败');
+ }
+ });
+ }
+ });
+ }
+
routeTo(route: string) {
this.router.navigate([route]);
}
@@ -122,19 +171,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 +193,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 +236,7 @@ export class PartnerListComponent implements OnInit {
}
}
},
- paymo1de: {
+ crmStatus: {
type: 'string',
title: 'CRM状态',
ui: {
@@ -198,41 +252,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 +311,63 @@ export class PartnerListComponent implements OnInit {
private initST(): STColumn[] {
return [
- { title: '合伙人名称', index: 'payCode', 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: 'payDate', type: 'date', width: 130 },
- { title: '注册时间', index: 'payDate', 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: 'enterpriseName', width: 180, format: item => `${item.enterpriseName || item.contactName}` },
+ { title: '付款编码', index: 'payCode', width: 160 },
+ { 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: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 },
+ { title: '注册时间', index: 'createTime', className: 'text-center', width: 170 },
+ { title: '渠道销售', index: 'channelId', width: 170 },
+ { 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',
@@ -272,8 +375,18 @@ export class PartnerListComponent implements OnInit {
buttons: [
{ type: 'divider' },
{
- text: '详情
',
- click: item => this.router.navigate(['/partner/partner-list/detail/' + item.id])
+ text: '详情',
+ click: item => {
+ if (item.partnerType === 1) {
+ this.router.navigate([`/partner/partner-list/etp-detail/${item.id}`]);
+ } else {
+ this.router.navigate([`/partner/partner-list/personal-detail/${item.id}`]);
+ }
+ }
+ },
+ {
+ text: '审核
',
+ click: item => this.auditPartner(item)
},
{
text: '修改返佣模板',
@@ -283,13 +396,9 @@ export class PartnerListComponent implements OnInit {
text: '修改渠道销售',
click: item => this.editCannelAction(item)
},
- {
- text: '审核
',
- click: item => this.auditPartner(item)
- },
{
text: '重发CRM流程',
- click: item => this.router.navigate(['/partner/account-management/list/detail/' + item.id])
+ click: item => this.reSendCRM(item)
}
]
}
diff --git a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html
index 8ea7c9f8..fc8043d6 100644
--- a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html
+++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html
@@ -3,5 +3,5 @@
\ No newline at end of file
diff --git a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts
index ab86de05..8c2586a8 100644
--- a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts
+++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts
@@ -34,7 +34,7 @@ export class PartnerAuditModalComponent implements OnInit {
title: '合伙人名称',
type: 'string',
ui: { widget: 'text' },
- default: user.name
+ default: user.enterpriseName
},
status: {
title: '审核结果',
@@ -50,7 +50,7 @@ export class PartnerAuditModalComponent implements OnInit {
},
default: true
},
- a: {
+ channelId: {
title: '渠道销售',
type: 'string',
enum: [
@@ -70,7 +70,7 @@ export class PartnerAuditModalComponent implements OnInit {
},
default: ''
},
- b: {
+ approvalOpinion: {
title: '备注',
type: 'string',
maxLength: 100,
@@ -88,43 +88,41 @@ export class PartnerAuditModalComponent implements OnInit {
}
}
},
- required: ['a', 'b']
+ required: ['channelId', 'approvalOpinion']
};
}
sure() {
- this.nzModalService.confirm({
- nzTitle: `确定以“${this.info.userName}/${this.info.mobile}”的名义重新发起CRM《付款对象合同管理》吗?`,
- nzOnOk: () => {
- this.close();
- }
- });
- // if (!this.sf.value.roleId || this.sf.value.roleId.length === 0) {
- // this.service.msgSrv.error('员工角色不能为空!');
- // return;
- // }
- // if (this.i.userId === 0) {
- // const params: any = {
- // ...this.sf.value
- // };
- // this.service.request(this.service.$api_add_staff, params).subscribe(res => {
- // if (res) {
- // this.service.msgSrv.success('保存成功!');
- // this.modal.close(true);
- // }
- // });
- // } else {
- // const params: any = {
- // appUserId: this.i.appUserId,
- // ...this.sf.value
- // };
- // this.service.request(this.service.$api_edit_staff, params).subscribe(res => {
- // if (res) {
- // this.service.msgSrv.success('编辑成功!');
- // this.modal.close(true);
- // }
- // });
- // }
+ if (this.info.isPass || this.sf.value.status) {
+ this.nzModalService.confirm({
+ nzTitle: `确定以“${this.info.channelIdLabel}”的名义重新发起CRM《付款对象合同管理》吗?`,
+ nzOnOk: () => {
+ this.audit();
+ }
+ });
+ } else {
+ this.audit();
+ }
+ }
+
+ audit() {
+ const params: any = {
+ ...this.sf.value,
+ id: this.info.id,
+ auditStatusEnum: this.info.isPass || this.sf.value.status ? '20' : '30'
+ };
+ this.service
+ .request(this.service.$api_audit_partner, {
+ auditStatusEnum: params.auditStatusEnum,
+ id: params.id,
+ approvalOpinion: params.approvalOpinion
+ })
+ .subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('审核成功!');
+ this.close();
+ }
+ });
}
close() {
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..777d019f 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,330 @@
-210}">
-
-
-
-
-
-
-
-
![]()
-
-
-
-
{{ detailData?.enterpriseName }}
-
-
-
-
-
-
-
-
-
-
{{ detailData?.unifiedSocialCreditCode }}
-
-
- 企业合伙人
-
-
-
-
- 注册时间:{{detailData?.createTime}}
-
-
- 所属城市:{{detailData?.createTime}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
210 }">
+
+
+
+
+
+
+
+
![]()
+
+
+
+
{{ detailData?.enterpriseName }}
+
+
+
+
+
-
-
+
+
+
{{ detailData?.unifiedSocialCreditCode }}
+
+
企业合伙人
+
+
+
注册时间:{{ detailData?.createTime }}
+
+ 所属城市:{{enterpriseDefaultCityName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
- 企业管理员信息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
+
+
+ 企业管理员信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- 四要素验证:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 四要素验证:
+
+
+
+
+
+
+
+ {{detailData.enterpriseName}}
+
+
+
+ {{detailData.unifiedSocialCreditCode}}
+
+
+
+
+
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- 企业法人信息
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{
- detailData?.fullRegionVO?.areaName }}
-
-
-
-
-
-
- 渠道销售信息
-
- 张学友
-
-
- 13999999999
-
-
- 2021-09-23 14:43:31
-
-
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ 企业法人信息
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ enterpriseDefaultCityName || '-' }}
+
+
+
+
+
+
+ 渠道销售信息
+ {{ detailData?.channelName }}
+ {{ detailData?.channelMobile }}
+ {{ detailData?.bindChannelTime }}
+
-
- 修改渠道销售记录
-
-
-
-
-
+
+ 修改渠道销售记录
+
+
+
+
+
-
-
-
{{title}}
-
-
- {{content}}
-
+
+
+
{{ title }}
+
+ {{ content }}
+
+
-
-
-
- 上传
-
-
-
![]()
-
-
-
-
+
+
+
+ 上传
+
+
+
![]()
+
+
+
- 转移客户数:10
-
-
- 不转移客户数:10
-
-
-
- 客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,修改成功后,修改时间也是合伙人与客户的结算结束时间,成为原来渠道销售的直客。
-
+ 转移客户数:10
+
+
+ 不转移客户数:10
+
+
+
+ 客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,修改成功后,修改时间也是合伙人与客户的结算结束时间,成为原来渠道销售的直客。
+
\ No newline at end of file
diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less
index eadc3a6a..be442cbc 100644
--- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less
+++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less
@@ -27,4 +27,11 @@
z-index : 999 !important;
width : 100% !important;
}
+
+ .image-hover .delete-icon {
+ top : unset !important;
+ right : unset !important;
+ margin-top : -15px;
+ margin-left: -15px;
+ }
}
\ No newline at end of file
diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts
index fdfd31a3..94b4c869 100644
--- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts
+++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts
@@ -1,10 +1,13 @@
import { DatePipe } from '@angular/common';
-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { apiConf } from '@conf/api.conf';
import { STColumn } from '@delon/abc/st';
import { NzModalService } from 'ng-zorro-antd/modal';
+import { NzFormatEmitEvent, NzTreeNode, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
+import { NzTreeSelectComponent } from 'ng-zorro-antd/tree-select';
import { Subscription, fromEvent } from 'rxjs';
+
import { PartnerListService } from '../../services/partner-list.service';
import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component';
@@ -14,21 +17,25 @@ import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit
styleUrls: ['./partner-detail.component.less'],
providers: [DatePipe]
})
-export class PartnerDetailComponent implements OnInit {
+export class PartnerDetailComponent implements OnInit, OnDestroy {
@ViewChild('logModal')
logModal: any;
+ @ViewChild('areaTreeSelect')
+ areaTreeSelect!: NzTreeSelectComponent;
columns: { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST();
- detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } };
+ detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentity: { name: '' } };
tempalateData = { ...this.detailData };
isEdit = false;
uploadURl = apiConf.waterFileUpload;
disabledUpload = false;
- enterpriseAddressCode: any = [];
- ltdId: any = [];
+ enterpriseAddressCode: string[] = [];
+ enterpriseDefaultAddressCode: string[] = [];
+ enterpriseDefaultCityName: string = '';
+ areaList = [];
esignCheckStatus: any = {
0: '不通过',
@@ -50,35 +57,55 @@ export class PartnerDetailComponent implements OnInit {
ngOnInit() {
this.initData();
- this.loadltdId();
+ this.loadlAreaList();
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
this.scrollTop = document.documentElement.scrollTop;
});
}
- loadltdId() {
- // this.service.getNetworkFreightForwarder().subscribe(res => {
- // if (res) {
- // this.ltdId = res;
- // }
- // });
+
+ loadlAreaList() {
+ this.service.request(this.service.$api_get_region_by_code, { regionCode: '' }).subscribe(res => {
+ if (res) {
+ this.areaList = res.map((item: any) => ({
+ ...item,
+ isLeaf: false,
+ title: item.name,
+ key: item.regionCode.toString(),
+ disabled: true,
+ isDisableCheckbox: true
+ }));
+ }
+ });
}
initData() {
- // this.service
- // .request(this.service.$api_get_freight_detail, {
- // id: this.route.snapshot.params.id
- // })
- // .subscribe(res => {
- // if (res) {
- // this.detailData = res;
- // this.tempalateData = { ...this.detailData };
- // this.enterpriseAddressCode = [
- // Number(this.detailData.fullRegionVO?.provinceCode),
- // Number(this.detailData.fullRegionVO?.cityCode),
- // Number(this.detailData.fullRegionVO?.areaCode)
- // ];
- // }
- // });
+ this.service
+ .request(this.service.$api_get_ent_partner_detail, {
+ id: this.route.snapshot.params.id
+ })
+ .subscribe(res => {
+ if (res) {
+ this.detailData = res;
+ // 存储数据源
+ this.tempalateData = { ...this.detailData };
+ // 拼接所属城市
+ if (this.detailData?.cityCodesList?.length > 0) {
+ this.enterpriseAddressCode = (this.detailData?.cityCodesList as any[]).map(city => city.cityCode);
+ this.enterpriseDefaultCityName = (this.detailData?.cityCodesList as any[]).map(city => city.cityName).join('、');
+ this.enterpriseDefaultAddressCode = [
+ ...new Set
((this.detailData?.cityCodesList as any[]).map(city => city.provinceCode))
+ ];
+ }
+ // 拼接渠道销售信息
+ if (this.detailData?.channelIdLabel) {
+ const channel = (this.detailData.channelIdLabel as string).split('/');
+ Object.assign(this.detailData, {
+ channelName: channel[0],
+ channelMobile: channel[1]
+ });
+ }
+ }
+ });
}
goBack() {
@@ -88,23 +115,23 @@ export class PartnerDetailComponent implements OnInit {
* 冻结
*/
freezeOrResume(type: number) {
- // this.service.http
- // .post(this.service.$api_lock_freight, {
- // id: this.route.snapshot.params.id,
- // statedLocked: !!type
- // })
- // .subscribe(res => {
- // if (res.data === true) {
- // if (type === 0) {
- // this.service.msgSrv.success(`启用成功!`);
- // } else {
- // this.service.msgSrv.success(`冻结成功!`);
- // }
- // this.initData();
- // } else {
- // this.service.msgSrv.error(res.msg || '操作失败!');
- // }
- // });
+ this.service.http
+ .post(this.service.$api_lock_freight, {
+ id: this.route.snapshot.params.id,
+ statedLocked: !!type
+ })
+ .subscribe(res => {
+ if (res.data === true) {
+ if (type === 0) {
+ this.service.msgSrv.success(`启用成功!`);
+ } else {
+ this.service.msgSrv.success(`冻结成功!`);
+ }
+ this.initData();
+ } else {
+ this.service.msgSrv.error(res.msg || '操作失败!');
+ }
+ });
}
auditPartner(isPass: boolean) {
@@ -128,6 +155,18 @@ export class PartnerDetailComponent implements OnInit {
ratify() {
this.isEdit = true;
+ // 搜索展开省份并选中节点
+ setTimeout(() => {
+ if (this.enterpriseDefaultAddressCode?.length > 0 && this.areaTreeSelect) {
+ this.enterpriseDefaultAddressCode.forEach(code => {
+ const node = this.areaTreeSelect.getTreeNodeByKey(code);
+ if (node) {
+ node.setExpanded(true);
+ this.onExpandChange(node);
+ }
+ });
+ }
+ }, 500);
}
deleteImg(data: any, key: string, key2: string) {
@@ -159,25 +198,54 @@ export class PartnerDetailComponent implements OnInit {
}
}
+ onExpandChange(node: NzTreeNode | null | undefined): void {
+ if (node && node.getChildren().length === 0 && node.isExpanded) {
+ this.loadRegionData(node).then(data => {
+ node.addChildren(data);
+ // 更新选中数据
+ this.areaTreeSelect.updateSelectedNodes(true);
+ // 修改子节点选中状态
+ const children = node.getChildren();
+ if (children?.length > 0) {
+ children.forEach(childNode => {
+ if (this.enterpriseAddressCode.find(area => area === childNode.key)) {
+ childNode.setChecked(true);
+ }
+ });
+ }
+ });
+ }
+ }
+
/**
* 级联获取地区数据
+ *
* @param node 节点
* @param index 层级
* @returns
*/
- loadRegionData = (node: any, index: number) => {
+ loadRegionData(node: NzTreeNode): Promise {
+ let rs: any[] = [];
return new Promise(resolve => {
- this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.regionCode || '' }).subscribe(
+ this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.origin.regionCode || '' }).subscribe(
res => {
- node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1, value: item.regionCode, label: item.name }));
+ rs = res.map((item: any) => ({
+ ...item,
+ isLeaf: true,
+ title: item.name,
+ key: item.regionCode.toString(),
+ isSelectable: true,
+ isSelected: true,
+ isChecked: true
+ }));
},
_ => {},
() => {
- resolve(node);
+ resolve(rs);
}
);
});
- };
+ }
reset() {
this.detailData = { ...this.tempalateData };
@@ -185,49 +253,35 @@ export class PartnerDetailComponent implements OnInit {
}
save() {
+ if (this.enterpriseAddressCode?.length > 3) {
+ this.service.msgSrv.warning('所属城市不能超过3个');
+ return;
+ }
const dateil = { ...this.detailData };
- Object.assign(dateil.legalPersonIdentityVO, {
- validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'),
- validEndTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validEndTime, 'yyyy-MM-dd')
+ Object.assign(dateil.legalPersonIdentity, {
+ validStartTime: this.datePipe.transform(dateil.legalPersonIdentity.validStartTime, 'yyyy-MM-dd'),
+ validEndTime: this.datePipe.transform(dateil.legalPersonIdentity.validEndTime, 'yyyy-MM-dd')
+ });
+ Object.assign(dateil.adminUserInfo, {
+ validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'),
+ validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd')
});
const params = {};
Object.assign(params, {
- adminMobile: dateil.adminMobile,
- adminAppUserId: dateil.adminAppUserId,
- adminUserInfo: { ...dateil.adminUserInfo },
- bankAccount: dateil.bankAccount,
- businessScope: dateil.businessScope,
- createBank: dateil.createBank,
- creditPhoto: dateil.creditPhoto,
- creditPhotoWatermark: dateil.creditPhotoWatermark,
- enterpriseAddress: dateil.enterpriseAddress,
- enterpriseAddressCode: this.enterpriseAddressCode[2],
- enterpriseLogo: dateil.enterpriseLogo,
- enterpriseName: dateil.enterpriseName,
+ ...dateil,
+ cityCodesList: this.enterpriseAddressCode,
enterpriseRegistrationTime: this.datePipe.transform(dateil.enterpriseRegistrationTime, 'yyyy-MM-dd'),
- enterpriseType: dateil.enterpriseType,
- id: dateil.id,
- legalPersonIdentityDTO: { ...dateil.legalPersonIdentityVO },
- licensePhoto: dateil.licensePhoto,
- licensePhotoWatermark: dateil.licensePhotoWatermark,
- networkTransporter: dateil.networkTransporter,
- oftenUsedServices: dateil.oftenUsedServices,
operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'),
- operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'),
- promotersTelephone: dateil.promotersTelephone,
- registerAddress: dateil.registerAddress,
- registerPhone: dateil.registerPhone,
- registrationCapital: dateil.registrationCapital,
- taxAuthority: dateil.taxAuthority,
- unifiedSocialCreditCode: dateil.unifiedSocialCreditCode
+ operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd')
+ });
+
+ this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('企业合伙人修改成功');
+ this.initData();
+ this.isEdit = false;
+ }
});
- // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
- // if (res) {
- // this.service.msgSrv.success('企业修改成功');
- // this.initData();
- // this.isEdit = false;
- // }
- // });
}
// 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证
@@ -236,97 +290,89 @@ export class PartnerDetailComponent implements OnInit {
idCardUrl: imgurl,
side: isFront
};
- // this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
- // if (res) {
- // if (type === 1) {
- // // 法定代表人证件照
- // if (isFront === 'front') {
- // // 正面
- // if (res.name) {
- // this.detailData.legalPersonIdentityVO.name = res.name;
- // }
- // if (res.number) {
- // this.detailData.legalPersonIdentityVO.certificateNumber = res.number;
- // }
- // }
- // if (isFront === 'back') {
- // // 背面
- // if (res.validFrom) {
- // this.detailData.legalPersonIdentityVO.validStartTime = res.validFrom;
- // }
- // if (res.validTo) {
- // this.detailData.legalPersonIdentityVO.validEndTime = res.validTo;
- // } else {
- // this.detailData.legalPersonIdentityVO.validEndTime = null;
- // }
- // }
- // }
- // // 企业管理员证件照
- // if (type === 0) {
- // if (isFront === 'front') {
- // // 正面
- // if (res.name) {
- // this.detailData.adminUserInfo.name = res.name;
- // }
- // if (res.number) {
- // this.detailData.adminUserInfo.certificateNumber = res.number;
- // }
- // }
- // }
- // }
- // });
+ this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
+ if (res) {
+ if (type === 1) {
+ // 法定代表人证件照
+ if (isFront === 'front') {
+ // 正面
+ if (res.name) {
+ this.detailData.legalPersonIdentity.name = res.name;
+ }
+ if (res.number) {
+ this.detailData.legalPersonIdentity.certificateType = 0;
+ this.detailData.legalPersonIdentity.certificateNumber = res.number;
+ }
+ }
+ if (isFront === 'back') {
+ // 背面
+ if (res.validFrom) {
+ this.detailData.legalPersonIdentity.validStartTime = res.validFrom;
+ }
+ if (res.validTo) {
+ this.detailData.legalPersonIdentity.validEndTime = res.validTo;
+ } else {
+ this.detailData.legalPersonIdentity.validEndTime = null;
+ }
+ }
+ }
+ // 企业管理员证件照
+ if (type === 0) {
+ if (isFront === 'front') {
+ // 正面
+ if (res.name) {
+ this.detailData.adminUserInfo.name = res.name;
+ }
+ if (res.number) {
+ this.detailData.adminUserInfo.certificateNumber = res.number;
+ }
+ }
+ if (isFront === 'back') {
+ // 背面
+ if (res.validFrom) {
+ this.detailData.adminUserInfo.validStartTime = res.validFrom;
+ }
+ if (res.validTo) {
+ this.detailData.adminUserInfo.validEndTime = res.validTo;
+ }
+ }
+ }
+ }
+ });
}
// 识别营业执照
checkBusinessLicense(imgurl: any) {
- // this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
- // if (res) {
- // if (res.registrationNumber) {
- // this.detailData.unifiedSocialCreditCode = res.registrationNumber;
- // }
- // if (res.name) {
- // this.detailData.enterpriseName = res.name;
- // }
- // if (res.type) {
- // this.detailData.enterpriseType = res.type;
- // }
- // if (res.addressRegionCodes) {
- // this.detailData.enterpriseAddressCode = res.addressRegionCodes;
- // }
- // if (res.address) {
- // this.detailData.enterpriseAddress = res.address;
- // }
- // if (res.registeredCapital) {
- // this.detailData.registrationCapital = res.registeredCapital;
- // }
- // if (res.foundDate) {
- // this.detailData.enterpriseRegistrationTime = res.foundDate;
- // }
- // if (res.businessTermStartDate) {
- // this.detailData.operatingStartTime = res.businessTermStartDate;
- // }
- // if (res.businessTermEndDate) {
- // this.detailData.operatingEndTime = res.businessTermEndDate;
- // } else {
- // this.detailData.operatingEndTime = null;
- // }
- // if (res.businessScope) {
- // this.detailData.businessScope = res.businessScope;
- // }
- // }
- // });
+ this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
+ if (res) {
+ // if (res.registrationNumber) {
+ // this.detailData.unifiedSocialCreditCode = res.registrationNumber;
+ // }
+ // if (res.name) {
+ // this.detailData.enterpriseName = res.name;
+ // }
+ if (res.businessTermStartDate) {
+ this.detailData.operatingStartTime = res.businessTermStartDate;
+ }
+ if (res.businessTermEndDate) {
+ this.detailData.operatingEndTime = res.businessTermEndDate;
+ } else {
+ this.detailData.operatingEndTime = null;
+ }
+ }
+ });
}
private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } {
return {
logsColumn: [
- { title: '修改后渠道销售', index: 'payCode', 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: 'payDate', type: 'date', width: 130 },
+ { title: '修改后渠道销售', index: 'newChannelName', width: 180 },
+ { title: '修改前渠道销售', index: 'originalChannelName', 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: '操作',
fixed: 'right',
diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html
new file mode 100644
index 00000000..aa2b1e32
--- /dev/null
+++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
{{ detailData?.adminUserInfo?.name }}
+
+
+
+
+
+
+
+
+
{{ detailData?.adminUserInfo?.certificateNumber }}
+
+
个人合伙人
+
+
+
注册时间:{{ detailData?.createTime }}
+
+ 所属城市:{{enterpriseDefaultCityName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合伙人信息
+
+
+
+
+
+ {{detailData.adminUserInfo.mobile}}
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ enterpriseDefaultCityName || '-' }}
+
+
+
+
+
+
+
+
+
{{ title }}
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+ 上传
+
+
+
![]()
+
+
+
+
\ No newline at end of file
diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less
new file mode 100644
index 00000000..be442cbc
--- /dev/null
+++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less
@@ -0,0 +1,37 @@
+@import '../../../../usercenter/less/edit.less';
+
+
+.user-info {
+ font-size: 16px;
+
+ .enterprise-name {
+ margin-right: 15px;
+ }
+
+ img {
+ width : 64px;
+ height : 64px;
+ margin-right : 15px;
+ border-radius: 50%;
+ }
+
+ .user-info-des {
+ margin-bottom: 5px;
+ }
+}
+
+:host::ng-deep {
+ .affix {
+ position: fixed !important;
+ top : 20px !important;
+ z-index : 999 !important;
+ width : 100% !important;
+ }
+
+ .image-hover .delete-icon {
+ top : unset !important;
+ right : unset !important;
+ margin-top : -15px;
+ margin-left: -15px;
+ }
+}
\ No newline at end of file
diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts
new file mode 100644
index 00000000..c6da1adc
--- /dev/null
+++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts
@@ -0,0 +1,264 @@
+import { DatePipe } from '@angular/common';
+import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+import { apiConf } from '@conf/api.conf';
+import { STColumn } from '@delon/abc/st';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { NzTreeNode, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
+import { NzTreeSelectComponent } from 'ng-zorro-antd/tree-select';
+import { Subscription, fromEvent } from 'rxjs';
+
+import { PartnerListService } from '../../services/partner-list.service';
+import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component';
+
+@Component({
+ selector: 'app-personal-partner-detail',
+ templateUrl: './personal-partner-detail.component.html',
+ styleUrls: ['./personal-partner-detail.component.less'],
+ providers: [DatePipe]
+})
+export class PersonalPartnerDetailComponent implements OnInit {
+ @ViewChild('areaTreeSelect')
+ areaTreeSelect!: NzTreeSelectComponent;
+
+ detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentity: { name: '' } };
+ tempalateData = { ...this.detailData };
+
+ isEdit = false;
+
+ uploadURl = apiConf.waterFileUpload;
+ disabledUpload = false;
+ enterpriseAddressCode: string[] = [];
+ enterpriseDefaultAddressCode: string[] = [];
+ enterpriseDefaultCityName: string = '';
+ areaList = [];
+
+ constructor(
+ public service: PartnerListService,
+ private route: ActivatedRoute,
+ private nzModalService: NzModalService,
+ private datePipe: DatePipe
+ ) {}
+
+ ngOnInit() {
+ this.initData();
+ this.loadlAreaList();
+ }
+
+ loadlAreaList() {
+ this.service.request(this.service.$api_get_region_by_code, { regionCode: '' }).subscribe(res => {
+ if (res) {
+ this.areaList = res.map((item: any) => ({
+ ...item,
+ isLeaf: false,
+ title: item.name,
+ key: item.regionCode.toString(),
+ disabled: true,
+ isDisableCheckbox: true
+ }));
+ }
+ });
+ }
+
+ initData() {
+ this.service
+ .request(this.service.$api_get_personal_partner_detail, {
+ id: this.route.snapshot.params.id
+ })
+ .subscribe(res => {
+ if (res) {
+ this.detailData = res;
+ console.log(this.detailData);
+
+ this.tempalateData = { ...this.detailData };
+ // 拼接所属城市
+ if (this.detailData?.cityCodesList?.length > 0) {
+ this.enterpriseAddressCode = (this.detailData?.cityCodesList as any[]).map(city => city.cityCode);
+ this.enterpriseDefaultCityName = (this.detailData?.cityCodesList as any[]).map(city => city.cityName).join('、');
+ this.enterpriseDefaultAddressCode = [
+ ...new Set((this.detailData?.cityCodesList as any[]).map(city => city.provinceCode))
+ ];
+ }
+ }
+ });
+ }
+
+ goBack() {
+ window.history.go(-1);
+ }
+ /**
+ * 冻结
+ */
+ freezeOrResume(type: number) {
+ this.service.http
+ .post(this.service.$api_lock_freight, {
+ id: this.route.snapshot.params.id,
+ statedLocked: !!type
+ })
+ .subscribe(res => {
+ if (res.data === true) {
+ if (type === 0) {
+ this.service.msgSrv.success(`启用成功!`);
+ } else {
+ this.service.msgSrv.success(`冻结成功!`);
+ }
+ this.initData();
+ } else {
+ this.service.msgSrv.error(res.msg || '操作失败!');
+ }
+ });
+ }
+
+ auditPartner(isPass: boolean) {
+ const modal = this.nzModalService.create({
+ nzTitle: '审核',
+ nzContent: PartnerAuditModalComponent,
+ nzComponentParams: { info: { ...this.detailData, isPass, enterpriseName: this.detailData.adminUserInfo?.name } },
+ nzFooter: null
+ });
+ }
+
+ ratify() {
+ this.isEdit = true;
+ // 搜索展开省份并选中节点
+ setTimeout(() => {
+ if (this.enterpriseDefaultAddressCode?.length > 0 && this.areaTreeSelect) {
+ this.enterpriseDefaultAddressCode.forEach(code => {
+ const node = this.areaTreeSelect.getTreeNodeByKey(code);
+ if (node) {
+ node.setExpanded(true);
+ this.onExpandChange(node);
+ }
+ });
+ }
+ }, 500);
+ }
+
+ deleteImg(data: any, key: string, key2: string) {
+ this.nzModalService.warning({
+ nzTitle: '是否确认删除该图片',
+ nzOnOk: () => {
+ this.disabledUpload = true;
+ data[key] = '';
+ data[key2] = '';
+ setTimeout(() => {
+ this.disabledUpload = false;
+ }, 100);
+ }
+ });
+ }
+ changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string, id: string) {
+ if (type === 'success') {
+ data[key] = file.response.data?.fullFileWatermarkPath;
+ data[key2] = file.response.data?.fullFilePath;
+ if (id === 'legalFront' || id === 'legalBack') {
+ this.checkIdCard(file.response.data?.fullFilePath, id === 'legalFront' ? 'front' : 'back');
+ }
+ }
+ }
+
+ onExpandChange(node: NzTreeNode | null | undefined): void {
+ if (node && node.getChildren().length === 0 && node.isExpanded) {
+ this.loadRegionData(node).then(data => {
+ node.addChildren(data);
+ // 更新选中数据
+ this.areaTreeSelect.updateSelectedNodes(true);
+ // 修改子节点选中状态
+ const children = node.getChildren();
+ if (children?.length > 0) {
+ children.forEach(childNode => {
+ if (this.enterpriseAddressCode.find(area => area === childNode.key)) {
+ childNode.setChecked(true);
+ }
+ });
+ }
+ });
+ }
+ }
+
+ /**
+ * 级联获取地区数据
+ *
+ * @param node 节点
+ * @param index 层级
+ * @returns
+ */
+ loadRegionData(node: NzTreeNode): Promise {
+ let rs: any[] = [];
+ return new Promise(resolve => {
+ this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.origin.regionCode || '' }).subscribe(
+ res => {
+ rs = res.map((item: any) => ({
+ ...item,
+ isLeaf: true,
+ title: item.name,
+ key: item.regionCode.toString(),
+ isSelectable: true,
+ isSelected: true,
+ isChecked: true
+ }));
+ },
+ _ => {},
+ () => {
+ resolve(rs);
+ }
+ );
+ });
+ }
+
+ reset() {
+ this.detailData = { ...this.tempalateData };
+ this.isEdit = false;
+ }
+
+ save() {
+ if (this.enterpriseAddressCode?.length > 3) {
+ this.service.msgSrv.warning('所属城市不能超过3个');
+ return;
+ }
+ const dateil = { ...this.detailData, cityCodesList: this.enterpriseAddressCode };
+ Object.assign(dateil.adminUserInfo, {
+ validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'),
+ validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd')
+ });
+
+ this.service.request(this.service.$api_save_personal_partner, dateil).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('个人合伙人修改成功');
+ this.initData();
+ this.isEdit = false;
+ }
+ });
+ }
+
+ // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证
+ checkIdCard(imgurl: any, isFront: string) {
+ const params = {
+ idCardUrl: imgurl,
+ side: isFront
+ };
+ this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
+ if (res) {
+ // 企业管理员证件照
+ if (isFront === 'front') {
+ // 正面
+ if (res.name) {
+ this.detailData.adminUserInfo.name = res.name;
+ }
+ if (res.number) {
+ this.detailData.adminUserInfo.certificateNumber = res.number;
+ }
+ }
+ if (isFront === 'back') {
+ // 背面
+ if (res.validFrom) {
+ this.detailData.adminUserInfo.validStartTime = res.validFrom;
+ }
+ if (res.validTo) {
+ this.detailData.adminUserInfo.validEndTime = res.validTo;
+ }
+ }
+ }
+ });
+ }
+}
diff --git a/src/app/routes/partner/partner-list/services/partner-list.service.ts b/src/app/routes/partner/partner-list/services/partner-list.service.ts
index eecd75f5..b8d83d54 100644
--- a/src/app/routes/partner/partner-list/services/partner-list.service.ts
+++ b/src/app/routes/partner/partner-list/services/partner-list.service.ts
@@ -1,12 +1,35 @@
import { Injectable, Injector } from '@angular/core';
-import { BaseService, EACacheService } from '@shared';
+import { BaseService, EACacheService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
@Injectable()
-export class PartnerListService extends BaseService {
+export class PartnerListService extends ShipperBaseService {
$mock_url = '/rule?_allow_anonymous=true';
+ // 查询合伙人信息-分页
+ $api_get_partner_page = '/api/mdc/partner/list/page';
+ // 新增/更新保存企业合伙人信息
+ $api_save_entp_partner = '/api/mdc/partner/saveEnterprise';
+ // 新增/更新个人合伙人信息
+ $api_save_personal_partner = '/api/mdc/partner/savePersonally';
+ // 获取企业合伙人信息
+ $api_get_ent_partner_detail = '/api/mdc/partner/getEnterprise';
+ // 获取合伙人信息
+ $api_get_personal_partner_detail = '/api/mdc/partner/getPersonally';
+ // 审核合伙人
+ $api_audit_partner = '/api/mdc/partner/audit';
+ // 修改返佣模板
+ $api_update_partner_template = '/api/mdc/partner/updateTemplate';
+ // 更新渠道销售
+ $api_update_partner_channel = '/api/mdc/partner/updateChannelSale';
+ // 重新发起CRM
+ $api_resend_crm = '/api/mdc/partner/reSendCrm';
+ // 查询合伙人修改渠道渠道销售记录
+ $api_get_personal_channel_list = '/api/mdc/partnerChannelRelLog/list/page';
+ // 冻结/启用企业业
+ $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
+
// 根据地区code查询列表
$api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode';
// 根据地区code查询地区详情
diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts
index 6f0e0cc6..afcd8d41 100644
--- a/src/app/routes/partner/partner-routing.module.ts
+++ b/src/app/routes/partner/partner-routing.module.ts
@@ -10,41 +10,45 @@
*/
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
+
+import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
+import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component';
+import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component';
import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.component';
-import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.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';
-import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/particulars/particulars.component';
-import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component';
import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component';
import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component';
-import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component';
-import { ParterClaimAuditListComponent } from './claim-audit/components/list/list.component';
+import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component';
+import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component';
+import { ParterChannelSalesEditComponent } from './channel-sales/components/edit/edit.component';
+import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component';
import { ParterClaimAuditListChannelDetailComponent } from './claim-audit/components/channel-detail/channel-detail.component';
+import { ParterClaimAuditListComponent } from './claim-audit/components/list/list.component';
import { ParterClaimAuditListPartnerDetailComponent } from './claim-audit/components/partner-detail/partner-detail.component';
+import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component';
+import { ParterLevelConfigListComponent } from './level-config/components/list/list.component';
+import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component';
+import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/particulars/particulars.component';
import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component';
-import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
-import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component';
import { PartnerAccountManagementWithdralDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component';
-import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component';
-import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component';
+import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component';
import { ParterRebateManageMentSettingComponent } from './rebate-management/components/rebate-setting/rebate-setting.component';
+import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component';
+import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component';
import { AddEtpPartnerComponent } from './partner-list/components/add-etp-partner/add-etp-partner.component';
import { AddPersonalPartnerComponent } from './partner-list/components/add-personal-partner/add-personal-partner.component';
-import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component';
import { PartnerListComponent } from './partner-list/components/index/partner-list.component';
-import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component';
import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component';
import { ParterArticleManagementListComponent } from './article-management/components/list/list.component';
import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component';
+import { ScrollimgComponentsAddComponent } from './scrollimg/components/add/add.component';
import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component';
import { BannerComponentsListComponent } from './knowledge/banner/components/list/list.component';
-import { ScrollimgComponentsAddComponent } from './scrollimg/components/add/add.component';
import { BannerComponentsAddComponent } from './knowledge/banner/components/add/add.component';
+import { PersonalPartnerDetailComponent } from './partner-list/components/personal-partner-detail/personal-partner-detail.component';
+import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component';
+import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component';
const routes: Routes = [
{
@@ -81,7 +85,7 @@ const routes: Routes = [
{ path: 'particulars', component: ParterRebateManageMentParticularsComponent },
{ path: 'record', component: ParterRebateManageMentRecordComponent },
{ path: 'setting', component: ParterRebateManageMentSettingComponent },
- { path: 'setting/add/:id', component: ParterRebateManageMentAddComponent },
+ { path: 'setting/add/:id', component: ParterRebateManageMentAddComponent }
]
},
{
@@ -93,7 +97,7 @@ const routes: Routes = [
{ path: '', redirectTo: 'list' },
{ path: 'list', component: PartnerAccountManagementListComponent },
{ path: 'detail/:id', component: PartnerAccountManagementAccountDetailComponent },
- { path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent },
+ { path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent }
]
},
{
@@ -104,16 +108,16 @@ const routes: Routes = [
{ path: 'detail/:id', component: PartnerAccountManagementWithdralDetailComponent }
]
}
-
]
},
{
path: 'partner-list',
children: [
{ path: '', component: PartnerListComponent },
- { path: 'detail/:id', component: PartnerDetailComponent },
+ { path: 'etp-detail/:id', component: PartnerDetailComponent },
+ { path: 'personal-detail/:id', component: PersonalPartnerDetailComponent },
{ path: 'add-etp-partner', component: AddEtpPartnerComponent },
- { path: 'add-personal-partner', component: AddPersonalPartnerComponent },
+ { path: 'add-personal-partner', component: AddPersonalPartnerComponent }
]
},
{
@@ -130,7 +134,15 @@ const routes: Routes = [
children: [
{ path: '', component: ScrollImgComponentsListComponent },
{ path: 'list', component: ScrollImgComponentsListComponent },
- { path: 'detail', component: ScrollimgComponentsAddComponent },
+ { path: 'detail', component: ScrollimgComponentsAddComponent }
+ ]
+ },
+ {
+ path: 'advice-feedback',
+ children: [
+ { path: '', component: ParterAdviceFeedbackListComponent },
+ { path: 'list', component: ParterAdviceFeedbackListComponent },
+ { path: 'detail', component: ParterAdviceFeedbackDetailComponent }
]
},
{
@@ -147,13 +159,13 @@ const routes: Routes = [
{ path: 'article-management-list', component: ParterArticleManagementListComponent },
{ path: 'article-management-add', component: ParterArticleManagementEditComponent },
{ path: 'article-management-edit', component: ParterArticleManagementEditComponent },
- { path: 'banner', component: BannerComponentsListComponent},
- { path: 'banner/detail', component: BannerComponentsAddComponent },
+ { path: 'banner', component: BannerComponentsListComponent },
+ { path: 'banner/detail', component: BannerComponentsAddComponent }
]
- },
+ }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
-export class PartnerRoutingModule { }
+export class PartnerRoutingModule {}
diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts
index 3ce63eef..986d5e59 100644
--- a/src/app/routes/partner/partner.module.ts
+++ b/src/app/routes/partner/partner.module.ts
@@ -58,6 +58,9 @@ import { ScrollimgComponentsAddComponent } from './scrollimg/components/add/add.
import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component';
import { BannerComponentsListComponent } from './knowledge/banner/components/list/list.component';
import { BannerComponentsAddComponent } from './knowledge/banner/components/add/add.component';
+import { PersonalPartnerDetailComponent } from './partner-list/components/personal-partner-detail/personal-partner-detail.component';
+import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component';
+import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component';
const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent,
@@ -105,7 +108,10 @@ const COMPONENTS: any[] = [
PartnerKnowledgeClassificationListComponent,
PartnerEditComponent,
BannerComponentsListComponent,
- BannerComponentsAddComponent
+ BannerComponentsAddComponent,
+ PersonalPartnerDetailComponent,
+ ParterAdviceFeedbackListComponent,
+ ParterAdviceFeedbackDetailComponent
];
@NgModule({
@@ -113,4 +119,4 @@ const COMPONENTS: any[] = [
imports: [CommonModule, PartnerRoutingModule, SharedModule],
providers: [PartnerListService]
})
-export class PartnerModule { }
+export class PartnerModule {}
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html
index b3c8f933..9dc5b6f9 100644
--- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html
+++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html
@@ -4,13 +4,51 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
- * @LastEditTime : 2022-03-11 15:25:00
+ * @LastEditTime : 2022-03-21 13:53:31
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
-
+
+
+
- 12121212
-
+
+
+ 固定结算费率配置
+ %
+ 业务量和管理费比例配置
+
+
+
+
+
+
+
+
+
+ 关联合伙人配置
+
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.less b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.less
new file mode 100644
index 00000000..0c812cac
--- /dev/null
+++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.less
@@ -0,0 +1,10 @@
+:host {
+ ::ng-deep {
+ .sv__label {
+ color: #000;
+ }
+ .sv__title {
+ font-weight: 700;
+ }
+ }
+}
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts
index ebfe0bce..3edd7ef2 100644
--- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts
+++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts
@@ -1,3 +1,13 @@
+/*
+ * @Description :
+ * @Version : 1.0
+ * @Author : Shiming
+ * @Date : 2022-03-21 09:26:45
+ * @LastEditors : Shiming
+ * @LastEditTime : 2022-03-21 13:44:34
+ * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
+ * Copyright (C) 2022 huzhenhong. All rights reserved.
+ */
import { ModalHelper } from '@delon/theme';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
@@ -8,10 +18,17 @@ import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../../services/rebate-management.service';
@Component({
selector: 'app-parter-channel-rebate-management-add',
+ styleUrls: ['./add.component.less'],
templateUrl: './add.component.html'
})
export class ParterRebateManageMentAddComponent implements OnInit {
-
+ setValue: string = '';
+ toFixedValue: Number = 2;
+ radioValue = 'A';
+ precision = 2;
+ inputValue= '';
+ @ViewChild('sf', { static: false }) sf!: SFComponent;
+ schema1!: SFSchema;
constructor(
public router: Router,
public ar: ActivatedRoute,
@@ -19,7 +36,25 @@ export class ParterRebateManageMentAddComponent implements OnInit {
private modal: NzModalService,
public shipperservice: ShipperBaseService,
) {}
-
+ initSF(data?: any) {
+ this.schema1 = {
+ properties: {
+ content: {
+ type: 'string',
+ title: '',
+ ui: {
+ widget: 'tinymce',
+ loadingTip: 'loading...',
+ config: {
+ height: 650
+ }
+ },
+ default: data?.agreementContent || ''
+ }
+ }
+ };
+ }
ngOnInit() {
+ this.initSF()
}
}
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html
index a4864e4d..efa2e94f 100644
--- a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html
+++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html
@@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
- * @LastEditTime : 2022-03-11 14:45:48
+ * @LastEditTime : 2022-03-22 14:42:27
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\rebate-setting.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@@ -39,7 +39,7 @@
-
待审批
-
-
+
{{formData?.stsLabel}}
+
+
@@ -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..bbfad88e 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,57 +17,57 @@ 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);
+ this.getRecordedDetail(this.id);
}
ngOnInit(): void { }
- loadRefundDetail(id: string) {
- this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => {
+ getRecordedDetail(id: string) {
+ 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,48 +86,45 @@ 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({ ids: 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({ ids: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => {
+ modal.destroy(true);
+ }, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`);
}
}
]
});
modal.afterClose.subscribe((res: any) => {
if (res) {
- this.loadRefundDetail(this.id);
+ this.getRecordedDetail(this.id);
}
});
}
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..2de32d76 100644
--- a/src/app/routes/partner/recorded/components/record/record.component.html
+++ b/src/app/routes/partner/recorded/components/record/record.component.html
@@ -32,7 +32,7 @@
已选择
- {{ selectedRows.length }} 条数据 累计提现 {{
+ {{ selectedRows.length }} 条数据,累计入账 {{
totalCallNo }}
@@ -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..d4e0d8de 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 || '';
@@ -67,7 +70,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
};
afterRes = (data: any[], rawData?: any) => {
- data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' }));
+ // data = data.map(node => ({ ...node, disabled: node.sts !== '0' }));
return data;
};
@@ -101,7 +104,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
}
let totalCallNo = 0;
this.selectedRows.forEach((item => {
- totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse();
+ totalCallNo = new Big(this.totalCallNo).plus(item?.entryAmount).parse();
}));
this.totalCallNo = totalCallNo;
} else if (e.type === 'loaded') {
@@ -122,6 +125,10 @@ export class PartnerRecordedRecordComponent implements OnInit {
}
auditAction(item?: any, type: string = '1') {
+ if (!item && this.selectedRows.length === 0) {
+ this.service.msgSrv.warning('请选择需要审核的记录');
+ return;
+ }
this.msg = '';
let params: Array = [];
if (item) {
@@ -139,39 +146,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({ ids: 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({ ids: params, rejectReason: this.msg, sts: '1' }, () => {
+ modal.destroy();
+ this.st.load(1);
+ }, '审核通过成功');
}
}
]
@@ -230,12 +232,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 +256,10 @@ export class PartnerRecordedRecordComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
- asyncData: () => this.service.getNetworkFreightForwarder(),
+ asyncData: () => this.shipperSrv.getNetworkFreightForwarder({}, true),
}
},
- createTime: {
+ submitTime: {
title: '提交时间',
type: 'string',
ui: {
@@ -270,9 +279,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 +293,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
},
{
title: '代缴个税',
- index: 'amount',
+ index: 'taxPersonal',
width: 150,
type: 'widget',
className: 'text-right',
@@ -292,15 +301,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: 120, className: 'text-center' },
{
title: '操作',
fixed: 'right',
@@ -308,12 +317,12 @@ export class PartnerRecordedRecordComponent implements OnInit {
buttons: [
{
text: '审核',
- iif: item => item.refundStatus === '1',
+ iif: item => item.sts === '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 +333,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..dcf5393f
--- /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/partnerInvoiceEntry/queryInvoiceEntrylist`; // 查询合伙人发票入账主表
+ $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);
+ }
+}
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/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts
index 14778143..52eaf537 100644
--- a/src/app/routes/ticket-management/services/ticket.service.ts
+++ b/src/app/routes/ticket-management/services/ticket.service.ts
@@ -99,8 +99,8 @@ export class TicketService extends ShipperBaseService {
// 查询快递轨迹
$api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes';
- constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
- super(injector, eaCacheSrv);
+ constructor(public injector: Injector) {
+ super(injector);
}
reviewPDF(url: string) {
diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts
index 0357304d..8af58a55 100644
--- a/src/app/routes/usercenter/services/usercenter.service.ts
+++ b/src/app/routes/usercenter/services/usercenter.service.ts
@@ -135,16 +135,14 @@ export class UsermanageService extends ShipperBaseService {
// 查询司机配置列表
$api_configPage = '/api/mdc/cuc/driver/list/configPage';
-
// 批量修改企业渠道
$api_batchUpdateEnterpriceChannel = '/api/mdc/enterpriceRelLog/batchUpdateEnterpriceChannel';
// 批量修改企业合伙人
$api_batchUpdateEnterpricePartner = '/api/mdc/enterpriceRelLog/batchUpdateEnterpricePartner';
// 渠道销售修改详情
$api_partnerChannelUpdateDetaiList = '/api/mdc/enterpriceRelLog/partnerChannelUpdateDetaiList';
-
- constructor(public injector: Injector, public nzModalService: NzModalService, public eaCacheSrv: EACacheService) {
- super(injector, eaCacheSrv);
+ constructor(public injector: Injector, private nzModalService: NzModalService) {
+ super(injector);
}
showImg(url: any) {
diff --git a/src/app/shared/components/rebate-table/rebate-table.component.html b/src/app/shared/components/rebate-table/rebate-table.component.html
index a7ab6f02..d8912be8 100644
--- a/src/app/shared/components/rebate-table/rebate-table.component.html
+++ b/src/app/shared/components/rebate-table/rebate-table.component.html
@@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-25 20:18:52
* @LastEditors : Shiming
- * @LastEditTime : 2022-03-11 15:12:01
+ * @LastEditTime : 2022-03-21 14:14:06
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@@ -14,48 +14,52 @@
-->
-
-
-
-
-
-
-
- 元
-
-
-
-
-
- | 险种 |
- 普货-基本险 |
- 普货-综合险 |
+ 序号 |
+ 合伙人等级 |
+ 初始业务量(万/月) |
+ 到达业务量(万/月) |
+ 管理费比例% |
操作 |
-
-
- 公里数(km)
-
- |
-
-
-
-
-
- (含)
-
+
-
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
|
@@ -69,19 +73,14 @@
|
-
-
-
-
-
-
-
- |
+ +
1"
nz-popconfirm
nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="deleteRow(i)"
- >删除
+ >-
|
diff --git a/src/app/shared/components/rebate-table/rebate-table.component.ts b/src/app/shared/components/rebate-table/rebate-table.component.ts
index 75b3768a..e8699d14 100644
--- a/src/app/shared/components/rebate-table/rebate-table.component.ts
+++ b/src/app/shared/components/rebate-table/rebate-table.component.ts
@@ -12,26 +12,17 @@ import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
export class RebateTableComponent implements OnInit {
data: any[] = [];
headers: any[] = [];
- sfdata: any; // 货源单设置回显
-
- @ViewChild('sf', { static: false }) sf!: SFComponent;
- schema: SFSchema = {};
- ui!: SFUISchema;
-
formatterDollar = (value: number): string => `${value}`;
- minrebatePrice: number = 0;
changeSub = new Subject();
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
ngOnInit(): void {
this.loadData();
- this.initSF()
this.changeEndKmAction();
- this.minrebatePrice = 1000
}
loadData() {
- this.service.request('/api/mdc/cuc/rebateConfig/list').subscribe(res => {
+ this.service.request('/api/mdc/cuc/insuranceConfig/list').subscribe(res => {
if (res) {
console.log(res);
this.data = res;
@@ -43,35 +34,10 @@ export class RebateTableComponent implements OnInit {
]).subscribe(res => {
if (res) {
console.log(res);
- this.minrebatePrice = Number(res[0].itemValue)
}
});
}
- initSF() {
- this.schema = {
- properties: {
- freightPrice: {
- type: 'string',
- title: '单票投保最低保费',
- ui: {
- widget: 'custom',
- placeholder: '请输入',
- errors: { required: '请填写' }
- }
- },
- },
- required: ['freightPrice']
- };
- this.ui = {
- '*': {
- spanLabelFixed: 160,
- grid: { span: 24 }
- },
- $freightPrice: {
- grid: { span: 8 }
- },
- };
- }
+
/**
* 修改结束车长
* @param event 车长
@@ -145,12 +111,8 @@ export class RebateTableComponent implements OnInit {
}
save() {
- if(!this.minrebatePrice) {
- this.service.msgSrv.error('必填项为空!')
- return
- }
+ console.log(this.data)
let params= {
- minrebatePrice: this.minrebatePrice,
rebateConfigDTOS: this.data
}
console.log(params);
diff --git a/src/app/shared/components/rebate-table/rebate-table.module.ts b/src/app/shared/components/rebate-table/rebate-table.module.ts
index 6e65e35b..4f48a645 100644
--- a/src/app/shared/components/rebate-table/rebate-table.module.ts
+++ b/src/app/shared/components/rebate-table/rebate-table.module.ts
@@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-25 20:23:54
* @LastEditors : Shiming
- * @LastEditTime : 2022-02-11 17:20:49
+ * @LastEditTime : 2022-03-21 14:11:56
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@@ -18,8 +18,9 @@ import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
import { NzInputModule } from 'ng-zorro-antd/input';
import { DelonFormModule } from '@delon/form';
import { NzButtonModule } from 'ng-zorro-antd/button';
+import { NzSelectModule } from 'ng-zorro-antd/select';
const COMPONENTS = [RebateTableComponent];
-const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule];
+const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule,NzSelectModule];
@NgModule({
declarations: COMPONENTS,
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/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts
index 41c9fbf8..d3a4b2d1 100644
--- a/src/app/shared/services/business/shipper-base.service.ts
+++ b/src/app/shared/services/business/shipper-base.service.ts
@@ -17,10 +17,10 @@ export class ShipperBaseService extends BaseService {
$api_get_network_freight_forwarder_one = `/api/mdc/cuc/networkTransporter/get`; // 获取网络货运人
// 根据FullKey获取系统子配置(树)
$api_getSysConfigTreeByParentFullKey = `/api/mdc/pbc/sysConfig/getSysConfigTreeByParentFullKey`;
- envCache: any;
- constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
+ // 获取全部返佣配置
+ $api_get_rebate_config = `/api/mdc/rebateConfig/list/listRebateConfig`;
+ constructor(public injector: Injector) {
super(injector);
- this.envCache = this.eaCacheSrv.get(cacheConf.env);
}
/**
@@ -44,22 +44,22 @@ export class ShipperBaseService extends BaseService {
* 获取所属项目
* @returns
*/
- getEnterpriseProject(params?: any) {
+ getEnterpriseProject(params?: any) {
return this.request(this.$api_get_enterprise_project, params).pipe(
map((res: any) => {
if (!res) {
return [];
}
- const list = res.map(((item: any) => {
+ const list = res.map((item: any) => {
return {
label: item.projectName,
value: item.id
- }
- }))
+ };
+ });
const obj = [{ value: '', label: '全部' }];
return [...obj, ...list];
})
- )
+ );
}
/**
@@ -204,4 +204,23 @@ export class ShipperBaseService extends BaseService {
})
);
}
+
+ /**
+ * 获取全部返佣配置
+ * @returns
+ */
+ getRebateConfig() {
+ const params = {};
+ return this.request(this.$api_get_rebate_config, params, 'POST').pipe(
+ map(res => {
+ if (res) {
+ return res.map((m: any) => {
+ return { label: m.configName, value: m.id };
+ });
+ } else {
+ return [];
+ }
+ })
+ );
+ }
}
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/app/shared/shared-zorro.module.ts b/src/app/shared/shared-zorro.module.ts
index bb75f8c0..ed9a1985 100644
--- a/src/app/shared/shared-zorro.module.ts
+++ b/src/app/shared/shared-zorro.module.ts
@@ -47,6 +47,7 @@ import { NzAffixModule } from 'ng-zorro-antd/affix';
import { NzTypographyModule } from 'ng-zorro-antd/typography';
import { NzSwitchModule } from 'ng-zorro-antd/switch';
import { NzImageModule } from 'ng-zorro-antd/image';
+import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
export const SHARED_ZORRO_MODULES = [
NzButtonModule,
@@ -88,5 +89,6 @@ export const SHARED_ZORRO_MODULES = [
NzAffixModule,
NzTypographyModule,
NzSwitchModule,
- NzImageModule
+ NzImageModule,
+ NzTreeSelectModule
];
diff --git a/src/app/shared/widget/dict-select/dict-select.widget.ts b/src/app/shared/widget/dict-select/dict-select.widget.ts
index 57b64ba5..d8906295 100644
--- a/src/app/shared/widget/dict-select/dict-select.widget.ts
+++ b/src/app/shared/widget/dict-select/dict-select.widget.ts
@@ -1,5 +1,5 @@
/*
- * @Description :
+ * @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-13 10:36:49
@@ -37,4 +37,8 @@ export class DictSelectWidget extends ControlWidget implements OnInit {
if (this.ui.change) this.ui.change(value);
this.setValue(value);
}
+
+ reset(value: any) {
+ this.setValue(value);
+ }
}
diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json
index 82dcd221..df702349 100644
--- a/src/assets/mocks/menu-data.json
+++ b/src/assets/mocks/menu-data.json
@@ -596,6 +596,15 @@
"text": "轮播图管理",
"link": "/partner/scroll-img/list"
},
+ {
+ "text": "建议反馈管理",
+ "link": "/partner/advice-feedback/list"
+ },
+ {
+ "text": "建议反馈管理详情",
+ "link": "/partner/advice-feedback/detail",
+ "hide": true
+ },
{
"text": "知识库管理",
"icon": "iconfont icon-yundan-copy",
@@ -630,6 +639,16 @@
}
]
+ },
+ {
+ "text": "数据监管",
+ "icon": "iconfont icon-hetong-copy",
+ "group": true,
+ "children": [{
+ "text": "数据报表",
+ "link": "/regulatory-data/dashboard"
+ }
+ ]
}
]
}]
diff --git a/src/styles.less b/src/styles.less
index a25a53de..cf7ad9c6 100644
--- a/src/styles.less
+++ b/src/styles.less
@@ -7,11 +7,11 @@
@import './styles/theme';
.icon {
- width : 18px;
- fill : currentColor;
- overflow : hidden;
- font-size: 18px !important;
- color : #ffffff;
+ width : 18px;
+ fill : currentColor;
+ overflow : hidden;
+ font-size : 18px !important;
+ color : #ffffff;
margin-right: 10px;
}
@@ -47,4 +47,38 @@ input[type="number"] {
.break-word-all {
word-break: break-all;
word-wrap : break-word;
+}
+
+.ant-select-tree .ant-select-tree-treenode-disabled {
+ .ant-select-tree-checkbox {
+ margin: 0;
+
+ .ant-select-tree-checkbox-inner {
+ width : 0px;
+ border-color: #ffffff !important;
+ }
+ }
+
+ .ant-select-tree-node-content-wrapper {
+ color : unset;
+ cursor: not-allowed;
+ }
+}
+
+.area-tree-select {
+ .ant-select-tree .ant-select-tree-treenode-disabled {
+ .ant-select-tree-checkbox {
+ margin: 0;
+
+ .ant-select-tree-checkbox-inner {
+ width : 0px;
+ border-color: #ffffff !important;
+ }
+ }
+
+ .ant-select-tree-node-content-wrapper {
+ color : unset;
+ cursor: not-allowed;
+ }
+ }
}
\ No newline at end of file