diff --git a/src/components/CommonSelect/AccessStatusSelect.tsx b/src/components/CommonSelect/AccessStatusSelect.tsx index 217e529..1ec9730 100644 --- a/src/components/CommonSelect/AccessStatusSelect.tsx +++ b/src/components/CommonSelect/AccessStatusSelect.tsx @@ -1,21 +1,30 @@ import React, { useEffect, useState } from 'react'; import { Select } from 'antd'; -interface options { - label: string; - value: string; +interface Option { + label: string; + value: string; } -const AdmissionTypeSelect = () => { - const [options, setOptions] = useState([]); +const AdmissionTypeSelect: React.FC = (props) => { + const [options, setOptions] = useState([]); useEffect(() => { setOptions([ - { label: '未准入', value: '0' }, - { label: '已准入', value: '1' }, - { label: '退出', value: '2' }, - ]) + { label: '未准入', value: '0' }, + { label: '已准入', value: '1' }, + { label: '退出', value: '2' }, + ]); }, []); - return + ); }; export default AdmissionTypeSelect; diff --git a/src/components/CommonSelect/AdmissionTypeSelect.tsx b/src/components/CommonSelect/AdmissionTypeSelect.tsx index 2b7278d..e709b20 100644 --- a/src/components/CommonSelect/AdmissionTypeSelect.tsx +++ b/src/components/CommonSelect/AdmissionTypeSelect.tsx @@ -1,21 +1,30 @@ import React, { useEffect, useState } from 'react'; import { Select } from 'antd'; -interface options { - label: string; - value: string; +interface Option { + label: string; + value: string; } -const AdmissionTypeSelect = () => { - const [options, setOptions] = useState([]); +const AdmissionTypeSelect: React.FC = (props) => { + const [options, setOptions] = useState([]); useEffect(() => { setOptions([ - { label: '线上准入', value: 'online' }, - { label: '线下准入', value: 'offline' }, - { label: '零星采购/应急采购/个人供应商', value: 'scattered' }, - ]) + { label: '线上准入', value: 'online' }, + { label: '线下准入', value: 'offline' }, + { label: '零星采购/应急采购/个人供应商', value: 'scattered' }, + ]); }, []); - return + ); }; export default AdmissionTypeSelect; diff --git a/src/components/CommonSelect/ApprovalStatusSelect.tsx b/src/components/CommonSelect/ApprovalStatusSelect.tsx index 15218f2..2051ef9 100644 --- a/src/components/CommonSelect/ApprovalStatusSelect.tsx +++ b/src/components/CommonSelect/ApprovalStatusSelect.tsx @@ -1,23 +1,33 @@ import React, { useEffect, useState } from 'react'; import { Select } from 'antd'; -interface options { - label: string; - value: string; +interface Option { + label: string; + value: string; } -const AdmissionTypeSelect = () => { - const [options, setOptions] = useState([]); +// 1. 传入 props +const AdmissionTypeSelect: React.FC = (props) => { + const [options, setOptions] = useState([]); useEffect(() => { setOptions([ - { label: '未开始', value: '0' }, - { label: '进行中', value: '1' }, - { label: '结果汇总中', value: '2' }, - { label: '已完成', value: '3' }, - ]) + { label: '未开始', value: '0' }, + { label: '进行中', value: '1' }, + { label: '结果汇总中', value: '2' }, + { label: '已完成', value: '3' }, + ]); }, []); - return + ); }; export default AdmissionTypeSelect; diff --git a/src/components/CommonSelect/RegionTypeSelect.tsx b/src/components/CommonSelect/RegionTypeSelect.tsx index 8c128ba..009db73 100644 --- a/src/components/CommonSelect/RegionTypeSelect.tsx +++ b/src/components/CommonSelect/RegionTypeSelect.tsx @@ -1,21 +1,30 @@ +// AdmissionTypeSelect.jsx import React, { useEffect, useState } from 'react'; import { Select } from 'antd'; -interface options { - label: string; - value: string; +interface Option { + label: string; + value: string; } -const AdmissionTypeSelect = () => { - const [options, setOptions] = useState([]); +const AdmissionTypeSelect: React.FC = (props) => { + const [options, setOptions] = useState([]); useEffect(() => { setOptions([ - { label: '境内企业', value: 'dvs' }, - { label: '境外企业', value: 'ovs' }, - { label: '个人', value: 'pe' }, - ]) + { label: '境内企业', value: 'dvs' }, + { label: '境外企业', value: 'ovs' }, + { label: '个人', value: 'pe' }, + ]); }, []); - return + ); }; export default AdmissionTypeSelect; diff --git a/src/components/CompanyInfo/component/AttachmentsFormModal.tsx b/src/components/CompanyInfo/component/AttachmentsFormModal.tsx index 1386bc2..1d8e69a 100644 --- a/src/components/CompanyInfo/component/AttachmentsFormModal.tsx +++ b/src/components/CompanyInfo/component/AttachmentsFormModal.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { Modal, Form, Input, Select, Button, Upload, message, Row, Col, Descriptions } from 'antd'; +import { Modal, Form, Input, Button, Upload, message, Row, Col, Descriptions } from 'antd'; import type { UploadProps } from 'antd'; import { UploadOutlined } from '@ant-design/icons'; import { uploadFile, attachmentskView, attachmentsAdd, attachmentsEdit } from '../services'; diff --git a/src/components/CompanyInfo/component/AttachmentsTab.tsx b/src/components/CompanyInfo/component/AttachmentsTab.tsx index 484ebc1..3e7fee7 100644 --- a/src/components/CompanyInfo/component/AttachmentsTab.tsx +++ b/src/components/CompanyInfo/component/AttachmentsTab.tsx @@ -62,18 +62,6 @@ const OtherAttachmentsTab: React.FC = (props) => { setIsViewMode(false); setFormVisible(true); }; - // 作废 修改 - const handleEdit = (record: attachmentsAdd) => { - setEditingRecord(record); - setIsViewMode(false); - setFormVisible(true); - }; - // 作废 查看 - const handleView = (record: attachmentsAdd) => { - setEditingRecord(record); - setIsViewMode(true); - setFormVisible(true); - }; //是否作废 const handleObsoleteChange = async (checked: boolean, id:string) => { // 调用你的作废接口 @@ -128,20 +116,6 @@ const OtherAttachmentsTab: React.FC = (props) => { }, }, - - // ...(viewType ? [] : [ - // { - // title: 'page.workbench.attachments.action', - // dataIndex: 'option', - // width: 120, - // render: (_: any, record: attachmentsAdd) => ( - // <> - // handleView(record)}>查看 - // handleEdit(record)}>修改 - // - // ), - // }, - // ]), ]; return (
diff --git a/src/components/CompanyInfo/component/ContactsInfoFormModal.tsx b/src/components/CompanyInfo/component/ContactsInfoFormModal.tsx index 67b184e..f40e040 100644 --- a/src/components/CompanyInfo/component/ContactsInfoFormModal.tsx +++ b/src/components/CompanyInfo/component/ContactsInfoFormModal.tsx @@ -1,18 +1,8 @@ import React, { useEffect, useState } from 'react'; import { Modal, Form, Input, message, Row, Col, Descriptions } from 'antd'; -import { getDictList } from '@/servers/api/dicts'; import { coscoSupplierUserView, coscoSupplierUserAdd, coscoSupplierUserEdit } from '../services'; -import { getRegionTree } from '@/servers/api/register'; -import type { DictItem } from '@/servers/api/dicts'; -// 地区字段转换 -function convertToCascaderOptions(data: any[]): any[] { - return data.map(item => ({ - label: item.name, - value: item.id, - children: item.children && item.children.length > 0 ? convertToCascaderOptions(item.children) : undefined, - })); -} + interface props { visible: boolean; onOk: () => void; diff --git a/src/components/CompanyInfo/component/DomesticForm.tsx b/src/components/CompanyInfo/component/DomesticForm.tsx index 74f3840..0c0aae7 100644 --- a/src/components/CompanyInfo/component/DomesticForm.tsx +++ b/src/components/CompanyInfo/component/DomesticForm.tsx @@ -7,7 +7,6 @@ import { uploadFile } from '../services'; import type { UploadFile } from 'antd/es/upload/interface'; import { getDictList } from '@/servers/api/dicts'; import type { DictItem } from '@/servers/api/dicts'; -const { Option } = Select; interface ForeignFormProps { form: any; countdown: number;