傅行帆 5 лет назад
Родитель
Сommit
7de826899e
3 измененных файлов: 61 добавлений и 36 удалений
  1. 32
    20
      src/pages/eContract/company/edit.jsx
  2. 19
    16
      src/pages/eContract/company/index.jsx
  3. 10
    0
      src/services/apis.js

+ 32
- 20
src/pages/eContract/company/edit.jsx Просмотреть файл

@@ -45,7 +45,7 @@ const header = props => {
45 45
         addCompanyData();
46 46
       },[])
47 47
 
48
-      // 查询列表
48
+      // 添加
49 49
       const addCompanyData = () => {
50 50
         request({
51 51
             ...apis.company.add,
@@ -60,6 +60,16 @@ const header = props => {
60 60
     const openFddUrl = () => {
61 61
       window.open(data.certifiedAddress)
62 62
     }
63
+
64
+    const getCompanyInfo = () => {
65
+      request({
66
+          ...apis.company.refresh,urlData: { id: data.companyId }
67
+      }).then((data) => {
68
+        setData(data)
69
+      }).catch((err) => {
70
+        message.error(err.msg || err.message)
71
+      })
72
+    }
63 73
   
64 74
     return (
65 75
       <Tabs type="card">
@@ -79,7 +89,7 @@ const header = props => {
79 89
             <Row>
80 90
               <Col span={8}></Col>
81 91
               <Col span={4}>企业管理员身份</Col>
82
-              <Col span={4}>{data.companyManagerType}</Col>
92
+              <Col span={4}>{data.companyManagerType === 'legal' ? '法人' : data.companyManagerType === 'agent' ? "代理人" : "" }</Col>
83 93
               <Col span={8}></Col>
84 94
             </Row>
85 95
             <Row>
@@ -97,16 +107,17 @@ const header = props => {
97 107
             <Row>
98 108
               <Col span={8}></Col>
99 109
               <Col span={4}>实名认证状态</Col>
100
-              <Col span={4}>{data.certifiedStatus}</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>
101 112
               <Col span={8}></Col>
102 113
             </Row>
103 114
             <Row>
104 115
               <Col span={8}></Col>
105 116
               <Col span={4}>
106
-                <Button type="danger" >更新认证状态</Button>
117
+                <Button type="danger" onClick={getCompanyInfo}>更新认证状态</Button>
107 118
               </Col>
108 119
               <Col span={4}>
109
-                <Button type="danger" >返回</Button>
120
+                <Button type="danger" onClick={() => router.go(-1)}>返回</Button>
110 121
               </Col>
111 122
               <Col span={8}></Col>
112 123
             </Row>
@@ -115,25 +126,26 @@ const header = props => {
115 126
         <Row>
116 127
               <Col span={8}></Col>
117 128
               <Col span={4}>认证状态</Col>
118
-              <Col span={4}>{data.companyCode}</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>
119 131
               <Col span={8}></Col>
120 132
             </Row>
121 133
             <Row>
122 134
               <Col span={8}></Col>
123 135
               <Col span={4}>不通过原因</Col>
124
-              <Col span={4}>{data.fadadaCode}</Col>
136
+              <Col span={4}>{data.reason}</Col>
125 137
               <Col span={8}></Col>
126 138
             </Row>
127 139
             <Row>
128 140
               <Col span={8}></Col>
129 141
               <Col span={4}>审核时间</Col>
130
-              <Col span={4}>{data.companyManagerType}</Col>
142
+              <Col span={4}>{data.verifyTime}</Col>
131 143
               <Col span={8}></Col>
132 144
             </Row>
133 145
             <Row>
134 146
               <Col span={8}></Col>
135 147
               <Col span={4}>认证方式</Col>
136
-              <Col span={4}>{data.certifiedSerialNumber}</Col>
148
+              <Col span={4}>{data.certifiedType === 0 ? "银行卡认证" : data.certifiedType === 1 ? "纸质审核认证" : ""}</Col>
137 149
               <Col span={8}></Col>
138 150
             </Row>
139 151
             <Row>
@@ -145,13 +157,13 @@ const header = props => {
145 157
             <Row>
146 158
               <Col span={8}></Col>
147 159
               <Col span={4}>企业名称</Col>
148
-              <Col span={4}>{data.certifiedStatus}</Col>
160
+              <Col span={4}>{data.companyName}</Col>
149 161
               <Col span={8}></Col>
150 162
             </Row>
151 163
             <Row>
152 164
               <Col span={8}></Col>
153 165
               <Col span={4}>统一社会信用代码</Col>
154
-              <Col span={4}>{data.certifiedStatus}</Col>
166
+              <Col span={4}>{data.creditCode}</Col>
155 167
               <Col span={8}></Col>
156 168
             </Row>
157 169
 
@@ -164,53 +176,53 @@ const header = props => {
164 176
             <Row>
165 177
               <Col span={8}></Col>
166 178
               <Col span={4}>银行名称</Col>
167
-              <Col span={4}>{data.certifiedStatus}</Col>
179
+              <Col span={4}>{data.bankName}</Col>
168 180
               <Col span={8}></Col>
169 181
             </Row>
170 182
             <Row>
171 183
               <Col span={8}></Col>
172 184
               <Col span={4}>银行帐号</Col>
173
-              <Col span={4}>{data.certifiedStatus}</Col>
185
+              <Col span={4}>{data.bankAccount}</Col>
174 186
               <Col span={8}></Col>
175 187
             </Row>
176 188
             <Row>
177 189
               <Col span={8}></Col>
178 190
               <Col span={4}>开户支行名称</Col>
179
-              <Col span={4}>{data.certifiedStatus}</Col>
191
+              <Col span={4}>{data.subbranchName}</Col>
180 192
               <Col span={8}></Col>
181 193
             </Row>
182 194
 
183 195
             <Row>
184 196
               <Col span={8}></Col>
185 197
               <Col span={4}>企业管理员身份</Col>
186
-              <Col span={4}>{data.certifiedStatus}</Col>
198
+              <Col span={4}>{data.companyManagerType === 'legal' ? '法人' : data.companyManagerType === 'agent' ? "代理人" : ""}</Col>
187 199
               <Col span={8}></Col>
188 200
             </Row>
189 201
             <Row>
190 202
               <Col span={8}></Col>
191 203
               <Col span={4}>姓名</Col>
192
-              <Col span={4}>{data.certifiedStatus}</Col>
204
+              <Col span={4}>{data.userName}</Col>
193 205
               <Col span={8}></Col>
194 206
             </Row>
195 207
             <Row>
196 208
               <Col span={8}></Col>
197 209
               <Col span={4}>手机号</Col>
198
-              <Col span={4}>{data.certifiedStatus}</Col>
210
+              <Col span={4}>{data.tel}</Col>
199 211
               <Col span={8}></Col>
200 212
             </Row>
201 213
             <Row>
202 214
               <Col span={8}></Col>
203 215
               <Col span={4}>身份证号码</Col>
204
-              <Col span={4}>{data.certifiedStatus}</Col>
216
+              <Col span={4}>{data.idCard}</Col>
205 217
               <Col span={8}></Col>
206 218
             </Row>
207 219
             <Row>
208 220
               <Col span={8}></Col>
209 221
               <Col span={4}>
210
-                <Button type="danger" >更新企业认证信息</Button>
222
+                <Button type="danger" onClick={getCompanyInfo}>更新企业认证信息</Button>
211 223
               </Col>
212 224
               <Col span={4}>
213
-                <Button type="danger" >返回</Button>
225
+                <Button type="danger" onClick={() => router.go(-1)}>返回</Button>
214 226
               </Col>
215 227
               <Col span={8}></Col>
216 228
             </Row>

+ 19
- 16
src/pages/eContract/company/index.jsx Просмотреть файл

@@ -15,7 +15,7 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15 15
 function header(props) {
16 16
   // 获取初始化数据
17 17
   const [ data, setData ] = useState({})
18
-  const [demandIdList, setDemandIdList] = useState([])
18
+  const [deleteList, setDeleteList] = useState([])
19 19
 
20 20
   useEffect(() => {
21 21
     getList({ pageNum: 1, pageSize: 10 });
@@ -48,7 +48,7 @@ function header(props) {
48 48
   const rowSelection = {
49 49
     onChange: (selectedRowKeys, selectedRows) => {
50 50
       console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
51
-      setDemandIdList(selectedRows)
51
+      setDeleteList(selectedRows)
52 52
     },
53 53
   };
54 54
 
@@ -73,18 +73,18 @@ function header(props) {
73 73
 
74 74
   
75 75
   const changeStatus = () => {
76
-    if(demandIdList.length < 1){
76
+    if(deleteList.length < 1){
77 77
       message.error('请先选择要删除的数据!')
78 78
       return
79 79
     }
80
-    const title = '确认将所选的' + demandIdList.length + '条数据删除?可删除条件:需求单状态 为 作废。'
80
+    const title = '确认将所选的' + deleteList.length + '条数据删除?认证通过的企业不会被删除'
81 81
     Modal.confirm({
82 82
       title: title,
83 83
       okText: '确认',
84 84
       cancelText: '取消',
85 85
       onOk() {
86
-        request({ ...apis.sample.put, data: { ids: demandIdList.map(x => x.demandId) } }).then((data) => {
87
-          const resultMessage = '操作成功,其中'+data.successNum+'条成功删除,'+data.failNum+'条非作废状态未删除。'
86
+        request({ ...apis.company.delete, data: { ids: deleteList.map(x => x.companyId) } }).then((data) => {
87
+          const resultMessage = '操作成功,其中'+data.successNum+'条成功删除,'+data.failNum+'条已认证数据无法删除。'
88 88
           message.info(resultMessage)
89 89
           getList({ pageNum: 1, pageSize: 10 });
90 90
         }).catch((err) => {
@@ -122,15 +122,18 @@ function header(props) {
122 122
     },
123 123
     {
124 124
       title: '实名认证状态',
125
-      dataIndex: 'certifiedStatus',
126
-      key: 'certifiedStatus',
125
+      dataIndex: 'status',
126
+      key: 'status',
127 127
       align: 'center',
128
+      render: (status) => <span>{status === 0 ? '未认证' : status === 1 ? "管理员资料已提交" : status === 2 ? "企业基本资料(没有申请表)已提交" : status === 3 ? "已提交待审核" : 
129
+      status === 4 ? '审核通过' : status === 5 ? "审核不通过" : status === 6 ? "人工初审通过" : "" }</span>,
128 130
     },
129 131
     {
130 132
       title: '企业管理员身份',
131 133
       dataIndex: 'companyManagerType',
132 134
       key: 'companyManagerType',
133 135
       align: 'center',
136
+      render: (companyManagerType) => <span>{companyManagerType === 'legal' ? '法人' : companyManagerType === 'agent' ? "代理人" : "" }</span>,
134 137
     },
135 138
     {
136 139
       title: '操作',
@@ -171,15 +174,15 @@ function header(props) {
171 174
           )}
172 175
         </Form.Item>
173 176
         <Form.Item>
174
-          {getFieldDecorator('certifiedStatus')(
177
+          {getFieldDecorator('status')(
175 178
             <Select style={{ width: '180px' }} placeholder="实名认证状态">
176
-              <Select.Option value="1">未认证</Select.Option>
177
-              <Select.Option value="2">管理员资料已提交</Select.Option>
178
-              <Select.Option value="3">企业基本资料(没有申请表)已提交</Select.Option>
179
-              <Select.Option value="4">已提交待审核</Select.Option>
180
-              <Select.Option value="5">审核通过</Select.Option>
181
-              <Select.Option value="6">审核不通过</Select.Option>
182
-              <Select.Option value="7">人工初审通过</Select.Option>
179
+              <Select.Option value="0">未认证</Select.Option>
180
+              <Select.Option value="1">管理员资料已提交</Select.Option>
181
+              <Select.Option value="2">企业基本资料(没有申请表)已提交</Select.Option>
182
+              <Select.Option value="3">已提交待审核</Select.Option>
183
+              <Select.Option value="4">审核通过</Select.Option>
184
+              <Select.Option value="5">审核不通过</Select.Option>
185
+              <Select.Option value="6">人工初审通过</Select.Option>
183 186
             </Select>,
184 187
           )}
185 188
         </Form.Item>

+ 10
- 0
src/services/apis.js Просмотреть файл

@@ -213,6 +213,16 @@ const apis = {
213 213
       url: `${prefix}/company/:id`,
214 214
       method: 'PUT',
215 215
       action: 'channel',
216
+    },
217
+    refresh: {
218
+      url: `${prefix}/company/fdd/:id`,
219
+      method: 'GET',
220
+      action: 'channel',
221
+    },
222
+    delete: {
223
+      url: `${prefix}/company/delete`,
224
+      method: 'DELETE',
225
+      action: 'channel',
216 226
     }
217 227
   }
218 228