注册组件修改字段
This commit is contained in:
@ -1,11 +1,7 @@
|
||||
/* 境外企业 表单项 */
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Form, Input, Button, Select, Row, Col, Cascader } from 'antd';
|
||||
import {
|
||||
MobileOutlined,
|
||||
MailOutlined,
|
||||
EnvironmentOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { Form, Input, Button, Select, Row, Col, Cascader } from 'antd';
|
||||
import { MobileOutlined, MailOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
||||
/**
|
||||
* 引入通用表单组件
|
||||
*/
|
||||
@ -18,6 +14,8 @@ import {
|
||||
} from './CommonFormSections';
|
||||
|
||||
import { getregionInternational } from '@/servers/api/register';
|
||||
import { getDictList } from '@/servers/api/dicts';
|
||||
import type { DictItem } from '@/servers/api/dicts';
|
||||
|
||||
const { Option } = Select;
|
||||
const { TextArea } = Input;
|
||||
@ -34,15 +32,36 @@ interface ForeignFormProps {
|
||||
* 基本信息部分为境外企业特有
|
||||
* 其他部分使用通用表单组件
|
||||
*/
|
||||
const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCaptcha, surveyQuestions }) => {
|
||||
const ForeignForm: React.FC<ForeignFormProps> = ({
|
||||
form,
|
||||
countdown,
|
||||
handleGetCaptcha,
|
||||
surveyQuestions,
|
||||
}) => {
|
||||
// 全球
|
||||
const [regionOptions, setRegionOptions] = useState<API.RegionOption[]>([]);
|
||||
// 企业类别
|
||||
const [companyTypeOptions, setCompanyTypeOptions] = useState<DictItem[]>([]);
|
||||
// 币种
|
||||
const [currencyOptions, setCurrencyOptions] = useState<DictItem[]>([]);
|
||||
useEffect(() => {
|
||||
getregionInternational().then(res => {
|
||||
if (res.code === 200) {
|
||||
setRegionOptions(res.data);
|
||||
}
|
||||
});
|
||||
getregionInternational().then((res) => {
|
||||
if (res.code === 200) {
|
||||
setRegionOptions(res.data);
|
||||
}
|
||||
});
|
||||
// 企业类别
|
||||
getDictList('enterprise_type').then((res) => {
|
||||
if (res.code === 200) {
|
||||
setCompanyTypeOptions(res.data);
|
||||
}
|
||||
});
|
||||
// 币种
|
||||
getDictList('currency').then((res) => {
|
||||
if (res.code === 200) {
|
||||
setCurrencyOptions(res.data);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
@ -70,12 +89,8 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="companyRegNumber"
|
||||
label="公司注册号"
|
||||
rules={[{ required: true, message: '请输入公司注册号' }]}
|
||||
>
|
||||
<Input placeholder="请输入公司注册号" />
|
||||
<Form.Item name="vat" label="税号">
|
||||
<Input placeholder="请输入税号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
@ -85,15 +100,13 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
rules={[{ required: true, message: '请选择国家/地区' }]}
|
||||
>
|
||||
<Select placeholder="请选择国家/地区">
|
||||
{
|
||||
regionOptions.map((item) => {
|
||||
return <Option value={item.id}>{item.name}</Option>
|
||||
})
|
||||
}
|
||||
{regionOptions.map((item) => {
|
||||
return <Option value={item.id}>{item.name}</Option>;
|
||||
})}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
{/* <Col span={8}>
|
||||
<Form.Item
|
||||
name="registrationPassword"
|
||||
label="登录密码"
|
||||
@ -127,8 +140,8 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
>
|
||||
<Input.Password placeholder="请再次输入密码" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
</Col> */}
|
||||
{/* <Col span={8}>
|
||||
<Form.Item
|
||||
name="registeredAddress"
|
||||
label="注册地址"
|
||||
@ -136,10 +149,23 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
>
|
||||
<Input prefix={<EnvironmentOutlined />} placeholder="请具体注明" />
|
||||
</Form.Item>
|
||||
</Col> */}
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="officeAddress"
|
||||
label="办公地址"
|
||||
rules={[{ required: true, message: '请输入办公地址' }]}
|
||||
>
|
||||
<Input prefix={<EnvironmentOutlined />} placeholder="请具体注明" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="officeAddress" label="办公地址">
|
||||
<Input prefix={<EnvironmentOutlined />} placeholder="请具体注明" />
|
||||
<Form.Item
|
||||
name="businessScope"
|
||||
label="经营范围"
|
||||
rules={[{ required: true, message: '请输入经营范围' }]}
|
||||
>
|
||||
<TextArea placeholder="请输入经营范围" rows={2} maxLength={200} showCount />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
@ -148,30 +174,24 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="legalPerson"
|
||||
label="企业法定代表人"
|
||||
rules={[{ required: true, message: '请输入企业法定代表人' }]}
|
||||
>
|
||||
<Form.Item name="legalPerson" label="企业法定代表人">
|
||||
<Input placeholder="请输入企业法定代表人" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
{/*
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="companyType"
|
||||
label="企业性质"
|
||||
rules={[{ required: true, message: '请选择企业性质' }]}
|
||||
label="企业类别"
|
||||
rules={[{ required: true, message: '请选择企业类别' }]}
|
||||
>
|
||||
<Select placeholder="请选择企业性质">
|
||||
<Option value="corporation">公司制企业</Option>
|
||||
<Option value="partnership">合伙企业</Option>
|
||||
<Option value="joint">合资企业</Option>
|
||||
<Option value="sole">独资企业</Option>
|
||||
<Option value="other">其他</Option>
|
||||
</Select>
|
||||
<Select placeholder="请选择企业类别" options={companyTypeOptions.map(item => ({
|
||||
label: item.dicName,
|
||||
value: item.code,
|
||||
}))} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
</Col> */}
|
||||
{/* <Col span={8}>
|
||||
<Form.Item
|
||||
name="supplierType"
|
||||
label="供应商类型"
|
||||
@ -184,21 +204,18 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
<Option value="other">其他</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Col> */}
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="注册资本"
|
||||
required
|
||||
>
|
||||
<Form.Item label="注册资本" required>
|
||||
<Input.Group compact style={{ display: 'flex' }}>
|
||||
<Form.Item name="capitalCurrency" noStyle initialValue="USD">
|
||||
<Select style={{ width: 100, borderRadius: '2px 0 0 2px' }}>
|
||||
<Option value="USD">美元</Option>
|
||||
<Option value="EUR">欧元</Option>
|
||||
<Option value="GBP">英镑</Option>
|
||||
<Option value="JPY">日元</Option>
|
||||
<Option value="HKD">港币</Option>
|
||||
</Select>
|
||||
<Select
|
||||
style={{ width: 100, borderRadius: '2px 0 0 2px' }}
|
||||
options={currencyOptions.map((item) => ({
|
||||
label: item.dicName,
|
||||
value: item.code,
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="capitalAmount"
|
||||
@ -214,16 +231,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Input.Group>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="businessScope"
|
||||
label="经营范围"
|
||||
rules={[{ required: true, message: '请输入经营范围' }]}
|
||||
>
|
||||
<TextArea placeholder="请输入经营范围" rows={2} maxLength={200} showCount />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}></Col>
|
||||
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactName"
|
||||
@ -235,16 +243,17 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactPhone"
|
||||
label="联系人手机"
|
||||
name="contactEmail"
|
||||
label="联系人邮箱"
|
||||
rules={[
|
||||
{ required: true, message: '请输入联系人手机号码' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' },
|
||||
{ type: 'email', message: '请输入有效的电子邮箱' },
|
||||
{ required: true, message: '请输入电子邮箱' },
|
||||
]}
|
||||
extra="该邮箱用于后续联系和找回密码"
|
||||
>
|
||||
<Input
|
||||
placeholder="请输入11位手机号码"
|
||||
prefix={<MobileOutlined />}
|
||||
placeholder="请输入电子邮箱"
|
||||
prefix={<MailOutlined />}
|
||||
addonAfter={
|
||||
<Button
|
||||
type="link"
|
||||
@ -266,12 +275,19 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
{ required: true, message: '请输入验证码' },
|
||||
{ pattern: /^\d{6}$/, message: '请输入6位数字验证码' },
|
||||
]}
|
||||
extra="该手机号用于后续联系和找回密码"
|
||||
>
|
||||
<Input placeholder="请输入验证码" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactPhone"
|
||||
label="联系人手机"
|
||||
>
|
||||
<Input placeholder="请输入企业联系电话" prefix={<MobileOutlined />} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
{/* <Col span={8}>
|
||||
<Form.Item
|
||||
name="contactIdType"
|
||||
label="联系人身份类别"
|
||||
@ -291,30 +307,19 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
>
|
||||
<Input placeholder="请填写联系人正确的身份证号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactEmail"
|
||||
label="联系人邮箱"
|
||||
rules={[
|
||||
{ type: 'email', message: '请输入有效的电子邮箱' },
|
||||
{ required: true, message: '请输入电子邮箱' },
|
||||
]}
|
||||
>
|
||||
<Input prefix={<MailOutlined />} placeholder="XXX@XXX.com" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
</Col> */}
|
||||
|
||||
{/* <Col span={8}>
|
||||
<Form.Item name="telephone" label="固定电话">
|
||||
<Input placeholder="请输入企业联系电话" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Col> */}
|
||||
</Row>
|
||||
|
||||
{/* 使用通用表单组件 */}
|
||||
<QualificationSection form={form} />
|
||||
<InvoiceSection form={form} />
|
||||
<BankAccountSection form={form} supplierType={'ovs'} />
|
||||
<BankAccountSection form={form} supplierType={'ovs'} />
|
||||
<SurveySection form={form} surveyQuestions={surveyQuestions} />
|
||||
<AttachmentSection form={form} />
|
||||
</>
|
||||
|
Reference in New Issue
Block a user