邀请修改
This commit is contained in:
parent
47a438a5b6
commit
793b4cbb16
|
|
@ -12,7 +12,6 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
changeInvitingPersonnelModal: () => {
|
changeInvitingPersonnelModal: () => {
|
||||||
setCheckedList([])
|
setCheckedList([])
|
||||||
setUser(userInfo)
|
|
||||||
getUserList()
|
getUserList()
|
||||||
setIsInvitingPersonnelModal(true)
|
setIsInvitingPersonnelModal(true)
|
||||||
}
|
}
|
||||||
|
|
@ -20,7 +19,6 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
||||||
const { state } = useLocation();
|
const { state } = useLocation();
|
||||||
const [isInvitingPersonnelModal, setIsInvitingPersonnelModal] = useState(false);
|
const [isInvitingPersonnelModal, setIsInvitingPersonnelModal] = useState(false);
|
||||||
const [isFirstRender, setIsFirstRender] = useState(true);
|
const [isFirstRender, setIsFirstRender] = useState(true);
|
||||||
const [user, setUser] = useState<any>({});
|
|
||||||
const [optionsValue, setOperationValue] = useState<number>(1);
|
const [optionsValue, setOperationValue] = useState<number>(1);
|
||||||
const [list, setList] = useState<any>({
|
const [list, setList] = useState<any>({
|
||||||
data: [],
|
data: [],
|
||||||
|
|
@ -149,7 +147,7 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
||||||
return checkedList
|
return checkedList
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}} disabled={!item.isOnline || item.account === user.account || item.disabled} checked={item.checked}></Checkbox>
|
}} disabled={!item.isOnline || item.account === userInfo.account || item.disabled} checked={item.checked}></Checkbox>
|
||||||
<div><Avatar name={item.userName} /></div>
|
<div><Avatar name={item.userName} /></div>
|
||||||
<span>{item.userName}{item.disabled ? '(已入会)' : ''}</span>
|
<span>{item.userName}{item.disabled ? '(已入会)' : ''}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -177,7 +175,7 @@ const InvitingPersonnelModal = forwardRef((props: any, ref: any) => {
|
||||||
<Button type="primary" onClick={() => { setIsInvitingPersonnelModal(false) }} style={{ backgroundColor: '#31353A', marginRight: '14px' }}>取消</Button>
|
<Button type="primary" onClick={() => { setIsInvitingPersonnelModal(false) }} style={{ backgroundColor: '#31353A', marginRight: '14px' }}>取消</Button>
|
||||||
<Button type="primary" className='m-ant-btn' onClick={() => {
|
<Button type="primary" className='m-ant-btn' onClick={() => {
|
||||||
if (checkedList.length) {
|
if (checkedList.length) {
|
||||||
let me = checkedList.find((item: any) => item.id === user.uid)
|
let me = checkedList.find((item: any) => item.id === userInfo.uid)
|
||||||
if (me) {
|
if (me) {
|
||||||
message.error('您不能邀请自己')
|
message.error('您不能邀请自己')
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue