Commit 898a0373 by Chao Sun

合并动态公告佣金

parent 2cb7be3c
<div class="rich_media_content" >
<div class="rich_media_content" *ngIf="isActive==1">
<div [innerHTML]="commission | safeHtml">
</div>
</div>
<div class="wrapper" *ngIf="isActive==2">
<div class="top">
<div class="title">基础公告佣金政策</div>
<div class="subtitle">*本产品适用 <span style="color: #333;font-weight: bold;">{{settlementRuleType}}</span> <span style="color: red;">(基本法类型取自产品基本信息-基本法)</span></div>
</div>
<div class="content">
<ul>
<li class="name">产品名称</li>
<li class="pay">保障期间</li>
<li>缴费年期</li>
<li>第1年佣率</li>
<li>第2年佣率</li>
<li>第3年佣率</li>
<li>第4年佣率</li>
<li>第5年佣率</li>
</ul>
<ul *ngFor="let commissionItem of commissionInfoList">
<li class="name">{{commissionItem.productName}}</li>
<li class="pay">{{commissionItem.coverTermName}}</li>
<li>{{commissionItem.paymentTermStart}}-{{commissionItem.paymentTermEnd}}</li>
<li>{{commissionItem.firstYearRate?commissionItem.firstYearRate+'%':'-'}}</li>
<li>{{commissionItem.secondYearRate?commissionItem.secondYearRate+'%':'-'}}</li>
<li>{{commissionItem.thirdYearRate?commissionItem.thirdYearRate+'%':'-'}}</li>
<li>{{commissionItem.fourthYearRate?commissionItem.fourthYearRate+'%':'-'}}</li>
<li>{{commissionItem.fifthYearRate?commissionItem.fifthYearRate+'%':'-'}}</li>
</ul>
</div>
<div>
<p>*温馨提示:</p>
<p>根据基本法规定,如因客户退保产生保险公司追佣的情形,公司将向经纪人扣回或追偿相应损失。</p>
</div>
</div>
\ No newline at end of file
.rich_media_content{
padding: calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
}
.wrapper{
padding: 10px;
.top{
.title{
font-size: 18px;
color: #333;
font-weight: bold;
text-align: center;
}
}
.content{
width: 100%;
overflow-x: auto;
margin: 10px auto;
ul{
display: flex;
width: 600px;
align-items: center;
height: 40px;
// border: 1px #333 solid;
// border-bottom: none;
li{
width: 15%;
text-align: center;
border:1px #333 solid;
height: 40px;
line-height: 40px;
border-right: none;
border-bottom: none;
}
li.name,li.pay{
width: 20%;
}
li:nth-child(8){
border-right: 1px #333 solid;
}
}
ul:last-child{
border-bottom: 1px #333 solid;
}
}
}
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from "@angular/router";
import { MyService } from '../my.service';
@Component({
selector: 'ydlife-commission',
......@@ -7,11 +9,33 @@ import { Component, OnInit } from '@angular/core';
})
export class CommissionComponent implements OnInit {
commission:any;
constructor() { }
productId:any;
planId:any;
isActive:any;
settlementRuleType:any;
commissionInfoList:Array<any>;
constructor(private activatedRoute: ActivatedRoute,private myService:MyService) { }
ngOnInit() {
this.commission = sessionStorage.getItem('commission')
console.log(this,this.commission)
this.planId = this.activatedRoute.snapshot.queryParams.planId?this.activatedRoute.snapshot.queryParams.planId:null;
this.productId = this.activatedRoute.snapshot.queryParams.productId?this.activatedRoute.snapshot.queryParams.productId:null;
this.isActive = this.activatedRoute.snapshot.queryParams.isActive?this.activatedRoute.snapshot.queryParams.isActive:null;
this.commission = sessionStorage.getItem('commission');
if(this.isActive == 2){
this.queryCommissionInfoByYdLife();
}
}
queryCommissionInfoByYdLife(){
this.myService.queryCommissionInfoByYdLife({productId:this.productId,planId:this.planId}).subscribe((res)=>{
console.log(res)
if(res['success']){
this.settlementRuleType = res['data']['settlementRuleType'];
this.commissionInfoList = res['data']['commissionInfoList'];
}else{
alert(res['success'])
}
})
}
}
import { Component, OnInit,ViewChild,ElementRef } from '@angular/core';
import { MyService } from '../my.service';
import { EChartOption } from 'echarts';
import { color } from 'html2canvas/dist/types/css/types/color';
const echarts = require('echarts');
@Component({
selector: 'ydlife-my-management',
templateUrl: './my-management.component.html',
styleUrls: ['./my-management.component.scss']
})
export class MyManagementComponent implements OnInit {
@ViewChild('echarts') echarts: ElementRef
optList:Array<any>;
mdDropOptionCode:string = null;
year:number = (new Date()).getFullYear();
month:number = (new Date()).getMonth() + 1;
isTeam:number = 0;//0个人;1团队
chartOption: EChartOption = {}
personY:Array<any>;
teamX:Array<any>;
detailList:Array<any>;
zeroList:Array<any>;
fiftyList:Array<any>;
seventyList:Array<any>;
ninetyNineList:Array<any>;
hundredList:Array<any>;
my_chart;
yearList:Array<any>;
monthList:Array<any>;
detailFlag:boolean = false;
systemList:Array<any>;
videoList:Array<any>;
count:number;
total:number;
constructor(private myService: MyService) { }
ngOnInit() {
this.dropOptionsQuery('yd_trainning_file_type');
this.changeIsTeam(0);
this.yearList = [2018,2019,2020,2021,2022,2023,2024,2025];
this.monthList = [1,2,3,4,5,6,7,8,9,10,11,12]
this.my_chart = echarts.init(this.echarts.nativeElement);
this.my_chart.on('click', (params) => {
console.log(params)
});
}
dropOptionsQuery(code){
this.myService.dropOptionsQuery({code:code}).subscribe((res)=>{
if(res['success']){
this.optList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'].filter((item)=>{
return item.dropOptionCode != 'productTraining' && item.dropOptionCode!= 'trainingVideo'
});
this.optList = [{dropOptionCode:null,dropOptionName:'全部'}].concat(this.optList)
}
})
}
selectOpt(){
}
changeIsTeam(isTeam){
this.isTeam = isTeam;
const params = {
dateSpan:'2022-08-31 23:59:59',
practitionerId:25,
// practitionerId:JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'],
mdDropOptionCode:null
}
if(this.isTeam == 0){
this.myService.personalCompletionRate(params).subscribe((res)=>{
console.log(res)
if(res['success']){
this.zeroList = res['data']['zeroList'];
this.fiftyList = res['data']['fiftyList'];
this.seventyList = res['data']['seventyList'];
this.ninetyNineList = res['data']['ninetyNineList'];
this.hundredList = res['data']['hundredList'];
}else{
this.zeroList = this.fiftyList = this.seventyList = this.ninetyNineList = this.hundredList = [];
}
this.detailList = this.zeroList.concat(this.fiftyList).concat(this.seventyList).concat(this.ninetyNineList).concat(this.hundredList)
this.personY = [].concat(this.zeroList.length).concat(this.fiftyList.length).concat(this.seventyList.length).concat(this.ninetyNineList.length).concat(this.hundredList.length)
this.chartOption = {
xAxis: {
type: 'category',
name:'(学习进度)',
nameTextStyle:{
padding:[25,0,0,-28],
color:'#666',
fontSize:10
},
data: ['0', '1-50%', '51-70%', '71-99%', '100%'],
axisLabel: { //坐标轴刻度标签的相关设置。
interval: 0,//设置为 1,表示『隔一个标签显示一个标签』
textStyle: {
fontSize: 10,
color:'#666'
},
rotate:0,
},
axisTick:{//坐标轴刻度相关设置。
show: false,
},
axisLine: { // 坐标轴 轴线
show: true, // 是否显示
//symbol: ['none', 'arrow'], // 是否显示轴线箭头
//symbolSize: [8, 8], // 箭头大小
//symbolOffset: [0, 7], // 箭头位置
// ------ 线 ---------
lineStyle: {
color: '#5F83FF',
width: 2,
type: 'solid'
}
},
},
yAxis: {
name:'(人)',
show:true,
type: 'value',
splitNumber: 3,
axisTick:{//坐标轴刻度相关设置。
show: true,
},
axisLine:{
show:true
}
},
series: [
{
data: this.personY,
type: 'bar',
showBackground: false,
barWidth: 30,
itemStyle: {
normal:{
show: true,
color: "#9EB4FF",
barBorderRadius:5,
borderWidth: 0,
label:{
formatter:"{c} 人",
show:true,
position:"top",
textStyle:{
fontWeight:"border",
fontSize:12,
color:"#333"
}
}
}
},
emphasis: {
itemStyle: {
color:'#5F83FF'
}
}
}
]
};
})
}
if(this.isTeam == 1){
this.myService.teamCompletionRate(params).subscribe((res)=>{
console.log(res)
if(res['success']){
this.systemList = res['data']['systemList'];
}else{
this.systemList = [];
}
if(this.systemList.length){
this.teamX = this.systemList.map((item)=>{
return `${item.systemName}(${item.peopleRate})`
});
this.detailList = [];
for(let i=0;i<this.systemList.length;i++){
this.detailList = this.detailList.concat(this.systemList[i]['list'])
}
}
this.chartOption = {
xAxis: {
type: 'category',
data: this.teamX,
name:'(团队/人)',
nameTextStyle:{
padding:[25,0,0,-28],
color:'#666'
},
axisTick:{show: false},
axisLabel: {
show: true,
interval:0,
formatter:function(params) {
var newParamsName = "";
var paramsNameNumber = params.length;
var provideNumber = 5; //一行显示几个字
var rowNumber = Math.ceil(paramsNameNumber / provideNumber);
if (paramsNameNumber > provideNumber) {
for (var p = 0; p < rowNumber; p++) {
var tempStr = "";
var start = p * provideNumber;
var end = start + provideNumber;
if (p == rowNumber - 1) {
tempStr = params.substring(start, paramsNameNumber);
} else {
tempStr = params.substring(start, end) + "\n";
}
newParamsName += tempStr;
}
} else {
newParamsName = params;
}
return newParamsName
},
}
},
yAxis: {
type: 'value',
name:'(学习进度%)',
axisTick:{show: false},
axisLabel:{
textStyle: {
fontSize: 10,
},
formatter:'{value}%'
},
},
series: [
{
data: ['20', '40', '60','80', '100'],
type: 'bar',
showBackground: false,
barWidth: 30,
itemStyle: {
normal:{
show: true,
color: "#9EB4FF",
barBorderRadius:5,
borderWidth: 0,
label:{
formatter:"{c} %",
show:true,
position:"top",
textStyle:{
fontWeight:"border",
fontSize:12,
color:"#333"
}
}
},
},
emphasis: {
itemStyle: {
color:'#5F83FF'
}
}
}
]
};
})
}
}
onChartClick(event){
console.log(event.dataIndex)
if(this.isTeam == 0){
if(event.dataIndex == 0){
this.detailList = this.zeroList;
}else if(event.dataIndex == 1){
this.detailList = this.fiftyList;
}else if(event.dataIndex == 2){
this.detailList = this.seventyList;
}else if(event.dataIndex == 3){
this.detailList = this.ninetyNineList;
}else if(event.dataIndex == 4){
this.detailList = this.hundredList;
}
}
if(this.isTeam == 1){
for(let i=0;i<this.systemList.length;i++){
if(event.dataIndex == i){
this.detailList = this.systemList[i]['list'];
}
}
}
}
getLearnDetail(practitionerId){
this.detailFlag = true;
this.myService.queryLearningProgressDetail({practitionerId:practitionerId}).subscribe((res)=>{
console.log(res)
if(res['success']){
this.videoList = res['data']['videoList'];
this.count = res['data']['count'];
this.total = res['data']['total'];
}else{
this.videoList = [];
this.count = 0;
this.total = 0;
}
})
}
}
......@@ -900,4 +900,56 @@ export class MyService {
const url = this.API + "/videoPlay/queryVideoPlayback";
return this.http.post(url,JSON.stringify(params))
}
<<<<<<< HEAD
=======
// 讲师信息查询
lecturerQuery(params){
const url = this.API + "/college/lecturerQuery";
return this.http.post(url,JSON.stringify(params))
}
// 消息列表
querySystemMessage(params){
const url = this.API + "/systemMessage/querySystemMessage";
return this.http.post(url,JSON.stringify(params))
}
// 消息详情
querySystemMessageDetail(params){
const url = this.API + "/systemMessage/querySystemMessageDetail";
return this.http.post(url,JSON.stringify(params))
}
// 一键已读
oneKeyRead(params){
const url = this.API + "/systemMessage/oneKeyRead";
return this.http.post(url,JSON.stringify(params))
}
//我的管理个人数据
personalCompletionRate(params){
const url = this.API + "/videoPlay/personalCompletionRate";
return this.http.post(url,JSON.stringify(params))
}
//我的管理团队数据
teamCompletionRate(params){
const url = this.API + "/videoPlay/teamCompletionRate";
return this.http.post(url,JSON.stringify(params))
}
//学习明细接口
queryLearningProgressDetail(params){
const url = this.API + "/videoPlay/queryLearningProgressDetail";
return this.http.post(url,JSON.stringify(params))
}
//动态公告佣
queryCommissionInfoByYdLife(params){
const url = this.API + "/commission/queryCommissionInfoByYdLife";
return this.http.post(url,JSON.stringify(params))
}
>>>>>>> 338ece1... 动态公告佣金显示
}
......@@ -15,6 +15,7 @@ export class ProductDataComponent implements OnInit {
posterUrl:any;
posterInfo:any;
sellingPointDescList:Array<any>;
isActive:any;
constructor(private router: Router,private myService:MyService,private activatedRoute: ActivatedRoute,private _toast: ToastService) {
}
......@@ -37,6 +38,7 @@ export class ProductDataComponent implements OnInit {
this.posterUrl = this.posterInfo[0]['fileInfos']['0']['ossFilePath'];
}
this.sellingPointDescList = res['data']['sellingPointDescList'];
this.isActive = res['data']['isActive'];
}else{
const toast = ToastService.show(`${res['message']}`, 0);
setTimeout(() => {
......@@ -50,8 +52,16 @@ export class ProductDataComponent implements OnInit {
if(urlItem['categoryId'] != 35){
this.router.navigate(['/filelist'],{queryParams:{planId:this.planId,productId:this.productId,categoryId:urlItem['categoryId']}})
}else{
sessionStorage.setItem('commission',urlItem['fileInfos'][0]['description'])
this.router.navigate(['/commission']);
sessionStorage.setItem('commission',urlItem['fileInfos'][0]['description']);
if(this.isActive == null){
const toast = ToastService.show('暂未配置公告佣金', 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
}else{
this.router.navigate(['/commission'],{queryParams:{productId:this.productId,planId:this.planId,isActive:this.isActive}});
}
}
}
......
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