clientInfo.js
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import React, { Component } from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import ConfirmPop from '../../components/Modal/confirmPop';
import shareHide from "../../utils/shareHide";
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 {
constructor(props) {
super(props);
this.state = {
dataList: null,
isShowTips: false,
tit: '',
isPass: false,
confirmTit: '确定'
}
}
componentDidMount() {
document.title = '客户信息';
const auditInfo = JSON.parse(localStorage.getItem('auditClientInfo'));
shareHide();
if (auditInfo) {
this.setState({
dataList: auditInfo
})
}
}
handlePass(item) {
this.props.dispatch({
type: "governortraining/updateClientInfo",
payload: {
id: item.id,
currentState: 3
},
callback: (res) => {
this.props.dispatch(
routerRedux.replace("/governortraining/audit")
);
}
})
}
handleReject(item) {
this.props.dispatch({
type: "governortraining/updateClientInfo",
payload: {
id: item.id,
currentState: 2
},
callback: (res) => {
this.props.dispatch(
routerRedux.replace("/governortraining/audit")
);
}
})
}
render(){
let labels = [];
const { dataList } = this.state;
if(!dataList){
return <div/>
}
return (
<div className={css.clientInfoBox}>
<ul className={css.itemBox}>
<li>
<span className={css.label}>姓名</span>
<span className={css.value}>{dataList.name}</span>
</li>
<li>
<span className={css.label}>性别</span>
<span className={css.value}>{
dataList.sex === '0' ? '男' : dataList.sex === '1' ? '女' : ''
}</span>
</li>
<li>
<span className={css.label}>提交时间</span>
<span className={css.value}>{dataList.commitTime ? dataList.commitTime.substr(0,16) : ""}</span>
</li>
<li>
<span className={css.label}>跟进情况</span>
<span className={css.value}>{stateName[dataList.currentState]}</span>
</li>
<li>
<span className={css.label}>所属客户经理</span>
<span className={css.value}>{dataList.managerName}</span>
</li>
</ul>
</div>
)
}
}
export default connect()(ClientInfo);