Commit aa323631 by sunchao

电子报聘邀请人流程

parent cdb395c0
export class EmployQuery {
constructor(
public name?:string,
public loginId?:any,
public hiringBasicInfoId?:number,
public practitionerPotentialId?:number,
public mdDropOptionId?:number,
public mdDropOptionName?:string,
public mentorPractitionerId?:number,
public mentor?:string,
public introducerPractitionerId?:number,
public introducer?:string,
public subsystemId?:number,
public subsystem?:string,
public subsystemOwnerId?:number,
public subsystemOwner?:string,
public branchId?:number,
public branch?:string,
) {
}
}
\ No newline at end of file
<div class="invitation_wrapper">
<img src="assets/images/banner.jpg" alt="邀请" />
<div class="invitation_content">
<p *ngIf="type=='inviter'">您将邀请{{invitatorName}}</p>
<p *ngIf="type=='invitees'">{{invitatorName}}邀请您</p>
<p>加入银盾保险经纪</p>
</div>
<footer *ngIf="type=='inviter'" (click)="sandInvitation()">
发出邀请
</footer>
<footer *ngIf="type=='invitees'" (click)="register()">
点击注册
</footer>
</div>
.invitation_wrapper{
padding: 10px 15px;
width: 100%;
min-height: 100%;
position: relative;
img{
width: 100%;
}
.invitation_content{
font-size: 21px;
text-align: center;
color: #333;
font-weight: bold;
}
.footer{
width: 100%;
margin-top: 15px;
background: #C81B1E;
color: #fff;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
height: 40px;
line-height: 40px;
text-align: center;
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { InvitationComponent } from './invitation.component';
describe('InvitationComponent', () => {
let component: InvitationComponent;
let fixture: ComponentFixture<InvitationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ InvitationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(InvitationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute,Router } from "@angular/router";
import { MyService } from '../../my.service';
import { LifeCommonService } from "../../../common/life-common.service";
import { environment } from '../../../../environments/environment';
@Component({
selector: 'ydlife-invitation',
templateUrl: './invitation.component.html',
styleUrls: ['./invitation.component.scss']
})
export class InvitationComponent implements OnInit {
//判断邀请人/被邀请人
type: string;
invitatorName:string;
lifeCustomerInfo: any;
deviceType:any;
constructor(private myService: MyService,
private activatedRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService,
private router: Router) { }
ngOnInit() {
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
this.type = this.activatedRoute.snapshot.data[0]['type'];
console.log(this.type)
this.invitatorName = this.activatedRoute.snapshot.queryParams.name?this.activatedRoute.snapshot.queryParams.name:null;
this.deviceType = this.lifeCommonService.checkDeviceType();
}
//分享邀请
sandInvitation() {
if(this.deviceType == 3){
const imgUrl = this.lifeCustomerInfo.practitionerBasicInfo.headImagePath ? this.lifeCustomerInfo.practitionerBasicInfo.headImagePath : `${environment.ORIGINNAME}/ydLife/assets/images/icons/meng.png`;
this.lifeCommonService.shareStatusPublish(1);
this.lifeCommonService.wxShare(
`${this.lifeCustomerInfo.practitionerBasicInfo.name}`,
'您的好友向你发出了邀请。加入靠谱的团队、一起做靠谱的事。',
`https://${window.location.host}/ydLife/invitees?practitionerId=${this.lifeCustomerInfo.practitionerId}`,
imgUrl);
}else{
alert('请在手机微信端发送邀请');
}
}
register(){
this.router.navigate(['/register']);
}
}
<div class="register_wrapper">
<img src="assets/images/register_logo.png" alt="" />
<input type="tel" >
<footer>注册</footer>
</div>
.register_wrapper{
margin: 0 auto;
text-align: center;
img{
width: 20%;
margin-top: 20%;
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RegisterComponent } from './register.component';
describe('RegisterComponent', () => {
let component: RegisterComponent;
let fixture: ComponentFixture<RegisterComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ RegisterComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RegisterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from "@angular/core";
@Component({
selector: "ydlife-register",
templateUrl: "./register.component.html",
styleUrls: ["./register.component.scss"],
})
export class RegisterComponent implements OnInit {
constructor() {}
ngOnInit() {}
scrollTo() {
window.scrollTo(0, 0);
}
}
......@@ -27,8 +27,9 @@ import { OrderDetailComponent } from './order-detail/order-detail.component';
import { SalaryComponent } from './salary/salary.component';
import { TodoListComponent } from './todo-list/todo-list.component';
import { AddTaskComponent } from './add-task/add-task.component';
import { MedicalServiceComponent} from './medical-service/medical-service.component';
import { MedicalServiceComponent } from './medical-service/medical-service.component';
import { InvitationComponent } from './application-process/invitation/invitation.component';
import { RegisterComponent } from './application-process/register/register.component';
const myRoutes: Routes = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
......@@ -61,7 +62,10 @@ const myRoutes: Routes = [
{ path: 'salary', component: SalaryComponent, canActivate: [AuthGuard] },
{ path: 'todo', component: TodoListComponent, canActivate: [AuthGuard] },
{ path: 'addtask',component:AddTaskComponent,canActivate:[AuthGuard]},
{ path:'medical_service',component:MedicalServiceComponent,canActivate:[AuthGuard]}
{ path: 'medical_service',component:MedicalServiceComponent,canActivate:[AuthGuard]},
{ path: 'inviter' ,component:InvitationComponent,canActivate:[AuthGuard],data:[{type:'inviter'}]},
{ path: 'invitees' ,component:InvitationComponent,data:[{type:'invitees'}]},
{ path: 'register' ,component:RegisterComponent}
];
@NgModule({
......
......@@ -36,9 +36,11 @@ import { AddTaskComponent } from './add-task/add-task.component';
import { NgZorroAntdMobileModule, ModalServiceComponent, ToastComponent } from 'ng-zorro-antd-mobile';
import {NgxEchartsModule} from 'ngx-echarts';
import { MedicalServiceComponent } from './medical-service/medical-service.component'
import { MedicalServiceComponent } from './medical-service/medical-service.component';
import { InvitationComponent } from './application-process/invitation/invitation.component';
import { RegisterComponent } from './application-process/register/register.component'
@NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent],
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent],
imports: [
CommonModule,
LifeCommonModule,
......
......@@ -373,4 +373,30 @@ export class MyService {
return this.http
.post(url, JSON.stringify(param));
}
//经纪人级别查询
practitionerTypeAndLevelQuery(param){
const url = this.API + '/metadata/practitionerTypeAndLevelQuery';
return this.http
.post(url, JSON.stringify(param));
}
// 经纪人列表查询
practitionerListQuery(typeId?: number) {
const url = this.API + "/erp/practitionerListQuery";
return this.http
.post(url, JSON.stringify({typeId:typeId}));
}
//经纪人详情
practitionerDetailsQuery(param) {
const url = this.API + "/erp/practitionerDetailsQuery";
return this.http.post(url, JSON.stringify(param));
}
saveMembership(param){
const url = this.ydapi + '/practitionerHiring/saveMembership';
return this.http
.post(url, JSON.stringify(param));
}
}
......@@ -133,8 +133,60 @@
<i class="iconfont icon-jiahao"></i>
</div>
</div>
<div class="content" *ngIf="selectedId===4;">
<div class="contentDetail employ">
<div class="contentItem">
<span>被邀请人</span>
<input type="text" [(ngModel)]="this.employQuery.name" class="form-control" />
</div>
<div class="contentItem">
<span>报聘职级</span>
<select [(ngModel)]="employQuery.mdDropOptionId" class="form-control" (ngModelChange)="getName(1,employQuery.mdDropOptionId)">
<option value=null>请选择</option>
<option [value]='levelInfos.id' *ngFor="let levelInfos of practitionerLevelInfos">
{{levelInfos.dropOptionCode}} {{levelInfos.dropOptionName}}
</option>
</select>
</div>
<div class="contentItem">
<span>辅导人</span>
<select [(ngModel)]="employQuery.mentorPractitionerId" class="form-control" (ngModelChange)="getName(2,employQuery.mentorPractitionerId);getPractitionerDetails(employQuery.mentorPractitionerId)">
<option value=null>请选择</option>
<option [value]='practitionerInfo.id' *ngFor="let practitionerInfo of practitionerList">
{{practitionerInfo.name}}
</option>
</select>
</div>
<div class="contentItem">
<span>介绍人</span>
<select [(ngModel)]="employQuery.introducerPractitionerId" class="form-control" (ngModelChange)="getName(3,employQuery.introducerPractitionerId);">
<option value=null>请选择</option>
<option [value]='practitionerInfo.id' *ngFor="let practitionerInfo of practitionerList">
{{practitionerInfo.name}}
</option>
</select>
</div>
<div class="contentItem">
<span>体系名</span>
<div><input type="text" [(ngModel)]="employQuery.subsystem" class="form-control" disabled/></div>
</div>
<div class="contentItem">
<span>体系负责人</span>
<div><input type="text" [(ngModel)]="employQuery.subsystemOwner" class="form-control" disabled/></div>
</div>
<div class="contentItem">
<span>分公司</span>
<div><input type="text" [(ngModel)]="employQuery.branch" class="form-control" disabled/></div>
</div>
</div>
</div>
<!-- <footer *ngIf="selectedId===4;" (click)="invite()">
确认
</footer> -->
<footer *ngIf="selectedId===4;" (click)="saveMembership()">
确认
</footer>
<div class="toastWrapper toast" *ngIf="isShow" (click)="this.isShow = false;">
</div>
<!--编辑框-->
<div class="editContainer" *ngIf="isShow">
......
.wrapper {
font-size: 16px;
background: #fff;
min-height: 100%;
select{
-webkit-appearance: none;
}
footer{
width: 100%;
height: 56px;
background: #C81B1E;
line-height: 56px;
position: fixed;
bottom: 0;
color: #fff;
text-align: center;
font-size: 19px;
font-weight: bold;
}
.tab {
display: flex;
list-style: none;
margin: 10px 0px;
padding: 10px 0px;
padding-left: 1%;
li {
margin-right: 10px;
......@@ -48,10 +62,8 @@
margin-top: 15px;
.contentItem {
display: flex;
margin-bottom: 10px;
justify-content: space-between;
align-items: center;
// border-bottom: 1px #ddd solid;
margin: 0 8px 5px 8px;
> span:first-child{
white-space: nowrap;
......@@ -68,6 +80,7 @@
display: flex;
flex-wrap: wrap;
font-size: 16px;
direction: rtl;
}
input[type="date"]{
margin-right: -4.5%;
......@@ -112,6 +125,11 @@
color: #999;
}
}
.contentDetail.employ .contentItem{
padding: 10px 0;
border-bottom: 1px #e8e8e8 solid;
margin: 0 8px 0 8px;
}
.tagWrapper {
display: flex;
flex-wrap: wrap;
......@@ -176,7 +194,7 @@
}
}
}
.editContainer {
margin-top: 15px;
background: #ffffff;
......@@ -259,7 +277,7 @@
outline: none;
box-shadow: none;
padding-left: 0;
}
}
}
.iconfont{
font-size: 18px;
......
......@@ -3,6 +3,7 @@ import { ActivatedRoute, Router } from "@angular/router";
import { LifeCommonService } from '../../common/life-common.service';
import { MyService } from '../my.service';
import { RecruitingQuery } from '../../domain/recruitingQuery';
import { EmployQuery } from '../../domain/employQuery';
@Component({
selector: 'ydlife-recruiting-detail',
......@@ -11,6 +12,7 @@ import { RecruitingQuery } from '../../domain/recruitingQuery';
})
export class RecruitingDetailComponent implements OnInit {
editRecruiting: RecruitingQuery = new RecruitingQuery();
employQuery: EmployQuery = new EmployQuery();
//潜在增员的id
potentialId: any;
titleList: Array<any>;
......@@ -40,6 +42,9 @@ export class RecruitingDetailComponent implements OnInit {
status: any;
remarkId: any;
isPC: any;
practitionerLevelInfos:Array<any>;
practitionerList:Array<any>;
constructor(
private activateRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService,
......@@ -48,7 +53,8 @@ export class RecruitingDetailComponent implements OnInit {
this.titleList = [
{ id: 1, name: '基本信息' },
{ id: 2, name: '简历' },
{ id: 3, name: '增员跟进' }
{ id: 3, name: '增员跟进' },
{ id: 4, name: '发送报聘'}
]
}
......@@ -74,7 +80,9 @@ export class RecruitingDetailComponent implements OnInit {
this.editRecruiting.resourceDropMasterId = ''
}
//获取基本信息
this.recruitListQuery()
this.recruitListQuery();
this.employQuery = new EmployQuery(this.employQuery.name,null,null,this.potentialId,null,null,null,null,null,null,null,null,null,null,null,null)
}
selectTab(id) {
......@@ -91,6 +99,11 @@ export class RecruitingDetailComponent implements OnInit {
if (this.selectedId === 1 || this.selectedId === 2) {
this.recruitListQuery()
}
if(this.selectedId === 4){
this.employQuery.name = this.editRecruiting.name;
this.practitionerTypeAndLevelQuery();
this.practitionerListQuery();
}
} else {
this.selectedId = 1;
}
......@@ -392,4 +405,113 @@ export class RecruitingDetailComponent implements OnInit {
editRemark(id) {
this.remarkId = id
}
//查询经纪人职级
practitionerTypeAndLevelQuery(){
this.myService.practitionerTypeAndLevelQuery({}).subscribe((res)=>{
this.practitionerLevelInfos = res['data']['practitionerTypeInfos'][1]['practitionerLevelInfos'];
})
}
//经纪人列表查询
practitionerListQuery(){
this.myService.practitionerListQuery(null).subscribe((res)=>{
this.practitionerList = res['data']['practitionerListInfoList'];
})
}
getPractitionerDetails(practitionerId){
if(practitionerId){
this.myService.practitionerDetailsQuery({practitionerId:practitionerId}).subscribe((res)=>{
if(res['data']['praLabelItem']){
this.employQuery.subsystemId = res['data']['praLabelItem']['subordinateSystemId'];
this.employQuery.subsystem = res['data']['praLabelItem']['subordinateSystemName'];
this.employQuery.subsystemOwnerId = res['data']['praLabelItem']['teamLeaderId'];
this.employQuery.subsystemOwner = res['data']['praLabelItem']['teamLeaderName'];
this.employQuery.branchId = res['data']['praLabelItem']['insurerBranchId'];
this.employQuery.branch = res['data']['praLabelItem']['insurerBranchName'];
}
});
}
}
saveMembership(){
console.log(this.employQuery)
this.employQuery = {
...this.employQuery,
loginId: JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId']
}
this.myService.saveMembership(this.employQuery).subscribe((res)=>{
console.log(res)
if(res['success']){
this.invite();
}else{
alert(res['message']);
}
})
}
invite(){
this.router.navigate(['/inviter'], { queryParams: { name: this.employQuery.name } });
}
/**
* 下拉框选择事件
* @param e
* @param type
* 1.职级
* 2.辅导人
* 3.介绍人
*/
getName(type,e){
if(e == 'null'){
e = null;
}
switch (type) {
case 1:
this.employQuery.mdDropOptionId = e;
if(e){
for(const level of this.practitionerLevelInfos){
if(e == level.id){
this.employQuery.mdDropOptionName = level.dropOptionName;
}
}
}else{
this.employQuery.mdDropOptionName = null;
}
return;
case 2:
this.employQuery.mentorPractitionerId = e;
if(e){
for (const mentorInfo of this.practitionerList) {
if (e == mentorInfo.id) {
this.employQuery.mentor = mentorInfo.name;
}
}
}else{
this.employQuery.mentor =
this.employQuery.subsystemId =
this.employQuery.subsystem =
this.employQuery.subsystemOwnerId =
this.employQuery.subsystemOwner =
this.employQuery.branchId =
this.employQuery.branch = null;
}
return;
case 3:
this.employQuery.introducerPractitionerId = e;
if(e){
for (const introducer of this.practitionerList) {
if (e == introducer.id) {
this.employQuery.introducer = introducer.name;
}
}
}else{
this.employQuery.introducer = null;
}
return;
}
}
}
......@@ -43,7 +43,7 @@
<div class="footer" *ngIf="pageType=='linkrecruiting'" (click)="returnAddTask()">
确认
</div>
<div class="add" *ngIf="pageType=='recruiting'">
<div class="add" *ngIf="pageType=='recruiting' && selectedId !=4">
<i class="iconfont icon-jiahao" (click)="addMember()"></i>
</div>
</div>
......
......@@ -3,6 +3,7 @@
height: 100%;
overflow: auto;
// background:#f7f7f2;
background: #fff;
.tab {
display: flex;
list-style: none;
......
......@@ -27,7 +27,7 @@ export class RecruitingComponent implements OnInit {
this.titleList = [
{ id: 1, name: '待跟进' },
{ id: 2, name: '跟进中' },
{ id: 3, name: '已报聘' },
{ id: 3, name: '已报聘' }
]
this.selectTab(1);
}else{
......
......@@ -13,7 +13,7 @@ html, body {
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
background: #fff;
}
ol, ul {
margin-top: 0;
......@@ -26,7 +26,9 @@ ol, ul {
p {
margin: 0;
}
img{
max-width: 100%;
}
.img-responsive {
max-width: 100%;
height: auto;
......@@ -147,6 +149,18 @@ input::placeholder {
}
}
footer{
width: 100%;
margin-top: 15px;
background: #C81B1E;
color: #fff;
font-size: 18px;
font-weight: bold;
border-radius: 4px;
height: 40px;
line-height: 40px;
text-align: center;
}
@keyframes slowUp {
0% {
-webkit-transform: translateY(100%);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment