fangmingyue 1 year ago
parent
commit
8f298c852b

+ 4
- 4
src/pages/accountsettings/index.jsx View File

@@ -46,7 +46,7 @@ export default (props) => {
46 46
                 <div style={{ flex: 1.6 }}>
47 47
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
48 48
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title1')}</div>
49
-                    <Button type="primary" onClick={onOpenPassword}>{t('accountsettings.btnText1')}</Button>
49
+                    <Button type="ghost" onClick={onOpenPassword}>{t('accountsettings.btnText1')}</Button>
50 50
                   </div>
51 51
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text1')}</div>
52 52
                 </div>
@@ -62,7 +62,7 @@ export default (props) => {
62 62
                 <div style={{ flex: 1.6 }}>
63 63
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
64 64
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title2')}</div>
65
-                    <Button type="primary" onClick={onOpenPhone}>{t('accountsettings.btnText2')}</Button>
65
+                    <Button type="ghost" onClick={onOpenPhone}>{t('accountsettings.btnText2')}</Button>
66 66
                   </div>
67 67
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text2')}{phone}</div>
68 68
                 </div>
@@ -81,7 +81,7 @@ export default (props) => {
81 81
                 <div style={{ flex: 1.6 }}>
82 82
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
83 83
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title3')}</div>
84
-                    <Button type="primary" onClick={onOpenEmail}>{t('accountsettings.btnText3')}</Button>
84
+                    <Button type="ghost" onClick={onOpenEmail}>{t('accountsettings.btnText3')}</Button>
85 85
                   </div>
86 86
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text3')}99****qq.com</div>
87 87
                 </div>
@@ -101,7 +101,7 @@ export default (props) => {
101 101
                 <div style={{ flex: 1.6 }}>
102 102
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
103 103
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title4')}</div>
104
-                    <Button type="primary" onClick={() => navigate('/authentication')} >{t('accountsettings.btnText4')}</Button>
104
+                    <Button type="ghost" onClick={() => navigate('/authentication')} >{t('accountsettings.btnText4')}</Button>
105 105
                   </div>
106 106
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text4')}</div>
107 107
                 </div>

+ 3
- 3
src/pages/authentication/components/Authentication.jsx View File

@@ -11,9 +11,9 @@ export default (props) => {
11 11
   const [form] = Form.useForm();
12 12
 
13 13
   const onFinish = (values) => {
14
-    // postTaCompanyRealName(values).then((res) => {
15
-    setIndex(index + 1);
16
-    // });
14
+    postTaCompanyRealName(values).then((res) => {
15
+      setIndex(index + 1);
16
+    });
17 17
   };
18 18
 
19 19
   return (

+ 3
- 4
src/pages/authentication/components/DirectorInfo.jsx View File

@@ -10,10 +10,9 @@ export default (props) => {
10 10
   const [form] = Form.useForm();
11 11
 
12 12
   const onFinish = (values) => {
13
-    console.log('values2', values);
14
-    // postTaCompanyLegalInfo(values).then((res) => {
15
-    setIndex(index + 1);
16
-    // });
13
+    postTaCompanyLegalInfo([values]).then((res) => {
14
+      setIndex(index + 1);
15
+    });
17 16
   };
18 17
 
19 18
   return (

+ 16
- 14
src/pages/authentication/components/EveryoneInfo.jsx View File

@@ -1,8 +1,8 @@
1 1
 import React, { useState } from "react";
2
-import { Divider, Card, Steps, Button, Radio, Form, Input, Row, Col, Select, Image } from "antd";
2
+import { Divider, Card, Steps, Button, Radio, Form, Input, Row, Col, Select, Checkbox } from "antd";
3 3
 import UploadFile from "@/components/Upload/UploadFile";
4 4
 import { useTranslation } from 'react-i18next';
5
-import { postTaCompanyInfo } from "@/services/taCompanyInfo";
5
+import { postTaCompanyBeneficiaryInfo } from "@/services/taCompanyBeneficiaryInfo";
6 6
 import "../style.less";
7 7
 
8 8
 export default (props) => {
@@ -12,10 +12,9 @@ export default (props) => {
12 12
 
13 13
   const [ratio, setRatio] = useState("0");
14 14
   const onFinish = (values) => {
15
-    console.log('values', values);
16
-    // postTaCompanyInfo(values).then((res) => {
17
-    setIndex(index + 1);
18
-    // });
15
+    postTaCompanyBeneficiaryInfo([values]).then((res) => {
16
+      setIndex(index + 1);
17
+    });
19 18
   };
20 19
   const onBack = () => {
21 20
     setIndex(index - 1);
@@ -53,19 +52,22 @@ export default (props) => {
53 52
           <Form.Item label={t('authentication.everyoneInfoUploadTitle')} style={{ marginTop: '40px', marginBottom: '36px' }} name="equityStructureChart">
54 53
             <UploadFile />
55 54
           </Form.Item>
56
-          <Form.Item label={t('authentication.everyoneInfoInputLabel2')} name="">
55
+          {/* <Form.Item label={t('authentication.everyoneInfoInputLabel2')} name="">
57 56
             <Radio.Group>
58 57
               <Radio style={{ fontSize: '16px' }} value="1">{t('authentication.everyoneInfoInputRadioValue1')}</Radio>
59 58
               <Radio style={{ fontSize: '16px' }} value="2">{t('authentication.everyoneInfoInputRadioValue2')}</Radio>
60 59
             </Radio.Group>
61 60
           </Form.Item>
62
-          <div style={{ marginBottom: '36px', color: '#ffac00', marginTop: '-24px' }}>{t('authentication.everyoneInfoRadioTip')}</div>
63
-          <Radio>
64
-            {t('authentication.everyoneInfoAgreement')}
65
-            <a>{t('authentication.everyoneInfoAgreementTitle1')}</a>
66
-            {t('authentication.everyoneInfoAgreementEnd')}
67
-            <a>{t('authentication.everyoneInfoAgreementTitle2')}</a>
68
-          </Radio>
61
+          <div style={{ marginBottom: '36px', color: '#ffac00', marginTop: '-24px' }}>{t('authentication.everyoneInfoRadioTip')}</div> */}
62
+
63
+          {/* <Form.Item name="check" rules={[{ required: true, message: '请阅读并勾选协议' }]}>
64
+            <Checkbox>
65
+              {t('authentication.everyoneInfoAgreement')}
66
+              <a>{t('authentication.everyoneInfoAgreementTitle1')}</a>
67
+              {t('authentication.everyoneInfoAgreementEnd')}
68
+              <a>{t('authentication.everyoneInfoAgreementTitle2')}</a>
69
+            </Checkbox>
70
+          </Form.Item> */}
69 71
           <Form.Item style={{ marginTop: '24px' }}>
70 72
             <Button size="large" style={{ width: '6vw', marginRight: '2vw' }} onClick={onBack}>{t('authentication.everyoneInfoBack')}</Button>
71 73
             <Button size="large" type="primary" htmlType="submit" style={{ width: '6vw' }}>{t('authentication.everyoneInfoSubmit')}</Button>

+ 11
- 11
src/pages/authentication/components/FoundationInfo.jsx View File

@@ -11,10 +11,10 @@ export default (props) => {
11 11
   const { t } = useTranslation();
12 12
 
13 13
   const onFinish = (values) => {
14
-    console.log('values', values);
15
-    // postTaCompanyInfo(values).then((res) => {
16
-    setIndex(index + 1);
17
-    // });
14
+    console.log('values', [values]);
15
+    postTaCompanyInfo([values]).then((res) => {
16
+      setIndex(index + 1);
17
+    });
18 18
   };
19 19
 
20 20
   return (
@@ -123,17 +123,17 @@ export default (props) => {
123 123
 
124 124
           <Form.Item label={t('authentication.formRightLabel5')} wrapperCol={{ span: 18 }} name="numEmployees">
125 125
             <Select placeholder={t('authentication.formRightInputPlaceholder5')}>
126
-              <Select.Option value="1">{t('authentication.formRightInputNumber1')}</Select.Option>
127
-              <Select.Option value="2">{t('authentication.formRightInputNumber2')}</Select.Option>
128
-              <Select.Option value="3">{t('authentication.formRightInputNumber3')}</Select.Option>
126
+              <Select.Option value="1" style={{ backgroundColor: '#FFF' }}>{t('authentication.formRightInputNumber1')}</Select.Option>
127
+              <Select.Option value="2" style={{ backgroundColor: '#FFF' }}>{t('authentication.formRightInputNumber2')}</Select.Option>
128
+              <Select.Option value="3" style={{ backgroundColor: '#FFF' }}>{t('authentication.formRightInputNumber3')}</Select.Option>
129 129
             </Select>
130 130
           </Form.Item>
131 131
           <Form.Item label={t('authentication.formRightLabel6')} wrapperCol={{ span: 18 }} name="businessPremisesType">
132 132
             <Select placeholder={t('authentication.formRightInputPlaceholder6')}>
133
-              <Select.Option value="1">{t('authentication.formRightInputPlace1')}</Select.Option>
134
-              <Select.Option value="2">{t('authentication.formRightInputPlace2')}</Select.Option>
135
-              <Select.Option value="3">{t('authentication.formRightInputPlace3')}</Select.Option>
136
-              <Select.Option value="4">{t('authentication.formRightInputPlace4')}</Select.Option>
133
+              <Select.Option value="1" style={{ backgroundColor: '#FFF' }}>{t('authentication.formRightInputPlace1')}</Select.Option>
134
+              <Select.Option value="2" style={{ backgroundColor: '#FFF' }}>{t('authentication.formRightInputPlace2')}</Select.Option>
135
+              <Select.Option value="3" style={{ backgroundColor: '#FFF' }}>{t('authentication.formRightInputPlace3')}</Select.Option>
136
+              <Select.Option value="4" style={{ backgroundColor: '#FFF' }}>{t('authentication.formRightInputPlace4')}</Select.Option>
137 137
             </Select>
138 138
           </Form.Item>
139 139
           <Button type="primary" size="large" style={{ width: '6vw' }} htmlType="submit">{t('authentication.foundationInfoNextBtn')}</Button>

+ 4
- 0
src/pages/authentication/index.jsx View File

@@ -49,21 +49,25 @@ export default (props) => {
49 49
         <div style={{ flex: 1.5 }}>
50 50
           {
51 51
             index === 0 && (
52
+              // 实名认证
52 53
               <Authentication index={index} setIndex={setIndex} />
53 54
             )
54 55
           }
55 56
           {
56 57
             index === 1 && (
58
+              // 填写企业基础信息
57 59
               <FoundationInfo index={index} setIndex={setIndex} />
58 60
             )
59 61
           }
60 62
           {
61 63
             index === 2 && (
64
+              // 填写企业董事信息
62 65
               <DirectorInfo index={index} setIndex={setIndex} />
63 66
             )
64 67
           }
65 68
           {
66 69
             index === 3 && (
70
+              // 填写企业受益所有人信息
67 71
               <EveryoneInfo index={index} setIndex={setIndex} />
68 72
             )
69 73
           }

+ 31
- 27
src/pages/qRegister/QRegister.jsx View File

@@ -17,27 +17,28 @@ export default (props) => {
17 17
   const formRef = useRef();
18 18
 
19 19
   const onFinish = (values) => {
20
-    setLoading(true);
21
-    register({
22
-      userName: values.userName,
23
-      loginType: "admin.pc",
24
-      password: values.password,
25
-      phone: values.phone
26
-    })
27
-      .then((res) => {
28
-        setLoading(true);
29
-        try {
30
-          navigate("/qLogin");
31
-        } catch (e) {
32
-          message.error(e);
33
-        }
34
-        setLoading(false);
35
-      })
36
-      .catch((err) => {
37
-        setLoading(false);
38
-      });
20
+    // setLoading(true);
21
+    // register({
22
+    //   userName: values.userName,
23
+    //   loginType: "admin.pc",
24
+    //   password: values.password,
25
+    //   phone: values.phone
26
+    // })
27
+    //   .then((res) => {
28
+    //     setLoading(true);
29
+    //     try {
30
+    //       navigate("/qLogin");
31
+    //     } catch (e) {
32
+    //       message.error(e);
33
+    //     }
34
+    //     setLoading(false);
35
+    //   })
36
+    //   .catch((err) => {
37
+    //     setLoading(false);
38
+    //   });
39 39
 
40
-    setLoading(false);
40
+    // setLoading(false);
41
+    navigate("/qLogin");
41 42
   }
42 43
 
43 44
   return (
@@ -123,14 +124,17 @@ export default (props) => {
123 124
         >
124 125
           <Input placeholder="若有,请输入邀请码" style={{ borderRadius: "4px" }} />
125 126
         </Form.Item>
126
-        <Checkbox>
127
-          <div>
128
-            <span>我已阅读并同意</span>
129
-            <a href="https://qbitnetwork.com/terms?type=QbitGeneralTermsAndConditions" target="_blank">Qbit General Terms and Conditions</a>和
130
-            <a href="https://qbitnetwork.com/terms?type=PrivacyPolicies" target="_blank">Privacy Policies</a>
131
-          </div>
127
+        <Form.Item name="check"
128
+          rules={[{ required: true, message: '请阅读并勾选协议' }]}>
129
+          <Checkbox>
130
+            <div>
131
+              <span>我已阅读并同意</span>
132
+              <a href="https://qbitnetwork.com/terms?type=QbitGeneralTermsAndConditions" target="_blank">Qbit General Terms and Conditions</a>和
133
+              <a href="https://qbitnetwork.com/terms?type=PrivacyPolicies" target="_blank">Privacy Policies</a>
134
+            </div>
132 135
 
133
-        </Checkbox>
136
+          </Checkbox>
137
+        </Form.Item>
134 138
         <Form.Item>
135 139
           <Button
136 140
             type="primary"

+ 10
- 7
src/routes/routes.jsx View File

@@ -2,8 +2,11 @@ import {
2 2
   UserOutlined,
3 3
   SolutionOutlined,
4 4
   FileTextOutlined,
5
-  CreditCardOutlined,
5
+  FileProtectOutlined,
6 6
   IdcardOutlined,
7
+  SettingOutlined,
8
+  ShopOutlined,
9
+  BankOutlined
7 10
 } from "@ant-design/icons";
8 11
 import { Outlet, Navigate } from "react-router-dom";
9 12
 import AuthLayout from "@/layouts/AuthLayout";
@@ -61,7 +64,7 @@ export const authRoutes = [
61 64
     element: <HomePage />,
62 65
     meta: {
63 66
       title: "首页",
64
-      icon: <SolutionOutlined />,
67
+      icon: <BankOutlined />,
65 68
     },
66 69
   },
67 70
   {
@@ -141,7 +144,7 @@ export const authRoutes = [
141 144
     element: <QuickPass />,
142 145
     meta: {
143 146
       title: "闪付",
144
-      icon: <SolutionOutlined />,
147
+      icon: <ShopOutlined />,
145 148
     },
146 149
   },
147 150
   {
@@ -149,7 +152,7 @@ export const authRoutes = [
149 152
     element: <FinancialStatement />,
150 153
     meta: {
151 154
       title: "财务对账单",
152
-      icon: <SolutionOutlined />,
155
+      icon: <FileProtectOutlined />,
153 156
     },
154 157
   },
155 158
   {
@@ -173,7 +176,7 @@ export const authRoutes = [
173 176
     element: <AccountSettings />,
174 177
     meta: {
175 178
       title: "账号设置",
176
-      icon: <SolutionOutlined />,
179
+      icon: <SettingOutlined />,
177 180
     },
178 181
   },
179 182
 ];
@@ -213,7 +216,7 @@ export const defaultRoutes = [
213 216
   },
214 217
 ];
215 218
 
216
-export function mergeAuthRoutes(r1, r2) {
219
+export function mergeAuthRoutes (r1, r2) {
217 220
   const r = r1.slice();
218 221
   const children = r1[0].children.slice();
219 222
   r[0].children = children.concat(r2);
@@ -223,7 +226,7 @@ export function mergeAuthRoutes(r1, r2) {
223 226
 // 全部路由
224 227
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
225 228
 console.log(routes);
226
-function getPath(parent = "/", current = "") {
229
+function getPath (parent = "/", current = "") {
227 230
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
228 231
     return current;
229 232
   return `${parent}/${current}`.replace(/\/\//g, "/");

+ 26
- 0
src/services/taCompanyBeneficiaryInfo.js View File

@@ -0,0 +1,26 @@
1
+import request from "@/utils/request";
2
+
3
+/*
4
+ * 分页查询
5
+ */
6
+export const getTaCompanyBeneficiaryInfo = (params) => request(`/taCompanyBeneficiaryInfo`, { params });
7
+
8
+/*
9
+ * 新增数据
10
+ */
11
+export const postTaCompanyBeneficiaryInfo = (data) => request('/admin/taCompanyBeneficiaryInfo', { data, method: 'post' });
12
+
13
+/*
14
+ * 更新数据
15
+ */
16
+export const putTaCompanyBeneficiaryInfo = (id, data) => request(`/taCompanyBeneficiaryInfo/${id}`, { data, method: 'put' });
17
+
18
+/*
19
+ * 通过主键删除数据
20
+ */
21
+export const deleteTaCompanyBeneficiaryInfo = (id) => request(`/taCompanyBeneficiaryInfo/${id}`, { method: 'delete' });
22
+
23
+/*
24
+ * 通过ID查询单条数据
25
+ */
26
+export const getTaCompanyBeneficiaryInfoId = (id) => request(`/taCompanyBeneficiaryInfo/${id}`);