Commit 2437148a by sunchao

合并bug

parents 0e7481dc 2035286a
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --host 192.168.1.25 --port 4205", "start": "ng serve --host 0.0.0.0 --port 4205 -o",
"buildDev": "ng build -c=dev --prod", "buildDev": "ng build -c=dev --prod",
"buildStage": "ng build -c=stage --prod", "buildStage": "ng build -c=stage --prod",
"buildProd": "ng build -c=production --prod", "buildProd": "ng build -c=production --prod",
......
...@@ -35,4 +35,7 @@ export class Plans { ...@@ -35,4 +35,7 @@ export class Plans {
needIdCard?: string; needIdCard?: string;
isActiveForProduct?: number; isActiveForProduct?: number;
isActiveForPlan?: number; isActiveForPlan?: number;
isActive?:any;
isThirdPartyPurchase?:any;
thirdPartyPurchaseUrl?:any;
} }
...@@ -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'">
......
<div class="rich_media_content" >
<div [innerHTML]="commission | safeHtml">
</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));
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CommissionComponent } from './commission.component';
describe('CommissionComponent', () => {
let component: CommissionComponent;
let fixture: ComponentFixture<CommissionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CommissionComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CommissionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'ydlife-commission',
templateUrl: './commission.component.html',
styleUrls: ['./commission.component.scss']
})
export class CommissionComponent implements OnInit {
commission:any;
constructor() { }
ngOnInit() {
this.commission = sessionStorage.getItem('commission')
console.log(this,this.commission)
}
}
<div class="fileUploadLists">
<div class="contentList">
<ul>
<li *ngFor="let fileItem of fileList">
<a href="{{fileItem.ossFilePath}}" download="{{fileItem.displayName}}" target="_blank">
<div title="{{fileItem.displayName}}">{{fileItem.displayName}}</div>
<div style="position: absolute;right: 5px;top: 6px;"><i class="iconfont icon-xiazai"></i></div>
</a>
</li>
</ul>
</div>
</div>
\ No newline at end of file
.fileUploadLists {
height: 100%;
background: #f5f5f5;
ul {
list-style: none;
}
.contentList{
background-color: #fff;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
height: auto;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
ul li{
border-bottom: 1px solid #dcdcdc;
padding: 12px 20px;
position: relative;
.icon-xiazai {
font-size: 22px;
color: #ec2d37;
font-weight: bold;
}
a {
display: flex;
align-items: center;
color: #000;
.iconfont {
color: #ec2d37;
font-size: 22px;
margin-right: 8px;
}
}
}
ul li:last-child {
border: none;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FileListComponent } from './file-list.component';
describe('FileListComponent', () => {
let component: FileListComponent;
let fixture: ComponentFixture<FileListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FileListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FileListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from "@angular/router";
import { MyService } from "../my.service";
@Component({
selector: 'ydlife-file-list',
templateUrl: './file-list.component.html',
styleUrls: ['./file-list.component.scss']
})
export class FileListComponent implements OnInit {
productDataMenuLists: Array<any>;
productId:any;
planId:any;
categoryId:any;
fileList:Array<any>;
constructor(private router: Router,private myService:MyService,private activatedRoute: ActivatedRoute,) { }
ngOnInit() {
// window.location.href = urlItem['fileInfos'][0]['ossFilePath'];
this.productId = this.activatedRoute.snapshot.queryParams.productId?this.activatedRoute.snapshot.queryParams.productId:null;;
this.planId = this.activatedRoute.snapshot.queryParams.planId?this.activatedRoute.snapshot.queryParams.planId:null;
this.categoryId = this.activatedRoute.snapshot.queryParams.categoryId?this.activatedRoute.snapshot.queryParams.categoryId:null;
this.queryProductFile();
}
queryProductFile(){
this.myService.queryProductFile({productId:this.productId,planId:this.planId}).subscribe((res)=>{
if(res['success']){
this.productDataMenuLists = res['data']['categoryInfos'];
for(let i=0;i<this.productDataMenuLists.length;i++){
if(this.categoryId == this.productDataMenuLists[i]['categoryId']){
this.fileList = this.productDataMenuLists[i]['fileInfos']
}
}
}
})
}
}
...@@ -234,6 +234,7 @@ export class MkMaterialDetailComponent implements OnInit { ...@@ -234,6 +234,7 @@ export class MkMaterialDetailComponent implements OnInit {
} }
// 0是有plan,1是无plan // 0是有plan,1是无plan
if (posterInfo.isPlan == '0') { if (posterInfo.isPlan == '0') {
if (posterInfo.productCategoryId == '2') { if (posterInfo.productCategoryId == '2') {
this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=7`; this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=7`;
} else if (posterInfo.productCategoryId == '5') { } else if (posterInfo.productCategoryId == '5') {
......
...@@ -93,9 +93,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -93,9 +93,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{ no: 4, subtitle: '线上投保', icon: 'online', path: `https://${window.location.host}/index?source=dyd`, routerLink: '' ,showSubMenu:true}, { no: 4, subtitle: '线上投保', icon: 'online', path: `https://${window.location.host}/index?source=dyd`, routerLink: '' ,showSubMenu:true},
{ no: 13, subtitle: '我的商机', icon: 'line', path: '', routerLink: 'business',showSubMenu:true }, { no: 13, subtitle: '我的商机', icon: 'line', path: '', routerLink: 'business',showSubMenu:true },
{ no: 9, subtitle: '执业证书', icon: 'card', path: `https://${window.location.host}/brokerQry/#/brokerDetail/${this.lifeCustomerInfo.practitionerId}?source=0`, routerLink: '',showSubMenu:true }, { no: 9, subtitle: '执业证书', icon: 'card', path: `https://${window.location.host}/brokerQry/#/brokerDetail/${this.lifeCustomerInfo.practitionerId}?source=0`, routerLink: '',showSubMenu:true },
{ no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true },
{ no: 7, subtitle: '文章分享', icon: 'article', path: '', routerLink: 'article/null' ,showSubMenu:true}, { no: 7, subtitle: '文章分享', icon: 'article', path: '', routerLink: 'article/null' ,showSubMenu:true},
{ no: 3, subtitle: '产品海报', icon: 'poster_p', path: '/salesDetail', routerLink: 'material',showSubMenu:true }, { no: 3, subtitle: '产品海报', icon: 'poster_p', path: '/salesDetail', routerLink: 'material',showSubMenu:true },
{ no: 17, subtitle: '产品库', icon: 'product', path: '', routerLink: 'product' ,showSubMenu:true},
], ],
isShow: true isShow: true
}, },
...@@ -121,8 +121,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -121,8 +121,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{ no: 21, subtitle: '公司制度', icon: 'management', path: '', routerLink: '',showSubMenu:true }, { no: 21, subtitle: '公司制度', icon: 'management', path: '', routerLink: '',showSubMenu:true },
{ no: 23, subtitle: '我的报聘', icon: 'pin', path: '', routerLink: 'my_application' ,showSubMenu:true}, { no: 23, subtitle: '我的报聘', icon: 'pin', path: '', routerLink: 'my_application' ,showSubMenu:true},
{ no: 24, subtitle: '目标设置', icon: 'set', path: '', routerLink: 'target',showSubMenu:true }, { no: 24, subtitle: '目标设置', icon: 'set', path: '', routerLink: 'target',showSubMenu:true },
{ no: 11, subtitle: '文件下载', icon: 'download', path: 'https://www.ydinsurance.cn/?page_id=13957', routerLink: 'fileUpload',showSubMenu:true },
{ no: 25, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true}, { no: 25, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true},
{ no: 26, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true} { no: 26, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:!this.isShowSalay}
], ],
isShow: true isShow: true
}, },
...@@ -131,9 +132,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -131,9 +132,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
content: [ content: [
{ no: 5, subtitle: '保险ABC', icon: 'abc', path: `https://${window.location.host}/issue`, routerLink: '' ,showSubMenu:true}, { no: 5, subtitle: '保险ABC', icon: 'abc', path: `https://${window.location.host}/issue`, routerLink: '' ,showSubMenu:true},
{ no: 6, subtitle: '培训课件', icon: 'train', path: '', routerLink: 'training',showSubMenu:true }, { no: 6, subtitle: '培训课件', icon: 'train', path: '', routerLink: 'training',showSubMenu:true },
{ no: 11, subtitle: '文件下载', icon: 'download', path: 'https://www.ydinsurance.cn/?page_id=13957', routerLink: 'fileUpload',showSubMenu:true }, { no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true },
{ no: 17, subtitle: '产品库', icon: 'product', path: 'https://www.ydinsurance.cn/?page_id=14331', routerLink: '' ,showSubMenu:true} { no: 26, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true}
// { no: 17, subtitle: '产品库', icon: 'product', path: '', routerLink: 'https://www.ydinsurance.cn/?page_id=14331' ,showSubMenu:true}
], ],
isShow: true isShow: true
} }
......
...@@ -55,7 +55,9 @@ import { ArticleReadComponent } from './article-read/article-read.component'; ...@@ -55,7 +55,9 @@ import { ArticleReadComponent } from './article-read/article-read.component';
import { SalaryDetailComponent } from './salary-detail/salary-detail.component'; import { SalaryDetailComponent } from './salary-detail/salary-detail.component';
import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.component'; import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.component';
import { ProductComponent } from './product/product.component'; import { ProductComponent } from './product/product.component';
import { ProductDataComponent } from "./product-data/product-data.component";
import { CommissionComponent } from './commission/commission.component';
import { FileListComponent } from './file-list/file-list.component';
const myRoutes: Routes = [ const myRoutes: Routes = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] }, { path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
...@@ -117,7 +119,10 @@ const myRoutes: Routes = [ ...@@ -117,7 +119,10 @@ const myRoutes: Routes = [
{ path: 'article_read/:id',component:ArticleReadComponent,canActivate:[AuthGuard]}, { path: 'article_read/:id',component:ArticleReadComponent,canActivate:[AuthGuard]},
{ path: 'salary_detail',component:SalaryDetailComponent,canActivate:[AuthGuard]}, { path: 'salary_detail',component:SalaryDetailComponent,canActivate:[AuthGuard]},
{ path: 'salary_detail/:id',component:SalaryFirstYearComponent,canActivate:[AuthGuard]}, { path: 'salary_detail/:id',component:SalaryFirstYearComponent,canActivate:[AuthGuard]},
{ path: 'product',component:ProductComponent,canActivate:[AuthGuard]} { path: 'product',component:ProductComponent,canActivate:[AuthGuard]},
{ path: 'productData/:id',component:ProductDataComponent,canActivate:[AuthGuard]},
{ path: 'commission',component:CommissionComponent,canActivate:[AuthGuard]},
{ path: 'filelist',component:FileListComponent,canActivate:[AuthGuard]}
]; ];
@NgModule({ @NgModule({
......
...@@ -68,9 +68,12 @@ import { SalaryDetailComponent } from './salary-detail/salary-detail.component'; ...@@ -68,9 +68,12 @@ import { SalaryDetailComponent } from './salary-detail/salary-detail.component';
import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.component'; import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.component';
import { DetailModalComponent } from '../common/detail-modal/detail-modal.component'; import { DetailModalComponent } from '../common/detail-modal/detail-modal.component';
import { ProductComponent } from './product/product.component'; import { ProductComponent } from './product/product.component';
import { ProductDataComponent } from './product-data/product-data.component';
import { CommissionComponent } from './commission/commission.component';
import { FileListComponent } from './file-list/file-list.component';
@NgModule({ @NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent, ArticleComponent, ArticleDetailComponent, ArticleReadComponent,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent], declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent, ArticleComponent, ArticleDetailComponent, ArticleReadComponent,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent, ProductDataComponent, CommissionComponent, FileListComponent],
imports: [ imports: [
CommonModule, CommonModule,
LifeCommonModule, LifeCommonModule,
......
...@@ -661,4 +661,25 @@ export class MyService { ...@@ -661,4 +661,25 @@ export class MyService {
return this.http return this.http
.post(url, JSON.stringify(param)); .post(url, JSON.stringify(param));
} }
//场景查询
tagViewQuery(param){
const url = this.ydapi + "/metadata/tagViewQuery";
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 @@ ...@@ -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">
...@@ -110,7 +111,7 @@ ...@@ -110,7 +111,7 @@
</li> </li>
<li class="list-group-item" *ngIf="this.insured?.birthDay"> <li class="list-group-item" *ngIf="this.insured?.birthDay">
<span>出生日期</span> <span>出生日期</span>
<span>{{ '****-'+this.insured?.birthDay.substr(5)}}</span> <span>{{this.insured?.birthDay}}</span>
</li> </li>
<li class="list-group-item" *ngIf="insured?.idInfo?.idType"> <li class="list-group-item" *ngIf="insured?.idInfo?.idType">
<span>证件类型</span> <span>证件类型</span>
......
<div class="productDataContainer">
<div class="productPoster">
<h3>产品海报</h3>
<div>
<ul *ngIf="posterUrl">
<li (click)="jumpToMaterial()" >
<img [src]="posterUrl" class="img-responsive" alt="海报">
</li>
</ul>
<div *ngIf="!posterUrl" style="text-align: center;">
抱歉,当前产品暂无海报
</div>
</div>
</div>
<div style="width: calc(100% + 30px); height: 8px;background: #f6f6f6;margin-left: -15px;"></div>
<div class="productDataContent">
<h3>产品资料</h3>
<div>
<ul>
<li *ngFor="let productDataMenuItem of productDataMenuLists" (click)="jumpToDetail(productDataMenuItem)">
<div>
<img src="./assets/images/productData/{{productDataMenuItem['displayImage']}}" style="width: auto;">
</div>
<div>{{productDataMenuItem.categoryName}}</div>
</li>
</ul>
</div>
</div>
</div>
.productDataContainer{
padding:15px;
h3{
color: #444;
font-size: 18px;
font-weight: bold;
margin: 15px 0 25px 0;
}
.productPoster{
padding-bottom: 18px;
h3{
margin-top:0;
}
ul{
display: flex;
flex-wrap: wrap;
li{
min-width: 30%;
max-width: 30%;
margin-right:17px;
}
li:last-child{
margin-right:0;
}
}
}
.productDataContent {
ul {
display: flex;
flex-wrap: wrap;
li {
flex: 1;
max-width: 25%;
text-align: center;
min-width: 25%;
margin-bottom: 30px;
display: flex;
flex-direction: column;
align-items: center;
>div:first-child{
width:45px;
height: 45px;
}
}
}
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ProductDataComponent } from './product-data.component';
describe('ProductDataComponent', () => {
let component: ProductDataComponent;
let fixture: ComponentFixture<ProductDataComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProductDataComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ProductDataComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component, OnInit} from '@angular/core';
import {MyService} from '../my.service';
import { Router,ActivatedRoute } from "@angular/router";
import { ToastService } from 'ng-zorro-antd-mobile';
@Component({
selector: 'ydlife-product-data',
templateUrl: './product-data.component.html',
styleUrls: ['./product-data.component.scss']
})
export class ProductDataComponent implements OnInit {
productDataMenuLists: Array<any>;
productId:any;
planId:any;
posterUrl:any;
posterInfo:any;
constructor(private router: Router,private myService:MyService,private activatedRoute: ActivatedRoute,private _toast: ToastService) {
}
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)=>{
if(res['success']){
this.productDataMenuLists = res['data']['categoryInfos'].filter((item)=>{
return item.categoryId != 22;
});
this.posterInfo = res['data']['categoryInfos'].filter((item)=>{
return item.categoryId == 22;
});
if(this.posterInfo[0] && this.posterInfo[0]['fileInfos']){
this.posterUrl = this.posterInfo[0]['fileInfos']['0']['ossFilePath'];
}
}else{
const toast = ToastService.show(`${res['message']}`, 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
}
})
}
jumpToDetail(urlItem){
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']);
}
}
jumpToMaterial(){
this.router.navigate([`/material/${this.posterInfo[0]['fileInfos']['0']['itemId']}`],
{ queryParams:
{ itemType: this.posterInfo[0]['fileInfos']['0']['itemType'],
posterType: this.posterInfo[0]['fileInfos']['0']['id']
}
});
}
}
<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 *ngFor="let leftItem of leftList" (click)="switchCategory(leftItem.tagId)" <li (click)="switchCategory(1,null)" [ngClass]="{'actived':leftSelectedId===null}">全部</li>
[ngClass]="{'actived':leftSelectedId===leftItem.tagId}">{{leftItem.name}} <li *ngFor="let leftItem of leftList" (click)="switchCategory(1,leftItem)"
[ngClass]="{'actived':leftSelectedId===leftItem.id}">{{leftItem.tagName}}
</li> </li>
</ul> </ul>
<div class="right"> <div class="right">
<ul class="right_header"> <ul class="right_header">
<li>家财需求 <span class="iconfont icon-xiangxia"></span></li> <li *ngFor="let topItem of topList" (click)="allFilter(2,topItem)">
<li>保险公司 <span class="iconfont icon-xiangxia"></span></li> {{topItem.tagName}}
<li>筛选 <img src="assets/images/product_select.png" alt="筛选" style="width: 16px;height:16px;"></li> <span class="iconfont icon-xiangxia"></span>
</li>
<li (click)="allFilter(1)">筛选 <img src="assets/images/product_select.png" alt="筛选" style="width: 16px;height:16px;"></li>
</ul>
<div class="mask" *ngIf="filterSelectedFlag" (click)="filterSelectedFlag=false"></div>
<div class="select_all slowRight" *ngIf="filterSelectedFlag">
<ul>
<li *ngFor="let rightItem of rightList">
<h5>
<span>{{rightItem.tagName}}</span>
<div *ngIf="rightItem.tagViewQueryInfos && rightItem.tagViewQueryInfos.length>6"
(click)="showAll(rightItem)" style="font-size: 12px;"
>
<span>更多</span>
<span class="iconfont icon-xiangxia" style="font-size: 12px;display: inline-block;"
[ngStyle]="{'transform': rightItem.showAll? 'rotate(180deg)' : 'rotate(0)'}"
></span>
</div>
</h5>
<div class="optionLists" *ngIf="rightItem.showAll && rightItem.tagViewQueryInfos">
<div *ngFor="let optItem of rightItem.tagViewQueryInfos"
(click)="switchCategory(2,optItem)" [ngClass]="{selected:optItem.selected == true}"
>{{optItem.tagName}}</div>
</div>
<div class="optionLists" *ngIf="!rightItem.showAll && rightItem.tagViewQueryInfos">
<div *ngFor="let optItem of rightItem.tagViewQueryInfos.slice(0,6)"
(click)="switchCategory(2,optItem)" [ngClass]="{selected:optItem.selected == true}"
>{{optItem.tagName}}</div>
</div>
</li>
</ul>
<div class="foot_btn">
<div (click)="restart()">重置</div>
<div (click)="confirm()">确定</div>
</div>
</div>
<ul class="productLists">
<li *ngFor="let productInfoItem of productInfos">
<div class="productInfoContent" >
<h3 (click)="goData(productInfoItem)">
<span>{{productInfoItem.productName}}</span>
<div class="dataContent">
<div>资料</div>
</div>
</h3>
<div (click)="goProductDetail(productInfoItem)">
<div class="featureContent" *ngIf="productInfoItem['labels']">
<div *ngFor="let labelItem of productInfoItem['labels']">
{{labelItem}}
</div>
</div>
<div class="insuranceRulesContent" *ngIf="productInfoItem['adaptionInfos']">
<div *ngFor="let adaptionItem of productInfoItem['adaptionInfos']" style="display: flex;">
<span>{{adaptionItem.name}}:</span>
<span [innerHtml]="adaptionItem.value"></span>
</div>
</div>
<div class="priceContent">
<div>
<span></span><strong>{{productInfoItem.price | number:'1.0-0'}}</strong><span>元起 | 每人每年</span>
</div>
<span class="iconfont icon-ar-r"></span>
</div>
</div>
</div>
<!-- <div class="dataContent">
<div (click)="goData(productInfoItem)">资料</div>
</div> -->
</li>
</ul> </ul>
</div> </div>
</div> </div>
......
.scrollContainer{ .scrollContainer {
position: relative;
height: 100%;
.scrollContent{
height: 100%; height: 100%;
overflow: hidden;
.issueContainer { .issueContainer {
display: flex; display: flex;
height: 100%; height: 100%;
...@@ -9,7 +13,7 @@ ...@@ -9,7 +13,7 @@
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
background:#F6F6F6; background: #F6F6F6;
li { li {
position: relative; position: relative;
white-space: nowrap; white-space: nowrap;
...@@ -32,6 +36,7 @@ ...@@ -32,6 +36,7 @@
li.actived { li.actived {
background-color: #fff; background-color: #fff;
color: #F16A5D;
} }
li.actived:after { li.actived:after {
content: ""; content: "";
...@@ -48,8 +53,18 @@ ...@@ -48,8 +53,18 @@
} }
} }
.right { .right {
width: calc(100% - 90px);
position: relative;
background-color: #fff;
.mask {
position: fixed;
left: 0;
top: 0;
width: 100%; width: 100%;
.right_header{ height: 100%;
background: rgba(0, 0, 0, 0.3);
}
.right_header {
display: flex; display: flex;
padding: 0 15px; padding: 0 15px;
width: 100%; width: 100%;
...@@ -58,13 +73,180 @@ ...@@ -58,13 +73,180 @@
align-items: center; align-items: center;
color: #333; color: #333;
border-bottom: 1px #f5f5f5 solid; border-bottom: 1px #f5f5f5 solid;
.iconfont{ background-color: #fff;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
.iconfont {
color: #666; color: #666;
font-size: 10px; font-size: 10px;
} }
} }
.select_all {
position: absolute;
right: 0;
top: 0;
background: #fff;
width: 100%;
height: 100%;
padding: 20px 0 20px 10px;
z-index: 1000;
overflow-y: auto;
ul{
> li {
margin-bottom: 15px;
h5 {
font-size: 16px;
font-weight: bold;
color: #333;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
padding-right: 10px;
}
.optionLists {
display: flex;
width: 100%;
flex-wrap: wrap;
> div {
margin-right: 10px;
flex: 1;
background: #f6f6f6;
height: 38px;
line-height: 38px;
text-align: center;
margin-bottom: 10px;
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 {
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 {
font-size: 18px;
color: #444;
font-weight: bold;
padding-top: 14px;
padding-bottom: 8px;
display: flex;
justify-content: space-between;
align-items: baseline;
}
.featureContent {
display: flex;
margin-bottom: 10px;
align-items: center;
> div {
padding: 6px;
background: #FCF2F1;
color: #F16A5D;
border-radius: 3px;
margin-right: 6px;
}
}
.insuranceRulesContent {
}
.priceContent {
display: flex;
justify-content: space-between;
align-items: baseline;
padding-right: 10px;
strong {
color: #F16A5D;
font-size: 20px;
margin-right: 3px;
}
span {
font-size: 12px;
}
}
}
.dataContent {
display: flex;
justify-content: space-between;
padding-right: 15px;
> div:first-child {
width: 55px;
height: 26px;
text-align: center;
border: 1px solid #F16A5D;
border-radius: 10px;
color: #F16A5D;
font-size: 15px;
font-weight: normal;
}
// > div:last-child {
// background: #FDF5F4;
// color: #F16A5D;
// font-size: 12px;
// border-radius: 3px;
// padding: 5px 6px;
// }
}
}
}
}
}
} }
.slowRight {
animation: slowRight .3s ease-in-out both;
}
@keyframes slowRight {
0% {
-webkit-transform: translateX(100%);
transform: translateX(100%)
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0)
}
}
import { Component, OnInit } from '@angular/core'; 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 {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',
styleUrls: ['./product.component.scss'] styleUrls: ['./product.component.scss']
}) })
export class ProductComponent implements OnInit { export class ProductComponent implements OnInit {
leftList:Array<any>; leftList: Array<any>;
leftSelectedId:number = null; topList: Array<any> = [];
constructor(public lifeCommonService:LifeCommonService) { } rightList: Array<any> = [];
leftSelectedId: number = null;
filterSelectedFlag: boolean = false;
tagIds:Array<any> = [];
productInfos:Array<any>;
productInfo: Plans;
inquiry: User;
rightIds:Array<any> = [];
rightTagIds:Array<any> = [];
topAndright:Array<any> = [];
constructor(private myService: MyService,
public lifeCommonService: LifeCommonService,
private router: Router,
private _toast: ToastService,
private ls: LocalStorage) {
}
ngOnInit() { ngOnInit() {
this.lifeCommonService.setTitle('产品库'); this.lifeCommonService.setTitle('产品库');
this.leftList = [ this.tagViewQuery(305);
{name:'全部',tagId:null}, this.tagViewQuery(309);
{name:'推荐',tagId:1},
{name:'新品',tagId:2}, }
{name:'意外',tagId:3},
{name:'医疗',tagId:4}, //type:1表示左侧筛选2表示右侧筛选
{name:'旅游',tagId:5}, switchCategory(type,item?:any) {
{name:'重疾',tagId:6}, if(type == 1){
{name:'年金',tagId:7}, if(item && item.tagId!=null){
{name:'定寿',tagId:8}, this.leftSelectedId = item.id;
{name:'终身寿',tagId:9}, this.tagIds = [item.tagId]
{name:'留学',tagId:10}, }else{
{name:'高端医疗',tagId:11} this.leftSelectedId = null;
] this.tagIds = [];
} }
this.queryProductBox();
switchCategory(id) { }else if(type==2){
this.leftSelectedId = id; item.selected = !item.selected;
for(let i=0;i<this.rightList.length;i++){
if(this.rightList[i]['tagViewQueryInfos']){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
if(this.rightList[i]['tagViewQueryInfos'][j]['selected'] == true){
this.rightIds.push(this.rightList[i]['tagViewQueryInfos'][j]['id'])
}else{
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.rightList[i]['tagViewQueryInfos'][j]['id']){
this.rightIds.splice(m,1)
}
}
}
}
}
}
this.rightIds = Array.from(new Set(this.rightIds))
}
} }
//type:305左侧,309上侧,306筛选
tagViewQuery(type) {
const param = {
isActive: 1,
tagViewType: type
}
this.myService.tagViewQuery(param).subscribe((res) => {
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 {
this.rightList = res['data']['tagViewQueryInfos'];
if(this.rightIds.length >0){
for(let i=0;i<this.rightList.length;i++){
if(this.rightList[i]['tagViewQueryInfos']){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.rightList[i]['tagViewQueryInfos'][j]['id']){
this.rightList[i]['tagViewQueryInfos'][j]['selected'] = true;
}
}
}
}
}
}
}
this.topAndright = this.rightList.concat(this.topList)
}
})
}
// 筛选
allFilter(type,item?:any) {
this.filterSelectedFlag = true;
if(type==1){
this.tagViewQuery(306);
}else{
this.rightList = [item];
}
}
// 进入产品资料页面
goData(productInfoItem) {
this.router.navigate(['/productData', productInfoItem.productId],{queryParams:{planId:productInfoItem.planId}});
}
//根据标签查询产品
queryProductBox(){
this.rightTagIds=[];
if(this.rightIds.length){
for(let i=0;i<this.topAndright.length;i++){
if(this.topAndright[i]['tagViewQueryInfos']){
for(let j=0;j<this.topAndright[i]['tagViewQueryInfos'].length;j++){
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.topAndright[i]['tagViewQueryInfos'][j]['id']){
this.rightTagIds.push(this.topAndright[i]['tagViewQueryInfos'][j]['tagId'])
}
}
}
}
}
}
let tagIds = this.tagIds.concat(this.rightTagIds)
this.myService.queryProductBox({tagIds: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++){
if(this.rightList[i]['tagViewQueryInfos']){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
this.rightList[i]['tagViewQueryInfos'][j]['selected'] = false;
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.rightList[i]['tagViewQueryInfos'][j]['id']){
this.rightIds.splice(m,1)
}
}
}
}
}
}
//确定搜索
confirm(){
this.filterSelectedFlag = false;
this.queryProductBox();
}
// 点击产品进入详情页
goProductDetail(product: Plans): void {
this.productInfo = product;
this.productInfo.type = 2;
if(this.productInfo.isActive == 4){
this.router.navigate(['/productData', product.productId],{queryParams:{planId:product.planId}});
}else if(this.productInfo.isActive != 4){
if(this.productInfo.isActive == 1 && this.productInfo.isThirdPartyPurchase==1 && this.productInfo.thirdPartyPurchaseUrl){
window.location.href = this.productInfo.thirdPartyPurchaseUrl;
}else{
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);
}
showAll(item){
item.showAll = !item.showAll;
}
} }
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
}else{ }else{
initialize(); initialize();
} }
getknowledgeQry();
} else if (window.name == "isReload") { } else if (window.name == "isReload") {
let loading = document.getElementById("adv"); let loading = document.getElementById("adv");
loading.style.display = 'none'; loading.style.display = 'none';
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
} }
}) })
} }
getknowledgeQry();
// (function() { // (function() {
// if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") { // if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
......
...@@ -279,4 +279,8 @@ footer.fixed{ ...@@ -279,4 +279,8 @@ footer.fixed{
font-size: 22px; font-size: 22px;
} }
.rich_media_content td,.rich_media_content th {
padding: 5px 10px!important;
border: 1px solid #DDD!important;
}
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