|
@@ -6,230 +6,235 @@ import router from 'umi/router';
|
6
|
6
|
import apis from '../../../services/apis';
|
7
|
7
|
import request from '../../../utils/request';
|
8
|
8
|
import Wangedit from '../../../components/Wangedit/Wangedit'
|
|
9
|
+import Styles from './style.less';
|
9
|
10
|
import moment from 'moment';
|
10
|
11
|
|
11
|
12
|
const { TabPane } = Tabs;
|
12
|
13
|
|
13
|
14
|
const header = props => {
|
14
|
|
- const companyId = props.location.query.id
|
15
|
|
-
|
16
|
|
- const [ data, setData ] = useState({})
|
17
|
|
- if(companyId){
|
18
|
|
- useEffect(() => {
|
19
|
|
- getCompanyData(companyId);
|
20
|
|
- },[])
|
21
|
|
-
|
22
|
|
- // 查询列表
|
23
|
|
- const getCompanyData = (companyId) => {
|
24
|
|
- request({
|
25
|
|
- ...apis.company.get,
|
26
|
|
- urlData: { id: companyId }
|
27
|
|
- }).then((data) => {
|
28
|
|
- if(data.certifiedStatus === 'registered'){
|
29
|
|
- router.push({
|
30
|
|
- pathname: '/eContract/company/add',
|
31
|
|
- query: {
|
32
|
|
- id: companyId
|
33
|
|
- },
|
34
|
|
- });
|
35
|
|
- return
|
36
|
|
- }
|
37
|
|
- setData(data)
|
38
|
|
- }).catch((err) => {
|
39
|
|
- message.error(err.msg || err.message)
|
40
|
|
- })
|
41
|
|
- }
|
42
|
|
- }else{
|
43
|
|
- //第一次进入就创建新的企业
|
44
|
|
- useEffect(() => {
|
45
|
|
- addCompanyData();
|
46
|
|
- },[])
|
47
|
|
-
|
48
|
|
- // 添加
|
49
|
|
- const addCompanyData = () => {
|
50
|
|
- request({
|
51
|
|
- ...apis.company.add,
|
52
|
|
- }).then((data) => {
|
53
|
|
- setData(data)
|
54
|
|
- }).catch((err) => {
|
55
|
|
- message.error(err.msg || err.message)
|
56
|
|
- })
|
57
|
|
- }
|
58
|
|
- }
|
|
15
|
+ const companyId = props.location.query.id
|
|
16
|
+
|
|
17
|
+ const [data, setData] = useState({})
|
|
18
|
+ if (companyId) {
|
|
19
|
+ useEffect(() => {
|
|
20
|
+ getCompanyData(companyId);
|
|
21
|
+ }, [])
|
59
|
22
|
|
60
|
|
- const openFddUrl = () => {
|
61
|
|
- window.open(data.certifiedAddress)
|
|
23
|
+ // 查询列表
|
|
24
|
+ const getCompanyData = (companyId) => {
|
|
25
|
+ request({
|
|
26
|
+ ...apis.company.get,
|
|
27
|
+ urlData: { id: companyId }
|
|
28
|
+ }).then((data) => {
|
|
29
|
+ if (data.certifiedStatus === 'registered') {
|
|
30
|
+ router.push({
|
|
31
|
+ pathname: '/eContract/company/add',
|
|
32
|
+ query: {
|
|
33
|
+ id: companyId
|
|
34
|
+ },
|
|
35
|
+ });
|
|
36
|
+ return
|
|
37
|
+ }
|
|
38
|
+ setData(data)
|
|
39
|
+ }).catch((err) => {
|
|
40
|
+ message.error(err.msg || err.message)
|
|
41
|
+ })
|
62
|
42
|
}
|
|
43
|
+ } else {
|
|
44
|
+ //第一次进入就创建新的企业
|
|
45
|
+ useEffect(() => {
|
|
46
|
+ addCompanyData();
|
|
47
|
+ }, [])
|
63
|
48
|
|
64
|
|
- const getCompanyInfo = () => {
|
|
49
|
+ // 添加
|
|
50
|
+ const addCompanyData = () => {
|
65
|
51
|
request({
|
66
|
|
- ...apis.company.refresh,urlData: { id: data.companyId }
|
|
52
|
+ ...apis.company.add,
|
67
|
53
|
}).then((data) => {
|
68
|
54
|
setData(data)
|
69
|
55
|
}).catch((err) => {
|
70
|
56
|
message.error(err.msg || err.message)
|
71
|
57
|
})
|
72
|
58
|
}
|
73
|
|
-
|
74
|
|
- return (
|
75
|
|
- <Tabs type="card">
|
76
|
|
- <TabPane tab="基本信息" key="1">
|
77
|
|
- <Row>
|
78
|
|
- <Col span={8}></Col>
|
79
|
|
- <Col span={4}>企业编号</Col>
|
80
|
|
- <Col span={4}>{data.companyCode}</Col>
|
81
|
|
- <Col span={8}></Col>
|
82
|
|
- </Row>
|
83
|
|
- <Row>
|
84
|
|
- <Col span={8}></Col>
|
85
|
|
- <Col span={4}>法大大客户编号</Col>
|
86
|
|
- <Col span={4}>{data.fadadaCode}</Col>
|
87
|
|
- <Col span={8}></Col>
|
88
|
|
- </Row>
|
89
|
|
- <Row>
|
90
|
|
- <Col span={8}></Col>
|
91
|
|
- <Col span={4}>企业管理员身份</Col>
|
92
|
|
- <Col span={4}>{data.companyManagerType === 'legal' ? '法人' : data.companyManagerType === 'agent' ? "代理人" : "" }</Col>
|
93
|
|
- <Col span={8}></Col>
|
94
|
|
- </Row>
|
95
|
|
- <Row>
|
96
|
|
- <Col span={8}></Col>
|
97
|
|
- <Col span={4}>认证序列号</Col>
|
98
|
|
- <Col span={4}>{data.certifiedSerialNumber}</Col>
|
99
|
|
- <Col span={8}></Col>
|
100
|
|
- </Row>
|
101
|
|
- <Row>
|
102
|
|
- <Col span={8}></Col>
|
103
|
|
- <Col span={4}>实名认证地址</Col>
|
104
|
|
- <Col span={4}><a onClick={openFddUrl}>{data.certifiedAddress}</a></Col>
|
105
|
|
- <Col span={8}></Col>
|
106
|
|
- </Row>
|
107
|
|
- <Row>
|
108
|
|
- <Col span={8}></Col>
|
109
|
|
- <Col span={4}>实名认证状态</Col>
|
110
|
|
- <Col span={4}>{data.status === 0 ? '未认证' : data.status === 1 ? "管理员资料已提交" : data.status === 2 ? "企业基本资料(没有申请表)已提交" : data.status === 3 ? "已提交待审核" :
|
111
|
|
- data.status === 4 ? '审核通过' : data.status === 5 ? "审核不通过" : data.status === 6 ? "人工初审通过" : "" }</Col>
|
112
|
|
- <Col span={8}></Col>
|
113
|
|
- </Row>
|
114
|
|
- <Row>
|
115
|
|
- <Col span={8}></Col>
|
116
|
|
- <Col span={4}>
|
117
|
|
- <Button type="danger" onClick={getCompanyInfo}>更新认证状态</Button>
|
118
|
|
- </Col>
|
119
|
|
- <Col span={4}>
|
120
|
|
- <Button type="danger" onClick={() => router.go(-1)}>返回</Button>
|
121
|
|
- </Col>
|
122
|
|
- <Col span={8}></Col>
|
123
|
|
- </Row>
|
124
|
|
- </TabPane>
|
125
|
|
- <TabPane tab="企业认证信息" key="2">
|
126
|
|
- <Row>
|
127
|
|
- <Col span={8}></Col>
|
128
|
|
- <Col span={4}>认证状态</Col>
|
129
|
|
- <Col span={4}>{data.status === 0 ? '未认证' : data.status === 1 ? "管理员资料已提交" : data.status === 2 ? "企业基本资料(没有申请表)已提交" : data.status === 3 ? "已提交待审核" :
|
130
|
|
- data.status === 4 ? '审核通过' : data.status === 5 ? "审核不通过" : data.status === 6 ? "人工初审通过" : "" }</Col>
|
131
|
|
- <Col span={8}></Col>
|
132
|
|
- </Row>
|
133
|
|
- <Row>
|
134
|
|
- <Col span={8}></Col>
|
135
|
|
- <Col span={4}>不通过原因</Col>
|
136
|
|
- <Col span={4}>{data.reason}</Col>
|
137
|
|
- <Col span={8}></Col>
|
138
|
|
- </Row>
|
139
|
|
- <Row>
|
140
|
|
- <Col span={8}></Col>
|
141
|
|
- <Col span={4}>审核时间</Col>
|
142
|
|
- <Col span={4}>{data.verifyTime}</Col>
|
143
|
|
- <Col span={8}></Col>
|
144
|
|
- </Row>
|
145
|
|
- <Row>
|
146
|
|
- <Col span={8}></Col>
|
147
|
|
- <Col span={4}>认证方式</Col>
|
148
|
|
- <Col span={4}>{data.certifiedType === 0 ? "银行卡认证" : data.certifiedType === 1 ? "纸质审核认证" : ""}</Col>
|
149
|
|
- <Col span={8}></Col>
|
150
|
|
- </Row>
|
151
|
|
- <Row>
|
152
|
|
- <Col span={8}></Col>
|
153
|
|
- <Col span={4}>企业信息</Col>
|
154
|
|
- <Col span={4}></Col>
|
155
|
|
- <Col span={8}></Col>
|
156
|
|
- </Row>
|
157
|
|
- <Row>
|
158
|
|
- <Col span={8}></Col>
|
159
|
|
- <Col span={4}>企业名称</Col>
|
160
|
|
- <Col span={4}>{data.companyName}</Col>
|
161
|
|
- <Col span={8}></Col>
|
162
|
|
- </Row>
|
163
|
|
- <Row>
|
164
|
|
- <Col span={8}></Col>
|
165
|
|
- <Col span={4}>统一社会信用代码</Col>
|
166
|
|
- <Col span={4}>{data.creditCode}</Col>
|
167
|
|
- <Col span={8}></Col>
|
168
|
|
- </Row>
|
|
59
|
+ }
|
169
|
60
|
|
170
|
|
- <Row>
|
171
|
|
- <Col span={8}></Col>
|
172
|
|
- <Col span={4}><span>对公账号信息</span></Col>
|
173
|
|
- <Col span={4}></Col>
|
174
|
|
- <Col span={8}></Col>
|
175
|
|
- </Row>
|
176
|
|
- <Row>
|
177
|
|
- <Col span={8}></Col>
|
178
|
|
- <Col span={4}>银行名称</Col>
|
179
|
|
- <Col span={4}>{data.bankName}</Col>
|
180
|
|
- <Col span={8}></Col>
|
181
|
|
- </Row>
|
182
|
|
- <Row>
|
183
|
|
- <Col span={8}></Col>
|
184
|
|
- <Col span={4}>银行帐号</Col>
|
185
|
|
- <Col span={4}>{data.bankAccount}</Col>
|
186
|
|
- <Col span={8}></Col>
|
187
|
|
- </Row>
|
188
|
|
- <Row>
|
189
|
|
- <Col span={8}></Col>
|
190
|
|
- <Col span={4}>开户支行名称</Col>
|
191
|
|
- <Col span={4}>{data.subbranchName}</Col>
|
192
|
|
- <Col span={8}></Col>
|
193
|
|
- </Row>
|
|
61
|
+ const openFddUrl = () => {
|
|
62
|
+ window.open(data.certifiedAddress)
|
|
63
|
+ }
|
194
|
64
|
|
195
|
|
- <Row>
|
196
|
|
- <Col span={8}></Col>
|
197
|
|
- <Col span={4}>企业管理员身份</Col>
|
198
|
|
- <Col span={4}>{data.companyManagerType === 'legal' ? '法人' : data.companyManagerType === 'agent' ? "代理人" : ""}</Col>
|
199
|
|
- <Col span={8}></Col>
|
200
|
|
- </Row>
|
201
|
|
- <Row>
|
202
|
|
- <Col span={8}></Col>
|
203
|
|
- <Col span={4}>姓名</Col>
|
204
|
|
- <Col span={4}>{data.userName}</Col>
|
205
|
|
- <Col span={8}></Col>
|
206
|
|
- </Row>
|
207
|
|
- <Row>
|
208
|
|
- <Col span={8}></Col>
|
209
|
|
- <Col span={4}>手机号</Col>
|
210
|
|
- <Col span={4}>{data.tel}</Col>
|
211
|
|
- <Col span={8}></Col>
|
212
|
|
- </Row>
|
213
|
|
- <Row>
|
214
|
|
- <Col span={8}></Col>
|
215
|
|
- <Col span={4}>身份证号码</Col>
|
216
|
|
- <Col span={4}>{data.idCard}</Col>
|
217
|
|
- <Col span={8}></Col>
|
218
|
|
- </Row>
|
219
|
|
- <Row>
|
220
|
|
- <Col span={8}></Col>
|
221
|
|
- <Col span={4}>
|
222
|
|
- <Button type="danger" onClick={getCompanyInfo}>更新企业认证信息</Button>
|
|
65
|
+ const getCompanyInfo = () => {
|
|
66
|
+ request({
|
|
67
|
+ ...apis.company.refresh, urlData: { id: data.companyId }
|
|
68
|
+ }).then((data) => {
|
|
69
|
+ setData(data)
|
|
70
|
+ }).catch((err) => {
|
|
71
|
+ message.error(err.msg || err.message)
|
|
72
|
+ })
|
|
73
|
+ }
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+ const datas1 = [
|
|
77
|
+ {
|
|
78
|
+ name: "企业编号",
|
|
79
|
+ value: data.companyCode
|
|
80
|
+ },
|
|
81
|
+ {
|
|
82
|
+ name: "法大大客户编号",
|
|
83
|
+ value: data.fadadaCode
|
|
84
|
+ },
|
|
85
|
+ {
|
|
86
|
+ name: "企业管理员身份",
|
|
87
|
+ render: <><span>{data.companyManagerType === 'legal' ? '法人' : data.companyManagerType === 'agent' ? "代理人" : ""}</span></>
|
|
88
|
+ },
|
|
89
|
+ {
|
|
90
|
+ name: "认证序列号",
|
|
91
|
+ value: data.certifiedSerialNumber
|
|
92
|
+ },
|
|
93
|
+ {
|
|
94
|
+ name: "实名认证地址",
|
|
95
|
+ render: <a onClick={openFddUrl}>{data.certifiedAddress}</a>
|
|
96
|
+ },
|
|
97
|
+ {
|
|
98
|
+ name: "实名认证状态",
|
|
99
|
+ render: <><span>{data.status === 0 ? '未认证' : data.status === 1 ? "管理员资料已提交" : data.status === 2 ? "企业基本资料(没有申请表)已提交" : data.status === 3 ? "已提交待审核" :
|
|
100
|
+ data.status === 4 ? '审核通过' : data.status === 5 ? "审核不通过" : data.status === 6 ? "人工初审通过" : ""}</span></>
|
|
101
|
+ },
|
|
102
|
+ ]
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+ const datas2 = [
|
|
106
|
+ {
|
|
107
|
+ name: <><span style={{ fontWeight: '800' }}>认证状态</span></>,
|
|
108
|
+ render: <><span style={{ fontWeight: '800' }}>{data.status === 0 ? '未认证' : data.status === 1 ? "管理员资料已提交" : data.status === 2 ? "企业基本资料(没有申请表)已提交" : data.status === 3 ? "已提交待审核" :
|
|
109
|
+ data.status === 4 ? '审核通过' : data.status === 5 ? "审核不通过" : data.status === 6 ? "人工初审通过" : ""}</span></>
|
|
110
|
+ },
|
|
111
|
+ {
|
|
112
|
+ name: "不通过原因",
|
|
113
|
+ value: data.reason
|
|
114
|
+ },
|
|
115
|
+ {
|
|
116
|
+ name: "审核时间",
|
|
117
|
+ value: data.verifyTime
|
|
118
|
+ },
|
|
119
|
+ {
|
|
120
|
+ name: "认证方式",
|
|
121
|
+ render: <><span>{data.certifiedType === 0 ? "银行卡认证" : data.certifiedType === 1 ? "纸质审核认证" : ""}</span></>
|
|
122
|
+ },
|
|
123
|
+
|
|
124
|
+ {
|
|
125
|
+ name: <><span style={{ fontWeight: '800' }}>企业信息</span></>,
|
|
126
|
+ style: { marginTop: '50px' }
|
|
127
|
+ },
|
|
128
|
+ {
|
|
129
|
+ name: "企业名称",
|
|
130
|
+ value: data.companyName
|
|
131
|
+ },
|
|
132
|
+ {
|
|
133
|
+ name: "统一社会信用代码",
|
|
134
|
+ value: data.creditCode
|
|
135
|
+ },
|
|
136
|
+ {
|
|
137
|
+ name: <><span style={{ fontWeight: '800' }}>对公账号信息</span></>,
|
|
138
|
+ style: { marginTop: '50px' }
|
|
139
|
+ },
|
|
140
|
+ {
|
|
141
|
+ name: "银行名称",
|
|
142
|
+ value: data.bankName
|
|
143
|
+ },
|
|
144
|
+ {
|
|
145
|
+ name: "银行帐号",
|
|
146
|
+ value: data.bankAccount
|
|
147
|
+ },
|
|
148
|
+ {
|
|
149
|
+ name: "开户支行名称",
|
|
150
|
+ value: data.subbranchName
|
|
151
|
+ },
|
|
152
|
+ {
|
|
153
|
+ name: <><span style={{ fontWeight: '800' }}>企业管理员身份</span></>,
|
|
154
|
+ render: <><span>{data.companyManagerType === 'legal' ? '法人' : data.companyManagerType === 'agent' ? "代理人" : ""}</span></>,
|
|
155
|
+ style: { marginTop: '50px' }
|
|
156
|
+ },
|
|
157
|
+ {
|
|
158
|
+ name: "姓名",
|
|
159
|
+ value: data.userName
|
|
160
|
+ },
|
|
161
|
+ {
|
|
162
|
+ name: "手机号",
|
|
163
|
+ value: data.tel
|
|
164
|
+ },
|
|
165
|
+ {
|
|
166
|
+ name: "身份证号码",
|
|
167
|
+ value: data.idCard
|
|
168
|
+ },
|
|
169
|
+ ]
|
|
170
|
+
|
|
171
|
+ return (
|
|
172
|
+ <Tabs type="card">
|
|
173
|
+ <TabPane tab="基本信息" key="1">
|
|
174
|
+ <div>
|
|
175
|
+ {datas1.map((x) => {
|
|
176
|
+ return <Row style={x.style || { margin: '20px 0' }}>
|
|
177
|
+ <Col span={8}></Col>
|
|
178
|
+ <Col span={4} className={Styles.title}>
|
|
179
|
+ {x.name}
|
223
|
180
|
</Col>
|
224
|
|
- <Col span={4}>
|
225
|
|
- <Button type="danger" onClick={() => router.go(-1)}>返回</Button>
|
|
181
|
+ <Col span={4} className={Styles.text}>
|
|
182
|
+ {
|
|
183
|
+ x.render ? typeof x.render === 'function' ? x.render(props) : x.render : x.value
|
|
184
|
+ }
|
|
185
|
+ </Col>
|
|
186
|
+ <Col span={8} >
|
226
|
187
|
</Col>
|
227
|
|
- <Col span={8}></Col>
|
228
|
188
|
</Row>
|
229
|
|
- </TabPane>
|
230
|
|
- </Tabs>
|
231
|
|
- )
|
232
|
|
- }
|
233
|
|
-
|
234
|
|
- const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
|
235
|
|
- export default WrappedNormalLoginForm
|
|
189
|
+
|
|
190
|
+ })}
|
|
191
|
+ <Row style={{ margin: '40px 0' }}>
|
|
192
|
+ <Col span={8}></Col>
|
|
193
|
+ <Col span={4}>
|
|
194
|
+ <Button type="danger" style={{ height: ' 45px', fontSize: '20px', lineHeight: ' 45px' }} onClick={getCompanyInfo}>更新认证状态</Button>
|
|
195
|
+ </Col>
|
|
196
|
+ <Col span={4}>
|
|
197
|
+ <Button type="danger" style={{ height: ' 45px', fontSize: '20px', lineHeight: ' 45px' }} onClick={() => router.go(-1)}>返回</Button>
|
|
198
|
+ </Col>
|
|
199
|
+ <Col span={8}></Col>
|
|
200
|
+ </Row>
|
|
201
|
+ </div>
|
|
202
|
+
|
|
203
|
+ </TabPane>
|
|
204
|
+ <TabPane tab="企业认证信息" key="2">
|
|
205
|
+
|
|
206
|
+ {datas2.map((x) => {
|
|
207
|
+ return <Row style={x.style || { margin: '20px 0' }}>
|
|
208
|
+ <Col span={8}></Col>
|
|
209
|
+ <Col span={4} className={Styles.title} >
|
|
210
|
+ {x.name}
|
|
211
|
+ </Col>
|
|
212
|
+ <Col span={4} className={Styles.text}>
|
|
213
|
+ {
|
|
214
|
+ x.render ? typeof x.render === 'function' ? x.render(props) : x.render : x.value
|
|
215
|
+ }
|
|
216
|
+ </Col>
|
|
217
|
+ <Col span={8} >
|
|
218
|
+ </Col>
|
|
219
|
+ </Row>
|
|
220
|
+
|
|
221
|
+ })}
|
|
222
|
+
|
|
223
|
+ <Row style={{ margin: '40px 0' }}>
|
|
224
|
+ <Col span={8}></Col>
|
|
225
|
+ <Col span={4}>
|
|
226
|
+ <Button type="danger" style={{ height: ' 45px', fontSize: '20px', lineHeight: ' 45px' }} onClick={getCompanyInfo}>更新企业认证信息</Button>
|
|
227
|
+ </Col>
|
|
228
|
+ <Col span={4}>
|
|
229
|
+ <Button type="danger" style={{ height: ' 45px', fontSize: '20px', lineHeight: ' 45px' }} onClick={() => router.go(-1)}>返回</Button>
|
|
230
|
+ </Col>
|
|
231
|
+ <Col span={8}></Col>
|
|
232
|
+ </Row>
|
|
233
|
+
|
|
234
|
+ </TabPane>
|
|
235
|
+ </Tabs>
|
|
236
|
+ )
|
|
237
|
+}
|
|
238
|
+
|
|
239
|
+const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
|
|
240
|
+export default WrappedNormalLoginForm
|