暂时对接注册
This commit is contained in:
@ -3,4 +3,5 @@ export default {
|
|||||||
'home.data.contactsEmail': 'contactsEmailEn',
|
'home.data.contactsEmail': 'contactsEmailEn',
|
||||||
'home.data.address': 'addressEn',
|
'home.data.address': 'addressEn',
|
||||||
'home.data.addressEn': 'address',
|
'home.data.addressEn': 'address',
|
||||||
|
'home.data.contactsConsult': 'contactsConsultEn',
|
||||||
};
|
};
|
||||||
|
@ -3,4 +3,5 @@ export default {
|
|||||||
'home.data.contactsEmail': 'contactsEmail',
|
'home.data.contactsEmail': 'contactsEmail',
|
||||||
'home.data.address': 'address',
|
'home.data.address': 'address',
|
||||||
'home.data.addressEn': 'addressEn',
|
'home.data.addressEn': 'addressEn',
|
||||||
|
'home.data.contactsConsult': 'contactsConsult',
|
||||||
};
|
};
|
||||||
|
@ -194,10 +194,14 @@
|
|||||||
.questionItem {
|
.questionItem {
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
border-bottom: 1px solid rgba(@main-text-color-2, 0.5);
|
border-bottom: 1px solid rgba(@main-text-color-2, 0.5);
|
||||||
|
display: flex;
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
p{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,15 +316,15 @@ const IndexPage: React.FC<any> = ({ user }) => {
|
|||||||
<img src={aboutUs.addressImg} alt="" />
|
<img src={aboutUs.addressImg} alt="" />
|
||||||
<div className="questionItem">
|
<div className="questionItem">
|
||||||
<IconFont type="icon-dizhi" className="icon" />
|
<IconFont type="icon-dizhi" className="icon" />
|
||||||
{aboutUs[intl.formatMessage({ id: 'home.data.address' })]}
|
<span dangerouslySetInnerHTML={{ __html: aboutUs[intl.formatMessage({ id: 'home.data.address' })] }} />
|
||||||
</div>
|
</div>
|
||||||
<div className="questionItem">
|
<div className="questionItem">
|
||||||
<IconFont type="icon-dianhua" className="icon" />
|
<IconFont type="icon-dianhua" className="icon" />
|
||||||
{aboutUs[intl.formatMessage({ id: 'home.data.contactsPhone' })]}
|
<span dangerouslySetInnerHTML={{ __html: aboutUs[intl.formatMessage({ id: 'home.data.contactsConsult' })] }} />
|
||||||
</div>
|
</div>
|
||||||
<div className="questionItem">
|
<div className="questionItem">
|
||||||
<IconFont type="icon-youxiang" className="icon" />
|
<IconFont type="icon-youxiang" className="icon" />
|
||||||
{aboutUs[intl.formatMessage({ id: 'home.data.contactsEmail' })]}
|
<span dangerouslySetInnerHTML={{ __html: aboutUs[intl.formatMessage({ id: 'home.data.contactsEmail' })] }} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
@ -346,10 +346,7 @@ const IndexPage: React.FC<any> = ({ user }) => {
|
|||||||
<div className="contactBox">
|
<div className="contactBox">
|
||||||
<div className="blockTitle mt20">联系方式</div>
|
<div className="blockTitle mt20">联系方式</div>
|
||||||
<div className="contact">
|
<div className="contact">
|
||||||
<p style={{ marginTop: 20 }}>客服1: 400-300-9989</p>
|
<span dangerouslySetInnerHTML={{ __html: aboutUs[intl.formatMessage({ id: 'home.data.contactsPhone' })] }} />
|
||||||
<p>客服1: 400-300-9989</p>
|
|
||||||
<p>客服1: 400-300-9989</p>
|
|
||||||
<p>客服1: 400-300-9989</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -49,7 +49,6 @@ const SupplierRegister: React.FC = () => {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取问卷列表出错:', error);
|
console.error('获取问卷列表出错:', error);
|
||||||
message.error(intl.formatMessage({ id: 'register.submit.error' }));
|
|
||||||
} finally {
|
} finally {
|
||||||
setFetchingQuestions(false);
|
setFetchingQuestions(false);
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,11 @@
|
|||||||
/* 境内企业/机构 表单项 */
|
/* 境内企业/机构 表单项 */
|
||||||
import React from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Form, Input, Button, Select, DatePicker, Row, Col, message } from 'antd';
|
import { Form, Input, Button, Select, DatePicker, Row, Col, message, Space } from 'antd';
|
||||||
import { MobileOutlined, MailOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
import { MobileOutlined, MailOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
||||||
import { useIntl } from 'umi';
|
import { useIntl } from 'umi';
|
||||||
import FileUpload from '@/components/FileUpload';
|
import FileUpload from '@/components/FileUpload';
|
||||||
import type { DictItem } from '@/servers/api/dict';
|
import type { DictItem } from '@/servers/api/dict';
|
||||||
|
import { getDictList } from '@/servers/api/dict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 引入通用表单组件
|
* 引入通用表单组件
|
||||||
@ -45,7 +46,32 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
|||||||
entTypeList,
|
entTypeList,
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
// 企业类别
|
||||||
|
const [companyTypeOptions, setCompanyTypeOptions] = useState<DictItem[]>([]);
|
||||||
|
// 联系人身份类别
|
||||||
|
const [contactsTypeOptions, setContactsTypeOptions] = useState<DictItem[]>([]);
|
||||||
|
useEffect(() => {
|
||||||
|
// 设置供应商类型为境内企业
|
||||||
|
form.setFieldsValue({
|
||||||
|
coscoSupplierBase: {
|
||||||
|
...form.getFieldValue('coscoSupplierBase'),
|
||||||
|
supplierType: 'dvs',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// 从字典中 联系人身份类别contacts_type 获取数据
|
||||||
|
getDictList('contacts_type').then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
setContactsTypeOptions(res.data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 企业类别
|
||||||
|
getDictList('enterprise_type').then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
setCompanyTypeOptions(res.data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="border-box">
|
<div className="border-box">
|
||||||
@ -72,7 +98,7 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
|||||||
id: 'register.domestic.enterpriseType.placeholder',
|
id: 'register.domestic.enterpriseType.placeholder',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{entTypeList.map((item) => (
|
{companyTypeOptions.map((item) => (
|
||||||
<Option key={item.code} value={item.code}>
|
<Option key={item.code} value={item.code}>
|
||||||
{item.dicName}
|
{item.dicName}
|
||||||
</Option>
|
</Option>
|
||||||
@ -265,14 +291,37 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
<Form.Item required label={intl.formatMessage({ id: 'register.domestic.idCard' })}>
|
||||||
|
<Space.Compact size="large">
|
||||||
|
<Form.Item
|
||||||
|
name={['coscoSupplierBase', 'contactsType']}
|
||||||
|
noStyle
|
||||||
|
rules={[{ required: true, message: '请选择联系人证件类型' }]}
|
||||||
|
>
|
||||||
|
<Select placeholder="请选择类型">
|
||||||
|
{contactsTypeOptions.map((item) => (
|
||||||
|
<Option key={item.code} value={item.code}>
|
||||||
|
{item.dicName}
|
||||||
|
</Option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={['coscoSupplierBase', 'idCard']}
|
name={['coscoSupplierBase', 'idCard']}
|
||||||
label={intl.formatMessage({ id: 'register.domestic.idCard' })}
|
noStyle
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: intl.formatMessage({ id: 'register.domestic.idCard.placeholder' }),
|
||||||
|
},
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
placeholder={intl.formatMessage({ id: 'register.domestic.idCard.placeholder' })}
|
placeholder={intl.formatMessage({ id: 'register.domestic.idCard.placeholder' })}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
</Space.Compact>
|
||||||
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* 境外企业 表单项 */
|
/* 境外企业 表单项 */
|
||||||
import React from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Form, Input, Button, Select, Row, Col } from 'antd';
|
import { Form, Input, Button, Select, Row, Col } from 'antd';
|
||||||
import { MobileOutlined, MailOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
import { MobileOutlined, MailOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
||||||
import { useIntl } from 'umi';
|
import { useIntl } from 'umi';
|
||||||
@ -14,6 +14,7 @@ import {
|
|||||||
AttachmentSection,
|
AttachmentSection,
|
||||||
} from './CommonFormSections';
|
} from './CommonFormSections';
|
||||||
import type { DictItem } from '@/servers/api/dict';
|
import type { DictItem } from '@/servers/api/dict';
|
||||||
|
import { getregionInternational } from '@/servers/api/register';
|
||||||
|
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
@ -41,7 +42,23 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
|
|||||||
entTypeList,
|
entTypeList,
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
// 全球
|
||||||
|
const [regionOptions, setRegionOptions] = useState<API.RegionOption[]>([]);
|
||||||
|
useEffect(() => {
|
||||||
|
// 设置供应商类型为境外企业
|
||||||
|
form.setFieldsValue({
|
||||||
|
coscoSupplierBase: {
|
||||||
|
...form.getFieldValue('coscoSupplierBase'),
|
||||||
|
supplierType: 'ovs'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
getregionInternational().then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
setRegionOptions(res.data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='border-box'>
|
<div className='border-box'>
|
||||||
@ -69,21 +86,14 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="country"
|
name={['coscoSupplierBase', 'nation']}
|
||||||
label={intl.formatMessage({ id: 'register.foreign.country' })}
|
label={intl.formatMessage({ id: 'register.foreign.country' })}
|
||||||
rules={[{ required: true, message: intl.formatMessage({ id: 'register.foreign.country.required' }) }]}
|
rules={[{ required: true, message: intl.formatMessage({ id: 'register.foreign.country.required' }) }]}
|
||||||
>
|
>
|
||||||
<Select placeholder={intl.formatMessage({ id: 'register.foreign.country.placeholder' })}>
|
<Select placeholder={intl.formatMessage({ id: 'register.foreign.country.placeholder' })}>
|
||||||
<Option value="US">{intl.formatMessage({ id: 'register.foreign.country.US' })}</Option>
|
{regionOptions.map((item) => {
|
||||||
<Option value="UK">{intl.formatMessage({ id: 'register.foreign.country.UK' })}</Option>
|
return <Option key={item.id} value={item.id}>{item.name}</Option>;
|
||||||
<Option value="JP">{intl.formatMessage({ id: 'register.foreign.country.JP' })}</Option>
|
})}
|
||||||
<Option value="DE">{intl.formatMessage({ id: 'register.foreign.country.DE' })}</Option>
|
|
||||||
<Option value="FR">{intl.formatMessage({ id: 'register.foreign.country.FR' })}</Option>
|
|
||||||
<Option value="AU">{intl.formatMessage({ id: 'register.foreign.country.AU' })}</Option>
|
|
||||||
<Option value="CA">{intl.formatMessage({ id: 'register.foreign.country.CA' })}</Option>
|
|
||||||
<Option value="SG">{intl.formatMessage({ id: 'register.foreign.country.SG' })}</Option>
|
|
||||||
<Option value="HK">{intl.formatMessage({ id: 'register.foreign.country.HK' })}</Option>
|
|
||||||
<Option value="OTHER">{intl.formatMessage({ id: 'register.foreign.country.OTHER' })}</Option>
|
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
@ -137,7 +147,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
|
|||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item label={intl.formatMessage({ id: 'register.foreign.capital' })} required style={{ marginBottom: 0 }}>
|
<Form.Item label={intl.formatMessage({ id: 'register.foreign.capital' })} required style={{ marginBottom: 0 }}>
|
||||||
<Input.Group compact style={{ display: 'flex' }}>
|
<Input.Group compact style={{ display: 'flex' }}>
|
||||||
<Form.Item name="currency" noStyle initialValue="USD">
|
<Form.Item name={['coscoSupplierBase', 'currency']} noStyle initialValue="USD">
|
||||||
<Select style={{ width: 100, borderRadius: '2px 0 0 2px' }}>
|
<Select style={{ width: 100, borderRadius: '2px 0 0 2px' }}>
|
||||||
{currencyList.map((item) => (
|
{currencyList.map((item) => (
|
||||||
<Option key={item.code} value={item.code}>
|
<Option key={item.code} value={item.code}>
|
||||||
@ -193,7 +203,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="verificationCode"
|
name={['coscoSupplierBase', 'verificationCode']}
|
||||||
label="验证码"
|
label="验证码"
|
||||||
rules={[
|
rules={[
|
||||||
{ required: true, message: "请输入验证码" },
|
{ required: true, message: "请输入验证码" },
|
||||||
|
@ -7,7 +7,13 @@ export async function coscoSupplierBaseAdd(data: API.RegisterRequest) {
|
|||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 代录供应商注册
|
||||||
|
export async function addAgent(data: API.RegisterRequest) {
|
||||||
|
return request('/api/coscoSupplierBase/addAgent', {
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获取调查问卷
|
// 获取调查问卷
|
||||||
export async function fetchSurveyQuestions(): Promise<API.APIResponse<API.SurveyQuestionResponse>> {
|
export async function fetchSurveyQuestions(): Promise<API.APIResponse<API.SurveyQuestionResponse>> {
|
||||||
@ -15,3 +21,17 @@ export async function fetchSurveyQuestions(): Promise<API.APIResponse<API.Survey
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取省市县
|
||||||
|
export async function getRegionTree(){
|
||||||
|
return request('/api/cosco/dictRegion/region', {
|
||||||
|
method: 'GET',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取全球
|
||||||
|
export async function getregionInternational(){
|
||||||
|
return request('/api/cosco/dictRegion/regionInternational', {
|
||||||
|
method: 'GET',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
8
src/servers/api/typings.d.ts
vendored
8
src/servers/api/typings.d.ts
vendored
@ -375,4 +375,12 @@ declare namespace API {
|
|||||||
identifying: string;
|
identifying: string;
|
||||||
encryptValue: string;
|
encryptValue: string;
|
||||||
}
|
}
|
||||||
|
// 省市区
|
||||||
|
interface RegionOption {
|
||||||
|
label: string;
|
||||||
|
value: string;
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
children?: RegionOption[];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user