防抖
This commit is contained in:
@ -16,6 +16,7 @@ import {
|
||||
Radio,
|
||||
Cascader,
|
||||
Empty,
|
||||
Descriptions
|
||||
} from 'antd';
|
||||
import { UploadOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import { message } from 'antd';
|
||||
@ -257,9 +258,8 @@ export const QualificationSection: React.FC<CommonFormSectionsProps> = ({ form }
|
||||
<FileUpload
|
||||
listType="text"
|
||||
maxCount={1}
|
||||
allowedTypes={['pdf', 'jpg', 'jpeg', 'png']}
|
||||
allowedTypes={['pdf', 'doc', 'docx', 'jpg', 'jpeg', 'png']}
|
||||
maxSize={10}
|
||||
tip="pdf,jpg,jpeg,png类型的文件,大小不超过10MB"
|
||||
/>
|
||||
</Form.Item>
|
||||
),
|
||||
@ -379,9 +379,8 @@ export const InvoiceSection: React.FC<CommonFormSectionsProps> = ({ form }) => {
|
||||
<FileUpload
|
||||
listType="text"
|
||||
maxCount={1}
|
||||
allowedTypes={['pdf', 'jpg', 'jpeg', 'png']}
|
||||
allowedTypes={['pdf', 'doc', 'docx', 'jpg', 'jpeg', 'png']}
|
||||
maxSize={10}
|
||||
tip="pdf,jpg,jpeg,png类型的文件,大小不超过10MB"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
@ -474,40 +473,40 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, su
|
||||
const domesticColumns: ColumnType[] =
|
||||
supplierType === 'dvs'
|
||||
? [
|
||||
{
|
||||
title: '银联号',
|
||||
dataIndex: 'interbankNumber',
|
||||
render: (text, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'interbankNumber']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入银联号' }]}
|
||||
>
|
||||
<Input placeholder="请输入银联号" />
|
||||
</Form.Item>
|
||||
),
|
||||
},
|
||||
]
|
||||
{
|
||||
title: '银联号',
|
||||
dataIndex: 'interbankNumber',
|
||||
render: (text, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'interbankNumber']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入银联号' }]}
|
||||
>
|
||||
<Input placeholder="请输入银联号" />
|
||||
</Form.Item>
|
||||
),
|
||||
},
|
||||
]
|
||||
: [];
|
||||
|
||||
// 境外企业特有列
|
||||
const foreignColumns: ColumnType[] =
|
||||
supplierType === 'ovs'
|
||||
? [
|
||||
{
|
||||
title: 'SWIFT CODE',
|
||||
dataIndex: 'swiftCode',
|
||||
render: (text, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'swiftCode']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入SWIFT CODE' }]}
|
||||
>
|
||||
<Input placeholder="请输入SWIFT CODE" />
|
||||
</Form.Item>
|
||||
),
|
||||
},
|
||||
]
|
||||
{
|
||||
title: 'SWIFT CODE',
|
||||
dataIndex: 'swiftCode',
|
||||
render: (text, record) => (
|
||||
<Form.Item
|
||||
name={[record.name, 'swiftCode']}
|
||||
noStyle
|
||||
rules={[{ required: true, message: '请输入SWIFT CODE' }]}
|
||||
>
|
||||
<Input placeholder="请输入SWIFT CODE" />
|
||||
</Form.Item>
|
||||
),
|
||||
},
|
||||
]
|
||||
: [];
|
||||
|
||||
// 通用列
|
||||
@ -818,19 +817,24 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
return (
|
||||
<>
|
||||
<div className="form-section-title">供应商反商业贿赂承诺书</div>
|
||||
<Row gutter={24}>
|
||||
<Col span={12}>
|
||||
<div className="upload-label">
|
||||
请加盖公司公章后上传
|
||||
<Button
|
||||
type="link"
|
||||
href="/templates/anti-bribery-template.docx"
|
||||
download="供应商反商业贿赂承诺书模板.docx"
|
||||
>
|
||||
下载模版
|
||||
</Button>
|
||||
</div>
|
||||
<Descriptions
|
||||
column={1}
|
||||
bordered
|
||||
size="middle"
|
||||
labelStyle={{ width: 240 }}
|
||||
style={{ background: '#fff' }}
|
||||
>
|
||||
<Descriptions.Item label="请下载模版,按模版填写">
|
||||
<Button
|
||||
type="link"
|
||||
href="/templates/anti-bribery-template.docx"
|
||||
download="供应商反商业贿赂承诺书模板.docx"
|
||||
>
|
||||
下载模版
|
||||
</Button>
|
||||
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="请加盖公司公章后上传">
|
||||
<Form.List name="coscoSupplierSurveyAttachments">
|
||||
{(fields, { add, remove }) => {
|
||||
// 确保至少有一项用于反商业贿赂承诺书
|
||||
@ -863,6 +867,7 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
<Form.Item
|
||||
name={[field.name, 'fileUrl']}
|
||||
rules={[{ required: true, message: '请上传已盖章的反商业贿赂承诺书' }]}
|
||||
style={{marginBottom: 0}}
|
||||
getValueFromEvent={(value) => {
|
||||
if (value && value.length > 0) {
|
||||
const file = value[0];
|
||||
@ -891,7 +896,6 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
maxCount={1}
|
||||
allowedTypes={['pdf', 'doc', 'docx', 'jpg', 'jpeg', 'png']}
|
||||
maxSize={10}
|
||||
tip="pdf,doc,docx,jpg,jpeg,png类型的文件,大小不超过10MB"
|
||||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
@ -900,16 +904,23 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
);
|
||||
}}
|
||||
</Form.List>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
</Descriptions.Item>
|
||||
|
||||
</Descriptions>
|
||||
|
||||
<div className="form-section-title">其他附件</div>
|
||||
<Row gutter={24}>
|
||||
<Col span={24}>
|
||||
<Form.List name="coscoSupplierSurveyAttachments">
|
||||
<Descriptions
|
||||
column={1}
|
||||
bordered
|
||||
size="middle"
|
||||
labelStyle={{ width: 240 }}
|
||||
style={{ background: '#fff' }}
|
||||
>
|
||||
<Descriptions.Item label="其他附件(非必须上传)">
|
||||
<Form.List name="coscoSupplierSurveyAttachments">
|
||||
{(fields, { add, remove }) => (
|
||||
<>
|
||||
<div className="upload-label">其他附件(非必须上传)</div>
|
||||
{fields.map((field, index) => (
|
||||
<div
|
||||
key={field.key}
|
||||
@ -920,22 +931,22 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
>
|
||||
{index > 0 && (
|
||||
<>
|
||||
<Form.Item
|
||||
name={[field.name, 'attachmentsType']}
|
||||
initialValue="accessory"
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name={[field.name, 'fileName']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name={[field.name, 'fileType']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name={[field.name, 'fileSize']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name={[field.name, 'attachmentsType']}
|
||||
initialValue="accessory"
|
||||
hidden
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name={[field.name, 'fileName']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name={[field.name, 'fileType']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name={[field.name, 'fileSize']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
|
||||
@ -987,8 +998,8 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
</>
|
||||
)}
|
||||
</Form.List>
|
||||
</Col>
|
||||
</Row>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
@ -337,7 +337,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
|
||||
|
||||
{/* 使用通用表单组件 */}
|
||||
<QualificationSection form={form} />
|
||||
<InvoiceSection form={form} />
|
||||
{/* <InvoiceSection form={form} /> */}
|
||||
<BankAccountSection form={form} supplierType={'ovs'} />
|
||||
<SurveySection form={form} surveyQuestions={surveyQuestions} />
|
||||
<AttachmentSection form={form} />
|
||||
|
Reference in New Issue
Block a user