Commit bfdf3efa by sunchao

销售明细&登录页修改

parent 69da4840
......@@ -18,7 +18,7 @@ export class AuthService {
redirectUrl: string;
// 经纪人登陆
login(loginInfo): Observable<any> {
const api = this.API + '/practitionerLogin';
const api = this.API + '/practitioner/practitionerLogin';
return this.http.post(api, JSON.stringify(loginInfo));
}
......
<div class="page form_vcode js_show">
<div class="weui-form">
<div class="weui-form__text-area">
<div class="weui-form__text-area" style="position: relative;">
<img style="width: 100%;" src="assets/images/ydinsurance_logo.png" >
<div style="font-family: '微软雅黑';position: absolute; top: 100px;left: 35%;font-size: 14px;">海纳百川&nbsp;赢家后盾</div>
</div>
<div class="weui-form__control-area">
<div class="weui-cells__group weui-cells__group_form">
<div class="weui-cells weui-cells_form">
<div class="weui-cell" style="padding:16px 0px">
<div class="weui-cell" style="padding:10px 0px">
<!-- <div class="weui-cell__hd"><label class="weui-label">手机号</label></div> -->
<div class="weui-cell__bd">
<input autofocus="" class="weui-input" type="tel" maxlength="11" pattern="[0-9]*" placeholder="请输入您的手机号"
<input autofocus="" class="weui-input" type="tel" maxlength="11" pattern="[0-9]*" placeholder="请输入手机号"
name="mobileNo"
[(ngModel)]="userInfo.mobileNo">
</div>
......
.weui-form__control-area{
margin: 20px 0 45px 0;
}
.weui-form{
padding: 56px 15px 0px 15px;
}
......@@ -7,10 +10,13 @@
background: #ff1c2b;
}
}
.weui-cell:before,.weui-cells__group_form .weui-cells:before, .weui-cells__group_form .weui-cell:before{
.weui-cells__group_form .weui-cells:before, .weui-cells__group_form .weui-cell:before{
left:0;
right: 0;
}
.weui-cells__group_form .weui-cells:before{
border-top: none;
}
.weui-cells__group_form .weui-cells:after {
left: 0;
right: 0;
......@@ -22,3 +28,12 @@
color: red;
font-weight: normal;
}
.weui-input {
caret-color: red;
font-size: 20px;
padding-left: 10px;
}
.weui-input::-webkit-input-placeholder {
font-size: 20px;
}
......@@ -144,4 +144,8 @@ export class LifeCommonService {
}
return days;
}
dateFormat(date: any, format?: string) {
return this.datePipe.transform(date, format);
}
}
......@@ -12,8 +12,8 @@
<a href="{{fileUploadItem.filePath}}" download="{{fileUploadItem.itemName}}" target="_blank">
<div><i class="iconfont icon-pdf"></i></div>
<div title="{{fileUploadItem.itemName}}">{{fileUploadItem.itemName}}</div>
<div style="position: absolute;right: 5px;top: 6px;"><i class="iconfont icon-xiazai" ></i></div>
</a>
<!-- <div><i class="iconfont icon-xiazai"></i></div> -->
</li>
</ul>
</div>
......
......@@ -59,6 +59,7 @@
ul li{
border-bottom: 1px solid #dcdcdc;
padding: 4px 20px;
position: relative;
.icon-xiazai {
font-size: 22px;
color: #ec2d37;
......
......@@ -19,34 +19,33 @@ export class FileUploadComponent implements OnInit {
ngOnInit() {
this.type = this.activatedRoute.snapshot.data[0]['type'];
this.dropOptionsQuery();
if (this.type === 'fileUpload') {
this.fileUpload(3, 0, 19);
this.fileUpload(3,0, 19,'yd_download_file_type',this.selectedCategoryId);
} else if (this.type === 'training') {
this.fileUpload(3, this.selectedCategoryId, 23);
this.fileUpload(3, 0, 23,'yd_trainning_file_type',this.selectedCategoryId);
}
this.dropOptionsQuery();
//初始化选产品
this.switchCategory(1);
}
// 文件下载
fileUpload(itemType, itemId, fileCategory) {
this.myService.filePath(itemType, itemId, fileCategory).subscribe(res => {
fileUpload(itemType, itemId, fileCategory,code,mdDropOptionId) {
this.myService.filePath(itemType, itemId, fileCategory,code,mdDropOptionId).subscribe(res => {
if (res['success']) {
this.fileUploadItemList = res['data']['fileUploadItemList'];
console.log(this.fileUploadItemList )
}
});
}
//培训资料分类
dropOptionsQuery() {
const code = this.type === 'fileUpload'?'':'yd_trainning_file_type'
const code = this.type === 'fileUpload'?'yd_download_file_type':'yd_trainning_file_type'
this.myService.dropOptionsQuery({ code: code }).subscribe(res => {
if (res['success']) {
this.categoryList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'];
if (this.categoryList.length > 0) {
this.selectedCategoryId = this.categoryList[0].dropOptionOrder;
this.switchCategory(this.selectedCategoryId)
}
}else{
this.categoryList = [];
......@@ -56,6 +55,10 @@ export class FileUploadComponent implements OnInit {
switchCategory(e){
this.selectedCategoryId = e;
this.fileUpload(3, this.selectedCategoryId, 23)
if (this.type === 'fileUpload') {
this.fileUpload(3,0, 19,'yd_download_file_type',this.selectedCategoryId);
} else if (this.type === 'training') {
this.fileUpload(3, 0, 23,'yd_trainning_file_type',this.selectedCategoryId);
}
}
}
......@@ -2,6 +2,6 @@
<div class="announcementItem" *ngFor="let announcementItem of announcementLists">
<div class="announcement_title"><span class="announcement_type">【{{announcementItem.announcementTypeName}}】</span><span [innerHtml]="announcementItem.title |safeHtml"></span></div>
<div [innerHtml]="announcementItem.content | safeHtml" class="announcement_content"></div>
<div class="announcement_at">{{announcementItem.announcementAt}}</div>
<div class="announcement_at">上海银盾保险经纪有限公司 &nbsp;&nbsp;{{announcementItem.announcementAt}}</div>
</div>
</div>
......@@ -33,7 +33,7 @@
<img class="bg" src="assets/images/measurebanner.jpg" >
<div class="content">
<span class="detail">明细<i class="iconfont icon-ar-r"
<span class="detail" (click)="jumpToDetail()">明细<i class="iconfont icon-ar-r"
style="font-size:12px;"></i></span>
<ul class="tab">
<li *ngFor="let item of performanceList"
......
......@@ -165,7 +165,7 @@
.mark{
color: #fff;
font-weight: bold;
font-size: 14px;
font-size: 15px;
}
li:nth-child(1){
......@@ -208,11 +208,12 @@
h3{
font-weight: normal;
font-size: 16px;
margin-bottom: 5px;
margin-bottom: 3px;
}
.tool_content{
display: flex;
justify-content: space-between;
margin-bottom: 5px;
.content_item{
display: flex;
flex-direction: column;
......
......@@ -242,4 +242,8 @@ export class MyCenterHomeComponent implements OnInit {
jumpUrl(){
window.location.href = `https://${window.location.host}/mk/ydviphexincoupon`
}
jumpToDetail(){
this.router.navigate(['/salesDetail'],{ queryParams: { type: this.performanceSelectedFlag }});
}
}
......@@ -6,7 +6,7 @@ import {MkMaterialComponent} from './mk-material/mk-material.component';
import {MkMaterialDetailComponent} from './mk-material-detail/mk-material-detail.component';
import {FileUploadComponent} from './file-upload/file-upload.component';
import {ImportantAnnouncementComponent} from './important-announcement/important-announcement.component';
import {SalesDetailComponent} from './sales-detail/sales-detail.component';
const myRoutes: Routes = [
{path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard]},
{path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard]},
......@@ -14,6 +14,7 @@ const myRoutes: Routes = [
{path: 'fileUpload', component: FileUploadComponent, canActivate: [AuthGuard], data: [{type: 'fileUpload'}]},
{path: 'training', component: FileUploadComponent, canActivate: [AuthGuard], data: [{type: 'training'}]},
{path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard]},
{path: 'salesDetail',component:SalesDetailComponent,canActivate:[AuthGuard]}
];
@NgModule({
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import { DatePipe } from "@angular/common";
import {MyRoutingModule} from './my-routing.module';
import {MyCenterHomeComponent} from './my-center-home/my-center-home.component';
import {LifeCommonModule} from "../common/life-common.module";
......@@ -8,13 +8,16 @@ import { MkMaterialComponent } from './mk-material/mk-material.component';
import { MkMaterialDetailComponent } from './mk-material-detail/mk-material-detail.component';
import { FileUploadComponent } from './file-upload/file-upload.component';
import { ImportantAnnouncementComponent } from './important-announcement/important-announcement.component';
import { SalesDetailComponent } from './sales-detail/sales-detail.component';
@NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent],
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent],
imports: [
CommonModule,
LifeCommonModule,
MyRoutingModule
],
providers: [
DatePipe
]
})
export class MyModule {
......
......@@ -19,10 +19,10 @@ export class MyService {
}
// 文件下载
filePath(itemType, itemId, fileCategory) {
filePath(itemType, itemId, fileCategory,code,mdDropOptionId) {
const url = this.API + '/filePathQuery';
return this.http
.post(url, JSON.stringify({itemType: itemType, itemId: itemId, fileCategory: fileCategory}));
.post(url, JSON.stringify({itemType: itemType, itemId: itemId, fileCategory: fileCategory,code:code,mdDropOptionId:mdDropOptionId}));
}
// 重要公告
......
<div class="salesWrapper">
<div class="salesContent">
<div class="salesItem" *ngFor="let salesDetailItem of salesDetailList">
<div class="icon_bolck"><span class="iconfont icon-money-more"></span></div>
<div class="line">
<div>投保人:{{salesDetailItem.holderName}}</div>
<div class="price">¥{{salesDetailItem.referralAmount | number: "1.2-2"}}</div>
</div>
<div class="line long_line">
<div>保单号:{{salesDetailItem.policyNo}}</div>
<div>{{(salesDetailItem.orderDate).substr(0,10)}}</div>
</div>
</div>
</div>
</div>
.salesWrapper{
width: 100%;
height: 100%;
overflow: auto;
.salesContent{
.salesItem{
border-bottom: 1px #dcdcdc solid;
padding: 10px;
padding-left: 45px;
position: relative;
.icon_bolck{
border: 1px #dcdcdc solid;
width: 35px;
height: 35px;
position: absolute;
left: 3px;
top: 20px;
line-height: 30px;
text-align: center;
border-radius: 50%;
.iconfont{
color: #ff3500;
font-size: 26px;
position: relative;
top: 1px;
}
}
.line{
display: flex;
justify-content: space-between;
align-items: center;
height: 30px;
font-size: 14px;
.price{
font-size: 16px;
color: #ff3500;
font-weight: bold;
}
}
.long_line{
font-size: 12px;
}
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SalesDetailComponent } from './sales-detail.component';
describe('SalesDetailComponent', () => {
let component: SalesDetailComponent;
let fixture: ComponentFixture<SalesDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SalesDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SalesDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import {MyService} from '../my.service';
import {ActivatedRoute} from "@angular/router";
import { LifeCommonService} from '../../common/life-common.service';
@Component({
selector: 'ydlife-sales-detail',
templateUrl: './sales-detail.component.html',
styleUrls: ['./sales-detail.component.scss']
})
export class SalesDetailComponent implements OnInit {
allPerformanceInfo:Array<any>;
salesDetailList:Array<any>;
salesDetailType:any;
constructor(private myService: MyService,private activatedRoute: ActivatedRoute,public lifeCommonService:LifeCommonService) { }
ngOnInit() {
this.salesDetailType = this.activatedRoute.snapshot.queryParams.type;
console.log(this.salesDetailType)
this.brokerInfoQuery();
}
//查询业绩
brokerInfoQuery(){
const practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
this.myService.brokerInfoQuery({practitionerId:practitionerId}).subscribe((res)=>{
if(res['success']){
this.allPerformanceInfo = res['data']['commissionInfo'];
if(this.salesDetailType === 'month'){
this.salesDetailList = this.allPerformanceInfo['thisMonthInfo']['fortuneItemList'];
}
if(this.salesDetailType==='year'){
this.salesDetailList = this.allPerformanceInfo['thisYearInfo']['fortuneItemList'];
}
}
})
}
}
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