feat
parent
4f4fbd0462
commit
a5b3a2ae18
|
|
@ -1,3 +1,4 @@
|
|||
import { useMemo } from "react";
|
||||
import { Form, Input, InputNumber, Row, Col, Select, Checkbox } from "antd";
|
||||
import {
|
||||
CHONGQING_DISTRICTS,
|
||||
|
|
@ -7,6 +8,16 @@ import { FILING_UNIT_TYPE_OPTIONS } from "~/enumerate/qualFilingOptions";
|
|||
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||
|
||||
export default function BasicInfoStep({ form, disabled, mode }) {
|
||||
const industryOptions = useMemo(() => {
|
||||
const orgInfo = JSON.parse(sessionStorage.getItem("orgInfo") || "{}");
|
||||
const codes = orgInfo?.safetyIndustryCategoryCode;
|
||||
if (Array.isArray(codes) && codes.length > 0) {
|
||||
return QUALIFICATION_INDUSTRY_OPTIONS.filter((item) =>
|
||||
codes.includes(item.value),
|
||||
);
|
||||
}
|
||||
return QUALIFICATION_INDUSTRY_OPTIONS;
|
||||
}, []);
|
||||
return (
|
||||
<Form form={form} layout="vertical" disabled={disabled}>
|
||||
<Row gutter={16}>
|
||||
|
|
@ -17,7 +28,7 @@ export default function BasicInfoStep({ form, disabled, mode }) {
|
|||
rules={[{ required: !disabled, message: "请选择业务范围" }]}
|
||||
>
|
||||
<Checkbox.Group
|
||||
options={QUALIFICATION_INDUSTRY_OPTIONS}
|
||||
options={industryOptions}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
|
@ -76,7 +87,7 @@ export default function BasicInfoStep({ form, disabled, mode }) {
|
|||
</Form.Item>
|
||||
</Col>
|
||||
{mode!=='application' &&<Col span={12}>
|
||||
<Form.Item name="qualCertNo" label="资质证书编号" rules={[{ required: !disabled, message: "请输入资质证书编号" }]}>
|
||||
<Form.Item name="filingNo" label="资质证书编号" rules={[{ required: !disabled, message: "请输入资质证书编号" }]}>
|
||||
<Input placeholder="资质证书编号" maxLength={32} />
|
||||
</Form.Item>
|
||||
</Col>}
|
||||
|
|
|
|||
Loading…
Reference in New Issue