/* 境外企业 表单项 */ 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 { QualificationSection, InvoiceSection, BankAccountSection, SurveySection, AttachmentSection, } 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; interface ForeignFormProps { form: any; countdown: number; handleGetCaptcha: () => void; surveyQuestions?: API.SurveyQuestionResponse; // 本身就是数组类型 } /** * 境外企业注册表单 * 基本信息部分为境外企业特有 * 其他部分使用通用表单组件 */ const ForeignForm: React.FC = ({ form, countdown, handleGetCaptcha, surveyQuestions, }) => { // 全球 const [regionOptions, setRegionOptions] = useState([]); // 企业类别 const [companyTypeOptions, setCompanyTypeOptions] = useState([]); // 币种 const [currencyOptions, setCurrencyOptions] = useState([]); useEffect(() => { // 设置供应商类型为境外企业 form.setFieldsValue({ coscoSupplierBase: { ...form.getFieldValue('coscoSupplierBase'), supplierType: 'ovs' } }); 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 ( <> {/* 境外企业特有的基本信息部分 */}
基本信息
{/* 隐藏字段 - 供应商类型 */} {/* */} {/* ({ validator(_, value) { if (!value || getFieldValue('registrationPassword') === value) { return Promise.resolve(); } return Promise.reject(new Error('两次输入的密码不一致')); }, }), ]} > */} } placeholder="请具体注明" /> } placeholder="请具体注明" />