fangmingyue hace 1 año
padre
commit
8f298c852b

+ 4
- 4
src/pages/accountsettings/index.jsx Ver fichero

46
                 <div style={{ flex: 1.6 }}>
46
                 <div style={{ flex: 1.6 }}>
47
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
47
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
48
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title1')}</div>
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
                   </div>
50
                   </div>
51
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text1')}</div>
51
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text1')}</div>
52
                 </div>
52
                 </div>
62
                 <div style={{ flex: 1.6 }}>
62
                 <div style={{ flex: 1.6 }}>
63
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
63
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
64
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title2')}</div>
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
                   </div>
66
                   </div>
67
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text2')}{phone}</div>
67
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text2')}{phone}</div>
68
                 </div>
68
                 </div>
81
                 <div style={{ flex: 1.6 }}>
81
                 <div style={{ flex: 1.6 }}>
82
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
82
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
83
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title3')}</div>
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
                   </div>
85
                   </div>
86
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text3')}99****qq.com</div>
86
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text3')}99****qq.com</div>
87
                 </div>
87
                 </div>
101
                 <div style={{ flex: 1.6 }}>
101
                 <div style={{ flex: 1.6 }}>
102
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
102
                   <div style={{ display: "flex", justifyContent: "space-between", paddingTop: '10px' }}>
103
                     <div style={{ fontSize: "16px", fontWeight: "bold" }}>{t('accountsettings.title4')}</div>
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
                   </div>
105
                   </div>
106
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text4')}</div>
106
                   <div style={{ paddingTop: '1em', color: '#bfbfbf' }}>{t('accountsettings.text4')}</div>
107
                 </div>
107
                 </div>

+ 3
- 3
src/pages/authentication/components/Authentication.jsx Ver fichero

11
   const [form] = Form.useForm();
11
   const [form] = Form.useForm();
12
 
12
 
13
   const onFinish = (values) => {
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
   return (
19
   return (

+ 3
- 4
src/pages/authentication/components/DirectorInfo.jsx Ver fichero

10
   const [form] = Form.useForm();
10
   const [form] = Form.useForm();
11
 
11
 
12
   const onFinish = (values) => {
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
   return (
18
   return (

+ 16
- 14
src/pages/authentication/components/EveryoneInfo.jsx Ver fichero

1
 import React, { useState } from "react";
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
 import UploadFile from "@/components/Upload/UploadFile";
3
 import UploadFile from "@/components/Upload/UploadFile";
4
 import { useTranslation } from 'react-i18next';
4
 import { useTranslation } from 'react-i18next';
5
-import { postTaCompanyInfo } from "@/services/taCompanyInfo";
5
+import { postTaCompanyBeneficiaryInfo } from "@/services/taCompanyBeneficiaryInfo";
6
 import "../style.less";
6
 import "../style.less";
7
 
7
 
8
 export default (props) => {
8
 export default (props) => {
12
 
12
 
13
   const [ratio, setRatio] = useState("0");
13
   const [ratio, setRatio] = useState("0");
14
   const onFinish = (values) => {
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
   const onBack = () => {
19
   const onBack = () => {
21
     setIndex(index - 1);
20
     setIndex(index - 1);
53
           <Form.Item label={t('authentication.everyoneInfoUploadTitle')} style={{ marginTop: '40px', marginBottom: '36px' }} name="equityStructureChart">
52
           <Form.Item label={t('authentication.everyoneInfoUploadTitle')} style={{ marginTop: '40px', marginBottom: '36px' }} name="equityStructureChart">
54
             <UploadFile />
53
             <UploadFile />
55
           </Form.Item>
54
           </Form.Item>
56
-          <Form.Item label={t('authentication.everyoneInfoInputLabel2')} name="">
55
+          {/* <Form.Item label={t('authentication.everyoneInfoInputLabel2')} name="">
57
             <Radio.Group>
56
             <Radio.Group>
58
               <Radio style={{ fontSize: '16px' }} value="1">{t('authentication.everyoneInfoInputRadioValue1')}</Radio>
57
               <Radio style={{ fontSize: '16px' }} value="1">{t('authentication.everyoneInfoInputRadioValue1')}</Radio>
59
               <Radio style={{ fontSize: '16px' }} value="2">{t('authentication.everyoneInfoInputRadioValue2')}</Radio>
58
               <Radio style={{ fontSize: '16px' }} value="2">{t('authentication.everyoneInfoInputRadioValue2')}</Radio>
60
             </Radio.Group>
59
             </Radio.Group>
61
           </Form.Item>
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
           <Form.Item style={{ marginTop: '24px' }}>
71
           <Form.Item style={{ marginTop: '24px' }}>
70
             <Button size="large" style={{ width: '6vw', marginRight: '2vw' }} onClick={onBack}>{t('authentication.everyoneInfoBack')}</Button>
72
             <Button size="large" style={{ width: '6vw', marginRight: '2vw' }} onClick={onBack}>{t('authentication.everyoneInfoBack')}</Button>
71
             <Button size="large" type="primary" htmlType="submit" style={{ width: '6vw' }}>{t('authentication.everyoneInfoSubmit')}</Button>
73
             <Button size="large" type="primary" htmlType="submit" style={{ width: '6vw' }}>{t('authentication.everyoneInfoSubmit')}</Button>

+ 11
- 11
src/pages/authentication/components/FoundationInfo.jsx Ver fichero

11
   const { t } = useTranslation();
11
   const { t } = useTranslation();
12
 
12
 
13
   const onFinish = (values) => {
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
   return (
20
   return (
123
 
123
 
124
           <Form.Item label={t('authentication.formRightLabel5')} wrapperCol={{ span: 18 }} name="numEmployees">
124
           <Form.Item label={t('authentication.formRightLabel5')} wrapperCol={{ span: 18 }} name="numEmployees">
125
             <Select placeholder={t('authentication.formRightInputPlaceholder5')}>
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
             </Select>
129
             </Select>
130
           </Form.Item>
130
           </Form.Item>
131
           <Form.Item label={t('authentication.formRightLabel6')} wrapperCol={{ span: 18 }} name="businessPremisesType">
131
           <Form.Item label={t('authentication.formRightLabel6')} wrapperCol={{ span: 18 }} name="businessPremisesType">
132
             <Select placeholder={t('authentication.formRightInputPlaceholder6')}>
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
             </Select>
137
             </Select>
138
           </Form.Item>
138
           </Form.Item>
139
           <Button type="primary" size="large" style={{ width: '6vw' }} htmlType="submit">{t('authentication.foundationInfoNextBtn')}</Button>
139
           <Button type="primary" size="large" style={{ width: '6vw' }} htmlType="submit">{t('authentication.foundationInfoNextBtn')}</Button>

+ 4
- 0
src/pages/authentication/index.jsx Ver fichero

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

+ 31
- 27
src/pages/qRegister/QRegister.jsx Ver fichero

17
   const formRef = useRef();
17
   const formRef = useRef();
18
 
18
 
19
   const onFinish = (values) => {
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
   return (
44
   return (
123
         >
124
         >
124
           <Input placeholder="若有,请输入邀请码" style={{ borderRadius: "4px" }} />
125
           <Input placeholder="若有,请输入邀请码" style={{ borderRadius: "4px" }} />
125
         </Form.Item>
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
         <Form.Item>
138
         <Form.Item>
135
           <Button
139
           <Button
136
             type="primary"
140
             type="primary"

+ 10
- 7
src/routes/routes.jsx Ver fichero

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

+ 26
- 0
src/services/taCompanyBeneficiaryInfo.js Ver fichero

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}`);