|
@@ -57,6 +57,7 @@ const Product = () => {
|
|
|
client: [],
|
|
|
company: [],
|
|
|
business: [],
|
|
|
+ enterprise: [],
|
|
|
...formatPermission('init', result.permission)
|
|
|
}
|
|
|
setState({
|
|
@@ -133,7 +134,8 @@ const Product = () => {
|
|
|
title="确认删除吗?"
|
|
|
okText="确认"
|
|
|
cancelText="取消"
|
|
|
- onConfirm={() => tryDeleteStaff({ id: state.id, staffId: record.staffId })}>
|
|
|
+ onConfirm={() => tryDeleteStaff({ id: state.id, staffId: record.staffId })}
|
|
|
+ >
|
|
|
<div className="pl-2 text-hex-fd3995 cursor-pointer hover:text-hex-e7026e">
|
|
|
<Delete />
|
|
|
</div>
|
|
@@ -161,7 +163,8 @@ const Product = () => {
|
|
|
<Tabs
|
|
|
defaultActiveKey="1"
|
|
|
type="card"
|
|
|
- onChange={key => setState({ ...state, activeKey: key })}>
|
|
|
+ onChange={key => setState({ ...state, activeKey: key })}
|
|
|
+ >
|
|
|
<TabPane tab="员工列表" key="1">
|
|
|
<Table<API.RoleStaffListItem>
|
|
|
dataSource={state.roleStaff}
|
|
@@ -182,7 +185,8 @@ const Product = () => {
|
|
|
id: state.id
|
|
|
})
|
|
|
message.success('设置成功')
|
|
|
- }}>
|
|
|
+ }}
|
|
|
+ >
|
|
|
<ProFormSwitch
|
|
|
fieldProps={{
|
|
|
onChange(checked) {
|
|
@@ -215,6 +219,29 @@ const Product = () => {
|
|
|
/>
|
|
|
)}
|
|
|
</ProFormDependency>
|
|
|
+ <ProFormSwitch
|
|
|
+ fieldProps={{
|
|
|
+ onChange(checked) {
|
|
|
+ if (!checked) {
|
|
|
+ formRef.current?.setFieldsValue({ enterprise: [] })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ name="showEnterprise"
|
|
|
+ label={<span className="flex items-center">企业版</span>}
|
|
|
+ />
|
|
|
+ <ProFormDependency name={['showEnterprise']}>
|
|
|
+ {({ showEnterprise }) => (
|
|
|
+ <ProFormCheckbox.Group
|
|
|
+ wrapperCol={{ offset: 1 }}
|
|
|
+ name="enterprise"
|
|
|
+ options={[
|
|
|
+ { value: 'access', label: '查看', disabled: !showEnterprise },
|
|
|
+ { value: 'add', label: '添加企业', disabled: !showEnterprise }
|
|
|
+ ]}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </ProFormDependency>
|
|
|
</ProForm>
|
|
|
)}
|
|
|
</div>
|
|
@@ -235,7 +262,8 @@ const Product = () => {
|
|
|
}
|
|
|
message.success('设置成功')
|
|
|
return true
|
|
|
- }}>
|
|
|
+ }}
|
|
|
+ >
|
|
|
<FormItem name="access" label="客户模块可见" required>
|
|
|
<Radio.Group>
|
|
|
<Space direction="vertical">
|