|
|
@@ -22,8 +22,7 @@ const AddEnterprise = ({
|
|
|
}
|
|
|
const [state, setState] = useState({
|
|
|
visible: false,
|
|
|
- list: null,
|
|
|
- newValue: ''
|
|
|
+ list: null
|
|
|
})
|
|
|
const dispatch = useDispatch()
|
|
|
useEffect(() => {
|
|
|
@@ -40,11 +39,7 @@ const AddEnterprise = ({
|
|
|
const selectProps = {
|
|
|
mode: 'multiple',
|
|
|
style: { width: '100%' },
|
|
|
- value: state.newValue,
|
|
|
options: compilationv2.map(item => ({ label: item.name, value: item.ID })),
|
|
|
- onChange: newValue => {
|
|
|
- setState({ ...state, newValue })
|
|
|
- },
|
|
|
placeholder: '请选择授权定额',
|
|
|
maxTagCount: 'responsive'
|
|
|
}
|
|
|
@@ -83,7 +78,6 @@ const AddEnterprise = ({
|
|
|
}
|
|
|
return (
|
|
|
<Modal
|
|
|
- {...resetModalProps}
|
|
|
visible={visible}
|
|
|
onCancel={onCancel}
|
|
|
title="创建企业"
|
|
|
@@ -98,10 +92,11 @@ const AddEnterprise = ({
|
|
|
确认
|
|
|
</Button>
|
|
|
</div>
|
|
|
- }>
|
|
|
+ }
|
|
|
+ {...resetModalProps}>
|
|
|
{/* initialValues={{ licenceNum: 1 }} */}
|
|
|
<Form {...layout} form={formRef} initialValues={defaultValues}>
|
|
|
- <ProFormText name="adminID" hidden />
|
|
|
+ {/* <ProFormText name="adminID" hidden /> */}
|
|
|
<Form.Item
|
|
|
name="companyName"
|
|
|
label="创建企业"
|
|
|
@@ -111,6 +106,7 @@ const AddEnterprise = ({
|
|
|
help={validStatus.companyName === validateEnum.Error ? '当前企业名称已存在,请重新输入' : null}>
|
|
|
<SearchCompanyInput
|
|
|
validateFn={status => setValidStatus({ ...validStatus, companyName: status })}
|
|
|
+ adminIDFn={status => setValidStatus({ ...validStatus, adminID: status })}
|
|
|
disabled={disabled}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
@@ -121,11 +117,9 @@ const AddEnterprise = ({
|
|
|
tooltip="企业管理员在前台可设置的企业最大人员数量">
|
|
|
<InputNumber min={1} max={99} />
|
|
|
</Form.Item>
|
|
|
- <Form.Item name="cptList" label="授权定额" rules={[{ required: true }]}>
|
|
|
- <Space direction="vertical" style={{ width: '100%' }}>
|
|
|
- <Select {...selectProps} disabled={disabled} />
|
|
|
- </Space>
|
|
|
- </Form.Item>
|
|
|
+ {/* <Form.Item name="cptList" label="授权定额" rules={[{ required: true }]}>
|
|
|
+ <Select {...selectProps} disabled={disabled} />
|
|
|
+ </Form.Item> */}
|
|
|
{/* <Form.Item
|
|
|
name="adminID"
|
|
|
label="管理员名称"
|