zhoulisen 5 years ago
parent
commit
51733febcb

+ 212
- 207
src/pages/eContract/company/edit.jsx View File

@@ -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

+ 2
- 2
src/pages/eContract/company/index.jsx View File

@@ -196,10 +196,10 @@ function header(props) {
196 196
         </Form.Item>
197 197
       </Form>
198 198
       <AuthButton name="admin.taNewsType.post" noRight={null}>
199
-        <Button type="danger" className={styles.addBtn} onClick={toAddCompany}>新增</Button>
199
+        <Button type="danger" className={styles.addBtn} style={{ marginTop: '30px' }} onClick={toAddCompany}>新增</Button>
200 200
       </AuthButton>
201 201
       <AuthButton name="admin.taNewsType.post" noRight={null}>
202
-        <Button type="danger" style={{ marginLeft: 15 }} onClick={changeStatus}>删除</Button>
202
+        <Button type="danger" className={styles.addBtn} style={{ marginLeft: 15 }} onClick={changeStatus}>删除</Button>
203 203
       </AuthButton>
204 204
       <Table rowSelection={rowSelection} rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
205 205
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>

+ 21
- 0
src/pages/eContract/company/style.less View File

@@ -20,3 +20,24 @@
20 20
   height: 0;
21 21
   padding-bottom : 80%;
22 22
 }
23
+
24
+.addBtn {
25
+  padding: 0 40px;
26
+  height: 36px;
27
+  margin: 30px 0;
28
+}
29
+
30
+.title {
31
+  height     : 45px;
32
+  font-size  : 20px;
33
+  font-weight: 400;
34
+  color      : rgba(102, 102, 102, 1);
35
+  line-height: 45px;
36
+ 
37
+}
38
+.text {
39
+  font-size  : 18px;
40
+  font-weight: 400;
41
+  color      : rgba(51, 51, 51, 1);
42
+  line-height: 45px;
43
+}

+ 11
- 0
src/pages/eContract/relatedOrganization/index.jsx View File

@@ -87,6 +87,11 @@ function header(props) {
87 87
             key: 'companyStatus',
88 88
             align: 'center',
89 89
             render: (companyStatus) => <>
90
+                {/* {companyStatus === 0 && <span>未激活</span>}
91
+                {companyStatus === 1 && <span>未认证</span>}
92
+                {companyStatus === 2 && <span>审核通过</span>}
93
+                {companyStatus === 3 && <span>已提交待审核</span>}
94
+                {companyStatus === 4 && <span>审核不通过</span>} */}
90 95
                 {companyStatus === 0 && <span>未认证</span>}
91 96
                 {companyStatus === 1 && <span>管理员资料已提交</span>}
92 97
                 {companyStatus === 2 && <span>企业基本资料(没有申请表)已提交</span>}
@@ -171,6 +176,12 @@ function header(props) {
171 176
                 <Form.Item>
172 177
                     {getFieldDecorator('companyStatus')(
173 178
                         <Select style={{ width: '280px' }} placeholder="实名认证状态">
179
+                            {/* <Select.Option value="">全部</Select.Option>
180
+                            <Select.Option value="0">未激活</Select.Option>
181
+                            <Select.Option value="1">未认证</Select.Option>
182
+                            <Select.Option value="2">审核通过</Select.Option>
183
+                            <Select.Option value="3">已提交待审核</Select.Option>
184
+                            <Select.Option value="4">审核不通过</Select.Option> */}
174 185
                             <Select.Option value="">全部</Select.Option>
175 186
                             <Select.Option value="0">未认证</Select.Option>
176 187
                             <Select.Option value="1">管理员资料已提交</Select.Option>

+ 3
- 4
src/pages/eContract/signedContract/index.jsx View File

@@ -151,9 +151,9 @@ function header(props) {
151 151
 
152 152
         },
153 153
         {
154
-            title: '合同编号',
155
-            dataIndex: 'contractId',
156
-            key: 'contractId',
154
+            title: '合同标题',
155
+            dataIndex: 'contractName',
156
+            key: 'contractName',
157 157
             align: 'center',
158 158
 
159 159
         },
@@ -182,7 +182,6 @@ function header(props) {
182 182
             title: '结算单价',
183 183
             dataIndex: 'settlementPrice',
184 184
             key: 'settlementPrice',
185
-
186 185
             render: (x, row) => <><span>{row.settlementPrice ? `¥ ${row.settlementPrice / 100}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',') : row.settlementPrice === 0 ? 0 : ''}</span></>
187 186
         },
188 187
     ];