|
|
@@ -5,11 +5,12 @@ import { SearchOutlined, CloseOutlined } from '@ant-design/icons'
|
|
|
import { useDebounceFn } from 'ahooks'
|
|
|
import { useDispatch } from 'dva'
|
|
|
import { apiAddClient, linkBusiWithClient, queryClient } from '@/services/customer'
|
|
|
+import { apiChangeClient } from '@/services/lock'
|
|
|
import consts from '@/basic/consts'
|
|
|
import { formatValues } from '@/components/LazyCascader'
|
|
|
import AddClient from '../AddClient'
|
|
|
|
|
|
-const ConnectClient = ({ dataId, onSelect, preUrl, postUrl }) => {
|
|
|
+const ConnectClient = ({ longleId, dataId, onSelect, preUrl }) => {
|
|
|
const dispatch = useDispatch()
|
|
|
const scrollRef = useRef()
|
|
|
const [state, setState] = useState({
|
|
|
@@ -74,7 +75,8 @@ const ConnectClient = ({ dataId, onSelect, preUrl, postUrl }) => {
|
|
|
|
|
|
// 商机/软件锁关联联系人
|
|
|
const connectClient = async clientId => {
|
|
|
- const { code = -1 } = await linkBusiWithClient(postUrl, { id: dataId, clientId })
|
|
|
+ // const { code = -1 } = await apiChangeClient(preUrl, { id: dataId, clientId })
|
|
|
+ const { code = -1 } = await apiChangeClient(preUrl, { id: longleId, clientId })
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
onSelect()
|
|
|
closeModal()
|