Commit d1799b9c by gaoju

h生产代码

1 parent 36b40e1c
Showing 73 changed files with 5364 additions and 3611 deletions
This diff could not be displayed because it is too large.
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"precommit": "npm run lint" "precommit": "npm run lint"
}, },
"dependencies": { "dependencies": {
"animate.css": "^3.7.0",
"antd": "^3.12.3", "antd": "^3.12.3",
"antd-mobile": "^2.2.9", "antd-mobile": "^2.2.9",
"babel-helpers": "^6.24.1", "babel-helpers": "^6.24.1",
...@@ -16,14 +15,10 @@ ...@@ -16,14 +15,10 @@
"dva": "^2.1.0", "dva": "^2.1.0",
"echarts": "^4.2.1", "echarts": "^4.2.1",
"html2canvas": "^1.0.0-alpha.12", "html2canvas": "^1.0.0-alpha.12",
"iscroll": "^5.2.0",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"moment": "^2.24.0", "moment": "^2.24.0",
"react": "^16.2.0", "react": "^16.2.0",
"react-addons-css-transition-group": "^15.6.2",
"react-bmap": "^1.0.98",
"react-dom": "^16.2.0", "react-dom": "^16.2.0",
"react-qmap": "^0.1.5",
"react-sticky": "^6.0.3", "react-sticky": "^6.0.3",
"swiper": "^4.4.6" "swiper": "^4.4.6"
}, },
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
height: .8rem; height: .8rem;
background: url("../../assets/image/home-frame.png") no-repeat center center; background: url("../../assets/image/home-frame.png") no-repeat center center;
background-size: 100% 100%; background-size: 100% 100%;
z-index: 10;
} }
bottomButton > .module{ bottomButton > .module{
......
...@@ -18,8 +18,8 @@ export default class BottomNav extends Component{ ...@@ -18,8 +18,8 @@ export default class BottomNav extends Component{
text:'在线专家' text:'在线专家'
}, },
{ {
img:require('../../assets/image/userCenter.png'), img:require('../../assets/image/performance.png'),
text:'个人中心' text:'业绩'
}, },
], ],
...@@ -34,8 +34,8 @@ export default class BottomNav extends Component{ ...@@ -34,8 +34,8 @@ export default class BottomNav extends Component{
text:'人员管理' text:'人员管理'
}, },
{ {
img:require('../../assets/image/userCenter.png'), img:require('../../assets/image/performance.png'),
text:'个人中心' text:'业绩'
}, },
], ],
} }
...@@ -58,14 +58,11 @@ export default class BottomNav extends Component{ ...@@ -58,14 +58,11 @@ export default class BottomNav extends Component{
text: '在线专家' text: '在线专家'
}, },
{ {
img: require('../../assets/image/userCenter.png'), img: require('../../assets/image/performance.png'),
text: '个人中心' text: '业绩'
}, },
]; ];
} }
if(this.props.roleId != 3 && this.props.roleId != 2){
list = this.state.moduleList1;
}
return list.map((item,index)=>{ return list.map((item,index)=>{
return ( return (
<div className={styles.module} key={index} onClick={()=>{ <div className={styles.module} key={index} onClick={()=>{
...@@ -79,8 +76,6 @@ export default class BottomNav extends Component{ ...@@ -79,8 +76,6 @@ export default class BottomNav extends Component{
}else if(this.props.roleId == 3 && index === 1){ }else if(this.props.roleId == 3 && index === 1){
this.props.goGtclientlist() this.props.goGtclientlist()
}else if(this.props.roleId != 3 && this.props.roleId != 2 && index === 1){
this.props.goGtclientlist()
}else if(index === 2){ }else if(index === 2){
localStorage.setItem('keyIndex',2) localStorage.setItem('keyIndex',2)
this.props.goPerformance() this.props.goPerformance()
......
/*.am-calendar{*/
/*width: .68rem !important;*/
/*}*/
/*.am-calendar>span{*/
/*width: 100%;*/
/*max-width: 680px;*/
/*}*/
/*.am-calendar .content{*/
/*position: fixed;*/
/*display: -ms-flexbox;*/
/*display: flex;*/
/*-ms-flex-direction: column;*/
/*flex-direction: column;*/
/*width: 6.8rem;*/
/*height: 100%;*/
/*top: 0;*/
/*left: 50%;*/
/*margin-left: -3.4rem;*/
/*z-index: 999;*/
/*background: #fff;*/
/*}*/
/*
import React, { Component } from 'react'
import { connect } from 'dva'
import { List, Calendar } from 'antd-mobile';
import enUS from 'antd-mobile/lib/calendar/locale/en_US';
import zhCN from 'antd-mobile/lib/calendar/locale/zh_CN';
import './date.css'
const extra = {
'2017/07/15': { info: 'Disable', disable: true },
};
const now = new window.Date();
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 5)] = { info: 'Disable', disable: true };
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 6)] = { info: 'Disable', disable: true };
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 7)] = { info: 'Disable', disable: true };
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 8)] = { info: 'Disable', disable: true };
console.log(now);
Object.keys(extra).forEach((key) => {
const info = extra[key];
const date = new window.Date(key);
if (!Number.isNaN(+date) && !extra[+date]) {
extra[+date] = info;
}
});
class Date extends Component {
originbodyScrollY = document.getElementsByTagName('body')[0].style.overflowY;
constructor(props) {
super(props);
this.state = {
en: false,
show: false,
config: {},
};
}
showDate=()=>{
document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
this.setState({
show: true,
config:{type: 'one',pickTime: false},
});
}
renderBtn(zh, en, config = {}) {
config.locale = this.state.en ? enUS : zhCN;
return (
<List.Item arrow="horizontal"
style={{width:680}}
onClick={
()=>{
this.showDate()
}
}
>
{this.state.en ? en : zh}
</List.Item>
);
}
changeLanguage = () => {
this.setState({
en: !this.state.en,
});
}
onSelectHasDisableDate = (dates) => {
console.warn('onSelectHasDisableDate', dates);
}
onConfirm = (startTime, endTime) => {
document.getElementsByTagName('body')[0].style.overflowY = this.originbodyScrollY;
this.setState({
show: false,
startTime,
endTime,
});
let getMonth = startTime.getMonth()+1
let selectDate = startTime.getFullYear() + '-'+ getMonth +'-'+startTime.getDate()
this.props.handleDate(selectDate);
// this.selectDate();
}
selectDate= ()=>{
}
onCancel = () => {
document.getElementsByTagName('body')[0].style.overflowY = this.originbodyScrollY;
this.setState({
show: false,
startTime: undefined,
endTime: undefined,
});
}
getDateExtra = date => extra[+date];
componentDidMount() {
this.props.onRef(this)
}
render() {
return (
<div style={{ display:'none'}}>
<List className="calendar-list" style={{ backgroundColor: 'white',opacity:0,height:'0'}}>
{/!*<List.Item className="item" extra={<Switch className="right" checked={!this.state.en} onChange={this.changeLanguage} />}>*!/}
{/!*{this.state.en ? 'Chinese' : '中文'}*!/}
{/!*</List.Item>*!/}
{/!*{this.renderBtn('选择日期区间', 'Select Date Range')}*!/}
{/!*{this.renderBtn('选择日期时间区间', 'Select DateTime Range', { pickTime: true })}*!/}
{this.renderBtn('选择日期', 'Select Date',{type: 'one',pickTime: false},)}
{/!*{this.renderBtn('选择日期', 'Select Date',{type: 'one',pickTime: false},)}*!/}
{/!*{this.renderBtn('选择日期时间', 'Select DateTime', { type: 'one', pickTime: true })}*!/}
{/!*{this.renderBtn('选择日期区间(快捷)', 'Select Date Range (Shortcut)', { showShortcut: true })}*!/}
{/!*{this.renderBtn('选择日期时间区间(快捷)', 'Select DateTime Range (Shortcut)', { pickTime: true, showShortcut: true })}*!/}
{/!*{this.renderBtn('大行距', 'XL row size', { rowSize: 'xl' })}*!/}
{/!*{this.renderBtn('不无限滚动', 'infinite: false', { infinite: false })}*!/}
{/!*{this.renderBtn('水平进入', 'Horizontal enter', { enterDirection: 'horizontal' })}*!/}
{/!*{this.renderBtn('默认选择范围', 'Selected Date Range', { defaultValue: [new window.Date(+now - 86400000), new window.Date(+now - 345600000)] })}*!/}
{/!*{this.renderBtn('onSelect API', 'onSelect API', {*!/}
{/!*onSelect: (date, state) => {*!/}
{/!*console.log('onSelect', date, state);*!/}
{/!*return [date, new window.Date(+now - 604800000)];*!/}
{/!*},*!/}
{/!*})}*!/}
{/!*{*!/}
{/!*this.state.startTime &&*!/}
{/!*<List.Item>Time1: {this.state.startTime.toLocaleString()}</List.Item>*!/}
{/!*}*!/}
</List>
<Calendar
// style={{width:'.68rem',height:'100%'}}
{...this.state.config}
visible={this.state.show}
onCancel={this.onCancel}
onConfirm={this.onConfirm}
onSelectHasDisableDate={this.onSelectHasDisableDate}
getDateExtra={this.getDateExtra}
defaultDate={now}
minDate={new window.Date(+now - 5184000000)}
maxDate={new window.Date(+now + 31536000000)}
/>
</div>
);
}
}
export default connect()(Date)
*/
import React, { Component } from 'react'
import { Menu, Icon } from 'antd'
import { connect } from 'dva'
import { List, Switch, Calendar } from 'antd-mobile';
import enUS from 'antd-mobile/lib/calendar/locale/en_US';
import zhCN from 'antd-mobile/lib/calendar/locale/zh_CN';
import './date.css'
import moment from 'moment';
const extra = {
'2017/07/15': { info: 'Disable', disable: true },
};
const now = new window.Date();
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 5)] = { info: 'Disable', disable: true };
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 6)] = { info: 'Disable', disable: true };
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 7)] = { info: 'Disable', disable: true };
// extra[+new window.Date(now.getFullYear(), now.getMonth(), now.getDate() + 8)] = { info: 'Disable', disable: true };
console.log(now);
Object.keys(extra).forEach((key) => {
const info = extra[key];
const date = new window.Date(key);
if (!Number.isNaN(+date) && !extra[+date]) {
extra[+date] = info;
}
});
class Date extends Component {
originbodyScrollY = document.getElementsByTagName('body')[0].style.overflowY;
constructor(props) {
super(props);
this.state = {
en: false,
show: false,
config: {},
};
}
// showDate=()=>{
//
//
//
// document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
// this.setState({
// show: true,
// config:{type: 'one',pickTime: false},
// });
//
//
// }
renderBtn(zh, en, config = {}) {
config.locale = this.state.en ? enUS : zhCN;
return (
<List.Item arrow="horizontal"
style={{width:680}}
onClick={
()=>{
this.showDate()
}
}
>
{this.state.en ? en : zh}
</List.Item>
);
}
changeLanguage = () => {
this.setState({
en: !this.state.en,
});
}
onSelectHasDisableDate = (dates) => {
console.warn('onSelectHasDisableDate', dates);
}
onConfirm = (startTime, endTime) => {
document.getElementsByTagName('body')[0].style.overflowY = this.originbodyScrollY;
this.setState({
show: false,
startTime,
endTime,
});
let getMonth = startTime.getMonth()+1
let selectDate = startTime.getFullYear() + '-'+ getMonth +'-'+startTime.getDate()
this.props.handleDate(selectDate);
// this.selectDate();
}
selectDate= ()=>{
}
onCancel = () => {
document.getElementsByTagName('body')[0].style.overflowY = this.originbodyScrollY;
this.setState({
show: false,
startTime: undefined,
endTime: undefined,
});
}
getDateExtra = date => extra[+date];
componentDidMount() {
this.props.onRef(this)
}
render() {
console.log(this.state.startTime);
return (
<div style={{}}>
<List className="calendar-list" style={{ backgroundColor: 'white',opacity:0 ,width:0,display:'none'}}>
{/*<List.Item className="item" extra={<Switch className="right" checked={!this.state.en} onChange={this.changeLanguage} />}>*/}
{/*{this.state.en ? 'Chinese' : '中文'}*/}
{/*</List.Item>*/}
{/*{this.renderBtn('选择日期区间', 'Select Date Range')}*/}
{/*{this.renderBtn('选择日期时间区间', 'Select DateTime Range', { pickTime: true })}*/}
{this.renderBtn('选择日期', 'Select Date',{type: 'one',pickTime: false},)}
{this.renderBtn('选择日期', 'Select Date',{type: 'one',pickTime: false},)}
{/*{this.renderBtn('选择日期时间', 'Select DateTime', { type: 'one', pickTime: true })}*/}
{/*{this.renderBtn('选择日期区间(快捷)', 'Select Date Range (Shortcut)', { showShortcut: true })}*/}
{/*{this.renderBtn('选择日期时间区间(快捷)', 'Select DateTime Range (Shortcut)', { pickTime: true, showShortcut: true })}*/}
{/*{this.renderBtn('大行距', 'XL row size', { rowSize: 'xl' })}*/}
{/*{this.renderBtn('不无限滚动', 'infinite: false', { infinite: false })}*/}
{/*{this.renderBtn('水平进入', 'Horizontal enter', { enterDirection: 'horizontal' })}*/}
{/*{this.renderBtn('默认选择范围', 'Selected Date Range', { defaultValue: [new window.Date(+now - 86400000), new window.Date(+now - 345600000)] })}*/}
{/*{this.renderBtn('onSelect API', 'onSelect API', {*/}
{/*onSelect: (date, state) => {*/}
{/*console.log('onSelect', date, state);*/}
{/*return [date, new window.Date(+now - 604800000)];*/}
{/*},*/}
{/*})}*/}
{/*{*/}
{/*this.state.startTime &&*/}
{/*<List.Item>Time1: {this.state.startTime.toLocaleString()}</List.Item>*/}
{/*}*/}
</List>
<Calendar
style={{width:'.68rem',height:'100%'}}
{...this.state.config}
visible={this.state.show}
onCancel={this.onCancel}
onConfirm={this.onConfirm}
onSelectHasDisableDate={this.onSelectHasDisableDate}
getDateExtra={this.getDateExtra}
defaultDate={now}
minDate={new window.Date(+now - 5184000000)}
maxDate={new window.Date(+now + 31536000000)}
/>
</div>
);
}
}
export default connect()(Date)
...@@ -4,8 +4,8 @@ import { DatePicker, List } from 'antd-mobile'; ...@@ -4,8 +4,8 @@ import { DatePicker, List } from 'antd-mobile';
import enUs from 'antd-mobile/lib/date-picker/locale/en_US'; import enUs from 'antd-mobile/lib/date-picker/locale/en_US';
const nowTimeStamp = new Date('1963-01-01'); const nowTimeStamp = new Date('1963-01-01');
const today = new Date();
const now = new Date(); const now = new Date(nowTimeStamp);
// GMT is not currently observed in the UK. So use UTC now. // GMT is not currently observed in the UK. So use UTC now.
const utcNow = new Date(now.getTime() + (now.getTimezoneOffset() * 60000)); const utcNow = new Date(now.getTime() + (now.getTimezoneOffset() * 60000));
...@@ -49,20 +49,13 @@ class datePicker extends Component { ...@@ -49,20 +49,13 @@ class datePicker extends Component {
} }
componentDidMount() { componentDidMount() {
this.props.onRef(this) this.props.onRef(this)
this.setState({
date: this.props.birthday ? new Date(this.props.birthday) : now
})
console.log('componentDidMount---',this.props.birthday)
}
componentWillReceiveProps(nextProps) { // 父组件重传props时就会调用这个方法
if(nextProps.birthday && nextProps.birthday != this.state.date){
this.setState({
date:new Date(nextProps.birthday)
})
}
} }
showDate=()=>{ showDate=()=>{
console.log(555);
document.getElementsByTagName('body')[0].style.overflowY = 'hidden'; document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
this.setState({ this.setState({
visible: true, visible: true,
...@@ -70,6 +63,7 @@ class datePicker extends Component { ...@@ -70,6 +63,7 @@ class datePicker extends Component {
} }
showDate1=()=> { showDate1=()=> {
console.log(4444444);
document.getElementsByTagName('body')[0].style.overflowY = 'hidden'; document.getElementsByTagName('body')[0].style.overflowY = 'hidden';
this.setState({ this.setState({
visible: true, visible: true,
...@@ -79,9 +73,7 @@ class datePicker extends Component { ...@@ -79,9 +73,7 @@ class datePicker extends Component {
render() { render() {
let defaultdate = today.getFullYear()-101;//默认范围值为100岁
console.log('render---',this.props.birthday)
let minDate = this.props.minYear ? new Date(this.props.minYear, today.getMonth(), today.getDate() + 1) : new Date(defaultdate, 0, 1, 0, 0, 0);
return ( return (
<List className="date-picker-list" style={{ backgroundColor: 'white',opacity:0 ,width:0,display:'none'}}> <List className="date-picker-list" style={{ backgroundColor: 'white',opacity:0 ,width:0,display:'none'}}>
{/*<DatePicker {/*<DatePicker
...@@ -96,28 +88,21 @@ class datePicker extends Component { ...@@ -96,28 +88,21 @@ class datePicker extends Component {
title="出生日期" title="出生日期"
extra="Optional" extra="Optional"
value={this.state.date} value={this.state.date}
minDate={minDate} minDate={new Date(1963, 0, 1, 0, 0, 0)}
maxDate={new Date()} maxDate={new Date()}
onChange={date => { onChange={date => {
console.log('--DatePicker--onChange--->',date) console.log(44);
//this.setState({ date }) this.setState({ date })
}}
onValueChange={(date,index) => {
let data1 = new Date(date[0],date[1],date[2]);
console.log('--DatePicker--onValueChange--->',data1)
this.setState({ date:data1 })
}} }}
onOk = { onOk = {
(date)=>{ (date)=>{
console.log('--DatePicker--ok--->',date)
this.setState({ visible:false }) this.setState({ visible:false })
this.props.getDate(date) this.props.getDate(date)
} }
} }
onDismiss={ onDismiss={
()=>{ ()=>{
this.setState({ visible:false,date:this.props.birthday ? new Date(this.props.birthday) : now }) this.setState({ visible:false })
console.log('--DatePicker--onDismiss--->',this.state.date)
} }
} }
> >
......
...@@ -167,19 +167,3 @@ label标签 ...@@ -167,19 +167,3 @@ label标签
background-color: black; background-color: black;
margin-top: .2rem; margin-top: .2rem;
} }
.blueSpan{
float: right;
margin-right: .1rem;
}
.blueSpan>div{
background-color: #8ec5f3;
font-size: .15rem;
width: .4rem;
height: .2rem;
line-height: .2rem;
margin-top: .03rem;
text-align: center;
color: white;
border-radius: 5px;
transform: scale(0.9);
}
\ No newline at end of file \ No newline at end of file
...@@ -76,21 +76,12 @@ import SwipeActionExample from "../../components/SwipeAction" ...@@ -76,21 +76,12 @@ import SwipeActionExample from "../../components/SwipeAction"
<div className={styles.right}> <div className={styles.right}>
<div className={styles.top}> <div className={styles.top}>
<div className={styles.title}>{item.riskName}</div> <div className={styles.title}>{item.riskName}</div>
{/**item.riskLabels && item.riskLabels.map((ite,ind)=>{ {item.riskLabels && item.riskLabels.map((ite,ind)=>{
return( return(
<span key={ind} className={ite === '新品'?styles.orangeSpan:styles.redSpan}> <span key={ind} className={ite === '新品'?styles.orangeSpan:styles.redSpan}>
{ ite =='热门' ?<img src={require("../../assets/image/label-hot.png")} alt=""/>:ite =='新品' ?<img src={require("../../assets/image/label-newProduct.png")} alt=""/> :null} { ite =='热门' ?<img src={require("../../assets/image/label-hot.png")} alt=""/>:ite =='新品' ?<img src={require("../../assets/image/label-newProduct.png")} alt=""/> :null}
</span> </span>
) )
})**/}
{item.riskLabels && item.riskLabels.map((ite,ind)=>{
return(
<span key={ind} className={ite == '新品' || ite == '热门' ? (ite == '新品' ? styles.orangeSpan:styles.redSpan) : styles.blueSpan}>
{ ite =='新品' && <img src={require("../../assets/image/label-newProduct.png")} alt=""/>}
{ ite =='热门' && <img src={require("../../assets/image/label-hot.png")} alt=""/>}
{ (ite !='新品' && ite !='热门') && <div><b style={{fontWeight:'lighter'}}>{ite}</b></div> }
</span>
)
})} })}
</div> </div>
......
import React from 'react'; import React from 'react';
import { SwipeAction } from 'antd-mobile'; import { SwipeAction } from 'antd-mobile';
import $ from 'jquery'; import $ from 'jquery';
import { sortArr } from '../../utils/dataFilter'; import { sortArr } from '../../utils/dataFilter';
import Iscroll from "../../components/Iscroll";
import css from './css.less'; import css from './css.less';
class MemberList extends React.Component{ class MemberList extends React.Component{
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -14,13 +15,12 @@ class MemberList extends React.Component{ ...@@ -14,13 +15,12 @@ class MemberList extends React.Component{
letters: ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','#'] letters: ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','#']
} }
} }
swipeBack(el, i) { swipeBack(el, i) {
$(el).find('.am-swipe-cover, .am-swipe-content').css('left', 0); $(el).find('.am-swipe-cover, .am-swipe-content').css('left', 0);
} }
//绑定子组件scroll得方法
maoPointRef = (ref) => {
this.child = ref;
}
render() { render() {
const { dataList, pTitle, showActionSheet, chooseClient, handleAction, renderItem, renderType, filterData, handleEdit,isCheckClientStateForSwipe } = this.props; const { dataList, pTitle, showActionSheet, chooseClient, handleAction, renderItem, renderType, filterData, handleEdit,isCheckClientStateForSwipe } = this.props;
const list = sortArr(dataList, renderType); const list = sortArr(dataList, renderType);
...@@ -37,17 +37,11 @@ class MemberList extends React.Component{ ...@@ -37,17 +37,11 @@ class MemberList extends React.Component{
placeholder={"请输入" + pTitle + "姓名"} /> placeholder={"请输入" + pTitle + "姓名"} />
</div> </div>
<div className={css.subTip}>所有{pTitle}<i>({dataList.length}人)</i></div> <div className={css.subTip}>所有{pTitle}<i>({dataList.length}人)</i></div>
<div className={css.scrollListWrap} style={{height:this.props.height ? this.props.height : '66vh'}} ref={el=>this.nameList=el}> <div className={css.scrollListWrap} ref={el=>this.nameList=el}>
<Iscroll id={"memberList_"+this.props.id}
iscrollOptions={{
probeType:2
}}
onRef={this.maoPointRef}
>
<div className={css.list}> <div className={css.list}>
{ {
list.length>0 && list.map((itm, index) => { list.length>0 && list.map((itm, index) => {
return <dl key={index} id={'list'+itm.letter} ref={el=>this['list'+itm.letter]=el} > return <dl key={index} ref={el=>this['list'+itm.letter]=el} >
<dt>{itm.letter}</dt> <dt>{itm.letter}</dt>
{ {
itm.list.map((item, i) => { itm.list.map((item, i) => {
...@@ -59,8 +53,7 @@ class MemberList extends React.Component{ ...@@ -59,8 +53,7 @@ class MemberList extends React.Component{
if (chooseClient) { if (chooseClient) {
chooseClient(item); chooseClient(item);
} }
}}> }}><SwipeAction
<SwipeAction
disabled={disabled||!isf} disabled={disabled||!isf}
right={[ right={[
{ {
...@@ -95,22 +88,19 @@ class MemberList extends React.Component{ ...@@ -95,22 +88,19 @@ class MemberList extends React.Component{
}) })
} }
</div> </div>
</Iscroll>
</div> </div>
{ {
// 是否有选择操作 // 是否有选择操作
showActionSheet && <div className={css.btnAdd} onClick={ showActionSheet }></div> showActionSheet && <div className={css.btnAdd} onClick={ showActionSheet }></div>
} }
<ul className={css.indexList} style={{height:this.props.height ? this.props.height : '69vh'}}> <ul className={css.indexList}>
{ {
// 右侧字母索引 // 右侧字母索引
this.state.letters.map((item,i) => { this.state.letters.map((item,i) => {
return <li key={i} onClick={() => { return <li key={i} onClick={() => {
for (let j = 0; j < list.length; j++){ for (let j = 0; j < list.length; j++){
if (list[j].letter === item) { if (list[j].letter === item) {
console.log('elementToTarget-->list',item) this['nameList'].scrollTop = this['list' + item].offsetTop;
this.child.elementToTarget('list' + item);
} }
} }
......
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
position: absolute; position: absolute;
right: 0; right: 0;
top: .7rem; top: .7rem;
overflow-y: auto;
height: 69vh;
z-index:5;
li { li {
color: #666; color: #666;
...@@ -40,7 +37,7 @@ ...@@ -40,7 +37,7 @@
.btnAdd { .btnAdd {
position: fixed; position: fixed;
right: .3rem; right: .3rem;
bottom: .08rem; bottom: .1rem;
width: .6rem; width: .6rem;
height: .6rem; height: .6rem;
background: url(../../assets/image/add-user.png) no-repeat; background: url(../../assets/image/add-user.png) no-repeat;
...@@ -92,10 +89,8 @@ ...@@ -92,10 +89,8 @@
} }
.scrollListWrap { .scrollListWrap {
position:relative;
background: #f8f8f8; background: #f8f8f8;
height: 66vh; height: 70vh;
//height: calc(100vh - 190px);
overflow-y: scroll; overflow-y: scroll;
} }
...@@ -129,7 +124,6 @@ ...@@ -129,7 +124,6 @@
font-size: .15rem; font-size: .15rem;
background: #fff; background: #fff;
color: #101010; color: #101010;
padding-right: .15rem;
span { span {
float: none; float: none;
......
import React,{Component} from 'react'; import React,{Component} from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { SwipeAction, List ,Modal} from 'antd-mobile'; import { SwipeAction, List } from 'antd-mobile';
import styles from "./swipeActive.css" import styles from "./swipeActive.css"
const alert = Modal.alert;
let alert2=null;
class SwipeActionExample extends Component{ class SwipeActionExample extends Component{
constructor(props){ constructor(props){
super(props); super(props);
...@@ -14,17 +12,20 @@ class SwipeActionExample extends Component{ ...@@ -14,17 +12,20 @@ class SwipeActionExample extends Component{
componentDidMount(){ componentDidMount(){
} }
componentWillUnmount(){
//如果弹框没有关闭则关闭
if(alert2){
alert2.close();
}
}
editor=(item)=>{ editor=(item)=>{
if(item.seriNo){ if(item.seriNo){
// this.props.goPlan(item)
/*this.props.dispatch(routerRedux.push({
pathname: '/planEditor',
query: {
seriNo:item.seriNo,
riskName:item.riskName,
},
}));*/
this.props.go1(item) this.props.go1(item)
} }
...@@ -36,19 +37,14 @@ class SwipeActionExample extends Component{ ...@@ -36,19 +37,14 @@ class SwipeActionExample extends Component{
} }
delete=(item)=>{ delete=(item)=>{
alert2 = alert('', '确定删除吗?', [ // 通讯录删除
{ text: '取消', onPress: () => {
return;
} },
{ text: '确定', onPress: () => {
if(this.props.client) { if(this.props.client) {
console.log(this.props.item.id); console.log(this.props.item.id);
this.props.delete(this.props.item.id) this.props.delete(this.props.item.id)
}else{ }else{
this.props.go(item) this.props.go(item)
} }
} },
])
} }
history=(item)=>{ history=(item)=>{
...@@ -63,7 +59,7 @@ class SwipeActionExample extends Component{ ...@@ -63,7 +59,7 @@ class SwipeActionExample extends Component{
disabled = {this.props.disabled} disabled = {this.props.disabled}
right={[ right={[
{ {
text: '编辑', text: '修改',
onPress: ()=>{ onPress: ()=>{
this.editor(this.props.item) this.editor(this.props.item)
}, },
...@@ -105,7 +101,7 @@ class SwipeActionExample extends Component{ ...@@ -105,7 +101,7 @@ class SwipeActionExample extends Component{
<div className={styles.top} style={{marginBottom:'.05rem'}}> <div className={styles.top} style={{marginBottom:'.05rem'}}>
<div className={styles.mytitle}>{this.props.item.riskName}</div> <div className={styles.mytitle}>{this.props.item.riskName}</div>
</div> </div>
<div className={styles.detail}>{this.props.item.insSex == 'M'?'男':'女'} &nbsp;&nbsp; {this.props.item.insAge} &nbsp;&nbsp;&nbsp; 期缴保费:{this.props.item.prem}元 </div> <div className={styles.detail}>{this.props.item.insSex== 'M'?'男':'女'} &nbsp;&nbsp; {this.props.item.insAge} &nbsp;&nbsp;&nbsp; 期缴保费:{this.props.item.prem}元 </div>
<div className={styles.detail2}>制作时间:{this.props.item.createTime}</div> <div className={styles.detail2}>制作时间:{this.props.item.createTime}</div>
</div> </div>
</div>} </div>}
...@@ -119,4 +115,6 @@ class SwipeActionExample extends Component{ ...@@ -119,4 +115,6 @@ class SwipeActionExample extends Component{
) )
} }
} }
// export default withRouter(SwipeActionExample)
export default connect(({home})=>({home}))(SwipeActionExample) export default connect(({home})=>({home}))(SwipeActionExample)
// (Form.create()(History))
...@@ -66,6 +66,4 @@ ...@@ -66,6 +66,4 @@
background: none !important; background: none !important;
} }
:global(.am-modal-transparent .am-modal-content){
padding-top: 15px;
}
:global(ul.slider-list){
height:1.4rem !important;
}
:global(.ant-carousel .slick-dots){
position: absolute;
/*bottom: 50px;*/
}
...@@ -22,7 +22,9 @@ import styles from "./Swiper.css" ...@@ -22,7 +22,9 @@ import styles from "./Swiper.css"
payload: { payload: {
"bannerName":"", "bannerName":"",
"bannerStatus":1, "bannerStatus":1,
"proId":localStorage.getItem("project"), "pageNo":1,
"pageSize":10,
"project":localStorage.getItem("project"),
"website":localStorage.getItem("website"), "website":localStorage.getItem("website"),
"orgId":localStorage.getItem("orgId"), "orgId":localStorage.getItem("orgId"),
}, },
...@@ -40,13 +42,12 @@ import styles from "./Swiper.css" ...@@ -40,13 +42,12 @@ import styles from "./Swiper.css"
storage.setItem("calculationMethod",item.bannerLabel) storage.setItem("calculationMethod",item.bannerLabel)
storage.setItem("selectd",1) storage.setItem("selectd",1)
storage.setItem("seriNo",'') storage.setItem("seriNo",'')
//storage.setItem("recipients",false) storage.setItem("recipients",false)
storage.setItem("riskIntroduce",'') storage.setItem("riskIntroduce",'')
// storage.setItem("thumbnail",item.bannerPath) storage.setItem("thumbnail",item.bannerPath)
storage.setItem("thumbnail",item.bannerUrl) storage.setItem("recipientsName",'')
//storage.setItem("recipientsName",'')
let roleId =localStorage.getItem("roleId"); let roleId =localStorage.getItem("roleId");
window.location.href= window.location.href.split('#')[0]+ '#/addplaneditor?riskName='+item.bannerName+'&riskCode='+item.bannerCode +'&calculationMethod='+ item.bannerLabel + '&riskIntroduce=&thumbnail='+item.bannerUrl+'&selectd=1&roleId='+ roleId +'&Id='+ localStorage.getItem('id') + '&seriNo=' window.location.href= window.location.href.split('#')[0]+ '#/addplaneditor?riskName='+item.bannerName+'&riskCode='+item.bannerCode +'&calculationMethod='+ item.bannerLabel + '&recipients=false&riskIntroduce=&thumbnail='+item.bannerPath+'&recipientsName=&selectd=1&roleId='+ roleId + '&seriNo='
} }
render(){ render(){
return ( return (
...@@ -74,7 +75,7 @@ import styles from "./Swiper.css" ...@@ -74,7 +75,7 @@ import styles from "./Swiper.css"
this.setState({ this.setState({
moveend: 0 moveend: 0
}) })
}} ><img src={item.bannerPath} alt="" style={{ width: '3.92rem',height:'1.8rem', borderRadius: '.12rem', }} }} ><img src={item.bannerPath} alt="" style={{ width: '3.92rem', borderRadius: '.12rem', }}
/> </div>) /> </div>)
})} })}
</Carousel> </Carousel>
......
...@@ -13,6 +13,103 @@ const EditableRow = ({ form, index, ...props }) => ( ...@@ -13,6 +13,103 @@ const EditableRow = ({ form, index, ...props }) => (
</EditableContext.Provider> </EditableContext.Provider>
); );
const EditableFormRow = Form.create()(EditableRow);
class EditableCell extends React.Component {
state = {
editing: false,
}
componentDidMount() {
if (this.props.editable) {
document.addEventListener('click', this.handleClickOutside, true);
}
}
/* componentWillUnmount() {
if (this.props.editable) {
document.removeEventListener('click', this.handleClickOutside, true);
}
}*/
toggleEdit = () => {
const editing = !this.state.editing;
this.setState({ editing }, () => {
if (editing) {
this.input.focus();
}
});
}
handleClickOutside = (e) => {
const { editing } = this.state;
if (editing && this.cell !== e.target && !this.cell.contains(e.target)) {
this.save();
}
}
save = () => {
const { record, handleSave } = this.props;
this.form.validateFields((error, values) => {
if (error) {
return;
}
this.toggleEdit();
handleSave({ ...record, ...values });
});
}
render() {
const { editing } = this.state;
const {
// editable,
// dataIndex,
// title,
// record,
// index,
// handleSave,
...restProps
} = this.props;
return (
<td ref={node => (this.cell = node)} {...restProps}>
{/*{editable ? (*/}
{/*<EditableContext.Consumer>*/}
{/*{(form) => {*/}
{/*this.form = form;*/}
{/*return (*/}
{/*editing ? (*/}
{/*<FormItem style={{ margin: 0 }}>*/}
{/*{form.getFieldDecorator(dataIndex, {*/}
{/*rules: [{*/}
{/*required: true,*/}
{/*message: `${title} is required.`,*/}
{/*}],*/}
{/*initialValue: record[dataIndex],*/}
{/*})(*/}
{/*<Input*/}
{/*ref={node => (this.input = node)}*/}
{/*onPressEnter={this.save}*/}
{/*/>*/}
{/*)}*/}
{/*</FormItem>*/}
{/*) : (*/}
{/*<div*/}
{/*className="editable-cell-value-wrap"*/}
{/*style={{ paddingRight: 24 }}*/}
{/*onClick={this.toggleEdit}*/}
{/*>*/}
{/*{restProps.children}*/}
{/*</div>*/}
{/*)*/}
{/*);*/}
{/*}}*/}
{/*</EditableContext.Consumer>*/}
{/*) : restProps.children}*/}
</td>
);
}
}
export default class EditableTable extends React.Component { export default class EditableTable extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -45,12 +142,7 @@ export default class EditableTable extends React.Component { ...@@ -45,12 +142,7 @@ export default class EditableTable extends React.Component {
count: 2, count: 2,
}; };
} }
componentWillReceiveProps(nextProps){
this.setState({
dataSource:nextProps.listTable,
columns:nextProps.listTitle,
})
}
componentDidMount(){ componentDidMount(){
this.setState({ this.setState({
dataSource:this.props.listTable, dataSource:this.props.listTable,
......
...@@ -45,8 +45,6 @@ ...@@ -45,8 +45,6 @@
/* 我的客户 --- 无*/ /* 我的客户 --- 无*/
.clientless{ .clientless{
/*margin: auto;*/ /*margin: auto;*/
position: absolute;
height: 100%;
} }
.clientless> .client{ .clientless> .client{
width: 1.51rem; width: 1.51rem;
...@@ -60,11 +58,9 @@ ...@@ -60,11 +58,9 @@
margin-bottom: .02rem; margin-bottom: .02rem;
} }
.add{ .add{
position: absolute;
bottom: .32rem;
width: 3.5rem; width: 3.5rem;
height: 1.22rem; height: 1.22rem;
margin: 0 .32rem 0; margin: 1.8rem .32rem 0;
} }
...@@ -196,16 +192,26 @@ SwipeActionExample{ ...@@ -196,16 +192,26 @@ SwipeActionExample{
list-style: none; list-style: none;
} }
.btn_confirm{ .btn_confirm{
position: relative; /*width: 100%;*/
height: .7rem; /*height: 1rem;*/
top: .05rem;
} }
.btn_confirm>img{ .btn_confirm>img{
width: .6rem; width: .6rem;
height: .6rem; height: .6rem;
position: relative; /* margin: auto; */
position: absolute;
right: .2rem; right: .2rem;
float: right; bottom: .1rem;
}
.btn_confirm1>img{
width: .6rem;
height: .6rem;
/* margin: auto; */
position: absolute;
right: -4rem;
bottom: .1rem;
} }
...@@ -238,9 +244,5 @@ SwipeActionExample{ ...@@ -238,9 +244,5 @@ SwipeActionExample{
justify-content: center; justify-content: center;
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
min-height: 100%;
} }
/*:global(.am-list-line){*/
/*padding-left: 15px;*/
/*}*/
...@@ -7,7 +7,7 @@ import InsuranceList from "../InsuranceList" ...@@ -7,7 +7,7 @@ import InsuranceList from "../InsuranceList"
import styles from "./Tabs.css" import styles from "./Tabs.css"
import css from "../../routes/GovernorTraining/css.less" import css from "../../routes/GovernorTraining/css.less"
import MemberList from '../../components/MemberList/MemberList'; import MemberList from '../../components/MemberList/MemberList';
import Iscroll from "../../components/Iscroll";
class Tab extends Component{ class Tab extends Component{
constructor(props){ constructor(props){
super(props); super(props);
...@@ -19,11 +19,14 @@ class Tab extends Component{ ...@@ -19,11 +19,14 @@ class Tab extends Component{
chosenItm: '', chosenItm: '',
inputValue:'', inputValue:'',
name:'', name:'',
nameListLength:0,
currentStatus:'', currentStatus:'',
managerList:[],
managerList1:[],
firstName:[], firstName:[],
nameList:props.nameList, nameList:props.nameList,
nameList1:props.nameList1, nameList1:props.nameList1,
checkTab:0, // nameList1:[],
} }
} }
onSearch = (val) => { onSearch = (val) => {
...@@ -31,8 +34,44 @@ class Tab extends Component{ ...@@ -31,8 +34,44 @@ class Tab extends Component{
inputValue:val inputValue:val
}) })
} }
componentWillMount(){ componentWillMount(){
let that = this; let that = this;
that.props.dispatch({
type:'myUser/getAllUser',
payload:{
"id":localStorage.getItem("id"),
"currentState":0,
},
callback(data){
that.setState({
list:data,
nameList:data,
managerList:data,
nameListLength:data.length,
})
}
})
this.props.dispatch({
type:'myUser/getAllUser',
payload:{
"id":localStorage.getItem("id"),
},
callback(data){
that.setState({
list:data,
nameList1:data,
managerList1:data,
nameListLength:data.length,
})
}
})
}
/* 客户列表接口 */
getUaer = (index)=>{
let that = this;
if(index==0){
// that.props.dispatch({ // that.props.dispatch({
// type:'myUser/getAllUser', // type:'myUser/getAllUser',
// payload:{ // payload:{
...@@ -43,10 +82,13 @@ class Tab extends Component{ ...@@ -43,10 +82,13 @@ class Tab extends Component{
// that.setState({ // that.setState({
// list:data, // list:data,
// nameList:data, // nameList:data,
// managerList:data,
// nameListLength:data.length,
// }) // })
// } // }
// }) // })
// this.props.dispatch({ }else if(index == 1){
// that.props.dispatch({
// type:'myUser/getAllUser', // type:'myUser/getAllUser',
// payload:{ // payload:{
// "id":localStorage.getItem("id"), // "id":localStorage.getItem("id"),
...@@ -55,10 +97,16 @@ class Tab extends Component{ ...@@ -55,10 +97,16 @@ class Tab extends Component{
// that.setState({ // that.setState({
// list:data, // list:data,
// nameList1:data, // nameList1:data,
// managerList1:data,
// nameListLength:data.length,
// }) // })
// } // }
// }) // })
} }
}
/* 删除客户 */ /* 删除客户 */
delete = (id)=>{ delete = (id)=>{
let that = this; let that = this;
...@@ -70,40 +118,51 @@ class Tab extends Component{ ...@@ -70,40 +118,51 @@ class Tab extends Component{
callback(){ callback(){
// this.getUaer() // this.getUaer()
} }
}) })
} }
history=()=>{ history=()=>{
this.props.history() this.props.history()
} }
go1=(item)=>{ go1=(item)=>{
console.log(item); console.log(item);
// this.props.dispatch(routerRedux.push({
// pathname: '/planEditor',}));
let storage = window.localStorage; let storage = window.localStorage;
storage.setItem("riskName",item.riskName) storage.setItem("riskName",item.riskName)
storage.setItem("riskCode",item.riskCode) storage.setItem("riskCode",item.riskCode)
storage.setItem("calculationMethod",item.calculationMethod) storage.setItem("calculationMethod",item.calculationMethod)
storage.setItem("selectd",1) storage.setItem("selectd",1)
storage.setItem("seriNo",item.seriNo) storage.setItem("seriNo",item.seriNo)
//storage.setItem("recipients",false) storage.setItem("recipients",false)
storage.setItem("riskIntroduce",item.riskIntroduce) storage.setItem("riskIntroduce",item.riskIntroduce)
storage.setItem("thumbnail",item.thumbnail) storage.setItem("thumbnail",item.thumbnail)
//storage.setItem("recipientsName",'') storage.setItem("recipientsName",'')
//storage.setItem("recipientsSex",true) storage.setItem("recipientsSex",true)
//storage.setItem("recipients",false) storage.setItem("recipients",false)
let roleId =localStorage.getItem("roleId"); let roleId =localStorage.getItem("roleId");
window.location.href= window.location.href.split('#')[0]+ '#/addplaneditor?riskName='+item.riskName+'&riskCode='+item.riskCode +'&calculationMethod='+ item.calculationMethod + '&thumbnail='+item.thumbnail+'&selectd=1&roleId='+ roleId +'&Id='+ localStorage.getItem('id') + '&seriNo='+item.seriNo+'&recipientsName='+ item.receiveName +'&recipientsSex='+item.receiveSex; window.location.href= window.location.href.split('#')[0]+ '#/planEditor?riskName='+item.riskName+'&riskCode='+item.riskCode +'&calculationMethod='+ item.calculationMethod + '&recipients=false&riskIntroduce='+item.riskIntroduce+ '&thumbnail='+item.thumbnail+'&recipientsName=&selectd=1&roleId='+ roleId + '&seriNo='+item.seriNo
} }
goPlanResult=(item)=>{ goPlanResult=(item)=>{
// this.props.dispatch(routerRedux.push({
// pathname: '/planResult',}));
let storage = window.localStorage; let storage = window.localStorage;
storage.setItem("seriNo",item.seriNo) storage.setItem("seriNo",item.seriNo)
storage.setItem("calculationMethod",item.calculationMethod) storage.setItem("calculationMethod",item.calculationMethod)
storage.setItem("riskCode",item.riskCode) storage.setItem("riskCode",item.riskCode)
storage.setItem("riskName",item.riskName) storage.setItem("riskName",item.riskName)
storage.setItem("thumbnail",item.thumbnail) storage.setItem("thumbnail",item.thumbnail)
window.location.href= window.location.href.split('#')[0]+ '#/planResult?seriNo='+item.seriNo+'&riskName='+item.riskName +'&riskCode='+ item.riskCode +'&thumbnail='+item.thumbnail+'&recipientsName='+ item.receiveName +'&recipientsSex='+item.receiveSex;
window.location.href= window.location.href.split('#')[0]+ '#/planResult?seriNo='+item.seriNo+'&riskName='+item.riskName +'&riskCode='+ item.riskCode +'&thumbnail='+item.thumbnail
} }
go=(item)=>{ go=(item)=>{
this.props.dispatch({ this.props.dispatch({
type:'planEditor/getMyPlanMessage', type:'home/getMyPlanMessage',
payload:{ payload:{
"seriNo":item.seriNo, "seriNo":item.seriNo,
"interestRate":"0.03" "interestRate":"0.03"
...@@ -111,10 +170,14 @@ go=(item)=>{ ...@@ -111,10 +170,14 @@ go=(item)=>{
callback(data){ callback(data){
} }
}) })
this.props.BrowserRouter.push({pathname:'/planEditor',query:{id:1}})
} }
dispatch=(item)=>{ dispatch=(item)=>{
let that = this; let that = this;
if(item.seriNo){ if(item.seriNo){
}else{ }else{
this.props.dispatch({ this.props.dispatch({
type: 'myUser/getAllUser', type: 'myUser/getAllUser',
...@@ -127,42 +190,44 @@ go=(item)=>{ ...@@ -127,42 +190,44 @@ go=(item)=>{
} }
}) })
} }
} }
goAddInsurance = (item)=>{ goAddInsurance = (item)=>{
let storage = window.localStorage; let storage = window.localStorage;
storage.setItem("riskName",item.riskName) storage.setItem("riskName",item.riskName)
storage.setItem("riskCode",item.riskCode) storage.setItem("riskCode",item.riskCode)
storage.setItem("calculationMethod",item.calculationMethod) storage.setItem("calculationMethod",item.calculationMethod)
storage.setItem("selectd",1) storage.setItem("selectd",1)
storage.setItem("seriNo",'') storage.setItem("seriNo",'')
//storage.setItem("recipients",false) storage.setItem("recipients",false)
storage.setItem("riskIntroduce",item.riskIntroduce) storage.setItem("riskIntroduce",item.riskIntroduce)
storage.setItem("thumbnail",item.thumbnail) storage.setItem("thumbnail",item.thumbnail)
//storage.setItem("recipientsName",'') storage.setItem("recipientsName",'')
//storage.setItem("recipientsSex",true) storage.setItem("recipientsSex",true)
//storage.setItem("recipients",false) storage.setItem("recipients",false)
let roleId =localStorage.getItem("roleId"); let roleId =localStorage.getItem("roleId");
window.location.href= window.location.href.split('#')[0]+ '#/addPlanEditor?riskName='+item.riskName+'&riskCode='+item.riskCode +'&calculationMethod='+ item.calculationMethod + '&riskIntroduce=&thumbnail='+item.thumbnail+'&selectd=1&roleId='+ roleId +'&Id='+ localStorage.getItem('id') + '&seriNo=' window.location.href= window.location.href.split('#')[0]+ '#/addPlanEditor?riskName='+item.riskName+'&riskCode='+item.riskCode +'&calculationMethod='+ item.calculationMethod + '&recipients=false&riskIntroduce='+item.riskIntroduce+ '&thumbnail='+item.thumbnail+'&recipientsName=&selectd=1&roleId='+ roleId + '&seriNo='
} }
render() { render() {
let checkTab = this.state.checkTab
if(sessionStorage.getItem("key") == '已提交'){ let showClient = this.state.nameList?this.state.nameList.length==0:false &&this.props.user;
checkTab = 1 let showClient1 = this.state.nameList1?this.state.nameList1.length==0:false &&this.props.user;
}
if(sessionStorage.getItem("key") == '我的'){
checkTab = 1
}
let showClient = this.props.storeNameList?this.props.storeNameList.length==0:false &&this.props.user;
let showClient1 = this.props.storeNameList1?this.props.storeNameList1.length==0:false &&this.props.user;
const { dataFilterToProp } = this.props; const { dataFilterToProp } = this.props;
return ( return (
<div style={{height:'100%',backgroundColor:'white'}}> <div style={{height:'100%'}}>
<Tabs tabs={this.state.tabs} <Tabs tabs={this.state.tabs}
initialPage={checkTab} initialPage={0}
swipeable={false} swipeable={false}
onChange={(tab, index) => { onChange={(tab, index) => {
let checkTab = tab.title.props.children;
sessionStorage.setItem( "key", checkTab); }}
onTabClick={(tab, index) => {
this.props.user ? this.getUaer(index):this.props.getMyPlan(index)
}} }}
tabBarTextStyle={{fontSize:'.15rem',height:'.435rem'}} tabBarTextStyle={{fontSize:'.15rem',height:'.435rem'}}
> >
...@@ -175,9 +240,11 @@ go=(item)=>{ ...@@ -175,9 +240,11 @@ go=(item)=>{
<div><img src={require('../../assets/image/no-more.png')} alt=""/> <div><img src={require('../../assets/image/no-more.png')} alt=""/>
<span>没有更多啦</span> <span>没有更多啦</span>
</div> </div>
{/*<div className={styles.line}></div>*/}
</div> </div>
</div> </div>
} }
{/* 我的客户---无客户跟进中*/} {/* 我的客户---无客户跟进中*/}
{ !this.props.myPlanList&& showClient && <div className={styles.clientless}> { !this.props.myPlanList&& showClient && <div className={styles.clientless}>
<img src={require('../../assets/image/clientless.png')} alt="" className={styles.client}/> <img src={require('../../assets/image/clientless.png')} alt="" className={styles.client}/>
...@@ -189,7 +256,7 @@ go=(item)=>{ ...@@ -189,7 +256,7 @@ go=(item)=>{
this.props.addUser(); this.props.addUser();
}} alt="" className={styles.add}/> }} alt="" className={styles.add}/>
</div>} </div>}
{/*我的客户 --- 未提交*/} {/*我的客户 --- 有用户跟进中*/}
{ !this.props.myPlanList&& !showClient && { !this.props.myPlanList&& !showClient &&
<div className={styles.less} style={{ width: '100%',height:'100%'}}> <div className={styles.less} style={{ width: '100%',height:'100%'}}>
{!this.props.hasClient[0] && <div className={styles.clientless}> {!this.props.hasClient[0] && <div className={styles.clientless}>
...@@ -201,12 +268,8 @@ go=(item)=>{ ...@@ -201,12 +268,8 @@ go=(item)=>{
<img src={require('../../assets/image/addUsers.png')} onClick={() => { <img src={require('../../assets/image/addUsers.png')} onClick={() => {
this.props.addUser(); this.props.addUser();
}} alt="" className={styles.add} /> }} alt="" className={styles.add} />
</div> </div>}
} {this.props.hasClient[0] &&<div> <MemberList
{this.props.hasClient[0] &&
<div>
<MemberList
id="user1"
dataList={this.props.nameList} dataList={this.props.nameList}
renderType={['name']} renderType={['name']}
content={this.props.content} content={this.props.content}
...@@ -218,11 +281,7 @@ go=(item)=>{ ...@@ -218,11 +281,7 @@ go=(item)=>{
dataFilterToProp(keywords, 0); dataFilterToProp(keywords, 0);
}} }}
renderItem={item => { renderItem={item => {
return <div className={css.managerItem} onClick={()=>{ return <div className={css.managerItem}>
let clientNeededInfo = {...item ,disabled1:true}
localStorage.setItem('clientNeededInfo', JSON.stringify(clientNeededInfo))
window.location.href = window.location.href.split('#')[0] + '#/addUser'
}}>
<span className={css.name}>{item.name}</span><span className={css.time}>{item.createTime.substr(0, 16)}</span> <span className={css.name}>{item.name}</span><span className={css.time}>{item.createTime.substr(0, 16)}</span>
</div> </div>
}} }}
...@@ -235,40 +294,30 @@ go=(item)=>{ ...@@ -235,40 +294,30 @@ go=(item)=>{
this.props.addUser(); this.props.addUser();
}} /> }} />
</div> </div>
</div>}
</div> </div>
} }
</div> </div>
} <div style={{ display: 'flex', height:'100%', justifyContent: 'center',backgroundColor: '#fff',marginBottom:'.3rem' ,overflowX:'hidden'}}>
</div>
{/*----tabs 右侧--*/}
<div style={{ position: 'relative',display: 'flex', minHeight:'100%', justifyContent: 'center',backgroundColor: '#fff',overflow: 'hidden'}}>
{/*计划书---我的*/} {/*计划书---我的*/}
{this.props.myPlanList && <div style={{marginBottom:'.3rem'}}> {this.props.myPlanList && <div>
<Iscroll id="myPlan2"
iscrollOptions={{
probeType:2
}}
>
<InsuranceList planList = {this.props.myPlanList} className={styles.last} history={this.history} my={true} go={this.go} go1={this.go1} goPlanResult={this.goPlanResult} getMyPlan = {this.props.getMyPlan}></InsuranceList> <InsuranceList planList = {this.props.myPlanList} className={styles.last} history={this.history} my={true} go={this.go} go1={this.go1} goPlanResult={this.goPlanResult} getMyPlan = {this.props.getMyPlan}></InsuranceList>
<div className={styles.noMore}> <div className={styles.noMore}>
<div><img src={require('../../assets/image/no-more.png')} alt=""/> <div><img src={require('../../assets/image/no-more.png')} alt=""/>
<span>没有更多啦</span> <span>没有更多啦</span>
</div> </div>
{/*<div className={styles.line}></div>*/}
</div> </div>
</Iscroll>
</div>} </div>}
{/* 我的客户 --- 无客户已提交*/} {/* 我的客户 --- 无客户已提交*/}
{!this.props.myPlanList&& showClient1 && <div className={styles.clientless}> {!this.props.myPlanList&& showClient1 && <div className={styles.clientless}>
<img src={require('../../assets/image/clientless.png')} alt="" className={styles.client}/> <img src={require('../../assets/image/clientless.png')} alt="" className={styles.client}/>
<p> <p>
您当前并无跟进客户 您当前并无跟进客户
</p> </p>
<p>点击下方按钮添加</p> </div>}
<img src={require('../../assets/image/addUsers.png')} onClick={() => {
this.props.addUser();
}} alt="" className={styles.add} />
</div>
}
{/*我的客户---有客户已提交 */} {/*我的客户---有客户已提交 */}
{!this.props.myPlanList&& !showClient1 && <div className={styles.less} style={{width:'100%'}}> {!this.props.myPlanList&& !showClient1 && <div className={styles.less} style={{width:'100%'}}>
{!this.props.hasClient[1] && <div className={styles.clientless}> {!this.props.hasClient[1] && <div className={styles.clientless}>
...@@ -280,11 +329,8 @@ go=(item)=>{ ...@@ -280,11 +329,8 @@ go=(item)=>{
<img src={require('../../assets/image/addUsers.png')} onClick={() => { <img src={require('../../assets/image/addUsers.png')} onClick={() => {
this.props.addUser(); this.props.addUser();
}} alt="" className={styles.add} /> }} alt="" className={styles.add} />
</div> </div>}
} { this.props.hasClient[1] && <div><MemberList
{ this.props.hasClient[1] && <div style={{height:'100%'}}>
<MemberList
id="user2"
dataList={this.props.nameList1} dataList={this.props.nameList1}
renderType={['name']} renderType={['name']}
isCheckClientStateForSwipe={true} isCheckClientStateForSwipe={true}
...@@ -292,20 +338,21 @@ go=(item)=>{ ...@@ -292,20 +338,21 @@ go=(item)=>{
// item 客户信息, true 已提交状态 // item 客户信息, true 已提交状态
this.props.goAddUser(item, true) this.props.goAddUser(item, true)
}} }}
filterData={keywords => { filterData={keywords => {
dataFilterToProp(keywords, 1); dataFilterToProp(keywords, 1);
}} }}
renderItem={item => { renderItem={item => {
let status = '未提交'; let status = '未提交';
switch (item.currentState) { switch (item.currentState) {
// case '1': case '1':
// status = '待审核'; status = '待审核';
// break; break;
// case '2': case '2':
// status = '审核退回'; status = '审核退回';
// break; break;
case '3': case '3':
status = '已提交'; status = '审核通过';
break; break;
case '4': case '4':
status = '已成单'; status = '已成单';
...@@ -321,12 +368,12 @@ go=(item)=>{ ...@@ -321,12 +368,12 @@ go=(item)=>{
break; break;
default: default:
} }
return <div className={css.clientItem} return <div className={css.clientItem}
style={{display:'flex'}} style={{display:'flex'}}
onClick={()=>{ onClick={()=>{
let clientNeededInfo = {...item ,disabled1:true} let clientNeededInfo = {...item ,disabled1:true}
localStorage.setItem('clientNeededInfo', JSON.stringify(clientNeededInfo)) localStorage.setItem('clientNeededInfo', JSON.stringify(clientNeededInfo))
//审核驳回的,可以修改,不能预览
if(item.currentState !=2){ if(item.currentState !=2){
window.location.href = window.location.href.split('#')[0] + '#/addUser' window.location.href = window.location.href.split('#')[0] + '#/addUser'
} }
...@@ -341,15 +388,13 @@ go=(item)=>{ ...@@ -341,15 +388,13 @@ go=(item)=>{
this.props.delete(item.id) this.props.delete(item.id)
}} }}
pTitle='客户' /> pTitle='客户' />
<div className={styles.btn_confirm} > <div className={styles.btn_confirm1} >
<img src={require('../../assets/image/add-user.png')} alt="" onClick={() => { <img src={require('../../assets/image/add-user.png')} alt="" onClick={() => {
this.props.addUser(); this.props.addUser();
}} /> }} />
</div> </div>
</div> </div>}
} </div>}
</div>
}
</div> </div>
</Tabs> </Tabs>
<WhiteSpace /> <WhiteSpace />
......
import React from "react";
export default class Select extends React.Component {
constructor(props) {
super(props);
this.state = {
projects: [],
value: 1
};
}
componentDidMount() {
console.log(this.props.list);
this.setState({
projects: this.props.list,
value: 1
});
}
handleClick() {
this.setState({
projects: [
{ id: 4, name: "水果" },
{ id: 5, name: "西瓜" },
{ id: 6, name: "哈哈哈" }
],
value: 4
});
}
handleChange = e => {
this.setState({
value: e.target.value
});
this.props.changeValue(e.target.value)
console.log(e.target.value);
};
render() {
let projects = this.state.projects;
return (
<div>
<select
value={this.state.value}
onChange={this.handleChange}
>
{projects.length > 0 &&
projects.map((item, i) => {
return (
<option key={i} value={item.name}>
{item.name}
</option>
);
})}
</select>
</div>
);
}
}
...@@ -3,19 +3,17 @@ ...@@ -3,19 +3,17 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<title>&nbsp;</title> <title>华夏O2O</title>
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate"> <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="0">
</head> </head>
<body> <body>
<script type="text/javascript">
document.title='\u200E';//设置title为空
</script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=kbGgAESiajyhOwzTsjcACyXlDtvoMBp8"></script>
<div id="root"></div> <div id="root"></div>
<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> <script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script src="https://zmt.ihxlife.com/pdf.js"></script> <script src="https://zmt.ihxlife.com/pdf.js"></script>
<script src="https://zmt.ihxlife.com/pdf.worker.js"></script> <script src="https://zmt.ihxlife.com/pdf.worker.js"></script>
</body> </body>
</html> </html>
...@@ -19,17 +19,12 @@ app.model(require('./models/poster').default); ...@@ -19,17 +19,12 @@ app.model(require('./models/poster').default);
app.model(require('./models/databank').default); app.model(require('./models/databank').default);
app.model(require('./models/GovernorTraining').default); app.model(require('./models/GovernorTraining').default);
app.model(require('./models/getCode').default); app.model(require('./models/getCode').default);
app.model(require('./models/Performance').default); app.model(require('./models/Performance').default)
app.model(require('./models/Invitation').default);
app.model(require('./models/infoCenter').default);
app.model(require('./models/BusinessCard').default);
app.model(require('./models/industrynews').default);
app.model(require('./models/exchangeCommunity').default);
app.model(require('./models/myCenter').default);
// 4. Router // 4. Router
app.router(require('./router').default); app.router(require('./router').default);
// 5. Start // 5. Start
app.start('#root'); app.start('#root');
......
import {policyList,performList,achievementRank} from '../services/performance'; import { notifyError } from '../services/app.js';
import {policyList,performList} from '../services/performance';
import {Toast} from "antd-mobile" import {Toast} from "antd-mobile"
export default { export default {
namespace: 'Performance', namespace: 'Performance',
...@@ -12,6 +13,7 @@ export default { ...@@ -12,6 +13,7 @@ export default {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
error && error(data) error && error(data)
// notifyError(data.message);
} }
}, },
*performList({ payload, callback, error}, { call, put }) { *performList({ payload, callback, error}, { call, put }) {
...@@ -22,14 +24,6 @@ export default { ...@@ -22,14 +24,6 @@ export default {
error&& error(data) error&& error(data)
} }
}, },
*achievementRank({ payload, callback, error}, { call, put }) {
const { data } = yield call(achievementRank, payload);
if (data.status === true) {
if (callback) callback(data.data);
} else {
error&& error(data)
}
}
}, },
reducers: { reducers: {
saveUser(state, { payload }) { saveUser(state, { payload }) {
......
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { addUser,Dictionaries,sendMaster,isFollow,followCustomer} from '../services/addUser'; import { addUser,Dictionaries,PremiumPaymentPeriod ,sendMaster,isFollow} from '../services/addUser';
...@@ -19,7 +19,6 @@ export default { ...@@ -19,7 +19,6 @@ export default {
} else { } else {
// if (error) callback(error); // if (error) callback(error);
if (error) error(data); if (error) error(data);
} }
}, },
*Dictionaries({ payload, callback }, { call, put }) { *Dictionaries({ payload, callback }, { call, put }) {
...@@ -31,21 +30,20 @@ export default { ...@@ -31,21 +30,20 @@ export default {
notifyError(data.message); notifyError(data.message);
} }
}, },
*PremiumPaymentPeriod({ payload, callback }, { call, put }) {
*sendMaster({ payload, callback,error }, { call, put }) {
console.log(payload); console.log(payload);
const { data } = yield call(sendMaster, payload); const { data } = yield call(PremiumPaymentPeriod, payload);
if (data.status) { if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
if (error) error(data.data); notifyError(data.message);
// notifyError(data.message);
} }
}, },
*isFollow({ payload, callback,error }, { call, put }) {
*sendMaster({ payload, callback,error }, { call, put }) {
console.log(payload); console.log(payload);
const { data } = yield call(isFollow, payload); const { data } = yield call(sendMaster, payload);
if (data.status) { if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
...@@ -54,15 +52,16 @@ export default { ...@@ -54,15 +52,16 @@ export default {
} }
}, },
*followCustomer({ payload, callback,error }, { call, put }) { *isFollow({ payload, callback,error }, { call, put }) {
console.log(payload); console.log(payload);
const { data } = yield call(followCustomer, payload); const { data } = yield call(isFollow, payload);
if (data.status) { if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
} else { } else {
if (error) error(data.data); if (error) error(data.data);
// notifyError(data.message);
} }
} },
......
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { getBanner,getPlanList,getMyPlan,getCustomerInfo,GetRoomList,getSearchList,setClickRecord} from '../services/home'; import { getBanner,getPlanList,getMyPlan,getMyPlanMessage,getCustomerInfo} from '../services/home';
export default { export default {
namespace: 'home', namespace: 'home',
state: { state: {
PersonalDetail:{}, PersonalDetail:{},
AllPlanList:[],
MyPlanList:[],
searchList:[]
}, },
effects: { effects: {
*getBanner({ payload, callback }, { call, put }) { *getBanner({ payload, callback }, { call, put }) {
...@@ -24,7 +25,6 @@ export default { ...@@ -24,7 +25,6 @@ export default {
const { data } = yield call(getPlanList, payload); const { data } = yield call(getPlanList, payload);
if (data.status === true) { if (data.status === true) {
if (callback) callback(data.data); if (callback) callback(data.data);
yield put({ type: 'updatePlanList' ,payload:{planList:data.data}});
} else { } else {
notifyError('退出失败!'); notifyError('退出失败!');
} }
...@@ -38,51 +38,33 @@ export default { ...@@ -38,51 +38,33 @@ export default {
// notifyError(data.message); // notifyError(data.message);
} }
}, },
*getCustomerInfo({ payload, callback }, { call, put }) { *getMyPlanMessage({ payload, callback }, { call, put }) {
const { data } = yield call(getCustomerInfo, payload); const { data } = yield call(getMyPlanMessage, payload);
if (callback) callback(data); if (data.status === true) {
}, yield put({
*getRoomList({ payload, callback }, { call, put }) { type: 'savePersonalDetail',
const { data } = yield call(GetRoomList, payload); payload: data.data,
if (data.code === 0) { });
if (callback) callback(data);
} else {
notifyError(data.message);
}
},
*getSearchList({ payload, callback }, { call, put }) {
const { data } = yield call(getSearchList, payload);
if (data.status) {
if (callback) callback(data.data); if (callback) callback(data.data);
yield put({ type: 'updateSearchList' ,payload:{searchList:data.data}});
} else { } else {
notifyError(data.message); notifyError(data.message);
} }
}, },
*setClickRecord({ payload, callback }, { call, put }) { *getCustomerInfo({ payload, callback }, { call, put }) {
const { data } = yield call(setClickRecord, payload); const { data } = yield call(getCustomerInfo, payload);
if (data.status) { if (callback) callback(data);
if (callback) callback(data.data); },
} else {
notifyError(data.message);
}
}
}, },
reducers: { reducers: {
savePersonalDetail(state, { payload }) { savePersonalDetail(state, { payload }) {
return { ...state, PersonalDetail: payload.microPlanInfo }; return { ...state, PersonalDetail: payload.microPlanInfo };
}, },
updatePlanList(state, { payload }){
return {
...state,
AllPlanList: payload.planList };
},
updateSearchList(state, { payload }){
return {
...state,
...payload };
}
}, },
subscriptions: { subscriptions: {
......
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
if (data.status === true) { if (data.status === true) {
if (callback) callback(data); if (callback) callback(data);
} else { } else {
notifyError(data.message); // notifyError(data.message);
} }
}, },
*Approve({ payload, callback }, { call, put }) { *Approve({ payload, callback }, { call, put }) {
......
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { getAllUser,deleteCustomer } from '../services/myUser'; import { getAllUser,deleteCustomer,GetRoomList } from '../services/myUser';
...@@ -16,14 +16,13 @@ export default { ...@@ -16,14 +16,13 @@ export default {
*getAllUser({ payload, callback }, { call, put }) { *getAllUser({ payload, callback }, { call, put }) {
const { data } = yield call(getAllUser, payload); const { data } = yield call(getAllUser, payload);
if (data.status === true) { if (data.status === true) {
if(data.data && data.data.length===1){ if(data.data.length===1){
yield put({ yield put({
type: 'saveUser', type: 'saveUser',
payload: data.data, payload: data.data,
}); });
} }
let dataList = data.data || []; if (callback) callback(data.data);
if (callback) callback(dataList);
} else { } else {
notifyError(data.message); notifyError(data.message);
} }
...@@ -36,6 +35,18 @@ export default { ...@@ -36,6 +35,18 @@ export default {
notifyError(data.message); notifyError(data.message);
} }
}, },
*getRoomList({ payload, callback }, { call, put }) {
const { data } = yield call(GetRoomList, payload);
if (data.code === 0) {
if (callback) callback(data);
} else {
notifyError(data.message);
}
},
}, },
reducers: { reducers: {
......
import { getMyPlanMessage,PlanClause,payInsurance,getProspectusaAditional,deletePlan,PremiumPaymentPeriod,addReceiveInfo} from '../services/planEditor';
import { notifyError } from '../services/app.js'; import { notifyError } from '../services/app.js';
import { PlanClause,payInsurance,getProspectusaAditional,deletePlan} from '../services/planEditor';
export default { export default {
namespace: 'planEditor', namespace: 'planEditor',
state: { state: {
userName: '', userName: '',
password: '', password: '',
termList:'',//产品条款
}, },
effects: { effects: {
// 计划书 获取险种信息
*getMyPlanMessage({ payload, callback }, { call, put }) {
const { data } = yield call(getMyPlanMessage, payload);
if (data.status === true) {
yield put({
type: 'savePersonalDetail',
payload: data.data,
});
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
},
// 计划书查看条款 // 计划书查看条款
*PlanClause({ payload, callback ,error}, { call, put }) { *PlanClause({ payload, callback ,error}, { call, put }) {
const { data } = yield call(PlanClause, payload); const { data } = yield call(PlanClause, payload);
if (data.status) { if (data.status) {
if (callback) callback(data); if (callback) callback(data);
} else { } else {
// notifyError(data.message);
if (error) error(data); if (error) error(data);
} }
}, },
/* 编辑计划书--买入保险 */ /* 编辑计划书--买入保险 */
*payInsurance({ payload, callback,error }, { call, put }) { *payInsurance({ payload, callback,error }, { call, put }) {
console.log('8888888888888888888888888888 ----购买险种的参数---payInsurance------>',JSON.stringify(payload));
const { data } = yield call(payInsurance, payload); const { data } = yield call(payInsurance, payload);
if (data && data.status) { if (data && data.status) {
if (callback) callback(data); if (callback) callback(data);
} else { } else {
if (error) error(data); if (error) error(data);
// notifyErrorfyError(data.message);
} }
}, },
...@@ -51,9 +38,9 @@ export default { ...@@ -51,9 +38,9 @@ export default {
const { data } = yield call(getProspectusaAditional, payload); const { data } = yield call(getProspectusaAditional, payload);
if (data.status) { if (data.status) {
if (callback) callback(data); if (callback) callback(data);
yield put({ type: 'updateTermList' ,payload:{termList:data.data}});
} else { } else {
if (error) error(data); if (error) error(data);
// notifyError(data.message);
} }
}, },
...@@ -68,34 +55,8 @@ export default { ...@@ -68,34 +55,8 @@ export default {
if (error) error(data); if (error) error(data);
} }
}, },
/* 获取险种的缴费期间 */
*PremiumPaymentPeriod({ payload, callback }, { call, put }) {
console.log(payload);
const { data } = yield call(PremiumPaymentPeriod, payload);
if (data.status) {
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
},
/* 更新收件人的信息 */
*addReceiveInfo({ payload, callback }, { call, put }) {
console.log(payload);
const { data } = yield call(addReceiveInfo, payload);
if (data.status) {
if (callback) callback(data.data);
} else {
notifyError(data.message);
}
},
}, },
reducers: { reducers: {
updateTermList(state,action){
return {
...state,
termList : action.payload.termList
}
}
}, },
subscriptions: { subscriptions: {
......
import { GetPosterList, GetPosterInfo } from "../services/poster"; import { GetPosterList } from '../services/poster';
export default { export default {
namespace: "poster", namespace: 'poster',
state: { state: {
// item: {}, // item: {},
}, },
effects: { effects: {
*getPosterList({ payload, callback }, { call, put }) { *getPosterList({ payload, callback }, { call, put }) {
const { data } = yield call(GetPosterList, payload); const { data } = yield call(GetPosterList, payload);
callback && callback(data); // console.log(data)
callback && callback(data)
// if (data.status == true) {
// console.log(data.data);
// if(data.data.length==1){
// yield put({
// type: 'saveUser',
// payload: data.data,
// });
// }
// console.log(666666);
// if (callback) callback(data.data);
// } else {
// notifyError('!');
// }
}, },
*getPosterInfo({ payload, callback, error }, { call, put }) {
const { data } = yield call(GetPosterInfo, payload);
if (data.status) {
callback && callback(data.data);
} else {
error && error(data);
}
}
}, },
reducers: { reducers: {
// saveUser(state, { payload }) { // saveUser(state, { payload }) {
// console.log(payload); // console.log(payload);
// return { ...state, item: payload }; // return { ...state, item: payload };
// }, // },
},
subscriptions: {
}, },
subscriptions: {}
}; };
...@@ -15,10 +15,7 @@ function RouterConfig({ history, app }) { ...@@ -15,10 +15,7 @@ function RouterConfig({ history, app }) {
app, app,
component: () => import('./routes/Home') component: () => import('./routes/Home')
}) })
const Search = dynamic({
app,
component: () => import('./routes/Home/search')
})
const Welcome = dynamic({ const Welcome = dynamic({
app, app,
component: () => import('./routes/Welcome') component: () => import('./routes/Welcome')
...@@ -40,6 +37,10 @@ function RouterConfig({ history, app }) { ...@@ -40,6 +37,10 @@ function RouterConfig({ history, app }) {
app, app,
component: () => import('./routes/ProspectusList') component: () => import('./routes/ProspectusList')
}) })
const PlanEditor = dynamic({
app,
component: () => import('./routes/PlanEditor')
})
const AddPlanEditor = dynamic({ const AddPlanEditor = dynamic({
app, app,
component: () => import('./routes/AddPlanEditor') component: () => import('./routes/AddPlanEditor')
...@@ -54,7 +55,7 @@ function RouterConfig({ history, app }) { ...@@ -54,7 +55,7 @@ function RouterConfig({ history, app }) {
}) })
const MyUser = dynamic({ const MyUser = dynamic({
app, app,
component: () => import('./routes/MyUser/index') component: () => import('./routes/MyUser')
}) })
const AddUser = dynamic({ const AddUser = dynamic({
app, app,
...@@ -104,77 +105,17 @@ function RouterConfig({ history, app }) { ...@@ -104,77 +105,17 @@ function RouterConfig({ history, app }) {
app, app,
component: () => import('./routes/Performance') component: () => import('./routes/Performance')
}) })
const MyRank = dynamic({
app,
component: () => import('./routes/MyRank')
})
const MyCenter = dynamic({
app,
component: () => import('./routes/MyCenter')
})
const Website = dynamic({
app,
component: () => import('./routes/MyCenter/websiteDetail')
})
const Invitation = dynamic({
app,
component: () => import('./routes/Invitation')
})
const InvtAddEdit = dynamic({
app,
component: () => import('./routes/Invitation/addEdit')
})
const InvtPreview = dynamic({
app,
component: () => import('./routes/Invitation/preview')
})
const InfoCenter = dynamic({
app,
component: () => import('./routes/InfoCenter')
})
const InfoCenterList = dynamic({
app,
component: () => import('./routes/InfoCenter/infoList')
})
const BusinessCard = dynamic({
app,
component: () => import('./routes/BusinessCard')
})
const BusinessCardAddEdit = dynamic({
app,
component: () => import('./routes/BusinessCard/addEdit')
})
const BusinessCardBackground = dynamic({
app,
component: () => import('./routes/BusinessCard/Background')
})
const IndustryNews = dynamic({
app,
component: () => import('./routes/industrynews')
})
const IndustryNewsDetail = dynamic({
app,
component: () => import('./routes/industrynews/detail')
})
const ExchangeCommunity = dynamic({
app,
component: () => import('./routes/ExchangeCommunity')
})
const QuestionDetail = dynamic({
app,
component: () => import('./routes/ExchangeCommunity/questionDetail')
})
return ( return (
<ConnectedRouter history={history}> <ConnectedRouter history={history}>
<Switch> <Switch>
<Route path="/" exact component={Login} /> <Route path="/" exact component={Login} />
<Route path="/welcome" exact component={Welcome} /> <Route path="/welcome" exact component={Welcome} />
<Route path="/home" exact component={Home} /> <Route path="/home" exact component={Home} />
<Route path="/search" exact component={Search} />
<Route path="/users" exact component={Users} /> <Route path="/users" exact component={Users} />
<Route path="/poster" exact component={Poster} /> <Route path="/poster" exact component={Poster} />
<Route path="/poster/info" exact component={PosterInfo} /> <Route path="/poster/info" exact component={PosterInfo} />
<Route path="/prospectusList" exact component={ProspectusList} /> <Route path="/prospectusList" exact component={ProspectusList} />
<Route path="/planEditor" exact component={PlanEditor} />
<Route path="/addPlanEditor" exact component={AddPlanEditor} /> <Route path="/addPlanEditor" exact component={AddPlanEditor} />
<Route path="/cover" exact component={Cover} /> <Route path="/cover" exact component={Cover} />
<Route path="/planResult" exact component={PlanResult} /> <Route path="/planResult" exact component={PlanResult} />
...@@ -190,22 +131,7 @@ function RouterConfig({ history, app }) { ...@@ -190,22 +131,7 @@ function RouterConfig({ history, app }) {
<Route path="/governortraining/addclient" exact component={GTAddClient} /> <Route path="/governortraining/addclient" exact component={GTAddClient} />
<Route path="/governortraining/chooseclient" exact component={GTChooseClient} /> <Route path="/governortraining/chooseclient" exact component={GTChooseClient} />
<Route path="/video/chooseclient" exact component={VideoChooseClient} /> <Route path="/video/chooseclient" exact component={VideoChooseClient} />
<Route path="/home/myCenter" exact component={MyCenter} /> <Route path="/home/performance" exact component={Performance}/>
<Route path="/home/myUser/website" exact component={Website} />
<Route path="/performance" exact component={Performance} />
<Route path="/myRank" exact component={MyRank} />
<Route path="/invitation" exact component={Invitation} />
<Route path="/invitation/addedit" exact component={InvtAddEdit} />
<Route path="/invitation/preview" exact component={InvtPreview} />
<Route path="/infocenter" exact component={InfoCenter} />
<Route path="/infocenter/list" exact component={InfoCenterList} />
<Route path="/businessCard" exact component={BusinessCard} />
<Route path="/businessCard/addedit" exact component={BusinessCardAddEdit} />
<Route path="/businessCard/cardBackground" exact component={BusinessCardBackground} />
<Route path="/industrynews" exact component={IndustryNews} />
<Route path="/industrynews/detail" exact component={IndustryNewsDetail} />
<Route path="/exchangeCommunity" exact component={ExchangeCommunity} />
<Route path="/exchangeCommunity/questionDetail" exact component={QuestionDetail} />
<Route path="*" render={() => <Redirect to="/" />} /> <Route path="*" render={() => <Redirect to="/" />} />
</Switch> </Switch>
</ConnectedRouter> </ConnectedRouter>
......
...@@ -105,7 +105,7 @@ body{ ...@@ -105,7 +105,7 @@ body{
width: .22rem; width: .22rem;
height: .2rem; height: .2rem;
position: absolute; position: absolute;
top: .14rem; top: .1rem;
right: 0; right: 0;
} }
...@@ -282,9 +282,6 @@ body{ ...@@ -282,9 +282,6 @@ body{
border-radius: 10px; border-radius: 10px;
color: white; color: white;
} }
.chakantiaokuan{
min-height: 20px
}
.choose>span{ .choose>span{
color: rgb(153, 153, 153); color: rgb(153, 153, 153);
...@@ -343,26 +340,6 @@ body{ ...@@ -343,26 +340,6 @@ body{
} }
:global(.am-modal-body ){ /*:global(.am-list-item .am-input-control input:disabled ){
overflow-x: hidden; color:black !important;
} }*/
.modal{
position: fixed;
margin-left: -2.07rem;
left: 50%;
width: 4.14rem;
max-width: 680px;
max-height: 6rem;
overflow-y: scroll;
overflow-x: hidden;
}
.inputDisabled{
background: none;
border: none !important;
font-size: 0.15rem;
-webkit-opacity:1;
opacity: 1;
color: #000;
-webkit-text-fill-color: #000;
}
...@@ -6,19 +6,27 @@ import Table from "../../components/Table"; ...@@ -6,19 +6,27 @@ import Table from "../../components/Table";
import { Modal,Button, List,Radio, WhiteSpace, WingBlank ,Picker} from 'antd-mobile'; import { Modal,Button, List,Radio, WhiteSpace, WingBlank ,Picker} from 'antd-mobile';
import share from '../../utils/share'; import share from '../../utils/share';
import shareHide from '../../utils/shareHide'; import shareHide from '../../utils/shareHide';
import { createForm } from 'rc-form';
// import Date from "../../components/Date";
import DatePicker from "../../components/DatePicker"; import DatePicker from "../../components/DatePicker";
import ConfirmPop from '../../components/Modal/confirmPop'; import ConfirmPop from '../../components/Modal/confirmPop';
import SelectPicker from '../../components/SelectPicker';
import InputModal from '../../components/InputModal';
import moment from 'moment'; import moment from 'moment';
import { Toast } from 'antd-mobile'; import { Toast } from 'antd-mobile';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import {getBirthdayAge,urlGetParams,getPlanInListWithCode,filterDate,arrayDeal,StandardFormat} from '../../utils/dataFilter'
moment.locale('zh-cn'); moment.locale('zh-cn');
let RadioItem = Radio.RadioItem; let RadioItem = Radio.RadioItem;
let alert = Modal.alert; let alert = Modal.alert;
let showAlert = () => {
let alertInstance = alert('Delete', 'Are you sure???', [
{text: 'Cancel', onPress: () => console.log('cancel'), style: 'default'},
{text: 'OK', onPress: () => console.log('ok')},
]);
setTimeout(() => {
// 可以调用close方法以在外部close
alertInstance.close();
}, 500000);
}
let isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent); let isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let moneyKeyboardWrapProps = ''; let moneyKeyboardWrapProps = '';
if (isIPhone) { if (isIPhone) {
...@@ -27,160 +35,229 @@ if (isIPhone) { ...@@ -27,160 +35,229 @@ if (isIPhone) {
}; };
} }
function closest(el, selector) {
let matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
while (el) {
if (matchesSelector.call(el, selector)) {
return el;
}
el = el.parentElement;
}
return null;
}
let today = new Date() let today = new Date()
class AddPlanEditor extends Component { class AddPlanEditor extends Component {
constructor(props){ constructor(props){
super(props) super(props)
this.state = { this.state={
coverageValue: "", selectd:0,
fjAmountValue: "", isShowTips:false,
dataList2014: [ comfirm:'',
{ value: "0", label: 5000 }, selectRecognizeeSex:true, // 投保人性别
{ value: "1", label: 10000 }, recipientsSex:true, //收件人性别
{ value: "2", label: 15000 }, recipientsName:'', //收件人姓名
{ value: "3", label: 20000 } recipients:false,
], color:false,
dataList2014_1: [
{ value: "0", label: 5000 }, date:'2018-02-03',
{ value: "1", label: 10000 }, value1: moment('2017-01-25'),
], selectedValue: moment('2017-01-25'),
selectd: 0,
isShowTips: false,
comfirm: 0,
selectRecognizeeSex: true, // 投保人性别
recipientsSex: true, //收件人性别
recipientsName: "", //收件人姓名
recipients: false,
color: false,
date: "2018-02-03",
modal1: false, modal1: false,
modal2: false, modal2: false,
modal3: false, modal3: false,
modal4: false, modal4: false,
visible: false, modal5: false,
initInsurance: true, visible:false,
insuranceValue: 0, //医保通 的 社保标志 message:'' ,
insuranceLabel: "医保通", //医保通 submit:{},
insurance1: true,
riskName: "",
riskCode: "",
termList: [], slectValue:'',
mainInsuranceTitle: [ type: 'money',
initInsurance:true,
insuranceNumber:'',
insuranceValue:0,
insuranceLabel:'医保通', //医保通
insurance1:true,
riskName:'',
riskCode:'',
// termList:['华夏多倍版','华夏附加同祥保费豁免定期寿险(A款)','华夏附加豁免保险重大疾病保险'] ,//条款列表
text:'',
termList:[
{
key:0,
title:'华夏多倍版',
text:'华夏多倍版',
},
{ {
title: "险种", key:1,
dataIndex: "0", title:'华夏附加同祥保费豁免定期寿险(A款)',
width: "25%", text:'华夏附加同祥保费豁免定期寿险(A款)',
align: "center" },
{
key:2,
title:'华夏附加豁免保险重大疾病保险',
text:'华夏附加豁免保险重大疾病保险',
}
],
mainInsuranceTitle:[ {
title: '险种',
dataIndex: '0',
width: '25%',
align:'center',
}, },
{ {
title: "保额", title: '保额',
dataIndex: "1", dataIndex: '1',
width: "25%", width: '25%',
align: "center" align:'center',
}, },
{ {
title: "保费", title: '保费',
dataIndex: "2", dataIndex: '2',
width: "25%", width: '25%',
align: "center" align:'center',
}, },
{ {
title: "缴费期限", title: '缴费期限',
dataIndex: "3", dataIndex: '3',
width: "25%", width: '25%',
align: "center" align:'center',
} }
], ],
mainInsurance: false,//主险 mainInsurance:false,
mainInsuranceTable: [{}],//主险表格列表 mainInsuranceTable:[{}],
fjTable: [],
clauseUrlList: [], //条款列表详情 fjTable:[],
roleId: "", //角色id clauseUrlList:[],//条款列表详情
coverageList:[
{ id: 1, name: "花生" },
{ id: 2, name: "苹果" },
{ id: 3, name: "杨桃" }
],
selectCoverage:'花生',
roleId:'', //角色id
/*主险*/ /*主险*/
protectTime: "", //后端保额传值 protectTime:'', //后端保额传值
microPlanInfo: {}, //获取的主险信息 microPlanInfo:{}, //获取的主险信息
paymentList: [], //缴费期间 paymentList:[], //缴费期间
coverage: "", //缴费期间 coverage:'', //缴费期间
insuranceDurationList: [], //保险期间 insuranceDurationList:[], //保险期间
payTime: "", //保险期间后端传值 payTime:'', //保险期间后端传值
insuranceDuration: "", //保险期间 insuranceDuration:'' ,//保险期间
inputValue: "", //保额 protectTime:'',
inputValue1: "", //保费 inputValue:'', //保额
copies: "", //份数 inputValue1:'', //保费
seriNo: "", copies:'', //份数
mainRiskCode: "", //主险riskCode seriNo:'',
//saveMain: false, mainRiskCode:'', //主险riskCode
//editorNum: 0, //编辑:0,修改>0 saveMain:false,
minAmnt: "10000", //最低保额 editorNum:0, //编辑:0,修改>0
minPrem: "10000", //最低保费 minAmnt:'10000', //最低保额
minAmnt1: "10000", //最低保额 placeholder使用 minPrem:'10000', //最低保费
minPrem1: "10000", //最低保费placeholder使用
/* 附加险 */ /* 附加险 */
fjInsuranceList: [], //附加险列表 fjInsuranceList:[], //附加险列表
defaultfjInsuranceList: [], //默认附加险列表 social:'有', //有无社保
social: "有", //有无社保 newBill:'是', //是否为新单
social_mid: "有", //有无社保,作为中间值,当点击确定的时候赋值给social addProtectTime:'100', //附加险保险期间序号
addProtectTime: "100", //附加险保险期间序号 addInsuranceDuration:'趸缴', //附加险保险期间值
addInsuranceDuration: "趸缴", //附加险保险期间值 fjRiskCode:'' , //附加险code值
fjRiskCode: "", //附加险code值 fjRiskName:'' , //附加险名称
fjRiskName: "", //附加险名称 addCoverage:'', //附加险缴费期间值
addCoverage: "", //附加险缴费期间值 addPayTime:'', // 附加险缴费期间的序号
addPayTime: "", // 附加险缴费期间的序号 fjAmount:5000, // 附加险保额
fjAmount: 5000, // 附加险保额 fjPrem:0, // 附加险保费
fjPrem: 0, // 附加险保费 totalPrem:'0' , //首年保费(总)
totalPrem: "0", //首年保费(总)
fjRiskCodeList: [],//已添加的附加险code列表 fjRiskCodeList:[],
buyFjList: [], buyFjCount:0,
fjParam: [], //附加险入参集合 buyFjList:[],
fjParam:[], //附加险入参集合
/* 被保人信息 */ /* 被保人信息 */
insName: "", insName: "",
insSex: true, insSex: true,
insPhone: "", insPhone: "",
insBirthday: (new Date().getFullYear() - 30) + "-01-01", insBirthday: "1989-1-1",
/* 投保人信息 */ /* 投保人信息 */
appName: "", appName: "",
appSex: true, appSex: true,
appPhone: "", appPhone: "",
appBirthday: (new Date().getFullYear() - 30) + "-01-01", appBirthday: "1989-1-1",
calculationMethod: "0", //0:保额算保费 , 1:保费算保额 , 2:份数算保费
loadingFlag: true,
mainRiskFlag: "",//主险种标志 calculationMethod:'0', //0:保额算保费 , 1:保费算保额 , 2:份数算保费
fjRiskFlag: "",//附加险种标志 calculation0:true,
thumbnail: "", calculation1:false,
mianWithKBList: [], //主险的所有捆绑险数据 calculation2:false,
mianWithKB: [], //主险添加的捆绑险 thumbnail: ''
fjhuomianAmount: "", //华夏福 附加投保人豁免保费重大疾病险种的 保额
riskNotTogetherList: [], //不能同时购买的险种 }
minInsYear: "", //被保人最大年龄
userid: "",
selectChange1: {}, //选择框所选的返回值
planNumTotal50:false,//已生成得计划书数量 是否多余50条
};
} }
getAge = (dateString)=> {
// var birthDate = new Date(dateString);
let aDate = dateString.split('-');
var birthDate = new Date(aDate[0] + '-' + (parseInt(aDate[1]) < 10 ? '0' + aDate[1] : aDate[1]) + (parseInt(aDate[2]) < 10 ? '-0' + aDate[2] : '-'+aDate[2]));
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age ;
}
showToast=(val)=>{ showToast=(val)=>{
Toast.info(val,); Toast.info(val,);
} }
/* 获取当前已生成得计划书列表*/
getMyAllPlanList = (date) => { handleDate = (val)=>{
let that = this;
this.setState({insBirthday : val});
setTimeout(function () {
if(that.state.mainInsurance){
that.getInsurance(0,val)
}
},0)
}
handleDate1 = (val)=>{
this.setState({appBirthday : val});
let that = this; let that = this;
this.props.dispatch({ setTimeout(function () {
type:'home/getMyPlan', if(that.state.mainInsurance){
payload:{ that.getInsurance(0,0,0,0,0,0,0,val)
cusManager:localStorage.getItem("id"), }
pageNo:"0" },0)
},
callback(data){
that.setState({
planNumTotal50 : (data && data.length>49) ? true : false
})
},
})
} }
/* 投保人出生日期*/
getDate = (date) => { getDate=(date)=>{
let date_value = moment(date).format('YYYY-MM-DD'); let date_value=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
this.setState({ this.setState({
appBirthday:date_value, appBirthday:date_value,
}) })
...@@ -191,10 +268,9 @@ class AddPlanEditor extends Component { ...@@ -191,10 +268,9 @@ class AddPlanEditor extends Component {
that.getInsurance(0,date) that.getInsurance(0,date)
} }
},0) },0)
} }
/* 被保人出生日期*/
getDate1=(date)=>{ getDate1=(date)=>{
let date_value = moment(date).format("YYYY-MM-DD"); let date_value=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
this.setState({ this.setState({
insBirthday :date_value, insBirthday :date_value,
}) })
...@@ -212,112 +288,99 @@ class AddPlanEditor extends Component { ...@@ -212,112 +288,99 @@ class AddPlanEditor extends Component {
componentWillMount(){ componentWillMount(){
Toast.loading('loading...',0);
//roleId
let url = window.location.href; let url = window.location.href;
const params = urlGetParams(url); const matchs = decodeURI(url).match(/riskName=(.*)&riskCode=(.*)&calculationMethod=(.*)&recipients=(.*)&riskIntroduce=(.*)&thumbnail=(.*)&recipientsName=(.*)&selectd=(.*)&roleId=(.*)&seriNo=(.*)/i);
let isShare = params.isShare; const isShareMatches = decodeURI(url).match(/isShare=(.*)/i);
let riskName = params.riskName; let isShare = isShareMatches ? isShareMatches[1] : '';
let riskCode = params.riskCode; let riskName = matchs[1];
let calculationMethod = params.calculationMethod; let riskCode = matchs[2];
let thumbnail = params.thumbnail; let calculationMethod =Number(matchs[3]);
let selectd = params.selectd; let recipients = matchs[4];
let roleId = params.roleId; let riskIntroduce = matchs[5]
let ID = params.ID; let thumbnail = matchs[6]
let seriNo = params.seriNo; let recipientsName = matchs[7]
seriNo = seriNo ? seriNo : (sessionStorage.getItem("seriNo") || '');//结果页面返回会保存seriNo,实现回显 let selectd = matchs[8]
let urlShare = ""; let roleId = matchs[9]
if(isShare){//处理多次转发参数问题
urlShare = window.location.href; let seriNo = isShare !== 't' ? localStorage.getItem("seriNo") : '';
this.setState({
seriNo,
recipientsName: localStorage.getItem("recipientsName"),
recipientsSex:localStorage.getItem("recipientsSex"),
recipients: localStorage.getItem("recipients"),
roleId:roleId,
})
if(seriNo){
this.setState({
initInsurance:false,
})
setTimeout(function () {
that.getMessage()
that.getProspectusaAditional(0)
},)
}else{ }else{
urlShare = window.location.href+`&isShare=t&phoneNum=${localStorage.getItem('number')}`;
}
share({ share({
decodeUrl: window.location.href.split('#')[0], decodeUrl: window.location.href.split('#')[0],
title: riskName, title: riskName,
desc: '您的专属保险计划书,请您查收!', desc: '您的专属保险计划书,请您查收!',
shareUrl: urlShare, shareUrl: window.location.href+'&isShare=t',
thumbnail: thumbnail, thumbnail: thumbnail
record:{
"operCode": riskCode,
"operTitle": riskName,
"operFunction": 100120,
"operType": 202,
"phoneNum": isShare ? params.phoneNum : ""
}
}); });
}
let that = this;
this.setState({ this.setState({
calculationMethod:Number(calculationMethod), calculationMethod:Number(calculationMethod),
calculation0:calculationMethod == 0?true:false,
calculation1:calculationMethod == 1?true:false,
calculation2:calculationMethod == 2?true:false,
riskName:riskName, riskName:riskName,
riskCode:riskCode, riskCode:riskCode,
seriNo:isShare!=='t'?seriNo:'', seriNo:isShare!=='t'?seriNo:'',
recipientsName:isShare!=='t'?localStorage.getItem("recipientsName"):'',
recipientsSex: isShare !== 't' ? (localStorage.getItem("recipientsSex")=='false'?false:true): true,
recipients: isShare !== 't' ?(localStorage.getItem("recipients")=='false'?false:true): false,
selectd:selectd, selectd:selectd,
roleId:roleId, roleId:roleId,
thumbnail: thumbnail, thumbnail: thumbnail
seriNo:seriNo,
insBirthday: riskCode == '511404' ? moment(today).format("YYYY-MM-DD") : (today.getFullYear()-30)+'-01-01',//珍爱宝贝被保人默认为0岁
mainRiskFlag:getPlanInListWithCode('riskCode',riskCode,this.props.home.AllPlanList).riskFlag || '',
userid:ID,
});
let that = this;
if(seriNo){
this.setState({
initInsurance:false,
})
setTimeout(function () {
that.getMessage()
that.getProspectusaAditional(0)
},)
}
this.props.dispatch({
type:"home/setClickRecord",
payload: {
"operCode": riskCode,
"operFunction": 100120,
"operTitle": riskName,
"operType": 201,
"phoneNum": isShare ? params.phoneNum : ""
},
callback(data){
console.log('点击分享链接,记录一次')
}
}) })
} }
componentDidMount(){ componentDidMount(){
document.title= this.state.riskName document.title= this.state.riskName
shareHide(false) shareHide(false)
this.getRiskMaxAge();//获取险种投保人最大年龄 this.getPayMoney()
this.getProspectusaAditional3();//主险的捆绑险种
this.getProspectusaAditional(0);//查一次附加险
this.getMyAllPlanList();//查询目前已有多少条计划书
} }
componentWillUnmount(){ componentWillUnmount(){
document.title= '' document.title= ''
} }
shouldComponentUpdate(nextProps, nextState){
// if (this.state.info !== nextState.info) {
// return true;
// }
return true;
}
/* 获取附加险 */ /* 获取附加险 */
getProspectusaAditional=(value)=>{ getProspectusaAditional=(value)=>{
let age = getBirthdayAge(this.state.insBirthday);
let age = this.getAge(this.state.insBirthday)
let that = this; let that = this;
this.props.dispatch({ this.props.dispatch({
type: 'planEditor/getProspectusaAditional', type: 'planEditor/getProspectusaAditional',
payload: { payload: {
"mainCode":this.state.riskCode, // "mainCode":localStorage.getItem("riskCode"),
"mainCode":that.state.riskCode,
"riskType":"1" //0:主险 1:附加险 "riskType":"1" //0:主险 1:附加险
}, },
callback(data){ callback(data){
let fjInsuranceList = []; let fjInsuranceList = [];
for (var i = 0; i < data.data.length; i++) { for (var i = 0; i < data.data.length; i++) {
fjInsuranceList.push({ if(age < data.data[i].maxAge+1){
value: i, fjInsuranceList.push({ value: i, label:data.data[i].riskName, riskCode:data.data[i].riskCode,fjcalculationMethod:data.data[i].calculationMethod})
label:data.data[i].riskName, }
riskCode:data.data[i].riskCode,
fjcalculationMethod:data.data[i].calculationMethod,
riskFlag:data.data[i].riskFlag,
maxAge:data.data[i].maxAge,
noTogether:data.data[i].noTogether,
})
} }
let arr = []; let arr = [];
...@@ -327,16 +390,18 @@ class AddPlanEditor extends Component { ...@@ -327,16 +390,18 @@ class AddPlanEditor extends Component {
} }
} }
if(arr.length){ if(arr.length){
that.onChangeFJ(arr[0]);
that.onChange(arr[0].value, arr[0].label,arr[0].riskCode, arr[0].fjcalculationMethod);
}else{ }else{
that.setState({ that.setState({
insuranceValue:-1, insuranceValue:-1,
}) })
} }
that.setState({ that.setState({
fjInsuranceList:fjInsuranceList, fjInsuranceList:fjInsuranceList,
modal1:value===0?false:true, modal1:value===0?false:true,
defaultfjInsuranceList:data.data,
}) })
}, },
...@@ -346,13 +411,16 @@ class AddPlanEditor extends Component { ...@@ -346,13 +411,16 @@ class AddPlanEditor extends Component {
}) })
} }
/* 获取条款列表 */ /* 获取条款列表 */
getProspectusaAditiona2=()=>{ getProspectusaAditiona2=()=>{
let that = this; let that = this;
this.props.dispatch({ this.props.dispatch({
type: 'planEditor/getProspectusaAditional', type: 'planEditor/getProspectusaAditional',
payload: { payload: {
"mainCode": this.state.riskCode, // "mainCode": localStorage.getItem("riskCode"),
"mainCode": that.state.riskCode,
"riskType": "" //0:主险 ,1:附加险 ,''所有 "riskType": "" //0:主险 ,1:附加险 ,''所有
}, },
callback(data){ callback(data){
...@@ -376,74 +444,21 @@ class AddPlanEditor extends Component { ...@@ -376,74 +444,21 @@ class AddPlanEditor extends Component {
} }
}) })
} }
/*获取险种的投保最大年龄*/
getRiskMaxAge=()=>{
let that = this;
this.props.dispatch({
type:'home/getPlanList',
payload:{
"riskCode":this.state.riskCode,
"riskName":"",
"riskStatus":1, //1启用
"proId":localStorage.getItem("project"),
"website":localStorage.getItem("website"),
"orgId":localStorage.getItem("orgId"),
},
callback(data){
that.setState({minInsYear:data.length>0 ? data[0].maxAge : ''})
},
})
}
/* 获取捆绑的附加险 */
getProspectusaAditional3=()=>{
let age = getBirthdayAge(this.state.insBirthday);
let that = this;
this.props.dispatch({
type: 'planEditor/getProspectusaAditional',
payload: {
"mainCode":this.state.riskCode,
"riskType":"2" //0:主险 1:附加险 2:捆绑险
},
callback(data){
Toast.hide();
that.setState({
mianWithKBList:data.data,
loadingFlag:false
})
},
error(data){
this.showToast(data.message)
}
})
}
/* 获取险种信息*/
getMessage=()=>{ getMessage=()=>{
let that = this; let that = this;
let riskName= this.state.riskName; let riskName= localStorage.getItem("riskName")
if(!this.state.seriNo){ // let riskName= localStorage.getItem("seriNo")
return;
}
this.props.dispatch({ this.props.dispatch({
type:'planEditor/getMyPlanMessage', type:'home/getMyPlanMessage',
payload:{ payload:{
"seriNo":this.state.seriNo || '', "seriNo":this.state.seriNo,
// "seriNo":35,
"interestRate":"0.03" "interestRate":"0.03"
}, },
callback(data){ callback(data){
if(!data){
if(!that.state.initInsurance){
that.setState({
initInsurance:true,
})
}
return;
}
let microPlanInfo = data.microPlanInfo let microPlanInfo = data.microPlanInfo
let microPlanFJInfo = data.microPlanFJInfo let microPlanFJInfo = data.microPlanFJInfo
let totalPrem = 0; let totalPrem = 0;
let fjhuomianAmount = Number(microPlanInfo.prem);
let mainTable = [ let mainTable = [
{ {
key:0, key:0,
...@@ -451,22 +466,9 @@ class AddPlanEditor extends Component { ...@@ -451,22 +466,9 @@ class AddPlanEditor extends Component {
1:Number(microPlanInfo.amnt)||'-', 1:Number(microPlanInfo.amnt)||'-',
2:Number(microPlanInfo.prem)||'-', 2:Number(microPlanInfo.prem)||'-',
3:microPlanInfo.payTimeName||'-', 3:microPlanInfo.payTimeName||'-',
4:microPlanInfo.payTime
}
];
//将捆绑险添加到主险下面
let mianWithKB = microPlanInfo.microPlanInfo2 ? microPlanInfo.microPlanInfo2 : [];
for(let ii in mianWithKB){
mainTable.push({
key:ii+1,
0:mianWithKB[ii].riskName,
1:mianWithKB[ii].amnt ||'-',
2:mianWithKB[ii].prem ||'-',
3:Number(mianWithKB[ii].payTime)==0 ? "趸交" : mianWithKB[ii].payTimeName||'-',
4:mianWithKB[ii].payTime
})
fjhuomianAmount = fjhuomianAmount + Number(mianWithKB[ii].prem);
} }
]
totalPrem += Number(microPlanInfo.prem) totalPrem += Number(microPlanInfo.prem)
let fjTable = []; let fjTable = [];
...@@ -475,34 +477,19 @@ class AddPlanEditor extends Component { ...@@ -475,34 +477,19 @@ class AddPlanEditor extends Component {
let fjInsuranceList=[]; let fjInsuranceList=[];
if(microPlanFJInfo.length>0){ if(microPlanFJInfo.length>0){
for (var i = 0; i < microPlanFJInfo.length; i++) { for (var i = 0; i < microPlanFJInfo.length; i++) {
if(microPlanFJInfo[i].riskType != "2"){//捆绑险种不添加到下方的附加险列表中
fjTable.push({ fjTable.push({
key:i, key:i,
0:microPlanFJInfo[i].riskName||'-', 0:microPlanFJInfo[i].riskName||'-',
1:Number(microPlanFJInfo[i].amnt)||'-', 1:Number(microPlanFJInfo[i].amnt)||'-',
2:Number(microPlanFJInfo[i].prem)||'-', 2:Number(microPlanFJInfo[i].prem)||'-',
3:microPlanFJInfo[i].payTimeName||'-', 3:microPlanFJInfo[i].payTimeName||'-',
value:microPlanFJInfo[i].riskCode == '111703'?0:1,
riskCode:microPlanFJInfo[i].riskCode,
fjcalculationMethod:microPlanFJInfo[i].calculationMethod,
riskFlag:microPlanFJInfo[i].riskFlag,
maxAge:microPlanFJInfo[i].maxAge,
noTogether:microPlanFJInfo[i].noTogether,
label:microPlanFJInfo[i].riskName,
}) })
//获取的附加险列表
fjInsuranceList.push({ fjInsuranceList.push({
value:microPlanFJInfo[i].riskCode == '111703'?0:1, value:microPlanFJInfo[i].riskCode == '111703'?0:1,
label:microPlanFJInfo[i].riskName, label:microPlanFJInfo[i].riskName,
riskCode:microPlanFJInfo[i].riskCode, riskCode:microPlanFJInfo[i].riskCode,
fjcalculationMethod:microPlanFJInfo[i].calculationMethod, fjcalculationMethod:microPlanFJInfo[i].calculationMethod,
riskFlag:microPlanFJInfo[i].riskFlag,
maxAge:microPlanFJInfo[i].maxAge,
noTogether:microPlanFJInfo[i].noTogether,
}) })
fjRiskCodeList.push(microPlanFJInfo[i].riskCode)
}
fjParam.push({ fjParam.push({
"riskName": microPlanFJInfo[i].riskName, "riskName": microPlanFJInfo[i].riskName,
"riskCode": microPlanFJInfo[i].riskCode, "riskCode": microPlanFJInfo[i].riskCode,
...@@ -511,27 +498,30 @@ class AddPlanEditor extends Component { ...@@ -511,27 +498,30 @@ class AddPlanEditor extends Component {
"copies": microPlanFJInfo[i].calculationMethod != 2 ?'':microPlanFJInfo[i].copies, "copies": microPlanFJInfo[i].calculationMethod != 2 ?'':microPlanFJInfo[i].copies,
"payTime": microPlanFJInfo[i].payTime, "payTime": microPlanFJInfo[i].payTime,
"protectTime":microPlanFJInfo[i].protectTime, "protectTime":microPlanFJInfo[i].protectTime,
"riskFlag":microPlanFJInfo[i].riskFlag,
}) })
totalPrem += Number(microPlanFJInfo[i].prem) totalPrem += Number(microPlanFJInfo[i].prem)
fjRiskCodeList.push(microPlanFJInfo[i].riskCode)
} }
} }
that.setState({ that.setState({
fjParam:fjParam, fjParam:fjParam,
buyFjList:fjParam, buyFjList:fjParam,
microPlanInfo:microPlanInfo, microPlanInfo:microPlanInfo,
selectRecognizeeSex:microPlanInfo.appSex=='M'?true:false, selectRecognizeeSex:microPlanInfo.appSex==='M'?true:false,
fjInsuranceList:fjInsuranceList, fjInsuranceList:fjInsuranceList,
insName:microPlanInfo.insName, insName:microPlanInfo.insName,
insSex: microPlanInfo.insSex=='M'?true:false, insSex: microPlanInfo.insSex==='M'?true:false,
insPhone:microPlanInfo.insPhone, insPhone:microPlanInfo.insPhone,
insBirthday:microPlanInfo.insBirthday, insBirthday:microPlanInfo.insBirthday,
appBirthday:microPlanInfo.appBirthday, //
appName: microPlanInfo.appName, appName: microPlanInfo.appName,
appSex: microPlanInfo.appSex=='M'?true:false, appSex: microPlanInfo.appSex==='M'?true:false,
appPhone: microPlanInfo.appPhone, appPhone: microPlanInfo.appPhone,
appBirthday: microPlanInfo.appBirthday,
// mainTable:'',
totalPrem:totalPrem, //首年保费(总) totalPrem:totalPrem, //首年保费(总)
payTime:microPlanInfo.payTime, payTime:microPlanInfo.payTime,
protectTime:microPlanInfo.protectTime, protectTime:microPlanInfo.protectTime,
...@@ -542,15 +532,10 @@ class AddPlanEditor extends Component { ...@@ -542,15 +532,10 @@ class AddPlanEditor extends Component {
copies:microPlanInfo.copies, copies:microPlanInfo.copies,
mainInsuranceTable:mainTable, //主险集合 mainInsuranceTable:mainTable, //主险集合
initInsurance:mainTable.length>0 ? false : true,//主险有数据就不展示
mainInsurance:true, mainInsurance:true,
fjTable:fjTable, //附加险集合 fjTable:fjTable, //附加险集合
mainRiskCode:microPlanInfo.riskCode, //主险riskCode mainRiskCode:data.microPlanInfo.riskCode, //主险riskCode
fjRiskCodeList:fjRiskCodeList, fjRiskCodeList:fjRiskCodeList,
fjhuomianAmount:fjhuomianAmount,// 附加投保人豁免保费重大疾病险种 的保额
recipientsName:microPlanInfo.receiveName || '',
recipientsSex: microPlanInfo.receiveSex == '0' ? true : false,
recipients: microPlanInfo.receiveName ? true : false,
}) })
}, },
...@@ -561,111 +546,60 @@ class AddPlanEditor extends Component { ...@@ -561,111 +546,60 @@ class AddPlanEditor extends Component {
}) })
} }
showModal = (key,index,item) => (e) => { showModal = (key,index,item) => (e) => {
e.preventDefault(); // 修复 Android 上点击穿透
if(key == 'modal2'){ if(key == 'modal2'){
//修改主险 this.getPayMoney()
this.getPayMoney(key,'editor')
}else if(key == 'modal3'){ }else if(key == 'modal3'){
let items = getPlanInListWithCode('riskCode',item.riskCode,this.state.fjInsuranceList) || {}; this.onChange(item.value,item.label,item.riskCode,item.fjcalculationMethod)
this.onChangeFJ(item)
this.getPayMoney1(index,key) this.getPayMoney1(index,key)
} }
e.preventDefault(); // 修复 Android 上点击穿透
this.setState({
[key]: true,
});
} }
hideModalConfirm=(v)=>{ hideModalConfirm=(v)=>{
this.setState({ this.setState({
visible:false, visible:false,
}) })
} }
hideModalSubmit = (v)=> {
this.setState({
visible: false,
})
}
onClose = key => (e) => { onClose = key => (e) => {
e.preventDefault(); e.preventDefault();
this.setState({ this.setState({
[key]: false, [key]: false,
}); });
} }
//主险购买
buy = (key) => (e) => { buy = (key) => (e) => {
e.preventDefault(); e.preventDefault();
let selectChange1 = Object.assign({},this.state.selectChange1);
let that = this;
let inputValue = document.getElementById('inputValue') ? document.getElementById('inputValue').value : this.state.inputValue;
let inputValue1 = document.getElementById('inputValue1') ? document.getElementById('inputValue1').value : this.state.inputValue1;
if(selectChange1.label){
this.setState({ this.setState({
[key]: false, [key]: false,
seriNo:this.state.seriNo || '', seriNo:this.state.seriNo,
coverageValue: selectChange1.value,
coverage:selectChange1.label,
payTime:selectChange1.payTime,
minAmnt:selectChange1.minAmnt,
minPrem:selectChange1.minPrem,
inputValue:inputValue,
inputValue1:inputValue1,
},function(){
that.buyConfirm();
}); });
}else{ // 买入 主险保险
this.payInsurance(this.state.buyFjList)
}
buy1 = (key,fj) => (e) => {
e.preventDefault();
this.setState({ this.setState({
[key]: false, [key]: false,
seriNo:this.state.seriNo || '',
inputValue:inputValue,
inputValue1:inputValue1,
},function(){
that.buyConfirm();
}); });
}
} // 买入 附加险保险
buyConfirm(){ this.payFjInsurance(fj)
let buyFjList = this.state.buyFjList;
//主险每次购买或者修改的时候 把附件险中的 豁免险值修改 需要重新计算算
for(let jj in buyFjList){
if(buyFjList[jj].riskCode=='121513'){
buyFjList[jj].payTime = this.state.payTime;
buyFjList[jj].protectTime = this.state.protectTime;
}
}
if(this.state.mianWithKBList.length>0){
this.state.mianWithKBList.map((item,idx)=>{
//先在buyFjList里面找之前添加的附加险里面有没有 捆绑险,有的话就删除重新添加进去
for(let i in buyFjList){
if(buyFjList[i].riskCode == item.riskCode){
buyFjList.splice(i,1);
}
}
buyFjList.push({
"riskName": item.riskName,
"riskCode": item.riskCode,
"amount": item.calculationMethod == 0 ? this.state.inputValue : 0,
"prem": item.calculationMethod == 1 ? this.state.inputValue1 : 0,
"copies": item.calculationMethod == 2 ? 1 : "",
"payTime": this.state.payTime,
"protectTime": this.state.protectTime,
"riskFlag": item.riskFlag,
})
})
};
if(this.state.calculationMethod == '1'){
if(this.state.inputValue1||this.state.microPlanInfo.prem){
// 买入 主险保险
this.payInsurance(buyFjList)
}else{
Toast.info(`最低保费不能低于${this.state.minPrem}!`)
return false;
}
}else if (this.state.calculationMethod == '0'){
if(this.state.inputValue||this.state.microPlanInfo.amnt){
// 买入 主险保险
this.payInsurance(buyFjList)
}else{
Toast.info(`最低保额不能低于${this.state.minAmnt}!`)
return false;
}
}
} }
payInsurance=(fj)=>{ payInsurance=(fj)=>{
Toast.loading('loading...', 88); Toast.loading('loading...', 88);
...@@ -676,7 +610,7 @@ class AddPlanEditor extends Component { ...@@ -676,7 +610,7 @@ class AddPlanEditor extends Component {
this.props.dispatch({ this.props.dispatch({
type:'planEditor/payInsurance', type:'planEditor/payInsurance',
payload:{ payload:{
"cusManager":localStorage.getItem("id") || this.state.userid, "cusManager":localStorage.getItem("id"),
"seriNo":this.state.seriNo, //流水号 "seriNo":this.state.seriNo, //流水号
"appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同 "appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同
"applicant":{ "applicant":{
...@@ -698,19 +632,30 @@ class AddPlanEditor extends Component { ...@@ -698,19 +632,30 @@ class AddPlanEditor extends Component {
"prem":this.state.calculationMethod=== 1 ?this.state.inputValue1||this.state.microPlanInfo.prem:0, // 保费 ----- "prem":this.state.calculationMethod=== 1 ?this.state.inputValue1||this.state.microPlanInfo.prem:0, // 保费 -----
"copies":this.state.calculationMethod=== 2?1:"", //份数 "copies":this.state.calculationMethod=== 2?1:"", //份数
"payTime":this.state.payTime, //缴费期间 "payTime":this.state.payTime, //缴费期间
// "protectTime":this.state.protectTime !=''?this.state.protectTime:this.state.microPlanInfo.protectTime //保险期间 ----
"protectTime":this.state.protectTime, "protectTime":this.state.protectTime,
"riskFlag": this.state.mainRiskFlag || '',
}, },
"additionalMicroPlan":fj, "additionalMicroPlan":fj,
"isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无 "isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无
}, },
callback(data){ callback(data){
Toast.hide() Toast.hide()
if(that.state.saveMain===true){
that.setState({
mainInsurance:false,
initInsurance:false,
seriNo:data.data.seriNo,
saveMain:false
})
}else{
that.setState({ that.setState({
mainInsurance:false, mainInsurance:false,
initInsurance:false, initInsurance:false,
seriNo:data.data.seriNo, seriNo:data.data.seriNo,
}) })
}
that.getMessage(); that.getMessage();
}, },
...@@ -718,26 +663,41 @@ class AddPlanEditor extends Component { ...@@ -718,26 +663,41 @@ class AddPlanEditor extends Component {
that.setState({ that.setState({
mainInsurance:false, mainInsurance:false,
initInsurance:false,
})
if(data.status !=false){
that.getMessage();
}else{
that.setState({
mainInsurance:false,
initInsurance:true, initInsurance:true,
buyFjList:[], buyFjList:[],
totalPrem:0, totalPrem:0,
selectChange1:{}
}) })
that.getMessage();
}
that.showToast(data.message) that.showToast(data.message)
} }
}) })
} }
/* 买入附加险*/
payFjInsurance=(fj)=>{ payFjInsurance=(fj)=>{
Toast.loading('loading...', 88); Toast.loading('loading...', 88);
let riskCode = this.state.riskCode; let riskCode = localStorage.getItem("riskCode")
let seriNo = localStorage.getItem("seriNo")
let that = this; let that = this;
this.props.dispatch({ this.props.dispatch({
type:'planEditor/payInsurance', type:'planEditor/payInsurance',
payload:{ payload:{
"cusManager":localStorage.getItem("id") || this.state.userid, "cusManager":localStorage.getItem("id"),
"seriNo":this.state.seriNo, //流水号 "seriNo":this.state.seriNo, //流水号
"appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同 "appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同
"applicant":{ "applicant":{
...@@ -758,17 +718,20 @@ class AddPlanEditor extends Component { ...@@ -758,17 +718,20 @@ class AddPlanEditor extends Component {
"prem":this.state.microPlanInfo.prem, // 保费 ----- "prem":this.state.microPlanInfo.prem, // 保费 -----
"copies":this.state.copies, //份数 "copies":this.state.copies, //份数
"payTime":this.state.payTime, //缴费期间 "payTime":this.state.payTime, //缴费期间
"protectTime":this.state.protectTime, //保险期间 ---- "protectTime":this.state.protectTime //保险期间 ----
"riskFlag":this.state.mainRiskFlag || '', //险种标志 (新加) ----
}, },
"additionalMicroPlan": fj, "additionalMicroPlan": fj,
"isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无 "isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无
}, },
callback(data){ callback(data){
Toast.hide() Toast.hide()
let buyFjList = that.state.buyFjList;
let fjInsuranceList = that.state.fjInsuranceList;
that.setState({ that.setState({
mainInsurance:false, mainInsurance:false,
initInsurance:false, initInsurance:false,
/* 添加附加险成功*/
}) })
that.getMessage(); that.getMessage();
...@@ -785,16 +748,23 @@ class AddPlanEditor extends Component { ...@@ -785,16 +748,23 @@ class AddPlanEditor extends Component {
} }
}) })
} }
//选择投保人和被保人日期时,调用主险算费接口
getInsurance=(insSex,insBirthday,appName,insName,appPhone,insPhone,appSex,appBirthday,selectd)=>{ getInsurance=(insSex,insBirthday,appName,insName,appPhone,insPhone,appSex,appBirthday,selectd)=>{
Toast.loading('loading...', 88); Toast.loading('loading...', 88);
// let riskCode = localStorage.getItem("riskCode")
// let seriNo = localStorage.getItem("seriNo")
let riskCode = this.state.riskCode; let riskCode = this.state.riskCode;
let that = this; let that = this;
this.setState({
// mainInsurance:false,
})
this.props.dispatch({ this.props.dispatch({
type:'planEditor/payInsurance', type:'planEditor/payInsurance',
payload:{ payload:{
"cusManager":localStorage.getItem("id") || this.state.userid, //客户经理id "cusManager":localStorage.getItem("id"), //客户经理id
"seriNo":this.state.seriNo, //流水号 "seriNo":this.state.seriNo, //流水号
"appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同 "appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同
"applicant":{ "applicant":{
...@@ -815,11 +785,10 @@ class AddPlanEditor extends Component { ...@@ -815,11 +785,10 @@ class AddPlanEditor extends Component {
"prem":this.state.calculationMethod !=1?0:this.state.microPlanInfo.prem, // 保费 ----- "prem":this.state.calculationMethod !=1?0:this.state.microPlanInfo.prem, // 保费 -----
"copies":this.state.calculationMethod !=2?'':this.state.copies, //份数 "copies":this.state.calculationMethod !=2?'':this.state.copies, //份数
"payTime":this.state.payTime, //缴费期间 "payTime":this.state.payTime, //缴费期间
"protectTime":this.state.protectTime||this.state.microPlanInfo.protectTime, //保险期间 ---- "protectTime":this.state.protectTime||this.state.microPlanInfo.protectTime //保险期间 ----
"riskFlag": this.state.mainRiskFlag || '',
}, },
"additionalMicroPlan": this.state.fjParam, //fjTable "additionalMicroPlan": this.state.fjParam, //fjTable
"isSecurity":this.state.social=='有'?0:1 //是否有社保0:有,1:无 "isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无
}, },
callback(data){ callback(data){
Toast.hide() Toast.hide()
...@@ -828,17 +797,13 @@ class AddPlanEditor extends Component { ...@@ -828,17 +797,13 @@ class AddPlanEditor extends Component {
error(data){ error(data){
that.setState({ that.setState({
totalPrem:0, totalPrem:0,
mainInsurance:false,
initInsurance:true, initInsurance:true,
buyFjList:[], buyFjList:[],
selectChange1:{}
}) })
that.getMessage();
that.showToast(data.message) that.showToast(data.message)
} }
}) })
} }
//处理Input组件,聚焦问题。ios手机上有异常
blur =(key,value,phone)=>{ blur =(key,value,phone)=>{
setTimeout(function(){ setTimeout(function(){
// alert(1); // alert(1);
...@@ -856,6 +821,8 @@ class AddPlanEditor extends Component { ...@@ -856,6 +821,8 @@ class AddPlanEditor extends Component {
} }
},10) },10)
if(value){ if(value){
if(this.state.mainInsurance){ if(this.state.mainInsurance){
if(this.state.selectd == 1){ if(this.state.selectd == 1){
...@@ -876,6 +843,7 @@ class AddPlanEditor extends Component { ...@@ -876,6 +843,7 @@ class AddPlanEditor extends Component {
if(this.state.selectd ==1){ if(this.state.selectd ==1){
this.getInsurance(0,0,0,0,phone) this.getInsurance(0,0,0,0,phone)
}else{ }else{
this.getInsurance(0,0,0,0,0,phone) this.getInsurance(0,0,0,0,0,phone)
} }
} }
...@@ -883,6 +851,31 @@ class AddPlanEditor extends Component { ...@@ -883,6 +851,31 @@ class AddPlanEditor extends Component {
} }
handleChange = (e)=>{
this.setState({
selectValue:e.target.value
})
}
setInput = (e)=>{
let value = e.target.value
value = value.substring(0,10)
this.setState({
inputValue1 :value
})
}
setInput1 = (e)=>{
let value = e.target.value
value = value.substring(0,10)
this.setState({
inputValue :value
})
}
fjAmount = (e) =>{ fjAmount = (e) =>{
let value = e.target.value let value = e.target.value
value = value.substring(0,10) value = value.substring(0,10)
...@@ -898,6 +891,14 @@ class AddPlanEditor extends Component { ...@@ -898,6 +891,14 @@ class AddPlanEditor extends Component {
}) })
} }
editer =(key) =>(e)=>{
e.preventDefault();
// this.setState({
// [key]:true,
// })
}
delete =(seriNo,deleteType,riskCode)=>{ delete =(seriNo,deleteType,riskCode)=>{
let that = this; let that = this;
this.props.dispatch({ this.props.dispatch({
...@@ -909,29 +910,35 @@ class AddPlanEditor extends Component { ...@@ -909,29 +910,35 @@ class AddPlanEditor extends Component {
}, },
callback(){ callback(){
let buyFjList = that.state.buyFjList; let buyFjList = that.state.buyFjList;
let fjInsuranceList = that.state.fjInsuranceList;
if(deleteType== 1){ if(deleteType== 1){
//附加险删除 //附加险删除
for (var i = 0; i < buyFjList.length; i++) { for (var i = 0; i < buyFjList.length; i++) {
if(buyFjList[i].riskCode == riskCode){ if(buyFjList[i].riskCode == riskCode){
buyFjList.splice(i,1); buyFjList.splice(i,1)
let fjInsuranceList = that.state.fjInsuranceList;
fjInsuranceList.splice(i,1) fjInsuranceList.splice(i,1)
that.setState({
fjInsuranceList
})
}else{ }else{
that.setState({ that.setState({
insuranceValue:buyFjList[i].value, insuranceValue:buyFjList[i].value,
insuranceLabel:buyFjList[i].label, insuranceLabel:buyFjList[i].label,
}) })
} }
} }
that.setState({ that.setState({
buyFjList:buyFjList, buyFjList:buyFjList
fjInsuranceList:fjInsuranceList
}) })
} }
that.setState({ that.setState({
totalPrem:0, totalPrem:0,
saveMain:false,
editorNum:that.state.editorNum+1,
}) })
if(deleteType ==0){ if(deleteType ==0){
...@@ -941,10 +948,12 @@ class AddPlanEditor extends Component { ...@@ -941,10 +948,12 @@ class AddPlanEditor extends Component {
seriNo:'', seriNo:'',
buyFjList:[], buyFjList:[],
fjInsuranceList:[], fjInsuranceList:[],
// insuranceValue:0,
// insuranceLabel:that.state.fjInsuranceList[0].riskName,
}); });
let storage = window.localStorage; let storage = window.localStorage;
sessionStorage.setItem("seriNo",''); storage.setItem("seriNo",'')
}else{ }else{
...@@ -959,20 +968,25 @@ class AddPlanEditor extends Component { ...@@ -959,20 +968,25 @@ class AddPlanEditor extends Component {
}) })
} }
onChangeFJ = (item) => { addInsurance =key => (e)=>{
this.setState({
[key]: true,
});
}
onChange = (value,label,riskCode,calculationMethod) => {
this.setState({ this.setState({
insuranceValue:Number(item.value), insuranceValue:value,
insuranceLabel:item.label, insuranceLabel:label,
fjRiskCode:item.riskCode, fjRiskCode:riskCode,
fjRiskName:item.label, fjRiskName:label,
fjcalculationMethod:Number(item.fjcalculationMethod), fjcalculationMethod:calculationMethod
fjRiskFlag:item.riskFlag,
riskNotTogetherList:item.noTogether || [],
fjAmount: item[1] ? item[1] : '5000'
}); });
}
};
closeInsurance = ()=>{ closeInsurance = ()=>{
this.setState({ this.setState({
...@@ -983,6 +997,7 @@ class AddPlanEditor extends Component { ...@@ -983,6 +997,7 @@ class AddPlanEditor extends Component {
} }
handleOk=()=>{ handleOk=()=>{
let that = this; let that = this;
if(this.state.comfirm ==0){ if(this.state.comfirm ==0){
...@@ -992,10 +1007,11 @@ class AddPlanEditor extends Component { ...@@ -992,10 +1007,11 @@ class AddPlanEditor extends Component {
payload: { payload: {
"number":this.state.appPhone, "number":this.state.appPhone,
"currentState":0, "currentState":0,
"cusManager":localStorage.getItem('id') || this.state.userid, "cusManager":localStorage.getItem('id'),
"name":this.state.appName||'', "name":this.state.appName||'',
"sex": this.state.appSex == true ? '0' : '1', "sex": this.state.appSex == true ? '0' : '1',
"age":this.state.appBirthday||"", "age":this.state.appBirthday||"",
// "phone":this.state.appPhone||'',
}, },
callback(data){ callback(data){
that.setState({ that.setState({
...@@ -1014,55 +1030,30 @@ class AddPlanEditor extends Component { ...@@ -1014,55 +1030,30 @@ class AddPlanEditor extends Component {
} }
goCover = ()=>{ goCover = ()=>{
// let seriNo = localStorage.getItem("seriNo")
// let riskName = localStorage.getItem("riskName")
// let riskCode = localStorage.getItem("riskCode")
// let thumbnail = localStorage.getItem("thumbnail")
let seriNo = this.state.seriNo; let seriNo = this.state.seriNo;
let riskName = this.state.riskName; let riskName = this.state.riskName;
let riskCode = this.state.riskCode; let riskCode = this.state.riskCode;
let thumbnail = this.state.thumbnail; let thumbnail = this.state.thumbnail;
let recipientsSex =this.state.recipientsSex ? "0" : "1"; window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail
let recipientsName =this.state.recipientsName;
let recipients =this.state.recipients;
//收件人信息添加
let that = this;
this.props.dispatch({
type: 'planEditor/addReceiveInfo',
payload: {
"seriNo":seriNo,
"receiveName":recipientsName,
"receiveSex":recipientsSex,
},
callback(data){
console.log('addReceiveInfo-->',data)
window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail+'&recipients='+recipients+'&recipientsSex='+recipientsSex+'&recipientsName='+recipientsName
},
error(data){
that.showToast(data.message)
}
})
} }
/*附加险 查询 缴费期间,*/ /*附加险 缴费期间,*/
getPayMoney1=(index,key)=>{ getPayMoney1=(index,key)=>{
let that = this; let that = this;
let fjRiskCode = this.state.fjRiskCodeList[index] ?this.state.fjRiskCodeList[index]: this.state.fjRiskCode;
this.props.dispatch({ this.props.dispatch({
type:'planEditor/PremiumPaymentPeriod', type:'addUser/PremiumPaymentPeriod',
payload:{ payload:{
"riskCode":fjRiskCode, "riskCode":this.state.fjRiskCodeList[index] ?this.state.fjRiskCodeList[index]: this.state.fjRiskCode,
// "riskCode":this.state.fjRiskCodeList[index],
"maxAge":"", "maxAge":"",
"birthday":this.state.insBirthday, "birthday":this.state.insBirthday,
"pageNo":1, "pageNo":1
"mainCode": this.state.riskCode
}, },
callback(data){ callback(data){
if (data.length == 0) {
that.setState({
paymentList:[],
insuranceDurationList:[],
[key]:true,
fjRiskFlag:''
})
return
}
let insuranceDurationList = [], let insuranceDurationList = [],
paymentList=[]; paymentList=[];
let data1 = [] let data1 = []
...@@ -1079,40 +1070,22 @@ class AddPlanEditor extends Component { ...@@ -1079,40 +1070,22 @@ class AddPlanEditor extends Component {
} }
} }
if(result.length>0){ if(result.length>0){
if(fjRiskCode=='121513'){//华夏福附加险中的重大豁免险种
that.setState({ that.setState({
addProtectTime: (that.state.payTime-1), //保险期间后端传值 addProtectTime:result[0].protectTime, //保险期间后端传值
addInsuranceDuration:'保'+(that.state.payTime-1)+'年', //保险期间 addInsuranceDuration:result[0].label, //保险期间
}) })
}else{
that.setState({
addProtectTime: result[0].protectTime, //保险期间后端传值
addInsuranceDuration: result[0].label, //保险期间
})
}
} }
if(paymentList.length>0){ if(paymentList.length>0){
if(fjRiskCode=='121513'){
that.setState({
addCoverage:(that.state.payTime-1)+'年交', //缴费期间
addPayTime :that.state.payTime-1,
minPrem:paymentList[paymentList.length-1].minPrem,
fjAmount:that.state.fjhuomianAmount,
})
}else{
that.setState({ that.setState({
addCoverage:paymentList[paymentList.length-1].label, //缴费期间 addCoverage:that.state.addCoverage?that.state.addCoverage:paymentList[paymentList.length-1].label, //缴费期间
addPayTime :paymentList[paymentList.length-1].payTime, addPayTime :that.state.addPayTime?that.state.addPayTime:paymentList[paymentList.length-1].payTime,
minPrem:paymentList[paymentList.length-1].minPrem, minPrem:paymentList[paymentList.length-1].minPrem,
minPrem1:paymentList[paymentList.length-1].minPrem,
}) })
} }
}
that.setState({ that.setState({
paymentList:paymentList, paymentList:paymentList,
insuranceDurationList:result, insuranceDurationList:result,
[key]:true, [key]:true,
fjRiskFlag:data[0].riskFlag || '',
}) })
}, },
...@@ -1123,28 +1096,21 @@ class AddPlanEditor extends Component { ...@@ -1123,28 +1096,21 @@ class AddPlanEditor extends Component {
}) })
} }
/* 获取保额,保费列表*/ /* 获取保额,保费列表*/
getPayMoney=(key,param)=>{ getPayMoney=()=>{
let that = this; let that = this;
this.props.dispatch({ this.props.dispatch({
type:'planEditor/PremiumPaymentPeriod', type:'addUser/PremiumPaymentPeriod',
payload:{ payload:{
"riskCode":this.state.riskCode, "riskCode":this.state.riskCode,
"maxAge":"", "maxAge":"",
"birthday":this.state.insBirthday, "birthday":this.state.insBirthday,
"pageNo":1, "pageNo":1
"mainCode": this.state.riskCode
}, },
callback(data){ callback(data){
Toast.hide();
if(data.length==0){
that.setState({
paymentList:[],
insuranceDurationList:[],
loadingFlag:false,
})
return;
}
let insuranceDurationList = [], let insuranceDurationList = [],
paymentList=[]; paymentList=[];
let data1 = [] let data1 = []
...@@ -1163,8 +1129,6 @@ class AddPlanEditor extends Component { ...@@ -1163,8 +1129,6 @@ class AddPlanEditor extends Component {
that.setState({ that.setState({
paymentList:paymentList, paymentList:paymentList,
insuranceDurationList:result, insuranceDurationList:result,
loadingFlag:false,
mainRiskFlag:data.length>0 ? data[0].riskFlag : '',//主险的riskFlag
}) })
...@@ -1174,58 +1138,11 @@ class AddPlanEditor extends Component { ...@@ -1174,58 +1138,11 @@ class AddPlanEditor extends Component {
insuranceDuration:result[0].label, //保险期间 insuranceDuration:result[0].label, //保险期间
}) })
} }
console.log('----getPayMoney----->',that.state.mainInsuranceTable[0],paymentList)
if(paymentList.length>0){ if(paymentList.length>0){
//当缴费期间列表值根据其他条件变化了的时候,需要特殊处理下,比如之前选的20年交项在新的列表里没有时
if(!getPlanInListWithCode('payTime',that.state.payTime,paymentList).label){
that.setState({
coverage:paymentList[paymentList.length-1].label, //缴费期间
payTime:paymentList[paymentList.length-1].payTime,
coverageValue:paymentList[paymentList.length-1].value,
minPrem:paymentList[paymentList.length-1].minPrem,
minAmnt:paymentList[paymentList.length-1].minAmnt,
minPrem1:paymentList[paymentList.length-1].minPrem,
minAmnt1:paymentList[paymentList.length-1].minAmnt,
});
}else{
that.setState({ that.setState({
coverage:that.state.coverage?that.state.coverage:paymentList[paymentList.length-1].label, //缴费期间 coverage:that.state.coverage?that.state.coverage:paymentList[paymentList.length-1].label, //缴费期间
payTime:that.state.payTime===0||that.state.payTime?that.state.payTime:paymentList[paymentList.length-1].payTime, payTime:that.state.payTime===0||that.state.payTime?that.state.payTime:paymentList[paymentList.length-1].payTime,
coverageValue:that.state.coverageValue?that.state.coverageValue:paymentList[paymentList.length-1].value,
minPrem:paymentList[paymentList.length-1].minPrem, minPrem:paymentList[paymentList.length-1].minPrem,
minAmnt:paymentList[paymentList.length-1].minAmnt,
minPrem1:paymentList[paymentList.length-1].minPrem,
minAmnt1:paymentList[paymentList.length-1].minAmnt,
})
if(param == 'editor'){//修改主险的时候
if(that.state.mainInsuranceTable.length>0){
let payTimeValue = that.state.mainInsuranceTable[0][4];//主险信息
let obj = getPlanInListWithCode('payTime',payTimeValue,paymentList);
that.setState({
coverage:obj.label, //缴费期间
payTime:obj.payTime,
coverageValue:obj.value,
minPrem:obj.minPrem,
minAmnt:obj.minAmnt,
});
that.handleSelectChange({
label:obj.label,
payTime:obj.payTime,
value:obj.value,
minPrem:obj.minPrem,
minAmnt:obj.minAmnt,
});
}
}
}
}
if(data.length ===0){
Toast.info('年龄不符合投保规则!')
return false;
}else{
that.setState({
[key]:true,
}) })
} }
}, },
...@@ -1235,39 +1152,21 @@ class AddPlanEditor extends Component { ...@@ -1235,39 +1152,21 @@ class AddPlanEditor extends Component {
}) })
} }
//选择缴费期间时 从组件中带回来的值
handleSelectChange=(item)=>{ change= ( value )=>{
console.log('-----handleSelectChange--------->>>>>',item)
this.setState({ this.setState({
selectChange1:item, selectCoverage:value,
minAmnt1: item.minAmnt, //最低保额 placeholder使用 })
minPrem1: item.minPrem, //最低保费placeholder使用
});
} }
render() { render() {
let url = window.location.href; let url = window.location.href;
const isShare = urlGetParams(url).isShare ? urlGetParams(url).isShare : ""; const matchs = decodeURI(url).match(/isShare=(.*)/i);
let {fjRiskCodeList,insSex,appSex,paymentList,recipients,mainInsuranceTable,fjTable,fjInsuranceList,riskNotTogetherList,fjcalculationMethod,fjRiskCode,payTime,minPrem,minAmnt,appBirthday} = this.state let {fjRiskCodeList,insSex,appSex,paymentList,recipients,mainInsuranceTable} = this.state
const value = this.state; const value = this.state;
let microPlanInfo = this.state.microPlanInfo; let microPlanInfo = this.state.microPlanInfo;
let isShare = matchs ? matchs[1] : '';
let mainInsuranceTotalPrem = 0;//主险的首年保费
if(mainInsuranceTable.length>0){
for(let i in mainInsuranceTable){
mainInsuranceTotalPrem += Number(mainInsuranceTable[i][2]);
}
}
let age11 = getBirthdayAge(this.state.insBirthday);//被保人年龄
let age22 = getBirthdayAge(this.state.appBirthday);//投保人年龄
//投保人年龄限制,豁免险 投保人年龄是18岁的时候 如果生日是当天 或者 前一天则不能购买
let before18 = moment().subtract(18, "years").format("YYYY-MM-DD");
let appBirthday_mid = StandardFormat(appBirthday);
let appFlag = before18==moment(appBirthday_mid).format("YYYY-MM-DD") || moment(before18).subtract(1, "days").format("YYYY-MM-DD")==moment(appBirthday_mid).format("YYYY-MM-DD") ? true : false;
console.log('------render------>>>>>>>>>>>>>>>>>>>',mainInsuranceTable,fjTable,fjInsuranceList,age11,age22,this.state.coverageValue,payTime,minPrem,minAmnt,before18,moment(appBirthday).format("YYYY-MM-DD"))
if(this.state.loadingFlag){
return <div></div>
}
return ( return (
<div className={styles.box}> <div className={styles.box}>
{/*被保人信息*/} {/*被保人信息*/}
...@@ -1374,6 +1273,16 @@ class AddPlanEditor extends Component { ...@@ -1374,6 +1273,16 @@ class AddPlanEditor extends Component {
this.setState({ this.setState({
appName:e.target.value, appName:e.target.value,
}) })
// if(this.state.mainInsurance){
// if(this.state.selectd == 1){
// // 投保人姓名
// this.getInsurance(0,0,e.target.value)
// }else {
// //被保人姓名
// this.getInsurance(0,0,0,e.target.value)
// }
// }
}} /> }} />
</div> </div>
...@@ -1391,6 +1300,7 @@ class AddPlanEditor extends Component { ...@@ -1391,6 +1300,7 @@ class AddPlanEditor extends Component {
this.setState({ this.setState({
appPhone:value, appPhone:value,
}) })
} }
}/> }/>
</div> </div>
...@@ -1402,7 +1312,7 @@ class AddPlanEditor extends Component { ...@@ -1402,7 +1312,7 @@ class AddPlanEditor extends Component {
</div> </div>
<div className={styles.right}> <div className={styles.right}>
<span className={appSex==false?styles.boy:styles.selectBoy} onClick={()=>{ <span className={appSex===false?styles.boy:styles.selectBoy} onClick={()=>{
this.setState({appSex:true}) this.setState({appSex:true})
if(this.state.mainInsurance){ if(this.state.mainInsurance){
...@@ -1411,7 +1321,7 @@ class AddPlanEditor extends Component { ...@@ -1411,7 +1321,7 @@ class AddPlanEditor extends Component {
}}> }}>
男 男
</span> </span>
<span className={appSex==false?styles.selectGirl:styles.girl} onClick={()=>{ <span className={appSex===false?styles.selectGirl:styles.girl} onClick={()=>{
this.setState({appSex:false}) this.setState({appSex:false})
if(this.state.mainInsurance){ if(this.state.mainInsurance){
this.getInsurance(0,0,0,0,0,0,'F') this.getInsurance(0,0,0,0,0,0,'F')
...@@ -1443,29 +1353,17 @@ class AddPlanEditor extends Component { ...@@ -1443,29 +1353,17 @@ class AddPlanEditor extends Component {
</div> </div>
{/*险种选择*/} {/*险种选择*/}
<div className={styles.recognizee}> <div className={styles.recognizee}>
<div className={styles.message}> <div className={styles.message}>
险种选择 险种选择
</div> </div>
{this.state.initInsurance &&<div className={styles.detail}> {this.state.initInsurance &&<div className={styles.detail}>
<div className={styles.sex} > <div className={styles.sex} >
<div className={styles.left} > <div className={styles.left} >
{/*{this.props.location.query.riskName}*/}
{this.state.riskName} {this.state.riskName}
</div> </div>
<div className={styles.right}> <div className={styles.right}>
<img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={ <img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={ this.showModal('modal2')
()=>{
if(this.state.planNumTotal50){
alert('提示', '计划书数量过多,请删除不需要的计划书', [
{ text: '取消', onPress: () => console.log('取消') },
{ text: '去删除', onPress: () => {
this.props.history.push({pathname:"/prospectusList",query:{key:"我的"}});
}},
])
return
}
this.getPayMoney('modal2')
}
} /> } />
</div> </div>
...@@ -1476,7 +1374,7 @@ class AddPlanEditor extends Component { ...@@ -1476,7 +1374,7 @@ class AddPlanEditor extends Component {
{this.state.mainInsurance&&<div className={styles.detail} > {this.state.mainInsurance&&<div className={styles.detail} >
<div className={styles.sex} style={{height:'auto'}}> <div className={styles.sex} style={{height:'auto'}}>
<div className={styles.left}> <div className={styles.left}>
{this.state.riskName} <span style={{marginLeft:'.2rem'}}>首年保费 {mainInsuranceTotalPrem.toFixed(2)+"元"}</span> {this.state.riskName} <span style={{marginLeft:'.2rem'}}>首年保费 {this.state.mainInsuranceTable[0][2].toFixed(2)}</span>
</div> </div>
<div className={styles.right} style={{zIndex:1}}> <div className={styles.right} style={{zIndex:1}}>
<img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={ this.showModal('modal2') <img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={ this.showModal('modal2')
...@@ -1498,11 +1396,11 @@ class AddPlanEditor extends Component { ...@@ -1498,11 +1396,11 @@ class AddPlanEditor extends Component {
return ( return (
<div className={styles.sex} style={{height:'auto'}} key={index}> <div className={styles.sex} style={{height:'auto'}} key={index}>
<div className={styles.left}> <div className={styles.left}>
{this.state.fjTable[index][0]} <span style={{marginLeft:'.2rem'}}>首年保费 {this.state.fjTable[index][2].toFixed(2)+"元"}</span> {this.state.fjTable[index][0]} <span style={{marginLeft:'.2rem'}}>首年保费 {this.state.fjTable[index][2].toFixed(2)}</span>
</div> </div>
<div className={styles.right} style={{zIndex:1}}> <div className={styles.right} style={{zIndex:1}}>
<img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={ <img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={
this.showModal('modal3',index,this.state.fjTable[index]) this.showModal('modal3',index,this.state.fjInsuranceList[index])
} }
style={{position:'initial'}}/> style={{position:'initial'}}/>
<img src={require('../../assets/image/delete.png')} alt="" className={styles.editor} onClick={ <img src={require('../../assets/image/delete.png')} alt="" className={styles.editor} onClick={
...@@ -1525,19 +1423,13 @@ class AddPlanEditor extends Component { ...@@ -1525,19 +1423,13 @@ class AddPlanEditor extends Component {
} }
<div style={{height:'.5rem',marginTop:'.1rem'}}> <div style={{height:'.5rem',marginTop:'.1rem'}}>
{
this.state.defaultfjInsuranceList.length>0 && (
<span style={{border:'1px solid #FF5167', borderRadius:'5px', padding:'.05rem .1rem',color:'#FF5167',float:'none',position:'relative',right:'-2.25rem',top:'.15rem'}} onClick={(e)=>{ <span style={{border:'1px solid #FF5167', borderRadius:'5px', padding:'.05rem .1rem',color:'#FF5167',float:'none',position:'relative',right:'-2.25rem',top:'.15rem'}} onClick={(e)=>{
e.preventDefault() e.preventDefault()
this.getProspectusaAditional(); this.getProspectusaAditional();
} }
}> + 添加主/附加险</span> }> + 添加主/附加险</span>
)
}
</div> </div>
</div> </div>
...@@ -1565,6 +1457,8 @@ class AddPlanEditor extends Component { ...@@ -1565,6 +1457,8 @@ class AddPlanEditor extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className={styles.detail}> <div className={styles.detail}>
...@@ -1611,41 +1505,70 @@ class AddPlanEditor extends Component { ...@@ -1611,41 +1505,70 @@ class AddPlanEditor extends Component {
</div> </div>
</div> </div>
{/*<Date onRef = {(ref)=>{*/}
{/*this.child = ref;*/}
{/*}} handleDate = {this.handleDate} >*/}
{/*</Date>*/}
{/*<Date onRef = {(ref)=>{*/}
{/*this.child1 = ref;*/}
{/*}} handleDate = {this.handleDate1} >*/}
{/*</Date>*/}
{/*底部首年保费*/}
{/*<Table></Table>*/}
<div className={styles.bottom}> <div className={styles.bottom}>
<div className={styles.left}> <div className={styles.left}>
<p>首年保费</p> <p onClick={() =>
<p className={styles.num}>{this.state.totalPrem}<span>.00元</span></p> {
}
}>首年保费</p>
<p className={styles.num}>{this.state.totalPrem}<span>.00</span></p>
</div> </div>
<div className={styles.right}> <div className={styles.right}>
<span style={{marginRight:'.11rem'}} className={this.state.color ===true ?styles.color:''} onClick={()=>{ <span style={{marginRight:'.11rem'}} className={this.state.color ===true ?styles.color:''} onClick={()=>{
this.getProspectusaAditiona2() this.getProspectusaAditiona2()
}}>产品条款</span> }}>产品条款</span>
<span style={{marginRight:'.21rem'}} className={this.state.color ===false ?styles.color:''} onClick={()=>{ <span style={{marginRight:'.21rem'}} className={this.state.color ===false ?styles.color:''} onClick={()=>{
if(this.state.mainInsurance){ if(this.state.mainInsurance){
let storage = window.localStorage; let storage = window.localStorage;
// window.sessionStorage.setItem("recipientsName",this.state.recipientsName) storage.setItem("recipientsName",this.state.recipientsName)
// window.sessionStorage.setItem("recipientsSex",this.state.recipientsSex) storage.setItem("recipientsSex",this.state.recipientsSex)
// window.sessionStorage.setItem("recipients",this.state.recipients) storage.setItem("recipients",this.state.recipients)
window.sessionStorage.setItem("seriNo",this.state.seriNo) storage.setItem("seriNo",this.state.seriNo)
window.sessionStorage.setItem("selectd",this.state.selectd) storage.setItem("selectd",this.state.selectd)
// // this.props.history.push('/planResult')
// let seriNo = localStorage.getItem("seriNo")
// let riskName = localStorage.getItem("riskName")
// let riskCode = localStorage.getItem("riskCode")
// let thumbnail = localStorage.getItem("thumbnail")
let that = this; let that = this;
if (isShare != 't') {
if (isShare !== 't') {
if(this.state.roleId ==3){ if(this.state.roleId ==3){
this.goCover() this.goCover()
} }
else if(this.state.appPhone){ else if(this.state.appPhone){
this.props.dispatch({ this.props.dispatch({
type: 'addUser/followCustomer', type: 'addUser/isFollow',
payload: { payload: {
"number":this.state.appPhone, "number":this.state.appPhone,
"roleId":this.state.roleId,
"id":this.state.userid
}, },
callback(data){ callback(data){
if(data != ""){ if(data.length){
// 有数据生成计划, // 有数据生成计划,
that.goCover(); that.goCover();
}else{ }else{
...@@ -1655,14 +1578,18 @@ class AddPlanEditor extends Component { ...@@ -1655,14 +1578,18 @@ class AddPlanEditor extends Component {
isShowTips:true, isShowTips:true,
}) })
} }
} }
}) })
}else{ }else{
this.goCover(); this.goCover();
} }
} else { } else {
this.goCover(); this.goCover();
} }
}else{ }else{
this.showToast('请先选择险种信息!') this.showToast('请先选择险种信息!')
} }
...@@ -1678,7 +1605,17 @@ class AddPlanEditor extends Component { ...@@ -1678,7 +1605,17 @@ class AddPlanEditor extends Component {
visible={this.state.modal2} visible={this.state.modal2}
onClose={this.onClose('modal2')} onClose={this.onClose('modal2')}
animationType="slide-up" animationType="slide-up"
className={styles.modal} // afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
backgroundColor:'white',
maxHeight:'6rem',
overflowY:'scroll'
}}
> >
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>{this.state.riskName} <span style={{float:'right',}} onClick={this.onClose('modal2')}> <List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>{this.state.riskName} <span style={{float:'right',}} onClick={this.onClose('modal2')}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}}/> <img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}}/>
...@@ -1697,6 +1634,7 @@ class AddPlanEditor extends Component { ...@@ -1697,6 +1634,7 @@ class AddPlanEditor extends Component {
{/* 有多个值 */} {/* 有多个值 */}
{this.state.insuranceDurationList.length != 1 && <List.Item>保险期间 {this.state.insuranceDurationList.length != 1 && <List.Item>保险期间
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker <Picker
data={this.state.insuranceDurationList} data={this.state.insuranceDurationList}
cols={1} cols={1}
...@@ -1722,42 +1660,61 @@ class AddPlanEditor extends Component { ...@@ -1722,42 +1660,61 @@ class AddPlanEditor extends Component {
} }
{/* 一个值*/} {/* 一个值*/}
{this.state.paymentList && paymentList.length ==1 && <List.Item>缴费期间 {this.state.paymentList && this.state.coverage.length ==1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
<div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}>{this.state.coverage}</div> {this.state.coverage}
</div> </div>
</List.Item>} </List.Item>}
{/*多个值*/} {/*多个值*/}
{this.state.paymentList && this.state.coverage.length>1 && <List.Item>缴费期间
{
this.state.paymentList && paymentList.length>1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
<SelectPicker List={this.state.paymentList} <Picker
value={this.state.coverageValue} data={this.state.paymentList}
selectChange={this.handleSelectChange}> cols={1}
</SelectPicker> onChange={
</div> v => {
</List.Item> this.setState({
coverage:this.state.paymentList[v[0]].label,
payTime:this.state.paymentList[v[0]].payTime,
minAmnt:this.state.paymentList[v[0]].minAmnt,
minPrem:this.state.paymentList[v[0]].minPrem,
})
} }
}
>
<div className={styles.choose} ><span>{this.state.coverage!=='' ? this.state.coverage : '3年缴'}</span></div>
</Picker>
</div>
</List.Item>}
{ {
this.state.calculationMethod == 0 && <List.Item >保额 this.state.calculationMethod == 0 && <List.Item >保额
<div style={{float:'right'}}> <div style={{float:'right'}}>
<InputModal placeholder={'最低保额'+this.state.minAmnt1} <input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.15rem'}}
id="inputValue" placeholder={'最低保额'+this.state.minAmnt}
value={this.state.inputValue} id="pp" type="number" pattern="[0-9]*" name="password" onBlur={::this.blur} value={this.state.inputValue} onChange={this.setInput1}/>
/>
</div> </div>
</List.Item> </List.Item>
} }
{ {this.state.calculationMethod == 1 && <List.Item >保费
this.state.calculationMethod == 1 && <List.Item >保费 <div style={{float:'right',}}>
<div style={{float:'right'}}> <input className={styles.input} style={{width:'1.5rem',border:'1px solid #f0f0f1',paddingLeft:'.1rem',height:'.3rem',fontSize:'.15rem',borderRadius:'4px'}}
<InputModal placeholder={'最低保费'+ this.state.minPrem1} placeholder={'最低保费'+ this.state.minPrem}
id="inputValue1" value={ this.state.inputValue1}
value={this.state.inputValue1} id="pp" type="number" pattern="[0-9]*" name="password" onBlur={::this.blur} onChange={this.setInput}/>
/>
{/* <InputItem
className={styles.e_phoneNum}
type='number'
placeholder="最低为10000元"
// error={this.state.hasError}
// onErrorClick={this.onErrorClick}
// onChange={this.onChange}
// value={this.state.value}
/>*/}
</div> </div>
</List.Item> </List.Item>
} }
...@@ -1769,23 +1726,10 @@ class AddPlanEditor extends Component { ...@@ -1769,23 +1726,10 @@ class AddPlanEditor extends Component {
</div> </div>
</List.Item> </List.Item>
} }
{/*主险的捆绑险种*/}
{
this.state.mianWithKBList.length>0 && <List>
{ this.state.mianWithKBList && this.state.mianWithKBList.map((i,idx) => {
return(
<RadioItem key={i}
checked
disabled
>
{i.riskName}
</RadioItem>
)
})
}
</List>
}
<List.Item> <List.Item>
<Button onClick={this.buy('modal2')} style={{color:'white',backgroundColor:'#FF9D5B',float:'none'}}>确定</Button> <Button onClick={this.buy('modal2')} style={{color:'white',backgroundColor:'#FF9D5B',float:'none'}}>确定</Button>
</List.Item> </List.Item>
...@@ -1797,9 +1741,26 @@ class AddPlanEditor extends Component { ...@@ -1797,9 +1741,26 @@ class AddPlanEditor extends Component {
visible={this.state.modal1} visible={this.state.modal1}
onClose={this.onClose('modal1')} onClose={this.onClose('modal1')}
animationType="slide-up" animationType="slide-up"
className={styles.modal} // afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'scroll'
}}
> >
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>添加主/附加险 <span style={{float:'right',}}> <List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>添加主/附加险 <span style={{float:'right',}} onClick={
()=>{
// this.setState({
// modal1:false,
// modal3:true,
// })
// this.getPayMoney1()
}
}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={()=>{ <img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={()=>{
this.setState({ this.setState({
modal1:false, modal1:false,
...@@ -1809,50 +1770,21 @@ class AddPlanEditor extends Component { ...@@ -1809,50 +1770,21 @@ class AddPlanEditor extends Component {
{/*确定*/} {/*确定*/}
</span></div>} className="popup-list"> </span></div>} className="popup-list">
</List> </List>
<List> <List>
{ this.state.fjInsuranceList && this.state.fjInsuranceList.map((i,idx) => { { this.state.fjInsuranceList && this.state.fjInsuranceList.map((i,idx) => {
let NotTogetherList = this.state.riskNotTogetherList;
NotTogetherList = NotTogetherList.indexOf(i.riskCode) >-1 ? NotTogetherList : NotTogetherList.concat(i.riskCode)
let len = arrayDeal.Intersect(NotTogetherList,fjRiskCodeList.concat(i.riskCode)).length;
let selectdFlag = false,checked = false;
if(age11>i.maxAge){
selectdFlag = true;
}else{
if(i.riskCode == '121513'){//华夏福豁免险种 投保人是本人时 不能选择
if(this.state.selectd != 1 || Number(payTime)==0 || age22<18 || age22>60){
selectdFlag = true;
}else{
if(age22 > (69-(payTime-1))){
selectdFlag = true;
}
if(age22==18 && appFlag){
selectdFlag = true;
}
}
}
if(i.riskCode == '111703'){//医保通,选择了医保通之后 2014只能选 5000,10000.所以医保通在2014不是这两个值的时候不能选
let obj = getPlanInListWithCode('riskCode','121705',fjTable);
if(obj[1] && (String(obj[1]) != '5000' && String(obj[1]) != '10000') ){
selectdFlag = true;
}
}
}
return( return(
<RadioItem key={i.value} <RadioItem key={i.value}
className="fjRadio" checked={this.state.insuranceValue===i.value}
checked={selectdFlag ? false : (len>1 ? false : this.state.insuranceValue===i.value ? true : false)} disabled={fjRiskCodeList.indexOf(i.riskCode)>-1?true:false}
disabled={selectdFlag || (fjRiskCodeList.indexOf(i.riskCode)>-1 ?true: len>1 ? true : false)} onChange={() => this.onChange(i.value,i.label,i.riskCode,i.fjcalculationMethod)}>
onChange={() => this.onChangeFJ(i)}>
{i.label} {i.label}
</RadioItem> </RadioItem>
) )
}) })}
}
</List> </List>
...@@ -1860,15 +1792,6 @@ class AddPlanEditor extends Component { ...@@ -1860,15 +1792,6 @@ class AddPlanEditor extends Component {
<Button onClick={()=>{ <Button onClick={()=>{
if(this.state.fjRiskCodeList.length==this.state.fjInsuranceList.length){ if(this.state.fjRiskCodeList.length==this.state.fjInsuranceList.length){
}else{ }else{
//此处判断互斥的险种
let NotTogetherList = this.state.riskNotTogetherList;
NotTogetherList = NotTogetherList.indexOf(this.state.fjRiskCode) >-1 ? NotTogetherList : NotTogetherList.concat(this.state.fjRiskCode)
let len = arrayDeal.Intersect(NotTogetherList,fjRiskCodeList.concat(this.state.fjRiskCode)).length;
let ckeckedNUm = document.getElementsByClassName('fjRadio am-radio-item-disabled').length;//被禁用的元素的个数
if(len>1 || ckeckedNUm == this.state.fjInsuranceList.length){
return;
}
this.setState({ this.setState({
modal1:false, modal1:false,
modal3:true, modal3:true,
...@@ -1885,7 +1808,16 @@ class AddPlanEditor extends Component { ...@@ -1885,7 +1808,16 @@ class AddPlanEditor extends Component {
visible={this.state.modal3} visible={this.state.modal3}
onClose={this.onClose('modal3')} onClose={this.onClose('modal3')}
animationType="slide-up" animationType="slide-up"
className={styles.modal} // afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'scroll'
}}
> >
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>{this.state.insuranceLabel} <span style={{float:'right',}} onClick={ <List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>{this.state.insuranceLabel} <span style={{float:'right',}} onClick={
()=>{ ()=>{
...@@ -1912,16 +1844,18 @@ class AddPlanEditor extends Component { ...@@ -1912,16 +1844,18 @@ class AddPlanEditor extends Component {
</List.Item> } </List.Item> }
{this.state.insuranceDurationList.length>1 &&<List.Item>保险期间 {this.state.insuranceDurationList.length>1 &&<List.Item>保险期间
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker <Picker
data={this.state.insuranceDurationList} data={this.state.insuranceDurationList}
cols={1} cols={1}
disabled={this.state.insuranceDurationList.length==1?true:false} disabled={this.state.insuranceDurationList.length===1?true:false}
onChange={ onChange={
(s)=>{ (s)=>{
let insuranceDurationList = this.state.insuranceDurationList; let insuranceDurationList = this.state.insuranceDurationList;
for (var i = 0; i < insuranceDurationList.length; i++) { for (var i = 0; i < insuranceDurationList.length; i++) {
if(i == s){ if(i === s){
this.setState({ this.setState({
addProtectTime:insuranceDurationList[i].protectTime, addProtectTime:insuranceDurationList[i].protectTime,
addInsuranceDuration:insuranceDurationList[i].label, addInsuranceDuration:insuranceDurationList[i].label,
...@@ -1940,12 +1874,14 @@ class AddPlanEditor extends Component { ...@@ -1940,12 +1874,14 @@ class AddPlanEditor extends Component {
</div> </div>
</List.Item> } </List.Item> }
{ {
this.state.paymentList && paymentList.length ==1 && <List.Item>缴费期间 this.state.paymentList && paymentList.length ==1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
<div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}> { this.state.addCoverage}</div> <div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}> {this.state.addCoverage}</div>
</div> </div>
</List.Item> </List.Item>
...@@ -1955,6 +1891,7 @@ class AddPlanEditor extends Component { ...@@ -1955,6 +1891,7 @@ class AddPlanEditor extends Component {
{ {
this.state.paymentList && paymentList.length > 1 && <List.Item>缴费期间 this.state.paymentList && paymentList.length > 1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker <Picker
data={this.state.paymentList} data={this.state.paymentList}
cols={1} cols={1}
...@@ -1988,20 +1925,18 @@ class AddPlanEditor extends Component { ...@@ -1988,20 +1925,18 @@ class AddPlanEditor extends Component {
{ {
this.state.fjcalculationMethod == 0 && this.state.fjRiskCode === '121705' && <List.Item >保额 this.state.fjcalculationMethod == 0 && this.state.fjRiskCode === '121705' && <List.Item >保额
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker <Picker
data={fjRiskCodeList.indexOf('111703')>-1 ? this.state.dataList2014_1 : this.state.dataList2014} data={[{value:'0',label:5000},{value:'1',label:10000},{value:'2',label:15000},{value:'3',label:20000}]}
cols={1} cols={1}
value={[this.state.fjAmountValue]}
onChange={ onChange={
v => { v => {
let paymentList = fjRiskCodeList.indexOf('111703')>-1 ? this.state.dataList2014_1 : this.state.dataList2014; let paymentList = [{value:'0',label:5000},{value:'1',label:10000},{value:'2',label:15000},{value:'3',label:20000}];
for (var i = 0; i < paymentList.length; i++) { for (var i = 0; i < paymentList.length; i++) {
if(i == v){ if(i == v){
this.setState({ this.setState({
fjAmount:paymentList[i].label, fjAmount:paymentList[i].label
fjAmountValue:paymentList[i].value
}) })
} }
...@@ -2021,10 +1956,8 @@ class AddPlanEditor extends Component { ...@@ -2021,10 +1956,8 @@ class AddPlanEditor extends Component {
this.state.fjcalculationMethod == 0 && this.state.fjRiskCode != '121705' && <List.Item >保额 this.state.fjcalculationMethod == 0 && this.state.fjRiskCode != '121705' && <List.Item >保额
<div style={{float:'right'}}> <div style={{float:'right'}}>
<input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.15rem'}} <input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.15rem'}}
placeholder={'最低保额'+this.state.minAmnt1} placeholder={'最低保额'+this.state.minAmnt}
onBlur={::this.blur} onBlur={::this.blur}
className={this.state.fjRiskCode == '121513' ? styles.inputDisabled : null}
disabled={this.state.fjRiskCode == '121513' ? true : false}
id="pp" type="number" pattern="[0-9]*" name="password" value={this.state.fjAmount} onChange={this.fjAmount}/> id="pp" type="number" pattern="[0-9]*" name="password" value={this.state.fjAmount} onChange={this.fjAmount}/>
</div> </div>
</List.Item> </List.Item>
...@@ -2035,7 +1968,7 @@ class AddPlanEditor extends Component { ...@@ -2035,7 +1968,7 @@ class AddPlanEditor extends Component {
this.state.fjcalculationMethod == 1 && <List.Item >保费 this.state.fjcalculationMethod == 1 && <List.Item >保费
<div style={{float:'right'}}> <div style={{float:'right'}}>
<input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.18rem'}} <input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.18rem'}}
placeholder={'最低保费'+this.state.minPrem1} placeholder={'最低保费'+this.state.minPrem}
onBlur={::this.blur} onBlur={::this.blur}
id="pp" type="number" pattern="[0-9]*" name="password" value={this.state.fjPrem} onChange={this.fjPrem}/> id="pp" type="number" pattern="[0-9]*" name="password" value={this.state.fjPrem} onChange={this.fjPrem}/>
</div> </div>
...@@ -2053,8 +1986,9 @@ class AddPlanEditor extends Component { ...@@ -2053,8 +1986,9 @@ class AddPlanEditor extends Component {
{ {
this.state.fjRiskCode == '111703' && <List.Item>有无社保 this.state.insuranceValue == 0 && <List.Item>有无社保
<div style={{float:'right',position:'relative'}} > <div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}></Select>*/}
<Picker <Picker
data={[{value:'0',label:'有'},{value:'1',label:'无'}]} data={[{value:'0',label:'有'},{value:'1',label:'无'}]}
cols={1} cols={1}
...@@ -2064,14 +1998,14 @@ class AddPlanEditor extends Component { ...@@ -2064,14 +1998,14 @@ class AddPlanEditor extends Component {
for (var i = 0; i < paymentList.length; i++) { for (var i = 0; i < paymentList.length; i++) {
if(i == v){ if(i == v){
this.setState({ this.setState({
social_mid:paymentList[i].label, social:paymentList[i].label,
}) })
} }
} }
} }
} }
> >
<div className={styles.choose} ><span>{this.state.social_mid !=='' ? this.state.social_mid : '请选择'}</span></div> <div className={styles.choose} ><span>{this.state.social !=='' ? this.state.social : '请选择'}</span></div>
</Picker> </Picker>
...@@ -2082,12 +2016,6 @@ class AddPlanEditor extends Component { ...@@ -2082,12 +2016,6 @@ class AddPlanEditor extends Component {
<List.Item> <List.Item>
<Button onClick={()=>{ <Button onClick={()=>{
let buyFjList = this.state.buyFjList; let buyFjList = this.state.buyFjList;
//修改附件险种的时候,先删除之前添加的
for(let i in buyFjList){
if(buyFjList[i].riskCode == this.state.fjRiskCode){
buyFjList.splice(i,1);
}
}
buyFjList.push({ buyFjList.push({
"riskName": this.state.insuranceLabel, "riskName": this.state.insuranceLabel,
"riskCode": this.state.fjRiskCode, "riskCode": this.state.fjRiskCode,
...@@ -2096,15 +2024,13 @@ class AddPlanEditor extends Component { ...@@ -2096,15 +2024,13 @@ class AddPlanEditor extends Component {
"copies": this.state.fjcalculationMethod == 2 ? 1 : "", "copies": this.state.fjcalculationMethod == 2 ? 1 : "",
"payTime": this.state.addPayTime, "payTime": this.state.addPayTime,
"protectTime": this.state.addProtectTime, "protectTime": this.state.addProtectTime,
"riskFlag": this.state.fjRiskFlag,
}) })
let that = this; // this.buy1('modal3', buyFjList)
this.payFjInsurance(buyFjList)
this.setState({ this.setState({
modal3:false, modal3:false,
buyFjList:buyFjList, buyFjList:buyFjList,
social:this.state.social_mid
},function(){
that.payFjInsurance(buyFjList)
}) })
}} style={{color:'white',backgroundColor:'#FF9D5B',float:'none'}}>确定</Button> }} style={{color:'white',backgroundColor:'#FF9D5B',float:'none'}}>确定</Button>
</List.Item> </List.Item>
...@@ -2116,7 +2042,16 @@ class AddPlanEditor extends Component { ...@@ -2116,7 +2042,16 @@ class AddPlanEditor extends Component {
visible={this.state.modal4} visible={this.state.modal4}
onClose={this.onClose('modal4')} onClose={this.onClose('modal4')}
animationType="slide-up" animationType="slide-up"
className={styles.modal} // afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'scroll'
}}
> >
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>条款列表<span style={{float:'right',}} onClick={this.closeInsurance}> <List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>条款列表<span style={{float:'right',}} onClick={this.closeInsurance}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={this.onClose('modal4')}/> <img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={this.onClose('modal4')}/>
...@@ -2135,13 +2070,14 @@ class AddPlanEditor extends Component { ...@@ -2135,13 +2070,14 @@ class AddPlanEditor extends Component {
return( return(
<List.Item style={{left:'.1rem'}} key={index}>{item.configName} <List.Item style={{left:'.1rem'}} key={index}>{item.configName}
<div style={{float:'right',position:'relative',right:'.1rem'}} > <div style={{float:'right',position:'relative',right:'.1rem'}} >
<img src={item.cut !== true?require('../../assets/image/open.png'):require('../../assets/image/off.png')} alt="" style={{width:'.14rem',height:'.08rem'}} onClick={()=>{ <img src={item.cut != true?require('../../assets/image/open.png'):require('../../assets/image/off.png')} alt="" style={{width:'.14rem',height:'.08rem'}} onClick={()=>{
let that = this; let that = this;
let termList = this.state.termList; let termList = this.state.termList;
termList[index].cut = !termList[index].cut termList[index].cut = !termList[index].cut
this.setState({ this.setState({
termList:termList, termList:termList,
// riskCode:item.configCode,
}) })
/* 条款列表详情接口 */ /* 条款列表详情接口 */
...@@ -2165,20 +2101,10 @@ class AddPlanEditor extends Component { ...@@ -2165,20 +2101,10 @@ class AddPlanEditor extends Component {
{ {
item.cut && <div> item.cut && <div>
<div className={styles.chakantiaokuan}> <span style={{color:'#888',fontSize:'.14rem' }}>条款预览</span>
<span style={{color:'#888',fontSize:'.14rem',float:'left'}}>条款预览</span>
<span className={styles.deta} onClick={()=>{ <span className={styles.deta} onClick={()=>{
if(item.clauseUrl){
//跳转前 先保存下险种及其他页面数据
// window.sessionStorage.setItem("recipientsName",this.state.recipientsName)
// window.sessionStorage.setItem("recipientsSex",this.state.recipientsSex)
// window.sessionStorage.setItem("recipients",this.state.recipients)
window.sessionStorage.setItem("seriNo",this.state.seriNo)
window.sessionStorage.setItem("selectd",this.state.selectd)
window.location.href = item.clauseUrl window.location.href = item.clauseUrl
}
}}> 查看详情</span> }}> 查看详情</span>
</div>
{this.state.clauseUrlList.map((item,index)=>{ {this.state.clauseUrlList.map((item,index)=>{
return( return(
<div key={index}> <div key={index}>
...@@ -2197,27 +2123,58 @@ class AddPlanEditor extends Component { ...@@ -2197,27 +2123,58 @@ class AddPlanEditor extends Component {
</List> </List>
</Modal> </Modal>
<Modal
popup
visible={this.state.modal5}
onClose={this.onClose('modal5')}
animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
}}
>
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>hauxia<span style={{float:'right',}} onClick={this.closeInsurance}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={this.onClose('modal5')}/>
</span></div>} className="popup-list">
</List>
<List>
<List.Item style={{left:'.1rem'}} >
{this.state.text}
</List.Item>
</List>
</Modal>
</WingBlank> </WingBlank>
<LocalizedModal visible={this.state.visible} hideModal={this.hideModalConfirm} onClick={this.state.submit} message={this.state.message}
/>
{/*<DatePicker />*/}
{/* <Date onRef = {(ref)=>{
this.child = ref;
}} handleDate = {this.handleDate} >
</Date>*/}
<DatePicker onRef = {(ref)=>{ <DatePicker onRef = {(ref)=>{
this.child = ref; this.child = ref;
}} }} getDate = {(date)=>{
birthday = {moment(this.state.appBirthday).format("YYYY-MM-DD")}
getDate = {(date)=>{
this.getDate(date) this.getDate(date)
}} }}
//minYear={filterDate.FromDateToTarget(60)}
> >
</DatePicker> </DatePicker>
<DatePicker onRef = {(ref)=>{ <DatePicker onRef = {(ref)=>{
this.child1 = ref; this.child1 = ref;
}} }} getDate = {(date)=>{
birthday = {moment(this.state.insBirthday).format("YYYY-MM-DD")}
getDate = {(date)=>{
this.getDate1(date) this.getDate1(date)
}} }} >
minYear={filterDate.FromDateToTarget(this.state.minInsYear)}
>
</DatePicker> </DatePicker>
<ConfirmPop show={this.state.isShowTips} title="提示" handleOK={this.handleOk} <ConfirmPop show={this.state.isShowTips} title="提示" handleOK={this.handleOk}
...@@ -2240,6 +2197,6 @@ class AddPlanEditor extends Component { ...@@ -2240,6 +2197,6 @@ class AddPlanEditor extends Component {
AddPlanEditor.propsTypes = {} AddPlanEditor.propsTypes = {}
export default connect(({planEditor,home})=>({planEditor,home}))(AddPlanEditor) export default connect(({home})=>({home}))(AddPlanEditor)
...@@ -8,7 +8,7 @@ body{ ...@@ -8,7 +8,7 @@ body{
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
/* padding-bottom: 1rem; */ padding-bottom: 1rem;
overflow-y: scroll; overflow-y: scroll;
} }
/* 列表 */ /* 列表 */
...@@ -133,6 +133,7 @@ input:disabled{ ...@@ -133,6 +133,7 @@ input:disabled{
.label{ .label{
padding: 0 0 0 0.12rem; padding: 0 0 0 0.12rem;
/* position: absolute; */
} }
.label>img{ .label>img{
...@@ -195,7 +196,6 @@ input:disabled{ ...@@ -195,7 +196,6 @@ input:disabled{
position: fixed; position: fixed;
bottom: 0; bottom: 0;
padding-left: .11rem; padding-left: .11rem;
z-index: 5;
} }
.bottom>.right{ .bottom>.right{
width: 100%; width: 100%;
...@@ -230,10 +230,3 @@ input:disabled{ ...@@ -230,10 +230,3 @@ input:disabled{
.black{ .black{
color:#000 !important; color:#000 !important;
} }
:global(.am-list-item .am-input-control input:disabled){
color: #000 !important;
opacity: 1;
-webkit-opacity:1;
-webkit-text-fill-color: #000;
}
...@@ -7,20 +7,134 @@ import {Toast, InputItem, Picker,} from 'antd-mobile'; ...@@ -7,20 +7,134 @@ import {Toast, InputItem, Picker,} from 'antd-mobile';
import DatePicker from "../../components/DatePicker"; import DatePicker from "../../components/DatePicker";
import ConfirmPop from '../../components/Modal/confirmPop'; import ConfirmPop from '../../components/Modal/confirmPop';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import {urlGetParams,getPlanInListWithCode,filterDate} from "../../utils/dataFilter";
import moment from 'moment';
moment.locale('zh-cn');
class AddUser extends Component { class AddUser extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
isShowTips:false,
baseList: [
{
start: true,
name: '姓名',
placeholder: '请输入客户姓名',
select: false,
value:'',
},
{
start: false,
name: '性别',
placeholder: '请选择性别',
select: '性别',
value:'',
},
{
start: false,
name: '年龄',
placeholder: '请选择年龄',
select: '年龄',
value:'',
},
{
start: true,
name: '手机号码',
placeholder: '请输入手机号码',
select: false,
value:'',
},
{
start: false,
name: '婚姻状况',
placeholder: '请选择婚姻状况',
select: '婚姻状况',
value:'',
},
{
start: false,
name: '学历',
placeholder: '请选择学历',
select: '学历',
value:'',
},
],
professionList: [
{
start: false,
name: '职业类型',
placeholder: '请选择职业类型',
select: '职业类型',
value:'',
},
{
start: false,
name: '年收入(万元)',
placeholder: '请选择年收入',
select: '年收入',
value:'',
},
],
addressList: [
{
start: false,
name: '所在省市',
placeholder: '请选择所在省市',
select: '所在省市',
value:'',
},
{
start: false,
name: '详细地址',
placeholder: '请输入详细地址',
select: false,
value:'',
},
],
insuranceList: [
{
start: false,
name: '希望购买产品',
placeholder: '请选择产品',
select: '产品',
value:'',
},
{
start: false,
name: '缴费期间',
placeholder: '请选择缴费期间',
value:'',
},
{
start: false,
name: '缴费频次',
placeholder: '请选择缴费频次',
select: '缴费频次',
value:'55',
},
{
start: false,
name: '保额',
placeholder: '请选择保额',
select: false,
value:'',
},
],
color:false, color:false,
message:'',//提交至督训,确定 message:'',//提交至督训,确定
labelList: ['医疗', '健康', '少儿', '意外', '温和', '严肃', '孝顺', '富有', '小康', '拮据'], labelList: ['医疗', '健康', '少儿', '意外', '温和', '严肃', '孝顺', '富有', '小康', '拮据'],
addLabel:[], addLabel:[],
showLabelList:false, showLabelList:false,
modal5:false,
modal6:false,
modal7:false,
modal8:false,
modal9:false,
modal10:false,
modal11:false,
modal12:false,
modal13:false,
modal14:false,
modal115:false,
ageAry:[], ageAry:[],
cityValue:'',
provinceCitys:[], provinceCitys:[],
disabled:false, disabled:false,
visible:false, visible:false,
...@@ -49,7 +163,6 @@ class AddUser extends Component { ...@@ -49,7 +163,6 @@ class AddUser extends Component {
regionData: [], regionData: [],
reverseData:[], reverseData:[],
regionVal: '', regionVal: '',
asyncValue:[],
product:[], product:[],
productSelect:'', productSelect:'',
productCode:'', productCode:'',
...@@ -58,7 +171,6 @@ class AddUser extends Component { ...@@ -58,7 +171,6 @@ class AddUser extends Component {
frequency:"", frequency:"",
insuredAmount:"", insuredAmount:"",
birthday:'', birthday:'',
loadingFlag:true,
} }
} }
blur =()=>{ blur =()=>{
...@@ -83,16 +195,15 @@ class AddUser extends Component { ...@@ -83,16 +195,15 @@ class AddUser extends Component {
this.setState({ this.setState({
visible:false, visible:false,
}) })
// const isShare = localStorage.getItem('clientNeededInfoIsShare'); const isShare = localStorage.getItem('clientNeededInfoIsShare');
const isShare = urlGetParams(window.location.href).isShare === '1' ? false : true;
let that = this; let that = this;
if (v === 'ok') { if (v === 'ok') {
let aLabel = this.state.addLabel.toString(); let aLabel = this.state.addLabel.toString();
let cusManager = ''; let cusManager = '';
let address = window.location.href; let address = window.location.href;
const matchs = urlGetParams(window.location.href).id; const matchs = decodeURI(address).match(/id=(.*)/i);
if (matchs) { if (matchs) {
cusManager = matchs; cusManager = matchs[1];
} }
/* 确定 */ /* 确定 */
this.props.dispatch({ this.props.dispatch({
...@@ -116,7 +227,7 @@ class AddUser extends Component { ...@@ -116,7 +227,7 @@ class AddUser extends Component {
"frequency":this.state.frequency||'', "frequency":this.state.frequency||'',
"insuredAmount":this.state.insuredAmount||"", "insuredAmount":this.state.insuredAmount||"",
'label': aLabel, //添加的label标签。 'label': aLabel, //添加的label标签。
"currentState":'0',//未提交状态 "currentState":'0',
"cusManager": cusManager==='' ? localStorage.getItem('id'):cusManager, //当前登录的经理id "cusManager": cusManager==='' ? localStorage.getItem('id'):cusManager, //当前登录的经理id
}, },
callback() { callback() {
...@@ -138,7 +249,11 @@ class AddUser extends Component { ...@@ -138,7 +249,11 @@ class AddUser extends Component {
}) })
let that = this; let that = this;
if (v === 'ok') { if (v === 'ok') {
// let aLabel = '';
let aLabel = this.state.addLabel.toString(); let aLabel = this.state.addLabel.toString();
// this.state.addLabel.forEach(element => {
// aLabel+=element.text
// });
/*提交至督训 */ /*提交至督训 */
this.props.dispatch({ this.props.dispatch({
type:'addUser/addUser', type:'addUser/addUser',
...@@ -160,7 +275,7 @@ class AddUser extends Component { ...@@ -160,7 +275,7 @@ class AddUser extends Component {
"frequency":this.state.frequency||'', "frequency":this.state.frequency||'',
"insuredAmount":this.state.insuredAmount||"", "insuredAmount":this.state.insuredAmount||"",
'label': aLabel, //添加的label标签。 'label': aLabel, //添加的label标签。
"currentState":'3',//已提交状态 "currentState":'1',
"cusManager":localStorage.getItem('id'), "cusManager":localStorage.getItem('id'),
}, },
callback(){ callback(){
...@@ -182,29 +297,6 @@ class AddUser extends Component { ...@@ -182,29 +297,6 @@ class AddUser extends Component {
}else{ }else{
} }
} }
//获取产品列表
getPlanList(){
const storeItem = JSON.parse(localStorage.getItem('clientNeededInfo'));
let that =this;
this.props.dispatch({
type:'home/getPlanList',
payload:{
riskName:"",
riskStatus:1, //1 启用
},
callback(data){
let ary = []
for (var i = 0; i < data.length; i++) {
ary.push({value:data[i].riskCode,label:data[i].riskName})
that.setState({
product:ary,
productCode: (storeItem && storeItem.product) ? getPlanInListWithCode('label',storeItem.product,ary).value : '' ,
})
}
},
})
}
showModal = key => (e) => { showModal = key => (e) => {
e.preventDefault(); // 修复 Android 上点击穿透 e.preventDefault(); // 修复 Android 上点击穿透
this.setState({ this.setState({
...@@ -227,31 +319,34 @@ class AddUser extends Component { ...@@ -227,31 +319,34 @@ class AddUser extends Component {
callback(data){ callback(data){
if(params.configType ==='jobType' ){ if(params.configType ==='jobType' ){
let ary = [] let ary = []
for (let i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
ary.push({value:data[i].configName,label:data[i].configName}) ary.push({value:data[i].configName,label:data[i].configName})
that.setState({ that.setState({
occupational:ary, occupational:ary,
// modal9:true,
}) })
} }
}else if(params.configType ==='yearMoney'){ }else if(params.configType ==='yearMoney'){
let ary = [] let ary = []
for (let i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
ary.push({value:data[i].configName,label:data[i].configName}) ary.push({value:data[i].configName,label:data[i].configName})
that.setState({ that.setState({
annualIncome:ary, annualIncome:ary,
// modal10:true,
}) })
} }
}else if(params.configType ==='provinces'){ }else if(params.configType ==='provinces'){
let ary = [] let ary = []
for (let i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
ary.push({value:data[i].configCode,label:data[i].configName}) ary.push({value:data[i].configCode,label:data[i].configName})
that.setState({ that.setState({
province:ary, province:ary,
// modal11:true,
}) })
} }
}else if(params.oyhers){ }else if(params.oyhers){
let ary = [] let ary = []
for (let i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
ary.push({value:data[i].configCode,label:data[i].configName}) ary.push({value:data[i].configCode,label:data[i].configName})
that.setState({ that.setState({
provinceCitys:ary, provinceCitys:ary,
...@@ -272,29 +367,19 @@ class AddUser extends Component { ...@@ -272,29 +367,19 @@ class AddUser extends Component {
componentWillUnmount() { componentWillUnmount() {
document.title = ''; document.title = '';
} }
componentWillMount(){
Toast.loading('loading...',0);
this.getPlanList();
}
componentDidMount() { componentDidMount() {
const _this = this; const _this = this;
let address = window.location.href; let address = window.location.href;
document.title = '客户信息'; document.title = '客户信息';
const matchs1 = urlGetParams(window.location.href).id const matchs1 = decodeURI(address).match(/id=(.*)/i)
// console.log(matchs1);
if(matchs1){ if(matchs1){
shareHide(false) shareHide(false)
let urlShare = "";
if(urlGetParams(window.location.href).isShare){//处理多次转发参数问题
urlShare = window.location.href;
}else{
urlShare = window.location.href + '&isShare=1';
}
share({ share({
decodeUrl: window.location.href.split('#')[0], decodeUrl: window.location.href.split('#')[0],
title: '我是'+ localStorage.getItem('name')+',您的保障待领取', title: '我是'+ localStorage.getItem('name')+',您的保障待领取',
desc: '您与保障之间的距离只差一步', desc: '您与保障之间的距离只差一步',
shareUrl: urlShare, shareUrl: window.location.href,
thumbnail: 'https://zmt.ihxlife.com/customer1.png' thumbnail: 'https://zmt.ihxlife.com/customer1.png'
}); });
}else { }else {
...@@ -315,10 +400,12 @@ class AddUser extends Component { ...@@ -315,10 +400,12 @@ class AddUser extends Component {
"regionVal": storeItem.province || '', "regionVal": storeItem.province || '',
"address": storeItem.address, "address": storeItem.address,
"productSelect": storeItem.product||'' , "productSelect": storeItem.product||'' ,
// "productCode": storeItem.product? storeItem.product=='511403'?'福临门(智慧版)':'长春藤(多倍版)':'' ,
"productCode": storeItem.product?storeItem.product=='长春藤(多倍版)'?'511501':'511403':'' ,
"payment": storeItem.payment || '', "payment": storeItem.payment || '',
"frequency": storeItem.frequency || '', "frequency": storeItem.frequency || '',
"insuredAmount": storeItem.insuredAmount || "", "insuredAmount": storeItem.insuredAmount || "",
addLabel: !storeItem.label ? [] : storeItem.label.split(','), //添加的label标签。 addLabel: storeItem.label === '' ? [] : storeItem.label.split(','), //添加的label标签。
"currentState": storeItem.currentState, "currentState": storeItem.currentState,
cusManager: localStorage.getItem("id"), cusManager: localStorage.getItem("id"),
}) })
...@@ -338,7 +425,7 @@ class AddUser extends Component { ...@@ -338,7 +425,7 @@ class AddUser extends Component {
matchs1:matchs1, matchs1:matchs1,
}) })
// 省市级联初始化 // 省市级联初始化
let clientInfo = JSON.parse(localStorage.getItem("clientNeededInfo")); let clientInfo = null;
this.props.dispatch({ this.props.dispatch({
type: "governortraining/getRegionList", type: "governortraining/getRegionList",
payload: { payload: {
...@@ -346,7 +433,6 @@ class AddUser extends Component { ...@@ -346,7 +433,6 @@ class AddUser extends Component {
oyhers: 0 oyhers: 0
}, },
callback: (res) => { callback: (res) => {
Toast.hide();
if (res.status) { if (res.status) {
let { data } = res, arr = []; let { data } = res, arr = [];
for (let i = 0, l = data.length; i < l; i++) { for (let i = 0, l = data.length; i < l; i++) {
...@@ -357,17 +443,13 @@ class AddUser extends Component { ...@@ -357,17 +443,13 @@ class AddUser extends Component {
}) })
} }
this.setState({ this.setState({
regionData: arr, regionData: arr
loadingFlag:false
}, () => { }, () => {
if (clientInfo) { if (clientInfo) {
const namearr = clientInfo.province.split(','); const namearr = clientInfo.province.split(',');
if (namearr.length) { if (namearr.length) {
let havedata = false;
arr.forEach((element, i) => { arr.forEach((element, i) => {
if (element.label==namearr[0]) { if (element.label===namearr[0]) {
havedata = true;//匹配到了有数据
console.log("6666666666666666666----->>>>",element)
_this.fillSecData(element.value, i, (list) => { _this.fillSecData(element.value, i, (list) => {
if (namearr[1]) { if (namearr[1]) {
list && list.forEach(el => { list && list.forEach(el => {
...@@ -387,9 +469,6 @@ class AddUser extends Component { ...@@ -387,9 +469,6 @@ class AddUser extends Component {
}) })
} }
}); });
if(!havedata){//没有匹配到
_this.fillSecData(data[0].configCode, 0)
}
} }
} else { } else {
_this.fillSecData(data[0].configCode, 0) _this.fillSecData(data[0].configCode, 0)
...@@ -400,8 +479,7 @@ class AddUser extends Component { ...@@ -400,8 +479,7 @@ class AddUser extends Component {
}); });
} }
getDate=(date)=>{ getDate=(date)=>{
// let date_value=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); let date_value=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
let date_value = moment(date).format("YYYY-MM-DD");
this.setState({ this.setState({
birthday :date_value, birthday :date_value,
}) })
...@@ -460,17 +538,9 @@ class AddUser extends Component { ...@@ -460,17 +538,9 @@ class AddUser extends Component {
regionData regionData
}, () => { }, () => {
const list = _this.reverseData(_this.state.regionData); const list = _this.reverseData(_this.state.regionData);
let asyncValue = _this.state.asyncValue;
if(asyncValue.length==1){
asyncValue[1] = arr[0].value;
}
console.log(_this.state.regionVal,_this.state.asyncValue,list,list[_this.state.asyncValue[0]])
_this.setState({
reverseData: list,
// regionVal:_this.state.regionVal,
asyncValue: asyncValue
},function(){
cb && cb(data); cb && cb(data);
_this.setState({
reverseData: list
}) })
}) })
} }
...@@ -479,44 +549,34 @@ class AddUser extends Component { ...@@ -479,44 +549,34 @@ class AddUser extends Component {
} }
} }
render() { render() {
// const isShare = localStorage.getItem('clientNeededInfoIsShare'); const isShare = localStorage.getItem('clientNeededInfoIsShare');
const isShare = urlGetParams(window.location.href).isShare === '1' ? false : true;
const storeItem = JSON.parse(localStorage.getItem('clientNeededInfo')); const storeItem = JSON.parse(localStorage.getItem('clientNeededInfo'));
const frequency = [ const frequency = [
//趸交、月交、季交、半年交、年交 //趸交、月交、季交、半年交、年交
{value:'趸交',label:'趸交'},
{value:'月交',label:'月交'}, {value:'月交',label:'月交'},
{value:'季交',label:'季交'}, {value:'季交',label:'季交'},
{value:'半年交',label:'半年交'}, {value:'半年交',label:'半年交'},
{value:'年交',label:'年交'}, {value:'年交',label:'年交'},
]; ];
if(this.state.loadingFlag){
return <div></div>
}
let disabled_P = true;
//华夏红你。华夏福。福临门不显示缴费频次
if(this.state.productCode === '411405'||this.state.productCode === '411204'||this.state.productCode === '511403'){
disabled_P = false;
}
return ( return (
<div style={{position:'relative',height:'100%',background:'white'}}> <div className={styles.box}>
<div style={{position:'relative'}}>
<DatePicker onRef = {(ref)=>{ <DatePicker onRef = {(ref)=>{
this.child = ref; this.child = ref;
}} getDate = {(date)=>{ }} getDate = {(date)=>{
this.getDate(date) this.getDate(date)
}} }} >
birthday = {this.state.birthday ? moment(this.state.birthday).format("YYYY-MM-DD"):null}
>
</DatePicker> </DatePicker>
<div className={styles.base}>
<div className={css.ac_wrap}> <div className={css.ac_wrap}>
<div id="scrollSection">
<ul className={css.aclist_wrap}> <ul className={css.aclist_wrap}>
<li className={css.require}> <li className={css.require}>
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="text" type="text"
value={this.state.name} value={this.state.name}
disabled={this.state.disabled} // disabled={this.state.disabled}
//editable={!this.state.disabled}
onBlur={::this.blur} onBlur={::this.blur}
onChange={v => { onChange={v => {
...@@ -538,7 +598,6 @@ class AddUser extends Component { ...@@ -538,7 +598,6 @@ class AddUser extends Component {
]} ]}
cols={1} cols={1}
value={[0]} value={[0]}
disabled={this.state.disabled}
onChange={ onChange={
s => { s => {
this.setState({sex:s[0]}) this.setState({sex:s[0]})
...@@ -547,7 +606,7 @@ class AddUser extends Component { ...@@ -547,7 +606,7 @@ class AddUser extends Component {
> >
<div className={css.choose}><span className={styles.black}>{this.state.sex == 0 ? '男' : '女'}</span></div> <div className={css.choose}><span className={styles.black}>{this.state.sex == 0 ? '男' : '女'}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li > <li >
<span className={css.label}>出生日期</span> <span className={css.label}>出生日期</span>
...@@ -561,25 +620,19 @@ class AddUser extends Component { ...@@ -561,25 +620,19 @@ class AddUser extends Component {
this.child.showDate1() this.child.showDate1()
} }
}}> {this.state.disabled?this.state.birthday:this.state.birthday?this.state.birthday:'请选择出生日期'}</span> }}> {this.state.disabled?this.state.birthday:this.state.birthday?this.state.birthday:'请选择出生日期'}</span>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li className={css.require}> <li className={css.require}>
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="phone" type="phone"
value={this.state.phone} value={this.state.phone}
disabled={this.state.disabled} // disabled={this.state.disabled}
onBlur={::this.blur} onBlur={::this.blur}
onChange={v => { onChange={v => {
if(!this.state.disabled){
this.setState({ this.setState({
phone: v.replace(/\s*/g, ''), phone: v.replace(/\s*/g, ''),
}) })
}
this.setState({
})
}} }}
placeholder = "请输入手机号码" placeholder = "请输入手机号码"
>手机号码</InputItem> >手机号码</InputItem>
...@@ -594,14 +647,14 @@ class AddUser extends Component { ...@@ -594,14 +647,14 @@ class AddUser extends Component {
]} ]}
cols={1} cols={1}
value={[this.state.maritalStatus]} value={[this.state.maritalStatus]}
disabled={this.state.disabled} // disabled={this.state.disabled}
onChange={ onChange={
s => this.setState({maritalStatus:s[0]}) s => this.setState({maritalStatus:s[0]})
} }
> >
<div className={css.choose}><span className={this.state.maritalStatus?styles.black:''}>{this.state.disabled?this.state.maritalStatus:this.state.maritalStatus?this.state.maritalStatus:'请选择婚姻状况'}</span></div> <div className={css.choose}><span className={this.state.maritalStatus?styles.black:''}>{this.state.disabled?this.state.maritalStatus:this.state.maritalStatus?this.state.maritalStatus:'请选择婚姻状况'}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li> <li>
<span className={css.label}>学历</span> <span className={css.label}>学历</span>
...@@ -615,7 +668,7 @@ class AddUser extends Component { ...@@ -615,7 +668,7 @@ class AddUser extends Component {
{ label: '博士', value: '博士' }, { label: '博士', value: '博士' },
{ label: '其他', value: '其他' } { label: '其他', value: '其他' }
]} ]}
disabled={this.state.disabled} // disabled={this.state.disabled}
cols={1} cols={1}
value={['本科']} value={['本科']}
onChange={ onChange={
...@@ -624,7 +677,7 @@ class AddUser extends Component { ...@@ -624,7 +677,7 @@ class AddUser extends Component {
> >
<div className={css.choose}><span className={this.state.education?styles.black:''}>{this.state.disabled?this.state.education:this.state.education!=='' ? this.state.education : '请选择学历'}</span></div> <div className={css.choose}><span className={this.state.education?styles.black:''}>{this.state.disabled?this.state.education:this.state.education!=='' ? this.state.education : '请选择学历'}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
</ul> </ul>
<ul className={css.aclist_wrap}> <ul className={css.aclist_wrap}>
...@@ -633,7 +686,7 @@ class AddUser extends Component { ...@@ -633,7 +686,7 @@ class AddUser extends Component {
<Picker <Picker
data={this.state.occupational} data={this.state.occupational}
cols={1} cols={1}
disabled={this.state.disabled} // disabled={this.state.disabled}
onChange={ onChange={
s =>{ s =>{
this.setState({occupationalSelect:s[0]}) this.setState({occupationalSelect:s[0]})
...@@ -642,14 +695,14 @@ class AddUser extends Component { ...@@ -642,14 +695,14 @@ class AddUser extends Component {
> >
<div className={css.choose}><span className={this.state.occupationalSelect?styles.black:''}>{this.state.disabled?this.state.occupationalSelect:this.state.occupationalSelect||'请选择职业类型'}</span></div> <div className={css.choose}><span className={this.state.occupationalSelect?styles.black:''}>{this.state.disabled?this.state.occupationalSelect:this.state.occupationalSelect||'请选择职业类型'}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li onClick={()=>{this.Dictionaries({configType:'yearMoney'})}}> <li onClick={()=>{this.Dictionaries({configType:'yearMoney'})}}>
<span className={css.label}>年收入(万元)</span> <span className={css.label}>年收入(万元)</span>
<Picker <Picker
data={this.state.annualIncome} data={this.state.annualIncome}
cols={1} cols={1}
disabled={this.state.disabled} // disabled={this.state.disabled}
onChange={ onChange={
s =>{ s =>{
this.setState({annualIncomeSelect:s[0]}) this.setState({annualIncomeSelect:s[0]})
...@@ -658,7 +711,7 @@ class AddUser extends Component { ...@@ -658,7 +711,7 @@ class AddUser extends Component {
> >
<div className={css.choose}><span className={this.state.annualIncomeSelect?styles.black:''}>{this.state.disabled?this.state.annualIncomeSelect:this.state.annualIncomeSelect||'请选择年收入'}</span></div> <div className={css.choose}><span className={this.state.annualIncomeSelect?styles.black:''}>{this.state.disabled?this.state.annualIncomeSelect:this.state.annualIncomeSelect||'请选择年收入'}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
</ul> </ul>
<ul className={css.aclist_wrap}> <ul className={css.aclist_wrap}>
...@@ -667,18 +720,17 @@ class AddUser extends Component { ...@@ -667,18 +720,17 @@ class AddUser extends Component {
<Picker <Picker
data={this.state.regionData} data={this.state.regionData}
cols={2} cols={2}
disabled={this.state.disabled} // disabled={this.state.disabled}
value={this.state.asyncValue} value={this.state.asyncValue}
onPickerChange={this.onRegionPickerChange.bind(this)} onPickerChange={this.onRegionPickerChange.bind(this)}
onOk={(v) => { onOk={(v) => {
// const asyncValue = [...v]; const asyncValue = [...v];
const asyncValue = [...v].length>1 ? [...v] : this.state.asyncValue;
const { reverseData } = this.state; const { reverseData } = this.state;
let label = ''; let label = '';
label = asyncValue.length > 1 ? reverseData[asyncValue[0]].label + ',' + reverseData[asyncValue[0]].children[asyncValue[1]] : reverseData[asyncValue[0]].label; label = v.length > 1 ? reverseData[v[0]].label + ',' + reverseData[v[0]].children[v[1]] : reverseData[v[0]].label;
this.setState({ this.setState({
regionVal: label, regionVal: label,
asyncValue:asyncValue asyncValue
}) })
}} }}
> >
...@@ -686,14 +738,14 @@ class AddUser extends Component { ...@@ -686,14 +738,14 @@ class AddUser extends Component {
<span className={this.state.regionVal?styles.black:''}>{this.state.disabled?this.state.regionVal:this.state.regionVal === '' ? '请选择所在省市' : this.state.regionVal}</span> <span className={this.state.regionVal?styles.black:''}>{this.state.disabled?this.state.regionVal:this.state.regionVal === '' ? '请选择所在省市' : this.state.regionVal}</span>
</div> </div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li> <li>
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="text" type="text"
value={this.state.address} value={this.state.address}
disabled={this.state.disabled} // disabled={this.state.disabled}
onBlur={::this.blur} onBlur={::this.blur}
onChange={v=>this.setState({address:v})} onChange={v=>this.setState({address:v})}
placeholder = {this.state.disabled?'':"请输入详细地址"} placeholder = {this.state.disabled?'':"请输入详细地址"}
...@@ -701,46 +753,56 @@ class AddUser extends Component { ...@@ -701,46 +753,56 @@ class AddUser extends Component {
</li> </li>
</ul> </ul>
<ul className={css.aclist_wrap}> <ul className={css.aclist_wrap}>
<li> <li onClick={()=>{
let that =this;
this.props.dispatch({
type:'home/getPlanList',
payload:{
riskName:"",
riskStatus:1, //1 启用
},
callback(data){
let ary = []
for (var i = 0; i < data.length; i++) {
ary.push({value:data[i].riskCode,label:data[i].riskName})
that.setState({
product:ary,
})
}
},
})
}}>
<span className={css.label}>希望购买的产品</span> <span className={css.label}>希望购买的产品</span>
<Picker <Picker
data={this.state.product} data={this.state.product}
cols={1} cols={1}
disabled={this.state.disabled} // disabled={this.state.disabled}
value={[this.state.productSelect]} value={[this.state.productSelect]}
onChange={ onChange={
s =>{ s =>{
let namelabel = getPlanInListWithCode('value',s[0],this.state.product).label;
this.setState({ this.setState({
productSelect: namelabel, productSelect:s[0] == '511501'?'长春藤(多倍版)':'福临门(智慧版)',
productCode: s[0], productCode:s[0],
payment:"",
}) })
} }
} }
> >
<div className={css.choose}> <div className={css.choose}>
<span className={this.state.productSelect?styles.black:''}>{this.state.disabled?this.state.productSelect : this.state.productSelect == '' ? "请选择产品": this.state.productSelect}</span> <span className={this.state.productSelect?styles.black:''}>{this.state.disabled?this.state.productSelect==''?this.state.productSelect:this.state.productSelect=='长春藤(多倍版)'?'长春藤(多倍版)' : '福临门(智慧版)':this.state.productSelect == '' ? "请选择产品": this.state.productSelect=='长春藤(多倍版)'?'长春藤(多倍版)' : '福临门(智慧版)'}</span>
</div> </div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li onClick={()=>{ <li onClick={()=>{
if(this.state.disabled){
return;
}
if(this.state.productCode){ if(this.state.productCode){
let that =this; let that =this;
let date = new Date();
let nowDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
this.props.dispatch({ this.props.dispatch({
type:'planEditor/PremiumPaymentPeriod', type:'addUser/PremiumPaymentPeriod',
payload:{ payload:{
"riskCode":this.state.productCode, "riskCode":this.state.productCode,
// "maxAge":this.state., // "maxAge":this.state.,
"birthday": this.state.productCode=='511404' ? nowDate : '1981-02-23', "birthday":'1981-02-23',
"pageNo":1, "pageNo":1
"mainCode": this.state.productCode
}, },
callback(data){ callback(data){
let paymentList = []; let paymentList = [];
...@@ -748,11 +810,13 @@ class AddUser extends Component { ...@@ -748,11 +810,13 @@ class AddUser extends Component {
paymentList.push({value:data[i].payTime,label:data[i].payTimeName,}) paymentList.push({value:data[i].payTime,label:data[i].payTimeName,})
} }
that.setState({ that.setState({
// modal13:true,
paymentList:paymentList, paymentList:paymentList,
}) })
} }
}) })
}else{ }else{
// this.setState({disabled:true})
Toast.info('请选择产品!',) Toast.info('请选择产品!',)
return false; return false;
} }
...@@ -761,23 +825,21 @@ class AddUser extends Component { ...@@ -761,23 +825,21 @@ class AddUser extends Component {
<Picker <Picker
data={this.state.paymentList} data={this.state.paymentList}
cols={1} cols={1}
//disabled={this.state.productCode==''?true:false} disabled={this.state.productCode==''?true:false}
disabled={this.state.disabled ? this.state.disabled: this.state.productCode==''?true:false}
onChange={ onChange={
s =>{ s =>{
this.setState({payment:s[0]===0?'趸交':s[0]+'年交'}) this.setState({payment:s[0]==0?'趸交':s[0]+'年交'})
} }
} }
> >
<div className={css.choose}><span className={this.state.payment !==''?styles.black:''}>{this.state.disabled?this.state.payment :this.state.payment === '' ? '请选择缴费期间':this.state.payment}</span></div> <div className={css.choose}><span className={this.state.payment !==''?styles.black:''}>{this.state.disabled?this.state.payment :this.state.payment === '' ? '请选择缴费期间':this.state.payment}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
{disabled_P &&
<li> <li>
<span className={css.label}>缴费频次</span> <span className={css.label}>缴费频次</span>
<Picker <Picker
disabled={this.state.disabled} // disabled={this.state.disabled}
data={frequency} data={frequency}
cols={1} cols={1}
onChange={ onChange={
...@@ -788,15 +850,14 @@ class AddUser extends Component { ...@@ -788,15 +850,14 @@ class AddUser extends Component {
> >
<div className={css.choose}><span className={this.state.frequency !=''?styles.black:''}>{this.state.disabled?this.state.frequency == '' ?"":this.state.frequency==0? '趸交' : this.state.frequency:this.state.frequency == '' ?'请选择缴费频次':this.state.frequency==0? '趸交' : this.state.frequency}</span></div> <div className={css.choose}><span className={this.state.frequency !=''?styles.black:''}>{this.state.disabled?this.state.frequency == '' ?"":this.state.frequency==0? '趸交' : this.state.frequency:this.state.frequency == '' ?'请选择缴费频次':this.state.frequency==0? '趸交' : this.state.frequency}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
}
<li> <li>
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="phone" type="phone"
value={this.state.insuredAmount} value={this.state.insuredAmount}
disabled={this.state.disabled} // disabled={this.state.disabled}
onBlur={::this.blur} onBlur={::this.blur}
onChange={v => { onChange={v => {
this.setState({ this.setState({
...@@ -807,7 +868,8 @@ class AddUser extends Component { ...@@ -807,7 +868,8 @@ class AddUser extends Component {
>保额</InputItem> >保额</InputItem>
</li> </li>
</ul> </ul>
<div style={{minHeight:"180px",marginBottom:"0.75rem"}}> </div>
</div>
{ {
this.state.matchs1 && <div className={styles.shareBox}> this.state.matchs1 && <div className={styles.shareBox}>
{/*<span className={styles.share}>分享</span>*/} {/*<span className={styles.share}>分享</span>*/}
...@@ -815,12 +877,12 @@ class AddUser extends Component { ...@@ -815,12 +877,12 @@ class AddUser extends Component {
<span style={{display: 'block', clear: 'both',height:'1px',marginTop:'-1px',overflow:'hidden'}}></span> <span style={{display: 'block', clear: 'both',height:'1px',marginTop:'-1px',overflow:'hidden'}}></span>
</div> </div>
} }
<div className={styles.partingLine}> <div className={styles.partingLine}>
<span className={styles.left}></span> <span className={styles.left}></span>
<span className={styles.mine}>客户标签</span> <span className={styles.mine}>客户标签</span>
<span className={styles.right}></span> <span className={styles.right}></span>
</div> </div>
{ !this.state.showLabelList && { !this.state.showLabelList &&
<div style={{paddingLeft: '.11rem'}}> <div style={{paddingLeft: '.11rem'}}>
<div style={{ overflow: 'hidden', width: '100%' }}> <div style={{ overflow: 'hidden', width: '100%' }}>
...@@ -846,7 +908,6 @@ class AddUser extends Component { ...@@ -846,7 +908,6 @@ class AddUser extends Component {
} }
</div> </div>
} }
{ {
this.state.showLabelList && <div className={styles.label}> this.state.showLabelList && <div className={styles.label}>
<ul> <ul>
...@@ -895,12 +956,6 @@ class AddUser extends Component { ...@@ -895,12 +956,6 @@ class AddUser extends Component {
} /> } />
</div> </div>
} }
</div>
</div>
</div>
<div>
{!this.state.disabled && <div className={styles.bottom}> {!this.state.disabled && <div className={styles.bottom}>
<div className={styles.right}> <div className={styles.right}>
<span className={styles.color} <span className={styles.color}
...@@ -944,19 +999,16 @@ class AddUser extends Component { ...@@ -944,19 +999,16 @@ class AddUser extends Component {
message: '督训', message: '督训',
submit: { submit: {
title: '提交', title: '提交',
content: '您是否确定将该条客户信息提交?', content: '您是否确定将该条客户信息提交至督训进行审核?',
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
} }
}) })
}}>提交</span> }}>提交至督训</span>
} }
</div> </div>
</div> </div>}
} <ConfirmPop show={this.state.visible} title={this.state.submit.title} handleOK={() => {
<ConfirmPop show={this.state.visible}
title={this.state.submit.title}
handleOK={() => {
if (this.state.message !== '督训') { if (this.state.message !== '督训') {
this.hideModalConfirm('ok'); this.hideModalConfirm('ok');
} else { } else {
...@@ -975,7 +1027,6 @@ class AddUser extends Component { ...@@ -975,7 +1027,6 @@ class AddUser extends Component {
this.state.disabled && <div style={{position:'absolute',top:0,left:0,right:0,bottom:0,opacity:0}}></div> this.state.disabled && <div style={{position:'absolute',top:0,left:0,right:0,bottom:0,opacity:0}}></div>
} }
</div> </div>
</div> </div>
) )
} }
......
...@@ -756,12 +756,11 @@ let that = this; ...@@ -756,12 +756,11 @@ let that = this;
this.props.dispatch({ this.props.dispatch({
type:'planEditor/PremiumPaymentPeriod', type:'addUser/PremiumPaymentPeriod',
payload:{ payload:{
"riskCode":this.state.riskCode, "riskCode":this.state.riskCode,
"maxAge":this.state.age, "maxAge":this.state.age,
"pageNo":1, "pageNo":1
"mainCode": this.state.riskCode
}, },
callback(){ callback(){
......
...@@ -10,14 +10,10 @@ class Cover extends Component { ...@@ -10,14 +10,10 @@ class Cover extends Component {
} }
go = ()=>{ go = ()=>{
this.props.history.push('/planResult') this.props.history.push('/planResult')
// let seriNo = localStorage.getItem("seriNo") let seriNo = localStorage.getItem("seriNo")
// let riskName = localStorage.getItem("riskName") let riskName = localStorage.getItem("riskName")
// let riskCode = localStorage.getItem("riskCode") let riskCode = localStorage.getItem("riskCode")
// let thumbnail = localStorage.getItem("thumbnail") let thumbnail = localStorage.getItem("thumbnail")
let seriNo = sessionStorage.getItem("seriNo")
let riskName = sessionStorage.getItem("riskName")
let riskCode = sessionStorage.getItem("riskCode")
let thumbnail = sessionStorage.getItem("thumbnail")
window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail
} }
......
...@@ -15,7 +15,6 @@ class DataBank extends Component { ...@@ -15,7 +15,6 @@ class DataBank extends Component {
} }
componentDidMount() { componentDidMount() {
sessionStorage.clear();
document.title = '资料库' document.title = '资料库'
const _this = this; const _this = this;
shareHide(); shareHide();
...@@ -23,7 +22,7 @@ class DataBank extends Component { ...@@ -23,7 +22,7 @@ class DataBank extends Component {
this.props.dispatch({ this.props.dispatch({
type: 'databank/getDataBankList', type: 'databank/getDataBankList',
payload: { payload: {
"configType": "prospectus", configType: 'prospectus'
}, },
callback(res) { callback(res) {
if (res.status && res.data.length > 0) { if (res.status && res.data.length > 0) {
......
...@@ -21,7 +21,6 @@ class InfoList extends Component { ...@@ -21,7 +21,6 @@ class InfoList extends Component {
const { search } = this.props.location; const { search } = this.props.location;
const _this = this; const _this = this;
let key = Number(sessionStorage.getItem('key'));
shareHide(); shareHide();
Toast.loading('loading...'); Toast.loading('loading...');
if (search) { if (search) {
...@@ -44,7 +43,7 @@ class InfoList extends Component { ...@@ -44,7 +43,7 @@ class InfoList extends Component {
type: 'databank/getDataInfoList', type: 'databank/getDataInfoList',
payload: { payload: {
productId: riskCode, productId: riskCode,
dataType: data[key].configCode, dataType: data[0].configCode,
orgId: window.localStorage.getItem('orgId'), orgId: window.localStorage.getItem('orgId'),
proId: window.localStorage.getItem('project') proId: window.localStorage.getItem('project')
}, },
...@@ -87,10 +86,6 @@ class InfoList extends Component { ...@@ -87,10 +86,6 @@ class InfoList extends Component {
render() { render() {
let chooseIdx = 0;
if(sessionStorage.getItem("key")){
chooseIdx = Number(sessionStorage.getItem("key"))
}
const { dataList } = this.state; const { dataList } = this.state;
return ( return (
<Fragment> <Fragment>
...@@ -98,12 +93,11 @@ class InfoList extends Component { ...@@ -98,12 +93,11 @@ class InfoList extends Component {
<div className={css.pTagList}> <div className={css.pTagList}>
<ul> <ul>
{ {
this.state.filter.length > 0 && this.state.filter.map((el, i) => <li key={i} className={chooseIdx === i ? 'on' : ''} onClick={() => { this.state.filter.length > 0 && this.state.filter.map((el, i) => <li key={i} className={this.state.chooseIdx === i ? 'on' : ''} onClick={() => {
this.filterData(el.configCode) this.filterData(el.configCode)
this.setState({ this.setState({
chooseIdx: i chooseIdx: i
}) })
sessionStorage.setItem( "key", i);
}}>{el.configName}</li>) }}>{el.configName}</li>)
} }
</ul> </ul>
...@@ -129,19 +123,6 @@ class InfoList extends Component { ...@@ -129,19 +123,6 @@ class InfoList extends Component {
if(/xls|xlsx/i.test(el.dataFormat)) type = 'excel'; if(/xls|xlsx/i.test(el.dataFormat)) type = 'excel';
return <li key={i} className={type} onClick={() => { return <li key={i} className={type} onClick={() => {
//记录点击数
this.props.dispatch({
type:"home/setClickRecord",
payload: {
"operCode": el.dataCode,
"operFunction": 100100,
"operTitle": el.dataName,
"operType": 201,
},
callback(data){
console.log('资料库点击一次')
}
});
if (type === 'pdf') { if (type === 'pdf') {
window.location.href = el.dataPath window.location.href = el.dataPath
} else if (/doc|docx|xls|xlsx|ppt|pptx/i.test(el.dataFormat)) { } else if (/doc|docx|xls|xlsx|ppt|pptx/i.test(el.dataFormat)) {
......
...@@ -8,13 +8,7 @@ class Preview extends Component { ...@@ -8,13 +8,7 @@ class Preview extends Component {
super() super()
this.state={ } this.state={ }
} }
componentDidMount(){
if(this.videoElement){//解决ios自动全屏问题
this.videoElement.setAttribute('webkit-playsinline', 'true');// Fix fullscreen problem on IOS 8 and 9
this.videoElement.setAttribute('playsinline', 'true'); // Fix fullscreen problem on IOS 10
this.videoElement.setAttribute('x5-playsinline', 'true'); // Fix fullscreen problem on IOS 10
}
}
render() { render() {
const { state } = this.props.location; const { state } = this.props.location;
let fileType = ''; let fileType = '';
...@@ -34,9 +28,7 @@ class Preview extends Component { ...@@ -34,9 +28,7 @@ class Preview extends Component {
// </iframe> // </iframe>
} }
{ {
(fileType==='mp4') && ( (fileType==='mp4') && <video width="100%" autoPlay src={state.url}></video>
<video width="100%" style={{background:'black'}} ref={(node) =>{this.videoElement = node}} src={state.url} controls ></video>
)
} }
</div> </div>
) )
......
...@@ -7,7 +7,6 @@ import { dataFilter } from '../../utils/dataFilter'; ...@@ -7,7 +7,6 @@ import { dataFilter } from '../../utils/dataFilter';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import css from './css.less'; import css from './css.less';
const stateName = ['未提交','已提交','已提交','已提交','已成单','已上传','跟进中','停止跟进']
class Audit extends Component{ class Audit extends Component{
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -24,11 +23,9 @@ class Audit extends Component{ ...@@ -24,11 +23,9 @@ class Audit extends Component{
} }
componentDidMount() { componentDidMount() {
document.title = '我的客户';
shareHide(); shareHide();
// Toast.loading('loading...', 88); Toast.loading('loading...', 88);
this.getClientUnpassList(); this.getClientUnpassList();
// this.getClientPassedList();
} }
getClientPassedList() { getClientPassedList() {
...@@ -60,7 +57,7 @@ class Audit extends Component{ ...@@ -60,7 +57,7 @@ class Audit extends Component{
type: 'governortraining/getClientList', type: 'governortraining/getClientList',
payload: { payload: {
id: window.localStorage.getItem("id"), id: window.localStorage.getItem("id"),
// auditedState: 0 auditedState: 0
}, },
callback(res) { callback(res) {
if (res.status) { if (res.status) {
...@@ -78,32 +75,36 @@ class Audit extends Component{ ...@@ -78,32 +75,36 @@ class Audit extends Component{
chooseClient(pass, item) { chooseClient(pass, item) {
localStorage.setItem('auditClientInfo', JSON.stringify({ ...item, isShowPassedInfo: pass })); localStorage.setItem('auditClientInfo', JSON.stringify({ ...item, isShowPassedInfo: pass }));
// this.props.dispatch(routerRedux.push({ this.props.dispatch(routerRedux.push({
// pathname: '/governortraining/auditinfo' pathname: '/governortraining/auditinfo'
// })); }));
this.props.history.push({pathname: '/governortraining/auditinfo'})
} }
render() { render() {
return <div className={css.auditWrap}> return <div className={css.auditWrap}>
<Tabs
tabs={[{ title: '未审核', sub: '1' }, { title: '已审核', sub: '2' }]}
// page={1}
onChange={(t, i) => {
if (i === 0 && this.state.clientList.length === 0) { this.getClientUnpassList(); } else if (this.state.cientListed.length === 0){
this.getClientPassedList();
}
}}
>
<div> <div>
{ {
this.state.clientList.length === 0 && this.state.show1 && ( this.state.clientList.length === 0 && this.state.show1 && < div >
<div>
<div className={css.splitline}></div> <div className={css.splitline}></div>
<div className={css.noData}> <div className={css.noData}>
<div className={css.img}></div> <div className={css.img}></div>
当前无数据 您当前客户均已审核完毕
</div> </div>
</div> </div>
)
} }
{ this.state.clientList.length>0 && this.state.show1 && <MemberList { this.state.clientList.length>0 && this.state.show1 && <MemberList
id="audit"
height='86vh'
dataList={this.state.storeclientList} dataList={this.state.storeclientList}
renderType={['name']} renderType={['name']}
filterData={(keywords) => { filterData={(keywords) => {
...@@ -114,14 +115,64 @@ class Audit extends Component{ ...@@ -114,14 +115,64 @@ class Audit extends Component{
}} }}
renderItem={item => { renderItem={item => {
return <div className={css.clientItem}> return <div className={css.clientItem}>
<span className={css.name}>{item.name}</span> <span className={css.name}>{item.name}</span><span className={css.time}>{item.createTime.substr(0,16)}</span>
<span className={css.time}>{item.commitTime ? item.commitTime.substr(0,16) : ""}</span>
<span className={css.status}>{stateName[item.currentState]}</span>
</div> </div>
}} }}
chooseClient={this.chooseClient.bind(this,false)} chooseClient={this.chooseClient.bind(this,false)}
pTitle='客户' />} pTitle='未审核客户' />}
</div>
<div>
{
this.state.cientListed.length === 0 && this.state.show && < div >
<div className={css.splitline}></div>
<div className={css.noData}>
<div className={css.img}></div>
您当前没有已审核客户
</div>
</div>
}
{this.state.cientListed.length>0 && this.state.show && <MemberList
dataList={this.state.storecientListed}
renderType={['name']}
chooseClient={this.chooseClient.bind(this,true)}
filterData={(keywords) => {
this.setState({
storecientListed: dataFilter(this.state.cientListed, ['name'], keywords)
})
}}
renderItem={item => {
let status = '';
switch (item.currentState) {
case '2':
status = '审核退回';
break;
case '3':
status = '审核通过';
break;
case '4':
status = '已成单';
break;
case '5':
status = '已上传';
break;
case '6':
status = '跟进中';
break;
case '7':
status = '停止跟进';
break;
default:
}
return <div className={css.clientItem}>
<span className={css.name}>{item.name}</span>
<span className={css.time}>{item.createTime.substr(0, 16)}</span>
<span className={css.status}>{status}</span>
</div>
}}
pTitle='已审核客户' />}
</div> </div>
</Tabs>
</div> </div>
} }
} }
......
...@@ -4,14 +4,13 @@ import { Toast, InputItem, Picker } from 'antd-mobile'; ...@@ -4,14 +4,13 @@ import { Toast, InputItem, Picker } from 'antd-mobile';
import ConfirmPop from '../../components/Modal/confirmPop'; import ConfirmPop from '../../components/Modal/confirmPop';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import css from './css.less'; import css from './css.less';
import {getPlanInListWithCode} from '../../utils/dataFilter'
class AddClient extends Component { class AddClient extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
id:'', id:'',
age: null, age: -1,
sex: [0], sex: [0],
idcard: '', idcard: '',
maritalStatus: '未婚', maritalStatus: '未婚',
...@@ -35,8 +34,7 @@ class AddClient extends Component { ...@@ -35,8 +34,7 @@ class AddClient extends Component {
netReverseList: [], netReverseList: [],
netVal: '', netVal: '',
isShowTips: false, isShowTips: false,
dataTypes: [false,false,false,false,false,false], dataTypes: [false,false,false,false,false,false]
disabled:false,
} }
this.onRegionPickerChange = this.onRegionPickerChange.bind(this); this.onRegionPickerChange = this.onRegionPickerChange.bind(this);
...@@ -55,16 +53,14 @@ class AddClient extends Component { ...@@ -55,16 +53,14 @@ class AddClient extends Component {
} }
componentDidMount() { componentDidMount() {
document.title = '客户经理信息';
const _this = this; const _this = this;
shareHide(); shareHide();
let clientInfo = JSON.parse(window.localStorage.getItem('governortrainingClient')); let clientInfo = JSON.parse(window.localStorage.getItem('governortrainingClient'));
let userInfo = JSON.parse(window.localStorage.getItem('userInfo'));
// 省市级联初始化 // 省市级联初始化
this.props.dispatch({ this.props.dispatch({
type: "governortraining/getRegionList", type: "governortraining/getRegionList",
payload: { payload: {
configType: 'newprovinces', configType: 'provinces',
oyhers: 0 oyhers: 0
}, },
callback: (res) => { callback: (res) => {
...@@ -83,10 +79,8 @@ class AddClient extends Component { ...@@ -83,10 +79,8 @@ class AddClient extends Component {
if (clientInfo) { if (clientInfo) {
const namearr = clientInfo.province.split(','); const namearr = clientInfo.province.split(',');
if (namearr.length) { if (namearr.length) {
let havedata = false;
arr.forEach((element, i) => { arr.forEach((element, i) => {
if (element.label===namearr[0]) { if (element.label===namearr[0]) {
havedata = true;//匹配到了有数据
_this.fillSecData(element.value, i, (list) => { _this.fillSecData(element.value, i, (list) => {
if (namearr[1]) { if (namearr[1]) {
list && list.forEach(el => { list && list.forEach(el => {
...@@ -108,9 +102,6 @@ class AddClient extends Component { ...@@ -108,9 +102,6 @@ class AddClient extends Component {
}) })
} }
}); });
if(!havedata){//没有匹配到
_this.fillSecData(data[0].configCode, 0)
}
} }
} else { } else {
...@@ -122,60 +113,35 @@ class AddClient extends Component { ...@@ -122,60 +113,35 @@ class AddClient extends Component {
} }
}); });
if (clientInfo) { if (clientInfo) {
this.setState({
id: clientInfo.id,
dataTypes:[true,true,true,true,true,true],
name: clientInfo.name,
number: clientInfo.number,
age: clientInfo.age,
sex: [clientInfo.sex],
idcard: clientInfo.idcard,
maritalStatus: clientInfo.maritalStatus,
education: clientInfo.education,
address: clientInfo.address
})
if(clientInfo.disabled2){
_this.setState({
disabled:true,
})
}
}
_this.getOrzList(0, (list) => { _this.getOrzList(0, (list) => {
const arr = _this.genArr(list); const arr = _this.genArr(list);
const reverseList = _this.reverseData(arr); const reverseList = _this.reverseData(arr);
_this.setState({ _this.setState({
orgList: arr, orgList: arr,
asyncOrz: [userInfo.orgId], asyncOrz: [clientInfo.orgId],
orgVal: reverseList[userInfo.orgId].label, orgVal: reverseList[clientInfo.orgId].label,
orgReverseList: reverseList orgReverseList: reverseList
}, () => { }, () => {
_this.getOrzList(userInfo.orgId, (list) => { _this.getOrzList(clientInfo.orgId, (list) => {
const projarr = _this.genArr(list); const projarr = _this.genArr(list);
const projreverseList = _this.reverseData(projarr); const projreverseList = _this.reverseData(projarr);
_this.setState({ _this.setState({
projList: projarr, projList: projarr,
projReverseList: projreverseList, projReverseList: projreverseList,
}, () => { }, () => {
_this.getOrzList(userInfo.project, (list) => { _this.getOrzList(clientInfo.project, (list) => {
const netarr = _this.genArr(list); const netarr = _this.genArr(list);
let netarr_2 = []; const netreverseList = _this.reverseData(netarr);
let websitelist = userInfo.website ? userInfo.website.split(','):[];//该督训所属的网点
for(let i in websitelist){
netarr_2.push(getPlanInListWithCode('value',websitelist[i],netarr))
}
const netreverseList = _this.reverseData(netarr_2);
_this.setState({ _this.setState({
netList: netarr_2, netList: netarr,
netReverseList: netreverseList, netReverseList: netreverseList,
asyncProj: [userInfo.project], asyncProj: [clientInfo.project],
projVal: projreverseList[userInfo.project].label projVal: projreverseList[clientInfo.project].label
}, () => { }, () => {
if(clientInfo){
_this.setState({ _this.setState({
asyncNet: [clientInfo.website], asyncNet: [clientInfo.website],
netVal: netreverseList[clientInfo.website] ? netreverseList[clientInfo.website].label : '', netVal: netreverseList[clientInfo.website].label,
}) })
}
}) })
}); });
}) })
...@@ -183,6 +149,35 @@ class AddClient extends Component { ...@@ -183,6 +149,35 @@ class AddClient extends Component {
}) })
}); });
this.setState({
id: clientInfo.id,
dataTypes:[true,true,true,true,true,true],
name: clientInfo.name,
number: clientInfo.number,
age: clientInfo.age,
sex: [clientInfo.sex],
idcard: clientInfo.idcard,
maritalStatus: clientInfo.maritalStatus,
education: clientInfo.education,
address: clientInfo.address
})
} else {
this.getOrzList(0, (list) => {
const data = [...list];
let arr = [];
for (let i = 0, l = data.length; i < l; i++) {
arr.push({
label: data[i].orgName,
value: data[i].orgId
})
}
const reverseList = this.reverseData(arr);
this.setState({
orgList: arr,
orgReverseList: reverseList
})
});
}
} }
setAgeRange() { setAgeRange() {
...@@ -214,7 +209,7 @@ class AddClient extends Component { ...@@ -214,7 +209,7 @@ class AddClient extends Component {
this.props.dispatch({ this.props.dispatch({
type: "governortraining/getRegionList", type: "governortraining/getRegionList",
payload: { payload: {
configType: 'newprovinces', configType: 'provinces',
oyhers: v oyhers: v
}, },
callback(res) { callback(res) {
...@@ -231,16 +226,9 @@ class AddClient extends Component { ...@@ -231,16 +226,9 @@ class AddClient extends Component {
regionData regionData
}, () => { }, () => {
const list = _this.reverseData(_this.state.regionData); const list = _this.reverseData(_this.state.regionData);
let asyncValue = _this.state.asyncValue;
if(asyncValue.length==1){
asyncValue[1] = arr[0].value;
}
console.log(_this.state.regionVal,_this.state.asyncValue,list,list[_this.state.asyncValue[0]])
_this.setState({
reverseData: list,
asyncValue: asyncValue
},function(){
cb && cb(data); cb && cb(data);
_this.setState({
reverseData: list
}) })
}) })
} }
...@@ -308,34 +296,33 @@ class AddClient extends Component { ...@@ -308,34 +296,33 @@ class AddClient extends Component {
}) })
_this.props.history.replace('/governortraining/gtclientlist'); _this.props.history.replace('/governortraining/gtclientlist');
} else { } else {
Toast.info(res.message,); alert(res.message)
} }
},
error:(message)=>{
Toast.info(message,);
} }
}) })
this.setState({ this.setState({
isShowTips: false isShowTips: false
}) })
} }
blur =()=>{
let timer = setTimeout(function(){ blur = () => {
if(document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA'){ let timer = setTimeout(function () {
if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
return return
} }
let result = 'pc'; let result = 'pc';
if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //判断iPhone|iPad|iPod|iOS if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //判断iPhone|iPad|iPod|iOS
result = 'ios' result = 'ios'
}else if(/(Android)/i.test(navigator.userAgent)) { //判断Android } else if (/(Android)/i.test(navigator.userAgent)) { //判断Android
result = 'android' result = 'android'
} }
if( result = 'ios' ){ if (result = 'ios') {
document.querySelector('body').scrollIntoView(); document.querySelector('body').scrollIntoView();
} }
clearTimeout(timer) clearTimeout(timer)
},10) }, 10)
} }
render() { render() {
let clientInfo = JSON.parse(window.localStorage.getItem('governortrainingClient')); let clientInfo = JSON.parse(window.localStorage.getItem('governortrainingClient'));
return ( return (
...@@ -346,9 +333,8 @@ class AddClient extends Component { ...@@ -346,9 +333,8 @@ class AddClient extends Component {
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="text" type="text"
disabled={this.state.disabled}
value={this.state.name} value={this.state.name}
onBlur={::this.blur} onBlur={this.blur.bind(this)}
onChange={v => { onChange={v => {
let { dataTypes } = this.state; let { dataTypes } = this.state;
dataTypes[0] = (v.trim() !== ''); dataTypes[0] = (v.trim() !== '');
...@@ -357,17 +343,16 @@ class AddClient extends Component { ...@@ -357,17 +343,16 @@ class AddClient extends Component {
dataTypes dataTypes
}) })
}} }}
placeholder = {this.state.disabled ? "" : "请输入客户经理姓名"} placeholder = "请输入客户经理姓名"
>姓名</InputItem> >姓名</InputItem>
</li> </li>
<li className={css.require}> <li>
<span className={css.label}>性别</span> <span className={css.label}>性别</span>
<Picker <Picker
data={[ data={[
{ label: '男', value: 0 }, { label: '男', value: 0 },
{ label: '女', value: 1 } { label: '女', value: 1 }
]} ]}
disabled={this.state.disabled}
cols={1} cols={1}
onChange={ onChange={
s => this.setState({sex:s}) s => this.setState({sex:s})
...@@ -375,29 +360,27 @@ class AddClient extends Component { ...@@ -375,29 +360,27 @@ class AddClient extends Component {
> >
<div className={css.choose} style={{color:'#101010'}}><span>{parseInt(this.state.sex[0])===0 ? '男' : '女'}</span></div> <div className={css.choose} style={{color:'#101010'}}><span>{parseInt(this.state.sex[0])===0 ? '男' : '女'}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li className={css.require}> <li>
<span className={css.label}>年龄</span> <span className={css.label}>年龄</span>
<Picker <Picker
data={this.setAgeRange()} data={this.setAgeRange()}
cols={1} cols={1}
disabled={this.state.disabled}
value={[30]} value={[30]}
onChange={s => { onChange={s => {
this.setState({ age: s[0] }) this.setState({ age: s[0] })
}} }}
> >
<div className={css.choose}><span style={{color: (this.state.age !== null && this.state.age !== "")?'#101010':'#999'}}>{this.state.disabled ? this.state.age : (this.state.age == null || this.state.age == "") ? '请选择年龄': this.state.age +'岁' }</span></div> <div className={css.choose}><span style={{color: this.state.age>=0?'#101010':'#999'}}>{ this.state.age < 0 ? '请选择年龄': this.state.age +'岁' }</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li className={css.require}> <li className={css.require}>
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="text" type="text"
disabled={this.state.disabled} onBlur={this.blur.bind(this)}
onBlur={::this.blur}
value={this.state.idcard} value={this.state.idcard}
onChange={v => { onChange={v => {
const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
...@@ -408,16 +391,15 @@ class AddClient extends Component { ...@@ -408,16 +391,15 @@ class AddClient extends Component {
dataTypes dataTypes
}) })
}} }}
placeholder = {this.state.disabled ? "" : "请输入身份证号码"} placeholder = "请输入身份证号码"
>身份证号码</InputItem> >身份证号码</InputItem>
</li> </li>
<li className={css.require}> <li className={css.require}>
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="phone" type="phone"
disabled={this.state.disabled} onBlur={this.blur.bind(this)}
value={this.state.number} value={this.state.number}
onBlur={::this.blur}
onChange={v => { onChange={v => {
let { dataTypes } = this.state; let { dataTypes } = this.state;
dataTypes[2] = v.replace(/\s/g, '').length > 10 dataTypes[2] = v.replace(/\s/g, '').length > 10
...@@ -426,7 +408,7 @@ class AddClient extends Component { ...@@ -426,7 +408,7 @@ class AddClient extends Component {
dataTypes dataTypes
}) })
}} }}
placeholder = {this.state.disabled ? "" : "请输入手机号码"} placeholder = "请输入手机号码"
>手机号码</InputItem> >手机号码</InputItem>
</li> </li>
<li> <li>
...@@ -438,16 +420,14 @@ class AddClient extends Component { ...@@ -438,16 +420,14 @@ class AddClient extends Component {
{ label: '离异', value: '离异' } { label: '离异', value: '离异' }
]} ]}
cols={1} cols={1}
disabled={this.state.disabled} onChange={
value={this.state.maritalStatus ? [this.state.maritalStatus]:['未婚']}
onOk={
s => this.setState({maritalStatus:s[0]}) s => this.setState({maritalStatus:s[0]})
} }
> >
<div className={css.choose} style={{color:this.state.maritalStatus!==''? '#101010':'#999'}}><span>{this.state.disabled ? this.state.maritalStatus : (this.state.maritalStatus ? this.state.maritalStatus : "请选择婚姻状况")}</span></div> <div className={css.choose} style={{color:'#101010'}}><span>{this.state.maritalStatus}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li> <li>
<span className={css.label}>学历</span> <span className={css.label}>学历</span>
...@@ -462,27 +442,89 @@ class AddClient extends Component { ...@@ -462,27 +442,89 @@ class AddClient extends Component {
{ label: '其他', value: '其他' } { label: '其他', value: '其他' }
]} ]}
cols={1} cols={1}
disabled={this.state.disabled} value={['本科']}
value={this.state.education ? [this.state.education]:['本科']} onChange={
onOk={
s => this.setState({education:s[0]}) s => this.setState({education:s[0]})
} }
> >
<div className={css.choose} style={{color:this.state.education!==''? '#101010':'#999'}}><span>{this.state.disabled ? this.state.education : (this.state.education ? this.state.education : "请选择学历")}</span></div> <div className={css.choose} style={{color:'#101010'}}><span>{this.state.education}</span></div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
</ul> </ul>
<ul className={css.aclist_wrap}> <ul className={css.aclist_wrap}>
<li className={css.require}> <li className={css.require}>
<span className={css.label}>所属机构</span> <span className={css.label}>所属机构</span>
<div className={css.choose}><span style={{color:'#101010'}}>{this.state.orgVal}</span></div> <Picker
{/*</Picker>*/} data={this.state.orgList}
cols={1}
value={this.state.asyncOrz}
onOk={v => {
const asyncOrz = [...v];
this.setState({
asyncOrz,
orgVal: this.state.orgReverseList[v[0]].label
});
this.getOrzList(v[0], (list) => {
const data = [...list];
let arr = [];
for (let i = 0, l = data.length; i < l; i++) {
arr.push({
label: data[i].orgName,
value: data[i].orgId
})
}
const reverseList = this.reverseData(arr);
this.setState({
projList: arr,
projReverseList: reverseList,
asyncProj: [],
projVal: '',
asyncNet: [],
netVal: ''
})
});
}}
>
<div className={css.choose}><span style={{color:this.state.orgVal!==''? '#101010':'#999'}}>{this.state.orgVal!=='' ? this.state.orgVal : '请选择所属机构'}</span></div>
</Picker>
<div className={css.icon_arrow}></div>
</li> </li>
<li className={css.require}> <li className={css.require}>
<span className={css.label}>合作项目</span> <span className={css.label}>合作项目</span>
<div className={css.choose}><span style={{color:'#101010'}}>{this.state.projVal}</span></div> <Picker
{/*</Picker>*/} data={this.state.projList}
value={this.state.asyncProj}
cols={1}
onOk={(v) => {
const asyncProj = [...v];
this.setState({
asyncProj,
projVal: this.state.projReverseList[v[0]].label
});
this.getOrzList(v[0], (list) => {
const data = [...list];
let arr = [];
for (let i = 0, l = data.length; i < l; i++) {
arr.push({
label: data[i].orgName,
value: data[i].orgId
})
}
const reverseList = this.reverseData(arr);
this.setState({
netList: arr,
netReverseList: reverseList,
asyncNet: [],
netVal: ''
})
});
}}
>
<div className={css.choose}><span style={{color:this.state.projVal!==''? '#101010':'#999'}}>{this.state.projVal!=='' ? this.state.projVal : '请选择合作项目'}</span></div>
</Picker>
<div className={css.icon_arrow}></div>
</li> </li>
<li className={css.require}> <li className={css.require}>
<span className={css.label}>所属网点</span> <span className={css.label}>所属网点</span>
...@@ -490,7 +532,6 @@ class AddClient extends Component { ...@@ -490,7 +532,6 @@ class AddClient extends Component {
data={this.state.netList} data={this.state.netList}
value={this.state.asyncNet} value={this.state.asyncNet}
cols={1} cols={1}
disabled={this.state.disabled}
onOk={v=>{ onOk={v=>{
const asyncNet = [...v]; const asyncNet = [...v];
this.setState({ this.setState({
...@@ -499,11 +540,9 @@ class AddClient extends Component { ...@@ -499,11 +540,9 @@ class AddClient extends Component {
}); });
}} }}
> >
<div className={css.choose}><span style={{color:this.state.netVal!==''? '#101010':'#999'}}> <div className={css.choose}><span style={{color:this.state.netVal!==''? '#101010':'#999'}}>{this.state.netVal!=='' ? this.state.netVal : '请选择所属网点'}</span></div>
{this.state.disabled ? this.state.netVal : (this.state.netVal!=='' ? this.state.netVal : '请选择所属网点')}</span>
</div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
</ul> </ul>
<ul className={css.aclist_wrap}> <ul className={css.aclist_wrap}>
...@@ -512,47 +551,39 @@ class AddClient extends Component { ...@@ -512,47 +551,39 @@ class AddClient extends Component {
<Picker <Picker
data={this.state.regionData} data={this.state.regionData}
cols={2} cols={2}
disabled={this.state.disabled}
value={this.state.asyncValue} value={this.state.asyncValue}
onPickerChange={this.onRegionPickerChange} onPickerChange={this.onRegionPickerChange}
onOk={(v) => { onOk={(v) => {
// const asyncValue = [...v]; const asyncValue = [...v];
const asyncValue = [...v].length>1 ? [...v] : this.state.asyncValue;
const { reverseData } = this.state; const { reverseData } = this.state;
let label = ''; let label = '';
label = asyncValue.length > 1 ? reverseData[asyncValue[0]].label + ',' + reverseData[asyncValue[0]].children[asyncValue[1]] : reverseData[asyncValue[0]].label; label = v.length > 1 ? reverseData[v[0]].label + ',' + reverseData[v[0]].children[v[1]] : reverseData[v[0]].label;
this.setState({ this.setState({
regionVal: label, regionVal: label,
asyncValue:asyncValue asyncValue
}) })
}} }}
> >
<div className={css.choose} style={{color:this.state.regionVal!==''? '#101010':'#999'}}> <div className={css.choose} style={{color:this.state.regionVal!==''? '#101010':'#999'}}>
{this.state.disabled ? this.state.regionVal : (this.state.regionVal === '' ? '请选择所在省市' : this.state.regionVal)} {this.state.regionVal === '' ? '请选择所在省市' : this.state.regionVal}
</div> </div>
</Picker> </Picker>
{!this.state.disabled && <div className={css.icon_arrow}></div>} <div className={css.icon_arrow}></div>
</li> </li>
<li> <li>
<InputItem <InputItem
className={css.e_phoneNum} className={css.e_phoneNum}
type="text" type="text"
disabled={this.state.disabled} onBlur={this.blur.bind(this)}
value={this.state.address} value={this.state.address}
onBlur={::this.blur}
onChange={v=>this.setState({address:v})} onChange={v=>this.setState({address:v})}
placeholder = {this.state.disabled ? "" : "请输入详细地址"} placeholder = "请输入详细地址"
>详细地址</InputItem> >详细地址</InputItem>
</li> </li>
</ul> </ul>
<div style={{height:'.7rem'}}></div> <div style={{height:'.7rem'}}></div>
<div className={css.ac_confirm}> <div className={css.ac_confirm}>
<span className={css.confirm} onClick={()=>{ <span className={css.confirm} onClick={()=>{
if(this.state.disabled){
this.props.history.go(-1);
return;
}
let { dataTypes } = this.state; let { dataTypes } = this.state;
dataTypes[3] = this.state.asyncOrz.length>0; dataTypes[3] = this.state.asyncOrz.length>0;
dataTypes[4] = this.state.asyncProj.length>0; dataTypes[4] = this.state.asyncProj.length>0;
......
...@@ -3,21 +3,14 @@ import { connect } from 'dva'; ...@@ -3,21 +3,14 @@ import { connect } from 'dva';
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import ConfirmPop from '../../components/Modal/confirmPop'; import ConfirmPop from '../../components/Modal/confirmPop';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import css from './css.less'; import css from './css.less';
let isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let moneyKeyboardWrapProps = '';
if (isIPhone) {
moneyKeyboardWrapProps = {
onTouchStart: e => e.preventDefault(),
};
}
const stateName = ['未提交','已提交','已提交','已提交','已成单','已上传','跟进中','停止跟进']
class ClientInfo extends Component { class ClientInfo extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
dataList: null, dataList: [],
isShowTips: false, isShowTips: false,
tit: '', tit: '',
isPass: false, isPass: false,
...@@ -26,13 +19,14 @@ class ClientInfo extends Component { ...@@ -26,13 +19,14 @@ class ClientInfo extends Component {
} }
componentDidMount() { componentDidMount() {
document.title = '客户信息';
const auditInfo = JSON.parse(localStorage.getItem('auditClientInfo')); const auditInfo = JSON.parse(localStorage.getItem('auditClientInfo'));
shareHide(); shareHide();
if (auditInfo) { if (auditInfo) {
this.setState({ this.setState({
dataList: auditInfo dataList: auditInfo
}) })
} else {
// this.props.dispatch(routerRedux.push('/governortraining/audit'));
} }
} }
handlePass(item) { handlePass(item) {
...@@ -68,11 +62,13 @@ class ClientInfo extends Component { ...@@ -68,11 +62,13 @@ class ClientInfo extends Component {
render(){ render(){
let labels = []; let labels = [];
const { dataList } = this.state; const { dataList } = this.state;
if(!dataList){ if (dataList.label && dataList.label !== '') {
return <div/> labels = dataList.label.split(',');
} }
return ( return (
<div className={css.clientInfoBox}> <div className={css.clientInfoBox}>
{
dataList && <div>
<ul className={css.itemBox}> <ul className={css.itemBox}>
<li> <li>
<span className={css.label}>姓名</span> <span className={css.label}>姓名</span>
...@@ -85,18 +81,103 @@ class ClientInfo extends Component { ...@@ -85,18 +81,103 @@ class ClientInfo extends Component {
}</span> }</span>
</li> </li>
<li> <li>
<span className={css.label}>提交时间</span> <span className={css.label}>年龄</span>
<span className={css.value}>{dataList.commitTime ? dataList.commitTime.substr(0,16) : ""}</span> <span className={css.value}>{dataList.age}</span>
</li>
<li>
<span className={css.label}>手机号码</span>
<span className={css.value}>{dataList.number}</span>
</li>
<li>
<span className={css.label}>婚姻状况</span>
<span className={css.value}>{dataList.maritalStatus}</span>
</li>
<li>
<span className={css.label}>学历</span>
<span className={css.value}>{dataList.education}</span>
</li>
</ul>
<ul className={css.itemBox}>
<li>
<span className={css.label}>职业类型</span>
<span className={css.value}>{dataList.occupational}</span>
</li>
<li>
<span className={css.label}>年收入(万元)</span>
<span className={css.value}>{dataList.annualIncome}</span>
</li>
</ul>
<ul className={css.itemBox}>
<li>
<span className={css.label}>所在省市</span>
<span className={css.value}>{dataList.province}</span>
</li>
<li>
<span className={css.label}>详细地址</span>
<span className={css.value}>{dataList.address}</span>
</li> </li>
</ul>
<ul className={css.itemBox}>
<li> <li>
<span className={css.label}>跟进情况</span> <span className={css.label}>希望购买产品</span>
<span className={css.value}>{stateName[dataList.currentState]}</span> <span className={css.value}>{dataList.product}</span>
</li> </li>
<li> <li>
<span className={css.label}>所属客户经理</span> <span className={css.label}>缴费期间</span>
<span className={css.value}>{dataList.managerName}</span> <span className={css.value}>{dataList.payment}</span>
</li>
<li>
<span className={css.label}>缴费频次</span>
<span className={css.value}>{dataList.frequency}</span>
</li>
<li>
<span className={css.label}>保额</span>
<span className={css.value}>{dataList.insuredAmount}</span>
</li> </li>
</ul> </ul>
{labels.length>0 && <div className={css.clientLabels}>
<div className={css.tit}><span>客户标签</span></div>
<p className={css.labels}>
{labels.map((el, i) => <span key={i}>{el}</span>)}
</p>
</div>}
</div>
}
{!dataList.isShowPassedInfo && <div className={css.footer}>
<div className={css.btn_reject} onClick={() => {
this.setState({
tit: '您是否确定驳回该客户信息?',
isShowTips: true,
isPass: false,
confirmTit:'驳回'
});
}}>驳回</div>
<div className={css.btn_passed} onClick={() => {
this.setState({
tit: '您是否确定通过该客户信息?',
isShowTips: true,
isPass: true,
confirmTit:'通过'
})
}}>通过</div>
</div>}
{dataList.isShowPassedInfo && <div className={css.footer}>
<div className={css.btn_passed} onClick={() => {
this.props.history.replace('/governortraining/audit');
}}>确定</div>
</div>}
<ConfirmPop show={this.state.isShowTips} title={this.state.confirmTit} handleOK={() => {
this.state.isPass ? this.handlePass(dataList) : this.handleReject(dataList);
this.setState({
isShowTips: false
})
}} handleCancel={() => {
this.setState({
isShowTips: false
})
}} >
<p>{this.state.tit}</p>
</ConfirmPop>
</div> </div>
) )
} }
......
...@@ -69,14 +69,10 @@ class ClientList extends Component { ...@@ -69,14 +69,10 @@ class ClientList extends Component {
} }
componentDidMount() { componentDidMount() {
document.title = '我的客户经理';
shareHide(); shareHide();
Toast.loading('loading...', 99); Toast.loading('loading...', 99);
this.getManagerList(); this.getManagerList();
} }
componentWillUnmount(){
ActionSheet.close();
}
render() { render() {
const _this = this; const _this = this;
return ( return (
...@@ -87,27 +83,22 @@ class ClientList extends Component { ...@@ -87,27 +83,22 @@ class ClientList extends Component {
您当前并无客户经理 您当前并无客户经理
</p> </p>
<p>点击下方按钮添加</p> <p>点击下方按钮添加</p>
<img src={require('../../assets/image/addUsers2.png')} alt="" className={css.add} onClick={() => { <img src={require('../../assets/image/addUsers.png')} alt="" className={css.add} onClick={() => {
this.showActionSheet() this.showActionSheet()
}} /> }} />
</div>} </div>}
{ {
(this.state.managerList.length > 0) && this.state.show && < MemberList (this.state.managerList.length > 0) && this.state.show && < MemberList
height="74vh" dataList={this.state.managerList}
dataList={this.state.storeManagerList}
renderType={['name']} renderType={['name']}
filterData={(keywords) => { filterData={(keywords) => {
this.setState({ this.setState({
storeManagerList: dataFilter(this.state.managerList, ['name'], keywords) managerList: dataFilter(this.state.storeManagerList, ['name'], keywords)
}) })
}} }}
renderItem={item => { renderItem={item => {
return <div className={css.managerItem} onClick={()=>{ return <div className={css.managerItem}>
let governortrainingClient = {...item ,disabled2:true};
localStorage.setItem('governortrainingClient', JSON.stringify(governortrainingClient));
this.props.dispatch(routerRedux.push('/governortraining/addclient'));
}}>
<span className={css.name}>{item.name}</span><span className={css.time}>{item.number}</span> <span className={css.name}>{item.name}</span><span className={css.time}>{item.number}</span>
</div> </div>
}} }}
......
...@@ -14,14 +14,11 @@ span { ...@@ -14,14 +14,11 @@ span {
.clientless { .clientless {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
.add{ .add {
position: absolute;
bottom: 1rem;
width: 3.5rem; width: 3.5rem;
//height: .7rem; height: 1.22rem;
margin: 0 .32rem 0; margin: 1.8rem .32rem;
} }
} }
.splitline { .splitline {
width: 100%; width: 100%;
...@@ -44,12 +41,10 @@ span { ...@@ -44,12 +41,10 @@ span {
.ac_wrap { .ac_wrap {
position: relative;
height: 100%; height: 100%;
background: #F8F8F8; background: #F8F8F8;
padding-top: .1rem; padding-top: .1rem;
overflow-y: auto; overflow-y: auto;
z-index:1;
.aclist_wrap { .aclist_wrap {
background: white; margin-bottom: .1rem; padding-left: .11rem; background: white; margin-bottom: .1rem; padding-left: .11rem;
span{ margin-right: 0;} span{ margin-right: 0;}
...@@ -162,13 +157,7 @@ span { ...@@ -162,13 +157,7 @@ span {
} }
} }
.clientInfoBox { .clientInfoBox {
position: fixed; padding-bottom:.8rem; overflow-y: auto; height: 100%;
width: 100%;
height:100%;
overflow: hidden;
background: #fff;
left:0;
top:0;
.itemBox{ .itemBox{
margin-top:.1rem; background:#fff; margin-top:.1rem; background:#fff;
li{ li{
...@@ -178,7 +167,7 @@ span { ...@@ -178,7 +167,7 @@ span {
width:1.23rem; position: relative; width:1.23rem; position: relative;
} }
.value{ .value{
color:#000; line-height: .21rem; margin: .15rem 0 .14rem; color:#666; line-height: .21rem; margin: .15rem 0 .14rem;
} }
&.require{ &.require{
position: relative; position: relative;
...@@ -252,9 +241,3 @@ span { ...@@ -252,9 +241,3 @@ span {
.label{ .label{
margin-right: 0; margin-right: 0;
} }
:global(.am-list-item .am-input-control input:disabled){
color: #000 !important;
opacity: 1;
-webkit-opacity:1;
-webkit-text-fill-color: #000;
}
\ No newline at end of file \ No newline at end of file
...@@ -18,34 +18,29 @@ body{ ...@@ -18,34 +18,29 @@ body{
} }
.search{ .search{
width: 3.8rem;
height: .32rem;
background-color: #F4F4F4;
border-radius: 25.6px;
margin: 0px auto 9.6px;
position: relative; position: relative;
width: 100%;
padding: .1rem .17rem;
z-index: 10;
top: 0;
} }
.search::before { .search img{
position: absolute; position: absolute;
margin:.09rem .15rem;
width: .15rem; width: .15rem;
height: .15rem; height: .15rem;
content: '';
background: url(../../assets/image/search.png) no-repeat;
background-size: 100%;
left: .35rem;
top: .19rem;
z-index: 10;
} }
.search input{ .search input{
box-sizing: border-box; position: absolute;
width: 100%;
border: none; border: none;
border-radius: .16rem; outline:none;
background: #F4F4F4; left: .4rem;
height: .32rem; top: 0.08rem;
line-height: .32rem; background-color: #F4F4F4;
padding: 0;
padding-left: .42rem;
font-size: .14rem; font-size: .14rem;
color: #999;
width:3.25rem ;
} }
/*content*/ /*content*/
...@@ -53,7 +48,7 @@ body{ ...@@ -53,7 +48,7 @@ body{
position: relative; position: relative;
width: 100%; width: 100%;
background-color: #F8F8F8; background-color: #F8F8F8;
/* padding-top: 16px; */ padding-top: 16px;
padding-bottom: .9rem; padding-bottom: .9rem;
...@@ -66,14 +61,6 @@ body{ ...@@ -66,14 +61,6 @@ body{
overflow: hidden; overflow: hidden;
margin: 0 auto; margin: 0 auto;
} }
.content > .banner :global(ul.slider-list){
height:1.4rem !important;
}
.content > .banner :global(.ant-carousel .slick-dots){
position: absolute;
/*bottom: 50px;*/
}
/* UI的1.6倍*/ /* UI的1.6倍*/
...@@ -81,15 +68,12 @@ body{ ...@@ -81,15 +68,12 @@ body{
.nav{ .nav{
display: flex; display: flex;
font-size: 0.18rem; font-size: 0.18rem;
margin: .2rem 0; margin: .32rem 0;
flex-wrap: wrap;
} }
.module{ .module{
text-align: center; text-align: center;
/* flex: 1; */ flex: 1;
width: 25%;
margin-bottom: 0.15rem;
} }
.module>img{ .module>img{
width: .5rem; width: .5rem;
...@@ -105,8 +89,8 @@ body{ ...@@ -105,8 +89,8 @@ body{
.planList{ .planList{
width: 3.92rem; width: 3.92rem;
background-color: white; background-color: white;
/* border-radius: 16px; */ border-radius: 16px;
margin: 0 auto .4rem ; margin: 0 auto .8rem ;
} }
.planList > div >p { .planList > div >p {
...@@ -128,7 +112,7 @@ body{ ...@@ -128,7 +112,7 @@ body{
height: 100%; height: 100%;
} }
.right{ .right{
width: 2.9rem; width: 2.8rem;
height: .8rem; height: .8rem;
float: right; float: right;
position: relative; position: relative;
...@@ -157,22 +141,6 @@ body{ ...@@ -157,22 +141,6 @@ body{
width: .34rem; width: .34rem;
height: .18rem; height: .18rem;
} }
.blueSpan{
float: right;
margin-right: .1rem;
}
.blueSpan>div{
background-color: #8ec5f3;
font-size: .15rem;
width: .4rem;
height: .2rem;
line-height: .2rem;
margin-top: .03rem;
text-align: center;
color: white;
border-radius: 5px;
transform: scale(0.9);
}
.label{ .label{
display: inline-block; display: inline-block;
float: right; float: right;
...@@ -181,7 +149,7 @@ body{ ...@@ -181,7 +149,7 @@ body{
top: 0; top: 0;
right: 0; right: 0;
} }
.planList span{ span{
margin-right: .1rem; margin-right: .1rem;
float: right; float: right;
} }
...@@ -243,7 +211,7 @@ body{ ...@@ -243,7 +211,7 @@ body{
.codeWrap{ .codeWrap{
/* background:#FF9D5C; */ /* background:#FF9D5C; */
} }
:global(.codeWrap .am-modal-transparent .am-modal-content){ :global(.am-modal-transparent .am-modal-content){
padding:0; padding:0;
} }
:global(.am-modal-close){ :global(.am-modal-close){
...@@ -255,140 +223,3 @@ body{ ...@@ -255,140 +223,3 @@ body{
:global(.am-wingblank.am-wingblank-lg){ :global(.am-wingblank.am-wingblank-lg){
margin: 0; margin: 0;
} }
/*消息中心*/
.infolist{
display: flex;
width: 3.92rem;
background-color: white;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
border-bottom: 1px solid #F8F8F8;
margin: 0 auto;
}
.infolist .carousel_item {
height: 36px;
line-height: 36px;
padding-left: 10px;
background-color: white;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.infolist .newInfo{
position: relative;
color:#FB5150;
float: none;
margin: 0;
}
.infolist .arrowBtn{
width:.6rem;
line-height:36px;
text-align: right;
padding-right: .08rem;
}
/*站内搜索*/
.searchWarp{
width:100%;
height:100%;
}
.searchWarp .searchContent{
width: 100%;
height: calc(100vh - 44px);
}
.searchWarp .tabsContent{
display: flex;
justify-content: center;
background-color: #fff;
height: calc(100vh - 120px);
overflow-y: auto;
position: relative;
}
.searchWarp .tabsContent .tipsRight1{
background: url("../../assets/image/tips1.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight2{
background: url("../../assets/image/tips2.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight3{
background: url("../../assets/image/tips3.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight4{
background: url("../../assets/image/tips4.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight5{
background: url("../../assets/image/tips5.png");
background-size: cover;
}
.searchWarp .tabsContent .tipsRight1,.tipsRight2,.tipsRight3,.tipsRight4,.tipsRight5{
color: white;
display: inline;
padding: 5px;
border-radius: 10px;
font-size: 12px;
}
.searchContent .tabsHeader{
background: white;
padding: 10px 8px;
}
.searchContent .tabsHeader>button{
border-radius: 16px;
line-height: 24px;
padding: 5px 16px;
border: none;
background: white;
margin: 5px 8px;
cursor: pointer;
color: #101010;
border: 1px solid #e8e8e8;
font-size: .175rem;
box-shadow: 0px 0px 5px #e8e8e8;
}
.searchContent .tabsHeader>button.active{
color: white;
background: #FF9D5C
}
.searchWarp :global(.am-list-line){
padding: 8px 10px;
}
.searchWarp .search {
position: relative;
display: flex;
padding: .1rem .17rem;
background: white;
}
.searchWarp .search::before {
position: absolute;
width: .15rem;
height: .15rem;
content: '';
background: url(../../assets/image/search.png) no-repeat;
background-size: 100%;
left: .35rem;
top: .19rem;
z-index: 10;
}
.searchWarp .search input{
box-sizing: border-box;
width: 100%;
border: none;
border-radius: .16rem;
background: #F4F4F4;
height: .32rem;
line-height: .32rem;
padding: 0;
padding-left: .42rem;
font-size: .14rem;
}
.searchWarp .search .cancelButton{
font-size: .16rem;
color: #101010;
width: .5rem;
padding: .05rem 0 0 .05rem;
}
\ No newline at end of file \ No newline at end of file
import React, { Component } from 'react' import React, { Component } from 'react'
import { connect } from 'dva' import { connect } from 'dva'
import { Modal, Toast, NoticeBar, WhiteSpace,Carousel } from 'antd-mobile'; import { Modal, Toast } from 'antd-mobile';
import {Icon } from 'antd';
import Swiper from "../../components/Swiper/index" import Swiper from "../../components/Swiper/index"
import BottomNav from "../../components/BottomNav/index" import BottomNav from "../../components/BottomNav/index"
import ExpertVideo from '../expertVideo/index' import ExpertVideo from '../expertVideo/index'
import styles from './Home.css' import styles from './Home.css'
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import Iscroll from "../../components/Iscroll";
import $ from "jquery";
import {urlGetParams} from "../../utils/dataFilter";
class Home extends Component { class Home extends Component {
constructor(props){ constructor(props){
super(props) super(props)
...@@ -20,76 +16,38 @@ class Home extends Component { ...@@ -20,76 +16,38 @@ class Home extends Component {
moduleList:[ moduleList:[
{ {
img:require('../../assets/image/myUser.png'), img:require('../../assets/image/myUser.png'),
text:'我的客户', text:'我的客户'
url:'myUser'
}, },
{ {
img:require('../../assets/image/projectPlan.png'), img:require('../../assets/image/projectPlan.png'),
text:'计划书', text:'计划书'
url:'prospectusList'
}, },
{ {
img:require('../../assets/image/poster.png'), img:require('../../assets/image/poster.png'),
text:'海报', text:'海报'
url:'poster'
}, },
{ {
img:require('../../assets/image/dataBank.png'), img:require('../../assets/image/dataBank.png'),
text:'资料库', text:'资料库'
url:'databank'
}, },
{
img:require('../../assets/image/invitation.png'),
text:'邀请函',
url:'invitation'
},
{
img:require('../../assets/image/busunessCard.png'),
text:'名片',
url:'businessCard'
},
{
img:require('../../assets/image/hydt.png'),
text:'行业动态',
url:'industrynews'
}
], ],
moduleList1:[ moduleList1:[
{ {
img:require('../../assets/image/projectPlan.png'), img:require('../../assets/image/projectPlan.png'),
text:'计划书', text:'计划书'
url:'prospectusList'
}, },
{ {
img:require('../../assets/image/poster.png'), img:require('../../assets/image/poster.png'),
text:'海报', text:'海报'
url:'poster'
}, },
{ {
img:require('../../assets/image/myUser.png'), img:require('../../assets/image/audit.png'),
text:'我的客户', text:'审核'
url:'governortraining/audit',
}, },
{ {
img:require('../../assets/image/dataBank.png'), img:require('../../assets/image/dataBank.png'),
text:'资料库', text:'资料库'
url:'databank'
},
{
img:require('../../assets/image/invitation.png'),
text:'邀请函',
url:'invitation'
}, },
{
img:require('../../assets/image/busunessCard.png'),
text:'名片',
url:'businessCard'
},
{
img:require('../../assets/image/hydt.png'),
text:'行业动态',
url:'industrynews'
}
], ],
select:0, select:0,
navTitle: "华夏O2O智慧工作平台", navTitle: "华夏O2O智慧工作平台",
...@@ -102,32 +60,41 @@ class Home extends Component { ...@@ -102,32 +60,41 @@ class Home extends Component {
swiperList: [], //轮播图 swiperList: [], //轮播图
roleId: '', roleId: '',
hasRoom: false, hasRoom: false,
isCodeShow: false, isCodeShow: false
infolist:null,//系统消息
loadingFlag:true,
} }
this.handleClose = this.handleClose.bind(this); this.handleClose = this.handleClose.bind(this);
this.handleShowExpert = this.handleShowExpert.bind(this); this.handleShowExpert = this.handleShowExpert.bind(this);
this.handleFeedback = this.handleFeedback.bind(this); this.handleFeedback = this.handleFeedback.bind(this);
this.handleShowChoosePop = this.handleShowChoosePop.bind(this); this.handleShowChoosePop = this.handleShowChoosePop.bind(this);
} }
history = (index,item)=>{ history = (index)=>{
if(item.url === "businessCard"){ if(index == 0 && localStorage.getItem("roleId") == 3){
let number = localStorage.getItem("number"); this.props.history.push("/prospectusList")
let project = localStorage.getItem("project"); }else if( index == 0 && localStorage.getItem("roleId") == 2){
let website = localStorage.getItem("website"); this.props.history.push("/myUser")
let orgId = localStorage.getItem("orgId"); }
let id = localStorage.getItem("id"); else if(index == 1 && localStorage.getItem("roleId") == 2){
window.location.href = window.location.href.split('#')[0] + '#/businessCard?number=' + number + '&project=' + project + '&website=' + website + '&orgId=' + orgId +'&id='+id; this.props.history.push("/prospectusList")
}else{ }else if(index === 2 && localStorage.getItem("roleId") == 2){
this.props.history.push("/" + item.url); this.props.history.push("/poster")
}else if(index === 1 && localStorage.getItem("roleId") == 3){
this.props.history.push("/poster")
}else if(index === 3 && localStorage.getItem("roleId") == 2){
this.props.history.push("/databank")
}else if(index === 3 && localStorage.getItem("roleId") == 3){
this.props.history.push("/databank")
}else if(index === 2 && localStorage.getItem("roleId") == 3){
//审核
this.props.history.push("/governortraining/audit")
} }
} }
goGtclientlist=()=>{ goGtclientlist=()=>{
this.props.history.push("/governortraining/gtclientlist") this.props.history.push("/governortraining/gtclientlist")
} }
goPerformance =()=>{ goPerformance =()=>{
this.props.history.push('/home/myCenter') this.props.history.push('/home/performance')
} }
handleClose() { handleClose() {
this.setState({ this.setState({
...@@ -151,36 +118,34 @@ class Home extends Component { ...@@ -151,36 +118,34 @@ class Home extends Component {
} }
goPlan =(item)=>{ goPlan =(item)=>{
let storage = window.localStorage; let storage = window.localStorage;
storage.setItem("riskName",item.riskName) storage.setItem("riskName",item.riskName)
storage.setItem("riskCode",item.riskCode) storage.setItem("riskCode",item.riskCode)
storage.setItem("calculationMethod",item.calculationMethod) storage.setItem("calculationMethod",item.calculationMethod)
storage.setItem("selectd",1) storage.setItem("selectd",1)
storage.setItem("seriNo",'') storage.setItem("seriNo",'')
//storage.setItem("recipients",false) storage.setItem("recipients",false)
storage.setItem("riskIntroduce",item.riskIntroduce) storage.setItem("riskIntroduce",item.riskIntroduce)
storage.setItem("thumbnail",item.thumbnail) storage.setItem("thumbnail",item.thumbnail)
//storage.setItem("recipientsName",'') storage.setItem("recipientsName",'')
window.location.href = window.location.href.split('#')[0] + '#/addplaneditor?riskName=' + item.riskName + '&riskCode=' + item.riskCode + '&calculationMethod=' + item.calculationMethod + '&riskIntroduce=&thumbnail=' + item.thumbnail +'&selectd=1&roleId='+localStorage.getItem("roleId") +'&Id='+ localStorage.getItem('id')+'&seriNo='
}
componentDidMount() {
document.title = '华夏O2O智慧工作平台'; window.location.href = window.location.href.split('#')[0] + '#/addplaneditor?riskName=' + item.riskName + '&riskCode=' + item.riskCode + '&calculationMethod=' + item.calculationMethod + '&recipients=false&riskIntroduce=' + item.riskIntroduce + '&thumbnail=' + item.thumbnail +'&recipientsName=&selectd=1&roleId='+localStorage.getItem("roleId")+'&seriNo='
sessionStorage.clear();
shareHide();
if(!this.props.location.query){
Toast.loading('loading...',0);
} }
componentWillMount() {
// this.props.history.go(0)
const that = this; const that = this;
let url = window.location.href; let url = window.location.href;
const params = urlGetParams(window.location.href); const matchs = decodeURI(url).match(/userOpenId=(.*)&publicOpenId=(.*)&phoneNum=(.*)/i);
let userOpenId = '' let userOpenId = ''
let publicOpenId = ''; let publicOpenId = '';
let phoneNum = ''; let phoneNum = '';
if (params.userOpenId) { if (matchs) {
userOpenId = params.userOpenId; userOpenId = matchs[1];
publicOpenId = params.publicOpenId; publicOpenId = matchs[2];
phoneNum = params.phoneNum; phoneNum = matchs[3];
this.setState({ this.setState({
userOpenId, //微信号 userOpenId, //微信号
publicOpenId, //公众号 publicOpenId, //公众号
...@@ -188,13 +153,6 @@ class Home extends Component { ...@@ -188,13 +153,6 @@ class Home extends Component {
}) })
} }
//在缓存中查找一边,解决从其他页面返回此页面时,发接口事件过长,moduleList显示默认值
if (window.localStorage.getItem('roleId') == '3') {
this.setState({
moduleList: this.state.moduleList1,
})
}
//localStorage.clear();
this.props.dispatch({ this.props.dispatch({
type:'home/getCustomerInfo', type:'home/getCustomerInfo',
payload: {"phoneNum":phoneNum||localStorage.getItem("number")}, payload: {"phoneNum":phoneNum||localStorage.getItem("number")},
...@@ -204,7 +162,7 @@ class Home extends Component { ...@@ -204,7 +162,7 @@ class Home extends Component {
that.setState({ that.setState({
roleId: userInfo.roleId roleId: userInfo.roleId
}) })
if (userInfo.roleId != '2') {//如果不是客户经理 就显示督训的页面 if (userInfo.roleId == '3') {
that.setState({ that.setState({
moduleList: that.state.moduleList1, moduleList: that.state.moduleList1,
}) })
...@@ -219,33 +177,19 @@ class Home extends Component { ...@@ -219,33 +177,19 @@ class Home extends Component {
storage.setItem("orgId", userInfo.orgId ? userInfo.orgId : '') //机构id storage.setItem("orgId", userInfo.orgId ? userInfo.orgId : '') //机构id
storage.setItem("project", userInfo.project ? userInfo.project:'') //项目id storage.setItem("project", userInfo.project ? userInfo.project:'') //项目id
storage.setItem("website", userInfo.website ? userInfo.website:'') //网点id storage.setItem("website", userInfo.website ? userInfo.website:'') //网点id
storage.setItem("userInfo",JSON.stringify(userInfo)); //用户信息
/* 轮播消息列表 ,放在次数查因为 用到id 此接口id必须有值*/
that.props.dispatch({
type: 'infoCenter/GetInformationsList',
payload: {
"roleId":userInfo.roleId,
"id":userInfo.id
},
callback(res) {
that.setState({
infolist: res
})
},
error(err) {
Toast.error(err.message)
}
})
that.getOtherData(userInfo);
} }
}) })
/*shareHide({
decodeUrl: window.location.href.split('#')[0],
})*/
shareHide()
} }
getOtherData(userInfo) { componentDidMount() {
document.title = '华夏O2O智慧工作平台';
const _this = this; const _this = this;
this.props.dispatch({ this.props.dispatch({
type: 'home/getRoomList', type: 'myUser/getRoomList',
payload: { payload: {
index: 0 index: 0
}, },
...@@ -256,10 +200,13 @@ class Home extends Component { ...@@ -256,10 +200,13 @@ class Home extends Component {
} }
}) })
// 选取的客户 // 选取的客户
if (this.props.location.query) { if (this.props.location.query) {
const { query: { chosenClient } } = this.props.location; const { query: { chosenClient } } = this.props.location;
const id = userInfo.id || null; const id = window.localStorage.getItem('id');
let clientNum = ''; let clientNum = '';
Toast.loading('loading...'); Toast.loading('loading...');
if (chosenClient) { if (chosenClient) {
...@@ -283,78 +230,55 @@ class Home extends Component { ...@@ -283,78 +230,55 @@ class Home extends Component {
} }
}); });
} }
let that = this;
/* 计划书接口 */ /* 计划书接口 */
this.props.dispatch({ this.props.dispatch({
type:'home/getPlanList', type:'home/getPlanList',
payload:{ payload:{
riskName:"", riskName:"",
riskStatus:1, //1启用 riskStatus:1, //1启用
"proId":userInfo.project || null, "project":localStorage.getItem("project"),
"website":userInfo.website || null, "website":localStorage.getItem("website"),
"orgId":userInfo.orgId || null, "orgId":localStorage.getItem("orgId"),
}, },
callback(data){ callback(data){
_this.setState({
planList:data, that.setState({
loadingFlag:false, planList:data
}) })
Toast.hide();
}, },
}) })
}
static getDerivedStateFromProps(props, state){
return null
}
componentDidUpdate(){
if(this.inputSearch){
$('#searchqqq').on('focus',()=>{
console.log('onfocus--')
this.props.history.push({pathname:'/search'})
})
}
} }
componentWillUnmount(){ componentWillUnmount(){
document.title = ''; document.title = '';
} }
gotoInfoCenter=(e)=>{
e.preventDefault();
let userInfo = JSON.parse(localStorage.getItem("userInfo"));
if(userInfo.roleId == 3){
this.props.history.push('/infocenter')
}else{
this.props.history.push({pathname:'/infocenter/list',search:'sign=2'})
}
}
render() { render() {
let infoItem = [],list = [];
let haveNewInfo = false;//消息列表中有没有新消息
if(this.state.infolist){
list = (this.state.infolist).DATABASE;
haveNewInfo = (this.state.infolist).READ == "0" ? true : false;
}
if(list.length>0){
list.map((item,index)=>{
infoItem.push(
<div className={styles.carousel_item} key={item.id}>{item.messageHeader}</div>
);
if(String(item.viewStatus) == "0"){
haveNewInfo = true;
}
})
}
if(this.state.loadingFlag){
return <div></div>
}
return ( return (
<div className={styles.box}> <div className={styles.box}>
<Iscroll id="home" {/*<HeaderNav title={this.state.navTitle}*/}
iscrollOptions={{ {/*history={this.props.history}*/}
probeType:2 {/*></HeaderNav>*/}
<div className={styles.header} onClick={()=>{
// this.props.history.push("/myUser")
/* this.props.dispatch(routerRedux.push({
pathname: '/myUser',
query: {
data:1,
},
}));*/
}}> }}>
<div className={styles.content}> {/*<div className={styles.search}>
<div className={styles.search}> <img src={require('../../assets/image/search.png')} alt=""/>
<input placeholder={"输入关键字"} id="searchqqq" ref={ref => this.inputSearch = ref} /> <input type="text" placeholder="请输入关键字" />
</div>*/}
</div> </div>
<div className={styles.content}>
<div className={styles.banner}> <div className={styles.banner}>
<Swiper swiperList={this.state.swiperList} /> <Swiper swiperList={this.state.swiperList} />
</div> </div>
...@@ -363,7 +287,7 @@ class Home extends Component { ...@@ -363,7 +287,7 @@ class Home extends Component {
this.state.moduleList.map((item,index)=>{ this.state.moduleList.map((item,index)=>{
return ( return (
<div className={styles.module} key={index} onClick={()=>{ <div className={styles.module} key={index} onClick={()=>{
this.history(index,item) this.history(index)
}}> }}>
<img src={item.img} alt=""/> <img src={item.img} alt=""/>
<p>{item.text}</p> <p>{item.text}</p>
...@@ -373,27 +297,6 @@ class Home extends Component { ...@@ -373,27 +297,6 @@ class Home extends Component {
} }
</div> </div>
<div className={styles.infolist}>
<div style={{width:'1.2rem',lineHeight:"36px",fontSize:'.14rem'}}> <img src={require("../../assets/image/notice.png")} style={{color:"#666666",margin:"-3px 5px 0 8px",width: '.2rem'}} /> 系统消息:</div>
<div style={{width:'2.5rem'}}>
{
infoItem.length>0 ? (
<Carousel vertical
dots={false}
dragging={false}
swiping={false}
autoplay
infinite>
{infoItem}
</Carousel>
) : <div className={styles.carousel_item} key="info">当前无最新消息!</div>
}
</div>
<div className={styles.arrowBtn} onClick={(e)=>{this.gotoInfoCenter(e)}}>
{haveNewInfo && <span className={styles.newInfo}>新</span>}
<Icon type="right" />
</div>
</div>
{ {
this.state.planList.length>0 &&<div className={styles.planList}> this.state.planList.length>0 &&<div className={styles.planList}>
<div> <div>
...@@ -411,10 +314,8 @@ class Home extends Component { ...@@ -411,10 +314,8 @@ class Home extends Component {
<div className={styles.title}>{item.riskName}</div> <div className={styles.title}>{item.riskName}</div>
{item.riskLabels && item.riskLabels.map((ite,ind)=>{ {item.riskLabels && item.riskLabels.map((ite,ind)=>{
return( return(
<span key={ind} className={ite == '新品' || ite == '热门' ? (ite == '新品' ? styles.orangeSpan:styles.redSpan) : styles.blueSpan}> <span key={ind} className={ite === '新品'?styles.orangeSpan:styles.redSpan}>
{ ite =='新品' && <img src={require("../../assets/image/label-newProduct.png")} alt=""/>} { ite =='新品' ?<img src={require("../../assets/image/label-hot.png")} alt=""/>:<img src={require("../../assets/image/label-newProduct.png")} alt=""/> }
{ ite =='热门' && <img src={require("../../assets/image/label-hot.png")} alt=""/>}
{ (ite !='新品' && ite !='热门') && <div><b style={{fontWeight:'lighter'}}>{ite}</b></div> }
</span> </span>
) )
})} })}
...@@ -437,8 +338,8 @@ class Home extends Component { ...@@ -437,8 +338,8 @@ class Home extends Component {
</div> </div>
</div> </div>
} }
</div> </div>
</Iscroll>
<BottomNav handleShowExpert={this.handleShowExpert} hasRoom={this.state.hasRoom} roleId={this.state.roleId} goGtclientlist = {this.goGtclientlist} goPerformance = {this.goPerformance}/> <BottomNav handleShowExpert={this.handleShowExpert} hasRoom={this.state.hasRoom} roleId={this.state.roleId} goGtclientlist = {this.goGtclientlist} goPerformance = {this.goPerformance}/>
<ExpertVideo <ExpertVideo
......
...@@ -4,9 +4,6 @@ import styles from './Login.css' ...@@ -4,9 +4,6 @@ import styles from './Login.css'
import $ from 'jquery'; import $ from 'jquery';
import { Toast } from 'antd-mobile'; import { Toast } from 'antd-mobile';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import {urlGetParams} from "../../utils/dataFilter";
let t1 = null;//是一个 全局事件
class Login extends Component { class Login extends Component {
constructor(props){ constructor(props){
super(props) super(props)
...@@ -38,7 +35,7 @@ class Login extends Component { ...@@ -38,7 +35,7 @@ class Login extends Component {
$.ajax({ $.ajax({
//几个参数需要注意一下 //几个参数需要注意一下
type: "POST",//方法类型 type: "POST",//方法类型
url: "https://iwpuat.ihxlife.com/o2o/authentication/mobile" ,//url url: "https://zmt.ihxlife.com/o2o/authentication/mobile" ,//url
contentType: "application/x-www-form-urlencoded", contentType: "application/x-www-form-urlencoded",
headers: { headers: {
'deviceId':this.state.userOpenId, //微信号 userOpenId 'deviceId':this.state.userOpenId, //微信号 userOpenId
...@@ -59,16 +56,7 @@ class Login extends Component { ...@@ -59,16 +56,7 @@ class Login extends Component {
storage.setItem("orgId", userInfo.orgId ? userInfo.orgId : '') //机构id storage.setItem("orgId", userInfo.orgId ? userInfo.orgId : '') //机构id
storage.setItem("project", userInfo.project ? userInfo.project:'') //项目id storage.setItem("project", userInfo.project ? userInfo.project:'') //项目id
storage.setItem("website", userInfo.website ? userInfo.website:'') //网点id storage.setItem("website", userInfo.website ? userInfo.website:'') //网点id
if(userInfo.roleId == 2 || userInfo.roleId == 3){ that.props.history.push('/welcome');
// that.props.history.push('/welcome');
// let url = window.location.href;
// let param1 = window.location.origin+'/index.html#/welcome?' + url.split('?')[1] + "&phoneNum="+mobile;
// window.location.href = param1;
that.props.history.push({pathname:'/welcome',query:{phoneNum:mobile}});
}else {
that.showToast('该用户无权限,请联系管理员。')
}
}, },
error : function(result) { error : function(result) {
// console.log(result.responseJSON.content); // console.log(result.responseJSON.content);
...@@ -81,12 +69,9 @@ class Login extends Component { ...@@ -81,12 +69,9 @@ class Login extends Component {
Toast.info(val); Toast.info(val);
} }
componentWillUnmount() { componentWillUnmount() {
window.clearInterval(t1);//组件卸载时删除定时器
$('body,#root').removeClass('loginRelease'); $('body,#root').removeClass('loginRelease');
} }
componentDidMount() { componentDidMount() {
document.title = '华夏O2O智慧工作平台';
localStorage.clear();
shareHide(); shareHide();
$(document).on('blur', 'input,textarea', function () { $(document).on('blur', 'input,textarea', function () {
document.activeElement.scrollIntoView(); document.activeElement.scrollIntoView();
...@@ -101,10 +86,10 @@ class Login extends Component { ...@@ -101,10 +86,10 @@ class Login extends Component {
storage.setItem("weixin_id",'') //微信号 storage.setItem("weixin_id",'') //微信号
storage.setItem("superiorid",'') //角色 storage.setItem("superiorid",'') //角色
let url = window.location.href; let url = window.location.href;
const matchs = urlGetParams(url); const matchs = decodeURI(url).match(/userOpenId=(.*)&publicOpenId=(.*)/i);
if(matchs){ if(matchs){
let userOpenId = matchs.userOpenId; let userOpenId = matchs[1];
let publicOpenId = matchs.publicOpenId; let publicOpenId = matchs[2];
this.setState({ this.setState({
userOpenId, userOpenId,
publicOpenId publicOpenId
...@@ -119,7 +104,7 @@ class Login extends Component { ...@@ -119,7 +104,7 @@ class Login extends Component {
</div> </div>
<div className={styles.phone}> <div className={styles.phone}>
<img src={require('../../assets/image/home-shadow.png')} alt=""/> <img src={require('../../assets/image/home-shadow.png')} alt=""/>
<input type="number" pattern="[0-9]*" placeholder="输入手机号码" <input type="number" placeholder="输入手机号码"
value={this.state.mobile} value={this.state.mobile}
onChange={ onChange={
(e)=>{ (e)=>{
...@@ -138,16 +123,13 @@ class Login extends Component { ...@@ -138,16 +123,13 @@ class Login extends Component {
this.showToast('请填写正确的手机号!') this.showToast('请填写正确的手机号!')
return false return false
} }
if(that.state.send){//已发送之后不能再发送接口了
return;
}
that.props.dispatch({ that.props.dispatch({
type:'login/checkUser', type:'login/checkUser',
payload:{ payload:{
"number": mobile "number": mobile
}, },
callback(){ callback(){
$.ajax({url:"https://iwpuat.ihxlife.com/o2o/code/sms?mobile="+ mobile, $.ajax({url:"https://zmt.ihxlife.com/o2o/code/sms?mobile="+ mobile,
type : "get", type : "get",
headers:{"deviceId": that.state.userOpenId}, headers:{"deviceId": that.state.userOpenId},
success:function(result){ success:function(result){
...@@ -155,16 +137,16 @@ class Login extends Component { ...@@ -155,16 +137,16 @@ class Login extends Component {
that.setState({ that.setState({
send:true, send:true,
}) })
t1 = window.setInterval(function () { let t1 = window.setInterval(function () {
that.setState({ that.setState({
second:that.state.second-1 second:that.state.second-1
}) })
if(that.state.second ===0 ){ if(that.state.second ===0 ){
window.clearInterval(t1);
that.setState({ that.setState({
send:false, send:false,
second:60 second:60
}) })
window.clearInterval(t1);//删除定时器
} }
},1000) },1000)
}}); }});
...@@ -180,7 +162,7 @@ class Login extends Component { ...@@ -180,7 +162,7 @@ class Login extends Component {
}}>获取验证码</span> }}>获取验证码</span>
} }
{ {
this.state.send &&<span>{this.state.second}秒</span> this.state.send &&<span >{this.state.second}秒</span>
} }
</div> </div>
<div className={styles.verification}> <div className={styles.verification}>
......
...@@ -22,7 +22,6 @@ class MyUser extends Component { ...@@ -22,7 +22,6 @@ class MyUser extends Component {
storeNameList1:[], storeNameList1:[],
nameList1:[], nameList1:[],
show:false, show:false,
loadingFlag:true
} }
} }
addUser = ()=>{ addUser = ()=>{
...@@ -36,15 +35,16 @@ class MyUser extends Component { ...@@ -36,15 +35,16 @@ class MyUser extends Component {
this.props.history.push('/amendClient') this.props.history.push('/amendClient')
} }
componentWillMount(){
Toast.loading('loading...',0);
this.getUser();
}
componentDidMount(){ componentDidMount(){
document.title = '我的客户'; document.title = '我的客户';
shareHide(); shareHide();
this.getUser();
this.getUser1(); this.getUser1();
} }
componentWillUnmount(){ componentWillUnmount(){
document.title = ''; document.title = '';
...@@ -58,16 +58,16 @@ class MyUser extends Component { ...@@ -58,16 +58,16 @@ class MyUser extends Component {
"currentState":0, "currentState":0,
}, },
callback(data) { callback(data) {
Toast.hide();
let { hasClient } = that.state; let { hasClient } = that.state;
hasClient[0] = data.length > 0; hasClient[0] = data.length > 0;
that.setState({ that.setState({
nameList: data, nameList: data,
// nameList: [],
storeNameList: data, storeNameList: data,
hasClient, hasClient,
show:true, show:true,
//loadingFlag:false
}) })
// that.props.amentClient();
} }
}) })
} }
...@@ -80,15 +80,14 @@ class MyUser extends Component { ...@@ -80,15 +80,14 @@ class MyUser extends Component {
"id":localStorage.getItem("id"), "id":localStorage.getItem("id"),
}, },
callback(data){ callback(data){
Toast.hide();
let { hasClient } = that.state; let { hasClient } = that.state;
hasClient[1] = data.length > 0; hasClient[1] = data.length > 0;
that.setState({ that.setState({
nameList1: data, nameList1: data,
// nameList1: [],
hasClient, hasClient,
storeNameList1: data, storeNameList1: data,
show:true, show:true,
loadingFlag:false
}) })
} }
...@@ -130,27 +129,10 @@ class MyUser extends Component { ...@@ -130,27 +129,10 @@ class MyUser extends Component {
} }
render() { render() {
if(this.state.loadingFlag){
return <div></div>
}
return ( return (
<div className={styles.box}> <div className={styles.box}>
{ {
this.state.show &&<Tabs title={this.state.tab} this.state.show &&<Tabs title={this.state.tab} user={this.state.user} letter={this.state.letter} addUser={this.addUser} editor={this.editor} delete={this.delete} amentClient = {this.amentClient} nameList = {this.state.nameList} nameList1 = {this.state.nameList1} goAddUser = {this.goAddUser} content={'修改'} dataFilterToProp= {this.dataFilterToProp.bind(this)} hasClient={this.state.hasClient} />
user={this.state.user}
letter={this.state.letter}
addUser={this.addUser}
editor={this.editor}
delete={this.delete}
amentClient = {this.amentClient}
nameList = {this.state.nameList}
nameList1 = {this.state.nameList1}
storeNameList = {this.state.storeNameList}
storeNameList1 = {this.state.storeNameList1}
goAddUser = {this.goAddUser}
content={'修改'}
dataFilterToProp= {this.dataFilterToProp.bind(this)}
hasClient={this.state.hasClient} />
} }
</div> </div>
) )
......
...@@ -200,6 +200,19 @@ body{ ...@@ -200,6 +200,19 @@ body{
margin-right: .1rem; margin-right: .1rem;
} }
.ulilast .spanPad{
position: relative;
display:flex;
justify-content: flex-start;
padding-left: .15rem;
}
.ulilast .spanPad i{
position: absolute;
font-style: normal;
width: .4rem;
top:0; right: 0;
}
.policyList>p{ .policyList>p{
font-size: .14rem; font-size: .14rem;
color: #101010; color: #101010;
...@@ -216,14 +229,6 @@ body{ ...@@ -216,14 +229,6 @@ body{
padding: 0 .2rem; padding: 0 .2rem;
box-sizing: border-box; box-sizing: border-box;
} }
.display_block_img{
width:100%;
height: 2.12rem;
background: linear-gradient(top,#FFC59F,#FF9D5B);
border-radius: .1rem;
display: none;
box-sizing: border-box;
}
.cliessCentext{ .cliessCentext{
text-align: center; text-align: center;
} }
......
...@@ -9,6 +9,7 @@ import 'echarts/lib/component/title'; ...@@ -9,6 +9,7 @@ import 'echarts/lib/component/title';
import {Toast, Picker} from 'antd-mobile'; import {Toast, Picker} from 'antd-mobile';
import perform from './Performance.css' import perform from './Performance.css'
import shareHide from "../../utils/shareHide" import shareHide from "../../utils/shareHide"
import moment from 'moment';
class Performance extends Component { class Performance extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -26,11 +27,15 @@ class Performance extends Component { ...@@ -26,11 +27,15 @@ class Performance extends Component {
Xdata:[], Xdata:[],
getseriesData:[], getseriesData:[],
getXdata:[], getXdata:[],
roleId:"",
intervalDate:'', intervalDate:'',
amount:0.00, amount: 0.00,
fakedata:null
} }
this.setCurrentIndex = this.setCurrentIndex.bind(this) this.setCurrentIndex = this.setCurrentIndex.bind(this)
} }
// 改变index显示高亮 // 改变index显示高亮
setCurrentIndex(index) { setCurrentIndex(index) {
let _this = this let _this = this
...@@ -42,25 +47,163 @@ class Performance extends Component { ...@@ -42,25 +47,163 @@ class Performance extends Component {
getIndex = () =>{ getIndex = () =>{
switch (this.state.currentIndex) { switch (this.state.currentIndex) {
case 0:this.setState({perData:'D'},()=>{ case 0:this.setState({perData:'D'},()=>{
this.performace() // this.performace()
this.getFakeList(0)
}); });
break; break;
case 1:this.setState({perData:'M'},()=>{ case 1:this.setState({perData:'M'},()=>{
this.performace() // this.performace()
this.getFakeList(1)
}); });
break; break;
case 2:this.setState({perData:'Q'},()=>{ case 2:this.setState({perData:'Q'},()=>{
this.performace() // this.performace()
this.getFakeList(2)
}); });
break; break;
case 3:this.setState({perData:'Y'},()=>{ case 3:this.setState({perData:'Y'},()=>{
this.performace() // this.performace()
this.getFakeList(3)
}); });
break; break;
} }
}
getFakeData = () => {
let data = { achievements: [], amount: 0 };
let sum = 0;
const nowDate = new Date();
const nowYear = nowDate.getFullYear();
for (let i = 0; i < 12; i++) {
let m = new Date();
m.setMonth(i);
m.setDate(0);
let l = m.getDate();
for (let g = 1; g <= l; g++) {
if (nowDate.getMonth() >= i) {
if (nowDate.getDate() >= g) {
let money = parseFloat(Math.random() * (4000 - 300 + 1) + 300, 10).toFixed(2);
money = (Math.random() < 0.6 ? 0 : 1) * money;
data.achievements.push({
statisticaldate: moment(new Date(nowYear, i, g)).format('YYYY-MM-DD'),
totalprem: money
})
sum += parseFloat(money);
}
} else {
data.achievements.push({
statisticaldate: moment(new Date(nowYear, i, g)).format('YYYY-MM-DD'),
totalprem: 0
})
}
}
}
data.amount = sum;
this.setState({ fakedata: data })
}
getFakeList = (flag) => {
const { fakedata } = this.state;
const now = new Date();
if (flag === 0) {
const now = moment(new Date()).format('YYYY-MM-DD');
fakedata && fakedata.achievements.map(itm => {
if (itm.statisticaldate == now) {
this.setState({
performArr: {
achievements: [itm],
amount: itm.totalprem
}
})
}
})
}
if (flag === 1) {
let m = new Date();
m.setDate(0);
let l = m.getDate(), sum = 0;
let data = { achievements: [], amount: 0 };
for (let i = 0; i < l; i++){
fakedata && fakedata.achievements.map(itm => {
if (itm.statisticaldate == moment(new Date().setDate(i)).format('YYYY-MM-DD')) {
data.achievements.push(itm)
sum += parseFloat(itm.totalprem);
}
})
}
data.amount = sum;
this.setState({performArr: data})
}
if (flag === 2) {
let quarterStartMonth = 0, nowMonth=new Date().getMonth();
if (nowMonth < 3) {
quarterStartMonth = 0;
}
if (2 < nowMonth && nowMonth < 6) {
quarterStartMonth = 3;
}
if (5 < nowMonth && nowMonth < 9) {
quarterStartMonth = 6;
}
if (nowMonth > 8) {
quarterStartMonth = 9;
}
let data = { achievements: [], amount: 0 };
let sum = 0;
for (let i = quarterStartMonth; i < quarterStartMonth+3; i++) {
let m = new Date();
m.setMonth(i);
m.setDate(0);
let l = m.getDate();
for (let g = 1; g <= l; g++) {
fakedata && fakedata.achievements.map(itm => {
if (itm.statisticaldate == moment(new Date(m.getFullYear(),i,g)).format('YYYY-MM-DD')) {
data.achievements.push(itm)
sum += parseFloat(itm.totalprem);
}
})
}
}
data.amount = sum;
this.setState({ performArr: data })
}
if (flag === 3) {
let data = { achievements: [], amount: 0 };
let sum = 0;
const nowYear = new Date().getFullYear();
for (let i = 0; i < 12; i++){
if (i <= new Date().getMonth()) {
let money = parseFloat(Math.random() * (60000 - 20000 + 1) + 20000, 10).toFixed(2);
data.achievements.push({
statisticaldate: moment(new Date(nowYear, i, 1)).format('YYYY-MM'),
totalprem: money
})
sum += parseFloat(money);
} else {
data.achievements.push({
statisticaldate: moment(new Date(nowYear, i, 1)).format('YYYY-MM'),
totalprem: 0
})
}
}
data.amount = sum;
console.log(data)
this.setState({ performArr: data })
}
} }
performace =()=>{ performace =()=>{
this.performaceServer() let that = this;
if(localStorage.getItem("roleId")==3){
this.setState({roleId:1},()=>{
that.performaceServer()
})
}else{
this.setState({roleId:0},()=>{
that.performaceServer()
})
}
} }
//个人业绩接口 //个人业绩接口
performaceServer(){ performaceServer(){
...@@ -71,14 +214,13 @@ class Performance extends Component { ...@@ -71,14 +214,13 @@ class Performance extends Component {
payload: { payload: {
"daySize": this.state.perData, "daySize": this.state.perData,
"managerId": localStorage.getItem("id"), "managerId": localStorage.getItem("id"),
"roleId": localStorage.getItem("roleId"), "superFlag": this.state.roleId,
}, },
callback(data){ callback(data){
Toast.hide(); Toast.hide();
that.setState({ that.setState({
performArr:data performArr:data
}) })
that.getEchares();//建立新的图表
}, },
error(data){ error(data){
Toast.info(data.message) Toast.info(data.message)
...@@ -86,48 +228,76 @@ class Performance extends Component { ...@@ -86,48 +228,76 @@ class Performance extends Component {
}) })
} }
//保单请求接口 //保单请求接口
filterData = () =>{ filterData = () => {
let that = this; if (this.state.getMonth - 1 <= new Date().getMonth()) {
Toast.loading('loading...'); Toast.loading('loading...', 2)
this.props.dispatch({ let data = [
type: 'Performance/policyList', { "phone": "13733060808", "contno": "2019000662365088", "planname": "华夏逍遥行两全保险", "insuretime": "2019-06-22", "firstprem": "5970.44", "appntname": "孙雄飞" },
payload: { { "phone": "15251536018", "contno": "2018000658656088", "planname": "华夏常青树重大疾病保险(2015)", "insuretime": "2019-06-21", "firstprem": "532.08", "appntname": "苏六" },
"daySize": "M", { "phone": "15251536018", "contno": "2018000658681088", "planname": "华夏常青树重大疾病保险(2015)", "insuretime": "2019-06-22", "firstprem": "532.08", "appntname": "苏七" },
"customSetDay":this.state.getFullYear+"-"+this.state.getMonth, { "phone": "15251536018", "contno": "2018000658735088", "planname": "华夏常青树重大疾病保险(2015)", "insuretime": "2019-06-22", "firstprem": "532.08", "appntname": "艾二" },
"managerId": localStorage.getItem("id"), { "phone": "15251536018", "contno": "2018000658649088", "planname": "华夏常青树重大疾病保险(2015)", "insuretime": "2019-06-22", "firstprem": "532.08", "appntname": "艾一" },
"roleId": localStorage.getItem("roleId") { "phone": "15251536018", "contno": "2018000658661088", "planname": "华夏常青树重大疾病保险(2015)", "insuretime": "2019-06-22", "firstprem": "532.08", "appntname": "苏二" },
}, { "phone": "15251536018", "contno": "2018000658669088", "planname": "华夏常青树重大疾病保险(2015)", "insuretime": "2019-06-22", "firstprem": "532.08", "appntname": "王晟七" },
callback(data){ { "phone": "17895457038", "contno": "2018000659351088", "planname": "华夏逍遥行两全保险", "insuretime": "2019-06-22", "firstprem": "5334.32", "appntname": "李向军" },
Toast.hide(); { "phone": "18335760786", "contno": "2019000661172088", "planname": "华夏常青藤老年防癌疾病保险", "insuretime": "2019-06-22", "firstprem": "953", "appntname": "说说" },
that.setState({ { "phone": "15887108090", "contno": "2019000665488088", "planname": "华夏常青藤老年防癌疾病保险", "insuretime": "2019-06-22", "firstprem": "2207.9", "appntname": "防癌险" }
arr:data ];
setTimeout(() => {
data.map(itm => {
itm.insuretime = moment(new Date(this.state.getFullYear, this.state.getMonth - 1, parseInt(Math.random() * (28 - 1 + 1) + 1, 10))).format('YYYY-MM-DD');
itm.contno = `${this.state.getFullYear}000${parseInt(Math.random() * (658669088 - 100000000 + 1) + 100000000, 10)}`;
itm.firstprem = parseFloat(Math.random() * (3000 - 500 + 1) + 500, 10).toFixed(2);
}) })
}, this.setState({ arr: data })
error(data){ }, 2000);
Toast.info(data.message)
} else {
this.setState({ arr: [] })
} }
})
// let that = this;
// if(localStorage.getItem("roleId")==3){
// this.setState({roleId:1})
// }else{
// this.setState({roleId:0})
// }
// Toast.loading('loading...');
// this.props.dispatch({
// type: 'Performance/policyList',
// payload: {
// "daySize": "M",
// "customSetDay":this.state.getFullYear+"-"+this.state.getMonth,
// "managerId": localStorage.getItem("id"),
// "superFlag": this.state.roleId
// },
// callback(data){
// Toast.hide();
// that.setState({
// arr:data
// })
// },
// error(data){
// Toast.info(data.message)
// }
// })
} }
//echares图表 //echares图表
getEchares =()=>{ getEchares =()=>{
let myChart = echarts.init(document.getElementById('main')); let myChart = echarts.init(document.getElementById('main'));
let { performArr } = this.state let { performArr } = this.state
let Xdata = performArr.achievements; this.state.Xdata = performArr.achievements;
let getXdata = []; this.state.getXdata = [];
let getseriesData = []; this.state.getseriesData = [];
let intervalDate=Math.ceil((performArr.achievements)&&(performArr.achievements).length/5) this.state.intervalDate=Math.ceil((performArr.achievements)&&(performArr.achievements).length/5)
Xdata && Xdata.map((item)=>{ this.state.Xdata && this.state.Xdata.map((item)=>{
getXdata.push(item.statisticaldate.substr(5)); this.state.getXdata.push(item.statisticaldate.substr(5));
getseriesData.push(item.totalprem); this.state.getseriesData.push(item.totalprem);
}) })
// console.log(getXdata,intervalDate,getseriesData)
//此处需要在setOption之前处理dom显隐。否则样式会出问题,setOption是根据父元素的宽高来渲染图标大小
this.dealDay();
myChart.setOption({ myChart.setOption({
xAxis: { xAxis: {
type: 'category', type: 'category',
data: getXdata, data: this.state.getXdata,
axisLine:{ axisLine:{
show:true, show:true,
onZero:true, onZero:true,
...@@ -138,7 +308,7 @@ class Performance extends Component { ...@@ -138,7 +308,7 @@ class Performance extends Component {
} }
}, },
axisLabel: { axisLabel: {
interval:intervalDate, interval:this.state.intervalDate,
} }
}, },
yAxis: { yAxis: {
...@@ -159,21 +329,8 @@ class Performance extends Component { ...@@ -159,21 +329,8 @@ class Performance extends Component {
}, },
}, },
series: [{ series: [{
data: getseriesData, data: this.state.getseriesData,
type: 'line', type: 'line'
areaStyle: {normal: {}},
// itemStyle: {
// normal: { //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{
// offset: 0, color: '#fff' // 0% 处的颜色
// }, {
// offset: 1, color: '#ffffff40' // 100% 处的颜色
// }]
// )
// },
// emphasis: { //线条样式
// }
// }
}], }],
color: { color: {
colorStops: [{ colorStops: [{
...@@ -221,35 +378,25 @@ class Performance extends Component { ...@@ -221,35 +378,25 @@ class Performance extends Component {
goHome=()=>{ goHome=()=>{
this.props.history.push('/home') this.props.history.push('/home')
} }
//当按天查询业绩的时候 显示默认图
dealDay(){
if(this.state.currentIndex == 0){
document.getElementById("main").style.display = "none";
document.getElementById("mainImg").style.display = "block";
}else{
document.getElementById("main").style.display = "block";
document.getElementById("mainImg").style.display = "none";
}
}
componentDidMount() { componentDidMount() {
shareHide() shareHide()
document.title = '业绩'; document.title = '业绩'
let yearAry = [],monthAry = [];
let year = new Date().getFullYear(), month = new Date().getMonth()+1;
yearAry.push(year);
monthAry.push(month)
this.setState({ this.setState({
getFullYear: yearAry, getFullYear: new Date().getFullYear(),
getMonth: monthAry getMonth: new Date().getMonth()+1
},()=>{ },()=>{
this.filterData() this.filterData()
}) })
this.performace() // this.performace()
this.getFakeData();
} }
componentWillUnmount(){ componentWillUnmount(){
document.title = '' document.title = ''
} }
render() { render() {
let {itemList,arr,performArr} = this.state; let {itemList,arr,performArr} = this.state;
let amount = performArr.amount?parseFloat(performArr.amount).toFixed(2):'0.00'; let amount = performArr.amount?parseFloat(performArr.amount).toFixed(2):'0.00';
...@@ -284,12 +431,11 @@ class Performance extends Component { ...@@ -284,12 +431,11 @@ class Performance extends Component {
<div className={perform.contentEsh}> <div className={perform.contentEsh}>
<ul className={perform.itemEsh}> <ul className={perform.itemEsh}>
<li className={perform.lispan}>我的业绩</li> <li className={perform.lispan}>我的业绩</li>
<li className={perform.litext}>{performArr && amount} <span style={{fontSize:'.2rem',float:'none'}}>元</span> </li> <li className={perform.litext}>{performArr && amount} <span style={{fontSize:'.2rem'}}>元</span> </li>
<li className={perform.lispan}>{this.state.currentIndex !=0 ? '业绩走势' : ''}&nbsp;</li> <li className={perform.lispan}>业绩走势</li>
</ul> </ul>
<div id="main" className={perform.display_block} ></div> <div id="main" className={perform.display_block} ></div>
<img id="mainImg" src={require("../../assets/image/preformance_default.png")} className={perform.display_block_img} /> <span className={perform.ptext}>该业绩统计以标准保费为口径</span>
{this.state.currentIndex !=0 && <span className={perform.ptext}>该业绩统计以标准保费为口径</span>}
</div> </div>
<div className={perform.policy}> <div className={perform.policy}>
<p> <span>我的保单</span> <span className={arr.length > 0 ? perform.spantext:perform.action}>该月共<b>{ arr.length }</b>张保单</span></p> <p> <span>我的保单</span> <span className={arr.length > 0 ? perform.spantext:perform.action}>该月共<b>{ arr.length }</b>张保单</span></p>
...@@ -298,7 +444,7 @@ class Performance extends Component { ...@@ -298,7 +444,7 @@ class Performance extends Component {
<Picker <Picker
data={this.getYear()} data={this.getYear()}
cols={1} cols={1}
value={this.state.getFullYear} value={[this.state.getFullYear]}
onChange={v => { onChange={v => {
const _this = this; const _this = this;
this.setState({ getFullYear: v },()=>{ this.setState({ getFullYear: v },()=>{
...@@ -313,7 +459,7 @@ class Performance extends Component { ...@@ -313,7 +459,7 @@ class Performance extends Component {
<Picker <Picker
data={this.getDate()} data={this.getDate()}
cols={1} cols={1}
value={this.state.getMonth} value={[this.state.getMonth]}
onChange={s => { onChange={s => {
const _this = this; const _this = this;
this.setState({ getMonth: s },()=>{ this.setState({ getMonth: s },()=>{
...@@ -334,7 +480,7 @@ class Performance extends Component { ...@@ -334,7 +480,7 @@ class Performance extends Component {
return <div className={perform.policyList} key={i}> return <div className={perform.policyList} key={i}>
<ul className={perform.policyUli}> <ul className={perform.policyUli}>
<li className={perform.ulis}><span>保单号:{item.contno}</span><span> {item.insuretime}</span></li> <li className={perform.ulis}><span>保单号:{item.contno}</span><span> {item.insuretime}</span></li>
<li className={perform.ulilast}><span>{item.planname}</span><span className={perform.spanPad}><b>{item.firstprem}元</b>首期保费</span></li> <li className={perform.ulilast}><span>{item.planname}</span><span className={perform.spanPad}><b>{item.firstprem}元</b><i>首期保费</i></span></li>
</ul> </ul>
<p>客户:{item.appntname}</p> <p>客户:{item.appntname}</p>
</div> </div>
...@@ -347,6 +493,9 @@ class Performance extends Component { ...@@ -347,6 +493,9 @@ class Performance extends Component {
); );
} }
componentDidUpdate (){
this.getEchares()
}
} }
Performance.propsTypes = {} Performance.propsTypes = {}
......
body{
width:100%;
max-width: 680px;
margin: auto;
background-color: #FF9D5C;
}
.box{
width: 100%;
height: 100%;
background-color: #FF9D5C;
padding-top:.01rem;
padding-bottom: .6rem;
overflow-x: hidden;
}
/*被保人信息*/
.recognizee{
width: 3.92rem;
border-radius: 10px;
margin: .1rem auto;
border: 1px solid #FF9D5C;
overflow: hidden;
}
.message{
padding-left: .15rem;
height: .4rem;
font-size: .16rem;
background-color: #FFF1E8;
line-height: .4rem;
color: #101010;
}
.detail{
width: 3.92rem;
background-color: white;
}
.sex{
height: .5rem;
line-height: .5rem;
padding: 0 .15rem;
}
.sex>.left{
font-size: .15rem;
color: #101010;
display: inline-block;
float: left;
}
.sex>.right{
/*background-color: #666666;*/
display: inline-block;
float: right;
height: .5rem;
position: relative;
}
.sex>.right>.date{
/*display: block;*/
margin-right: .4rem;
width: 1.2rem;
margin-top: .08rem;
border: none;
}
.sex>.right>span{
display: inline-block;
width: .6rem;
height: .3rem;
border: 1px solid #666666;
font-size: .15rem;
text-align: center;
line-height: .3rem;
margin-left: .15rem;
margin-right: 0;
border-radius: 4px;
}
.boy{
position: absolute;
top: .1rem;
right: .75rem;
}
.girl{
position: absolute;
right: 0rem;
top:.1rem;
}
.selectBoy{
position: absolute;
color:#FF5167;
border: 1px solid #FF5167 !important;
top: .1rem;
right: .75rem;
border-radius: 4px;
}
.selectGirl{
position: absolute;
color:#FF5167;
border: 1px solid #FF5167 !important;
right: 0rem;
top:.1rem;
border-radius: 4px;
}
.right>img{
width: .22rem;
height: .2rem;
position: absolute;
top: .1rem;
right: 0;
}
/*投保人非本人*/
.self{
display: inline-block;
}
.select{
width: .2rem;
height: 0.4rem;
float: right;
margin-right: .2rem;
position: relative;
}
.selectd1{
right: 1rem;
}
.selectd2{
right:.3rem;
}
.yes{
position: absolute;
right:.7rem;
}
.no{
position: absolute;
right:.01rem;
}
.select>div>img{
margin-left: .1rem;
width: .2rem;
height: .2rem;
position: absolute;
top: .1rem;
}
.left{
position: relative;
}
.left>input{
position: absolute;
border: none;
outline: none;
left: .8rem;
top: 0.15rem;
font-size: .14rem;
color: #999;
width: 2.25rem;
}
/*险种选择*/
.editor{
width: .16rem !important;
height: .16rem !important;
top:.2rem !important;
}
.recipients{
right: 0rem;
}
:global(.am-button)>span{
float: none;
}
/*底部首年保费*/
.bottom{
width: 100%;
max-width:680px;
margin: 0 auto;
height: .74rem;
background-color: white;
position: fixed;
bottom: 0;
padding-left: .11rem;
z-index: 100;
}
.bottom>.left{
height: .74rem;
float: left;
margin-top: .11rem;
}
.bottom>.left>p{
height: .35rem;
position: relative;
font-size: .15rem;
color: #FF9D5C;
}
.bottom>.left>.num{
color: #FB5150;
font-size: .2rem;
position: relative;
top:-.35rem;
}
.bottom>.left>.num>span{
font-size: .15rem;
float: none;
}
.bottom>.right{
float: right;
font-size: .15rem;
padding-top: .2rem;
}
.bottom>.right> span{
padding: .1rem .13rem;
border: 1px solid #FF9D5C;
border-radius: 4px;
color: #FF9D5C;
float: none;
}
.bottom>.right>.color{
background-color: #FF9D5C;
color:white;
border: 1px dashed #FF9D5C;
}
.choose{
width: 1.5rem; height: .3rem;
border: 1px solid #F0F0F1;
font-size: .15rem;
border-radius: .04rem;
text-align: left; padding-left:.1rem;
color:#999; box-sizing: border-box;
}
.choose:after{
float:right;
width: .12rem; height: .1rem;
margin-top: .11rem; margin-right: .1rem;
background: url('../../assets/image/icon_arrowDown.png') no-repeat;
content:''; background-size: 100%;
}
.choose>span{
float: none;
line-height: .3rem;
}
.e_phoneNum {
width: 100%;
padding-left: 0;
}
.e_phoneNum:global(.am-list-line){
padding-right:0;
justify-content: space-between;
}
.e_phoneNum:global(.am-input-control){
width: 1.5rem; height: .3rem;
border: 1px solid #F0F0F1;
border-radius: .04rem;
flex-grow: 0;
flex-basis: auto;
}
.e_phoneNum>input { padding: 0 .1rem; font-size: .15rem;}
:global(.am-list){
background-color: white;
}
:global(.am-list-content){
padding-left: .11rem;
}
.deta{
padding: 0 .1rem;
float: right;
background-color: #ddd;
font-size: .14rem;
border-radius: 10px;
color: white;
}
.choose>span{
color: rgb(153, 153, 153);
font-size: .15rem;
}
.input::-webkit-input-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
/* Mozilla Firefox 4 to 18 */
.input:-moz-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
/* Mozilla Firefox 19+ */
.input::-moz-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
/* Internet Explorer 10+ */
.input:-ms-input-placeholder {
color:rgb(153,153,153);
font-size: .15rem;
}
.choose>span{
color:#000
}
import React, { Component } from 'react';
import { connect } from 'dva';
import styles from './PlanEditor.css';
import LocalizedModal from "../../components/Modal";
import Table from "../../components/Table";
import { Modal,Button, List,Radio, WhiteSpace, WingBlank ,Picker} from 'antd-mobile';
import share from '../../utils/share';
// import Date from "../../components/Date";
import DatePicker from "../../components/DatePicker";
import ConfirmPop from '../../components/Modal/confirmPop';
import moment from 'moment';
import { Toast } from 'antd-mobile';
import shareHide from "../../utils/shareHide";
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
let RadioItem = Radio.RadioItem;
let alert = Modal.alert;
let showAlert = () => {
let alertInstance = alert('Delete', 'Are you sure???', [
{text: 'Cancel', onPress: () => console.log('cancel'), style: 'default'},
{text: 'OK', onPress: () => console.log('ok')},
]);
setTimeout(() => {
// 可以调用close方法以在外部close
alertInstance.close();
}, 500000);
}
let isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let moneyKeyboardWrapProps = '';
if (isIPhone) {
moneyKeyboardWrapProps = {
onTouchStart: e => e.preventDefault(),
};
}
function closest(el, selector) {
let matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
while (el) {
if (matchesSelector.call(el, selector)) {
return el;
}
el = el.parentElement;
}
return null;
}
let today = new Date()
class AddPlanEditor extends Component {
constructor(props){
super(props)
this.state={
selectd:0,
isShowTips:false,
comfirm:'',
selectRecognizeeSex:true, // 投保人性别
recipientsSex:true, //收件人性别
recipientsName:'', //收件人姓名
recipients:false,
color:false,
date:'2018-02-03',
value1: moment('2017-01-25'),
selectedValue: moment('2017-01-25'),
modal1: false,
modal2: false,
modal3: false,
modal4: false,
modal5: false,
visible:false,
message:'' ,
submit:{},
slectValue:'',
type: 'money',
initInsurance:true,
insuranceNumber:'',
insuranceValue:0,
insuranceLabel:'医保通', //医保通
insurance1:true,
riskName:'',
riskCode:'',
// termList:['华夏多倍版','华夏附加同祥保费豁免定期寿险(A款)','华夏附加豁免保险重大疾病保险'] ,//条款列表
text:'',
termList:[
{
key:0,
title:'华夏多倍版',
text:'华夏多倍版',
},
{
key:1,
title:'华夏附加同祥保费豁免定期寿险(A款)',
text:'华夏附加同祥保费豁免定期寿险(A款)',
},
{
key:2,
title:'华夏附加豁免保险重大疾病保险',
text:'华夏附加豁免保险重大疾病保险',
}
],
mainInsuranceTitle:[ {
title: '险种',
dataIndex: '0',
width: '25%',
align:'center',
},
{
title: '保额',
dataIndex: '1',
width: '25%',
align:'center',
},
{
title: '保费',
dataIndex: '2',
width: '25%',
align:'center',
},
{
title: '缴费期限',
dataIndex: '3',
width: '25%',
align:'center',
}
],
mainInsurance:false,
mainInsuranceTable:[{}],
fjTable:[],
clauseUrlList:[],//条款列表详情
coverageList:[
{ id: 1, name: "花生" },
{ id: 2, name: "苹果" },
{ id: 3, name: "杨桃" }
],
selectCoverage:'花生',
roleId:'',
/*主险*/
protectTime:'', //后端保额传值
microPlanInfo:{}, //获取的主险信息
paymentList:[], //缴费期间
coverage:'', //缴费期间
insuranceDurationList:[], //保险期间
payTime:'', //保险期间后端传值
insuranceDuration:'' ,//保险期间
protectTime:'',
inputValue:'', //保额
inputValue1:'', //保费
copies:'', //份数
seriNo:'',
mainRiskCode:'', //主险riskCode
saveMain:false,
editorNum:0, //编辑:0,修改>0
minAmnt:'10000', //最低保额
minPrem:'10000', //最低保费
/* 附加险 */
fjInsuranceList:[], //附加险列表
social:'有', //有无社保
newBill:'是', //是否为新单
addProtectTime:'100', //附加险保险期间序号
addInsuranceDuration:'趸缴', //附加险保险期间值
fjRiskCode:'' , //附加险code值
fjRiskName:'' , //附加险名称
addCoverage:'', //附加险缴费期间值
addPayTime:'', // 附加险缴费期间的序号
fjAmount:5000, // 附加险保额
fjPrem:0, // 附加险保费
totalPrem:'0' , //首年保费(总)
fjRiskCodeList:[],
buyFjCount:0,
buyFjList:[],
fjParam:[], //附加险入参集合
/* 被保人信息 */
insName: "",
insSex: true,
insPhone: "",
insBirthday: "1989-1-1",
/* 投保人信息 */
appName: "",
appSex: true,
appPhone: "",
appBirthday: "1989-1-1",
calculationMethod:'0', //0:保额算保费 , 1:保费算保额 , 2:份数算保费
calculation0:true,
calculation1:false,
calculation2:false,
thumbnail: ''
}
}
getAge = (dateString)=> {
let aDate = dateString.split('-');
var birthDate = new Date(aDate[0] + '-' + (parseInt(aDate[1]) < 10 ? '0' + aDate[1] : aDate[1]) + (parseInt(aDate[2]) < 10 ? '-0' + aDate[2] : '-'+aDate[2]));
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age ;
}
showToast=(val)=>{
Toast.info(val,);
}
handleDate = (val)=>{
let that = this;
this.setState({insBirthday : val});
setTimeout(function () {
if(that.state.mainInsurance){
that.getInsurance(0,val)
}
},0)
}
handleDate1 = (val)=>{
this.setState({appBirthday : val});
let that = this;
setTimeout(function () {
if(that.state.mainInsurance){
that.getInsurance(0,0,0,0,0,0,0,val)
}
},0)
}
getDate=(date)=>{
let date_value=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
this.setState({
appBirthday:date_value,
})
let that = this;
setTimeout(function () {
if(that.state.mainInsurance){
that.getInsurance(0,date)
}
},0)
}
getDate1=(date)=>{
let date_value=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
this.setState({
insBirthday :date_value,
})
let that = this;
setTimeout(function () {
if(that.state.mainInsurance){
that.setState({
mainInsurance:false,
})
that.getInsurance(0,0,0,0,0,0,0,date)
}
},0)
}
componentWillMount(){
/*
let url = window.location.href;
const matchs = decodeURI(url).match(/riskName=(.*)&riskCode=(.*)&calculationMethod=(.*)&recipients=(.*)&riskIntroduce=(.*)&thumbnail=(.*)&recipientsName=(.*)&selectd=(.*)&seriNo=(.*)/i)
let riskName = matchs[1];
let riskCode = matchs[2];
let calculationMethod =Number(matchs[3]);
let recipients = matchs[4];
let riskIntroduce = matchs[5]
let thumbnail = matchs[6]
let recipientsName = matchs[7]
let selectd = matchs[8]
let seriNo = matchs[9]
share({
decodeUrl: window.location.href.split('#')[0],
title: riskName,
desc: '您的专属保险计划书,请您查收!',
shareUrl: window.location.href,
thumbnail: thumbnail
});
let that = this;
this.setState({
calculationMethod:Number(calculationMethod),
calculation0:calculationMethod == 0?true:false,
calculation1:calculationMethod == 1?true:false,
calculation2:calculationMethod == 2?true:false,
riskName:riskName,
riskCode:riskCode,
seriNo:seriNo,
recipientsName:localStorage.getItem("recipientsName"),
recipientsSex:localStorage.getItem("recipientsSex")=='false'?false:true,
recipients:localStorage.getItem("recipients")=='false'?false:true,
selectd:localStorage.getItem("selectd")?localStorage.getItem("selectd"):selectd,
})
if(localStorage.getItem("seriNo")){
console.log(666666);
this.setState({
initInsurance:false,
})
setTimeout(function () {
that.getMessage()
that.getProspectusaAditional(0)
},0)
}
*/
let url = window.location.href;
/* const matchs = decodeURI(url).match(/riskName=(.*)&riskCode=(.*)&calculationMethod=(.*)&thumbnail=(.*)&recipientsName=(.*)&selectd=( .*)&seriNo=(.*)/i)
let riskName = matchs[1];
let riskCode = matchs[2];
let calculationMethod =Number(matchs[3]);
let thumbnail = matchs[4]
let recipientsName = matchs[5]
let selectd = matchs[6]
let seriNo = matchs[7]*/
const matchs = decodeURI(url).match(/riskName=(.*)&riskCode=(.*)&calculationMethod=(.*)&recipients=(.*)&riskIntroduce=(.*)&thumbnail=(.*)&recipientsName=(.*)&selectd=(.*)&roleId=(.*)&seriNo=(.*)/i)
let riskName = matchs[1];
let riskCode = matchs[2];
let calculationMethod =Number(matchs[3]);
let recipients = matchs[4];
let riskIntroduce = matchs[5]
let thumbnail = matchs[6]
let recipientsName = matchs[7]
let selectd = matchs[8]
let roleId = matchs[9]
let seriNo = matchs[10]
let ary = url.split('&');
ary.pop()
share({
decodeUrl: window.location.href.split('#')[0],
title: riskName,
desc: '您的专属保险计划书,请您查收!',
shareUrl: ary.join('&')+'&seriNo=',
thumbnail: thumbnail
});
let that = this;
this.setState({
calculationMethod:calculationMethod,
calculation0:calculationMethod === 0?true:false,
calculation1:calculationMethod === 1?true:false,
calculation2:calculationMethod === 2?true:false,
riskName:riskName,
riskCode:riskCode,
seriNo:seriNo,
recipientsName:localStorage.getItem("recipientsName"),
recipientsSex:localStorage.getItem("recipientsSex")==='false'?false:true,
recipients:localStorage.getItem("recipients")==='false'?false:true,
selectd:selectd,
roleId:roleId,
thumbnail: thumbnail
})
if(seriNo){
this.setState({
initInsurance:false,
})
setTimeout(function () {
that.getMessage()
that.getProspectusaAditional(0)
},0)
}
}
componentDidMount() {
document.title= this.state.riskName
shareHide(false);
this.getPayMoney()
}
componentWillUnmount(){
document.title= ''
}
/* 获取附加险 */
getProspectusaAditional=(value)=>{
let age = this.getAge(this.state.insBirthday)
let that = this;
this.props.dispatch({
type: 'planEditor/getProspectusaAditional',
payload: {
// "mainCode":localStorage.getItem("riskCode"),
"mainCode":that.state.riskCode,
"riskType":"1" //0:主险 1:附加险
},
callback(data){
let fjInsuranceList = [];
for (var i = 0; i < data.data.length; i++) {
if(age< data.data[i].maxAge+1){
fjInsuranceList.push({ value: i, label:data.data[i].riskName, riskCode:data.data[i].riskCode,fjcalculationMethod:data.data[i].calculationMethod})
}
}
let arr = [];
for (var j = 0,l=fjInsuranceList; j < l.length; j++) {
if(that.state.fjRiskCodeList.indexOf(l[j].riskCode)<0){
arr.push(l[j])
}
}
if(arr.length){
that.onChange(arr[0].value, arr[0].label,arr[0].riskCode, arr[0].fjcalculationMethod);
}else{
that.setState({
insuranceValue:-1,
})
}
that.setState({
fjInsuranceList:fjInsuranceList,
modal1:value===0?false:true,
})
},
error(data){
this.showToast(data.message)
}
})
}
/* 获取条款列表 */
getProspectusaAditiona2=()=>{
let that = this;
this.props.dispatch({
type: 'planEditor/getProspectusaAditional',
payload: {
// "mainCode": localStorage.getItem("riskCode"),
"mainCode":that.state.riskCode,
"riskType": "" //0:主险 ,1:附加险 ,''所有
},
callback(data){
let termList = [];
for (var i = 0; i < data.data.length; i++) {
termList.push({
key:0,
configName:data.data[i].riskName,
configCode:data.data[i].riskCode,
clauseUrl:data.data[i].clauseUrl,
cut:false,
},)
}
that.setState({
modal4:true,
termList:termList,
})
},
error(data){
this.showToast(data.message)
}
})
}
getMessage=()=>{
let that = this;
let riskName= localStorage.getItem("riskName")
// let riskName= localStorage.getItem("seriNo")
this.props.dispatch({
type:'home/getMyPlanMessage',
payload:{
"seriNo":this.state.seriNo,
// "seriNo":35,
"interestRate":"0.03"
},
callback(data){
let microPlanInfo = data.microPlanInfo
let microPlanFJInfo = data.microPlanFJInfo
let totalPrem = 0;
let mainTable = [
{
key:0,
0:microPlanInfo.riskName,
1:Number(microPlanInfo.amnt)||'-',
2:Number(microPlanInfo.prem)||'-',
3:microPlanInfo.payTimeName||'-',
}
]
totalPrem += Number(microPlanInfo.prem)
let fjTable = [];
let fjParam = [];
let fjRiskCodeList=[];
let fjInsuranceList=[];
if(microPlanFJInfo.length>0){
for (var i = 0; i < microPlanFJInfo.length; i++) {
fjTable.push({
key:i,
0:microPlanFJInfo[i].riskName||'-',
1:Number(microPlanFJInfo[i].amnt)||'-',
2:Number(microPlanFJInfo[i].prem)||'-',
3:microPlanFJInfo[i].payTimeName||'-',
})
fjInsuranceList.push({
value:microPlanFJInfo[i].riskCode == '111703'?0:1,
label:microPlanFJInfo[i].riskName,
riskCode:microPlanFJInfo[i].riskCode,
fjcalculationMethod:microPlanFJInfo[i].calculationMethod,
})
fjParam.push({
"riskName": microPlanFJInfo[i].riskName,
"riskCode": microPlanFJInfo[i].riskCode,
"amount": microPlanFJInfo[i].calculationMethod != 0 ?0:microPlanFJInfo[i].amnt,
"prem": microPlanFJInfo[i].calculationMethod != 1 ?0:microPlanFJInfo[i].prem,
"copies": microPlanFJInfo[i].calculationMethod != 2 ?'':microPlanFJInfo[i].copies,
"payTime": microPlanFJInfo[i].payTime,
"protectTime":microPlanFJInfo[i].protectTime,
})
totalPrem += Number(microPlanFJInfo[i].prem)
fjRiskCodeList.push(microPlanFJInfo[i].riskCode)
}
}
that.setState({
fjParam:fjParam,
buyFjList:fjParam,
microPlanInfo:microPlanInfo,
selectRecognizeeSex:microPlanInfo.appSex==='M'?true:false,
fjInsuranceList:fjInsuranceList,
insName:microPlanInfo.insName,
insSex: microPlanInfo.insSex==='M'?true:false,
insPhone:microPlanInfo.insPhone,
insBirthday:microPlanInfo.insBirthday,
//
appName: microPlanInfo.appName,
appSex: microPlanInfo.appSex==='M'?true:false,
appPhone: microPlanInfo.appPhone,
appBirthday: microPlanInfo.appBirthday,
// mainTable:'',
totalPrem:totalPrem, //首年保费(总)
payTime:microPlanInfo.payTime,
protectTime:microPlanInfo.protectTime,
coverage:microPlanInfo.payTimeName||'3年交', //缴费期间
insuranceDuration:microPlanInfo.protectTimeName||'趸缴' ,//保险期间
inputValue:microPlanInfo.amnt, //保额
inputValue1:microPlanInfo.prem, //保费
copies:microPlanInfo.copies,
mainInsuranceTable:mainTable, //主险集合
mainInsurance:true,
initInsurance:false,
fjTable:fjTable, //附加险集合
mainRiskCode:data.microPlanInfo.riskCode, //主险riskCode
fjRiskCodeList:fjRiskCodeList,
})
},
error(data){
this.showToast(data.message)
}
})
}
showModal = (key,index,item) => (e) => {
if(key == 'modal2'){
this.getPayMoney()
}else if(key == 'modal3'){
this.onChange(item.value,item.label,item.riskCode,item.fjcalculationMethod)
this.getPayMoney1(index,key)
}
e.preventDefault(); // 修复 Android 上点击穿透
this.setState({
[key]: true,
});
}
hideModalConfirm=(v)=>{
this.setState({
visible:false,
})
}
hideModalSubmit = (v)=> {
this.setState({
visible: false,
})
}
onClose = key => (e) => {
e.preventDefault();
this.setState({
[key]: false,
});
}
buy = (key) => (e) => {
e.preventDefault();
this.setState({
[key]: false,
seriNo:this.state.seriNo,
});
// 买入 主险保险
this.payInsurance(this.state.buyFjList)
}
buy1 = (key,fj) => (e) => {
e.preventDefault();
this.setState({
[key]: false,
});
// 买入 附加险保险
this.payFjInsurance(fj)
}
payInsurance=(fj)=>{
Toast.loading('loading...', 88);
let riskCode = this.state.riskCode;
let seriNo = this.state.seriNo;
let riskName = this.state.riskName;
let that = this;
this.props.dispatch({
type:'planEditor/payInsurance',
payload:{
"cusManager":localStorage.getItem("id"),
"seriNo":this.state.seriNo, //流水号
"appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同
"applicant":{
"sex":this.state.appSex ==true?'M':'F',
"birthday":this.state.appBirthday,
"name":this.state.appName,
"phone":this.state.appPhone
},
"insureds":{
"name":this.state.insName,
"sex":this.state.insSex == true?'M':'F',
"birthday":this.state.insBirthday,
"phone":this.state.insPhone
},
"mainMicroPlan":{
"riskName":riskName, //险种名称
"riskCode":riskCode, //险种编码
"amount":this.state.calculationMethod !=0?0:this.state.inputValue||this.state.microPlanInfo.amnt, // 保额 ----
"prem":this.state.calculationMethod == 1 ?this.state.inputValue1||this.state.microPlanInfo.prem:0, // 保费 -----
"copies":this.state.calculationMethod=== 2?1:"", //份数
"payTime":this.state.payTime, //缴费期间
// "protectTime":this.state.protectTime !=''?this.state.protectTime:this.state.microPlanInfo.protectTime //保险期间 ----
"protectTime":this.state.protectTime,
},
"additionalMicroPlan":fj,
"isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无
},
callback(data){
Toast.hide()
if(that.state.saveMain===true){
that.setState({
mainInsurance:false,
initInsurance:false,
seriNo:data.data.seriNo,
saveMain:false
})
}else{
that.setState({
mainInsurance:false,
initInsurance:false,
seriNo:data.data.seriNo,
})
}
that.getMessage();
},
error(data){
that.getMessage()
that.showToast(data.message)
}
})
}
payFjInsurance=(fj)=>{
let riskCode = localStorage.getItem("riskCode")
let seriNo = localStorage.getItem("seriNo")
let that = this;
this.props.dispatch({
type:'planEditor/payInsurance',
payload:{
"cusManager":localStorage.getItem("id"),
"seriNo":this.state.seriNo, //流水号
"appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同
"applicant":{
"sex":this.state.appSex===true?'M':'F',
"birthday":this.state.appBirthday,
"name":this.state.appName,
"phone":this.state.appPhone
},
"insureds":{
"name":this.state.insName,
"sex":this.state.insSex===true?'M':'F',
"birthday":this.state.insBirthday,
"phone":this.state.insPhone
},
"mainMicroPlan":{
"riskCode":this.state.riskCode, //险种编码
"amount":this.state.microPlanInfo.amnt, // 保额 ----
"prem":this.state.microPlanInfo.prem, // 保费 -----
"copies":this.state.copies, //份数
"payTime":this.state.payTime, //缴费期间
"protectTime":this.state.protectTime //保险期间 ----
},
"additionalMicroPlan": fj,
"isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无
},
callback(data){
let buyFjList = that.state.buyFjList;
let fjInsuranceList = that.state.fjInsuranceList;
that.setState({
mainInsurance:false,
initInsurance:false,
/* 添加附加险成功*/
})
that.getMessage();
},
error(data){
let buyFjList = that.state.buyFjList;
buyFjList.pop()
that.setState({
buyFjList,
insuranceValue:0
})
that.showToast(data.message)
}
})
}
getInsurance=(insSex,insBirthday,appName,insName,appPhone,insPhone,appSex,appBirthday,selectd)=>{
Toast.loading('loading...', 88);
// let riskCode = localStorage.getItem("riskCode")
// let seriNo = localStorage.getItem("seriNo")
let riskCode = this.state.riskCode;
let that = this;
this.setState({
// mainInsurance:false,
})
this.props.dispatch({
type:'planEditor/payInsurance',
payload:{
"cusManager":localStorage.getItem("id"), //客户经理id
"seriNo":this.state.seriNo, //流水号
"appInsFlag":this.state.selectd == 1 ?1:0, //投被保人是否相同 0:相同,1:不同
"applicant":{
"sex": appSex? appSex == 'M'?'M' : 'F': this.state.appSex == true ? 'M' : 'F',
"birthday":this.state.appBirthday,
"name":appName||this.state.appName,
"phone":this.state.appPhone,
},
"insureds":{
"name":insName||this.state.insName,
"sex":insSex? insSex == 'M'?'M' : 'F': this.state.insSex == true ? 'M' : 'F' ,
"birthday":this.state.insBirthday,
"phone":this.state.insPhone,
},
"mainMicroPlan":{
"riskCode":riskCode, //险种编码
"amount":this.state.calculationMethod !=0?0:this.state.microPlanInfo.amnt, // 保额 ----
"prem":this.state.calculationMethod !=1?0:this.state.microPlanInfo.prem, // 保费 -----
"copies":this.state.calculationMethod !=2?'':this.state.copies, //份数
"payTime":this.state.payTime, //缴费期间
"protectTime":this.state.protectTime||this.state.microPlanInfo.protectTime //保险期间 ----
},
"additionalMicroPlan": this.state.fjParam, //fjTable
"isSecurity":this.state.social==='有'?0:1 //是否有社保0:有,1:无
},
callback(data){
Toast.hide()
that.getMessage();
},
error(data){
that.setState({
totalPrem:0,
initInsurance:true,
buyFjList:[]
})
that.showToast(data.message)
}
})
}
blur =(key,value,phone)=>{
setTimeout(function(){
// alert(1);
if(document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA'){
return
}
let result = 'pc';
if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //判断iPhone|iPad|iPod|iOS
result = 'ios'
}else if(/(Android)/i.test(navigator.userAgent)) { //判断Android
result = 'android'
}
if( result = 'ios' ){
document.querySelector('body').scrollIntoView();
}
},10)
if(value){
if(this.state.mainInsurance){
if(this.state.selectd == 1){
// 投保人姓名
this.getInsurance(0,0,value)
}else {
//被保人姓名
this.getInsurance(0,0,0,value)
}
}
}
if(phone){
if(phone.length<11){
this.showToast('手机号码有误!')
}
if(this.state.mainInsurance){
if(this.state.selectd ==1){
this.getInsurance(0,0,0,0,phone)
}else{
this.getInsurance(0,0,0,0,0,phone)
}
}
}
}
handleChange = (e)=>{
this.setState({
selectValue:e.target.value
})
}
setInput = (e)=>{
let value = e.target.value
value = value.substring(0,10)
this.setState({
inputValue1 :value
})
}
setInput1 = (e)=>{
let value = e.target.value
value = value.substring(0,10)
this.setState({
inputValue :value
})
}
fjAmount = (e) =>{
let value = e.target.value
value = value.substring(0,10)
this.setState({
fjAmount :value
})
}
fjPrem = (e) =>{
let value = e.target.value
value = value.substring(0,10)
this.setState({
fjPrem :value
})
}
editer =(key) =>(e)=>{
e.preventDefault();
// this.setState({
// [key]:true,
// })
}
delete =(seriNo,deleteType,riskCode)=>{
let that = this;
this.props.dispatch({
type:'planEditor/deletePlan',
payload:{
"seriNo":seriNo,
"deleteType":deleteType,
"riskCode":riskCode
},
callback(){
let buyFjList = that.state.buyFjList;
if(deleteType== 1){
//附加险删除
for (var i = 0; i < buyFjList.length; i++) {
if(buyFjList[i].riskCode == riskCode){
buyFjList.splice(i,1)
let fjInsuranceList = that.state.fjInsuranceList;
fjInsuranceList.splice(i,1)
that.setState({
fjInsuranceList
})
}else{
that.setState({
insuranceValue:buyFjList[i].value,
insuranceLabel:buyFjList[i].label,
})
}
}
that.setState({
buyFjList:buyFjList
})
}
that.setState({
totalPrem:0,
saveMain:false,
editorNum:that.state.editorNum+1,
})
if(deleteType ==0){
that.setState({
initInsurance:true,
mainInsurance:false,
seriNo:'',
buyFjList:[],
fjInsuranceList:[],
// insuranceValue:0,
// insuranceLabel:that.state.fjInsuranceList[0].riskName,
});
let storage = window.localStorage;
storage.setItem("seriNo",'')
}else{
that.getMessage()
}
},
error(data){
that.showToast(data.message)
}
})
}
addInsurance =key => (e)=>{
this.setState({
[key]: true,
});
};
onChange = (value,label,riskCode,calculationMethod) => {
this.setState({
insuranceValue:value,
insuranceLabel:label,
fjRiskCode:riskCode,
fjRiskName:label,
fjcalculationMethod:calculationMethod
});
};
handleOk=()=>{
let that = this;
if(this.state.comfirm ==0){
// 是否在跟进中
this.props.dispatch({
type: 'addUser/addUser',
payload: {
"number":this.state.appPhone,
"currentState":0,
"cusManager":localStorage.getItem('id'),
"name":this.state.appName||'',
"sex": this.state.appSex == true ? '0' : '1',
"age":this.state.appBirthday||"",
},
callback(data){
that.setState({
isShowTips:false,
})
that.goCover()
}
})
}
}
goCover = ()=>{
// let seriNo = localStorage.getItem("seriNo")
// let riskName = localStorage.getItem("riskName")
// let riskCode = localStorage.getItem("riskCode")
// let thumbnail = localStorage.getItem("thumbnail")
let seriNo = this.state.seriNo;
let riskName = this.state.riskName;
let riskCode = this.state.riskCode;
let thumbnail = this.state.thumbnail;
window.location.href = window.location.href.split('#')[0]+'#/planResult?seriNo='+seriNo+'&riskName='+riskName +'&riskCode='+riskCode+'&thumbnail='+thumbnail
}
closeInsurance = ()=>{
this.setState({
modal1: false,
modal3: false,
insurance1:true,
});
}
/*附加险 缴费期间,*/
getPayMoney1=(index,key)=>{
let that = this;
this.props.dispatch({
type:'addUser/PremiumPaymentPeriod',
payload:{
"riskCode":this.state.fjRiskCodeList[index] ?this.state.fjRiskCodeList[index]: this.state.fjRiskCode,
"maxAge":"",
"birthday":this.state.insBirthday,
"pageNo":1
},
callback(data){
let insuranceDurationList = [],
paymentList=[];
let data1 = []
for (var i = 0; i < data.length; i++) {
data1.push({label:data[i].protectTimeName,protectTime:data[i].protectTime,id:false})
paymentList.push({value:i,label:data[i].payTimeName,payTime:data[i].payTime,minAmnt:data[i].minAmnt,minPrem:data[i].minPrem})
}
var result = [];
var obj = {};
for(var i =0; i<data1.length; i++){
if(!obj[data1[i].id]){
result.push({value:i,label:data1[i].label,protectTime:data1[i].protectTime,minAmnt:data[i].minAmnt,minPrem:data[i].minPrem});
obj[data1[i].id] = true;
}
}
if(result.length>0){
that.setState({
addProtectTime:result[0].protectTime, //保险期间后端传值
addInsuranceDuration:result[0].label, //保险期间
})
}
if(paymentList.length>0){
that.setState({
addCoverage:that.state.addCoverage?that.state.addCoverage:paymentList[paymentList.length-1].label, //缴费期间
addPayTime :that.state.addPayTime?that.state.addPayTime:paymentList[paymentList.length-1].payTime,
minPrem:paymentList[paymentList.length-1].minPrem,
})
}
that.setState({
paymentList:paymentList,
insuranceDurationList:result
})
},
error(data){
this.showToast(data.message)
}
})
}
/* 获取保额,保费列表*/
getPayMoney=()=>{
let that = this;
this.props.dispatch({
type:'addUser/PremiumPaymentPeriod',
payload:{
"riskCode":this.state.riskCode,
"maxAge":"",
"birthday":this.state.insBirthday,
"pageNo":1
},
callback(data){
let insuranceDurationList = [],
paymentList=[];
let data1 = []
for (var i = 0; i < data.length; i++) {
data1.push({label:data[i].protectTimeName,protectTime:data[i].protectTime,id:false})
paymentList.push({value:i,label:data[i].payTimeName,payTime:data[i].payTime,minAmnt:data[i].minAmnt,minPrem:data[i].minPrem})
}
var result = [];
var obj = {};
for(var i =0; i<data1.length; i++){
if(!obj[data1[i].id]){
result.push({value:i,label:data1[i].label,protectTime:data1[i].protectTime,minAmnt:data[i].minAmnt,minPrem:data[i].minPrem});
obj[data1[i].id] = true;
}
}
that.setState({
paymentList:paymentList,
insuranceDurationList:result,
})
if(result.length>0){
that.setState({
protectTime:result[0].protectTime, //保险期间后端传值
insuranceDuration:result[0].label, //保险期间
})
}
if(paymentList.length>0){
that.setState({
coverage:that.state.coverage?that.state.coverage:paymentList[paymentList.length-1].label, //缴费期间
payTime:that.state.payTime===0||that.state.payTime?that.state.payTime:paymentList[paymentList.length-1].payTime,
minPrem:paymentList[paymentList.length-1].minPrem,
}) }
},
error(data){
this.showToast(data.message)
}
})
}
change= ( value )=>{
this.setState({
selectCoverage:value,
})
}
render() {
let {fjRiskCodeList,insSex,appSex,paymentList,recipients,mainInsuranceTable} = this.state
const value = this.state;
let microPlanInfo = this.state.microPlanInfo;
return (
<div className={styles.box}>
{/*被保人信息*/}
<div className={styles.recognizee}>
<div className={styles.message}>
被保人信息
</div>
<div className={styles.detail}>
<div className={styles.sex}>
<div className={styles.left}>
性别
</div>
<div className={styles.right}>
<span className={insSex=== true?styles.selectBoy:styles.boy} onClick={()=>{
this.setState({insSex:true})
if(this.state.mainInsurance){
this.setState({
mainInsurance:false,
})
this.getInsurance('M')
}
}}>
男
</span>
<span className={insSex===true?styles.girl:styles.selectGirl} onClick={()=>{
this.setState({insSex:false})
if(this.state.mainInsurance){
this.setState({
mainInsurance:false,
})
this.getInsurance('F')
}
}}>
女
</span>
</div>
</div>
<div className={styles.sex}>
<div className={styles.left}>
出生日期
</div>
<div className={styles.right}>
<span className={styles.date}>{this.state.insBirthday}</span>
<img src={require('../../assets/image/calendar.png')} alt="" onClick={(e)=>{
this.child1.showDate1('app')
}}/>
</div>
</div>
</div>
</div>
{/*投保人非本人*/}
<div className={styles.recognizee}>
<div className={styles.message}>
<div className={styles.self}>
投保人非本人 &nbsp;
<span style={{fontSize:'.15rem'}}>(豁免相关)</span>
</div>
<div className={styles.select} >
<div>
<img src={this.state.selectd == 1?require('../../assets/image/selected.png'):require('../../assets/image/no-selected.png')} alt="" className={styles.selectd1}
onClick={()=>{
this.setState({
selectd:1
})
let that = this;
setTimeout(function () {
if(that.state.mainInsurance) {
that.getInsurance(0, 0, 0, 0, 0, 0, 0, 0, 1)
}
},0)
}}
/>
<span className={styles.yes}>是</span>
</div>
<div>
<img src={this.state.selectd ==2?require('../../assets/image/selected.png'):require('../../assets/image/no-selected.png')} alt="" className={styles.selectd2} onClick={()=>{
this.setState({
selectd:2
})
let that = this;
setTimeout(function () {
if(that.state.mainInsurance) {
that.getInsurance(0, 0, 0, 0, 0, 0, 0, 0, 2)
}
},0)
}}
/>
<span className={styles.no}>否</span>
</div>
</div>
</div>
<div className={styles.detail}>
{this.state.selectd !=0 && <div className={styles.sex}>
<div className={styles.left}>
姓名
<input type="text" placeholder="请输入投保人姓名" value={this.state.appName} onBlur={()=>{
::this.blur('',this.state.appName)}
} onChange={(e)=>{
this.setState({
appName:e.target.value,
})
// if(this.state.mainInsurance){
// if(this.state.selectd == 1){
// // 投保人姓名
// this.getInsurance(0,0,e.target.value)
// }else {
// //被保人姓名
// this.getInsurance(0,0,0,e.target.value)
// }
// }
}} />
</div>
</div> }
{this.state.selectd !=0 &&
<div className={styles.sex}>
<div className={styles.left}>
手机号码
<input type="number" placeholder="请输入投保人手机号码" onBlur={()=>{
::this.blur('','',this.state.appPhone)
}} value={this.state.appPhone} onChange={(e)=>{
let value = e.target.value
value = value.substring(0, 11);
this.setState({
appPhone:value,
})
}
}/>
</div>
</div>}
{this.state.selectd == 1 && <div className={styles.sex}>
<div className={styles.left}>
性别
</div>
<div className={styles.right}>
<span className={appSex===false?styles.boy:styles.selectBoy} onClick={()=>{
this.setState({appSex:true})
if(this.state.mainInsurance){
this.getInsurance(0,0,0,0,0,0,'M')
}
}}>
男
</span>
<span className={appSex===false?styles.selectGirl:styles.girl} onClick={()=>{
this.setState({appSex:false})
if(this.state.mainInsurance){
this.getInsurance(0,0,0,0,0,0,'F')
}
}}>
女
</span>
</div>
</div>
}
{
this.state.selectd == 1 &&
<div className={styles.sex}>
<div className={styles.left}>
出生日期
</div>
<div className={styles.right}>
<span className={styles.date}>{this.state.appBirthday}</span>
<img src={require('../../assets/image/calendar.png')} alt="" onClick={()=>{
this.child.showDate('ins')
}
}/>
</div>
</div>}
</div>
</div>
{/*险种选择*/}
<div className={styles.recognizee}>
<div className={styles.message}>
险种选择
</div>
{this.state.initInsurance &&<div className={styles.detail}>
<div className={styles.sex} >
<div className={styles.left} >
{/*{this.props.location.query.riskName}*/}
{this.state.riskName}
</div>
<div className={styles.right}>
<img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={ this.showModal('modal2')
} />
</div>
</div>
</div>}
{this.state.mainInsurance&&<div className={styles.detail} >
<div className={styles.sex} style={{height:'auto'}}>
<div className={styles.left}>
{this.state.riskName} <span style={{marginLeft:'.2rem'}}>首年保费 {this.state.mainInsuranceTable[0][2].toFixed(2)}</span>
</div>
<div className={styles.right} style={{zIndex:1}}>
<img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={ this.showModal('modal2')
} style={{position:'initial'}}/>
<img src={require('../../assets/image/delete.png')} alt="" className={styles.editor} onClick={(e)=>{
e.preventDefault()
this.delete(this.state.seriNo,0,this.state.mainRiskCode)
}
} style={{marginLeft:'.2rem',position:'initial'}}/>
</div>
<div>
<Table listTitle={this.state.mainInsuranceTitle} listTable={mainInsuranceTable}></Table>
</div>
</div>
{
this.state.fjTable && this.state.fjTable.map((item,index)=>{
return (
<div className={styles.sex} style={{height:'auto'}} key={index}>
<div className={styles.left}>
{this.state.fjTable[index][0]} <span style={{marginLeft:'.2rem'}}>首年保费 {this.state.fjTable[index][2].toFixed(2)}</span>
</div>
<div className={styles.right} style={{zIndex:1}}>
<img src={require('../../assets/image/editor.png')} alt="" className={styles.editor} onClick={this.showModal('modal3',index,this.state.fjInsuranceList[index])} style={{position:'initial'}}/>
<img src={require('../../assets/image/delete.png')} alt="" className={styles.editor} onClick={
(e)=>{
let fjRiskCodeList = this.state.fjRiskCodeList
e.preventDefault()
this.delete(this.state.seriNo,1,fjRiskCodeList[index])
}
} style={{marginLeft:'.2rem',position:'initial'}}/>
</div>
<div>
<Table listTitle={this.state.mainInsuranceTitle} listTable={[this.state.fjTable[index]]}></Table>
</div>
</div>
)
})
}
<div style={{height:'.5rem',marginTop:'.1rem'}}>
<span style={{border:'1px solid #FF5167', borderRadius:'5px', padding:'.05rem .1rem',color:'#FF5167',float:'none',position:'relative',right:'-2.25rem',top:'.15rem'}} onClick={(e)=>{
e.preventDefault()
this.getProspectusaAditional();
}
}> + 添加主/附加险</span>
</div>
</div>
}
</div>
{/*收件人信息*/}
<div className={styles.recognizee}>
<div className={styles.message}>
<div className={styles.self}>
收件人信息
</div>
<div className={styles.select} >
<div>
<img src={recipients=== true?require('../../assets/image/selected.png'):require('../../assets/image/no-selected.png')} alt="" className={styles.selectd2 && styles.recipients} onClick={()=>{
this.setState({
recipients:!this.state.recipients
})
}}
/>
</div>
</div>
</div>
<div className={styles.detail}>
{recipients === true && <div className={styles.sex}>
<div className={styles.left}>
姓名
<input type="text" placeholder="请输入收件人姓名" value={this.state.recipientsName} onBlur={::this.blur} onChange={(e)=>{
this.setState({
recipientsName:e.target.value,
})
}
}/>
</div>
</div> }
{recipients === true &&
<div className={styles.sex}>
<div className={styles.left}>
性别
</div>
<div className={styles.right}>
<span className={this.state.recipientsSex === false?styles.boy:styles.selectBoy} onClick={()=>{
this.setState({
recipientsSex:true,
})
}
}>
男
</span>
<span className={this.state.recipientsSex === true?styles.girl:styles.selectGirl} onClick={()=>{
this.setState({
recipientsSex:false,
})
}
}>
女
</span>
</div>
</div>
}
</div>
</div>
{/*<Date onRef = {(ref)=>{
this.child = ref;
}} handleDate = {this.handleDate} >
</Date>
<Date onRef = {(ref)=>{
this.child1 = ref;
}} handleDate = {this.handleDate1} >
</Date>*/}
{/*底部首年保费*/}
{/*<Table></Table>*/}
<div className={styles.bottom}>
<div className={styles.left}>
<p onClick={() =>
{
}
}>首年保费</p>
<p className={styles.num}>{this.state.totalPrem}<span>.00</span></p>
</div>
<div className={styles.right}>
<span style={{marginRight:'.11rem'}} className={this.state.color ===true ?styles.color:''} onClick={()=>{
this.getProspectusaAditiona2()
}}>产品条款</span>
<span style={{marginRight:'.21rem'}} className={this.state.color ===false ?styles.color:''} onClick={()=>{
if(this.state.mainInsurance){
let storage = window.localStorage;
storage.setItem("recipientsName",this.state.recipientsName)
storage.setItem("recipientsSex",this.state.recipientsSex)
storage.setItem("recipients",this.state.recipients)
storage.setItem("seriNo",this.state.seriNo)
storage.setItem("selectd",this.state.selectd)
// // this.props.history.push('/planResult')
// let seriNo = localStorage.getItem("seriNo")
// let riskName = localStorage.getItem("riskName")
// let riskCode = localStorage.getItem("riskCode")
// let thumbnail = localStorage.getItem("thumbnail")
let that = this;
if(this.state.roleId == 3){
this.goCover()
}
else if(this.state.appPhone){
this.props.dispatch({
type: 'addUser/isFollow',
payload: {
"number":this.state.appPhone,
},
callback(data){
if(data.length){
// return false;
// 有数据生成计划,
that.goCover();
}else{
//提示是否添加到跟进中,
that.setState({
comfirm:0, //跟进中
isShowTips:true,
})
}
}
})
}
else{
this.goCover()
}
}else{
this.showToast('请先选择险种信息!')
}
// this.goCover()
}}>生成计划书</span>
</div>
</div>
<WingBlank>
<WhiteSpace />
<Modal
popup
visible={this.state.modal2}
onClose={this.onClose('modal2')}
animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
backgroundColor:'white',
maxHeight:'6rem',
overflowY:'scroll'
}}
>
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>{this.state.riskName} <span style={{float:'right',}} onClick={this.onClose('modal2')}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}}/>
</span></div>} className="popup-list">
{/* 只有一个值*/}
{this.state.insuranceDuration != '' && this.state.insuranceDurationList.length==1 &&
<List.Item>保险期间
<div style={{float:'right',position:'relative'}} >
<div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}> {this.state.insuranceDuration}</div>
</div>
</List.Item>
}
{/* 有多个值 */}
{this.state.insuranceDurationList.length != 1 && <List.Item>保险期间
<div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker
data={this.state.insuranceDurationList}
cols={1}
disabled={this.state.insuranceDurationList.length==1?true:false}
onChange={
(s)=>{
let insuranceDurationList = this.state.insuranceDurationList;
for (var i = 0; i < insuranceDurationList.length; i++) {
if(i == s){
this.setState({
protectTime:insuranceDurationList[i].protectTime,
insuranceDuration:insuranceDurationList[i].label,
})
}
}
}
}
>
<div className={styles.choose} onClick={()=>{
}}><span>{this.state.insuranceDuration!=='' ? this.state.insuranceDuration : this.state.insuranceDuration}</span></div>
</Picker>
</div>
</List.Item>
}
{/* 一个值*/}
{this.state.paymentList && this.state.coverage.length ==1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} >
{this.state.coverage}
</div>
</List.Item>}
{/*多个值*/}
{this.state.paymentList && this.state.coverage.length>1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} >
<Picker
data={this.state.paymentList}
cols={1}
onChange={
v => {
let paymentList = this.state.paymentList;
for (var i = 0; i < paymentList.length; i++) {
if(i == v){
this.setState({
coverage:paymentList[i].label,
payTime:paymentList[i].payTime,
minAmnt:paymentList[i].minAmnt,
minPrem:paymentList[i].minPrem,
})
}
}
}
}
>
<div className={styles.choose} ><span>{this.state.coverage!=='' ? this.state.coverage : '3年缴'}</span></div>
</Picker>
</div>
</List.Item>}
{
this.state.calculationMethod == 0 && <List.Item >保额
<div style={{float:'right'}}>
<input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.15rem'}}
placeholder={'最低保额'+this.state.minAmnt}
id="pp" type="number" pattern="[0-9]*" name="password" onBlur={::this.blur} value={this.state.inputValue} onChange={this.setInput1}/>
</div>
</List.Item>
}
{this.state.calculationMethod == 1 && <List.Item >保费
<div style={{float:'right',}}>
<input className={styles.input} style={{width:'1.5rem',border:'1px solid #f0f0f1',paddingLeft:'.1rem',height:'.3rem',fontSize:'.15rem',borderRadius:'4px'}}
placeholder={'最低保费'+ this.state.minPrem}
value={ this.state.inputValue1}
id="pp" type="number" pattern="[0-9]*" name="password" onBlur={::this.blur} onChange={this.setInput}/>
{/* <InputItem
className={styles.e_phoneNum}
type='number'
placeholder="最低为10000元"
// error={this.state.hasError}
// onErrorClick={this.onErrorClick}
// onChange={this.onChange}
// value={this.state.value}
/>*/}
</div>
</List.Item>
}
{
this.state.calculationMethod == 2 && <List.Item >份数
<div style={{float:'right'}}>
<div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}> 1</div>
</div>
</List.Item>
}
<List.Item>
<Button onClick={this.buy('modal2')} style={{color:'white',backgroundColor:'#FF9D5B',float:'none'}}>确定</Button>
</List.Item>
</List>
</Modal>
<Modal
popup
visible={this.state.modal1}
onClose={this.onClose('modal1')}
animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'scroll'
}}
>
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>添加主/附加险 <span style={{float:'right',}} onClick={
()=>{
// this.setState({
// modal1:false,
// modal3:true,
// })
// this.getPayMoney1()
}
}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={()=>{
this.setState({
modal1:false,
})
}
}/>
{/*确定*/}
</span></div>} className="popup-list">
</List>
<List>
{ this.state.fjInsuranceList && this.state.fjInsuranceList.map((i,idx) => {
return(
<RadioItem key={i.value}
checked={this.state.insuranceValue===i.value}
//fjRiskCodeList.indexOf(i.riskCode)>-1?false:true
//this.state.insuranceValue == i.value
disabled={fjRiskCodeList.indexOf(i.riskCode)>-1?true:false}
onChange={() => this.onChange(i.value,i.label,i.riskCode,i.fjcalculationMethod)}>
{i.label}
</RadioItem>
)
})}
{}
</List>
<List.Item>
<Button onClick={()=>{
if(this.state.fjRiskCodeList.length==this.state.fjInsuranceList.length){
}else{
this.setState({
modal1:false,
modal3:true,
})
this.getPayMoney1('modal3')
}
}} style={{color:'white',backgroundColor:'#FF9D5B',float:'none'}}>确定</Button>
</List.Item>
</Modal>
<Modal
popup
visible={this.state.modal3}
onClose={this.onClose('modal3')}
animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'scroll'
}}
>
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>{this.state.insuranceLabel} <span style={{float:'right',}} onClick={
()=>{
this.setState({
insurance1:true,
})
this.closeInsurance()
}
}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}}/>
</span></div>} className="popup-list">
</List>
<List>
{this.state.insuranceDurationList.length == 1 &&<List.Item >保险期间
<div style={{float:'right'}}>
<div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}> {this.state.addInsuranceDuration}</div>
</div>
</List.Item> }
{this.state.insuranceDurationList.length>1 &&<List.Item>保险期间
<div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker
data={this.state.insuranceDurationList}
cols={1}
disabled={this.state.insuranceDurationList.length===1?true:false}
onChange={
(s)=>{
let insuranceDurationList = this.state.insuranceDurationList;
for (var i = 0; i < insuranceDurationList.length; i++) {
if(i === s){
this.setState({
addProtectTime:insuranceDurationList[i].protectTime,
addInsuranceDuration:insuranceDurationList[i].label,
})
}
}
}
}
>
<div className={styles.choose} ><span>{ this.state.addInsuranceDuration }</span></div>
</Picker>
</div>
</List.Item> }
{
this.state.paymentList && paymentList.length ==1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} >
<div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}> {this.state.addCoverage}</div>
</div>
</List.Item>
}
{
this.state.paymentList && paymentList.length > 1 && <List.Item>缴费期间
<div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker
data={this.state.paymentList}
cols={1}
disabled={paymentList.length===1?true:false}
onChange={
v => {
let paymentList = this.state.paymentList;
for (var i = 0; i < paymentList.length; i++) {
if(i == v){
this.setState({
addCoverage:paymentList[i].label,
addPayTime:paymentList[i].payTime,
minAmnt:paymentList[i].minAmnt,
minPrem:paymentList[i].minPrem,
})
}
}
}
}
>
<div className={styles.choose} ><span >{this.state.addCoverage}</span></div>
</Picker>
</div>
</List.Item>
}
{
this.state.fjcalculationMethod == 0 && this.state.fjRiskCode === '121705' && <List.Item >保额
<div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}/>*/}
<Picker
data={[{value:'0',label:5000},{value:'1',label:10000},{value:'2',label:15000},{value:'3',label:20000}]}
cols={1}
onChange={
v => {
let paymentList = [{value:'0',label:5000},{value:'1',label:10000},{value:'2',label:15000},{value:'3',label:20000}];
for (var i = 0; i < paymentList.length; i++) {
if(i == v){
this.setState({
fjAmount:paymentList[i].label
})
}
}
}
}
>
<div className={styles.choose} ><span>{this.state.fjAmount !='' ? this.state.fjAmount : '5000'}</span></div>
</Picker>
</div>
</List.Item>
}
{
this.state.fjcalculationMethod == 0 && this.state.fjRiskCode != '121705' && <List.Item >保额
<div style={{float:'right'}}>
<input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.15rem'}}
placeholder={'最低保额'+this.state.minAmnt}
onBlur={::this.blur}
id="pp" type="number" pattern="[0-9]*" name="password" value={this.state.fjAmount} onChange={this.fjAmount}/>
</div>
</List.Item>
}
{
this.state.fjcalculationMethod == 1 && <List.Item >保费
<div style={{float:'right'}}>
<input style={{width:'1.5rem',border:'1px solid #ddd',paddingLeft:'.1rem',height:'.3rem',fontSize:'.18rem'}}
placeholder={'最低保费'+this.state.minPrem}
onBlur={::this.blur}
id="pp" type="number" pattern="[0-9]*" name="password" value={this.state.fjPrem} onChange={this.fjPrem}/>
</div>
</List.Item>
}
{
this.state.fjcalculationMethod == 2 && <List.Item >份数
<div style={{float:'right'}}>
<div style={{width:'1.5rem', fontSize: '.15rem', color:'#000',textIndent:'.1rem'}}> 1</div>
</div>
</List.Item>
}
{
this.state.insuranceValue == 0 && <List.Item>有无社保
<div style={{float:'right',position:'relative'}} >
{/*<Select list={this.state.coverageList} changeValue={this.change}></Select>*/}
<Picker
data={[{value:'0',label:'有'},{value:'1',label:'无'}]}
cols={1}
onChange={
v => {
let paymentList = [{value:'0',label:'有'},{value:'1',label:'无'}];
for (var i = 0; i < paymentList.length; i++) {
if(i == v){
this.setState({
social:paymentList[i].label,
})
}
}
}
}
>
<div className={styles.choose} ><span>{this.state.social !=='' ? this.state.social : '请选择'}</span></div>
</Picker>
</div>
</List.Item>
}
<List.Item>
<Button onClick={()=>{
let buyFjList = this.state.buyFjList;
buyFjList.push({
"riskName": this.state.insuranceLabel,
"riskCode": this.state.fjRiskCode,
"amount": this.state.fjcalculationMethod == 0 ? this.state.fjAmount : 0,
"prem": this.state.fjcalculationMethod == 1 ? this.state.fjPrem : 0,
"copies": this.state.fjcalculationMethod == 2 ? 1 : "",
"payTime": this.state.addPayTime,
"protectTime": this.state.addProtectTime,
})
// this.buy1('modal3', buyFjList)
this.payFjInsurance(buyFjList)
this.setState({
modal3:false,
buyFjList:buyFjList,
})
}} style={{color:'white',backgroundColor:'#FF9D5B',float:'none'}}>确定</Button>
</List.Item>
</List>
</Modal>
<Modal
popup
visible={this.state.modal4}
onClose={this.onClose('modal4')}
animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'scroll'
}}
>
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>条款列表<span style={{float:'right',}} onClick={this.closeInsurance}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={this.onClose('modal4')}/>
</span></div>} className="popup-list">
</List>
<List>
<List.Item >
<div style={{color:'#999999'}}>{this.state.riskName}</div>
</List.Item>
{this.state.termList.map((item,index)=>{
return(
<List.Item style={{left:'.1rem'}} key={index}>{item.configName}
<div style={{float:'right',position:'relative',right:'.1rem'}} >
<img src={item.cut != true?require('../../assets/image/open.png'):require('../../assets/image/off.png')} alt="" style={{width:'.14rem',height:'.08rem'}} onClick={()=>{
let that = this;
let termList = this.state.termList;
termList[index].cut = !termList[index].cut
this.setState({
termList:termList,
// riskCode:item.configCode,
})
/* 条款列表详情接口 */
this.props.dispatch({
type:'planEditor/PlanClause',
payload:{
"riskCode":item.configCode,
"pageNo":1
},
callback(data){
that.setState({
clauseUrlList:data.data[0].clauseUrlList
})
},
error(data){
this.showToast(data.message)
}
})
}}/>
</div>
{
item.cut && <div>
<span style={{color:'#888',fontSize:'.14rem' }}>条款预览</span>
<span className={styles.deta} onClick={()=>{
window.location.href = item.clauseUrl
}}> 查看详情</span>
{this.state.clauseUrlList.map((item,index)=>{
return(
<div key={index}>
<img src={item.configInfo} alt="" style={{height:'100%',width:'100%'}}/>
</div>
)
})
}
</div>
}
</List.Item>
)
})}
</List>
</Modal>
<Modal
popup
visible={this.state.modal5}
onClose={this.onClose('modal5')}
animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
}}
>
<List renderHeader={() => <div style={{fontSize:'.18rem',color:'#000'}}>hauxia<span style={{float:'right',}} onClick={this.closeInsurance}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.14rem',height:'.14rem'}} onClick={this.onClose('modal5')}/>
</span></div>} className="popup-list">
</List>
<List>
<List.Item style={{left:'.1rem'}} >
{this.state.text}
</List.Item>
</List>
</Modal>
</WingBlank>
<LocalizedModal visible={this.state.visible} hideModal={this.hideModalConfirm} onClick={this.state.submit} message={this.state.message}
/>
<DatePicker onRef = {(ref)=>{
this.child = ref;
}} getDate = {(date)=>{
this.getDate(date)
}} >
</DatePicker>
<DatePicker onRef = {(ref)=>{
this.child1 = ref;
}} getDate = {(date)=>{
this.getDate1(date)
}}>
</DatePicker>
<ConfirmPop show={this.state.isShowTips} title="提示" handleOK={this.handleOk}
handleCancel={() => {
this.setState({
isShowTips: false
})
if(this.state.comfirm == 0){
this.goCover()
}
}}
>
<p>您是否确定添加该客户到跟进中?</p>
</ConfirmPop>
</div>
)
}
}
AddPlanEditor.propsTypes = {}
export default connect(({home})=>({home}))(AddPlanEditor)
...@@ -70,17 +70,12 @@ body{ ...@@ -70,17 +70,12 @@ body{
} }
.life>p{ .life>p{
/* color: #FF9D5C; color: #FF9D5C;
font-size: .17rem; font-size: .17rem;
position: absolute; position: absolute;
top: .08rem; top: .08rem;
left: 50%; left: 50%;
margin-left: -.25rem; */ margin-left: -.25rem;
color: #FF9D5C;
font-size: .17rem;
position: relative;
top: -.38rem;
margin: 0 auto;
} }
.insureMessage{ .insureMessage{
...@@ -238,18 +233,6 @@ body{ ...@@ -238,18 +233,6 @@ body{
line-height: .4rem; line-height: .4rem;
margin-left: .2rem; margin-left: .2rem;
} }
.illness_hxf{
width: .87rem;
height: .4rem;
background-color: #FF9D5C;
border-radius: 6px;
display: inline-block;
font-size: .15rem;
color: #FFFFFF;
text-align: center;
line-height: .4rem;
margin: 0 .2rem;
}
/* 保单利益*/ /* 保单利益*/
...@@ -291,9 +274,9 @@ body{ ...@@ -291,9 +274,9 @@ body{
} }
/** { touch-action: pan-y; }*/ /** { touch-action: pan-y; }*/
span{float: none} span{float: none}
/*:global(.am-list-item){ :global(.am-list-item){
padding-left: 0; padding-left: 0;
}*/ }
.list{ .list{
padding-left: .11rem; padding-left: .11rem;
/* margin-left: .2rem; */ /* margin-left: .2rem; */
...@@ -342,25 +325,16 @@ span{float: none} ...@@ -342,25 +325,16 @@ span{float: none}
background: #FFF7F1; background: #FFF7F1;
} }
.welcome p.btn { .welcome p.p {
left: 50%;
bottom: 66px;
width: 1rem;
height: 1rem;
margin-left: -.43rem;
margin-bottom: 0;
text-align: center; text-align: center;
position: absolute; position: absolute;
top: 50%; top: 50%;
color: #FF9D5C; color: #FF9D5C;
font-size: .2rem; font-size: .2rem;
left:0; width: 100%;
line-height: .26rem; line-height: .26rem;
margin-top: 2rem; margin-top: 2rem;
} }
.welcome p span {
display: block;
}
...@@ -399,14 +373,3 @@ span{float: none} ...@@ -399,14 +373,3 @@ span{float: none}
.plus>img{ .plus>img{
width: 100%; width: 100%;
} }
.modalCss1{
position: fixed;
margin-left: -2.07rem;
left: 50%;
width: 4.14rem;
max-width: 680px;
max-height:6rem;
overflow-y:auto
}
...@@ -6,19 +6,26 @@ import { Modal, List,Radio, WhiteSpace, WingBlank,Slider} from 'antd-mobile'; ...@@ -6,19 +6,26 @@ import { Modal, List,Radio, WhiteSpace, WingBlank,Slider} from 'antd-mobile';
import moment from 'moment'; import moment from 'moment';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
// import React from "react";
import share from "../../utils/share"; import share from "../../utils/share";
import Iscroll from "../../components/Iscroll";
import {urlGetParams} from '../../utils/dataFilter'
import {ProtectionItem,SeriousDiseaseList,
MiddleDiseaseList,GeneralDiseaseList,
SeriousDiseaseList_hxf,GeneralDiseaseList_hxf,
SeriousDiseaseList_hxf_huomian,GeneralDiseaseList_hxf_huomian,
SeriousDiseaseList_cqs,GeneralDiseaseList_cqs} from "../../utils/staticData";
moment.locale('zh-cn'); // import '../../utils/pdf'
// import '../../utils/pdf.worker'
moment.locale('zh-cn');
const RadioItem = Radio.RadioItem; const RadioItem = Radio.RadioItem;
const isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let moneyKeyboardWrapProps;
if (isIPhone) {
moneyKeyboardWrapProps = {
onTouchStart: e => e.preventDefault(),
};
}
function closest(el, selector) { function closest(el, selector) {
const matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector; const matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
while (el) { while (el) {
...@@ -30,21 +37,131 @@ function closest(el, selector) { ...@@ -30,21 +37,131 @@ function closest(el, selector) {
return null; return null;
} }
class PlanResult extends Component { class PlanResult extends Component {
constructor(props){ constructor(props){
super(props) super(props)
this.state={ this.state={
// list:[
// {
// title:'健康保障',
// obj:[
// {
// title:'82种重疾保障,守护您的健康',
// obj:[
// {title:'18岁至60岁付10万元/已交保费/现价最大者'},
// {title:'18岁至60岁付10万元/已交保费/现价最大者'}
// ]
// },
// {
// title:'42种轻症保障,更添一种关爱',
// obj:[
// {title:'18岁至60岁付10万元/已交保费/现价最大者'},
// {title:'18岁至60岁付10万元/已交保费/现价最大者'},
// {title:'18岁至60岁付10万元/已交保费/现价最大者'},
// {title:'18岁至60岁付10万元/已交保费/现价最大者'},
// {title:'18岁至60岁付10万元/已交保费/现价最大者'},
// {title:'18岁至60岁付10万元/已交保费/现价最大者'}
// ]
// }
// ]
//
// },
// {
// title:'固定领取',
// obj:[
// {
// title:'88岁返还祝寿金10000元',
// obj:[{title:'给付完毕合同继续有效,提供高品质晚年生活'}
// ]
// }
// ]
// },
// {
// title:'保费豁免',
// obj:[{title:'被保人确诊轻症,豁免主、附加险后期保费'}]
// },
// {
// title:'身故保障',
// obj:[
// {
// title:'8岁后给付 10000 万元/已交保费/现金价值最大',
// obj:[
// {
// title:'等待期90日内因非意外原因导致重疾/全残/身故,返还已缴纳保费,主险和附加险合同终止'
// },
// {
// title:'重疾保障金、疾病终末期保障金、身故/全残保险金,只赔付其中一项'
// }
// ]
// },
// ]
//
// },
// {
// title:'保单利益',
//
// },
// {
// title:'查看条款',
// },
// {
// title:'风险提示',
// obj:[{title:'被保人确诊轻症,豁免主、附加险后期保费',obj:[
// {
// title:'*等待期90日内因非意外原因导致重疾/全残/身故,返还已缴纳保费,主险和附加险合同终止'
// },
// {
// title:'*重疾保障金、疾病终末期保障金、身故/全残保险金,只赔付其中一项'
// }
// ]},
// ]
// },
// ],
termList:[], termList:[],
clauseUrlList:[], clauseUrlList:[],
modal:ProtectionItem, modal:[
{
img:require('../../assets/image/getMoney.png'),
text:'固定领取'
},
{
img:require('../../assets/image/health.png'),
text:'健康保障'
},
{
img:require('../../assets/image/medical.png'),
text:'医疗保障'
},
{
img:require('../../assets/image/safeguard.png'),
text:'身故保障'
},
{
img:require('../../assets/image/exempt.png'),
text:'保费豁免'
},
{
img:require('../../assets/image/else.png'),
text:'其他保障'
},
],
year:0, year:0,
age:0, age:0,
money:15236, money:15236,
modal1: false, modal1: false,
modal2: false, modal2: false,
modal3: false, modal3: false,
modal4: false, modal4: false,
modal5: false,
pdf:'', pdf:'',
allTime:[], allTime:[],
tableTitle:[ tableTitle:[
{ {
...@@ -110,8 +227,11 @@ class PlanResult extends Component { ...@@ -110,8 +227,11 @@ class PlanResult extends Component {
3:'74', 3:'74',
} }
], ],
insuranceValue:0, insuranceValue:0,
cutButton:false, cutButton:false,
seriNo:'', seriNo:'',
insName:'', //姓名 insName:'', //姓名
insAge:'', //年龄 insAge:'', //年龄
...@@ -125,86 +245,203 @@ class PlanResult extends Component { ...@@ -125,86 +245,203 @@ class PlanResult extends Component {
fjRiskCodeList:[], //附加险code集合 fjRiskCodeList:[], //附加险code集合
cctHealth:false, // 常春藤-健康保障 cctHealth:false, // 常春藤-健康保障
hxfHealth:false, // 华夏福-健康保障
cqsHealth:false, // 常青树-健康保障
flmGetMoney:false, //福临门-固定领取 flmGetMoney:false, //福临门-固定领取
zhenaiGetMoney:false, //珍爱-固定领取
hxfGetMoney:false, //华夏福-固定领取
hxhnjGetMoney:false, //华夏红年金-固定领取
cctPremExempt:false, //常春藤保费豁免 cctPremExempt:false, //常春藤保费豁免
flmPremExempt:false, // 福临门保费豁免 flmPremExempt:false, // 福临门保费豁免
zhenaiPremExempt:false, // 珍爱保费豁免 cctDieSafeguard:false , // 福临门身故保障
hxfPremExempt:false,//华夏福附加重大豁免险种 保费豁免
cqsPremExempt:false,//常青树 保费豁免
hxhnjPremExempt:false,//华夏红年金 保费豁免
cctDieSafeguard:false , // 常春藤身故保障
flmDieSafeguard:false , // 福临门身故保障 flmDieSafeguard:false , // 福临门身故保障
zhenaiDieSafeguard:false , // 珍爱身故保障
hxfDieSafeguard:false , // 华夏福身故保障
cqsDieSafeguard:false , // 常青树身故保障
hxhnjDieSafeguard:false , // 华夏红年金身故保障
ybtHealthCase:false , // 医保通医疗保障 ybtHealthCase:false , // 医保通医疗保障
hxfHealthCase:false , // 华夏福医疗保障 hxfHealthCase:false , // 华夏福医疗保障
ybtElseCase:false , // 医保通其他保障 ybtElseCase:false , // 医保通其他保障
cashValue:'0', cashValue:'0',
payTime:0, //几年交 payTime:0, //几年交
illnessData:[], illnessData:[],
illnessData3:SeriousDiseaseList, illnessData3:[
illnessData1:MiddleDiseaseList, { value: 0, label: '1、恶性肿瘤' },
illnessData2:GeneralDiseaseList, { value: 1, label: '2、急性心肌梗塞' },
hxfSeriousDisease:SeriousDiseaseList_hxf, { value: 2, label: '3、脑中风后遗症' },
hxfGeneralDisease:GeneralDiseaseList_hxf, { value: 3, label: '4、重大器官移植术或造血干细胞移植术' },
hxfhmSeriousDisease:SeriousDiseaseList_hxf_huomian, { value: 4, label: '5、冠状动脉搭桥术' },
hxfhmGeneralDisease:GeneralDiseaseList_hxf_huomian, { value: 5, label: '6、终末期肾病' },
cqsSeriousDisease:SeriousDiseaseList_cqs, { value: 6, label: '7、多个肢体缺失' },
cqsGeneralDisease:GeneralDiseaseList_cqs, { value: 7, label: '8、急性或亚急性重症肝炎' },
{ value: 8, label: '9、良性脑肿瘤' },
{ value: 9, label: '10、慢性肝功能衰竭失代偿期' },
{ value: 10, label: '11、脑炎后遗症或脑膜炎后遗症' },
{ value: 11, label: '12、深度昏迷' },
{ value: 12, label: '13、双耳失聪-三周岁始理赔' },
{ value: 13, label: '14、双目失明-三周岁始理赔' },
{ value: 14, label: '15、瘫痪' },
{ value: 15, label: '16、心脏瓣膜手术' },
{ value: 16, label: '17、严重阿尔茨海默病' },
{ value: 17, label: '18、严重脑损伤' },
{ value: 18, label: '19、严重帕金森病' },
{ value: 19, label: '20、严重III度烧伤' },
{ value: 20, label: '21、严重原发性肺动脉高压' },
{ value: 21, label: '22、严重运动神经元病' },
{ value: 22, label: '23、语言能力丧失-三岁始理赔' },
{ value: 23, label: '24、重型再生障碍性贫血' },
{ value: 24, label: '25、主动脉手术' },
{ value: 25, label: '26、慢性呼吸功能衰竭' },
{ value: 26, label: '27、严重多发性硬化' },
{ value: 27, label: '28、脊髓灰质炎' },
{ value: 28, label: '29、全身性重症肌无力' },
{ value: 29, label: '30、严重冠心病' },
{ value: 30, label: '31、严重心肌病' },
{ value: 31, label: '32、系统性红斑狼疮III型或以上狼疮性肾炎' },
{ value: 32, label: '33、因职业关系导致的人类免疫缺陷病毒HIV感染' },
{ value: 33, label: '34、经输血导致的人类免疫缺陷病毒HIV感染' },
{ value: 34, label: '35、严重克隆病' },
{ value: 35, label: '36、严重溃疡性结肠炎' },
{ value: 36, label: '37、1型糖尿病' },
{ value: 37, label: '38、肺源性心脏病' },
{ value: 38, label: '39、植物人状态' },
{ value: 39, label: '40、严重类风湿性关节炎' },
{ value: 40, label: '41、非阿尔茨海默病所致严重痴呆' },
{ value: 41, label: '42、多处臂丛神经根性撕脱' },
{ value: 42, label: '43、严重川崎病' },
{ value: 43, label: '44、严重的系统性硬皮病' },
{ value: 44, label: '45、丝虫病所致象皮肿' },
{ value: 45, label: '46、胰腺移植' },
{ value: 46, label: '47、急性坏死胰腺炎开腹手术' },
{ value: 47, label: '48、慢性复发性胰腺炎' },
{ value: 48, label: '49、疯牛病' },
{ value: 49, label: '50、肾髓质囊性病' },
{ value: 50, label: '51、肾髓质囊性病' },
{ value: 51, label: '52、严重的原发性硬化性胆管炎' },
{ value: 52, label: '53、特发性慢性肾上腺皮质功能减退' },
{ value: 53, label: '54、溶血性链球菌引起的坏疽' },
{ value: 54, label: '55、颅脑手术' },
{ value: 55, label: '56、严重肌营养不良症' },
{ value: 56, label: '57、严重心肌炎' },
{ value: 57, label: '58、肝豆状核变性' },
{ value: 58, label: '59、侵蚀性葡萄胎' },
{ value: 59, label: '60、破裂脑动脉瘤夹闭手术' },
{ value: 60, label: '61、需手术切除的嗜铬细胞瘤' },
{ value: 61, label: '62、进行性核上性麻痹' },
{ value: 62, label: '63、严重幼年型类风湿性关节炎' },
{ value: 63, label: '64、严重肠道疾病并发症' },
{ value: 64, label: '65、严重瑞氏综合症' },
{ value: 65, label: '66、严重自身免疫性肝炎' },
{ value: 66, label: '67、严重的III度房室传导阻滞' },
{ value: 67, label: '68、细菌性脑脊髓膜炎' },
{ value: 68, label: '69、严重感染性心内膜炎' },
{ value: 69, label: '70、严重的骨髓增生异常综合征' },
{ value: 70, label: '71、严重癫痫' },
{ value: 71, label: '72、自体造血干细胞移植' },
{ value: 72, label: '73、肺淋巴管肌瘤病' },
{ value: 73, label: '74、肺泡蛋白质沉积症' },
{ value: 74, label: '75、小肠移植' },
{ value: 75, label: '76、疾病或外伤所致智力障碍' },
{ value: 76, label: '77、骨生长不全症' },
{ value: 77, label: '78、严重面部烧伤' },
{ value: 78, label: '79、亚急性硬化性全脑炎' },
{ value: 79, label: '80、脊髓小脑变性症' },
{ value: 80, label: '81、进行性多灶性白质脑病' },
{ value: 81, label: '82、弥漫性血管内凝血' },
{ value: 82, label: '83、失去一肢及一眼' },
{ value: 83, label: '84、独立能力丧失' },
{ value: 84, label: '85、器官移植导致的HIV感染' },
{ value: 85, label: '86、婴儿进行性脊肌萎缩症' },
{ value: 86, label: '87、进行性风疹全脑炎' },
{ value: 87, label: '88、埃博拉病毒感染' },
{ value: 88, label: '89、主动脉夹层血肿' },
{ value: 89, label: '90、重症急性坏死性筋膜炎' },
{ value: 90, label: '91、骨髓纤维化' },
{ value: 91, label: '92、严重慢性缩窄性心包炎' },
{ value: 92, label: '93、主动脉夹层瘤' },
{ value: 93, label: '94、肌萎缩脊髓侧索硬化后遗症' },
{ value: 94, label: '95、严重结核性脑膜炎' },
{ value: 95, label: '96、重症手足口病' },
{ value: 96, label: '97、严重甲型及乙型血友病' },
{ value: 97, label: '98、艾森门格综合征' },
{ value: 98, label: '99、湿性年龄相关性黄斑变性' },
{ value: 99, label: '100、脊柱裂' },
],
illnessData1:[
{ value: 0, label: '1、中度帕金森氏病' },
{ value: 1, label: '2、中度严重溃疡性结肠炎' },
{ value: 2, label: '3、中度瘫痪' },
{ value: 3, label: '4、中度重症肌无力' },
{ value: 4, label: '5、中度进行性核上神经麻痹症' },
{ value: 5, label: '6、中度严重脊髓灰质炎' },
{ value: 6, label: '7、中度严重克雅氏病' },
{ value: 7, label: '8、视力严重受损-3周岁起理赔' },
{ value: 8, label: '9、慢性肾功能损害–肾功能衰竭期' },
{ value: 9, label: '10、重症头部外伤' },
{ value: 10, label: '11、较小面积Ⅲ度烧伤(10%)' },
{ value: 11, label: '12、慢性肝功能衰竭' },
{ value: 12, label: '13、植入腔静脉滤器' },
{ value: 13, label: '14、系统性红斑狼疮' },
{ value: 14, label: '15、早期运动神经性疾病' },
{ value: 15, label: '16、中度类风湿性关节炎' },
{ value: 16, label: '17、中度脑风后遗症' },
{ value: 17, label: '18、中度强直性脊柱炎' },
{ value: 18, label: '19、中度脑炎或中度脑膜炎后遗症' },
{ value: 19, label: '20、中度克隆病' },
],
illnessData2:[
{ value: 0, label: '1、非危及生命的(极早期的)恶性病变' },
{ value: 1, label: '2、冠状动脉介入手术' },
{ value: 2, label: '3、轻微脑中风' },
{ value: 3, label: '4、心脏瓣膜介入手术' },
{ value: 4, label: '5、脑垂体瘤、脑囊肿、脑动脉瘤及脑血管瘤' },
{ value: 5, label: '6、主动脉内介入手术' },
{ value: 6, label: '7、单个肢体缺失' },
{ value: 7, label: '8、单侧肺脏切除' },
{ value: 8, label: '9、肝脏手术' },
{ value: 9, label: '10、人工耳蜗植入术' },
{ value: 10, label: '11、胆道重建手术' },
{ value: 11, label: '12、双侧卵巢或睾丸切除术' },
{ value: 12, label: '13、单侧肾脏切除' },
{ value: 13, label: '14、糖尿病导致脚趾截除' },
{ value: 14, label: '15、单耳失聪' },
{ value: 15, label: '16、微创颅脑手术' },
{ value: 16, label: '17、Ⅲ度房室传导阻滞-已放置心脏起搏器' },
{ value: 17, label: '18、于颈动脉进行血管成形术或内膜切除术' },
{ value: 18, label: '19、心包膜切除术' },
{ value: 19, label: '20、脑炎或脑膜炎' },
{ value: 20, label: '21、硬脑膜下血肿手术' },
{ value: 21, label: '22、严重阻塞性睡眠窒息症' },
{ value: 22, label: '23、因意外毁容而施行的面部整形手术' },
{ value: 23, label: '24、角膜移植' },
{ value: 24, label: '25、可逆性再生障碍性贫血' },
{ value: 25, label: '26、特定周围动脉疾病的血管介入治疗' },
{ value: 26, label: '27、脑室腹腔分流术' },
{ value: 27, label: '28、轻度面部烧伤' },
{ value: 28, label: '29、肾上腺切除术' },
{ value: 29, label: '30、早期象皮病' },
{ value: 30, label: '31、出血性登革热' },
{ value: 31, label: '32、面部重建手术' },
{ value: 32, label: '33、不典型的急性心肌梗塞' },
{ value: 33, label: '34、严重的骨质疏松' },
{ value: 34, label: '35、单眼失明' },
],
illnessName:'所保重疾', illnessName:'所保重疾',
seriNo:'', seriNo:'',
riskName:'', riskName:'',
riskCode:'', riskCode:'',
cover:true, cover:true,
totalPrem:'', totalPrem:'',
PaymentPeriodList:[],//保险期间list
mainWithFJPrem:0,//主险及其捆绑险种保费和
mainList:[],//主险列表
} }
} }
componentWillMount(){ componentWillMount(){
// alert( '屏幕的高度'+ document.body.clientHeight ,'正文的高的'+ document.body.scrollHeight ) // alert( '屏幕的高度'+ document.body.clientHeight ,'正文的高的'+ document.body.scrollHeight )
let url = window.location.href; let url = window.location.href;
const params = urlGetParams(url); const matchs = decodeURI(url).match(/seriNo=(.*)&riskName=(.*)&riskCode=(.*)&thumbnail=(.*)/i)
console.log('params--->',params) if(matchs){
if(params.seriNo){ let seriNo = matchs[1];
let seriNo = params.seriNo; let riskName = matchs[2];
let riskName = params.riskName; let riskCode = matchs[3];
let riskCode = params.riskCode; let thumbnail = matchs[4];
let thumbnail = params.thumbnail;
let urlShare = "";
if(params.isShare){//处理多次转发参数问题
urlShare = window.location.href;
}else{
urlShare = window.location.href+`&isShare=t&phoneNum=${localStorage.getItem('number')}`;
}
share({ share({
decodeUrl: window.location.href.split('#')[0], decodeUrl: window.location.href.split('#')[0],
title: riskName, title: riskName,
desc: '您的专属保险计划书,请您查收!', desc: '您的专属保险计划书,请您查收!',
shareUrl: urlShare, shareUrl: window.location.href,
thumbnail: thumbnail, thumbnail: thumbnail
record:{
"operCode": riskCode,
"operTitle": riskName,
"operFunction": 100120,
"operType": 202,
"phoneNum": params.isShare ? params.phoneNum : ""
}
}); });
this.setState({ this.setState({
...@@ -214,26 +451,12 @@ class PlanResult extends Component { ...@@ -214,26 +451,12 @@ class PlanResult extends Component {
}) })
}else{ }else{
this.setState({ this.setState({
// cover:false, cover:false,
seriNo:window.localStorage.getItem("seriNo"), seriNo:window.localStorage.getItem("seriNo"),
riskName:window.localStorage.getItem("riskName"), riskName:window.localStorage.getItem("riskName"),
riskCode:window.localStorage.getItem("riskCode"), riskCode:window.localStorage.getItem("riskCode"),
}) })
} }
//点击记录
this.props.dispatch({
type:"home/setClickRecord",
payload: {
"operCode": params.riskCode,
"operFunction": 100120,
"operTitle": params.riskName,
"operType": 201,
"phoneNum": params.isShare ? params.phoneNum : ""
},
callback(data){
console.log('点击分享计划书结果页面链接,记录一次')
}
});
} }
componentDidMount(){ componentDidMount(){
...@@ -248,33 +471,13 @@ class PlanResult extends Component { ...@@ -248,33 +471,13 @@ class PlanResult extends Component {
},3000) },3000)
} }
this.getMessage(); this.getMessage()
this.getPerodList();//获取缴费期间值
} }
componentWillUnmount(){ componentWillUnmount(){
document.title = '' document.title = ''
} }
getPerodList(){
let that = this;
let date = new Date();
let nowDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
this.props.dispatch({
type:'planEditor/PremiumPaymentPeriod',
payload:{
"riskCode":this.state.riskCode,
"birthday": this.state.riskCode=='511404' ? nowDate : '1981-02-23',
"pageNo":1,
"mainCode": this.state.riskCode
},
callback(data){
that.setState({
PaymentPeriodList:data,
})
}
})
}
/* 获取条款列表 */ /* 获取条款列表 */
getProspectusaAditiona2=()=>{ getProspectusaAditiona2=()=>{
...@@ -308,7 +511,7 @@ getPerodList(){ ...@@ -308,7 +511,7 @@ getPerodList(){
let that = this; let that = this;
let riskName= this.state.riskName; let riskName= this.state.riskName;
this.props.dispatch({ this.props.dispatch({
type: 'planEditor/getMyPlanMessage', type: 'home/getMyPlanMessage',
payload: { payload: {
"seriNo": this.state.seriNo, "seriNo": this.state.seriNo,
// "seriNo": 319, // "seriNo": 319,
...@@ -345,48 +548,40 @@ getPerodList(){ ...@@ -345,48 +548,40 @@ getPerodList(){
0:microPlanFJInfo[i].riskName||'-', 0:microPlanFJInfo[i].riskName||'-',
1:Number(microPlanFJInfo[i].amnt)||'-', 1:Number(microPlanFJInfo[i].amnt)||'-',
2:Number(microPlanFJInfo[i].prem)||'-', 2:Number(microPlanFJInfo[i].prem)||'-',
3:Number(microPlanFJInfo[i].payTime)==0 ? "趸交" : microPlanFJInfo[i].payTimeName||'-', 3:microPlanFJInfo[i].payTimeName||'-',
}) })
Amut += microPlanFJInfo[i].amnt Amut += microPlanFJInfo[i].amnt
Prem += Number(microPlanFJInfo[i].prem) Prem += Number(microPlanFJInfo[i].prem)
fjRiskCodeList.push(microPlanFJInfo[i].riskCode) fjRiskCodeList.push(microPlanFJInfo[i].riskCode)
//附加险
if(microPlanFJInfo[i].riskCode == '111703'){ if(microPlanFJInfo[i].riskCode == '111703'){
that.setState({ that.setState({
ybtHealthCase:true , // 医保通医疗保障 ybtHealthCase:true , // 医保通医疗保障
ybtElseCase:true , // 医保通其他保障 ybtElseCase:true , // 医保通其他保障
}) })
} }
if(microPlanFJInfo[i].riskCode == '121705'){ if(microPlanFJInfo[i].riskCode == '121705'){
that.setState({ that.setState({
hxfHealthCase:true , // 华夏福医疗保障2014 hxfHealthCase:true , // 华夏福医疗保障
hxfAmut:microPlanFJInfo[i].amnt hxfAmut:microPlanFJInfo[i].amnt
}) })
} }
if(microPlanFJInfo[i].riskCode == '121513'){ //华夏福投保人豁免保费保险
that.setState({
hxfPremExempt:true, // 华夏福保费豁免
})
}
} }
that.setState({ that.setState({
fjTable:fjTable, fjTable:fjTable,
fjRiskCodeList:fjRiskCodeList, fjRiskCodeList:fjRiskCodeList,
age:proposalInterest.length>0 ? proposalInterest[0].age : 0, age:proposalInterest.age,
}) })
}
let mainTotalPrem = Number(microPlanInfo.prem);//计算主险和其捆绑险种的保费和
let lists = microPlanInfo.microPlanInfo2;
if(lists && lists.length>0){
for(let jj in lists){
mainTotalPrem += Number(lists[jj].prem);
}
} }
//主险
if(microPlanInfo.riskCode == '511403'){ if(microPlanInfo.riskCode == '511403'){
that.setState({ that.setState({
flmGetMoney:true, //福临门-固定领取 flmGetMoney:true, //福临门-固定领取
...@@ -394,9 +589,11 @@ getPerodList(){ ...@@ -394,9 +589,11 @@ getPerodList(){
flmDieSafeguard:true , // 福临门身故保障 flmDieSafeguard:true , // 福临门身故保障
insAmnt:microPlanInfo.amnt, insAmnt:microPlanInfo.amnt,
insPrem:microPlanInfo.prem, insPrem:microPlanInfo.prem,
age:microPlanInfo.age, age:proposalInterest[0].age,
payTime:microPlanInfo.payTime, payTime:microPlanInfo.payTime,
}) })
} }
if(microPlanInfo.riskCode == '511501'){ if(microPlanInfo.riskCode == '511501'){
...@@ -407,54 +604,9 @@ getPerodList(){ ...@@ -407,54 +604,9 @@ getPerodList(){
insAmnt:microPlanInfo.amnt, insAmnt:microPlanInfo.amnt,
insPrem:microPlanInfo.prem, insPrem:microPlanInfo.prem,
payTime:microPlanInfo.payTime, payTime:microPlanInfo.payTime,
age:microPlanInfo.age,
}) })
} }
if(microPlanInfo.riskCode == '511404'){
that.setState({
zhenaiGetMoney:true, //珍爱宝贝-固定领取
zhenaiPremExempt:true, // 珍爱宝贝保费豁免
zhenaiDieSafeguard:true , // 珍爱宝贝身故保障
insAmnt:microPlanInfo.amnt,
insPrem:microPlanInfo.prem,
age:microPlanInfo.age,
payTime:microPlanInfo.payTime,
})
}
if(microPlanInfo.riskCode == '411204'){
that.setState({
hxfHealth:true,//华夏福-健康保障
hxfGetMoney:true, //华夏福-固定领取
hxfDieSafeguard:true , // 华夏福身故保障
insAmnt:microPlanInfo.amnt,
insPrem:microPlanInfo.prem,
age:microPlanInfo.age,
payTime:microPlanInfo.payTime,
})
}
if(microPlanInfo.riskCode == '111505'){
that.setState({
cqsHealth:true,//常青树2015-健康保障
cqsPremExempt:true,//常青树2015保费豁免
cqsDieSafeguard:true , // 常青树2015身故保障
insAmnt:microPlanInfo.amnt,
insPrem:microPlanInfo.prem,
age:microPlanInfo.age,
payTime:microPlanInfo.payTime,
})
}
if(microPlanInfo.riskCode == '411405'){
that.setState({
hxhnjGetMoney:true, //华夏红年金-固定领取
hxhnjPremExempt:true,//保费豁免
hxhnjDieSafeguard:true,//身故保障
insAmnt:microPlanInfo.amnt,
insPrem:microPlanInfo.prem,
age:microPlanInfo.age,
payTime:microPlanInfo.payTime,
})
}
that.setState({ that.setState({
// modal:modal, // modal:modal,
mainRiskNmae:microPlanInfo.riskName, mainRiskNmae:microPlanInfo.riskName,
...@@ -467,8 +619,6 @@ getPerodList(){ ...@@ -467,8 +619,6 @@ getPerodList(){
mainTable:mainTable, mainTable:mainTable,
proposalInterest:proposalInterest, proposalInterest:proposalInterest,
allTime:allTime, allTime:allTime,
mainWithFJPrem:mainTotalPrem,
mainList:microPlanInfo
}) })
} }
...@@ -490,7 +640,6 @@ getPerodList(){ ...@@ -490,7 +640,6 @@ getPerodList(){
year:year, year:year,
age:this.state.tableList[year][1], age:this.state.tableList[year][1],
cashValue:this.state.tableList[year][2], cashValue:this.state.tableList[year][2],
insuranceValue:this.state.tableList[year][0],
}) })
} }
...@@ -500,23 +649,9 @@ getPerodList(){ ...@@ -500,23 +649,9 @@ getPerodList(){
showModal = key => (e) => { showModal = key => (e) => {
e.preventDefault(); // 修复 Android 上点击穿透 e.preventDefault(); // 修复 Android 上点击穿透
e.stopPropagation();
setTimeout(()=>{
this.setState({ this.setState({
[key]: true, [key]: true,
}); });
},100)
}
showModalillness=(list,name)=>(e)=>{
e.preventDefault();
e.stopPropagation();
setTimeout(()=>{
this.setState({
illnessData:list,
modal3:true,
illnessName:name
})
},100)
} }
onClose = key => (e) => { onClose = key => (e) => {
...@@ -551,54 +686,37 @@ getPerodList(){ ...@@ -551,54 +686,37 @@ getPerodList(){
cashValue:cashValue, cashValue:cashValue,
}); });
} };
go(){
if(this.state.cover){
this.setState({
cover:false
})
}
}
render() { render() {
const params = urlGetParams(window.location.href);
let recipientsSex = String(params.recipientsSex) == "0" ? true : false; let recipientsSex =localStorage.getItem("recipientsSex")
let recipientsName = params.recipientsName; let recipientsName =localStorage.getItem("recipientsName")
let recipients = recipientsName ? true : false;//有姓名默认有收件人 let recipients =localStorage.getItem("recipients")
const data = this.state.allTime; const data = this.state.allTime;
console.log("结果页面-------------------------》》》》",recipients,this.state.mainTable,this.state.fjTable,this.state.mainWithFJPrem,this.state.mainList,this.state.PaymentPeriodList,this.state.insAmnt);
let show = this.state.ybtHealthCase ||this.state.hxfHealthCase;
let showDieSafeguard = this.state.flmDieSafeguard ||this.state.cctDieSafeguard || this.state.zhenaiDieSafeguard || this.state.hxfDieSafeguard || this.state.cqsDieSafeguard || this.state.hxhnjDieSafeguard;//身故保障 console.log(this.state.fjTable);
let PremExempt = this.state.flmPremExempt || this.state.cctPremExempt || this.state.zhenaiPremExempt || this.state.hxfPremExempt || this.state.cqsPremExempt || this.state.hxhnjPremExempt;//保费豁免
let GetMoney = this.state.flmGetMoney || this.state.zhenaiGetMoney || this.state.hxfGetMoney || this.state.hxhnjGetMoney;//固定领取
let Health = this.state.cctHealth || this.state.hxfHealth || this.state.cqsHealth;//健康保障 let show = this.state.ybtHealthCase ||this.state.hxfHealthCase
let showDieSafeguard = this.state.flmDieSafeguard ||this.state.cctDieSafeguard
let PremExempt = this.state.flmPremExempt || this.state.cctPremExempt
let {ybtHealthCase,hxfHealthCase} = this.state; let {ybtHealthCase,hxfHealthCase} = this.state;
return ( return (
<div className={styles.all}> <div className={styles.all}>
{ this.state.cover && { this.state.cover &&
<div className={styles.welcome}> <div className={styles.welcome} onClick={this.go}> <div/>
<div></div> { recipients === 'true' && <p className={styles.p}>{recipientsName.substring(0,1)}{recipientsSex ==='true'?'先生':'女士'}<br/>亲启</p> }
<p className={styles.btn} onClick={()=>this.go()}> { recipients !== 'true' && <p className={styles.p}>敬呈<br/>亲启</p> }
{ recipients === true && <span>{recipientsName.substring(0,1)}{ recipientsSex === true?'先生':'女士' }<br/>亲启</span>}
{ recipients === false && <span>敬呈<br/>亲启</span> }
</p>
</div> </div>
} }
{ {
!this.state.cover && !this.state.cover &&
<div className={styles.box}> <div className={styles.box}>
<Iscroll id="planResult"
iscrollOptions={{
probeType:2
}}>
<div className={styles.Bitmap}> <div className={styles.Bitmap}>
{this.state.mainRiskCode == '511501'&& <img src={require('../../assets/image/cct.png')} className={styles.main} alt=""/>} {this.state.mainRiskCode == '511501'&& <img src={require('../../assets/image/cct.png')} className={styles.main} alt=""/>}
{this.state.mainRiskCode == '511403'&& <img src={require('../../assets/image/flm.png')} className={styles.main} alt=""/>} {this.state.mainRiskCode == '511403'&& <img src={require('../../assets/image/flm.png')} className={styles.main} alt=""/>}
{this.state.mainRiskCode == '511404'&& <img src={require('../../assets/image/zhenai.png')} className={styles.main} alt=""/>}
{this.state.mainRiskCode == '411204'&& <img src={require('../../assets/image/huaxiafu.png')} className={styles.main} alt=""/>}
{this.state.mainRiskCode == '111505'&& <img src={require('../../assets/image/cqs.jpg')} className={styles.main} alt=""/>}
{this.state.mainRiskCode == '411405'&& <img src={require('../../assets/image/huaxiahong.png')} className={styles.main} alt=""/>}
{/*<img src={require('../../assets/image/share.png')} alt="" className={styles.share} />*/} {/*<img src={require('../../assets/image/share.png')} alt="" className={styles.share} />*/}
</div> </div>
...@@ -606,7 +724,8 @@ getPerodList(){ ...@@ -606,7 +724,8 @@ getPerodList(){
<div className={styles.people}> <div className={styles.people}>
<div className={styles.life}> <div className={styles.life}>
<img src={require('../../assets/image/rectangle.png')} alt=""/> <img src={require('../../assets/image/rectangle.png')} alt=""/>
<p>{this.state.PaymentPeriodList.length>0 ? this.state.PaymentPeriodList[0].protectTimeName :''}</p> <p onClick={()=>{
}}>保终身</p>
<div className={styles.insureMessage}> <div className={styles.insureMessage}>
<div className={styles.title}> <div className={styles.title}>
...@@ -617,14 +736,14 @@ getPerodList(){ ...@@ -617,14 +736,14 @@ getPerodList(){
<div className={styles.message}> <div className={styles.message}>
<span>{this.state.insSex=='F'?'女':'男'}</span> <span>{this.state.insSex=='F'?'女':'男'}</span>
<span>{this.state.insAge}</span> <span>{this.state.insAge}</span>
<span>{this.state.totalPrem+"元"}</span> <span>{this.state.totalPrem}</span>
</div> </div>
{ {
this.state.cutButton && <div> this.state.cutButton && <div>
<div className ={styles.mainInsurance}> <div className ={styles.mainInsurance}>
{this.state.mainRiskNmae} <span style={{float:"right",marginRight:'0.2rem'}}>首年保费:{this.state.mainTable[0][2]+"元"}</span> {this.state.mainRiskNmae} <span>首年保费:{this.state.mainTable[0][2]}</span>
</div> </div>
<Table listTitle={this.state.tableTitleInsurance} listTable={this.state.mainTable}/> <Table listTitle={this.state.tableTitleInsurance} listTable={this.state.mainTable}/>
{ {
...@@ -632,7 +751,7 @@ getPerodList(){ ...@@ -632,7 +751,7 @@ getPerodList(){
return( return(
<div key={index}> <div key={index}>
<div className ={styles.mainInsurance}> <div className ={styles.mainInsurance}>
{item['0']} <span style={{float:"right",marginRight:'0.2rem'}}>首年保费:{this.state.fjTable[index][2]+"元"}</span> {item['0']} <span>首年保费:{this.state.fjTable[index][2]}</span>
</div> </div>
<Table listTitle={this.state.tableTitleInsurance} listTable={[item]}/> <Table listTitle={this.state.tableTitleInsurance} listTable={[item]}/>
</div> </div>
...@@ -649,12 +768,22 @@ getPerodList(){ ...@@ -649,12 +768,22 @@ getPerodList(){
</div> </div>
<div className={styles.modal}> <div className={styles.modal}>
<div className={styles.title}> <div className={styles.title}>
{GetMoney && {/*{this.state.modal.map((item,index)=>{
return(<div key={index}>
{this.state.flmPremExempt || }
<div>
<img src={item.img} alt=""/>
<div>{item.text}</div>
</div>
</div>)
})}*/}
{this.state.flmGetMoney &&
<div> <div>
<img src={require("../../assets/image/getMoney.png")} alt=""/> <img src={require("../../assets/image/getMoney.png")} alt=""/>
<div>固定领取</div> <div>固定领取</div>
</div>} </div>}
{Health && {this.state.cctHealth &&
<div> <div>
<img src={require("../../assets/image/health.png")} alt=""/> <img src={require("../../assets/image/health.png")} alt=""/>
<div>健康保障</div> <div>健康保障</div>
...@@ -684,10 +813,12 @@ getPerodList(){ ...@@ -684,10 +813,12 @@ getPerodList(){
<div>其他保障</div> <div>其他保障</div>
</div> </div>
} }
</div> </div>
</div> </div>
{ {this.state.flmGetMoney && <div className={styles.health}>
GetMoney && <div className={styles.health}>
<div className={styles.panel}>固定领取</div> <div className={styles.panel}>固定领取</div>
{ {
this.state.flmGetMoney &&<div style={{padding:'.11rem 0'}}> this.state.flmGetMoney &&<div style={{padding:'.11rem 0'}}>
...@@ -695,21 +826,36 @@ getPerodList(){ ...@@ -695,21 +826,36 @@ getPerodList(){
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
{this.state.insAge + 5}岁起每年领取年金 {this.state.insAge + 5}岁起每年领取年金
<span className ={styles.monery}> <span className ={styles.monery}> {this.state.insAmnt*0.3%10000 ==0? this.state.insAmnt*0.3/10000:(this.state.insAmnt*0.3).toFixed(0)} {this.state.insAmnt*0.3%10000 ==0?'万元':'元'}</span>
{this.state.insAmnt*0.3%10000 ==0? this.state.insAmnt*0.3/10000:(this.state.insAmnt*0.3).toFixed(0)}
{this.state.insAmnt*0.3%10000 ==0?'万元':'元'}
</span>
</div> </div>
{/*<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>自第5个保单周年日起,若被保险人在任一保单周年日零时仍生存,我们将于该保单周年日按本合同基本保险金额的30%给付一次年金。</span>
</div>*/}
</div> </div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
60岁至74岁每年领取关爱金 60岁至74岁每年领取关爱金
<span className ={styles.monery}> <span className ={styles.monery}>
{this.state.payTime == 0?(this.state.insPrem*0.06%10000 == 0?this.state.insPrem*0.06/10000:this.state.insPrem*0.06):this.state.payTime*this.state.insPrem*0.06%10000 == 0?this.state.payTime*this.state.insPrem*0.06/10000:this.state.payTime*this.state.insPrem*0.06} {this.state.payTime == 0?(this.state.insPrem*0.06%10000 == 0?this.state.insPrem*0.06/10000:this.state.insPrem*0.06):this.state.payTime*this.state.insPrem*0.06%10000 == 0?this.state.payTime*this.state.insPrem*0.06/10000:this.state.payTime*this.state.insPrem*0.06}
{this.state.payTime == 0 ?this.state.insPrem*0.06%10000 == 0?'万元':'元':this.state.payTime*this.state.insPrem*0.06%10000 == 0?'万元':'元'} {this.state.payTime == 0 ?this.state.insPrem*0.06%10000 == 0?'万元':'元':this.state.payTime*this.state.insPrem*0.06%10000 == 0?'万元':'元'}
</span> </span>
</div> </div>
{/*<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>自被保险人年满60周岁后的首个保单周年日起至被保险人年满74周岁后的首个保单周年日,若被保险人在任一保单周年日零时仍生存,我们将于该保单周年日按总保险费的6%给付一次关爱金;
</span>
</div>*/}
</div> </div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
...@@ -719,6 +865,7 @@ getPerodList(){ ...@@ -719,6 +865,7 @@ getPerodList(){
{this.state.payTime == 0 ?this.state.insPrem*0.1%10000 == 0?'万元':'元':this.state.payTime*this.state.insPrem*0.1%10000 == 0?'万元':'元'} {this.state.payTime == 0 ?this.state.insPrem*0.1%10000 == 0?'万元':'元':this.state.payTime*this.state.insPrem*0.1%10000 == 0?'万元':'元'}
</span> </span>
{/*{this.state.payTime == 0?this.state.insPrem*0.1:this.state.payTime*this.state.insPrem*0.1}元*/}
</div> </div>
<div className={styles.trivia} > <div className={styles.trivia} >
...@@ -730,107 +877,9 @@ getPerodList(){ ...@@ -730,107 +877,9 @@ getPerodList(){
</div> </div>
</div> </div>
} }
{
this.state.zhenaiGetMoney &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>珍爱宝贝</div>
<div className={styles.text}>
<div className={styles.subtitle}>
18岁至24岁,每年领取深造教育金
<span className ={styles.monery}>
{this.state.insAmnt*1%10000 ==0? this.state.insAmnt*1/10000 : (this.state.insAmnt*1).toFixed(0)}
{this.state.insAmnt*1%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>年年领取100%基本保障,领取7年</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
30岁保险期满,一次性领取婚嫁金
<span className ={styles.monery}>
{this.state.payTime ? (this.state.payTime*1.2*this.state.insPrem%10000 == 0 ? this.state.payTime*1.2*this.state.insPrem/10000 : this.state.payTime*1.2*this.state.insPrem).toFixed(0) : 0}
{this.state.payTime ? (this.state.payTime*1.2*this.state.insPrem%10000 == 0 ? '万元' : '元') : '元'}
</span>
</div>
<div className={styles.trivia} > </div>}
<span className={styles.dot}> {this.state.cctHealth &&<div className={styles.health}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>满足婚嫁费用,携手走向幸福人生</span>
</div>
</div>
</div>
}
{
this.state.hxfGetMoney &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>华夏福两全保险</div>
<div className={styles.text}>
<div className={styles.subtitle}>
88周岁返还祝寿金
<span className ={styles.monery}>
{this.state.payTime==0 ? (this.state.mainWithFJPrem%10000 ==0 ? this.state.mainWithFJPrem.toFixed(0)/10000 : this.state.mainWithFJPrem.toFixed(0)) : (eval(this.state.mainWithFJPrem*this.state.mainList.payTime)%10000 ==0? eval(this.state.mainWithFJPrem*this.state.mainList.payTime)/10000:eval(this.state.mainWithFJPrem*this.state.mainList.payTime).toFixed(0))}
{eval(this.state.mainWithFJPrem*this.state.mainList.payTime)%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>给付完毕合同继续有效,提供高品质晚年生活</span>
</div>
</div>
</div>
}
{
this.state.hxhnjGetMoney &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
{eval(this.state.insAge + 10)<60 && (
<div className={styles.subtitle}>
{eval(this.state.insAge + 10) + "岁-59岁每年可领取年金"}
<span className ={styles.monery}>
{(this.state.insAmnt*0.2)%10000 == 0 ? (this.state.insAmnt*0.2)/10000 : (this.state.insAmnt*0.2).toFixed(0)}
{(this.state.insAmnt*0.2)%10000 == 0 ? '万元':'元'}
</span>
</div>
)}
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
{eval(this.state.insAge+10)>60 ? eval(this.state.insAge+10)+"岁后可领取年金" : "60岁后可领取年金"}
<span className ={styles.monery}>
{(this.state.insAmnt*0.4)%10000 == 0 ? (this.state.insAmnt*0.4)/10000 : (this.state.insAmnt*0.4).toFixed(0)}
{(this.state.insAmnt*0.4)%10000 == 0 ? '万元':'元'}
</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
第5个保单周年日立即领取关爱金
<span className ={styles.monery}>
{this.state.payTime == 0 ? (this.state.insPrem*0.06)%10000 == 0 ? (this.state.insPrem*0.06)/10000 : (this.state.insPrem*0.06).toFixed(0) : (this.state.payTime*this.state.insPrem*0.06)%10000 == 0 ? (this.state.payTime*this.state.insPrem*0.06)/10000 : (this.state.payTime*this.state.insPrem*0.06).toFixed(0)}
{this.state.payTime == 0 ? (this.state.insPrem*0.06)%10000 == 0 ? "万元":"元" : (this.state.payTime*this.state.insPrem*0.06)%10000 == 0 ? "万元":"元"}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>保单第5年开始领至第9年,年年享受关爱</span>
</div>
</div>
</div>
}
</div>
}
{
Health &&<div className={styles.health}>
<div className={styles.panel}>健康保障</div> <div className={styles.panel}>健康保障</div>
{ {
this.state.cctHealth &&<div style={{paddingTop:'.11rem'}}> this.state.cctHealth &&<div style={{paddingTop:'.11rem'}}>
...@@ -839,36 +888,16 @@ getPerodList(){ ...@@ -839,36 +888,16 @@ getPerodList(){
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
100种重疾保障最高可达 100种重疾保障最高可达 <span className ={styles.monery}> {this.state.insAmnt*6%10000 ==0? this.state.insAmnt*6/10000:(this.state.insAmnt*6).toFixed(0)} {this.state.insAmnt*6%10000 ==0?'万元':'元'}</span>
<span className ={styles.monery}>
{this.state.insAmnt*6%10000 ==0? this.state.insAmnt*6/10000:(this.state.insAmnt*6).toFixed(0)}
{this.state.insAmnt*6%10000 ==0?'万元':'元'}
</span>
</div> </div>
<div className={styles.trivia} > <div className={styles.trivia} >
<span className={styles.dot}> <span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/> <img src={require('../../assets/image/dot.png')} alt=""/>
</span> </span>
<span className={styles.detail}>重疾分六组,每组最多赔付一次,每次至少100%保额 <span className={styles.detail}>重疾分六组,每组最多赔付一次,每次至少100%保额
</span> 首次确诊重疾给付 {this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt} {this.state.insAmnt%10000 ==0?'万元':'元'}/已交保费/现价较大者
</div> 第二、三、四、五、六次各自给付 {this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt} {this.state.insAmnt%10000 ==0?'万元':'元'}
<div className={styles.trivia} > </span>
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>首次确诊重疾给付
{this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt}
{this.state.insAmnt%10000 ==0?'万元':'元'}/已交保费/现价较大者
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>第二、三、四、五、六次各自给付
{this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt}
{this.state.insAmnt%10000 ==0?'万元':'元'}
</span>
</div> </div>
</div> </div>
...@@ -876,27 +905,22 @@ getPerodList(){ ...@@ -876,27 +905,22 @@ getPerodList(){
<div className={styles.subtitle}> <div className={styles.subtitle}>
20种中症保障最高可达 20种中症保障最高可达
<span className ={styles.monery}> {this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt} <span className ={styles.monery}> {this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt} {this.state.insAmnt%10000 ==0?'万元':'元'}</span>
{this.state.insAmnt%10000 ==0?'万元':'元'}</span>
</div> </div>
<div className={styles.trivia} > <div className={styles.trivia} >
<span className={styles.dot}> <span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/> <img src={require('../../assets/image/dot.png')} alt=""/>
</span> </span>
<span className={styles.detail}>每次给付50%保额 <span className={styles.detail}>每次给付50%保额
{this.state.insAmnt*0.5%10000 ==0? this.state.insAmnt*0.5/10000:(this.state.insAmnt*0.5).toFixed(0)} {this.state.insAmnt*0.5%10000 ==0? this.state.insAmnt*0.5/10000:(this.state.insAmnt*0.5).toFixed(0)} {this.state.insAmnt*0.5%10000 ==0?'万元':'元'}</span>
{this.state.insAmnt*0.5%10000 ==0?'万元':'元'} ,累计两次为限
</span>,累计两次为限
</div> </div>
</div> </div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
35种轻症保障最高可达 35种轻症保障最高可达
<span className ={styles.monery}> <span className ={styles.monery}> {this.state.insAmnt*0.3*2%10000 ==0? this.state.insAmnt*0.3*2/10000:(this.state.insAmnt*0.3*2).toFixed(0)} {this.state.insAmnt*0.3*2%10000 ==0?'万元':'元'}</span>
{this.state.insAmnt*0.3*2%10000 ==0? this.state.insAmnt*0.3*2/10000:(this.state.insAmnt*0.3*2).toFixed(0)}
{this.state.insAmnt*0.3*2%10000 ==0?'万元':'元'}
</span>
</div> </div>
<div className={styles.trivia} > <div className={styles.trivia} >
...@@ -904,20 +928,17 @@ getPerodList(){ ...@@ -904,20 +928,17 @@ getPerodList(){
<img src={require('../../assets/image/dot.png')} alt=""/> <img src={require('../../assets/image/dot.png')} alt=""/>
</span> </span>
<span className={styles.detail}>每次给付30%保额 <span className={styles.detail}>每次给付30%保额
{this.state.insAmnt*0.3%10000 ==0? this.state.insAmnt*0.3/10000:(this.state.insAmnt*0.3).toFixed(0)}
{this.state.insAmnt*0.3%10000 ==0?'万元':'元'} {this.state.insAmnt*0.3%10000 ==0? this.state.insAmnt*0.3/10000:(this.state.insAmnt*0.3).toFixed(0)} {this.state.insAmnt*0.3%10000 ==0?'万元':'元'}
,累计两次为限 ,累计两次为限</span>
</span>
</div> </div>
</div> </div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
疾病终末期保障 疾病终末期保障
<span className ={styles.monery}>
{this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:(this.state.insAmnt*1).toFixed(0)} <span className ={styles.monery}> {this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:(this.state.insAmnt).toFixed(0)} {this.state.insAmnt%10000 ==0?'万元':'元'}</span>
{this.state.insAmnt%10000 ==0?'万元':'元'}
</span>
/已交保费/现价较大者 /已交保费/现价较大者
</div> </div>
<div className={styles.trivia} > <div className={styles.trivia} >
...@@ -926,213 +947,51 @@ getPerodList(){ ...@@ -926,213 +947,51 @@ getPerodList(){
</span> </span>
<span className={styles.detail}>18岁前给付2倍已交保费,等待期90日内给付已交保费</span> <span className={styles.detail}>18岁前给付2倍已交保费,等待期90日内给付已交保费</span>
</div> </div>
</div> </div>
<div className={styles.disease}> <div className={styles.disease}>
<span className={styles.illness} onClick={ <span className={styles.illness} onClick={
this.showModalillness(this.state.illnessData3,'所保重疾') ()=>{
}>所保重疾</span> this.setState({
illnessData:this.state.illnessData3,
modal3:true,
illnessName:'所保重疾'
})
}}>所保重疾</span>
<span className={styles.illness} onClick={ <span className={styles.illness} onClick={
this.showModalillness(this.state.illnessData1,'所保中症') ()=>{
}>所保中症</span> this.setState({
illnessData:this.state.illnessData1,
modal3:true,
illnessName:'所保中症'
})
}}>所保中症</span>
<span className={styles.illness} onClick={ <span className={styles.illness} onClick={
this.showModalillness(this.state.illnessData2,'所保轻疾') ()=>{
}>所保轻疾</span> this.setState({
illnessData:this.state.illnessData2,
modal3:true,
illnessName:'所保轻疾'
})
}}>所保轻疾</span>
</div> </div>
</div> </div>
} }
</div>}
{show &&<div className={styles.health}>
<div className={styles.panel}>医疗保障</div>
{ {
this.state.hxfHealth &&<div style={{paddingTop:'.11rem'}}> this.state.hxfHealthCase &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>华夏福两全保险</div>
<div className={styles.insurance}> 华夏附加住院费用补偿医疗保险(2014)</div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
82种重疾保障至终身 住院报销额度
</div> <span className ={styles.monery}> {this.state.hxfAmut%10000 ==0? this.state.hxfAmut/10000:this.state.hxfAmut} {this.state.hxfAmut%10000 ==0?'万元':'元'}</span>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>未满18周岁:给付2倍基本保额
{this.state.insAmnt*2%10000 ==0? this.state.insAmnt*2/10000:(this.state.insAmnt*2).toFixed(0)}
{this.state.insAmnt*2%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>18周岁-59周岁:至少给付基本保额
{this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:(this.state.insAmnt*1).toFixed(0)}
{this.state.insAmnt%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>60周岁及以后:至少给付1.2倍基本保额
{this.state.insAmnt*1.2%10000 ==0? this.state.insAmnt*1.2/10000:(this.state.insAmnt*1.2).toFixed(0)}
{this.state.insAmnt*1.2%10000 ==0?'万元':'元'}
</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
42种轻疾保障至终身
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>第一次给付
{this.state.insAmnt*0.25%10000 ==0? this.state.insAmnt*0.25/10000:(this.state.insAmnt*0.25).toFixed(0)}
{this.state.insAmnt*0.25%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>第二次给付
{this.state.insAmnt*0.3%10000 ==0? this.state.insAmnt*0.3/10000:(this.state.insAmnt*0.3).toFixed(0)}
{this.state.insAmnt*0.3%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>第三次给付
{this.state.insAmnt*0.35%10000 ==0? this.state.insAmnt*0.35/10000:(this.state.insAmnt*0.35).toFixed(0)}
{this.state.insAmnt*0.35%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>每种轻症仅给付一次,给付后该轻症责任终止
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>轻症给付累计以三次为限,超过后轻症责任终止
</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
疾病终末期、身故和全残保障至终身
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>18周岁前给付2倍已交保费</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>18周岁后至少给付
{this.state.insAmnt%10000 ==0? this.state.insAmnt/10000 : (this.state.insAmnt*1).toFixed(0)}
{this.state.insAmnt%10000 ==0?'万元':'元'}
</span>
</div>
</div>
<div className={styles.disease} style={{textAlign:'center'}}>
<span className={styles.illness_hxf} onClick={
this.showModalillness(this.state.hxfSeriousDisease,'所保重疾')
}>所保重疾</span>
<span className={styles.illness_hxf} onClick={
this.showModalillness(this.state.hxfGeneralDisease,'所保轻疾')
}>所保轻疾</span>
</div>
</div>
}
{
this.state.cqsHealth &&<div style={{paddingTop:'.11rem'}}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.subtitle}>
61种重疾保障
<span className ={styles.monery}>
{this.state.insPrem*this.state.payTime %10000 ==0? this.state.insPrem*this.state.payTime/10000:(this.state.insPrem*this.state.payTime).toFixed(0)}
{this.state.insPrem*this.state.payTime%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>行业领先,全面呵护更心安
</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
15种轻症保障
<span className ={styles.monery}>
{this.state.insAmnt*0.2%10000 ==0? this.state.insAmnt*0.2/10000:(this.state.insAmnt*0.2).toFixed(0)}
{this.state.insAmnt*0.2%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>每种疾病给付一次,累计三次为限
</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
疾病终末期保障
<span className ={styles.monery}>
{this.state.insPrem*this.state.payTime %10000 ==0? this.state.insPrem*this.state.payTime/10000:(this.state.insPrem*this.state.payTime).toFixed(0)}
{this.state.insPrem*this.state.payTime%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>确诊给付,疾病末期,更添关爱</span>
</div>
</div>
<div className={styles.disease} style={{textAlign:'center'}}>
<span className={styles.illness_hxf} onClick={
this.showModalillness(this.state.cqsSeriousDisease,'所保重疾')
}>所保重疾</span>
<span className={styles.illness_hxf} onClick={
this.showModalillness(this.state.cqsGeneralDisease,'所保轻疾')
}>所保轻疾</span>
</div>
</div>
}
</div>
}
{show &&<div className={styles.health}>
<div className={styles.panel}>医疗保障</div>
{
this.state.hxfHealthCase &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}> 华夏附加住院费用补偿医疗保险(2014)</div>
<div className={styles.text}>
<div className={styles.subtitle}>
住院报销额度
<span className ={styles.monery}>
{this.state.hxfAmut%10000 ==0? this.state.hxfAmut/10000:this.state.hxfAmut}
{this.state.hxfAmut%10000 ==0?'万元':'元'}</span>
</div> </div>
<div className={styles.trivia} > <div className={styles.trivia} >
<span className={styles.dot}> <span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/> <img src={require('../../assets/image/dot.png')} alt=""/>
...@@ -1144,7 +1003,7 @@ getPerodList(){ ...@@ -1144,7 +1003,7 @@ getPerodList(){
</div> </div>
} }
{ {
this.state.ybtHealthCase && <div style={{padding:'.11rem 0'}}> this.state.ybtHealthCase &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}> 医保通(普惠版)</div> <div className={styles.insurance}> 医保通(普惠版)</div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
...@@ -1155,7 +1014,9 @@ getPerodList(){ ...@@ -1155,7 +1014,9 @@ getPerodList(){
<span className={styles.dot}> <span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/> <img src={require('../../assets/image/dot.png')} alt=""/>
</span> </span>
<span className={styles.detail}>免赔额1万元,若不出险,每2年降低1000元免赔额</span> <span className={styles.detail}>免赔额1万元,若不出险,每2年降低1000元免赔额
</span>
<span className={styles.detail}>包含住院、特殊门诊、门诊手术、住院前后门急诊医疗保险金</span> <span className={styles.detail}>包含住院、特殊门诊、门诊手术、住院前后门急诊医疗保险金</span>
</div> </div>
...@@ -1172,21 +1033,26 @@ getPerodList(){ ...@@ -1172,21 +1033,26 @@ getPerodList(){
<span className={styles.detail}>零免赔,100%报销,有无医保均可享</span> <span className={styles.detail}>零免赔,100%报销,有无医保均可享</span>
<span className={styles.detail}>包含住重疾住院、特殊门诊、门诊手术、住院前后门急诊医疗保险金</span> <span className={styles.detail}>包含住重疾住院、特殊门诊、门诊手术、住院前后门急诊医疗保险金</span>
</div> </div>
</div> </div>
<span className={styles.illness1} onClick={ <span className={styles.illness1} onClick={
this.showModalillness(this.state.illnessData3,'所保重疾') ()=>{
}>所保重疾</span> this.setState({
</div> illnessData:this.state.illnessData3,
} modal3:true,
illnessName:'所保重疾'
})
}}>所保重疾</span>
</div> </div>
} }
{
showDieSafeguard && <div className={styles.health}> </div>}
{showDieSafeguard && <div className={styles.health}>
<div className={styles.panel}>身故保障</div> <div className={styles.panel}>身故保障</div>
{ {
this.state.flmDieSafeguard &&<div style={{padding:'.11rem 0'}}> this.state.flmDieSafeguard &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div> <div className={styles.insurance}>福临门(智慧版)</div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
不幸身故或全残给付已交保费与现价较大者 不幸身故或全残给付已交保费与现价较大者
...@@ -1203,14 +1069,12 @@ getPerodList(){ ...@@ -1203,14 +1069,12 @@ getPerodList(){
} }
{ {
this.state.cctDieSafeguard &&<div style={{padding:'.11rem 0'}}> this.state.cctDieSafeguard &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div> <div className={styles.insurance}>常春藤(多倍版)</div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
18岁后给付 18岁后给付
<span className ={styles.monery}> {/*{this.state.insAmnt/10000}*/}
{this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt} <span className ={styles.monery}> {this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:this.state.insAmnt} {this.state.insAmnt%10000 ==0?'万元':'元'}</span>
{this.state.insAmnt%10000 ==0?'万元':'元'}
</span>
/已交保费/现价较大者 /已交保费/现价较大者
</div> </div>
<div className={styles.subtitle}> <div className={styles.subtitle}>
...@@ -1226,119 +1090,12 @@ getPerodList(){ ...@@ -1226,119 +1090,12 @@ getPerodList(){
</div> </div>
</div> </div>
} }
{ </div>}
this.state.zhenaiDieSafeguard &&<div style={{padding:'.11rem 0'}}> {PremExempt && <div className={styles.health}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.subtitle}>
不幸身故或全残给付已交保费与现价较大者
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>彰显大爱,给家人留一份责任</span>
</div>
</div>
</div>
}
{
this.state.hxfDieSafeguard &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.subtitle}>
疾病终末期、身故和全残保障至终身
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>18周岁前给付2倍已交保费</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>18周岁后至少给付保额
{this.state.insAmnt%10000 ==0? this.state.insAmnt/10000:(this.state.insAmnt*1).toFixed(0)}
{this.state.insAmnt%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>给付后华夏福重大疾病保险计划合同终止</span>
</div>
</div>
</div>
}
{
this.state.cqsDieSafeguard &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.subtitle}>
终身身故/全残保障
<span className ={styles.monery}>
{this.state.insPrem*this.state.payTime%10000 ==0? this.state.insPrem*this.state.payTime/10000:(this.state.insPrem*this.state.payTime).toFixed(0)}
{this.state.insPrem*this.state.payTime%10000 ==0?'万元':'元'}
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>高额身价保障,给家人留一份爱与责任</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>等待期内因非意外患重疾/身故/全残,给付累计保费,合同终止
</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>被保险人身故/全残时未满18岁,给付累计保费,合同终止</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>重疾金、身故/全残金与疾病终末期金,仅给付一项</span>
</div>
</div>
</div>
}
{
this.state.hxhnjDieSafeguard &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.subtitle}>
身故/全残金给付所交保费与现金价值较大者
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>彰显生命尊严,确保资金安全</span>
</div>
</div>
</div>
}
</div>
}
{
PremExempt && <div className={styles.health}>
<div className={styles.panel}>保费豁免</div> <div className={styles.panel}>保费豁免</div>
{ {
this.state.flmPremExempt &&<div style={{padding:'.11rem 0'}}> this.state.flmPremExempt &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div> <div className={styles.insurance}>福临门(智慧版)</div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
投保人意外身故或全残,免交后期保费,保障不断 投保人意外身故或全残,免交后期保费,保障不断
...@@ -1356,11 +1113,12 @@ getPerodList(){ ...@@ -1356,11 +1113,12 @@ getPerodList(){
<span className={styles.detail}>交费期内出险,免交后期保费,保单继续有效</span> <span className={styles.detail}>交费期内出险,免交后期保费,保单继续有效</span>
</div> </div>
</div> </div>
{/*交费期内出险,免交后期保费,保单继续有效*/}
</div> </div>
} }
{ {
this.state.cctPremExempt &&<div style={{padding:'.11rem 0'}}> this.state.cctPremExempt &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div> <div className={styles.insurance}>常春藤(多倍版)</div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
被保人确诊重疾/中症/轻症,免交后期保费 被保人确诊重疾/中症/轻症,免交后期保费
...@@ -1375,107 +1133,11 @@ getPerodList(){ ...@@ -1375,107 +1133,11 @@ getPerodList(){
</div> </div>
</div> </div>
} }
{ </div>}
this.state.zhenaiPremExempt &&<div style={{padding:'.11rem 0'}}> {this.state.ybtElseCase && <div className={styles.health}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.subtitle}>
投保人意外身故或全残,免交后期保费,保障不断
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>人性化设计,让父母无后顾之忧</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
投保人全残或身故,豁免后期保费,保单继续有效
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>交费期内出险,免交后期保费,保单继续有效</span>
</div>
</div>
</div>
}
{
this.state.hxfPremExempt &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>投保人豁免</div>
<div className={styles.text}>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>被保人确诊轻症,豁免主与附加险后期保费,人性关怀更显体贴</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>投保人确诊重症/轻症/身故/全残,免交后期保费,保单继续有效</span>
</div>
</div>
<div className={styles.disease} style={{textAlign:'center'}}>
<span className={styles.illness_hxf} onClick={
this.showModalillness(this.state.hxfhmSeriousDisease,'所保重疾')
}>所保重疾</span>
<span className={styles.illness_hxf} onClick={
this.showModalillness(this.state.hxfhmGeneralDisease,'所保轻疾')
}>所保轻疾</span>
</div>
</div>
}
{
this.state.cqsPremExempt &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>被保人罹患轻症,免交后期保费,养病可安心</span>
</div>
</div>
</div>
}
{
this.state.hxhnjPremExempt &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}>{this.state.riskName}</div>
<div className={styles.text}>
<div className={styles.subtitle}>
投保人意外身故或全残,免交后期保费,保障不断
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>人性化设计,让父母无后顾之忧</span>
</div>
</div>
<div className={styles.text}>
<div className={styles.subtitle}>
投保人全残或身故,豁免后期保费,保单继续有效
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>人性化设计,贴心显关爱</span>
</div>
</div>
</div>
}
</div>
}
{
this.state.ybtElseCase && <div className={styles.health}>
<div className={styles.panel}>其他保障</div> <div className={styles.panel}>其他保障</div>
{ {
<div style={{padding:'.11rem 0'}}> this.state.ybtElseCase &&<div style={{padding:'.11rem 0'}}>
<div className={styles.insurance}> 医保通(普惠版)</div> <div className={styles.insurance}> 医保通(普惠版)</div>
<div className={styles.text}> <div className={styles.text}>
<div className={styles.subtitle}> <div className={styles.subtitle}>
...@@ -1487,30 +1149,32 @@ getPerodList(){ ...@@ -1487,30 +1149,32 @@ getPerodList(){
</div> </div>
</div> </div>
} }
</div> </div>}
}
<div className={styles.health} onClick={this.getProspectusaAditiona2}> <div className={styles.health} onClick={this.getProspectusaAditiona2}>
<div className={styles.panel} >查看条款</div> <div className={styles.panel} >查看条款</div>
</div> </div>
{ { this.state.proposalInterest.length>0 &&<div className={styles.health}>
this.state.proposalInterest.length>0 &&<div className={styles.health}>
<div className={styles.panel}>保单利益</div> <div className={styles.panel}>保单利益</div>
<div className={styles.insurance} style={{padding:'.11rem 0 .11rem .11rem'}}> {this.state.riskName}</div>
<div className={styles.insurance} style={{padding:'.11rem 0 .11rem .11rem'}}> 福临门(智慧版)</div>
<div className={styles.text} > <div className={styles.text} >
<p className={styles.exempt}>保单利益如下:</p> <p className={styles.exempt}>保单利益如下:</p>
<div> <div >
<img src={require('../../assets/image/getMoneyBox.png')} alt="" className={styles.getMoneyBox}/> <img src={require('../../assets/image/getMoneyBox.png')} alt="" className={styles.getMoneyBox}/>
<p className={styles.moment}>保单年度 <span >{this.state.year}</span> 年,被保人 <span >{this.state.age}</span> 岁时 <p className={styles.moment}>保单年度 <span >{this.state.year}</span> 年,被保人 <span >{this.state.age}</span> 岁时
<img src={require('../../assets/image/dropColor.png')} alt="" onClick={this.showModal('modal1')}/> <img src={require('../../assets/image/dropColor.png')} alt="" onClick={this.showModal('modal1')
</p>
<p style={{fontSize:'.17rem',textAlign:'center',marginTop:'.11rem',height:'.7rem'}}>现金价值: }/>
<span style={{color:'#FF9D5C',fontWeight:'bold'}}>{this.state.cashValue}</span> 元
</p> </p>
<span className={styles.litter} onClick={() => this.changeValue(this.state.year-1,)}> <p style={{fontSize:'.17rem',textAlign:'center',marginTop:'.11rem',height:'.7rem'}}>现金价值:<span style={{color:'#FF9D5C',fontWeight:'bold'}}>{this.state.cashValue}</span> 元</p>
<span className={styles.litter} onClick={() => this.changeValue(this.state.year-1,)
}>
<img src={require("../../assets/image/little.png")} alt=""/> <img src={require("../../assets/image/little.png")} alt=""/>
</span> </span>
<span className={styles.plus} onClick={() => this.changeValue(this.state.year+1,)}> <span className={styles.plus} onClick={() => this.changeValue(this.state.year+1,)
}>
<img src={require("../../assets/image/plus.png")} alt=""/> <img src={require("../../assets/image/plus.png")} alt=""/>
</span> </span>
</div> </div>
...@@ -1546,8 +1210,8 @@ getPerodList(){ ...@@ -1546,8 +1210,8 @@ getPerodList(){
background:'#FF9D5C' background:'#FF9D5C'
}} }}
/> />
<p className="sub-title" style={{color:'#999',fontSize:'.14rem',textAlign:'center',marginTop:'.2rem'}}> <p className="sub-title" style={{color:'#999',fontSize:'.14rem',textAlign:'center',marginTop:'.2rem'}}>拖动按钮查看不同年龄段保单利益</p>
拖动按钮查看不同年龄段保单利益</p>
</WingBlank> </WingBlank>
</div> </div>
...@@ -1556,113 +1220,106 @@ getPerodList(){ ...@@ -1556,113 +1220,106 @@ getPerodList(){
</div> </div>
</div> </div>
</div> </div>}
}
{
this.state.riskCode != '411204' && (
<div className={styles.health}>
<div className={styles.panel}>风险提示</div>
<div className={styles.text} style={{padding:'0 .1rem .1rem'}}>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>投保人在保单犹豫期后解除合同会遭受一定损失,具体保单利益请以保单合同为准。</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>温馨提示:以上演示说明为本平台对上述产品的理解,便于保险从业人员学习、交流,演示数据仅供参考,请以实际为准。</span>
</div>
</div>
</div>
)
}
{
this.state.riskCode == '411204' && (
<div className={styles.health}> <div className={styles.health}>
<div className={styles.panel}>风险提示</div> <div className={styles.panel}>风险保障</div>
<div className={styles.text} style={{padding:'0 .1rem .1rem'}}> <div className={styles.text} style={{padding:'0 .1rem .1rem'}}>
<div className={styles.trivia} > <div className={styles.subtitle}>
<span className={styles.dot}> 被保人确诊轻症,豁免主、附加险后期保费
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>身故、全残、疾病终末期以及重大疾病保险金仅给付其中一项</span>
</div>
<div className={styles.trivia} >
<span className={styles.dot}>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>本材料仅供参考,具体保险责任、责任免除事项以我司相关保险产品条款及生效保险合同为准</span>
</div> </div>
<div className={styles.trivia} > <div>
<span className={styles.dot}> <span className={styles.detail}>*等待期90日内因非意外原因导致重疾/全残/身故,返还已缴纳保费,主险和附加险合同终止</span>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>华夏福重大疾病保险计划由华夏福两全保险及附加华夏福重大疾病保险组成</span>
</div> </div>
<div className={styles.trivia} > <div>
<span className={styles.dot}> <span className={styles.detail}>*重疾保障金、疾病终末期保障金、身故/全残保险金,只赔付其中一项</span>
<img src={require('../../assets/image/dot.png')} alt=""/>
</span>
<span className={styles.detail}>以上所述“已交保费”指华夏福两全保险及附加华夏福重大疾病保险合同的已交保险费之和</span>
</div> </div>
</div> </div>
</div> </div>
)
}
</div> </div>
</Iscroll>
<WingBlank> <WingBlank>
<WhiteSpace />
<Modal <Modal
popup popup
visible={this.state.modal1} visible={this.state.modal1}
onClose={this.onClose('modal1')} onClose={this.onClose('modal1')}
animationType="slide-up" animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
// style={{
// marginLeft: '-2.07rem',
// left: '50%',
// width: '4.14rem',
// maxWidth: '680px',
// maxHeight:'6rem',
// // overflowY:'scroll'
// }}
> >
<List renderHeader={() => <div style={{fontSize:'.18rem'}}>保单利益 <span style={{float:'right',color:'green'}} onClick={this.onChangeYear('modal1')}> <List renderHeader={() => <div style={{fontSize:'.18rem'}}>保单利益 <span style={{float:'right',color:'green'}} onClick={this.onChangeYear('modal1')}>
完成</span></div>} className="popup-list"> 完成
</span></div>} className="popup-list">
</List> </List>
<div style={{height:'60vh',overflowY:'scroll'}}> <div style={{height:'60vh',overflowY:'scroll'}}>
<List> <List>
{data.map(i => ( {data.map(i => (
<RadioItem key={i.value} checked={this.state.insuranceValue == i.value} onChange={() => this.onChange(i.value,i.cashValue,i.age)}> <RadioItem key={i.value} checked={this.state.insuranceValue == i.value} onChange={() => this.onChange(i.value,i.cashValue,i.age)}>
{i.label} {i.label}
</RadioItem> </RadioItem>
))} ))}
</List> </List>
</div> </div>
</Modal>
</Modal>
<Modal <Modal
popup popup
visible={this.state.modal2} visible={this.state.modal2}
onClose={this.onClose('modal2')} onClose={this.onClose('modal2')}
animationType="slide-up" animationType="slide-up"
className={styles.modalCss1} // afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'hidden'
}}
> >
<List renderHeader={() => <div style={{fontSize:'.18rem'}}>利益演示表<span style={{float:'right',color:'green'}} onClick={this.onClose('modal2')}> <List renderHeader={() => <div style={{fontSize:'.18rem'}}>利益演示表<span style={{float:'right',color:'green'}} onClick={this.onClose('modal2')}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.2rem',height:'.2rem'}}/> <img src={require('../../assets/image/close.png')} alt="" style={{width:'.2rem',height:'.2rem'}}/>
</span></div>} className="popup-list"> </span></div>} className="popup-list">
</List> </List>
<div> <div >
<Table listTitle={this.state.tableTitle} listTable={this.state.tableList} scroll={{x:0, y:400}}></Table> <Table listTitle={this.state.tableTitle} listTable={this.state.tableList} scroll={{x:0, y:400}}></Table>
</div> </div>
</Modal> </Modal>
<Modal <Modal
popup popup
visible={this.state.modal3} visible={this.state.modal3}
onClose={()=>this.setState({'modal3':false})} onClose={()=>this.setState({'modal3':false})}
animationType="slide-up" animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
// style={{position: 'fixed',
// // marginLeft: '-2.07rem',
// // left: '50%',
// // width: '4.14rem',
// // maxWidth: '680px',
// // maxHeight:'60vh',
// // // overflowY:'scroll'
// }}
> >
<List renderHeader={() => <List renderHeader={() =>
<div style={{fontSize:'.18rem'}}>{this.state.illnessName} <span style={{float:'right',color:'green'}} onClick={this.onClose('modal3')}> <div style={{fontSize:'.18rem'}}>{this.state.illnessName} <span style={{float:'right',color:'green'}} onClick={this.onClose('modal3')}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.2rem',height:'.2rem'}}/> <img src={require('../../assets/image/close.png')} alt="" style={{width:'.2rem',height:'.2rem'}}/>
</span></div>} className="popup-list"> </span></div>
} className="popup-list">
</List> </List>
<div style={{height:'60vh',overflowY:'scroll',}}> <div style={{height:'60vh',overflowY:'scroll',}}>
<List> <List>
...@@ -1681,13 +1338,26 @@ getPerodList(){ ...@@ -1681,13 +1338,26 @@ getPerodList(){
visible={this.state.modal4} visible={this.state.modal4}
onClose={this.onClose('modal4')} onClose={this.onClose('modal4')}
animationType="slide-up" animationType="slide-up"
className={styles.modalCss1} // afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
maxHeight:'6rem',
overflowY:'scroll'
}}
> >
<List renderHeader={() => <div style={{fontSize:'.18rem'}}>条款列表<span style={{float:'right',}} onClick={this.closeInsurance}> <List renderHeader={() => <div style={{fontSize:'.18rem'}}>条款列表<span style={{float:'right',}} onClick={this.closeInsurance}>
<img src={require('../../assets/image/close.png')} alt="" style={{width:'.2rem',height:'.2rem'}} onClick={this.onClose('modal4')}/> <img src={require('../../assets/image/close.png')} alt="" style={{width:'.2rem',height:'.2rem'}} onClick={this.onClose('modal4')}/>
</span></div>} className="popup-list"> </span></div>} className="popup-list">
</List> </List>
<List> <List>
<List.Item > <List.Item >
<div style={{color:'#999999',marginLeft:'.11rem'}}>{this.state.mainRiskNmae}</div> <div style={{color:'#999999',marginLeft:'.11rem'}}>{this.state.mainRiskNmae}</div>
</List.Item> </List.Item>
...@@ -1695,8 +1365,8 @@ getPerodList(){ ...@@ -1695,8 +1365,8 @@ getPerodList(){
return( return(
<List.Item style={{left:'.1rem'}} key={index}>{item.configName} <List.Item style={{left:'.1rem'}} key={index}>{item.configName}
<div style={{float:'right',position:'relative',right:'.1rem'}} > <div style={{float:'right',position:'relative',right:'.1rem'}} >
<img src={item.cut != true?require('../../assets/image/open.png'):require('../../assets/image/off.png')} alt="" style={{width:'.14rem',height:'.08rem'}} <img src={item.cut != true?require('../../assets/image/open.png'):require('../../assets/image/off.png')} alt="" style={{width:'.14rem',height:'.08rem'}} onClick={()=>{
onClick={()=>{
console.log(item); console.log(item);
let that = this; let that = this;
let termList = this.state.termList; let termList = this.state.termList;
...@@ -1706,6 +1376,7 @@ getPerodList(){ ...@@ -1706,6 +1376,7 @@ getPerodList(){
termList:termList, termList:termList,
// riskCode:item.configCode, // riskCode:item.configCode,
}) })
/* 条款列表详情接口 */ /* 条款列表详情接口 */
this.props.dispatch({ this.props.dispatch({
type:'planEditor/PlanClause', type:'planEditor/PlanClause',
...@@ -1723,15 +1394,16 @@ getPerodList(){ ...@@ -1723,15 +1394,16 @@ getPerodList(){
} }
}) })
}}/> }}/>
</div> </div>
{ {
item.cut && <div> item.cut && <div>
<span style={{color:'#888',fontSize:'.14rem'}}>条款预览</span> <span style={{color:'#888',fontSize:'.14rem'}}>条款预览</span>
<span className={styles.deta} onClick={()=>{ <span className={styles.deta} onClick={()=>{
if(item.clauseUrl){
window.location.href = item.clauseUrl window.location.href = item.clauseUrl
}
}}> 查看详情</span> }}> 查看详情</span>
{this.state.clauseUrlList.map((item,index)=>{ {this.state.clauseUrlList.map((item,index)=>{
return( return(
...@@ -1745,10 +1417,46 @@ getPerodList(){ ...@@ -1745,10 +1417,46 @@ getPerodList(){
} }
</List.Item> </List.Item>
) )
}) })}
}
</List> </List>
</Modal> </Modal>
<Modal
popup
visible={this.state.modal5}
onClose={this.onClose('modal5')}
animationType="slide-up"
// afterClose={() => { alert('afterClose'); }}
style={{position: 'fixed',
marginLeft: '-2.07rem',
left: '50%',
width: '4.14rem',
maxWidth: '680px',
height:'100%',
// maxHeight:'6rem',
overflowY:'scroll'
}}
>
{/* <List renderHeader={() => <div>
</div>} >
</List>*/}
{/*<List.Item style={{width:'100%',height:'100%'}}>*/}
<div style={{height:'100%'}}>
<iframe width="100%" height="100%" scrolling="no" src={this.state.pdf} >
</iframe>
</div>
{/*<div style={{width:'100%',height:'100%'}}>55555555555</div>*/}
{/*</List.Item>*/}
</Modal>
</WingBlank> </WingBlank>
</div> </div>
} }
......
...@@ -2,8 +2,6 @@ import React, { Component } from 'react' ...@@ -2,8 +2,6 @@ import React, { Component } from 'react'
import { connect } from 'dva' import { connect } from 'dva'
import { Link } from 'dva/router' import { Link } from 'dva/router'
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import {Toast} from "antd-mobile";
import NoData from "../../components/NoData";
import styles from './poster.less'; import styles from './poster.less';
...@@ -14,31 +12,20 @@ class Poster extends Component { ...@@ -14,31 +12,20 @@ class Poster extends Component {
posterList: [], posterList: [],
selIdx: 0, selIdx: 0,
filterType: ['鸡汤', '节日', '产品'], filterType: ['鸡汤', '节日', '产品'],
loadingFlag:true
} }
} }
componentWillMount(){
//Toast.loading('loading...',0);
}
componentDidMount() { componentDidMount() {
document.title = '海报' document.title = '海报'
shareHide(); shareHide();
let key = Number(sessionStorage.getItem("key"));
if(key == 1){
this.filter('节日');
}else if (key == 2) {
this.filter('产品');
}else{
this.filter('鸡汤'); this.filter('鸡汤');
} }
}
componentWillUnmount(){ componentWillUnmount(){
document.title = '' document.title = ''
} }
filter(type) { filter(type) {
Toast.loading('loading...',0)
const _this = this; const _this = this;
this.props.dispatch({ this.props.dispatch({
type: 'poster/getPosterList', type: 'poster/getPosterList',
...@@ -48,16 +35,13 @@ class Poster extends Component { ...@@ -48,16 +35,13 @@ class Poster extends Component {
agentCode2: window.localStorage.getItem('project') agentCode2: window.localStorage.getItem('project')
}, },
callback(res) { callback(res) {
Toast.hide();
if (typeof res.data === 'object') { if (typeof res.data === 'object') {
_this.setState({ _this.setState({
posterList: res.data, posterList: res.data
loadingFlag:false
}) })
} else { } else {
_this.setState({ _this.setState({
posterList: [], posterList: []
loadingFlag:false
}) })
} }
} }
...@@ -66,14 +50,15 @@ class Poster extends Component { ...@@ -66,14 +50,15 @@ class Poster extends Component {
render() { render() {
let selIdx = 0;
if(sessionStorage.getItem("key")){
selIdx = Number(sessionStorage.getItem("key"))
}
const { posterList } = this.state; const { posterList } = this.state;
const roleId = window.localStorage.getItem('roleId');
if(this.state.loadingFlag){ let position = '';
return <div></div> switch (roleId) {
case '2':
position = '客户经理';
break;
default:
position = '督训';
} }
return ( return (
<div className={styles.wrapper}> <div className={styles.wrapper}>
...@@ -81,12 +66,11 @@ class Poster extends Component { ...@@ -81,12 +66,11 @@ class Poster extends Component {
<div className={styles.splitline}></div><ul className={styles.tags}> <div className={styles.splitline}></div><ul className={styles.tags}>
{ {
this.state.filterType.map((el, i) => { this.state.filterType.map((el, i) => {
return <li className={selIdx ===i?'on':''} key={i} onClick={() => { return <li className={this.state.selIdx===i?'on':''} key={i} onClick={() => {
this.filter(el); this.filter(el);
this.setState({ this.setState({
selIdx:i selIdx:i
}) })
sessionStorage.setItem( "key", i);
}}>{el}</li> }}>{el}</li>
}) })
} }
...@@ -94,17 +78,14 @@ class Poster extends Component { ...@@ -94,17 +78,14 @@ class Poster extends Component {
<ul className={styles.pList}> <ul className={styles.pList}>
{ {
posterList.length>0 ? posterList.map((el, i) => { posterList.map((el, i) => {
return <li key={i}> return <li key={i}>
<Link to={{ <Link to={{
pathname: "/poster/info", pathname: "/poster/info",
state: { search: '?imgpath=' + el.reportImage + '&position=' + position + '&name=' + window.localStorage.getItem('name') + '&phone=' + window.localStorage.getItem('number'),
id: el.reportCode,
reportImage: el.reportImage
}
}}><img alt="" src={el.reportImage} /></Link> }}><img alt="" src={el.reportImage} /></Link>
</li> </li>
}): <NoData /> })
} }
</ul> </ul>
</div> </div>
......
import React,{ Component, Fragment } from 'react'; import React,{ Component } from 'react';
import { connect } from "dva";
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
import share from '../../utils/share';
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import styles from './poster.less' import styles from './poster.less'
import moment from 'moment';
import { Toast } from "antd-mobile";
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
class PosterInfo extends Component{ class PosterInfo extends Component{
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
info: null info: {}
} }
} }
componentDidMount() { componentDidMount() {
document.title = '海报' document.title = '海报'
const posterImgWrap = this.posterImgWrap; const posterImgWrap = this.posterImgWrap;
const { state } = this.props.location; shareHide(false);
shareHide(); html2canvas(this.poster).then(function (canvas) {
const _this = this;
let userInfo = JSON.parse(localStorage.getItem("userInfo"));
if (state) {
const id = state.id;
Toast.loading('loading...');
_this.props.dispatch({
type: "poster/getPosterInfo",
payload: {
reportCode: id
},
callback(res) {
let info = {};
info.position = userInfo.roleId == 2 ? '客户经理' : '督训';
info.img = res.reportImage;
info.name = userInfo.name;
info.phone = userInfo.number;
info.qrcode = userInfo.base64;
info.imgtype = _this.getImgExtention(state.reportImage);
info.codeType = _this.getImgExtention(userInfo.qrcode);
_this.setState({
info
}, () => {
Toast.hide();
html2canvas(_this.poster).then(function (canvas) {
var image = new Image(); var image = new Image();
image.src = canvas.toDataURL("image/png"); image.src = canvas.toDataURL("image/png");
posterImgWrap.appendChild(image); posterImgWrap.appendChild(image);
}); });
}); let info = {};
}, if (this.props.location.search !== '') {
error(err) { const {
console.log(err); search
} = this.props.location;
const matchs = decodeURI(search).match(/imgpath=(.*)&position=(.*)&name=(.*)&phone=(.*)/i);
info.img = matchs[1];
info.position = matchs[2];
info.name = matchs[3];
info.phone = matchs[4];
} }
share({
decodeUrl: window.location.href.split('#')[0],
title: '我是'+info.name + ',您身边的保险管家',
desc: '用我的专业为万千家庭带来保障',
shareUrl: window.location.href,
thumbnail: info.img
});
this.setState({
info
}); });
}
// share({
// decodeUrl: window.location.href.split('#')[0],
// title: '我是'+info.name + ',您身边的保险管家',
// desc: '用我的专业为万千家庭带来保障',
// shareUrl: window.location.href,
// thumbnail: info.img
// });
}
getImgExtention = (img) => {
const pointIndex = img.lastIndexOf(".");
return img.substr(pointIndex+1);
} }
componentWillUnmount(){ componentWillUnmount(){
document.title = '' document.title = ''
} }
render() { render() {
const { info } = this.state; const { info } = this.state;
let weekday = Number(moment().format("d"));
const nowDate = moment().format('YYYY年MM月DD日') + " " + moment.weekdays()[weekday];//当天日期
return ( return (
<div className={styles.posterWrapper}> <div className={styles.posterWrapper}>
<div className={styles.poster} ref={el => (this.poster = el)}> <div className={styles.poster} ref={el => this.poster = el}>
{ <img src={info.img} alt="" />
info && <Fragment> <ul className={styles.info}>
<img src={'data:image/'+info.imgtype+';base64,'+info.img} alt="" /> <li>{info.position}</li>
<div className={styles.date_section}>{nowDate}</div> <li>{info.name}</li>
<div className={styles.info}> <li>{info.phone}</li>
<div className={styles.content}> </ul>
<img className={styles.contentBg} src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAApQAAAC0CAMAAAAdIkwRAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAADAUExURf///////////////////////////0dwTP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+DDa38AAABAdFJOU+bk5/MBAuIA5eME6fUD6u7wEfLoB+GL3x3bONLAN+3QsBr3KtS21l6TEF9blFxrbQnxzh4Yvs19evQmjBRVE1NKRO8YAAAEVElEQVR42u3a13LrNhSFYbBugaRIqpDqvbj33t//rUJJcc6ZRPJdJhjk/2484yuM9vLChsZKtvxA5POrXC0L9d+rxb2G+HKQL41eXFOwRbFclV+fIsGfQ1ffmXwt13mSxSacsdbqdH8OZbfTIpQWibMkX5ev36nchjKQ6+cwSZ3QMWTUbr8600GB9F0GaZNaFb00CZ+vd2NX2yHfT+duaE73aO9UosOhjOTU00zStmCG7nx6v01lFcq6LG690KTrUCfnPzfleUIobYyld7uo4liFMpDZ401o1unSwQ8vneqdM0hZKW0U3jzOqkAqX9rTZmjY4XTz4vD9HclFk6K0NJXNaVt8FcjT3LRMKicbtg9VZfVXNMwc5mdpKudPEihZFK55d6H2rjbLxT51ueKZY+9e6RaLaqd8ewkNPFtLj/Zf4JGMNF9SWlyVL2+i3tdGPhqc8eRuX1fW5W4y5vK2uCrT9bv6yM0csc4fZhL9ba/0I5k95FzeNnPyD1Wa+pWfzicjCeq/xdKvBzKakEm76aRUK2NfsnqsL9siQRT4leqHSPuy+iVzs7sps5Vamvv/Nk7LG56d/GrKk7Oh12KftH2pjJeqMPh/G2o6aw6Oj/rdRqPbPzoeNDPNu9t6bmH4AR2dJp7b6fU6rpekmpqEEW0ZajeuuDqkJWFQMCt8CgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAf1GtwqcAcwIZajeuuDokmDCBo9PEczu9Xsf1klQ7fCL/C4VrcEvqrDk4Pup3G41u/+h40Mw0bWk9t1DL2Ng5Oy1veHYifzk5G3otytL2fS1eqlVm6pj1WF+2RYIo8CvVD5H2ZfVL5mb3xpatVJkYOmWdT0YS1P1fTenXAxlNclJpNZ2U6iN3DM3kw0yi3yK5jWUkswdSaXdT5h/qfZ2auFQ648md1OUf6nI3GbNXWrxSput3JW8voYFHa+mRRLJHJCPd4g1urfDlTZQsCte8GWvval9P7rryyuMCt7Yo3WIhKpCnuXFV6WTDtvj7Q+lLe5hxgdtalPMnCVQ142nTtFTq5sX+y3t3gV80qUpLM9mcVm2kJJDZ441Zqaylg8ahotxUZWOQslVamcmbx1kVSLVZ0ha3nlH/7aCT8+poBwVynlCVFu6ToXe72Dwl1HbI99O5a1AstXd6+Pbe3N+nPHUsjKQ7n95vy0jtquf6OUxSJ3QMCabb/7kp+y5DtCqQVfTSJHy+3o1d7da0QF7LdZ5ksRFHbHW6h1fKzVLZ7fBVpU3iLMnX5asEu6kr+U6lfH6Vq2VhQijjXuPnUDZ6MaG0R7FclV+f8p1J+QNVbEqZ5PA0MwAAAABJRU5ErkJggg==' /> <div className={styles.posterImg} ref={el=>this.posterImgWrap=el}></div>
<div className={styles.info_name}>{info.name}</div>
<div className={styles.info_mid}>
<div>{info.position}</div>
<div>{info.phone}</div>
</div>
<div className={styles.info_img}>
{info.qrcode ? <Fragment>
<img className={styles.info_bg} src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcBAMAAAB4lt9+AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTDQ0NDMzMwAAAEBAQDMzMzMzMzMzMzQ0NDMzMzY2NjU1NTg4ODMzMzMzM5nVlb8AAAAPdFJOUwCUBQEIjJaRkwrePoiGl/QBlTMAAAC0SURBVGje7doxCoMwFIfxlxpxqBRdxLG4dcsRcgSn7g7uXqFX6D2EHqHn6NSjdKjQOAr/gsP3299HsgXyzLSObf3TjjFsGc78NZmubw8r50GVa15PK6az6qKHYjL3vneJrYl09nKqzFW60zly5MiRI0eO3CqX97pc3puPuueTsrU8gsI+WwAAAAAAAAAAAABEsrDP1peP0pb4u5efd3LkyJEjR+6POe1ytXj1W7yYLl6b1/oACHovZWyChAQAAAAASUVORK5CYII=' />
<img className={styles.info_qrcode} src={'data:image/'+info.codeType+';base64,'+info.qrcode} alt="" />
</Fragment> : <img className={styles.info_qrcode} src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABMCAYAAACWA2JIAAAXv0lEQVR4Xt2dCZhcVZXH/+fe92rvJb1kJfsCWSCyy8iWIToSZRQDkc8P2UbDEmBERRwZhhZHBWfcAAnCIIrAMEGWIIvI5AsKCoPEIJAQiIQsZO2k966qt9x75ruvqjq9VHVXdVebbt73dd579e56fvecc7f3QijTwW7nMey7/8Lszyflvk2+vpFqJr9epuQ/8MlQOWrIydYPa/bWsu9GoFywckHaO+C+s+4ToqOpWlt255bmxlcWLGtwy5HfBzGNsoDQ7Xsf0b7zGSgngAA/DVYO9NaN0Ml2wAohZIfvsE77wooPohDLUafygGh67xnlpz8O3wH76SyINPz3NoE0g6yQtm37bOu05U+Uo9AfxDSGDML52cXz9MT5j8p5pxwO7WQg+Gmoxt3g1hZIO9xG0ro0vPjKhz6IAixXnYYEov2uC+dDWC+wtMdQVR1k7UQADO5sBzyfdZr2q5Q+v/qiG35brgIPdzrcvnu+JnkWLHsSQJ1M4qX3tu/9zezZs53hzHtIIDrvvvB2H3IFWSHAsiGsMJilD8fer5NiG4fCu6x4vCHxuS+N+N4TM1u6deutgLyUQQJkgYQESIKktZUIl1Gk6tnhgjEkEB0/uWi8iIlzNUJxGQ7tVgitd7bTx6zqqlOpInpAJOJNVjR8Z+RjF28ergqUK13VuOF7WtO1JCwgAJA7ywwQYfnCss6lcOXj5cqzezpDAlGoQO2rbp0nxySWIBFVsOUjseOWbR+Owg8mTf+Fuz6plPoi+2o6aU1Kec3Slu/KuSd/lklGYUDktCGAYu4NCKMZ9n4R0zOI6tsHk3d/cYYFhMlwxx9XRcePiZzgsvdOfN7S3eUu+GDS47X3jnfJ36F8z4JWyPz5QDgKa+ZRyGiDnRF+9i/4LQCR1RAZutBK1N03mPwPCYhcprxqlaRly9RQC84/XW6n69RExaEqy4YTdmgnLbujo5R09639SaIK9vtK+VXdQbBlw54xLyNsaWeB5GDk7jPmiqS8SVZNvrGUfIsJO2waUUzmA4VhbhCpx/YuJeASBk4mQoKzkYjhEdEbEPxQ2LZ+SktuaxsoPfPcff7ui5Xy72HlU04jWCtYU2eBwnFAHtSK3hpi7smOXC6rp9xZTF6lhBmxINKPrpijoe9n4PiBKkTAPkl8RfjsOx8ZKGwAY+3KK5Xv/5CVsoxpMiAoGoWcODkwTdRlnuwATNc9M9Trv/lU5MxvlH1gOiJBuKuvPM5X6lkGxhQj2CAMg4n4+thn7ry5mDjp/711MSu+l5V3mAFhtIMSCYixE0AylDFP0viLrM8gAXfDi+A9W3yC/2+JS+4x+eQUtJgs+w0z4kB0PrJ8ApFcx6BxpdaOCEyMC6OfueOBYuK2PPndMXa7fp8TVow4A4OlgKiugUhUgUIRMAjc3gr//XfAHc1ZB68goH+c+MK9Xyomn2LCjDgQqceueFAzPltM4fOGIbSyh3mJZXfsGSgNbmgQ7eNEi1ZehaiSEAkBsM70pAyUXK9K627XWWBaQUJdnFj+y58PlE8xz0cUiPSjX5yjyX6TAZG/8MYSmCLnzvlDEfEPYp9e+bWBBGBAdMxMtOi0U8FpM33vQcQAUUEgmRP+QcHnAOUgCegXK5bfd8pA+RTzfESBSD5++XXM9K28BRdxAaoQ8FxoLwlwmkUYKuDS5+DdsbNXTqMBbLgBkTp6XItKORXsuDAwdNoBpx2QUJAJbJPVtAdaLWTtR7TKaErgT1gpZn195fL7bilG0AOFGVEgOh5b8QAB5/QuNIUqCXKczW4K7CbBXhLspEDSUyIRyjtGUZY3qfKsu/b3JwADwjllWoufcirgeuC0B+04QNqFSDsPeI6/oubrt7Tyqmuina43ixRPtYSK+a6bJuL1sUvu3TGQgIt9PqJAtD+24leC8InehRexGTZrKXuDgJ9iWRN1IHpWg0CCCdPjn7p910Ag3I/NbVGOU8GuD3ZdkOM3Uyq9Ivb5r/53sUIsR7gRBaLz8StXAb1BMCg2KwJNIh8IURtLE1GPbiQRBAMzBwLhbHx0AbniT8pxI+z5EGAfcfkUheTDoQg/STOXtZZDyMWkMaJAdDx21f8QYUnPgjMoPisKhfwaURtPohcIABLEs/oD4b791DUM/WXSYiJ7ikC6FSGZzOVNhE4wbrXnrLuDqEEXI8yhhBkQhPPmqnnMvATEh1uCQpqhtOYmQWIrgddb4YpXafaSsiyadDx+5UNEdGYfHxGbEYei/CDqE31mQgmQDJ5TCIT77prLAL7C5EPEM1hjJwh56mAGJvREeMYZ/zqQkN3Na44hSWcQME0zJBHt16ReDU0b/zTRggE3TRQEkd60+nDS+haATytcCCYmdAD0JEH8JDz3028MVOD+nidXX/Ugoy8IOWZWlBL1IfYcQHlg3wX7HqBcJluldds+D6y6zFMGhD4iHwhn24vzBeg2UFcXOdcfLlA0gs/4VnTq363xtr38UZA6FYBDJNbJw9LPYVd8gud71xLRUfk6acy8LW17X6mcuKjfjkNeEP5fnz5Ta/1jgCJFC5agWfMD24W4afYgNSS5+ur7OY9GmLGDNfHIGCVqQ8EgC0Yvs9PYrBnaZ92+z+OO/Q77rgbYQljMjX/8R32m352dr94sgMOLrpfJDdgkWf6ZSX+uu7AZYjvAYwncv5xIvGVNOPr63r6sexn6gPC2rDmVtb49sLODOvgVm/3LBmOukk9cfR9DLAGRDSJJZnqBTUM38w+k5NhZYYrVhgHF0Ebe2TOYc4MsTrV5OtnkI5meG1/aEwTvfWOmp+UNQgSJFn1oZiWMAhEPSiZaM9lEK2n8/P8rlGkPELz19xM88P0ExIsuZf6Av7annfbt7o9416sxeKkwpqxp7e78+NWfVnlJ+XsjWN9LTYH2q8w0AweCNtMNKns2974WNeOFqDBBsiPeXJjgXpuBFgfxPPddNO1JdRxoWlJ3+X07TVn8A5uXMdNHhli3QUUXwGZZN8s08LxHDxDOjpduFuDjBpVTr0jK0ysiM05+m7e+OsGV7tWC+VgQCTCSmrEexA+Hp3zkzfRfVh/OTXs3HZzbCVp6l6CzLb/HvRhTA1FRmf0tEz4z4s2Ay0Ey96Kq5jbY8smw3fYHPfW8KzS4qhz1KzkNZt+qnvItIso7AO0C4b7/yoeI6JslZ1AgAgPPuS7/KhSm7xEjX+WZQWvI90/13339nIPCHxiECUsVVRCVlV3CzweSDIgxNfdAihYgBFE7axxVTNgmQpWdhWazylX/PuloUHurt7J66tTmfHl0gfB2vf6vDJ5XroKQwD7NaCHGnP7SJOWG/M3rl5YKIljMiScgszAyWpCZOQ3MWmDSFMSY2pWwQs0kw9UUqZ4hBCm2Evtl1aRtiI/NK5RyyaBnOgKppHooMXZs3lnhAERn46aJYdbf1Jmpzb/pIXw35L39yudLMU3dTRdFY4GZyvyWBZCFEPiMqtpbZchuIjtWyVakhoTQmQEgMUSkk6onvU+Jw3ZJO2QGSGbWV0Ca5QZzLYN7Ahm5ZGWjKTM5nDsbceXGe2ZAX/hIQz0ej9fn3UgRJJ7es+kfLUEf/ZsSyGXmO2Hv7Ze/OFgQwUxoJAJKVPRy7hkNkTV1/0mWaAKbrhZ8aNPvJR/MirUfTKOyog6p1aaQ9N6hRQ3p3nIwNhRgiQ0bBObPJ+zeLTFhAjU1NckaIQSICFVCoCMpQQlKibSFFAkSQkSiJOGQQJjE1t0Htk+fPr1P+ia/AITXtOVaMOoPCQjPCTsbfne1EVpgXro5Xu66zvWcsuanhzPP/hayIbOaEaRl/IgBUVf3HSKryQg8AGCEr6HY3GuzukM++yroboHZcz3eVqX0ZlrSUNRmhHLJjJqb36tOwLqmXAmWnA57MrXtzYVmjMZtO6fDaZ1ohgXBwKnbmYJ7k7o5G1OQec6+2wHl+0GrCoeFCEeNahihvgWt2a6oeIYFJY3wDQSW0oc2EHzFZtEhuM6AYKWVDH5TWtjYl+7A1sqzGvodEZdc3wIRiDv2HKl9fVa5Ehx0OkKwt/GJMzl1YFpJaXjpVmavsysOWWGyQmOEHV3JAin4GVOU0QCjJplzMALMXWtoSbl7g0wrtgwQaO2nO2ORyA78DvuoYfgm/8hr2bNYWHJhSZUfhsACgp3X7r+A/XRJ/XzWbis8p+dGMyFCFI49QxB7OPAHxhyJwO51mSSwkkYLjHnSyJgmkGKjHcG9UCy8zLVBJ9glL7U3uqtzH116l1duEZCfPLCUwGY//aE9nLTtvfHQpQD36LnJsfOqEKqMsHkJxkz6OZ1gtxOcbINKtQHJ5rSoim/sXvhgTkfLXyAW0fC1mRJXnNMGZbSClAi0wZgkM8AypswYRwOFNbSvWWRgBBCUlwXDARRB3ByN7ttPi36e1/EORpDktx9YCosiZprZmFkpIZTZlm5miLW2uiXaXUDdr0uatylUSN2ytV5tef683s+tGadOQrSuMlgUSneAk63QnU3Q7Y3QrfuA9n2uNWHs833SZf1wJCEfTfnhRVAwe12z8x9aycAvGEEbcyQUKz+rBaRY+IGwMxphQrmajUhYGf+vIViHJDT7rDV5ybb9Lc3jL/jlQdM4GAoH+8b5YzMHrVNg3TqxtbZWTrMswmG2QJMtUWP61kIEfx0kkiJtxRAzXW4BcizHcUQ4EhWO68pwOEyu61shM4sHkEfCsoMemwkL6ZulzS1rTlAH/rrM8EcmXNAW7JmLZiFaU1MIBBsQE8c/17sGRPhT9Iwbv9n03HVVYRk7GVrYPfwAtDJtP2j12gv0AEbgwjezyBlzZJ4JV7MI6ZAJbQBoxfCz1+asfNbCd2OObsO5d3SavVWDYfE3H8AVKmTquZsuYKKzez8Pzf3E8YjWTCqoEW2Njpw04Zk+IIC90cU3XBb0s579ajxtJU4kRsi08YwJyrRuNlqR8wOkgp1jGXPE2lyzhA75HJwDANpnSNbsmVgeswzr4N5cQ6oU2pN166d0lurYRwwIZ+23r9OMY/qAOOLMkzhSM7k/ENbkSav7miboiLPnIlpyW7DytmPVNdHa6sQxJCiU8QOmxetugu/mBxzFHJbKAAhMUlgopLIAAhBhzZ7RBo/ZYg3fCs6sHIZvm3ePdNpnZ8PGjelFDc8HXeuBjhEDIrn2Oz8korreBRY108cKKx5j7QG+B20ctvEXZm9T2jjupKbKir4vwjCIffpG7KNf73q2+emrwhOtyiMJ2uyIysCwjWlyM17DaEgPPxDSkGkNP6w5pwnKYxjhK4vZNuFdZiem4TvMUYfZjmv208xemNlLsptO+eMmz3RoUUO/QEYEiPfWNkTGy+htYC6ww2+g9pT/uRTyrtAp1/ZYjDHvWXQeNuYIEhQJTE+2Z2Rchh3sKsvvB1hqDW1lzJIxQ1ZUw3eZba1ZhRhemnVI6xwAToRZe1GuczoYVTFG6zaN+vleISAjAkTyhZunkBbfMAtygxN5/ljE/EzktOv6bKHnVefK9orps4SfhdHbDxh/YIQd+AHJLPObIdP6DQCjAdqu0EYDTElUuFp3Adi7FxgTZaTijPpmRmov45WUol4ma2SA+P0tJwhpf66cEAInzXgjevKX78mXrtnllz6mY6qZlwv8gDC23vSGso7ZAOjtByLGDJmlRDuvGWI3zLqik9mJcH26nXsCqMg0so5aRvOuzPWYZo1lD5tp3J6Dp3ILotj00i9+fwlAp+cLb006diHb8fFmz2vOL+hUG3S6FdzRAqRaXDl+4tr8eYnGyMlf+o9C5TCzqqlnvjYpgKEVm7FBACKPHwiE72ht/AA8O48Z6uQ6J5IxQ27bQQ0wmacqOABgDgNhzsSDmt+4gbMwihXX8IVL/eFH50Pk31lhzVy8lKzE3H56TUlrzpwf5C2dZhVxW/+9P0dpFiaw+p/HpjVFi/EDA5qhSF1mcSIwQ70AmN9zEAwAc2x8mKkhWNw49Ef6pduuIlDeOSZr5hmfZSu6oPCArrEzPHtewbeEQrZ9Jx136YAzqG0PLq+zKuLGw3L37mh3P8CxUFdvyJihmpDSgQb08QN5zFAfAPMZaICBYAgcchC8qiHkTxt3lbHS+ZqEPePvz2cZOarwFEdjh334gpsKNieBJyLHX/F2Mc2t+bGLqm0vFjHjgC4/kFK6N4CS/EBeAJnSdB/0HXoQf1k51nHEeQeXG3uKLDTjjIu0CB3dj0Z0hI448vpCghaEl0PHX/5KMSBMGF51RaI96kfy+4Fu3dGcH8D7QH28SDNktCB7NDQYB919d2KxRRyecOnX7poj3PyOOmg19bNnkrBrzFZL47DhJaHdJHSqHUi1g512X9Yftr5Q6Qj0rn3CF9aUUnr+4zXRlr0cNt3RPuOBLgCl+IFuAG5sCBZee79Ec8g1wl1397HQYn4pgiolrJZoiRzzTyW/jstPXxVuakI48APmKKY72o8ZCtK4sYELTQoechDea784WathXA8hqNDRFz7a377TQmDNKBzRVKjHeGArgHHZ3lBuPNAbQNAb6qUFwVxy4QHrIQeR/vMvFgMcK6WVlxRWSoTBa2jhBYNaM+C1p1vAtMy6zEDjgQIAcuUdsSDWrm2wTqqdfXqwHaXAIatmLIS0x8FzoF2zSpcyZgI61Qp0toJTba6cObfvwlC39MIR6zWavayxJIDdAptPUeBhZGAU0oI8GtA9v4HWKQ6pRvCbqxI+/A/1JyBRf/SnSYjDtZuGcjoDCMEqXccBcPsBs1qXiiw47tb+0rBUeCstXPr+YEGYeNwAgQnLZd8BWV8TVAqALm0ZSuGGGpfferTWA/W7a0PWzzuHWQQja7gdwVczOdUK3d4E7twP3XYgFT7yI9+HJQtOGCrXa4ouXPbekMtrOjurzj043hmiFvQANtTCDSU+v7F6nBvh2n5bc82C8wg8LzBLZrNGqh0q2ZzRiLYDUO2NqfDxi77bXxpmejQy55wtQylr97hmwrDr3nRHex0DmaF85Ti0pmnL6nFpQf066lDFvPNZY4H2zfvPHcYnQCebwB1N0G1GI/Yn7ZPPKDyyDpys4ujcs01/p2xHZhtmz2MwAEaGadr8dD2cAd7CqZ85E4LHKPMiukoCySR8pxlob4dy9oPbmvzQvJP2E3uLNfNcAIlgXytRKxF2guWmEOx1mLvu3eF4O9QAGQqAkQKiEjVDaKRNqHeVeyOYPwmYuapCCs4+A2slyTvsIz5VYMp8COUoQ9RDa5p4bfd9UyVVJ7mpc6Et6b8YqC2mErnPqAhgjYzKr9DkjzeVlOEwBy6mDsNchNKTT2/87WwZpl8yo6L02IHebLegL6RZ/7BvMPGTf312shT2SWA1A0ymDObrB43E/LYVbnqZJi9LlZruqAPBO/4Y9ZV7H0CTS61sLny2m/OmPfXU5UTU9VUB3vx0GKGKGKb47USL+uy6cHe8cCK0vhgaHyo0BDXfgWbQz0JTT32wlGmVUQfC3f7SZUR87mAh9IjH8nv2lBOf5cYXK/yktQKkTwfBbEJ0mfEWQTxmTznxBd78cqUfoWuA4GX3Ig961p58klmmLWpDxKgCwbv/XO8rdad5/71IafQbjIk322rCDUrsvYXBU/MFFiRfUqxnEnhsqXkSi7utw459sph4owqEu/O1iyHL+YoZmS1mr0Dgw8UIq/QwlE46+Er11KMGfGly1IDgzZvDqsr7PoDiP0tRuuTKGyOzGr3GGj93wG8/jRoQbuOm4wTTheWV1PCnRkJ0itr11xP1/zXo0QOiecsFxDRsK3nDh4TIg7o9VjOz3w/VjwoQzCz81p3XgdXoMUvdyLIQT4WqJve7gWF0gOh4b7zW0UuCLwuMwkNY/CdKTOrzMk33qowSEHsXamDxKGQQFJk1v2NVjv91f+UfFSC89sZFQtKCUQvC521WZX2/O0lGDQiScgK0eeFSmW9kmHf1gmutSQRfzDD/qGALaa5OvetW1Ah3OGALYDvFa54a9RoxkHCMMweeF9hQLxCPC0yzCLAF9kuBOkFosyxQpwAJkRTSilGcgHTwnwc5DkQ4IiRcCJBnptKFS8GHUATIl4AdQDf/mQHgC5AtfXP2gzcygzdxfXNN5jp4V1iaj61BkYAk8zarZKZddsWYfqff/x9TAO8fN1pnFQAAAABJRU5ErkJggg==' alt="" />}
</div>
<img className={styles.infoSplice} src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAB4CAYAAADYDyODAAAAAXNSR0IArs4c6QAAAYJJREFUOBF9k0tLw1AQRnvT2xKEuBAX4kJUFAURBBFciH+9hD4sLhRcqOBrIxRcCUWKfcVvTkkaeiVZTE9m5n7z6I1rt9tZTU9kxp4K8I1Ggxw/Ho+voMA4Cd6Y15IvgclkQlqo7Ov1OiHvnDuHAuM6nc69eb2eM6BCUDoo+Pl8fgIFxgSf0FH1Y2A6nZL2T4fyz8iJouiIpNy4VqvlCUnnBVCHu8BsxqHlMm1Ai9R8lmW/gIoe4MqNCcaEpPMGSHkbqBDUpD/kjEajfYPisUkTe7Oi74Cm2AR0yn5LHSqEx1b3beTV4R6u3Lher7dBSP18AJprHVAJ0ood+kJQoS9ykiRZ6VAjbxHSbVmMrLc1PKFgcVtU/ZOc4XC4skONvJMffwXUIbfWlmCO0shlwUX1wWCw8i/3+/1DdLSNZ0A6DFlMWoBdUUthdY9QYFyapqfkqPoDEDS2FCx/cXeBFg7X7XYv0NHCb4GK+9xsNjlln3AXCox1eI1OHMcpoGTSisb+AHV6nDyFBiX3AAAAAElFTkSuQmCC' />
</div>
</div>
</Fragment>
}
<div
className={styles.posterImg}
ref={el => (this.posterImgWrap = el)}
/>
</div> </div>
<div className={styles.post_tips}>{info && '长按保存图片或发送给朋友'}</div> {/* <ul className={styles.operation}>
<li className={styles.msg}>消息</li>
<li className={styles.moments}>朋友圈</li>
<li className={styles.download}>下载</li>
</ul> */}
</div> </div>
); )
} }
} }
export default connect(({ poster }) => ({ poster }))(PosterInfo); export default PosterInfo;
...@@ -135,106 +135,34 @@ body{ ...@@ -135,106 +135,34 @@ body{
display: flex; display: flex;
overflow-y: auto; overflow-y: auto;
flex-flow: column; flex-flow: column;
.date_section{ justify-content: space-between;
position: absolute;
top: .1rem;
z-index: 5;
height: .22rem;
line-height: .22rem;
width: 1.7rem;
left: 50%;
margin-left: -.85rem;
text-align: center;
color:#333333;
font-size: .14rem;
font-family: Arial, Helvetica, sans-serif;
border-radius: .1rem;
background:#fff;
}
.poster{ .poster{
position: relative; position: relative;
width: 3.26rem; width: 3.54rem;
height: 5.8rem; height: 6.4rem;
margin: 0 auto; margin: .2rem auto;
font-variant: small-caps;
img{ img{
position: relative; position: relative;
z-index: 1; z-index: 1;
width: 100%; width: 100%;
height: 100%;
} }
.info{ .info{
position: absolute; position: absolute;
display:flex;
left:0; bottom:0; left:0; bottom:0;
width: 100%; width: 100%;
z-index: 4; z-index: 4;
padding: .12rem; padding: .13rem 0 .12rem .2rem;
box-sizing: border-box; box-sizing: border-box;
&:before{ &:before{
position: absolute; left:0; top:0; position: absolute; left:0; top:0;
width:100%; height: 100%; background:#000; width:100%; height: 100%; background:#000;
opacity: .4; z-index: 1; opacity: .4; content:''; z-index: 1;
}
.content{
position: relative;
display:flex;
justify-content:space-between;
width:100%;
height: .9rem;
z-index: 2;
color: white;
align-items: center;
.contentBg {
position: absolute;
left:0; top:0;
width: 100%; height: 100%;
z-index: 1;
}
.infoSplice {
position: absolute;z-index: 3;
width: 1px; height: .6rem; left: .76rem; top: .14rem;
}
.info_name{
position: relative;
display: table-cell;
width:.76rem;
color:#333;
font-size: .2rem;
//padding-top: .3rem;
flex-shrink: 0;
//height: .9rem;
text-align: center;
vertical-align:middle;
z-index: 2;
}
.info_mid{
position: relative;
z-index: 3;
font-size:.15rem;
// padding-left: .12rem;
width:40%;
//padding-top: .22rem;
color:#666;
}
.info_img{
position: relative;
z-index: 4;
width:.78rem;
height: .78rem;
text-align: right;
margin-right:.06rem;
margin-top :.06rem;
.info_bg{
position: relative;
width: 100%; height: 100%;
}
.info_qrcode{
position: absolute;
width: .7rem; height: .7rem;
left: .04rem; top: .04rem;
}
} }
li{
position: relative; z-index: 4;
color:rgb(236, 232, 232);
font-size: .18rem;
line-height: .25rem;
} }
} }
.posterImg { .posterImg {
...@@ -245,10 +173,6 @@ body{ ...@@ -245,10 +173,6 @@ body{
z-index: 6; z-index: 6;
} }
} }
.post_tips {
color:#999; font-size: .14rem; text-align: center;
line-height: .26rem;
}
.operation{ .operation{
height: 1.27rem; height: 1.27rem;
width: 100%; width: 100%;
...@@ -285,21 +209,3 @@ body{ ...@@ -285,21 +209,3 @@ body{
} }
} }
} }
\ No newline at end of file \ No newline at end of file
.haveNoData{
position: relative;
top: 0;
left: 0;
margin: 50% 0 0 50%;
transform: translate(-50%,-50%);
img{
width:2rem;
height:2rem;
}
.text{
text-align: center;
font-size: .2rem;
margin-top: .1rem;
color: #9b9b9b;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,6 @@ import { connect } from 'dva' ...@@ -3,7 +3,6 @@ import { connect } from 'dva'
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import Tabs from "../../components/Tabs" import Tabs from "../../components/Tabs"
import {Toast} from "antd-mobile"
...@@ -15,7 +14,6 @@ class ProspectusList extends Component { ...@@ -15,7 +14,6 @@ class ProspectusList extends Component {
tab:['所有','我的'], tab:['所有','我的'],
allPlanList:[], allPlanList:[],
myPlanList:[], myPlanList:[],
loadingFlag:true
} }
} }
...@@ -29,9 +27,9 @@ class ProspectusList extends Component { ...@@ -29,9 +27,9 @@ class ProspectusList extends Component {
pageNo:"0" pageNo:"0"
}, },
callback(data){ callback(data){
// data.sort((a,b)=>{ data.sort((a,b)=>{
// return Date.parse(b.createTime) - Date.parse(a.createTime) return Date.parse(b.createTime) - Date.parse(a.createTime)
// }) })
that.setState({ that.setState({
myPlanList:data myPlanList:data
}) })
...@@ -46,28 +44,19 @@ class ProspectusList extends Component { ...@@ -46,28 +44,19 @@ class ProspectusList extends Component {
payload:{ payload:{
riskName:"", riskName:"",
riskStatus:1, //1 启用 riskStatus:1, //1 启用
"proId":localStorage.getItem("project"), "project":localStorage.getItem("project"),
"website":localStorage.getItem("website"), "website":localStorage.getItem("website"),
"orgId":localStorage.getItem("orgId"), "orgId":localStorage.getItem("orgId"),
}, },
callback(data){ callback(data){
Toast.hide();
console.log(data); console.log(data);
that.setState({ that.setState({
allPlanList:data, allPlanList:data
loadingFlag:false
}) })
}, },
}) })
} }
componentWillMount(){
Toast.loading('loading...',0);
}
componentDidMount(){ componentDidMount(){
let key = sessionStorage.getItem("key");
let tab = this.props.location.query ? this.props.location.query.key : key;
sessionStorage.clear();
sessionStorage.setItem("key",tab);
document.title = '计划书'; document.title = '计划书';
let that = this; let that = this;
/* 计划书接口 */ /* 计划书接口 */
...@@ -81,17 +70,10 @@ class ProspectusList extends Component { ...@@ -81,17 +70,10 @@ class ProspectusList extends Component {
render() { render() {
console.log(this.props.login); console.log(this.props.login);
if(this.state.loadingFlag){
return <div></div>
}
return ( return (
<div style={{height:'100%',backgroundColor:'white'}}> <div style={{height:'100%',backgroundColor:'white'}}>
{/*<HeaderNav title={this.state.navTitle} />*/} {/*<HeaderNav title={this.state.navTitle} />*/}
<Tabs title={this.state.tab} <Tabs title={this.state.tab} allPlanList = {this.state.allPlanList} myPlanList = {this.state.myPlanList} getMyPlan={this.getMyPlan} style={{paddingTop:0}}/>
allPlanList = {this.state.allPlanList}
myPlanList = {this.state.myPlanList}
getMyPlan={this.getMyPlan}
style={{paddingTop:0}}/>
</div> </div>
) )
} }
......
...@@ -6,9 +6,7 @@ body{ ...@@ -6,9 +6,7 @@ body{
.welcome{ .welcome{
width: 4.14rem; width: 4.14rem;
height: 100%; height: 100%;
background: url('../../assets/image/welcome.png') no-repeat center center/100%; background: url('../../assets/image/welcome.png')no-repeat center center/100%;
background-size: contain;
background-color: white;
} }
/* /*
.welcome img{ .welcome img{
...@@ -17,26 +15,3 @@ body{ ...@@ -17,26 +15,3 @@ body{
height: 100%; height: 100%;
} }
*/ */
.animated{
position: absolute;
width: 100px;
font-size: 50px;
top: 50px;
left: 50%;
margin-left: -50px;
}
.FadeInFrame{
-webkit-animation-name: fadeIn; /*动画名称*/
-webkit-animation-duration: 2s; /*动画持续时间*/
-webkit-animation-iteration-count: 1; /*动画次数*/
-webkit-animation-delay: 0s; /*延迟时间*/
}
@-webkit-keyframes fadeIn {
from {
opacity: 0; /*初始状态 透明度为0*/
}
to{
opacity: 1; /*结尾状态 透明度为1*/
}
}
\ No newline at end of file \ No newline at end of file
import React, { Component } from 'react' import React, { Component } from 'react'
import { connect } from 'dva' import { connect } from 'dva'
import shareHide from "../../utils/shareHide"; import shareHide from "../../utils/shareHide";
import {urlGetParams} from "../../utils/dataFilter";
import styles from './Welcome.css' import styles from './Welcome.css'
// import ReactCSSTransitionGroup from "react-addons-css-transition-group";
class Welcome extends Component { class Welcome extends Component {
constructor(){ constructor(){
super() super()
this.state={ this.state={
phoneNum:urlGetParams(window.location.href).phoneNum ? false : true
} }
} }
go = ()=> { go = ()=> {
let url = window.location.href; this.props.history.push('/home');
let location = "";
//后台重定向到欢迎页面时,2秒后跳转home页面,并将参数带过去。
if(this.props.location.query){//登录页面过来,携带了phoneNum参数
location = window.location.origin+'/index.html#/home?' + url.split('?')[1] + "&phoneNum="+this.props.location.query.phoneNum;
}else {
location = window.location.origin+'/index.html#/home?' + url.split('?')[1];
}
window.location.href = location;
} }
componentDidMount() { componentDidMount() {
document.title = '华夏O2O智慧工作平台';
shareHide(); shareHide();
setTimeout(this.go,2000) setTimeout(this.go,2000)
} }
render() { render() {
let animate = {
textAlign:'center',
position:'absolute',
top:'70%',
fontSize: '.2rem',
width: '100%',
}
return ( return (
<div className={styles.welcome}> <div className={styles.welcome}>
{this.state.phoneNum && <div className={styles.FadeInFrame} style={animate}> {/*<img src={require('../../assets/image/welcome.png')} alt=""/>*/}
恭喜您成功注册智慧工作平台<br/>
开启智慧工作之旅
</div>}
</div> </div>
) )
} }
......
...@@ -7,12 +7,8 @@ span { ...@@ -7,12 +7,8 @@ span {
body{ body{
background: white; background: white;
} }
:global(.am-modal-content){
.modalWrap{
:global(.am-modal-content){
background: none; background: none;
}
} }
.splitline { .splitline {
width: 100%; width: 100%;
......
...@@ -23,8 +23,7 @@ class ExpertVideo extends Component { ...@@ -23,8 +23,7 @@ class ExpertVideo extends Component {
<Modal <Modal
popup popup
animationType="slide-up" animationType="slide-up"
wrapClassName={css.modalWrap} visible = {show}
visible={show}
> >
<div className={css.line}></div> <div className={css.line}></div>
<div className={css.e_wrap}> <div className={css.e_wrap}>
......
...@@ -23,9 +23,10 @@ export async function Dictionaries(params) { ...@@ -23,9 +23,10 @@ export async function Dictionaries(params) {
} }
/* 提交至督训*/
export async function sendMaster(params) { /* 缴费期间 ,保险期间*/
return request('/o2o/wx/sendMaster', { export async function PremiumPaymentPeriod(params) {
return request('/o2o/MicroPlan/getProspectusPeriod', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
...@@ -33,18 +34,20 @@ export async function sendMaster(params) { ...@@ -33,18 +34,20 @@ export async function sendMaster(params) {
} }
/* 投保人手机号是否在跟进中 开始弃用2019-7-1 */
export async function isFollow(params) { /* 提交至督训*/
return request('/o2o/customer/getAllCustomer', { export async function sendMaster(params) {
return request('/o2o/wx/sendMaster', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
}); });
} }
/* 投保人手机号是否在跟进中 */ /* 投保人手机号是否在跟进中 */
export async function followCustomer(params) { export async function isFollow(params) {
return request('/o2o/customer/followCustomer', { return request('/o2o/customer/getAllCustomer', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
......
...@@ -35,9 +35,10 @@ export async function getMyPlan(params) { ...@@ -35,9 +35,10 @@ export async function getMyPlan(params) {
} }
/* 获取当前登录人的信息 */
export async function getCustomerInfo(params) { /* 我的计划书--获取被保人信息 */
return request('/o2o/customer/getLoginInfo', { export async function getMyPlanMessage(params) {
return request('/o2o/proposalInterest/getProposalInterestBySeriNo', {
method: 'post', method: 'post',
headers:headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
...@@ -45,50 +46,16 @@ export async function getCustomerInfo(params) { ...@@ -45,50 +46,16 @@ export async function getCustomerInfo(params) {
}); });
} }
/*获取z专家房间列表 */
export async function GetRoomList(params) {
return request('/o2o/weapp/webrtc_room/get_room_list', {
method: 'post',
headers: headersPost,
body: JSON.stringify(params),
});
} /* 获取当前登录人的信息 */
/*获取查找的内容 */ export async function getCustomerInfo(params) {
export async function getSearchList(params) { return request('/o2o/customer/getLoginInfo', {
return request('/o2o/home/search', {
method: 'post', method: 'post',
headers: headersPost, headers:headersPost,
body: JSON.stringify(params), body: JSON.stringify(params),
}); });
} }
/*点击记录存储
operFunction (integer, optional): 操作功能(行业动态-100110; 计划书-100120; 邀请函-100130; 资料库-100100) ,
operType 操作类型(浏览-201; 转发-202) ,
operCode (string, optional): 操作条目对应的主键code ,
*/
export async function setClickRecord(params) {
let userInfo = JSON.parse(localStorage.getItem('userInfo'));
let param = null;
if(params.phoneNum){
param = params;
}else {
param = {...params,
"phoneNum": userInfo.number,
"orgId": userInfo.orgId,
"pointId": userInfo.website,
"proId": userInfo.project,
"userId": userInfo.id
};
}
return request('/o2o/dataStatic/save', {
method: 'post',
headers: headersPost,
body: JSON.stringify(param),
});
}
...@@ -24,5 +24,14 @@ export async function deleteCustomer(params) { ...@@ -24,5 +24,14 @@ export async function deleteCustomer(params) {
}); });
} }
/*获取房间列表 */
export async function GetRoomList(params) {
return request('/o2o/weapp/webrtc_room/get_room_list', {
method: 'post',
headers: headersPost,
body: JSON.stringify(params),
});
}
...@@ -16,11 +16,3 @@ export async function performList(params) { ...@@ -16,11 +16,3 @@ export async function performList(params) {
body: JSON.stringify(params), body: JSON.stringify(params),
}) })
} }
//个人排行榜查询
export async function achievementRank(params) {
return request('/o2o/achievement/ranking',{
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
})
}
...@@ -51,37 +51,3 @@ export async function deletePlan(params) { ...@@ -51,37 +51,3 @@ export async function deletePlan(params) {
} }
/* 我的计划书--获取被保人信息 */
export async function getMyPlanMessage(params) {
return request('/o2o/proposalInterest/getProposalInterestBySeriNo', {
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
});
}
/* 缴费期间 ,保险期间*/
export async function PremiumPaymentPeriod(params) {
console.log('getProspectusPeriod----------------------------------------->>>>',params)
return request('/o2o/MicroPlan/getProspectusPeriod', {
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
});
}
/* 缴费期间 ,保险期间*/
export async function addReceiveInfo(params) {
console.log('getProspectusPeriod----------------------------------------->>>>',params)
return request('/o2o/MicroPlan/saveReceivePeopleInfo', {
method: 'post',
headers:headersPost,
body: JSON.stringify(params),
});
}
import request from '../utils/request'; import request from '../utils/request';
import { headersPost } from '../utils/Constants'; import { headersPost } from '../utils/Constants';
/* 获取海报列表*/ /* 获取客户*/
export async function GetPosterList(params) { export async function GetPosterList(params) {
return request('/o2o/report/getReportConfigList', { return request('/o2o/report/getReportConfigList', {
method: 'post', method: 'post',
...@@ -10,15 +10,6 @@ export async function GetPosterList(params) { ...@@ -10,15 +10,6 @@ export async function GetPosterList(params) {
}); });
} }
/* 获取海报信息*/
export async function GetPosterInfo(params) {
return request("/o2o/report/getReportBaseById", {
method: "post",
headers: headersPost,
body: JSON.stringify(params)
});
}
var pinyin = require("chinese-to-pinyin"); var pinyin = require("chinese-to-pinyin");
var moment = require('moment');
/** /**
* 按拼音第一个字母排序 * 按拼音第一个字母排序
* @param {需要排序的数据表} arr * @param {需要排序的数据表} arr
...@@ -60,161 +59,5 @@ export function dataFilter(arr, renderType, keywords) { ...@@ -60,161 +59,5 @@ export function dataFilter(arr, renderType, keywords) {
return ar; return ar;
} }
/*
url参数解析,返回一个参数对象
*/
export function urlGetParams(url) {
let json = {};
if(url) {
let url1 = window.decodeURI(url).split('?').pop();
let url2 = url1.split('&');
if(url2.length>0){
for(let i in url2){
let item = url2[i].split('=');
json[item[0]] = item[1];
}
}
}
return json;
}
/*
计算年龄
*/
export function getBirthdayAge (dateString) {
let today = new Date();
// let aDate = dateString.split('-');
// let birthDate = new Date(aDate[0] + '-' + (parseInt(aDate[1]) < 10 ? '0' + aDate[1] : aDate[1]) + (parseInt(aDate[2]) < 10 ? '-0' + aDate[2] : '-'+aDate[2]));
let birthDate = new Date(moment(dateString).format("YYYY-MM-DD"));
let age = Number(today.getFullYear()) - Number(birthDate.getFullYear());
let m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age ;
}
/*
根据key值为value 在计划书中查出对应的计划书
*/
export function getPlanInListWithCode (key,value,list) {
let [minekey,minevalue,AllList]= [key,value,list];
let targetList = {};
for(let i in AllList){
if(String(AllList[i][minekey]) === String(minevalue)){
targetList = AllList[i];
break;
}
}
return targetList ;
}
export let filterDate = {
'YY_MM_DD': ()=> {
// 以YY-MM-DD格式返回当前日期
let date = new Date();
return date.getFullYear() +'-'+ (date.getMonth()+1) +'-'+date.getDate();
},
'FromDateToTarget': (num)=>{
//从当前日期算 距离 num年前 是那一年
let date = new Date();
let date2 = date.getFullYear();
if(num){
return date2-num-1;
}else{
return date2;
}
}
}
/*
判断string1,string2时候同时存在arry数组中
*/
export function isContain(string1,string2,arry){
if(arry.indexOf(string1) > -1 && arry.indexOf(string2) > -1) {
return true
}else{
return false
}
return false
}
export let arrayDeal = {
// 交集
'Intersect': (a,b)=> {
let BB = new Set(b);
return a.filter(x => BB.has(x));
},
// 差集
'Minus': (a,b)=> {
let BB = new Set(b);
return a.filter(x => !BB.has(x));
},
// 补集
'Complement': (a,b)=> {
let AA = new Set(a);
let BB = new Set(b);
return [...a.filter(x => !BB.has(x)), ...b.filter(x => !AA.has(x))];
},
// 并集
'UnionSet': (a,b)=> {
return Array.from(new Set([...a, ...b]));
}
}
export function StandardFormat (str){
//将 ****-*-* 转成标准的 ****-**-**
let string1 = String(str);
if (string1){
let arr1 = string1.split("-");
if (arr1[1].length==1){
arr1[1] = "0"+arr1[1];
}
if (arr1[2].length==1){
arr1[2] = "0"+arr1[2];
}
return arr1.join("-");
}
return string1;
}
//从数组对象中找出特定你的数组
export function getTargetList (param,list){
let key = param;
let AllList = list;
let newList=[];
if(AllList.length>0){
for(let ii in AllList){
if(AllList[ii].riskLabels){
if(AllList[ii].riskLabels.indexOf(key) != -1){
newList.push(AllList[ii]);
}
}
}
}
return newList;
}
//获取职位
export function getCardName(id){
let roleid = String(id);
switch (roleid) {
case "2":
return "客户经理";
break;
case "3":
return "督训";
break;
default:
break;
}
}
//获取字符串的字符长度
export function GetLength(str){
let str1 = String(str);
if(str1 != ""){
return str1.replace(/[\u0391-\uFFE5]/g,"aa").length; //先把中文替换成两个字节的英文,在计算长度
}
return 0;
}
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -22,20 +22,7 @@ function checkStatus(response) { ...@@ -22,20 +22,7 @@ function checkStatus(response) {
* @return {object} An object containing either "data" or "err" * @return {object} An object containing either "data" or "err"
*/ */
export default function request(url, options, type) { export default function request(url, options, type) {
let newOptions = {...options} return fetch(url, options)
if(localStorage.getItem('orgId')){
newOptions.headers ={
...newOptions.headers,
orgId :localStorage.getItem('orgId')
}
}
if(localStorage.getItem('project')){
newOptions.headers ={
...newOptions.headers,
proId :localStorage.getItem('project')
}
}
return fetch(url, newOptions)
.then(checkStatus) .then(checkStatus)
.then(type === 'img' ? d => { return d.blob(); } : parseJSON ) .then(type === 'img' ? d => { return d.blob(); } : parseJSON )
.then(data => ({data})) .then(data => ({data}))
......
import $ from 'jquery'; import $ from 'jquery';
import {setClickRecord} from '../services/home';
/** /**
* 分享 * 分享
* @param {*} options * @param {*} options
...@@ -14,7 +13,7 @@ import {setClickRecord} from '../services/home'; ...@@ -14,7 +13,7 @@ import {setClickRecord} from '../services/home';
export default function share (options) { export default function share (options) {
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: 'https://iwpuat.ihxlife.com/o2o/wx/cover', url: 'https://zmt.ihxlife.com/o2o/wx/cover',
data: JSON.stringify({ data: JSON.stringify({
shareGoal: options.decodeUrl shareGoal: options.decodeUrl
}), }),
...@@ -43,9 +42,6 @@ export default function share (options) { ...@@ -43,9 +42,6 @@ export default function share (options) {
imgUrl: options.thumbnail, imgUrl: options.thumbnail,
success: function (res) { success: function (res) {
// console.log('分享成功') // console.log('分享成功')
if(options.record){
setClickRecord({...options.record});//记录转发
}
}, },
cancel: function (res) { cancel: function (res) {
//alert('已取消'); //alert('已取消');
...@@ -61,9 +57,6 @@ export default function share (options) { ...@@ -61,9 +57,6 @@ export default function share (options) {
imgUrl: options.thumbnail, imgUrl: options.thumbnail,
success: function (res) { success: function (res) {
// console.log('分享成功') // console.log('分享成功')
if(options.record){
setClickRecord({...options.record});//记录分享
}
}, },
cancel: function (res) { cancel: function (res) {
//alert('已取消'); //alert('已取消');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!