Commit dc4c40c0 by Chao Sun

我的增员页面

parent d5d2e571
import {Injectable} from '@angular/core'; import { Injectable } from '@angular/core';
import { import {
HttpEvent, HttpInterceptor, HttpHandler, HttpRequest HttpEvent, HttpInterceptor, HttpHandler, HttpRequest
} from '@angular/common/http'; } from '@angular/common/http';
import {Observable} from "rxjs/index"; import { Observable } from "rxjs/index";
import {tap} from "rxjs/internal/operators"; import { tap } from "rxjs/internal/operators";
@Injectable() @Injectable()
export class AuthInterceptor implements HttpInterceptor { export class AuthInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const authReq = req.clone({ const authReq = req.clone({
headers: req.headers.set('X-Authorization', localStorage.getItem('lifeToken') ? localStorage.getItem('lifeToken') : ''), headers: req.headers.set('X-Authorization', localStorage.getItem('lifeToken') ? localStorage.getItem('lifeToken') : ''),
setHeaders: {'Content-Type': 'application/json'} setHeaders: { 'Content-Type': 'application/json' }
}); });
return next.handle(authReq) return next.handle(authReq)
.pipe( .pipe(
tap( tap(
event => {}, event => { },
error => { error => {
if (error.status === 401) { if (error.status === 401) {
let {search, href} = window.location; let { search, href } = window.location;
href = href.replace(/&?t_reload=(\d+)/g, ''); href = href.replace(/&?t_reload=(\d+)/g, '');
window.location.href = href + (search ? '&' : '?') + 't_reload=' + new Date().getTime(); window.location.href = href + (search ? '&' : '?') + 't_reload=' + new Date().getTime();
} }
} }
) )
); );
......
...@@ -57,7 +57,6 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -57,7 +57,6 @@ export class MyBusinessDetailComponent implements OnInit {
{ id: 2, name: '咨询问卷' }, { id: 2, name: '咨询问卷' },
{ id: 4, name: '咨询报告' }, { id: 4, name: '咨询报告' },
{ id: 3, name: '商机跟进' } { id: 3, name: '商机跟进' }
] ]
} }
......
...@@ -33,7 +33,6 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -33,7 +33,6 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
isShow: boolean; isShow: boolean;
onlineInfo: any; onlineInfo: any;
offlineInfo: any; offlineInfo: any;
advFlag: boolean = false;
constructor( constructor(
private router: Router, private router: Router,
private lifeCommonService: LifeCommonService, private lifeCommonService: LifeCommonService,
...@@ -67,8 +66,8 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -67,8 +66,8 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
title: '我的团队', title: '我的团队',
content: [ content: [
{ no: 15, subtitle: '我的团队', icon: 'icon-tuandui', path: '', routerLink: 'teamRank' }, { no: 15, subtitle: '我的团队', icon: 'icon-tuandui', path: '', routerLink: 'teamRank' },
{ no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: '' }, // { no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: '' },
// { no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: 'recruiting' }, { no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: 'recruiting' },
{ no: '', subtitle: '', icon: '', path: '', routerLink: '' }, { no: '', subtitle: '', icon: '', path: '', routerLink: '' },
{ no: '', subtitle: '', icon: '', path: '', routerLink: '' } { no: '', subtitle: '', icon: '', path: '', routerLink: '' }
], ],
...@@ -112,11 +111,6 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -112,11 +111,6 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
setTimeout(() => { setTimeout(() => {
this.firstAnnouncementTitle = this.getStr(this.hide.nativeElement.innerText, '32') this.firstAnnouncementTitle = this.getStr(this.hide.nativeElement.innerText, '32')
}, 400); }, 400);
// setTimeout(() => {
// if (this.firstAnnouncementTitle) {
// this.advFlag = false;
// }
// }, 1000)
} }
......
<p> <div class="wrapper">
recruiting-detail works! <ul class="tab">
</p> <li *ngFor="let titleItem of titleList" (click)="selectTab(titleItem.id)"
[ngClass]="{selected:selectedId===titleItem.id}">
<div style="position: relative;">
<h3>{{titleItem.name}}
</h3>
</div>
</li>
</ul>
<div class="content" *ngIf="selectedId===1">
<i class="iconfont icon-bianji" *ngIf="readonlyFlag" (click)="editInfo()"></i>
<i class="iconfont icon-save" *ngIf="!readonlyFlag" (click)="saveInfo()"></i>
<div class="contentDetail">
<div class="contentItem">
<span>姓名</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无姓名':'请输入姓名'}}"
[(ngModel)]="editBusiness.name" [disabled]="readonlyFlag" />
</div>
<div class="contentItem">
<span>年龄</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无年龄信息':'请输入年龄'}}"
[(ngModel)]="editBusiness.age" [disabled]="readonlyFlag" />
</div>
<div class="contentItem">
<span>性别</span>
<div class="sexWrapper">
<button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='1' && maleFlag && femaleFlag}"
(click)="selectedGender('1')" [disabled]="readonlyFlag" *ngIf="sexFlag && maleFlag">
</button>
<button class="form-control sex" [ngClass]="{'sexBtn':editBusiness?.gender=='2' && maleFlag && femaleFlag}"
(click)="selectedGender('2')" [disabled]="readonlyFlag" *ngIf="sexFlag && femaleFlag">
</button>
</div>
<input class="form-control" type="text" placeholder="暂无性别信息" *ngIf="!sexFlag" disabled />
</div>
<div class="contentItem">
<span>手机</span>
<a style="text-decoration:none;color: #333;margin-right: 16px;" href="tel:{{editBusiness.mobileNo}}">
<i class="iconfont icon-dianhua" style="color: #e10d0d;"></i>
{{editBusiness.mobileNo}}</a>
<!-- <input class="form-control" type="text" [(ngModel)]="editBusiness.mobileNo" disabled /> -->
</div>
<div class="contentItem">
<span>微信</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无微信':'请输入微信'}}"
[(ngModel)]="editBusiness.weChat" [disabled]="readonlyFlag" (blur)="inputBlur()" />
</div>
<div class="contentItem">
<span>其他联系</span>
<input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无其他联系方式':'请输入其他联系方式'}}"
[(ngModel)]="editBusiness.otherContacts" [disabled]="readonlyFlag" (blur)="inputBlur()" />
</div>
<div class="contentItem">
<span>学历</span>
<input class="form-control" type="text" [(ngModel)]="editBusiness.sourceChannel"
placeholder="{{readonlyFlag ?'暂无学历信息':'请选择学历'}}" [disabled]="readonlyFlag" />
</div>
<div class="contentItem">
<span>招募来源</span>
<input class="form-control" type="text" [(ngModel)]="editBusiness.sourceChannel" disabled />
</div>
<div class="contentItem">
<span>时间</span>
<input class="form-control" type="text" placeholder="商机时间" [(ngModel)]="editBusiness.opportunityDate"
disabled />
</div>
<div class="contentItem">
<span>商机状态</span>
<div style="padding: 6px 15px;padding: 6px 15px;color: #e10d0d;font-weight: bold;">
{{lifeCommonService.checkStr(editBusiness.mdDropOptionId)}}</div>
</div>
</div>
</div>
<div class="content" *ngIf="selectedId===2">
<div style="text-align: center;font-size: 16px;margin-top: 10px;"
*ngIf="opportunitySurveyAnswersList?.length==0 || !opportunitySurveyAnswersList">
暂无简历</div>
<div class="answerContent" *ngFor="let surveyItem of opportunitySurveyAnswersList">
<div class="questionTitle">{{surveyItem.questionName}}</div>
<div class="questionContent">{{surveyItem.optionName}}</div>
</div>
</div>
<div class="content" *ngIf="selectedId===4">
<div style="text-align: center;font-size: 16px;margin-top: 10px;" *ngIf="isCompletedQuestionnaire!=3">暂无方案</div>
</div>
<div class="content" *ngIf="selectedId===3">
<ul class="recordLists">
<li *ngFor="let opportunityRecordItem of opportunityRecordInfos">
<div style="display: flex;justify-content: space-between;">
<div class="updatedAt">{{opportunityRecordItem.noticeDate}}</div>
<div class="opportunityRecordItem">{{lifeCommonService.checkStr(opportunityRecordItem.mdDropOptionId)}}</div>
</div>
<div class="salesNotice">{{opportunityRecordItem.salesNotice}}</div>
</li>
<li>
<div class="salesNotice">{{editBusiness.opportunityDate}}</div>
<div style="display: flex;justify-content: space-between;">
<div>商机状态</div>
<div>待跟进</div>
</div>
</li>
</ul>
<div class="add" (click)="this.isShow = true;">
<i class="iconfont icon-jiahao"></i>
</div>
</div>
<div class="toastWrapper toast" *ngIf="isShow" (click)="this.isShow = false;">
</div>
<!--编辑框-->
<div class="editContainer" *ngIf="isShow">
<div>
<div>跟进状态</div>
<div style="position:relative">
<select name="businessStatus" (onChange)="inputBlur()" id="businessStatus" class="form-control"
[(ngModel)]="opportunityRecordId">
<option value="null">请选择</option>
<option *ngFor="let businessStatusItem of businessStatusList" value="{{businessStatusItem.id}}">
{{businessStatusItem.dropOptionName}}
</option>
</select>
<i class="iconfont icon-xiangxia" style="position: absolute;right: 50px;top: 5px;"></i>
</div>
</div>
<div>
<div>备注</div>
<div><input type="text" id="remark" class="form-control" placeholder="输入备注信息" [(ngModel)]="salesNotice"
(blur)="inputBlur()"></div>
</div>
<div>
<div>跟进时间</div>
<div><input style="-webkit-appearance: none;" id="time" class="form-control" type="date"
[(ngModel)]="opportunityRecordNoticeDate" (blur)="inputBlur()"></div>
</div>
<ul class="footer">
<li (click)="ownOpportunityRecordSave()">确定</li>
<li (click)="this.isShow = false;">取消</li>
</ul>
</div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>
\ No newline at end of file
.wrapper {
select{
-webkit-appearance: none;
}
.tab {
display: flex;
list-style: none;
margin: 10px 0px;
padding-left: 1%;
li {
margin-right: 10px;
line-height: 30px;
height: 30px;
width: 25%;
text-align: center;
border: 1px #a9aabb solid;
border-radius: 20px;
h3 {
font-weight: normal;
font-size: 16px;
}
}
li.selected {
// background-color: #ff5a32;
// color: #fff;
border: 1px #e10d0d solid;
}
}
.content {
padding: 10px 5px;
position: relative;
> .iconfont {
width: 55px;
height: 55px;
line-height: 55px;
border-radius: 50%;
position: fixed;
right: 10px;
font-size: 24px;
color: #fff;
background: #0767bf;
text-align: center;
bottom: 30px;
}
.contentDetail {
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;
}
input.form-control {
display: inline-block;
// width: 60%;
margin: 0 5px;
background: none;
outline: none;
border: none;
text-align: right;
box-shadow: none;
display: flex;
flex-wrap: wrap;
}
.sexWrapper {
display: flex;
width: 60%;
justify-content: flex-end;
padding-right: 3px;
.form-control.sex {
width: 20%;
margin-left: 5px;
border: none;
box-shadow: none;
}
.form-control.sex.sexBtn {
border: 1px #0767bf solid;
}
.form-control[disabled] {
background-color: transparent;
opacity: 1;
}
}
}
.contentItem:last-child {
border-bottom: none;
}
}
.tagWrapper {
display: flex;
flex-wrap: wrap;
padding-left: 8px;
div.tagContent {
margin: 10px 3px 0 3px;
height: 28px;
line-height: 28px;
text-align: center;
// background-color: #e8e8e8;
border-radius: 12px;
font-size: 13px;
padding: 0 15px;
}
div.selected {
border: 1px #0767bf solid;
}
}
.add {
position: absolute;
.iconfont {
width: 55px;
height: 55px;
line-height: 55px;
border-radius: 50%;
position: fixed;
right: 10px;
font-size: 24px;
color: #fff;
background: #0767bf;
text-align: center;
bottom: 30px;
font-size: 28px;
// color: #ff5933;
font-weight: bold;
}
}
.answerContent {
border-bottom: 1px #ddd solid;
margin-bottom: 5px;
padding: 5px 0;
.questionTitle {
font-weight: 700;
font-size: 13px;
}
.questionContent {
font-size: 16px;
}
}
.answerContent:last-child {
border-bottom: 0;
}
.record {
display: flex;
list-style: none;
justify-content: space-between;
li {
width: 30%;
text-align: center;
height: 30px;
line-height: 30px;
}
}
}
.editContainer {
margin-top: 15px;
background: #ffffff;
padding: 10px;
position: fixed;
bottom: 0;
width: 100%;
height: 45%;
background-color: #fff;
z-index: 20;
-webkit-animation: .5s both slowUp;
animation: .5s both slowUp;
min-width: 320px;
max-width: 640px;
margin: 0 auto;
> div {
height: 50px;
border-bottom: 1px solid #dbdbdb;
display: flex;
align-items: center;
justify-content: space-between;
> div:first-child {
width: 100px;
font-size: 15px;
}
> div:last-child {
flex: 1;
}
.form-control {
border: none;
box-shadow: none;
}
}
> div:last-child {
border: none;
}
ul.footer{
display: flex;
list-style: none;
justify-content: center;
margin-top: 15%;
li{
width: 30%;
height: 35px;
line-height: 35px;
text-align: center;
background: #e10d0d;
color: #fff;
margin: 0 10px;
border-radius: 10px;
}
}
}
.recordLists {
li {
border-bottom: 1px solid #f0f0f0;
padding: 5px 10px;
background: rgb(251, 251, 251);
}
li:last-child {
border: none;
}
.opportunityRecordItem {
font-size: 15px;
}
.salesNotice {
font-size: 14px;
color: #8a8a8a;
line-height: 1.1;
margin-bottom: 5px;
}
}
.toast {
position: fixed;
left: 0;
right: 0;
min-width: 320px;
max-width: 640px;
width: 100%;
margin: 0 auto;
z-index: 1;
}
.toastWrapper {
height: 100%;
background-color: rgba(0,0,0,.5);
top: 0;
}
}
\ No newline at end of file
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import { BusinessQuery } from '../../domain/businessQuery';
import { LifeCommonService } from '../../common/life-common.service';
@Component({ @Component({
selector: 'ydlife-recruiting-detail', selector: 'ydlife-recruiting-detail',
templateUrl: './recruiting-detail.component.html', templateUrl: './recruiting-detail.component.html',
...@@ -8,11 +11,49 @@ import { ActivatedRoute } from "@angular/router"; ...@@ -8,11 +11,49 @@ import { ActivatedRoute } from "@angular/router";
export class RecruitingDetailComponent implements OnInit { export class RecruitingDetailComponent implements OnInit {
//潜在增员的id //潜在增员的id
id: string; id: string;
constructor(private activateRoute: ActivatedRoute, ) { } titleList: Array<any>;
selectedId: number;
editBusiness: BusinessQuery = new BusinessQuery();
readonlyFlag: boolean = true;
//性别显示
sexFlag: boolean;
//显示女
femaleFlag: boolean;
//显示男
maleFlag: boolean;
isShow: boolean;
constructor(
private activateRoute: ActivatedRoute,
public lifeCommonService: LifeCommonService) {
this.titleList = [
{ id: 1, name: '基本信息' },
{ id: 2, name: '简历' },
{ id: 3, name: '增员跟进' }
]
}
ngOnInit() { ngOnInit() {
this.id = this.activateRoute.snapshot.paramMap.get('id'); this.id = this.activateRoute.snapshot.paramMap.get('id');
console.log(this.id) console.log(this.id)
this.selectTab(1);
}
selectTab(id) {
this.selectedId = id;
}
//改为编辑状态出现男女选项
editInfo() {
this.readonlyFlag = false;
this.sexFlag = true;
this.maleFlag = true;
this.femaleFlag = true;
}
//选男女
selectedGender(e) {
this.editBusiness.gender = e;
} }
} }
...@@ -15,8 +15,8 @@ export class SalesDetailComponent implements OnInit { ...@@ -15,8 +15,8 @@ export class SalesDetailComponent implements OnInit {
showType: any; showType: any;
constructor(private myService: MyService, private activatedRoute: ActivatedRoute, public lifeCommonService: LifeCommonService) { constructor(private myService: MyService, private activatedRoute: ActivatedRoute, public lifeCommonService: LifeCommonService) {
this.performanceList = [ this.performanceList = [
{ type: 'month', name: '本月' }, { type: 1, name: '本月' },
{ type: 'year', name: '本年度' } { type: 2, name: '本年度' }
] ]
} }
...@@ -32,14 +32,14 @@ export class SalesDetailComponent implements OnInit { ...@@ -32,14 +32,14 @@ export class SalesDetailComponent implements OnInit {
this.myService.practitionerPolicyListQuery({ practitionerId: practitionerId }).subscribe((res) => { this.myService.practitionerPolicyListQuery({ practitionerId: practitionerId }).subscribe((res) => {
if (res['success']) { if (res['success']) {
this.allPerformanceInfo = res['data']['policyListInfo']; this.allPerformanceInfo = res['data']['policyListInfo'];
if (this.searchType === 'month') { if (this.searchType == 1) {
if (this.allPerformanceInfo['thisMonthInfo']) { if (this.allPerformanceInfo['thisMonthInfo']) {
this.salesDetailList = this.allPerformanceInfo['thisMonthInfo']['onlineInfo']['fortuneItemList']; this.salesDetailList = this.allPerformanceInfo['thisMonthInfo']['onlineInfo']['fortuneItemList'];
} else { } else {
this.salesDetailList = []; this.salesDetailList = [];
} }
} }
if (this.searchType === 'year') { if (this.searchType == 2) {
if (this.allPerformanceInfo['thisYearInfo']['onlineInfo']) { if (this.allPerformanceInfo['thisYearInfo']['onlineInfo']) {
this.salesDetailList = this.allPerformanceInfo['thisYearInfo']['onlineInfo']['fortuneItemList']; this.salesDetailList = this.allPerformanceInfo['thisYearInfo']['onlineInfo']['fortuneItemList'];
} else { } else {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div id="adv" <div id="adv"
style="width: 100%;min-width: 320px; style="width: 100%;min-width: 320px;
max-width: 640px;overflow: hidden;position: fixed;top: 0;right: 0; bottom: 0;left: 0;background: #fff;margin: auto;"> max-width: 640px;overflow: hidden;position: fixed;top: 0;right: 0; bottom: 0;left: 0;background: #fff;margin: auto;">
<div class="content" style="text-align: center;width: 60%;margin: 45% auto 0 auto;"> <div class="content" style="text-align: center;width: 60%;margin: 50% auto 0 auto;">
<img style="width:100%;margin-bottom: 15px;" src="assets/images/login_logo.png"> <img style="width:100%;margin-bottom: 15px;" src="assets/images/login_logo.png">
<div class="loadingContent"> <div class="loadingContent">
<span style="letter-spacing: 12px;">海纳百川</span> <span style="letter-spacing: 12px;">海纳百川</span>
......
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