Commit 8c634c47 by sunchao

产品库查询接口对接

parent 9a6404d4
...@@ -10,11 +10,19 @@ ...@@ -10,11 +10,19 @@
</div> </div>
<img alt="薪资单" src="{{vxUrl}}" *ngIf="vxUrl" (click)="selectPic()"> <img alt="薪资单" src="{{vxUrl}}" *ngIf="vxUrl" (click)="selectPic()">
<ul class="tips"> <ul class="tips">
<li>如果报聘职级位A2(业务经理),保险从业经验1年以上;</li> <li>如果报聘职级为A1(销售助理),可无保险从业经验要求;</li>
<li>如果报聘职级为A3(业务总监),在最近三年内,至少一年同业收入达18万;</li> <li>如果报聘职级为A2(销售顾问),必须有保险从业经验;</li>
<li>如果报聘职级为S1B(营销高级总监)在最近三年内,至少一年同业收入达48万;</li> <li>如果报聘职级为A3(销售主任),须绩优保险从业人员;</li>
<li>如果报聘职级为S1A(业务高级总监)在最近三年内,至少一年同业收入达60万;</li> <li>如果报聘职级为M1(销售经理),须携带2人入职;</li>
<li>如果报聘职级为S2(业务合伙人)在最近三年内,至少一年同业收入达100万;</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> </ul>
</div> </div>
<footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'"> <footer class="fixed" (click)="next()" *ngIf="approveStatus==null || approveStatus=='-1'">
......
...@@ -668,4 +668,18 @@ export class MyService { ...@@ -668,4 +668,18 @@ export class MyService {
return this.http return this.http
.post(url, JSON.stringify(param)); .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 @@ ...@@ -86,7 +86,8 @@
</li> </li>
<li class="list-group-item" *ngIf="holderInfo?.idInfo.idNo"> <li class="list-group-item" *ngIf="holderInfo?.idInfo.idNo">
<span>证件号码</span> <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> </li>
</ul> </ul>
<div class="insuredsBox" *ngFor="let insured of insuredInfos;index as i"> <div class="insuredsBox" *ngFor="let insured of insuredInfos;index as i">
......
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {MyService} from '../my.service';
import { ActivatedRoute } from "@angular/router";
@Component({ @Component({
selector: 'ydlife-product-data', selector: 'ydlife-product-data',
...@@ -7,8 +9,9 @@ import {Component, OnInit} from '@angular/core'; ...@@ -7,8 +9,9 @@ import {Component, OnInit} from '@angular/core';
}) })
export class ProductDataComponent implements OnInit { export class ProductDataComponent implements OnInit {
productDataMenuLists: Array<any>; productDataMenuLists: Array<any>;
productId:any;
constructor() { planId:any;
constructor(private myService:MyService,private activatedRoute: ActivatedRoute) {
// 产品资料菜单 // 产品资料菜单
this.productDataMenuLists = [ this.productDataMenuLists = [
{id: 1, iconPath: 'comIntro.png', name: '保司介绍', active: 1}, {id: 1, iconPath: 'comIntro.png', name: '保司介绍', active: 1},
...@@ -24,6 +27,14 @@ export class ProductDataComponent implements OnInit { ...@@ -24,6 +27,14 @@ export class ProductDataComponent implements OnInit {
} }
ngOnInit() { 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="scrollContainer">
<div class="scrollContent" style="height: 100%;"> <div class="scrollContent">
<div class="issueContainer"> <div class="issueContainer">
<ul class="left"> <ul class="left">
<li (click)="switchCategory(null)" [ngClass]="{'actived':leftSelectedId===null}">全部</li> <li (click)="switchCategory(1,null)" [ngClass]="{'actived':leftSelectedId===null}">全部</li>
<li *ngFor="let leftItem of leftList" (click)="switchCategory(leftItem.id)" <li *ngFor="let leftItem of leftList" (click)="switchCategory(1,leftItem)"
[ngClass]="{'actived':leftSelectedId===leftItem.id}">{{leftItem.tagName}} [ngClass]="{'actived':leftSelectedId===leftItem.id}">{{leftItem.tagName}}
</li> </li>
</ul> </ul>
...@@ -16,119 +16,50 @@ ...@@ -16,119 +16,50 @@
<li (click)="allFilter()">筛选 <img src="assets/images/product_select.png" alt="筛选" style="width: 16px;height:16px;"></li> <li (click)="allFilter()">筛选 <img src="assets/images/product_select.png" alt="筛选" style="width: 16px;height:16px;"></li>
</ul> </ul>
<div class="mask" *ngIf="filterSelectedFlag" (click)="filterSelectedFlag=false"></div> <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"> <li *ngFor="let rightItem of rightList">
<h5>{{rightItem.tagName}}</h5> <h5>{{rightItem.tagName}}</h5>
<div class="optionLists"> <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> </div>
</li> </li>
</ul> </ul>
<ul class="productLists"> <div class="foot_btn">
<li> <div (click)="restart()">重置</div>
<div class="productInfoContent"> <div (click)="confirm()">确定</div>
<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>
<div class="priceContent">
<span></span><strong>48</strong><span>元起 | 每人每年</span>
</div> </div>
</div>
<div class="dataContent">
<div (click)="goData(1)">资料</div>
<div>可售</div>
</div>
</li>
<li> <ul class="productLists">
<div class="productInfoContent"> <li *ngFor="let productInfoItem of productInfos">
<h3>京东安联滑雪运动保障计划</h3> <div class="productInfoContent" (click)="goProductDetail(productInfoItem)">
<div class="featureContent"> <h3>{{productInfoItem.productName}}</h3>
<div>续保至99周岁</div> <div class="featureContent" *ngIf="productInfoItem['labels']">
<div>200万保额0免赔</div> <div *ngFor="let labelItem of productInfoItem['labels']">
</div> {{labelItem}}
<div class="insuranceRulesContent">
<p>投保年龄:20-50周岁</p>
<p>投保期限:1年</p>
</div> </div>
<div class="priceContent">
<span></span><strong>48</strong><span>元起 | 每人每年</span>
</div> </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>
<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>
<div class="priceContent"> <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> </div>
<div class="dataContent"> <div class="dataContent">
<div>资料</div> <div (click)="goData(productInfoItem)">资料</div>
<div>可售</div> <div>可售</div>
</div> </div>
</li> </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> </ul>
</div> </div>
</div> </div>
......
.scrollContainer { .scrollContainer {
position: relative; position: relative;
height: 100%; height: 100%;
.scrollContent{
height: 100%;
overflow: hidden;
.issueContainer { .issueContainer {
display: flex; display: flex;
height: 100%; height: 100%;
...@@ -11,9 +14,6 @@ ...@@ -11,9 +14,6 @@
overflow-y: scroll; overflow-y: scroll;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
background: #F6F6F6; background: #F6F6F6;
position: absolute;
left: 0;
top: 0;
li { li {
position: relative; position: relative;
white-space: nowrap; white-space: nowrap;
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
.right { .right {
width: calc(100% - 90px); width: calc(100% - 90px);
position: relative; position: relative;
margin-left: 90px; background-color: #fff;
.mask { .mask {
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -73,10 +73,10 @@ ...@@ -73,10 +73,10 @@
align-items: center; align-items: center;
color: #333; color: #333;
border-bottom: 1px #f5f5f5 solid; border-bottom: 1px #f5f5f5 solid;
position: absolute; background-color: #fff;
right: 0; overflow-x: hidden;
top: 0; overflow-y: scroll;
background: #fff; -webkit-overflow-scrolling: touch;
.iconfont { .iconfont {
color: #666; color: #666;
font-size: 10px; font-size: 10px;
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px 0 20px 10px; padding: 20px 0 20px 10px;
ul{
> li { > li {
margin-bottom: 15px; margin-bottom: 15px;
h5 { h5 {
...@@ -105,7 +106,7 @@ ...@@ -105,7 +106,7 @@
> div { > div {
margin-right: 10px; margin-right: 10px;
flex: 1; flex: 1;
background: #ececec; background: #f6f6f6;
height: 38px; height: 38px;
line-height: 38px; line-height: 38px;
text-align: center; text-align: center;
...@@ -113,14 +114,52 @@ ...@@ -113,14 +114,52 @@
min-width: 29%; min-width: 29%;
max-width: 30%; 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 { .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 { > li {
padding-left: 16px; padding-left: 16px;
border-bottom: 1px solid #dcdcdc; border-bottom: 1px solid #dcdcdc;
padding-bottom: 15px;
}
li:last-child{
border-bottom: 0;
} }
.productInfoContent { .productInfoContent {
h3 { h3 {
...@@ -133,6 +172,7 @@ ...@@ -133,6 +172,7 @@
.featureContent { .featureContent {
display: flex; display: flex;
margin-bottom: 10px; margin-bottom: 10px;
align-items: center;
> div { > div {
padding: 6px; padding: 6px;
background: #FCF2F1; background: #FCF2F1;
...@@ -178,6 +218,8 @@ ...@@ -178,6 +218,8 @@
} }
} }
} }
}
} }
.slowRight { .slowRight {
......
...@@ -2,7 +2,10 @@ import {Component, OnInit} from '@angular/core'; ...@@ -2,7 +2,10 @@ import {Component, OnInit} from '@angular/core';
import {LifeCommonService} from '../../common/life-common.service'; import {LifeCommonService} from '../../common/life-common.service';
import {MyService} from '../../my/my.service'; import {MyService} from '../../my/my.service';
import {Router} from "@angular/router"; 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({ @Component({
selector: 'ydlife-product', selector: 'ydlife-product',
templateUrl: './product.component.html', templateUrl: './product.component.html',
...@@ -14,8 +17,15 @@ export class ProductComponent implements OnInit { ...@@ -14,8 +17,15 @@ export class ProductComponent implements OnInit {
rightList: Array<any>; rightList: Array<any>;
leftSelectedId: number = null; leftSelectedId: number = null;
filterSelectedFlag: boolean = false; filterSelectedFlag: boolean = false;
tagIds:Array<any> = [];
constructor(private myService: MyService, public lifeCommonService: LifeCommonService, private router: Router) { productInfos:Array<any>;
productInfo: Plans;
inquiry: User;
constructor(private myService: MyService,
public lifeCommonService: LifeCommonService,
private router: Router,
private _toast: ToastService,
private ls: LocalStorage) {
} }
ngOnInit() { ngOnInit() {
...@@ -23,24 +33,22 @@ export class ProductComponent implements OnInit { ...@@ -23,24 +33,22 @@ export class ProductComponent implements OnInit {
this.tagViewQuery(305); this.tagViewQuery(305);
this.tagViewQuery(309); this.tagViewQuery(309);
this.tagViewQuery(306); 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) { //type:1表示左侧筛选2表示右侧筛选
this.leftSelectedId = id; 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筛选 //type:305左侧,309上侧,306筛选
...@@ -53,6 +61,8 @@ export class ProductComponent implements OnInit { ...@@ -53,6 +61,8 @@ export class ProductComponent implements OnInit {
if (res['success']) { if (res['success']) {
if (type == 305) { if (type == 305) {
this.leftList = res['data']['tagViewQueryInfos']; this.leftList = res['data']['tagViewQueryInfos'];
//初始化查推荐产品
this.switchCategory(1,this.leftList[0])
} else if (type == 309) { } else if (type == 309) {
this.topList = res['data']['tagViewQueryInfos']; this.topList = res['data']['tagViewQueryInfos'];
} else { } else {
...@@ -64,12 +74,83 @@ export class ProductComponent implements OnInit { ...@@ -64,12 +74,83 @@ export class ProductComponent implements OnInit {
// 筛选 // 筛选
allFilter() { allFilter() {
this.tagViewQuery(306);
this.filterSelectedFlag = true; this.filterSelectedFlag = true;
} }
// 进入产品资料页面 // 进入产品资料页面
goData(e) { goData(productInfoItem) {
this.router.navigate(['/productData', e]); 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