Commit 09d30b28 authored by 李腾's avatar 李腾

fix: 新增账户控制非pop商家不展示门店信息

parent b80d0182
...@@ -9,7 +9,7 @@ import UUID from '@/utils/uuid'; ...@@ -9,7 +9,7 @@ import UUID from '@/utils/uuid';
import style from './index.less'; import style from './index.less';
const AddUser = props => { const AccountInfo = props => {
const { getFieldDecorator, validateFields, getFieldValue, setFieldsValue } = props.form; const { getFieldDecorator, validateFields, getFieldValue, setFieldsValue } = props.form;
const { id } = props.location.query; const { id } = props.location.query;
const [title, setTitle] = useState('新增用户'); const [title, setTitle] = useState('新增用户');
...@@ -24,6 +24,9 @@ const AddUser = props => { ...@@ -24,6 +24,9 @@ const AddUser = props => {
const rolePermissionsModalRef = useRef(); const rolePermissionsModalRef = useRef();
const popReg = /^pop_/g;
const isPop = popReg.test(userInfo.supplierCode);
// 表单布局 // 表单布局
const formLayout = { const formLayout = {
labelCol: { span: 4 }, labelCol: { span: 4 },
...@@ -262,7 +265,7 @@ const AddUser = props => { ...@@ -262,7 +265,7 @@ const AddUser = props => {
)} )}
<Form.Item label="选择门店" extra="仅限POP商家设置"> <Form.Item label="选择门店" extra="仅限POP商家设置">
{getFieldDecorator('organizationId', rulesHandler('organizationId'))( {getFieldDecorator('organizationId', rulesHandler('organizationId'))(
supplierList.length ? ( isPop && supplierList.length ? (
<Radio.Group disabled={!!id} style={{ width: '100%' }}> <Radio.Group disabled={!!id} style={{ width: '100%' }}>
{selectSupplierCheckbox()} {selectSupplierCheckbox()}
</Radio.Group> </Radio.Group>
...@@ -297,4 +300,4 @@ const AddUser = props => { ...@@ -297,4 +300,4 @@ const AddUser = props => {
); );
}; };
export default Form.create({})(AddUser); export default Form.create({})(AccountInfo);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment