对接单位和部门组件

This commit is contained in:
linxd
2025-07-21 14:17:52 +08:00
parent e9ebd6ac1c
commit 7dacf6a4ae
8 changed files with 59 additions and 189 deletions

View File

@ -10,6 +10,7 @@ import {
} from '@/dicts/supplierTemplateDict';
import { getTemplateList, enableTemplate, disableTemplate } from '@/servers/api/supplierEvaluate';
import CategorySelector from '@/components/CategorySelector/CategorySelector';
import AccessDepartmentSelect from '@/components/AccessDepartmentSelect';
const { Option } = Select;
@ -30,13 +31,6 @@ const SupplierTemplateManage: React.FC = () => {
});
const [searchParams, setSearchParams] = useState({});
// 部门下拉选项
const [companyOptions, setCompanyOptions] = useState<{ label: string; value: string }[]>([
{ label: '中山市合创展包装材料有限公司', value: '中山市合创展包装材料有限公司' },
{ label: '广州市科技发展有限公司', value: '广州市科技发展有限公司' },
{ label: '深圳市创新科技有限公司', value: '深圳市创新科技有限公司' },
{ label: '东莞市制造业有限公司', value: '东莞市制造业有限公司' },
]);
// 获取模板列表
const fetchTemplateList = async (current = 1, pageSize = 10, params = searchParams) => {
@ -322,19 +316,7 @@ const handleDisableTemplate = (id: string) => {
name="tenantName"
label={intl.formatMessage({ id: 'supplierTemplateManage.column.tenantName' })}
>
<Select
placeholder={intl.formatMessage({
id: 'supplierTemplateManage.placeholder.tenantName',
})}
allowClear
style={{ width: 200 }}
>
{companyOptions.map((option) => (
<Option key={option.value} value={option.value}>
{option.label}
</Option>
))}
</Select>
<AccessDepartmentSelect placeholder={'请选择准入单位'} />
</Form.Item>
<Form.Item
name="categoryId"