merge partner

This commit is contained in:
Taric Xin
2022-03-23 14:24:21 +08:00
226 changed files with 15751 additions and 993 deletions

View File

@ -8,7 +8,7 @@
<ng-template #content>
<div class="user-info" nz-row>
<div nz-col nzSpan="24" class="d-flex">
<img [src]="detailData?.enterpriseLogo" />
<img [src]="detailData?.enterpriseLogo" style="width: 120px;" />
<div style="flex: 1;">
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
@ -266,4 +266,4 @@
</div>
</div>
</nz-upload>
</ng-template>
</ng-template>

View File

@ -292,7 +292,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">

View File

@ -0,0 +1,9 @@
<sf #sf [schema]="schema" [ui]="ui" [button]="'none'" [formData]="detailData"></sf>
<div class="info">
1.如果修改前后的合伙人不是在同一个渠道销售下修改后客户的渠道销售会随着修改后的合伙人绑定到新的渠道销售下系统也会同步发起CRM《客户转移》流程<br>
2.结算起算日:指给合伙人结算佣金的起算时间,如果是修改合伙人,该日期是当前合伙人的结算起算日,同时也是上一个合伙人的结算结束时间。
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="save()" [disabled]="!sf?.valid">确定</button>
</div>

View File

@ -0,0 +1,7 @@
.info{
width: 80%;
margin:0 auto;
color: #333;
font-size: 12px;
line-height: 24px;;
}

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EditPartnerComponentsAddComponent } from './editPartner.component';
describe('EditPartnerComponentsAddComponent', () => {
let component: EditPartnerComponentsAddComponent;
let fixture: ComponentFixture<EditPartnerComponentsAddComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EditPartnerComponentsAddComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EditPartnerComponentsAddComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,122 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { apiConf } from '@conf/api.conf';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-ad-components-partner',
templateUrl: './editPartner.component.html',
styleUrls: ['./editPartner.component.less']
})
export class EditPartnerComponentsAddComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
schema: SFSchema = {};
detailData: any = {}
ui: SFUISchema = {};
constructor(
public msgSrv: NzMessageService,
public http: _HttpClient,
private route: ActivatedRoute,
private router: Router,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private modal: NzModalRef,
) { }
ngOnInit(): void {
this.initDetailData()
this.initSF();
}
initDetailData() {
const params = {
id: this.i.id
}
this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => {
if(res) {
this.detailData = res
} else {
this.service.msgSrv.error(res.msg)
}
})
}
initSF() {
this.schema = {
properties: {
channelId: {
type: 'string',
title: '合伙人修改为',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '全部可见', value: 1 },
{ label: '合伙人可见', value: 2 },
{ label: '销售渠道可见', value: 3 },
],
},
remark: {
type: 'string',
title: '备注',
ui: {
widget: 'textarea',
placeholder: '请不要超过50个字',
maxLength: 50,
autosize: { minRows: 2, maxRows: 6 },
},
},
effectiveNode: {
type: 'string',
title: '生效节点',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核通过后生效', value: 2 }
],
},
},
required: ['channelId', 'remark', 'effectiveNode'],
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
}
};
}
get reqParams() {
return {};
}
close(): void {
this.modal.close(true)
}
save() {
const params = {
...this.sf.value
}
this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => {
if(res) {
this.service.msgSrv.success('修改成功')
} else {
this.service.msgSrv.error(res.msg)
}
})
}
}

View File

@ -0,0 +1,8 @@
<sf #sf [schema]="schema" [ui]="ui" [button]="'none'" [formData]="detailData"></sf>
<div class="info">
修改渠道销售客户修改渠道销售后会跟原合伙人解绑成为新渠道销售的直客。同时系统会同步发起CRM《客户转移》流程。
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="save()" [disabled]="!sf?.valid">确定</button>
</div>

View File

@ -0,0 +1,7 @@
.info{
width: 80%;
margin:0 auto;
color: #333;
font-size: 12px;
line-height: 24px;;
}

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EditSaleComponentsAddComponent } from './editSale.component';
describe('EditSaleComponentsAddComponent', () => {
let component: EditSaleComponentsAddComponent;
let fixture: ComponentFixture<EditSaleComponentsAddComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EditSaleComponentsAddComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EditSaleComponentsAddComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,130 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { apiConf } from '@conf/api.conf';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-ad-components-Sale',
templateUrl: './editSale.component.html',
styleUrls: ['./editSale.component.less']
})
export class EditSaleComponentsAddComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
schema: SFSchema = {};
detailData: any = {}
ui: SFUISchema = {};
constructor(
public msgSrv: NzMessageService,
public http: _HttpClient,
private route: ActivatedRoute,
private router: Router,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private modal: NzModalRef,
) { }
ngOnInit(): void {
this.initDetailData()
this.initSF();
}
initDetailData() {
const params = {
id: this.i.id
}
this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => {
if(res) {
this.detailData = res
} else {
this.service.msgSrv.error(res.msg)
}
})
}
initSF() {
this.schema = {
properties: {
channelId: {
type: 'string',
title: '渠道销售修改为',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '全部可见', value: 1 },
{ label: '合伙人可见', value: 2 },
{ label: '销售渠道可见', value: 3 },
],
},
remark: {
type: 'string',
title: '备注',
ui: {
widget: 'textarea',
placeholder: '请不要超过50个字',
maxLength: 50,
autosize: { minRows: 2, maxRows: 6 },
},
},
effectiveNode: {
type: 'string',
title: '生效节点',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核通过后生效', value: 2 }
],
},
},
required: ['channelId', 'remark', 'effectiveNode'],
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
}
};
}
get reqParams() {
return {};
}
save() {
this.service.nzModalService.create({
nzTitle: '确定提交吗?',
nzClosable: false,
nzOnOk: () => {
const params = {
...this.sf.value
}
this.service.request(this.service.$api_batchUpdateEnterpriceChannel, params).subscribe(res => {
if(res) {
this.service.msgSrv.success('修改成功')
} else {
this.service.msgSrv.error(res.msg)
}
})
}
});
}
close(): void {
this.modal.close(true)
}
}

View File

@ -0,0 +1,19 @@
:host{
::ng-deep{
.btnBox {
st-td{
// display: flex;
// align-items: center;
st-td>span{
display: inline-block;
width: 95px;
text-align: center;
margin: 0 10px;
}
}
.st__btn-text span{
white-space: nowrap;
}
}
}
}

View File

@ -6,6 +6,9 @@ import { DynamicSettingModalComponent, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
import { UsermanageService } from '../../../services/usercenter.service';
import { EditPartnerComponentsAddComponent } from './editPartner/editPartner.component';
import { EditSaleComponentsAddComponent } from './editSale/editSale.component';
import { ShowServiceComponent } from './showService/showservice.component';
@Component({
selector: 'app-Freight-components-list',
templateUrl: './list.component.html',
@ -90,7 +93,54 @@ export class FreightComponentsListComponent implements OnInit {
nzFooter: null
});
}
showService(record: any) {
const modalRef = this.modal.create({
nzTitle: '分配客服人员',
nzContent: ShowServiceComponent,
nzWidth: 600,
nzComponentParams: {
i: record
},
nzFooter: null
});
modalRef.afterClose.subscribe((res: any) => {
if (res) {
this.st.load(1);
}
});
}
editPartner(record: any) {
const modalRef = this.modal.create({
nzTitle: '修改合伙人',
nzContent: EditPartnerComponentsAddComponent,
nzWidth: 800,
nzComponentParams: {
i: record
},
nzFooter: null
});
modalRef.afterClose.subscribe((res: any) => {
if (res) {
this.st.load(1);
}
});
}
editSale(record: any) {
const modalRef = this.modal.create({
nzTitle: '修改渠道销售',
nzContent: EditSaleComponentsAddComponent,
nzWidth: 800,
nzComponentParams: {
i: record
},
nzFooter: null
});
modalRef.afterClose.subscribe((res: any) => {
if (res) {
this.st.load(1);
}
});
}
initSF() {
this.schema = {
properties: {
@ -117,6 +167,152 @@ export class FreightComponentsListComponent implements OnInit {
}
},
enterpriseType: {
type: 'string',
title: '企业类型',
enum: [
{ label: '全部', value: '' },
{ label: '物流企业', value: 0 }
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
},
lockedStatus8: {
type: 'string',
title: '公司所在地',
enum: [
{ label: '全部', value: '' },
{ label: '物流企业', value: 0 }
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
},
oftenUsedServices: {
type: 'string',
title: '常用服务',
enum: [
{ label: '全部', value: '' },
{ label: '整车服务', value: 0 },
{ label: '大宗服务', value: 1 }
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
},
customerType: {
type: 'string',
title: '客户类型',
enum: [
{ label: '全部', value: '' },
{ label: '直客', value: 1 },
{ label: '渠道客户', value: 20 }
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
},
contactName5: {
title: '渠道销售',
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
partnerName: {
title: '合伙人',
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
contactName3: {
title: '客服人员',
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
contactName2: {
title: '审核人',
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
applyDate: {
type: 'string',
title: '申请时间',
ui: {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema,
},
applyDate1: {
type: 'string',
title: '审核时间',
ui: {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema,
},
lockedStatus3: {
type: 'string',
title: '企业状态',
enum: [
{ label: '全部', value: '' },
{ label: '正常', value: 0 },
{ label: '冻结', value: 1 }
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
},
networkTransporter: {
type: 'string',
title: '企业类型',
enum: [
@ -141,22 +337,9 @@ export class FreightComponentsListComponent implements OnInit {
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
},
oftenUsedServices: {
type: 'string',
title: '常用服务',
enum: [
{ label: '全部', value: '' },
{ label: '整车发货', value: 10 },
{ label: '大宗发货', value: 20 }
],
default: '',
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
@ -274,13 +457,13 @@ export class FreightComponentsListComponent implements OnInit {
}
}
},
isExpired: {
source2: {
type: 'string',
title: '证件是否过期',
enum: [
{ label: '全部', value: '' },
{ label: '是', value: true },
{ label: '否', value: false }
{ label: '是', value: 1 },
{ label: '否', value: 2 }
],
default: '',
ui: {
@ -376,9 +559,8 @@ export class FreightComponentsListComponent implements OnInit {
},
{
title: '操作',
width: '110px',
className: 'text-center block-td',
fixed: 'right',
width: '250px',
className: 'text-center btnBox',
buttons: [
{
text: '查看',
@ -397,6 +579,18 @@ export class FreightComponentsListComponent implements OnInit {
acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] },
text: '资金账户',
click: item => this.showAccountDetail(item)
},
{
text: '分配客服人员',
click: item => this.showService(item)
},
{
text: '修改合伙人',
click: item => this.editPartner(item)
},
{
text: '修改渠道销售',
click: item => this.editSale(item)
}
]
}

View File

@ -0,0 +1,16 @@
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
<div class="serviceBox">
<div class="left">客服人员</div>
<div class="right">
<nz-select ngModel="lucy" style="width: 250px;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
<nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
</nz-select>
</div>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="submitForm()" [disabled]="!sf?.valid">确定</button>
</div>

View File

@ -0,0 +1,129 @@
.sfBox {
position: relative;
.example {
position: absolute;
top: 215px;
right: 265px;
color: #1890ff;
cursor: pointer;
.popBox {
position: absolute;
top: -170px;
left: -125px;
width: 300px;
padding: 20px;
text-align: center;
background: #fff;
border: solid 1px #eee;
border-radius: 6px;
box-shadow: 0 1px 5px 1px #ececec;
&::before {
position: absolute;
bottom: -5px;
left: 50%;
width: 10px;
height: 10px;
margin-left: -5px;
background: #fff;
box-shadow: 0 1px 5px 1px #ececec;
transform: rotate(45deg);
content: '';
}
&::after {
position: absolute;
bottom: 0;
left: 0;
z-index: 10;
width: 100%;
height: 10px;
background: #fff;
content: '';
}
img {
max-width: 100%;
max-height: 200px;
}
}
}
.positionSet{
top: 356px;
right: 235px;
}
.positionSet01{
top: 500px;
right: 200px;
}
.positionSet02{
top: 664px;
right: 265px;
}
.positionSet03{
top: 808px;
right: 205px;
}
}
.exaA{
position: absolute;
top: 0;
left: 300px
}
.pr {
position: relative;
}
.pa {
position: absolute;
top: 35px;
left: 150px;
}
.tips {
display: flex;
margin-bottom: 0;
color: #333;
dt {
width: 150px;
}
dd {
width: 190px;
margin-bottom: 0;
text-align: center;
}
}
.drivercard{
position: absolute;
top: 0;
left: 330px;
border: solid 1px #ebf0fb;
}
.jopcard{
position: absolute;
top: 1356px;
left: 330px;
border: solid 1px #ebf0fb;
}
.agreement{
position: absolute;
top: 425px;
left: 330px;
border: solid 1px #ebf0fb;
}
:host{
::ng-deep {
.ant-input-borderless{
padding: 0;
padding-top: 4px;
color: black;
resize:none;
}
}
}
.serviceBox{
display: flex;
align-items: center;
justify-content: space-between;
width: 350px;
}

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { CarCarauthComponent } from './carauth.component';
describe('CarCarauthComponent', () => {
let component: CarCarauthComponent;
let fixture: ComponentFixture<CarCarauthComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ CarCarauthComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CarCarauthComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,61 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf';
import { cacheConf } from '@conf/cache.conf';
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EACacheService, EAEnvironmentService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
@Component({
selector: 'app-car-showService',
templateUrl: './showService.component.html',
styleUrls: ['./showService.component.less']
})
export class ShowServiceComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
constructor(
private modal: NzModalRef,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private eaCacheSrv: EACacheService,
) { }
ngOnInit(): void {
}
close(): void {
this.modal.close(true)
}
submitForm(){
// const params:any = {
// appUserId: this.i.appUserId,
// ...this.sf.value,
// bindType: this.i.bindType
// };
// params.carFrontPhoto = this.detailData.carFrontPhoto
// params.carProtocal = this.detailData.carProtocal
// params.certificatePhotoFront = this.detailData.certificatePhotoFront
// params.certificatePhotoBack = this.detailData.certificatePhotoBack
// params.roadTransportPhoto = this.detailData.roadTransportPhoto
// delete params.titleA
// delete params.titleB
// this.checked = true
// this.service.request(this.service.$api_updateAssistCertification, params).subscribe(res => {
// this.checked = false
// if(res){
// this.service.msgSrv.success('添加成功')
// this.modal.close(true)
// }
// })
}
}