|
@@ -6,7 +6,7 @@ import { SearchOutlined } from '@ant-design/icons'
|
|
|
import { queryStaff, apiChangeSupervisor } from '@/services/staff'
|
|
import { queryStaff, apiChangeSupervisor } from '@/services/staff'
|
|
|
import styles from '@/pages/Customer/Company/components/ConnectCompany/index.less'
|
|
import styles from '@/pages/Customer/Company/components/ConnectCompany/index.less'
|
|
|
|
|
|
|
|
-const StaffModal = ({ visible, onCancel, id, onSelect, postUrl }) => {
|
|
|
|
|
|
|
+const StaffModal = ({ visible, onCancel, id, onSelect, preUrl }) => {
|
|
|
const scrollRef = useRef()
|
|
const scrollRef = useRef()
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
loading: true,
|
|
loading: true,
|
|
@@ -51,7 +51,7 @@ const StaffModal = ({ visible, onCancel, id, onSelect, postUrl }) => {
|
|
|
|
|
|
|
|
// 关联上司
|
|
// 关联上司
|
|
|
const connectStaff = async dataId => {
|
|
const connectStaff = async dataId => {
|
|
|
- const { code = -1 } = await apiChangeSupervisor(postUrl, { id, dataId })
|
|
|
|
|
|
|
+ const { code = -1 } = await apiChangeSupervisor(preUrl, { id, dataId })
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
onSelect()
|
|
onSelect()
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -88,6 +88,7 @@ const StaffModal = ({ visible, onCancel, id, onSelect, postUrl }) => {
|
|
|
onChange={handleInputChange}
|
|
onChange={handleInputChange}
|
|
|
/>
|
|
/>
|
|
|
}
|
|
}
|
|
|
|
|
+ footer={false}
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
|
className={styles.modalContent}
|
|
className={styles.modalContent}
|