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