edit
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { SFComponent, SFSchema, SFValue } from '@delon/form';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { PartnerListService } from '../../services/partner-list.service';
|
||||
|
||||
@ -23,6 +23,13 @@ export class PartnerAuditModalComponent implements OnInit {
|
||||
initSF(user: any) {
|
||||
this.schema = {
|
||||
properties: {
|
||||
isPass: {
|
||||
type: 'boolean',
|
||||
ui: {
|
||||
hidden: true
|
||||
},
|
||||
default: this.info.isPass
|
||||
},
|
||||
staffName: {
|
||||
title: '合伙人名称',
|
||||
type: 'string',
|
||||
@ -37,7 +44,10 @@ export class PartnerAuditModalComponent implements OnInit {
|
||||
{ value: true, label: '通过' },
|
||||
{ value: false, label: '驳回' }
|
||||
],
|
||||
ui: { widget: 'radio' },
|
||||
ui: {
|
||||
widget: 'radio',
|
||||
hidden: this.info.isPass !== undefined
|
||||
},
|
||||
default: true
|
||||
},
|
||||
a: {
|
||||
@ -49,7 +59,14 @@ export class PartnerAuditModalComponent implements OnInit {
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
placeholder: '请选择',
|
||||
hidden: this.info.isPass === false,
|
||||
visibleIf: {
|
||||
status: value => value
|
||||
},
|
||||
errors: {
|
||||
required: ' '
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
@ -60,19 +77,18 @@ export class PartnerAuditModalComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
placeholder: '请不要超过100个字',
|
||||
autosize: { minRows: 3 }
|
||||
autosize: { minRows: 3 },
|
||||
hidden: this.info.isPass === true,
|
||||
visibleIf: {
|
||||
status: value => !value || this.info.isPass === false
|
||||
},
|
||||
errors: {
|
||||
required: ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
if: {
|
||||
properties: { status: { enum: [true] } }
|
||||
},
|
||||
then: {
|
||||
required: ['a']
|
||||
},
|
||||
else: {
|
||||
required: ['b']
|
||||
}
|
||||
required: ['a', 'b']
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -49,13 +49,11 @@
|
||||
</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']">
|
||||
<ng-container>
|
||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(true)">
|
||||
通过
|
||||
</button>
|
||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner()" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
|
||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(false)">
|
||||
驳回
|
||||
</button>
|
||||
</ng-container>
|
||||
@ -73,8 +71,7 @@
|
||||
冻结
|
||||
</button>
|
||||
</ng-container>
|
||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-save']">
|
||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()">
|
||||
修改
|
||||
</button>
|
||||
</ng-template>
|
||||
@ -113,7 +110,8 @@
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="手机号">
|
||||
{{detailData.adminUserInfo?.mobile}}
|
||||
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.mobile" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="身份证号">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
|
||||
@ -206,7 +204,7 @@
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title>法人信息</sv-title>
|
||||
<sv-title>企业法人信息</sv-title>
|
||||
<sv label="法定代表人">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.name" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
@ -232,7 +230,6 @@
|
||||
(ngModelChange)="$event?detailData.legalPersonIdentityVO.validEndTime='':''"
|
||||
class="ml-sm">长期</label>
|
||||
</ng-container>
|
||||
|
||||
</sv>
|
||||
<sv label="身份证照" col="1">
|
||||
<div class="d-flex">
|
||||
@ -244,15 +241,19 @@
|
||||
</ng-container>
|
||||
</div>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title>所属城市</sv-title>
|
||||
<sv label="">
|
||||
深圳、上海、北京
|
||||
<sv label="所属城市">
|
||||
<ng-container *ngIf="isEdit; else cascaderelseTemplate">
|
||||
<nz-cascader [(ngModel)]="enterpriseAddressCode" [nzLoadData]="loadRegionData">
|
||||
</nz-cascader>
|
||||
</ng-container>
|
||||
<ng-template #cascaderelseTemplate>
|
||||
{{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{
|
||||
detailData?.fullRegionVO?.areaName }}
|
||||
</ng-template>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title>渠道销售信息</sv-title>
|
||||
<sv label="姓名">
|
||||
@ -271,8 +272,8 @@
|
||||
<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 #st [data]="service.$mock_url" [columns]="columns.logsColumn" [loading]="service.http.loading" bordered
|
||||
size="small" [page]="{show:false}" [scroll]="{ x:'1200px' }">
|
||||
</st>
|
||||
</sv>
|
||||
</sv-container>
|
||||
@ -289,35 +290,6 @@
|
||||
</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"
|
||||
@ -340,3 +312,17 @@
|
||||
</div>
|
||||
</nz-upload>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #logModal>
|
||||
<h2>转移客户数:10</h2>
|
||||
<st #st [data]="service.$mock_url" [columns]="columns.changeColumn" [loading]="service.http.loading" bordered
|
||||
size="small" [page]="{show:false}" [scroll]="{ x:'750px' }">
|
||||
</st>
|
||||
<h2>不转移客户数:10</h2>
|
||||
<st #st [data]="service.$mock_url" [columns]="columns.beChangeColumn" [loading]="service.http.loading" bordered
|
||||
size="small" [page]="{show:false}" [scroll]="{ x:'750px' }">
|
||||
</st>
|
||||
<p>
|
||||
客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,修改成功后,修改时间也是合伙人与客户的结算结束时间,成为原来渠道销售的直客。
|
||||
</p>
|
||||
</ng-template>
|
||||
@ -15,16 +15,13 @@ import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit
|
||||
providers: [DatePipe]
|
||||
})
|
||||
export class PartnerDetailComponent implements OnInit {
|
||||
columns: STColumn[] = this.initST();
|
||||
@ViewChild('logModal')
|
||||
logModal: any;
|
||||
|
||||
@ViewChild('approvedModal', { static: false })
|
||||
approvedModal!: any;
|
||||
@ViewChild('redectModal', { static: false })
|
||||
redectModal!: any;
|
||||
columns: { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST();
|
||||
|
||||
detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } };
|
||||
tempalateData = { ...this.detailData };
|
||||
suppliersData: any = {};
|
||||
|
||||
isEdit = false;
|
||||
|
||||
@ -33,9 +30,6 @@ export class PartnerDetailComponent implements OnInit {
|
||||
enterpriseAddressCode: any = [];
|
||||
ltdId: any = [];
|
||||
|
||||
approvalOpinion = '';
|
||||
networkTransporter = null;
|
||||
|
||||
esignCheckStatus: any = {
|
||||
0: '不通过',
|
||||
1: '通过',
|
||||
@ -113,11 +107,21 @@ export class PartnerDetailComponent implements OnInit {
|
||||
// });
|
||||
}
|
||||
|
||||
auditPartner() {
|
||||
auditPartner(isPass: boolean) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '审核',
|
||||
nzContent: PartnerAuditModalComponent,
|
||||
nzComponentParams: { info: this.detailData },
|
||||
nzComponentParams: { info: { ...this.detailData, isPass } },
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
|
||||
showChangeDetail() {
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '详情',
|
||||
nzContent: this.logModal,
|
||||
nzNoAnimation: true,
|
||||
nzWidth: 700,
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
@ -313,25 +317,41 @@ export class PartnerDetailComponent 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: '操作',
|
||||
fixed: 'right',
|
||||
width: '140px',
|
||||
buttons: [
|
||||
{
|
||||
text: '详情'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
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: '操作',
|
||||
fixed: 'right',
|
||||
width: '140px',
|
||||
buttons: [
|
||||
{
|
||||
text: '详情',
|
||||
click: () => this.showChangeDetail()
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
changeColumn: [
|
||||
{ title: '客户名称', index: 'payCode', width: 180 },
|
||||
{ title: '合伙人', index: 'ltdName', width: 160 },
|
||||
{ title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 },
|
||||
{ title: 'CRM审核状态', index: 'payDate', width: 150 },
|
||||
{ title: '生效时间', index: 'payDate', className: 'text-center', width: 130 }
|
||||
],
|
||||
beChangeColumn: [
|
||||
{ title: '客户名称', index: 'payCode', width: 180 },
|
||||
{ title: '合伙人', index: 'ltdName', width: 160 },
|
||||
{ title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 },
|
||||
{ title: '生效时间', index: 'payDate', className: 'text-center', width: 130 }
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,7 +278,6 @@
|
||||
<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">
|
||||
|
||||
Reference in New Issue
Block a user