safety-eval-service-frontend/src/pages/Container/QualApplication/FilingForm/components/BasicInfoStep.jsx

206 lines
7.4 KiB
React
Raw Normal View History

2026-06-30 17:32:29 +08:00
import { Form, Input, InputNumber, Row, Col, Select } from "antd";
2026-07-01 17:57:42 +08:00
import {
CHONGQING_DISTRICTS,
QUALIFICATION_INDUSTRY_OPTIONS,
} from "~/enumerate/enterpriseOptions";
2026-06-30 17:32:29 +08:00
import { FILING_UNIT_TYPE_OPTIONS } from "~/enumerate/qualFilingOptions";
2026-07-01 17:57:42 +08:00
import AttachmentUpload from "~/components/AttachmentUpload";
2026-06-30 17:32:29 +08:00
2026-07-01 17:57:42 +08:00
export default function BasicInfoStep({ form, disabled }) {
2026-06-30 17:32:29 +08:00
return (
<Form form={form} layout="vertical" disabled={disabled}>
<Row gutter={16}>
<Col span={24}>
2026-07-01 17:57:42 +08:00
<Form.Item
name="businessScope"
label="申请的业务范围"
rules={[{ required: !disabled, message: "请选择业务范围" }]}
>
<Select
options={QUALIFICATION_INDUSTRY_OPTIONS}
placeholder="请选择证照类型"
/>
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
2026-07-01 17:57:42 +08:00
<Form.Item
name="filingTerritoryName"
label="备案属地"
rules={[{ required: !disabled, message: "请选择备案属地" }]}
>
<Select
options={CHONGQING_DISTRICTS}
placeholder="请选择"
showSearch
optionFilterProp="label"
/>
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="filingUnitName" label="备案单位">
2026-07-10 09:52:23 +08:00
<Input placeholder="备案单位" maxLength={64} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="filingUnitTypeName" label="备案单位类型">
<Select options={FILING_UNIT_TYPE_OPTIONS} placeholder="请选择" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="creditCode" label="统一社会信用代码">
2026-07-10 09:52:23 +08:00
<Input placeholder="统一社会信用代码" maxLength={18} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={24}>
<Form.Item name="officeAddress" label="办公地址">
2026-07-10 09:52:23 +08:00
<Input placeholder="办公地址" maxLength={128} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={24}>
<Form.Item name="registerAddress" label="注册地址">
2026-07-10 09:52:23 +08:00
<Input placeholder="注册地址" maxLength={128} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="qualCertNo" label="资质证书编号">
2026-07-10 09:52:23 +08:00
<Input placeholder="资质证书编号" maxLength={32} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
2026-07-10 09:52:23 +08:00
<Form.Item
name="infoDisclosureUrl"
label="信息公开网址"
rules={[
{
pattern: /^https?:\/\/[^\s]+$/,
message: "请输入正确的网址,需以 http:// 或 https:// 开头",
},
]}
>
<Input placeholder="信息公开网址" maxLength={128} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="legalPersonPhone" label="法人代表及电话">
2026-07-10 09:52:23 +08:00
<Input placeholder="姓名 / 电话" maxLength={32} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="contactPhone" label="联系人及电话">
2026-07-10 09:52:23 +08:00
<Input placeholder="姓名 / 电话" maxLength={32} />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
2026-07-03 17:55:26 +08:00
<Form.Item
name="fixedAssetAmount"
label="固定资产总值(万元)"
2026-07-10 09:52:23 +08:00
rules={[
{ required: !disabled, message: "请输入固定资产总值" },
{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位整数" },
{
validator: (_, value) =>
value === undefined || value === null || value === ""
? Promise.resolve()
: /^\d{1,9}(\.\d{1,2})?$/.test(String(value))
? Promise.resolve()
: Promise.reject(new Error("整数最多9位小数最多2位")),
},
]}
2026-07-03 17:55:26 +08:00
>
2026-07-10 09:52:23 +08:00
<InputNumber
style={{ width: "100%" }}
min={0}
max={100000000}
precision={2}
placeholder="万元"
/>
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
2026-07-07 15:45:52 +08:00
<Form.Item
name="workplaceArea"
label="工作场所建筑面积(㎡)"
2026-07-10 09:52:23 +08:00
rules={[
{ required: !disabled, message: "请输入工作场所建筑面积" },
{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位整数" },
{
validator: (_, value) =>
value === undefined || value === null || value === ""
? Promise.resolve()
: /^\d{1,9}(\.\d{1,2})?$/.test(String(value))
? Promise.resolve()
: Promise.reject(new Error("整数最多9位小数最多2位")),
},
]}
2026-07-07 15:45:52 +08:00
>
2026-07-10 09:52:23 +08:00
<InputNumber
style={{ width: "100%" }}
min={0}
max={100000000}
precision={2}
placeholder="㎡"
/>
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
2026-07-10 09:52:23 +08:00
<Form.Item
name="archiveRoomArea"
label="档案室面积(㎡)"
rules={[
{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位整数" },
{
validator: (_, value) =>
value === undefined || value === null || value === ""
? Promise.resolve()
: /^\d{1,9}(\.\d{1,2})?$/.test(String(value))
? Promise.resolve()
: Promise.reject(new Error("整数最多9位小数最多2位")),
},
]}
>
<InputNumber
style={{ width: "100%" }}
min={0}
max={100000000}
precision={2}
placeholder="㎡"
/>
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
2026-07-01 17:57:42 +08:00
<Form.Item
name="fulltimeEvaluatorCount"
label="专职安全评价师数量(人)"
2026-07-10 09:52:23 +08:00
rules={[{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位" }]}
2026-07-01 17:57:42 +08:00
>
2026-07-10 09:52:23 +08:00
<InputNumber style={{ width: "100%" }} min={0} max={100000000} maxLength={9} placeholder="人" />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={12}>
2026-07-01 17:57:42 +08:00
<Form.Item
name="registeredEngineerCount"
label="注册安全工程师数量(人)"
2026-07-10 09:52:23 +08:00
rules={[{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位" }]}
2026-07-01 17:57:42 +08:00
>
2026-07-10 09:52:23 +08:00
<InputNumber style={{ width: "100%" }} min={0} max={100000000} maxLength={9} placeholder="人" />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={24}>
<Form.Item name="unitIntro" label="单位基本情况介绍">
2026-07-10 09:52:23 +08:00
<Input.TextArea rows={3} placeholder="请输入单位基本情况介绍" maxLength={500} showCount />
2026-06-30 17:32:29 +08:00
</Form.Item>
</Col>
<Col span={24}>
2026-07-03 17:55:26 +08:00
<AttachmentUpload
name="attachmentUrl"
label="上传附件"
disabled={disabled}
2026-07-09 18:35:05 +08:00
maxCount={12}
accept=".pdf,.doc,.docx"
2026-07-03 17:55:26 +08:00
/>
2026-06-30 17:32:29 +08:00
</Col>
</Row>
</Form>
);
}