Commit 8c634c47 by sunchao

产品库查询接口对接

parent 9a6404d4
......@@ -10,11 +10,19 @@
</div>
<img alt="薪资单" src="{{vxUrl}}" *ngIf="vxUrl" (click)="selectPic()">
<ul class="tips">
<li>如果报聘职级位A2(业务经理),保险从业经验1年以上;</li>
<li>如果报聘职级为A3(业务总监),在最近三年内,至少一年同业收入达18万;</li>
<li>如果报聘职级为S1B(营销高级总监)在最近三年内,至少一年同业收入达48万;</li>
<li>如果报聘职级为S1A(业务高级总监)在最近三年内,至少一年同业收入达60万;</li>
<li>如果报聘职级为S2(业务合伙人)在最近三年内,至少一年同业收入达100万;</li>
<li>如果报聘职级为A1(销售助理),可无保险从业经验要求;</li>
<li>如果报聘职级为A2(销售顾问),必须有保险从业经验;</li>
<li>如果报聘职级为A3(销售主任),须绩优保险从业人员;</li>
<li>如果报聘职级为M1(销售经理),须携带2人入职;</li>
<li>如果报聘职级为M2(高级销售经理),须携带3人入职;</li>
<li>如果报聘职级为M3(资深销售经理),须携带4人入职;</li>
<li>如果报聘职级为M4(销售总监),须携带5人入职;</li>
<li>如果报聘职级为M5(销售经理),须携带6人入职;</li>
<li>如果报聘职级为M6(资深销售总监),须携带7人入职;</li>
<li>如果报聘职级为S1(合伙人),须携带 12 人入职,至少包含1名 M6 职级,并提供过去一年内30万保险销售收入证明;</li>
<li>如果报聘职级为S2(高级合伙人),须携带24人入职,至少包含1名 S1 职级,并提供过去一年内50万保险销售收入证明;</li>
<li>如果报聘职级为S3(资深合伙人),须携带 75 人入职,至少各含一名S1和S2职级,并提供过去一年内 100 万保险销售收入证明;</li>
<li>如果报聘职级为IA(独立经纪人),须要符合经纪人聘用条件的绩优保险从业人员</li>
</ul>
</div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
......
......@@ -668,4 +668,18 @@ export class MyService {
return this.http
.post(url, JSON.stringify(param));
}
//根据标签查询产品库标签
queryProductBox(param){
const url = this.API + "/erp/queryProductBox";
return this.http
.post(url, JSON.stringify(param));
}
//查询产品对应的文件
queryProductFile(param){
const url = this.API + "/erp/queryProductFile";
return this.http
.post(url, JSON.stringify(param));
}
}
......@@ -86,7 +86,8 @@
</li>
<li class="list-group-item" *ngIf="holderInfo?.idInfo.idNo">
<span>证件号码</span>
<span>{{holderInfo?.idInfo.idNo.substr(0,2) + '******' + holderInfo?.idInfo.idNo.substr(holderInfo?.idInfo.idNo.length-2,2)}}</span>
<span>{{holderInfo?.idInfo.idNo}}</span>
<!-- <span>{{holderInfo?.idInfo.idNo.substr(0,2) + '******' + holderInfo?.idInfo.idNo.substr(holderInfo?.idInfo.idNo.length-2,2)}}</span> -->
</li>
</ul>
<div class="insuredsBox" *ngFor="let insured of insuredInfos;index as i">
......
import {Component, OnInit} from '@angular/core';
import {MyService} from '../my.service';
import { ActivatedRoute } from "@angular/router";
@Component({
selector: 'ydlife-product-data',
......@@ -7,8 +9,9 @@ import {Component, OnInit} from '@angular/core';
})
export class ProductDataComponent implements OnInit {
productDataMenuLists: Array<any>;
constructor() {
productId:any;
planId:any;
constructor(private myService:MyService,private activatedRoute: ActivatedRoute) {
// 产品资料菜单
this.productDataMenuLists = [
{id: 1, iconPath: 'comIntro.png', name: '保司介绍', active: 1},
......@@ -24,6 +27,14 @@ export class ProductDataComponent implements OnInit {
}
ngOnInit() {
this.productId = this.activatedRoute.snapshot.paramMap.get('id');
this.planId = this.activatedRoute.snapshot.queryParams.planId?this.activatedRoute.snapshot.queryParams.planId:null;
this.queryProductFile();
}
queryProductFile(){
this.myService.queryProductFile({productId:this.productId,planId:this.planId}).subscribe((res)=>{
console.log(res)
})
}
}
<div class="scrollContainer">
<div class="scrollContent" style="height: 100%;">
<div class="scrollContent">
<div class="issueContainer">
<ul class="left">
<li (click)="switchCategory(null)" [ngClass]="{'actived':leftSelectedId===null}">全部</li>
<li *ngFor="let leftItem of leftList" (click)="switchCategory(leftItem.id)"
<li (click)="switchCategory(1,null)" [ngClass]="{'actived':leftSelectedId===null}">全部</li>
<li *ngFor="let leftItem of leftList" (click)="switchCategory(1,leftItem)"
[ngClass]="{'actived':leftSelectedId===leftItem.id}">{{leftItem.tagName}}
</li>
</ul>
......@@ -16,119 +16,50 @@
<li (click)="allFilter()">筛选 <img src="assets/images/product_select.png" alt="筛选" style="width: 16px;height:16px;"></li>
</ul>
<div class="mask" *ngIf="filterSelectedFlag" (click)="filterSelectedFlag=false"></div>
<ul class="select_all slowRight" *ngIf="filterSelectedFlag">
<div class="select_all slowRight" *ngIf="filterSelectedFlag">
<ul>
<li *ngFor="let rightItem of rightList">
<h5>{{rightItem.tagName}}</h5>
<div class="optionLists">
<div *ngFor="let optItem of rightItem.tagViewQueryInfos">{{optItem.tagName}}</div>
<div *ngFor="let optItem of rightItem.tagViewQueryInfos"
(click)="switchCategory(2,optItem)" [ngClass]="{selected:optItem.selected == true}"
>{{optItem.tagName}}</div>
</div>
</li>
</ul>
<ul class="productLists">
<li>
<div class="productInfoContent">
<h3>京东安联滑雪运动保障计划</h3>
<div class="featureContent">
<div>续保至99周岁</div>
<div>200万保额0免赔</div>
</div>
<div class="insuranceRulesContent">
<p>投保年龄:20-50周岁</p>
<p>投保期限:1年</p>
<div class="foot_btn">
<div (click)="restart()">重置</div>
<div (click)="confirm()">确定</div>
</div>
<div class="priceContent">
<span></span><strong>48</strong><span>元起 | 每人每年</span>
</div>
</div>
<div class="dataContent">
<div (click)="goData(1)">资料</div>
<div>可售</div>
</div>
</li>
<li>
<div class="productInfoContent">
<h3>京东安联滑雪运动保障计划</h3>
<div class="featureContent">
<div>续保至99周岁</div>
<div>200万保额0免赔</div>
</div>
<div class="insuranceRulesContent">
<p>投保年龄:20-50周岁</p>
<p>投保期限:1年</p>
<ul class="productLists">
<li *ngFor="let productInfoItem of productInfos">
<div class="productInfoContent" (click)="goProductDetail(productInfoItem)">
<h3>{{productInfoItem.productName}}</h3>
<div class="featureContent" *ngIf="productInfoItem['labels']">
<div *ngFor="let labelItem of productInfoItem['labels']">
{{labelItem}}
</div>
<div class="priceContent">
<span></span><strong>48</strong><span>元起 | 每人每年</span>
</div>
<div class="insuranceRulesContent" *ngIf="productInfoItem['adaptionInfos']">
<div *ngFor="let adaptionItem of productInfoItem['adaptionInfos']">
<span>{{adaptionItem.name}}:</span>
<span [innerHtml]="adaptionItem.value"></span>
</div>
<div class="dataContent">
<div>资料</div>
<div>可售</div>
</div>
</li>
<li>
<div class="productInfoContent">
<h3>京东安联滑雪运动保障计划</h3>
<div class="featureContent">
<div>续保至99周岁</div>
<div>200万保额0免赔</div>
</div>
<div class="insuranceRulesContent">
<p>投保年龄:20-50周岁</p>
<p>投保期限:1年</p>
</div>
<div class="priceContent">
<span></span><strong>48</strong><span>元起 | 每人每年</span>
<span></span><strong>{{productInfoItem.price | number:'1.0-0'}}</strong><span>元起 | 每人每年</span>
</div>
</div>
<div class="dataContent">
<div>资料</div>
<div (click)="goData(productInfoItem)">资料</div>
<div>可售</div>
</div>
</li>
<li>
<div class="productInfoContent">
<h3>京东安联滑雪运动保障计划</h3>
<div class="featureContent">
<div>续保至99周岁</div>
<div>200万保额0免赔</div>
</div>
<div class="insuranceRulesContent">
<p>投保年龄:20-50周岁</p>
<p>投保期限:1年</p>
</div>
<div class="priceContent">
<span></span><strong>48</strong><span>元起 | 每人每年</span>
</div>
</div>
<div class="dataContent">
<div>资料</div>
<div>可售</div>
</div>
</li>
<li>
<div class="productInfoContent">
<h3>京东安联滑雪运动保障计划</h3>
<div class="featureContent">
<div>续保至99周岁</div>
<div>200万保额0免赔</div>
</div>
<div class="insuranceRulesContent">
<p>投保年龄:20-50周岁</p>
<p>投保期限:1年</p>
</div>
<div class="priceContent">
<span></span><strong>48</strong><span>元起 | 每人每年</span>
</div>
</div>
<div class="dataContent">
<div>资料</div>
<div>可售</div>
</div>
</li>
</ul>
</div>
</div>
......
.scrollContainer {
position: relative;
height: 100%;
.scrollContent{
height: 100%;
overflow: hidden;
.issueContainer {
display: flex;
height: 100%;
......@@ -11,9 +14,6 @@
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
background: #F6F6F6;
position: absolute;
left: 0;
top: 0;
li {
position: relative;
white-space: nowrap;
......@@ -55,7 +55,7 @@
.right {
width: calc(100% - 90px);
position: relative;
margin-left: 90px;
background-color: #fff;
.mask {
position: fixed;
left: 0;
......@@ -73,10 +73,10 @@
align-items: center;
color: #333;
border-bottom: 1px #f5f5f5 solid;
position: absolute;
right: 0;
top: 0;
background: #fff;
background-color: #fff;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
.iconfont {
color: #666;
font-size: 10px;
......@@ -90,6 +90,7 @@
width: 100%;
height: 100%;
padding: 20px 0 20px 10px;
ul{
> li {
margin-bottom: 15px;
h5 {
......@@ -105,7 +106,7 @@
> div {
margin-right: 10px;
flex: 1;
background: #ececec;
background: #f6f6f6;
height: 38px;
line-height: 38px;
text-align: center;
......@@ -113,14 +114,52 @@
min-width: 29%;
max-width: 30%;
}
div.selected{
color: #fff;
background: #F8002E;
}
}
}
}
.foot_btn{
display: flex;
width: 100%;
justify-content: space-around;
text-align: center;
div{
width: 48%;
height: 40px;
line-height: 40px;
border-radius: 10px;
}
div:nth-child(1){
border: 2px #F8002E solid;
color: #F8002E;
}
div:nth-child(2){
background:#F8002E;
color: #fff;
}
}
}
.productLists {
margin-top: 44px;
background-color: #fff;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
padding-bottom: 60px;
> li {
padding-left: 16px;
border-bottom: 1px solid #dcdcdc;
padding-bottom: 15px;
}
li:last-child{
border-bottom: 0;
}
.productInfoContent {
h3 {
......@@ -133,6 +172,7 @@
.featureContent {
display: flex;
margin-bottom: 10px;
align-items: center;
> div {
padding: 6px;
background: #FCF2F1;
......@@ -178,6 +218,8 @@
}
}
}
}
}
.slowRight {
......
......@@ -2,7 +2,10 @@ import {Component, OnInit} from '@angular/core';
import {LifeCommonService} from '../../common/life-common.service';
import {MyService} from '../../my/my.service';
import {Router} from "@angular/router";
import {ToastService } from 'ng-zorro-antd-mobile';
import { Plans } from '../../domain/plans';
import { LocalStorage } from '../../domain/local.storage';
import { User } from '../../domain/user';
@Component({
selector: 'ydlife-product',
templateUrl: './product.component.html',
......@@ -14,8 +17,15 @@ export class ProductComponent implements OnInit {
rightList: Array<any>;
leftSelectedId: number = null;
filterSelectedFlag: boolean = false;
constructor(private myService: MyService, public lifeCommonService: LifeCommonService, private router: Router) {
tagIds:Array<any> = [];
productInfos:Array<any>;
productInfo: Plans;
inquiry: User;
constructor(private myService: MyService,
public lifeCommonService: LifeCommonService,
private router: Router,
private _toast: ToastService,
private ls: LocalStorage) {
}
ngOnInit() {
......@@ -23,24 +33,22 @@ export class ProductComponent implements OnInit {
this.tagViewQuery(305);
this.tagViewQuery(309);
this.tagViewQuery(306);
// this.leftList = [
// {name:'全部',tagId:null},
// {name:'推荐',tagId:1},
// {name:'新品',tagId:2},
// {name:'意外',tagId:3},
// {name:'医疗',tagId:4},
// {name:'旅游',tagId:5},
// {name:'重疾',tagId:6},
// {name:'年金',tagId:7},
// {name:'定寿',tagId:8},
// {name:'终身寿',tagId:9},
// {name:'留学',tagId:10},
// {name:'高端医疗',tagId:11}
// ]
}
switchCategory(id) {
this.leftSelectedId = id;
//type:1表示左侧筛选2表示右侧筛选
switchCategory(type,item?:any) {
if(type == 1){
if(item && item.tagId!=null){
this.leftSelectedId = item.id;
this.tagIds = [item.tagId]
}else{
this.leftSelectedId = null;
this.tagIds = [];
}
this.queryProductBox();
}else if(type==2){
item.selected = !item.selected;
}
}
//type:305左侧,309上侧,306筛选
......@@ -53,6 +61,8 @@ export class ProductComponent implements OnInit {
if (res['success']) {
if (type == 305) {
this.leftList = res['data']['tagViewQueryInfos'];
//初始化查推荐产品
this.switchCategory(1,this.leftList[0])
} else if (type == 309) {
this.topList = res['data']['tagViewQueryInfos'];
} else {
......@@ -64,12 +74,83 @@ export class ProductComponent implements OnInit {
// 筛选
allFilter() {
this.tagViewQuery(306);
this.filterSelectedFlag = true;
}
// 进入产品资料页面
goData(e) {
this.router.navigate(['/productData', e]);
goData(productInfoItem) {
this.router.navigate(['/productData', productInfoItem.productId],{queryParams:{planId:productInfoItem.planId}});
}
//根据标签查询产品
queryProductBox(){
this.myService.queryProductBox({tagIds:this.tagIds}).subscribe((res)=>{
if(res['success']){
this.productInfos = res['data']['productInfos'];
//截取两个特色
if(this.productInfos && this.productInfos.length>0){
for(const productInfos of this.productInfos){
if(productInfos.labels){
productInfos.labels.splice(2);
}
}
}
}else{
this.productInfos= [];
const toast = ToastService.show(`${res['message']}`, 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
}
})
}
//重置
restart(){
for(let i=0;i<this.rightList.length;i++){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
this.rightList[i]['tagViewQueryInfos'][j]['selected'] = false;
}
}
}
//确定搜索
confirm(){
for(let i=0;i<this.rightList.length;i++){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
if(this.rightList[i]['tagViewQueryInfos'][j]['selected'] == true){
this.tagIds.push(this.rightList[i]['tagViewQueryInfos'][j]['tagId'])
}
}
}
this.filterSelectedFlag = false;
this.queryProductBox();
}
// 点击产品进入详情页
goProductDetail(product: Plans): void {
this.productInfo = product;
this.productInfo.type = 2;
if (this.productInfo.noPlanProduct === true) {
window.location.href = `https://${window.location.host}/life/${this.productInfo.productId}`
} else {
if (this.productInfo.productCategoryId === 1 || this.productInfo.productCategoryId === 4) {
window.location.href = `https://${window.location.host}/pdetail/${this.productInfo.planId}`
} else if (this.productInfo.productCategoryId === 2) {
window.location.href = `https://${window.location.host}/hProductDetail/${this.productInfo.planId}?type=7`
} else if (this.productInfo.productCategoryId === 5) {
window.location.href = `https://${window.location.host}/hProductDetail/${this.productInfo.planId}?type=9`
} else {
window.location.href = `https://${window.location.host}/life/${this.productInfo.productId}`
this.router.navigate(['/pdetail', this.productInfo.planId]);
}
}
}
// 根据开始时间设置结束时间,天数应减1,当日~当日是一天
setInitDate() {
this.productInfo.dayCount = this.lifeCommonService.yearDayCount(this.productInfo.dayCount, this.productInfo.insurerId == '5');
this.lifeCommonService.setInitDate(this.productInfo.dayCount);
}
}
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