Commit 56ec0621 by Sweet Zhang

我要提问bug修复

parent 4741ed2b
...@@ -3,20 +3,20 @@ ...@@ -3,20 +3,20 @@
<router-outlet></router-outlet> <router-outlet></router-outlet>
<ydlife-guide-page *ngIf="shareGuidePageEnable"></ydlife-guide-page> <ydlife-guide-page *ngIf="shareGuidePageEnable"></ydlife-guide-page>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert> <ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
<div class="returnIndexBox" *ngIf="isShowIndexBtn" appDrag> <div class="returnIndexBox" *ngIf="isShowIndexBtn" appDrag [isNeedReturn]="'1'">
<div><i class="iconfont icon-shouye"></i></div> <div><i class="iconfont icon-shouye"></i></div>
<div>首页</div> <div>首页</div>
</div> </div>
<div class="questionContainer" id="menuContainer"> <div class="questionContainer" id="menuContainer" *ngIf="iconShowFlag" appDrag>
<div style="position: relation;" *ngIf="askIconFlag"> <div style="position: relation;" *ngIf="askIconFlag">
<div (click)="showMenu()"> <div (click)="showMenu()">
<img src="assets/images/ask.gif" alt="" srcset=""> <img src="assets/images/ask.gif" alt="" srcset="">
</div> </div>
<div class="closeIcon" (click)="askIconFlag=false;menuShowFlag=false">X</div> <div class="closeIcon" (click)="askIconFlag=menuShowFlag=iconShowFlag=false">X</div>
</div> </div>
<ul id="menuListContainer" *ngIf="menuShowFlag"> <ul id="menuListContainer" *ngIf="menuShowFlag">
<li [routerLink]="'/ask'">我要提问</li> <li [routerLink]="'/underwriting_knowledge'">我要提问</li>
<li [routerLink]="'/my_question'">我的问题</li> <!-- <li [routerLink]="'/my_question'">我的问题</li> -->
<li [routerLink]="'/'">回到首页</li> <li [routerLink]="'/'">回到首页</li>
</ul> </ul>
</div> </div>
......
...@@ -2,7 +2,7 @@ import { Component, ElementRef, OnDestroy, OnInit } from '@angular/core'; ...@@ -2,7 +2,7 @@ import { Component, ElementRef, OnDestroy, OnInit } from '@angular/core';
import { AuthService } from "./auth/auth.service"; import { AuthService } from "./auth/auth.service";
import { LifeCommonService } from "./common/life-common.service"; import { LifeCommonService } from "./common/life-common.service";
import { Subscription } from "rxjs/index"; import { Subscription } from "rxjs/index";
import {Router, NavigationStart, ActivatedRoute} from '@angular/router'; import {Router, NavigationStart, ActivatedRoute, NavigationEnd} from '@angular/router';
declare var wx: any; declare var wx: any;
...@@ -22,6 +22,7 @@ export class AppComponent implements OnInit, OnDestroy { ...@@ -22,6 +22,7 @@ export class AppComponent implements OnInit, OnDestroy {
loginId:any; loginId:any;
// 提问icon显示隐藏 // 提问icon显示隐藏
askIconFlag:boolean = true; askIconFlag:boolean = true;
iconShowFlag:boolean = true;
menuShowFlag:boolean = false; menuShowFlag:boolean = false;
constructor(private router: Router, constructor(private router: Router,
private authService: AuthService, private authService: AuthService,
...@@ -31,6 +32,16 @@ export class AppComponent implements OnInit, OnDestroy { ...@@ -31,6 +32,16 @@ export class AppComponent implements OnInit, OnDestroy {
this.subscription = lifeCommonService.shareStatus$.subscribe(status => { this.subscription = lifeCommonService.shareStatus$.subscribe(status => {
this.shareGuidePageEnable = status == '1'; this.shareGuidePageEnable = status == '1';
}); });
// this.router.events.forEach(event=>{
// if (event instanceof NavigationEnd){
// if(!localStorage.getItem('lifeCustomerInfo')){
// this.iconShowFlag = false;
// }else{
// this.iconShowFlag = true;
// }
// }
// })
} }
......
import {Directive, ElementRef, OnInit, HostListener} from '@angular/core'; import {Directive, ElementRef, OnInit, HostListener, Input} from '@angular/core';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
...@@ -6,6 +6,7 @@ import {Router} from '@angular/router'; ...@@ -6,6 +6,7 @@ import {Router} from '@angular/router';
selector: '[appDrag]' selector: '[appDrag]'
}) })
export class DragDirective implements OnInit { export class DragDirective implements OnInit {
@Input() isNeedReturn = '';
isDown = false; isDown = false;
cur: any = { cur: any = {
x: 0, x: 0,
...@@ -47,8 +48,10 @@ export class DragDirective implements OnInit { ...@@ -47,8 +48,10 @@ export class DragDirective implements OnInit {
@HostListener('mouseup', ['$event']) @HostListener('mouseup', ['$event'])
onMouseup(event) { onMouseup(event) {
// 只用当元素移动过了,离开函数体才会触发。 // 只用当元素移动过了,离开函数体才会触发。
if(this.isNeedReturn=='1'){
this.router.navigate(['/']); this.router.navigate(['/']);
} }
}
ngOnInit() { ngOnInit() {
} }
...@@ -109,14 +112,18 @@ export class DragDirective implements OnInit { ...@@ -109,14 +112,18 @@ export class DragDirective implements OnInit {
if (this.disX !== 0 || this.disY !== 0) { if (this.disX !== 0 || this.disY !== 0) {
if (parseInt(this.el.nativeElement.style.left, 0) < document.body.clientWidth / 2) { if (parseInt(this.el.nativeElement.style.left, 0) < document.body.clientWidth / 2) {
this.el.nativeElement.style.left = '0px'; this.el.nativeElement.style.left = '0px';
this.el.nativeElement.style.right = 'auto';
} else { } else {
this.el.nativeElement.style.left = 'calc(100% - 70px)'; this.el.nativeElement.style.left = 'auto';
this.el.nativeElement.style.right = '10px';
} }
return; return;
} else { } else {
// 阻止点透事件 // 阻止点透事件
setTimeout(() => { setTimeout(() => {
this.router.navigate(['/']) if(this.isNeedReturn=='1'){
this.router.navigate(['/']);
}
}, 300) }, 300)
} }
......
...@@ -8,11 +8,19 @@ export class ScrollDirective { ...@@ -8,11 +8,19 @@ export class ScrollDirective {
constructor(private el:ElementRef) { } constructor(private el:ElementRef) { }
@HostListener('touchmove') onTouchmove(){ @HostListener('touchmove') onTouchmove(){
this.el.nativeElement.querySelector('#menuContainer').style.transform = 'translateX(40px)' if(this.el.nativeElement.querySelector('#menuContainer')){
if(parseInt(this.el.nativeElement.querySelector('#menuContainer').style.left, 0) < document.body.clientWidth / 2){
this.el.nativeElement.querySelector('#menuContainer').style.transform = 'translateX(-50px)'
}else{
this.el.nativeElement.querySelector('#menuContainer').style.transform = 'translateX(50px)'
}
}
} }
@HostListener('touchend') onTouchcancel(){ @HostListener('touchend') onTouchcancel(){
setTimeout(()=>{ setTimeout(()=>{
if(this.el.nativeElement.querySelector('#menuContainer')){
this.el.nativeElement.querySelector('#menuContainer').style.transform = 'translateX(0)' this.el.nativeElement.querySelector('#menuContainer').style.transform = 'translateX(0)'
}
},1000) },1000)
} }
} }
...@@ -125,10 +125,19 @@ ...@@ -125,10 +125,19 @@
<span>季度奖金</span> <span>季度奖金</span>
<span class="red">{{quarterlyBonus.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r" ></i></span> <span class="red">{{quarterlyBonus.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r" ></i></span>
</div> </div>
<div class="item_detail" (click)="jumpToFirstYearSales(channelOtherDeduction1,'渠道加扣款1',3,26)" *ngIf="channelOtherDeduction1">
<span>渠道加扣款1</span>
<span class="red">{{channelOtherDeduction1.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
</div>
<div class="item_detail" (click)="jumpToFirstYearSales(channelOtherDeduction2,'渠道加扣款2',3,27)" *ngIf="channelOtherDeduction2">
<span>渠道加扣款2</span>
<span class="red">{{channelOtherDeduction2.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
</div>
<div class="item_detail" (click)="jumpToFirstYearSales(onlineAward,'银盾在线佣金',4,14)" *ngIf="onlineAward"> <div class="item_detail" (click)="jumpToFirstYearSales(onlineAward,'银盾在线佣金',4,14)" *ngIf="onlineAward">
<span>银盾在线佣金</span> <span>银盾在线佣金</span>
<span class="red">{{onlineAward.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span> <span class="red">{{onlineAward.commission | number: "1.2-2"}}<i class="iconfont icon-ar-r"></i></span>
</div> </div>
</div> </div>
<div class="item" style="margin-right: 19px;"> <div class="item" style="margin-right: 19px;">
<div class="title"> <div class="title">
......
...@@ -55,6 +55,10 @@ export class SalaryDetailComponent implements OnInit { ...@@ -55,6 +55,10 @@ export class SalaryDetailComponent implements OnInit {
quarterlyBonus:any = null; quarterlyBonus:any = null;
//银盾在线奖 //银盾在线奖
onlineAward:any = null; onlineAward:any = null;
// 渠道加扣款1
channelOtherDeduction1:any=null;
// 渠道加扣款2
channelOtherDeduction2:any=null;
//团队长辅导津贴 //团队长辅导津贴
TLCoachingAllowance:any = null; TLCoachingAllowance:any = null;
//续年度销售加码奖金 //续年度销售加码奖金
...@@ -262,6 +266,10 @@ export class SalaryDetailComponent implements OnInit { ...@@ -262,6 +266,10 @@ export class SalaryDetailComponent implements OnInit {
this.channelFristYearCommissionList = this.salaryDetailsList[i]; this.channelFristYearCommissionList = this.salaryDetailsList[i];
}else if(this.salaryDetailsList[i]['salaryCode'] === 'D02'){ }else if(this.salaryDetailsList[i]['salaryCode'] === 'D02'){
this.channelRenewalYearCommissionList = this.salaryDetailsList[i]; this.channelRenewalYearCommissionList = this.salaryDetailsList[i];
}else if(this.salaryDetailsList[i]['salaryCode'] === 'D91'){
this.channelOtherDeduction1 = this.salaryDetailsList[i];
}else if(this.salaryDetailsList[i]['salaryCode'] === 'D92'){
this.channelOtherDeduction2 = this.salaryDetailsList[i];
}else{ }else{
break; break;
} }
...@@ -317,7 +325,7 @@ export class SalaryDetailComponent implements OnInit { ...@@ -317,7 +325,7 @@ export class SalaryDetailComponent implements OnInit {
this.rycMeritsInfo= this.recommendAward= this.systemRecommendAward = this.specialManagementAward= this.rycMeritsInfo= this.recommendAward= this.systemRecommendAward = this.specialManagementAward=
this.otherPreTaxDeduction = this.IncentiveBonus = this.addWeight = this.quarterlyBonus= this.onlineAward= this.otherPreTaxDeduction = this.IncentiveBonus = this.addWeight = this.quarterlyBonus= this.onlineAward=
this.monthlySalesAddWeight = this.independentBrokerAllowance =this.directCounseling = this.indirectCounseling= this.monthlySalesAddWeight = this.independentBrokerAllowance =this.directCounseling = this.indirectCounseling=
this.breedingBonus = this.TLCoachingAllowance = this.continuedAnnualSalesBonus =null; this.breedingBonus = this.TLCoachingAllowance = this.continuedAnnualSalesBonus =this.channelOtherDeduction1 = this.channelOtherDeduction2 = null;
} }
goBack(){ goBack(){
......
...@@ -83,6 +83,8 @@ export class SalaryFirstYearComponent implements OnInit { ...@@ -83,6 +83,8 @@ export class SalaryFirstYearComponent implements OnInit {
* 23.直接销售加码佣金-》保单 * 23.直接销售加码佣金-》保单
* 24.首年渠道服务费-》保单 * 24.首年渠道服务费-》保单
* 25.续年渠道服务费-》保单 * 25.续年渠道服务费-》保单
* 26.渠道加扣款1=》备注
* 27.渠道加扣款2=》备注
*/ */
searchStaffSalaryDetails(){ searchStaffSalaryDetails(){
let param = { let param = {
...@@ -166,6 +168,14 @@ export class SalaryFirstYearComponent implements OnInit { ...@@ -166,6 +168,14 @@ export class SalaryFirstYearComponent implements OnInit {
this.remarkInfo = this.OtherCommissionList.filter((item)=>{ this.remarkInfo = this.OtherCommissionList.filter((item)=>{
return item.salaryCode == 'C-006'; return item.salaryCode == 'C-006';
}); });
}else if(this.salaryType == 26 && this.OtherCommissionList[i]['salaryCode'] === 'D91'){
this.remarkInfo = this.OtherCommissionList.filter((item)=>{
return item.salaryCode == 'D91';
});
}else if(this.salaryType == 27 && this.OtherCommissionList[i]['salaryCode'] === 'D92'){
this.remarkInfo = this.OtherCommissionList.filter((item)=>{
return item.salaryCode == 'D92';
});
} }
} }
} }
......
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