增加上传组件,对接注册字段
This commit is contained in:
@ -69,7 +69,65 @@ const SupplierRegister: React.FC = () => {
|
||||
values.coscoSupplierBase = values.coscoSupplierBase || {};
|
||||
values.coscoSupplierBase.supplierType = supplierType;
|
||||
|
||||
console.log('供应商注册信息:', values);
|
||||
// 记录详细的表单数据,便于调试
|
||||
console.log('表单原始数据:', JSON.parse(JSON.stringify(values)));
|
||||
console.log('供应商基本信息:', values.coscoSupplierBase);
|
||||
console.log('开票信息:', values.coscoSupplierInvoice);
|
||||
console.log('银行账户信息:', values.coscoSupplierBank);
|
||||
console.log('资质信息:', values.coscoSupplierQualifications);
|
||||
console.log('调查问卷信息:', values.coscoSupplierSurvey);
|
||||
console.log('调查问卷回复:', values.coscoSupplierSurveyQuestionReply);
|
||||
console.log('调查问卷附件:', values.coscoSupplierSurveyAttachments);
|
||||
|
||||
// 处理文件上传组件返回的文件列表值
|
||||
// 处理营业执照附件
|
||||
if (values.coscoSupplierBase.licenceAccessory && Array.isArray(values.coscoSupplierBase.licenceAccessory)) {
|
||||
const licenceFile = values.coscoSupplierBase.licenceAccessory[0];
|
||||
values.coscoSupplierBase.licenceAccessory = licenceFile?.response?.url || licenceFile?.response?.filePath || '';
|
||||
}
|
||||
|
||||
// 处理纳税人资格证明
|
||||
if (values.coscoSupplierInvoice?.qualificationCertificate && Array.isArray(values.coscoSupplierInvoice.qualificationCertificate)) {
|
||||
const taxFile = values.coscoSupplierInvoice.qualificationCertificate[0];
|
||||
values.coscoSupplierInvoice.qualificationCertificate = taxFile?.response?.url || taxFile?.response?.filePath || '';
|
||||
}
|
||||
|
||||
// 处理资质证书附件
|
||||
if (values.coscoSupplierQualifications) {
|
||||
values.coscoSupplierQualifications = values.coscoSupplierQualifications.map((qual: any) => {
|
||||
if (qual.accessory && Array.isArray(qual.accessory)) {
|
||||
const accessoryFile = qual.accessory[0];
|
||||
qual.accessory = accessoryFile?.response?.url || accessoryFile?.response?.filePath || '';
|
||||
}
|
||||
return qual;
|
||||
});
|
||||
}
|
||||
|
||||
// 处理调查问卷附件
|
||||
if (values.coscoSupplierSurveyAttachments) {
|
||||
values.coscoSupplierSurveyAttachments = values.coscoSupplierSurveyAttachments.map((item: any) => {
|
||||
if (item.fileUrl && Array.isArray(item.fileUrl)) {
|
||||
const file = item.fileUrl[0];
|
||||
item.fileUrl = file?.response?.url || file?.response?.filePath || '';
|
||||
}
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
// 处理调查问卷回复
|
||||
if (values.coscoSupplierSurveyQuestionReply) {
|
||||
// 过滤出有效的问卷回复并确保数据格式正确
|
||||
values.coscoSupplierSurveyQuestionReply = values.coscoSupplierSurveyQuestionReply
|
||||
.filter((item: any) => item && item.surveyQuestionId && item.replyValue)
|
||||
.map((item: any) => ({
|
||||
surveyQuestionId: item.surveyQuestionId,
|
||||
replyValue: item.replyValue
|
||||
}));
|
||||
|
||||
console.log('处理后的问卷回复:', values.coscoSupplierSurveyQuestionReply);
|
||||
}
|
||||
|
||||
console.log('最终提交的表单数据:', JSON.parse(JSON.stringify(values)));
|
||||
|
||||
// 直接调用API
|
||||
const response = await coscoSupplierBaseAdd(values);
|
||||
@ -93,6 +151,10 @@ const SupplierRegister: React.FC = () => {
|
||||
setSupplierType(e.target.value);
|
||||
};
|
||||
|
||||
const onFinishFailed = (errorInfo: any) => {
|
||||
console.log('表单验证失败:', errorInfo);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="register-page ">
|
||||
<div className="register-container large-width">
|
||||
@ -112,6 +174,7 @@ const SupplierRegister: React.FC = () => {
|
||||
name="supplier_register"
|
||||
className="register-form"
|
||||
onFinish={onFinish}
|
||||
onFinishFailed={onFinishFailed}
|
||||
layout="horizontal"
|
||||
labelAlign="right"
|
||||
size="large"
|
||||
|
@ -8,7 +8,6 @@ import {
|
||||
Input,
|
||||
Button,
|
||||
Select,
|
||||
Upload,
|
||||
DatePicker,
|
||||
Row,
|
||||
Col,
|
||||
@ -17,9 +16,9 @@ import {
|
||||
Cascader,
|
||||
Empty,
|
||||
} from 'antd';
|
||||
import { UploadOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import { PlusOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import { message } from 'antd';
|
||||
import { validateFileSize } from '@/utils/utils';
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@ -103,7 +102,7 @@ export const QualificationSection: React.FC<CommonFormSectionsProps> = ({ form }
|
||||
dataIndex: 'certType',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'certType']}
|
||||
name={[record.name, 'certificateType']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请选择资质证书类型' }]}
|
||||
>
|
||||
@ -122,7 +121,7 @@ export const QualificationSection: React.FC<CommonFormSectionsProps> = ({ form }
|
||||
dataIndex: 'certName',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'certName']}
|
||||
name={[record.name, 'name']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入资质名称' }]}
|
||||
>
|
||||
@ -135,7 +134,7 @@ export const QualificationSection: React.FC<CommonFormSectionsProps> = ({ form }
|
||||
dataIndex: 'certNumber',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'certNumber']}
|
||||
name={[record.name, 'code']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入资质证书编号' }]}
|
||||
>
|
||||
@ -147,7 +146,7 @@ export const QualificationSection: React.FC<CommonFormSectionsProps> = ({ form }
|
||||
title: '资质类别和等级',
|
||||
dataIndex: 'certLevel',
|
||||
render: (_, record) => (
|
||||
<Form.Item name={[record.name, 'certLevel']} noStyle>
|
||||
<Form.Item name={[record.name, 'typeLevel']} noStyle>
|
||||
<Input placeholder="请输入资质类别和等级" />
|
||||
</Form.Item>
|
||||
),
|
||||
@ -157,7 +156,7 @@ export const QualificationSection: React.FC<CommonFormSectionsProps> = ({ form }
|
||||
dataIndex: 'issuingAuthority',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'issuingAuthority']}
|
||||
name={[record.name, 'authority']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入发证机构' }]}
|
||||
>
|
||||
@ -204,15 +203,17 @@ export const QualificationSection: React.FC<CommonFormSectionsProps> = ({ form }
|
||||
dataIndex: 'certFile',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'certFile']}
|
||||
name={[record.name, 'accessory']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请上传资质证书附件' }]}
|
||||
rules={[{ required: true, message: '请上传资质证书附件' }]}
|
||||
valuePropName="value"
|
||||
>
|
||||
<Upload name="certFile" action="/api/upload" listType="text" maxCount={1}>
|
||||
<Button type="link" size="small">
|
||||
上传
|
||||
</Button>
|
||||
</Upload>
|
||||
<FileUpload
|
||||
maxSize={10}
|
||||
allowedTypes={['pdf', 'jpg', 'jpeg', 'png']}
|
||||
maxCount={1}
|
||||
buttonText="上传"
|
||||
/>
|
||||
</Form.Item>
|
||||
),
|
||||
},
|
||||
@ -268,7 +269,7 @@ export const InvoiceSection: React.FC<CommonFormSectionsProps> = ({ form }) => {
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="invoiceTitle"
|
||||
name={['coscoSupplierInvoice', 'head']}
|
||||
label="开票抬头"
|
||||
rules={[{ required: true, message: '请输入开票抬头' }]}
|
||||
>
|
||||
@ -277,7 +278,7 @@ export const InvoiceSection: React.FC<CommonFormSectionsProps> = ({ form }) => {
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="taxpayerNumber"
|
||||
name={['coscoSupplierInvoice', 'taxpayerCode']}
|
||||
label="纳税人识别号"
|
||||
rules={[{ required: true, message: '请输入纳税人识别号' }]}
|
||||
>
|
||||
@ -285,36 +286,33 @@ export const InvoiceSection: React.FC<CommonFormSectionsProps> = ({ form }) => {
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="invoiceAddress" label="开票地址">
|
||||
<Form.Item name={['coscoSupplierInvoice', 'address']} label="开票地址">
|
||||
<Input placeholder="请输入开票地址" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="invoicePhone" label="开票电话">
|
||||
<Form.Item name={['coscoSupplierInvoice', 'phone']} label="开票电话">
|
||||
<Input placeholder="请输入开票电话" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="invoiceBank" label="开票户行">
|
||||
<Form.Item name={['coscoSupplierInvoice', 'bank']} label="开票户行">
|
||||
<Input placeholder="请输入开票银行" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="bankAccountNumber" label="开票户行账号">
|
||||
<Form.Item name={['coscoSupplierInvoice', 'account']} label="开票户行账号">
|
||||
<Input placeholder="请输入开票户行账号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="generalTaxpayerCert" label="一般纳税人资格证明">
|
||||
<Upload
|
||||
name="generalTaxpayerCert"
|
||||
action="/api/upload"
|
||||
listType="text"
|
||||
<Form.Item name={['coscoSupplierInvoice', 'qualificationCertificate']} label="一般纳税人资格证明" valuePropName="value">
|
||||
<FileUpload
|
||||
maxSize={10}
|
||||
allowedTypes={['pdf', 'jpg', 'jpeg', 'png']}
|
||||
maxCount={1}
|
||||
beforeUpload={(file) => validateFileSize(file, 10, ['pdf', 'jpg', 'jpeg', 'png'])}
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
||||
</Upload>
|
||||
buttonText="上传文件"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
@ -356,7 +354,7 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form })
|
||||
dataIndex: 'bankName',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'bankName']}
|
||||
name={[record.name, 'bank']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入开户银行' }]}
|
||||
>
|
||||
@ -382,7 +380,7 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form })
|
||||
dataIndex: 'accountNumber',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'accountNumber']}
|
||||
name={[record.name, 'account']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入账号' }]}
|
||||
>
|
||||
@ -452,7 +450,10 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form })
|
||||
*/
|
||||
export const SurveySection: React.FC<SurveySectionProps> = ({ form, surveyQuestions }) => {
|
||||
// 使用API获取的问卷数据,如果没有则显示无数据状态
|
||||
const hasQuestions = surveyQuestions && surveyQuestions.length > 0;
|
||||
const hasQuestions = surveyQuestions && Array.isArray(surveyQuestions) && surveyQuestions.length > 0;
|
||||
|
||||
// 调试日志
|
||||
console.log('调查问卷数据:', surveyQuestions);
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -524,22 +525,16 @@ export const SurveySection: React.FC<SurveySectionProps> = ({ form, surveyQuesti
|
||||
</div>
|
||||
|
||||
{hasQuestions ? (
|
||||
<Form.List name="coscoSupplierSurveyQuestionReply">
|
||||
<Form.List name="coscoSupplierSurveyQuestionReply" initialValue={surveyQuestions.map((q: any, index) => ({ surveyQuestionId: q.id, replyValue: '' }))}>
|
||||
{(fields, { add, remove }) => {
|
||||
// 确保有足够的表单项对应每个问题
|
||||
if (fields.length < surveyQuestions.length) {
|
||||
const diff = surveyQuestions.length - fields.length;
|
||||
for (let i = 0; i < diff; i++) {
|
||||
add();
|
||||
}
|
||||
}
|
||||
console.log('Form.List fields:', fields);
|
||||
|
||||
return (
|
||||
<Table
|
||||
pagination={false}
|
||||
bordered
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
rowKey={(record, index) => `survey_question_${index}`}
|
||||
dataSource={surveyQuestions}
|
||||
columns={[
|
||||
{
|
||||
@ -557,30 +552,39 @@ export const SurveySection: React.FC<SurveySectionProps> = ({ form, surveyQuesti
|
||||
{
|
||||
title: '回复',
|
||||
width: 650,
|
||||
render: (_, record, index) => (
|
||||
<>
|
||||
<Form.Item
|
||||
name={[index, 'surveyQuestionId']}
|
||||
initialValue={record.id}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name={[index, 'replyValue']}
|
||||
rules={[{ required: true, message: '请选择答案' }]}
|
||||
wrapperCol={{ span: 24 }}
|
||||
>
|
||||
<Radio.Group>
|
||||
{record.coscoSurveyQuestionOptionList?.map((option: any) => (
|
||||
<Radio key={option.id} value={option.opentionValue}>
|
||||
{option.optionName}
|
||||
</Radio>
|
||||
))}
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</>
|
||||
),
|
||||
render: (_, record, index) => {
|
||||
return (
|
||||
<>
|
||||
<Form.Item
|
||||
name={[index, 'surveyQuestionId']}
|
||||
initialValue={record.id}
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name={[index, 'replyValue']}
|
||||
rules={[{ required: true, message: `请选择问题${index + 1}的答案` }]}
|
||||
wrapperCol={{ span: 24 }}
|
||||
>
|
||||
{record.coscoSurveyQuestionOptionList && record.coscoSurveyQuestionOptionList.length > 0 ? (
|
||||
<Radio.Group>
|
||||
{record.coscoSurveyQuestionOptionList.map((option: any) => (
|
||||
<Radio
|
||||
key={option.id}
|
||||
value={option.opentionValue}
|
||||
>
|
||||
{option.optionName}
|
||||
</Radio>
|
||||
))}
|
||||
</Radio.Group>
|
||||
) : (
|
||||
<Input placeholder="请输入回答" />
|
||||
)}
|
||||
</Form.Item>
|
||||
</>
|
||||
);
|
||||
}
|
||||
},
|
||||
]}
|
||||
/>
|
||||
@ -638,43 +642,40 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
<Form.Item
|
||||
name={[field.name, 'fileUrl']}
|
||||
rules={[{ required: true, message: '请上传已盖章的反商业贿赂承诺书' }]}
|
||||
valuePropName="value"
|
||||
>
|
||||
<Upload
|
||||
name="file"
|
||||
action="/api/upload"
|
||||
listType="text"
|
||||
<FileUpload
|
||||
maxSize={10}
|
||||
allowedTypes={['pdf', 'doc', 'docx']}
|
||||
maxCount={1}
|
||||
beforeUpload={(file) =>
|
||||
validateFileSize(file, 10, ['pdf', 'doc', 'docx'])
|
||||
}
|
||||
onChange={(info) => {
|
||||
if (info.file.status === 'done') {
|
||||
const response = info.file.response;
|
||||
if (response && response.success) {
|
||||
// 填充文件信息
|
||||
form.setFieldsValue({
|
||||
coscoSupplierSurveyAttachments: [
|
||||
{
|
||||
...form.getFieldValue([
|
||||
'coscoSupplierSurveyAttachments',
|
||||
field.name,
|
||||
]),
|
||||
fileName: info.file.name,
|
||||
fileType: info.file.type,
|
||||
fileSize: info.file.size.toString(),
|
||||
filePath: response.filePath || response.url,
|
||||
},
|
||||
],
|
||||
});
|
||||
message.success(`${info.file.name} 上传成功`);
|
||||
} else {
|
||||
message.error(`${info.file.name} 上传失败`);
|
||||
buttonText="上传文件"
|
||||
onChange={(fileList) => {
|
||||
if (fileList && fileList.length > 0) {
|
||||
const file = fileList[0];
|
||||
if (file.status === 'done' && file.response) {
|
||||
const response = file.response;
|
||||
if (response && response.success) {
|
||||
// 填充文件信息
|
||||
form.setFieldsValue({
|
||||
coscoSupplierSurveyAttachments: [
|
||||
{
|
||||
...form.getFieldValue([
|
||||
'coscoSupplierSurveyAttachments',
|
||||
field.name,
|
||||
]),
|
||||
fileName: file.name,
|
||||
fileType: file.type,
|
||||
fileSize: file.size?.toString(),
|
||||
filePath: response.filePath || response.url,
|
||||
},
|
||||
],
|
||||
});
|
||||
message.success(`${file.name} 上传成功`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
||||
</Upload>
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
))}
|
||||
@ -711,42 +712,40 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
)}
|
||||
|
||||
{index > 0 && (
|
||||
<Form.Item name={[field.name, 'fileUrl']}>
|
||||
<Upload
|
||||
name="file"
|
||||
action="/api/upload"
|
||||
listType="text"
|
||||
<Form.Item name={[field.name, 'fileUrl']} valuePropName="value">
|
||||
<FileUpload
|
||||
maxSize={20}
|
||||
allowedTypes={['*']}
|
||||
maxCount={1}
|
||||
beforeUpload={(file) => validateFileSize(file, 20, ['*'])}
|
||||
onChange={(info) => {
|
||||
if (info.file.status === 'done') {
|
||||
const response = info.file.response;
|
||||
if (response && response.success) {
|
||||
// 填充文件信息
|
||||
const fieldValue = form.getFieldValue([
|
||||
'coscoSupplierSurveyAttachments',
|
||||
field.name,
|
||||
]);
|
||||
form.setFieldsValue({
|
||||
coscoSupplierSurveyAttachments: [
|
||||
{
|
||||
...fieldValue,
|
||||
fileName: info.file.name,
|
||||
fileType: info.file.type,
|
||||
fileSize: info.file.size.toString(),
|
||||
filePath: response.filePath || response.url,
|
||||
},
|
||||
],
|
||||
});
|
||||
message.success(`${info.file.name} 上传成功`);
|
||||
} else {
|
||||
message.error(`${info.file.name} 上传失败`);
|
||||
buttonText="上传"
|
||||
onChange={(fileList) => {
|
||||
if (fileList && fileList.length > 0) {
|
||||
const file = fileList[0];
|
||||
if (file.status === 'done' && file.response) {
|
||||
const response = file.response;
|
||||
if (response && response.success) {
|
||||
// 填充文件信息
|
||||
const fieldValue = form.getFieldValue([
|
||||
'coscoSupplierSurveyAttachments',
|
||||
field.name,
|
||||
]);
|
||||
form.setFieldsValue({
|
||||
coscoSupplierSurveyAttachments: [
|
||||
{
|
||||
...fieldValue,
|
||||
fileName: file.name,
|
||||
fileType: file.type,
|
||||
fileSize: file.size?.toString(),
|
||||
filePath: response.filePath || response.url,
|
||||
},
|
||||
],
|
||||
});
|
||||
message.success(`${file.name} 上传成功`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传</Button>
|
||||
</Upload>
|
||||
/>
|
||||
</Form.Item>
|
||||
)}
|
||||
</div>
|
||||
|
@ -1,12 +1,8 @@
|
||||
/* 境内企业/机构 表单项 */
|
||||
import React from 'react';
|
||||
import { Form, Input, Button, Select, Upload, DatePicker, Row, Col, message } from 'antd';
|
||||
import {
|
||||
MobileOutlined,
|
||||
MailOutlined,
|
||||
EnvironmentOutlined,
|
||||
UploadOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { Form, Input, Button, Select, DatePicker, Row, Col, message } from 'antd';
|
||||
import { MobileOutlined, MailOutlined, EnvironmentOutlined } from '@ant-design/icons';
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
|
||||
/**
|
||||
* 引入通用表单组件
|
||||
@ -18,7 +14,6 @@ import {
|
||||
SurveySection,
|
||||
AttachmentSection,
|
||||
} from './CommonFormSections';
|
||||
import { validateFileSize } from '@/utils/utils';
|
||||
|
||||
const { Option } = Select;
|
||||
const { TextArea } = Input;
|
||||
@ -53,31 +48,26 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
<Form.Item
|
||||
name={['coscoSupplierBase', 'licenceAccessory']}
|
||||
label="营业执照附件"
|
||||
extra="pdf,jpg,jpeg,png类型的文件,大小不超过10MB"
|
||||
// extra="pdf,jpg,jpeg,png类型的文件,大小不超过10MB"
|
||||
rules={[{ required: true, message: '请上传营业执照附件' }]}
|
||||
valuePropName="value"
|
||||
>
|
||||
<Upload
|
||||
name="businessLicense"
|
||||
action="/api/upload"
|
||||
listType="text"
|
||||
<FileUpload
|
||||
maxSize={10}
|
||||
allowedTypes={['pdf', 'jpg', 'jpeg', 'png']}
|
||||
maxCount={1}
|
||||
beforeUpload={(file) => validateFileSize(file, 10, ['pdf', 'jpg', 'jpeg', 'png'])}
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
||||
</Upload>
|
||||
buttonText="上传文件"
|
||||
tip="支持PDF、JPG、PNG格式,不超过10MB"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name={['coscoSupplierBase', 'licenceDate']}
|
||||
label="营业执照有效期"
|
||||
rules={[{ required: false, message: '请选择营业执照有效期' }]}
|
||||
rules={[{ required: true, message: '请选择营业执照有效期' }]}
|
||||
>
|
||||
<DatePicker
|
||||
placeholder="请选择日期"
|
||||
style={{ width: '100%' }}
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
<DatePicker placeholder="请选择日期" style={{ width: '100%' }} format="YYYY-MM-DD" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
@ -91,7 +81,16 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="socialCreditCode"
|
||||
name={['coscoSupplierBase', 'nameEn']}
|
||||
label="企业英文名"
|
||||
rules={[{ required: false, message: '请输入企业英文名' }]}
|
||||
>
|
||||
<Input placeholder="请输入企业英文名" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name={['coscoSupplierBase', 'socialCreditCode']}
|
||||
label="统一社会信用代码"
|
||||
rules={[
|
||||
{ required: true, message: '请输入统一社会信用代码' },
|
||||
@ -101,82 +100,9 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
<Input placeholder="请输入正确的统一社会信用代码" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="legalPerson"
|
||||
label="企业法定代表人"
|
||||
rules={[{ required: true, message: '请输入企业法定代表人/负责人' }]}
|
||||
>
|
||||
<Input placeholder="张三" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="registeredCapital"
|
||||
label="注册资本"
|
||||
rules={[{ required: true, message: '请输入注册资本' }]}
|
||||
>
|
||||
<Input
|
||||
type="number"
|
||||
placeholder="请输入金额"
|
||||
addonBefore="人民币"
|
||||
addonAfter="万元"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="companyType"
|
||||
label="企业性质"
|
||||
rules={[{ required: true, message: '请选择企业性质' }]}
|
||||
>
|
||||
<Select placeholder="请选择企业性质">
|
||||
<Option value="limited">有限责任公司</Option>
|
||||
<Option value="joint">股份有限公司</Option>
|
||||
<Option value="individual">个体工商户</Option>
|
||||
<Option value="other">其他</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="supplierType"
|
||||
label="供应商类型"
|
||||
rules={[{ required: true, message: '请选择供应商类型' }]}
|
||||
>
|
||||
<Select placeholder="请选择类型">
|
||||
<Option value="manufacturer">制造商</Option>
|
||||
<Option value="agent">代理商</Option>
|
||||
<Option value="service">服务商</Option>
|
||||
<Option value="other">其他</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="parentCompanyInfo" label="母公司/出资人">
|
||||
<Input placeholder="请输入母公司或出资人信息" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="registeredAddress"
|
||||
label="注册地址"
|
||||
rules={[{ required: true, message: '请输入注册地址' }]}
|
||||
>
|
||||
<Input prefix={<EnvironmentOutlined />} placeholder="上海市普陀区XX路1888号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="officeAddress" label="办公地址">
|
||||
<Input
|
||||
prefix={<EnvironmentOutlined />}
|
||||
placeholder="请具体注明省、市、区、路、门牌号"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
name="businessScope"
|
||||
name={['coscoSupplierBase', 'range']}
|
||||
label="经营范围"
|
||||
rules={[{ required: true, message: '请输入经营范围' }]}
|
||||
labelCol={{ span: 2 }}
|
||||
@ -191,9 +117,69 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
labelCol={{ span: 2 }}
|
||||
wrapperCol={{ span: 22 }}
|
||||
name={['coscoSupplierBase', 'regAddress']}
|
||||
label="注册地址"
|
||||
rules={[{ required: true, message: '请输入注册地址' }]}
|
||||
>
|
||||
<Input prefix={<EnvironmentOutlined />} placeholder="上海市普陀区XX路1888号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
name={['coscoSupplierBase', 'workAddress']}
|
||||
label="办公地址"
|
||||
labelCol={{ span: 2 }}
|
||||
wrapperCol={{ span: 22 }}
|
||||
>
|
||||
<Input
|
||||
prefix={<EnvironmentOutlined />}
|
||||
placeholder="请具体注明省、市、区、路、门牌号"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
name={['coscoSupplierBase', 'parentCompanyInvestor']}
|
||||
label="母公司/出资人"
|
||||
labelCol={{ span: 2 }}
|
||||
wrapperCol={{ span: 22 }}
|
||||
>
|
||||
<Input placeholder="请输入母公司或出资人信息" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactPerson"
|
||||
name={['coscoSupplierBase', 'legalPerson']}
|
||||
label="企业法定代表人"
|
||||
rules={[{ required: true, message: '请输入企业法定代表人/负责人' }]}
|
||||
>
|
||||
<Input placeholder="张三" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name={['coscoSupplierBase', 'idCard']} label="联系人证件号码">
|
||||
<Input placeholder="请填写联系人正确的身份证号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name={['coscoSupplierBase', 'capital']}
|
||||
label="注册资本"
|
||||
rules={[{ required: true, message: '请输入注册资本' }]}
|
||||
>
|
||||
<Input type="number" placeholder="请输入金额" addonBefore="人民币" addonAfter="万元" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name={['coscoSupplierBase', 'contactsName']}
|
||||
label="联系人姓名"
|
||||
rules={[{ required: true, message: '请输入联系人姓名' }]}
|
||||
>
|
||||
@ -202,7 +188,7 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactPhone"
|
||||
name={['coscoSupplierBase', 'contactsPhone']}
|
||||
label="联系人手机"
|
||||
rules={[
|
||||
{ required: true, message: '请输入联系人手机号' },
|
||||
@ -235,23 +221,10 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
</Row>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="contactIdType" label="联系人身份类别">
|
||||
<Select placeholder="请选择类型">
|
||||
<Option value="idcard">居民身份证</Option>
|
||||
<Option value="passport">护照</Option>
|
||||
<Option value="other">其他证件</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="contactIdNumber" label="联系人证件号码">
|
||||
<Input placeholder="请填写联系人正确的身份证号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactEmail"
|
||||
name={['coscoSupplierBase', 'contactsEmail']}
|
||||
label="联系人邮箱"
|
||||
rules={[
|
||||
{ type: 'email', message: '请输入有效的电子邮箱' },
|
||||
@ -262,7 +235,7 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="telephone" label="固定电话">
|
||||
<Form.Item name={['coscoSupplierBase', 'telephone']} label="固定电话">
|
||||
<Input placeholder="XXX@XXX.com" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
@ -41,7 +41,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
<Row gutter={24}>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="companyName"
|
||||
name={['coscoSupplierBase', 'name']}
|
||||
label="企业名称"
|
||||
rules={[{ required: true, message: '请输入企业名称' }]}
|
||||
>
|
||||
@ -50,7 +50,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="companyEnglishName"
|
||||
name={['coscoSupplierBase', 'nameEn']}
|
||||
label="企业英文名称"
|
||||
rules={[{ required: true, message: '请输入企业英文名称' }]}
|
||||
>
|
||||
@ -59,7 +59,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="companyRegNumber"
|
||||
name={['coscoSupplierBase', 'socialCreditCode']}
|
||||
label="公司注册号"
|
||||
rules={[{ required: true, message: '请输入公司注册号' }]}
|
||||
>
|
||||
@ -123,7 +123,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="registeredAddress"
|
||||
name={['coscoSupplierBase', 'regAddress']}
|
||||
label="注册地址"
|
||||
rules={[{ required: true, message: '请输入注册地址' }]}
|
||||
>
|
||||
@ -131,18 +131,18 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="officeAddress" label="办公地址">
|
||||
<Form.Item name={['coscoSupplierBase', 'workAddress']} label="办公地址">
|
||||
<Input prefix={<EnvironmentOutlined />} placeholder="请具体注明" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="parentCompanyInfo" label="母公司/出资人">
|
||||
<Form.Item name={['coscoSupplierBase', 'parentCompanyInvestor']} label="母公司/出资人">
|
||||
<Input placeholder="请输入母公司或出资人信息" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="legalPerson"
|
||||
name={['coscoSupplierBase', 'legalPerson']}
|
||||
label="企业法定代表人"
|
||||
rules={[{ required: true, message: '请输入企业法定代表人' }]}
|
||||
>
|
||||
@ -151,7 +151,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="companyType"
|
||||
name={['coscoSupplierBase', 'enterpriseType']}
|
||||
label="企业性质"
|
||||
rules={[{ required: true, message: '请选择企业性质' }]}
|
||||
>
|
||||
@ -166,7 +166,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="supplierType"
|
||||
name={['coscoSupplierBase', 'supplierType']}
|
||||
label="供应商类型"
|
||||
rules={[{ required: true, message: '请选择供应商类型' }]}
|
||||
>
|
||||
@ -195,7 +195,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="capitalAmount"
|
||||
name={['coscoSupplierBase', 'capital']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入注册资本金额' }]}
|
||||
>
|
||||
@ -210,7 +210,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
name="businessScope"
|
||||
name={['coscoSupplierBase', 'range']}
|
||||
label="经营范围"
|
||||
labelCol={{ span: 2 }}
|
||||
wrapperCol={{ span: 22 }}
|
||||
@ -221,7 +221,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactName"
|
||||
name={['coscoSupplierBase', 'contactsName']}
|
||||
label="联系人姓名"
|
||||
rules={[{ required: true, message: '请输入联系人姓名' }]}
|
||||
>
|
||||
@ -230,7 +230,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactPhone"
|
||||
name={['coscoSupplierBase', 'contactsPhone']}
|
||||
label="联系人手机"
|
||||
rules={[
|
||||
{ required: true, message: '请输入联系人手机号码' },
|
||||
@ -268,7 +268,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactIdType"
|
||||
name={['coscoSupplierBase', 'contactsType']}
|
||||
label="联系人身份类别"
|
||||
rules={[{ required: true, message: '请选择联系人身份类别' }]}
|
||||
>
|
||||
@ -280,7 +280,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactIdNumber"
|
||||
name={['coscoSupplierBase', 'idCard']}
|
||||
label="联系人证件号码"
|
||||
rules={[{ required: true, message: '请输入联系人证件号码' }]}
|
||||
>
|
||||
@ -289,7 +289,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
name="contactEmail"
|
||||
name={['coscoSupplierBase', 'contactsEmail']}
|
||||
label="联系人邮箱"
|
||||
rules={[
|
||||
{ type: 'email', message: '请输入有效的电子邮箱' },
|
||||
@ -300,7 +300,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="telephone" label="固定电话">
|
||||
<Form.Item name={['coscoSupplierBase', 'telephone']} label="固定电话">
|
||||
<Input placeholder="请输入企业联系电话" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
Reference in New Issue
Block a user