This commit is contained in:
Taric Xin
2022-03-10 16:12:36 +08:00
parent 152c139041
commit 8c06e1f9de
16 changed files with 1286 additions and 15 deletions

View File

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

View File

@ -38,8 +38,6 @@ export class AuthGuard extends ACLGuard {
}
private handle(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, type: 1 | 2, router?: string): Observable<boolean> {
console.log(route, state);
if (!router) {
return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state);
}

View File

@ -17,7 +17,7 @@ const alainConfig: AlainConfig = {
page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] },
modal: { size: 'lg' }
},
sf: { button: { search: '查询' } },
sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } },
pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true },
auth: { login_url: '/passport/login' },
acl: { guard_url: '/exception/403' }

View File

@ -0,0 +1,95 @@
<page-header-wrapper [title]="'合伙人列表'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 17" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 7" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card class="content-box" nzBordered>
<div class="d-flex align-items-center mb-md mt-md">
<button nz-button (click)="this.routeTo('/partner/add-etp-partner')" nzType="primary">新增企业合伙人</button>
<button nz-button (click)="this.routeTo('/partner/add-personal-partner')" nzType="primary">新增个人合伙人</button>
</div>
<st #st [data]="service.$mock_url" [columns]="columns" [req]="{ process: beforeReq }"
[loading]="service.http.loading" [scroll]="{ x:'1200px' }">
</st>
</nz-card>
<ng-template #editTemplate>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="合伙人名称">
深圳某某有限公司
</se>
<se [col]="1" label="返佣模板" required>
<nz-select ngModel="lucy" style="width: 100%;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
</nz-select>
</se>
</div>
</div>
<p class="text-center mt-md">说明:修改模板后,当月开始返佣收益将会按新模板计算</p>
</ng-template>
<ng-template #editCannel>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="140" [col]="1">
<se label="合伙人名称">
深圳某某有限公司
</se>
<se label="当前渠道销售">
张三/13999999999
</se>
<se label="渠道销售修改为" required>
<nz-select ngModel="lucy" style="width: 100%;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
</nz-select>
</se>
<se label="备注" required>
<textarea rows="3" nz-input></textarea>
</se>
<se label="一并转移的客户">
<p style="margin-top: 8px;">已选0</p>
<nz-table #rowSelectionTable [nzData]="customers" nzSize="small" nzBordered>
<thead>
<tr>
<th [nzChecked]="false"></th>
<th>客户名称</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of rowSelectionTable.data">
<td [nzChecked]="data.checked"></td>
<td>{{ data.name }}</td>
</tr>
</tbody>
</nz-table>
</se>
<se label="生效节点" required>
<nz-radio-group>
<label nz-radio nzValue="A">修改成功后立即生效</label>
<label nz-radio nzValue="B">CRM流程审核通过后生</label>
</nz-radio-group>
</se>
</div>
</div>
<p class="text-center mt-md">客户转移客户跟着上级合伙人转移一并到新渠道销售下会同步发起CRM《客户转移》流程不转移的客户会与上级合伙人解绑成为渠道销售的直客</p>
</ng-template>

View File

@ -0,0 +1,298 @@
import { Component, OnInit, 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';
@Component({
selector: 'app-partner-list',
templateUrl: './partner-list.component.html',
styleUrls: ['../../../../commom/less/box.less']
})
export class PartnerListComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
@ViewChild('editTemplate', { static: true })
editTemplate: any;
@ViewChild('editCannel', { static: true })
editCannel: any;
customers: any[] = [];
constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
let params = { ...this.sf.value };
if (params.createTime) {
params.createTime = { start: this.sf?.value?.createTime?.[0], end: this.sf?.value?.createTime?.[1] };
}
Object.assign(requestOptions.body, params);
}
return requestOptions;
};
auditPartner(item: any) {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: PartnerAuditModalComponent,
nzComponentParams: { info: item },
nzFooter: null
});
}
editTemplateAction(item: any) {
const modal = this.nzModalService.create({
nzTitle: '修改返佣模板',
nzContent: this.editTemplate,
nzOnOk: () => {
this.confirmEditTemplate();
return false;
}
});
}
confirmEditTemplate() {
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();
return false;
}
});
}
confirmEditCannel() {
const modal = this.nzModalService.confirm({
nzTitle: '确定提交吗?',
nzOnOk: () => {
this.nzModalService.closeAll();
}
});
}
routeTo(route: string) {
this.router.navigate([route]);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
paycode: {
type: 'string',
title: '合伙人名称'
},
paycode2: {
type: 'string',
title: '企业管理员'
},
paycod3e: {
type: 'string',
title: '手机号'
},
paycod31e: {
type: 'string',
title: '渠道销售',
ui: {
placeholder: '请输入姓名或者手机号',
visibleIf: {
expand: (value: boolean) => value
}
}
},
orderS2n: {
type: 'string',
title: '类型',
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
paytype: {
type: 'string',
title: '认证审核状态',
ui: {
widget: 'dict-select',
containsAllLabel: true,
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
paymode: {
type: 'string',
title: '签约状态',
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
paymo1de: {
type: 'string',
title: 'CRM状态',
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
paymo11de: {
type: 'string',
title: '注册渠道',
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
paymo11d1e: {
type: 'string',
title: '返佣模板',
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
paymo11d11e: {
type: 'string',
title: '合伙人状态',
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
createTime: {
title: '注册时间',
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
}
}
};
}
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: '操作',
fixed: 'right',
width: '140px',
buttons: [
{ type: 'divider' },
{
text: '详情<br>',
click: item => this.router.navigate(['/partner/partner-list/detail/' + item.id])
},
{
text: '修改返佣模板',
click: item => this.editTemplateAction(item)
},
{
text: '修改渠道销售',
click: item => this.editCannelAction(item)
},
{
text: '审核<br>',
click: item => this.auditPartner(item)
},
{
text: '重发CRM流程',
click: item => this.router.navigate(['/partner/account-management/list/detail/' + item.id])
}
]
}
];
}
}

View File

@ -0,0 +1,7 @@
<div>
<sf #sf [ui]="{ '*': { spanLabelFixed: 120, grid: { span: 24 }}}" [schema]="schema" [button]="'none'"></sf>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">取消</button>
<button nz-button type="button" nzType="primary" (click)="sure()" [disabled]="!sf.valid">保存</button>
</div>

View File

@ -0,0 +1,117 @@
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFSchema } from '@delon/form';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { PartnerListService } from '../../services/partner-list.service';
@Component({
selector: 'app-partner-audit-modal',
templateUrl: './partner-audit-modal.component.html',
styleUrls: ['./partner-audit-modal.component.less']
})
export class PartnerAuditModalComponent implements OnInit {
@ViewChild('sf', { static: false })
sf!: SFComponent;
@Input()
info: any;
schema!: SFSchema;
constructor(private nzModalService: NzModalService, public service: PartnerListService) {}
ngOnInit(): void {
this.initSF(this.info);
}
initSF(user: any) {
this.schema = {
properties: {
staffName: {
title: '合伙人名称',
type: 'string',
ui: { widget: 'text' },
default: user.name
},
status: {
title: '审核结果',
type: 'string',
maxLength: 11,
enum: [
{ value: true, label: '通过' },
{ value: false, label: '驳回' }
],
ui: { widget: 'radio' },
default: true
},
a: {
title: '渠道销售',
type: 'string',
enum: [
{ value: true, label: '通过' },
{ value: false, label: '驳回' }
],
ui: {
widget: 'select',
placeholder: '请选择'
},
default: ''
},
b: {
title: '备注',
type: 'string',
maxLength: 100,
ui: {
widget: 'textarea',
placeholder: '请不要超过100个字',
autosize: { minRows: 3 }
}
}
},
if: {
properties: { status: { enum: [true] } }
},
then: {
required: ['a']
},
else: {
required: ['b']
}
};
}
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);
// }
// });
// }
}
close() {
this.nzModalService.closeAll();
}
}

View File

@ -0,0 +1,342 @@
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content" [title]="'合伙人详情'" [ngClass]="{'affix': scrollTop>210}">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
<ng-template #content>
<nz-skeleton [nzLoading]="false">
<div class="user-info" nz-row>
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex">
<img [src]="detailData?.enterpriseLogo" />
<div style="flex: 1;">
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p style="margin-bottom: 0;">{{ detailData?.enterpriseName }}</p>
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<nz-badge nzStatus="success" nzText="正常" *ngIf="detailData?.stateLocked === 0">
</nz-badge>
<nz-badge nzStatus="error" nzText="冻结" *ngIf="detailData?.stateLocked === 1"></nz-badge>
</div>
</div>
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p>{{ detailData?.unifiedSocialCreditCode }}</p>
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
企业合伙人
</div>
</div>
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
注册时间:{{detailData?.createTime}}
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
所属城市:{{detailData?.createTime}}
</div>
</div>
</div>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
<ng-container *ngIf="isEdit;else editButton">
<button [disabled]="service.http.loading" nz-button (click)="reset()">
取消
</button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="save()">
保存
</button>
</ng-container>
<ng-template #editButton>
<ng-container *ngIf="detailData?.approvalStatus===10">
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
通过
</button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
驳回
</button>
</ng-container>
<ng-container *ngIf="detailData?.approvalStatus!=10">
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm
[nzPopconfirmTitle]="enable" (nzOnConfirm)="freezeOrResume(0)"
nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
启用
</button>
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm
[nzPopconfirmTitle]="frozen" (nzOnConfirm)="freezeOrResume(1)"
nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
冻结
</button>
</ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-save']">
修改
</button>
</ng-template>
</div>
</div>
</nz-skeleton>
</ng-template>
<ng-template #frozen>
<ng-container
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定冻结该企业吗?',content:'停用后,该企业将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作'}">
</ng-container>
</ng-template>
<ng-template #enable>
<ng-container
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定启用该企业吗?',content:'启用后,该企业将恢复正常使用功能,请再次确认'}">
</ng-container>
</ng-template>
<ng-template #Payenable>
<ng-container
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定关闭该企业支付权限吗?',content:'停用后,该企业将被限制使用支付功能,请谨慎操作'}">
</ng-container>
</ng-template>
<ng-template #Payfrozen>
<ng-container
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定开通该企业支付权限吗?',content:'启用后,该企业将恢复正常支付功能,请再次确认'}">
</ng-container>
</ng-template>
</page-header-wrapper>
<nz-card [class]="isEdit?'edit-box':'readOnly-box'">
<sv-container col="3">
<sv-title>企业管理员信息</sv-title>
<sv label="姓名">
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv>
<sv label="手机号">
{{detailData.adminUserInfo?.mobile}}
</sv>
<sv label="身份证号">
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv>
<sv label="身份证照" col="2">
<div class="d-flex">
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'certificateBackFront'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'certificateBack'}">
</ng-container>
</div>
</sv>
<sv label="身份证有效期" col="1">
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
</nz-date-picker>
-
<ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime">
<label style="padding-left: 11px;">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
</nz-date-picker>
<ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.operatingEndTime"
(ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label>
</ng-container>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>
<label class="mr-md">企业基本信息</label>
<label *ngIf="detailData?.approvalStatus===10" style="color: #1890ff;"><i nz-icon nzType="info-circle"
nzTheme="fill" class="mr-xs"></i>待审核
</label>
<label *ngIf="detailData?.approvalStatus===20" style="color: #52c41a;"><i nz-icon nzType="check-circle"
nzTheme="fill" class="mr-xs"></i>审核通过
</label>
<label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle"
nzTheme="fill" class="mr-xs"></i>驳回&nbsp;驳回原因:{{detailData?.approvalOpinion}}
</label>
<p style="margin-bottom: 0;">
四要素验证:
<label *ngIf="detailData?.esignCheckStatus===0" style="color: #ff4d4f;"><i nz-icon nzType="info-circle"
nzTheme="fill" class="mr-xs"></i>不通过&nbsp;&nbsp;驳回原因:{{detailData?.esignCheckMsg}}
</label>
<label *ngIf="detailData?.esignCheckStatus===1" style="color: #52c41a;"><i nz-icon nzType="check-circle"
nzTheme="fill" class="mr-xs"></i>通过
</label>
<label *ngIf="detailData?.esignCheckStatus===2" style="color: #1890ff;"><i nz-icon
nzType="close-circle" nzTheme="fill" class="mr-xs"></i>未认证
</label>
</p>
</sv-title>
<sv label="公司名称">
<input nz-input type="text" [(ngModel)]="detailData.enterpriseName" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv>
<sv label="统一社会信用代码">
<input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv>
<sv label="营业执照" col="2">
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'licensePhotoWatermark',key2:'licensePhoto',hover:'detailPhoto'}">
</ng-container>
</sv>
<sv label="营业期限" col="1">
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
</nz-date-picker>
-
<ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime">
<label style="padding-left: 11px;">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
</nz-date-picker>
<ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.operatingEndTime"
(ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label>
</ng-container>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>法人信息</sv-title>
<sv label="法定代表人">
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.name" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv>
<sv label="身份证号码">
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber"
[readonly]="!isEdit" [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv>
<sv label="身份证有效期" col="1">
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validStartTime" [nzDisabled]="!isEdit"
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;"
class="calendar"></nz-date-picker>
-
<ng-container
*ngIf="!isEdit && !detailData?.legalPersonIdentityVO?.validEndTime && detailData.legalPersonIdentityVO.validStartTime">
<label style="padding-left: 11px;">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validEndTime" [nzDisabled]="!isEdit"
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;"
class="calendar"></nz-date-picker>
<ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.legalPersonIdentityVO.validEndTime"
(ngModelChange)="$event?detailData.legalPersonIdentityVO.validEndTime='':''"
class="ml-sm">长期</label>
</ng-container>
</sv>
<sv label="身份证照" col="1">
<div class="d-flex">
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'legalFront'}">
</ng-container>
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'legalBack'}">
</ng-container>
</div>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>所属城市</sv-title>
<sv label="">
深圳、上海、北京
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>渠道销售信息</sv-title>
<sv label="姓名">
张学友
</sv>
<sv label="手机号">
13999999999
</sv>
<sv label="绑定时间">
2021-09-23 14:43:31
</sv>
</sv-container>
</nz-card>
<nz-card>
<sv-container col="3" class="mt16">
<sv-title>修改渠道销售记录</sv-title>
<sv label="">
<st #st [data]="service.$mock_url" [columns]="columns" [loading]="service.http.loading" bordered size="small"
[page]="{show:false}" [scroll]="{ x:'1200px' }">
</st>
</sv>
</sv-container>
</nz-card>
<ng-template #PopconfirmTempalte let-title="title" let-content="content">
<div class="ant-popover-message">
<i nz-icon nzType="info-circle" nzTheme="fill"></i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">{{title}}
</div>
<div class="ant-popover-message-title ng-star-inserted">
{{content}}
</div>
</div>
</ng-template>
<ng-template #approvedModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="公司名称">
{{ detailData?.enterpriseName }}
</se>
<se [col]="1" label="网络货运人" required>
<nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of ltdId"></nz-option>
</nz-select>
</se>
</div>
</div>
</ng-template>
<ng-template #redectModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="公司名称">
{{ detailData?.enterpriseName }}
</se>
<se [col]="1" label="备注" required>
<textarea nz-input rows="3" style="width: 325px;margin-left: 14px;"
[(ngModel)]="approvalOpinion"></textarea>
</se>
</div>
</div>
</ng-template>
<ng-template #uploadTemplate let-data="data" let-status="status" let-key="key" let-key2="key2" let-hover="hover">
<nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card"
[nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif"
[nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event,data,key,key2,hover)">
<ng-container *ngIf="!data[key] && isEdit">
<i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i>
<div class="ant-upload-text">上传</div>
</ng-container>
<div *ngIf="data[key]" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false"
(click)="$event.cancelBubble=true" class="image-hover">
<img [src]="data[key]" style="width: 200px;height: 160px;" (click)="service.showImg(data[key])" />
<div class="mask" *ngIf="detailData[hover] && isEdit"></div>
<div class="mask-over" *ngIf="detailData[hover] && isEdit">
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon"
(click)="deleteImg(data,key,key2)"></i>
<div style="display: flex;align-items: center;">
<i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="service.showImg(data[key])"></i>
</div>
</div>
</div>
</nz-upload>
</ng-template>

View File

@ -0,0 +1,30 @@
@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;
}
}

View File

@ -0,0 +1,337 @@
import { DatePipe } from '@angular/common';
import { Component, 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 { Subscription, fromEvent } from 'rxjs';
import { PartnerListService } from '../../services/partner-list.service';
import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component';
@Component({
selector: 'app-partner-detail',
templateUrl: './partner-detail.component.html',
styleUrls: ['./partner-detail.component.less'],
providers: [DatePipe]
})
export class PartnerDetailComponent implements OnInit {
columns: STColumn[] = this.initST();
@ViewChild('approvedModal', { static: false })
approvedModal!: any;
@ViewChild('redectModal', { static: false })
redectModal!: any;
detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } };
tempalateData = { ...this.detailData };
suppliersData: any = {};
isEdit = false;
uploadURl = apiConf.waterFileUpload;
disabledUpload = false;
enterpriseAddressCode: any = [];
ltdId: any = [];
approvalOpinion = '';
networkTransporter = null;
esignCheckStatus: any = {
0: '不通过',
1: '通过',
2: '未认证'
};
scrollTop = 0;
subscribeScoll!: Subscription;
constructor(
public service: PartnerListService,
private route: ActivatedRoute,
private nzModalService: NzModalService,
private datePipe: DatePipe
) {}
ngOnDestroy(): void {
this.subscribeScoll.unsubscribe();
}
ngOnInit() {
this.initData();
this.loadltdId();
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
this.scrollTop = document.documentElement.scrollTop;
});
}
loadltdId() {
// this.service.getNetworkFreightForwarder().subscribe(res => {
// if (res) {
// this.ltdId = res;
// }
// });
}
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)
// ];
// }
// });
}
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() {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: PartnerAuditModalComponent,
nzComponentParams: { info: this.detailData },
nzFooter: null
});
}
ratify() {
this.isEdit = true;
}
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', 1);
}
if (id === 'certificateBackFront' || id === 'certificateBack') {
this.checkIdCard(file.response.data?.fullFilePath, id === 'certificateBackFront' ? 'front' : 'back', 0);
}
if (id === 'detailPhoto') {
this.checkBusinessLicense(file.response.data?.fullFilePath);
}
}
}
/**
* 级联获取地区数据
* @param node 节点
* @param index 层级
* @returns
*/
loadRegionData = (node: any, index: number) => {
return new Promise(resolve => {
this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.regionCode || '' }).subscribe(
res => {
node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1, value: item.regionCode, label: item.name }));
},
_ => {},
() => {
resolve(node);
}
);
});
};
reset() {
this.detailData = { ...this.tempalateData };
this.isEdit = false;
}
save() {
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')
});
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,
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
});
// this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
// if (res) {
// this.service.msgSrv.success('企业修改成功');
// this.initData();
// this.isEdit = false;
// }
// });
}
// 识别身份证 参数isFrontfront-正面、back-背面type0-申请人身份证1-法定代表人身份证
checkIdCard(imgurl: any, isFront: string, type: number) {
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.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;
// }
// }
// }
// }
// });
}
// 识别营业执照
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;
// }
// }
// });
}
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: '操作',
fixed: 'right',
width: '140px',
buttons: [
{
text: '详情'
}
]
}
];
}
}

View File

@ -0,0 +1,26 @@
import { Injectable, Injector } from '@angular/core';
import { BaseService, EACacheService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
@Injectable()
export class PartnerListService extends BaseService {
$mock_url = '/rule?_allow_anonymous=true';
// 根据地区code查询列表
$api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode';
// 根据地区code查询地区详情
$api_get_region_detail_by_code = '/api/mdc/pbc/region/getRegionDetailByCode';
constructor(public injector: Injector, private nzModalService: NzModalService) {
super(injector);
}
showImg(url: any) {
const params = {
imgList: [url],
index: 0
};
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
}
}

View File

@ -27,6 +27,8 @@ import { PartnerAccountManagementAccountDetailComponent } from './account-manage
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component';
import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component';
import { PartnerListComponent } from './partner-list/components/index/partner-list.component';
import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component';
const routes: Routes = [
{
@ -38,7 +40,7 @@ const routes: Routes = [
{ path: 'partner/custom-detail/:id', component: PartnerPartnerCustomDetailComponent },
{ path: 'partner/custom-order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent },
{ path: 'sale/custom-detail/:id', component: PartnerSaleCustomDetailComponent },
{ path: 'sale/partner-detail/:id', component: PartnerSalePartnerDetailComponent },
{ path: 'sale/partner-detail/:id', component: PartnerSalePartnerDetailComponent }
]
},
{
@ -46,7 +48,7 @@ const routes: Routes = [
children: [
{ path: '', component: ParterChannelSalesListComponent },
{ path: 'list', component: ParterChannelSalesListComponent },
{ path: 'edit', component: ParterChannelSalesEditComponent },
{ path: 'edit', component: ParterChannelSalesEditComponent }
]
},
{
@ -54,14 +56,14 @@ const routes: Routes = [
children: [
{ path: '', component: ParterLevelConfigListComponent },
{ path: 'list', component: ParterLevelConfigListComponent },
{ path: 'edit', component: ParterLevelConfigEditComponent },
{ path: 'edit', component: ParterLevelConfigEditComponent }
]
},
{
path: 'rebate',
children: [
{ path: 'particulars', component: ParterRebateManageMentParticularsComponent },
{ path: 'record', component: ParterRebateManageMentRecordComponent },
{ path: 'record', component: ParterRebateManageMentRecordComponent }
]
},
{
@ -71,12 +73,19 @@ const routes: Routes = [
{ path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent },
{ path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent },
{ path: 'withdraw-record', component: PartnerAccountManagementWithdrawalsRecordComponent },
{ path: 'withdraw-record/:id', component: PartnerAccountManagementWithdrawalsDetailComponent },
{ path: 'withdraw-record/:id', component: PartnerAccountManagementWithdrawalsDetailComponent }
]
},
{
path: 'partner-list',
children: [
{ path: '', component: PartnerListComponent },
{ path: 'detail/:id', component: PartnerDetailComponent }
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class PartnerRoutingModule { }
export class PartnerRoutingModule {}

View File

@ -32,6 +32,10 @@ import { PartnerAccountManagementAccountDetailComponent } from './account-manage
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component';
import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component';
import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component';
import { PartnerListComponent } from './partner-list/components/index/partner-list.component';
import { PartnerAuditModalComponent } from './partner-list/components/partner-audit-modal/partner-audit-modal.component';
import { PartnerListService } from './partner-list/services/partner-list.service';
const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent,
@ -54,11 +58,14 @@ const COMPONENTS: any[] = [
PartnerAccountManagementAccountDetailComponent,
PartnerAccountManagementRecordedDetailComponent,
PartnerAccountManagementWithdrawalsRecordComponent,
PartnerAccountManagementWithdrawalsDetailComponent
PartnerAccountManagementWithdrawalsDetailComponent,
PartnerListComponent,
PartnerDetailComponent
];
@NgModule({
declarations: [...COMPONENTS],
imports: [CommonModule, PartnerRoutingModule, SharedModule]
declarations: [...COMPONENTS, PartnerAuditModalComponent],
imports: [CommonModule, PartnerRoutingModule, SharedModule],
providers: [PartnerListService]
})
export class PartnerModule { }
export class PartnerModule {}

View File

@ -508,7 +508,12 @@
{
"text": "合伙人管理",
"icon": "anticon anticon-dashboard",
"children": [{
"children": [
{
"text": "合伙人列表",
"link": "/partner/partner-list"
},
{
"text": "业务统计",
"link": "/partner/business-statistics/index"
},