傅行帆 před 5 roky
rodič
revize
5e7328a67f

+ 9
- 3
src/pages/eContract/company/add.jsx Zobrazit soubor

@@ -68,13 +68,19 @@ const header = props => {
68 68
                   <Select.Option value="legal">法人</Select.Option>
69 69
                   <Select.Option value="agent">代理人</Select.Option>
70 70
                 </Select>,
71
+        rules: [
72
+          { required: true, message: '请选择企业管理员身份' },
73
+        ],
71 74
       },
72 75
     ]
73 76
   
74 77
      
75 78
     const handleSubmit = (values) => {
76
-      if(companyId){
77
-          request({ ...apis.sample.update, urlData: { id: companyId }, data: { ...values }}).then((data) => {
79
+      if(data.companyId){
80
+          request({ ...apis.company.update, urlData: { id: data.companyId }, data: { ...values }}).then((data) => {
81
+            console.log(data,"dadadasdadasdasdasdasda")
82
+            message.info("提交成功,请完成认证信息!")
83
+            window.open(data.certifiedAddress);
78 84
             cancelPage();
79 85
           }).catch((err) => {
80 86
             message.error(err.msg || err.message)
@@ -84,7 +90,7 @@ const header = props => {
84 90
   
85 91
     const cancelPage = () => {
86 92
       router.push({
87
-        pathname: '/sample/demand/list',
93
+        pathname: '/eContract/company/list',
88 94
       });
89 95
     }
90 96
   

+ 159
- 42
src/pages/eContract/company/edit.jsx Zobrazit soubor

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert } from 'antd';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert, Tabs, Row, Col } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import XForm, { FieldTypes } from '../../../components/XForm';
5 5
 import router from 'umi/router';
@@ -8,6 +8,7 @@ import request from '../../../utils/request';
8 8
 import Wangedit from '../../../components/Wangedit/Wangedit'
9 9
 import moment from 'moment';
10 10
 
11
+const { TabPane } = Tabs;
11 12
 
12 13
 const header = props => {
13 14
     const companyId = props.location.query.id
@@ -55,50 +56,166 @@ const header = props => {
55 56
         })
56 57
       }
57 58
     }
58
-  
59
-    const fields = [
60
-      {
61
-        label: '已自动生成企业编号',
62
-        name: 'companyCode',
63
-        value: data.companyCode,
64
-        render: <span>{data.companyCode}</span>
65
-      },    
66
-      {
67
-        label: '已生成法大大客户编号',
68
-        name: 'fadadaCode',
69
-        value: data.fadadaCode,
70
-        render: <span>{data.fadadaCode}</span>
71
-      },
72
-      {
73
-        label: '请选择企业管理员身份',
74
-        name: 'companyManagerType',
75
-        value: data.companyManagerType,
76
-        render: <Select style={{ width: '180px' }} placeholder="请选择企业管理员身份">
77
-                  <Select.Option value="legal">法人</Select.Option>
78
-                  <Select.Option value="agent">代理人</Select.Option>
79
-                </Select>,
80
-      },
81
-    ]
82
-  
83
-     
84
-    const handleSubmit = (values) => {
85
-      if(companyId){
86
-          request({ ...apis.sample.update, urlData: { id: companyId }, data: { ...values }}).then((data) => {
87
-            cancelPage();
88
-          }).catch((err) => {
89
-            message.error(err.msg || err.message)
90
-          })
91
-        }
92
-    }
93
-  
94
-    const cancelPage = () => {
95
-      router.push({
96
-        pathname: '/sample/demand/list',
97
-      });
59
+
60
+    const openFddUrl = () => {
61
+      window.open(data.certifiedAddress)
98 62
     }
99 63
   
100 64
     return (
101
-      <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
65
+      <Tabs type="card">
66
+        <TabPane tab="基本信息" key="1">
67
+            <Row>
68
+              <Col span={8}></Col>
69
+              <Col span={4}>企业编号</Col>
70
+              <Col span={4}>{data.companyCode}</Col>
71
+              <Col span={8}></Col>
72
+            </Row>
73
+            <Row>
74
+              <Col span={8}></Col>
75
+              <Col span={4}>法大大客户编号</Col>
76
+              <Col span={4}>{data.fadadaCode}</Col>
77
+              <Col span={8}></Col>
78
+            </Row>
79
+            <Row>
80
+              <Col span={8}></Col>
81
+              <Col span={4}>企业管理员身份</Col>
82
+              <Col span={4}>{data.companyManagerType}</Col>
83
+              <Col span={8}></Col>
84
+            </Row>
85
+            <Row>
86
+              <Col span={8}></Col>
87
+              <Col span={4}>认证序列号</Col>
88
+              <Col span={4}>{data.certifiedSerialNumber}</Col>
89
+              <Col span={8}></Col>
90
+            </Row>
91
+            <Row>
92
+              <Col span={8}></Col>
93
+              <Col span={4}>实名认证地址</Col>
94
+              <Col span={4}><a onClick={openFddUrl}>{data.certifiedAddress}</a></Col>
95
+              <Col span={8}></Col>
96
+            </Row>
97
+            <Row>
98
+              <Col span={8}></Col>
99
+              <Col span={4}>实名认证状态</Col>
100
+              <Col span={4}>{data.certifiedStatus}</Col>
101
+              <Col span={8}></Col>
102
+            </Row>
103
+            <Row>
104
+              <Col span={8}></Col>
105
+              <Col span={4}>
106
+                <Button type="danger" >更新认证状态</Button>
107
+              </Col>
108
+              <Col span={4}>
109
+                <Button type="danger" >返回</Button>
110
+              </Col>
111
+              <Col span={8}></Col>
112
+            </Row>
113
+        </TabPane>
114
+        <TabPane tab="企业认证信息" key="2">
115
+        <Row>
116
+              <Col span={8}></Col>
117
+              <Col span={4}>认证状态</Col>
118
+              <Col span={4}>{data.companyCode}</Col>
119
+              <Col span={8}></Col>
120
+            </Row>
121
+            <Row>
122
+              <Col span={8}></Col>
123
+              <Col span={4}>不通过原因</Col>
124
+              <Col span={4}>{data.fadadaCode}</Col>
125
+              <Col span={8}></Col>
126
+            </Row>
127
+            <Row>
128
+              <Col span={8}></Col>
129
+              <Col span={4}>审核时间</Col>
130
+              <Col span={4}>{data.companyManagerType}</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.certifiedSerialNumber}</Col>
137
+              <Col span={8}></Col>
138
+            </Row>
139
+            <Row>
140
+              <Col span={8}></Col>
141
+              <Col span={4}>企业信息</Col>
142
+              <Col span={4}></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.certifiedStatus}</Col>
149
+              <Col span={8}></Col>
150
+            </Row>
151
+            <Row>
152
+              <Col span={8}></Col>
153
+              <Col span={4}>统一社会信用代码</Col>
154
+              <Col span={4}>{data.certifiedStatus}</Col>
155
+              <Col span={8}></Col>
156
+            </Row>
157
+
158
+            <Row>
159
+              <Col span={8}></Col>
160
+              <Col span={4}><span>对公账号信息</span></Col>
161
+              <Col span={4}></Col>
162
+              <Col span={8}></Col>
163
+            </Row>
164
+            <Row>
165
+              <Col span={8}></Col>
166
+              <Col span={4}>银行名称</Col>
167
+              <Col span={4}>{data.certifiedStatus}</Col>
168
+              <Col span={8}></Col>
169
+            </Row>
170
+            <Row>
171
+              <Col span={8}></Col>
172
+              <Col span={4}>银行帐号</Col>
173
+              <Col span={4}>{data.certifiedStatus}</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.certifiedStatus}</Col>
180
+              <Col span={8}></Col>
181
+            </Row>
182
+
183
+            <Row>
184
+              <Col span={8}></Col>
185
+              <Col span={4}>企业管理员身份</Col>
186
+              <Col span={4}>{data.certifiedStatus}</Col>
187
+              <Col span={8}></Col>
188
+            </Row>
189
+            <Row>
190
+              <Col span={8}></Col>
191
+              <Col span={4}>姓名</Col>
192
+              <Col span={4}>{data.certifiedStatus}</Col>
193
+              <Col span={8}></Col>
194
+            </Row>
195
+            <Row>
196
+              <Col span={8}></Col>
197
+              <Col span={4}>手机号</Col>
198
+              <Col span={4}>{data.certifiedStatus}</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.certifiedStatus}</Col>
205
+              <Col span={8}></Col>
206
+            </Row>
207
+            <Row>
208
+              <Col span={8}></Col>
209
+              <Col span={4}>
210
+                <Button type="danger" >更新企业认证信息</Button>
211
+              </Col>
212
+              <Col span={4}>
213
+                <Button type="danger" >返回</Button>
214
+              </Col>
215
+              <Col span={8}></Col>
216
+            </Row>
217
+        </TabPane>
218
+      </Tabs> 
102 219
     )
103 220
   }
104 221
   

+ 5
- 0
src/services/apis.js Zobrazit soubor

@@ -209,6 +209,11 @@ const apis = {
209 209
       method: 'GET',
210 210
       action: 'channel',
211 211
     },
212
+    update: {
213
+      url: `${prefix}/company/:id`,
214
+      method: 'PUT',
215
+      action: 'channel',
216
+    }
212 217
   }
213 218
   
214 219
 }