|
|
@@ -1,6 +1,6 @@
|
|
|
import { useModal } from '@/components/Modal'
|
|
|
import consts from '@/consts'
|
|
|
-import { queryClient } from '@/services/customer'
|
|
|
+import { queryClientWithTelephone } from '@/services/customer'
|
|
|
import { useDebounceFn } from 'ahooks'
|
|
|
import { Input, Alert, Popover } from 'antd'
|
|
|
import ClientDetail from '../ClientDetail'
|
|
|
@@ -20,7 +20,11 @@ const TelephoneFormItem = ({ value, onChange, validateFn }) => {
|
|
|
|
|
|
const queryList = async search => {
|
|
|
if (!search) return
|
|
|
- const { code = -1, data } = await queryClient({ current: 1, pageSize: 20, search })
|
|
|
+ const { code = -1, data } = await queryClientWithTelephone({
|
|
|
+ current: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ search
|
|
|
+ })
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
const { client = [] } = data
|
|
|
setState({ ...state, list: client, visible: !!client?.length })
|
|
|
@@ -66,7 +70,7 @@ const TelephoneFormItem = ({ value, onChange, validateFn }) => {
|
|
|
<Popover
|
|
|
zIndex={1003}
|
|
|
placement="bottom"
|
|
|
- visible={visible && list?.length}
|
|
|
+ visible={list && list?.length && visible}
|
|
|
onVisibleChange={e => setState({ ...state, visible: e })}
|
|
|
title={
|
|
|
<Alert
|