|
@@ -7,10 +7,7 @@ import { isEmpty, isNullOrUnDef } from '@/utils/is'
|
|
|
import styles from './index.less'
|
|
import styles from './index.less'
|
|
|
import { useModal } from '@/components/ModalStore'
|
|
import { useModal } from '@/components/ModalStore'
|
|
|
|
|
|
|
|
-const ChangeClient = ({
|
|
|
|
|
- actionPayload,
|
|
|
|
|
- dataSource: { clientName = '', longleId, clientId }
|
|
|
|
|
-} = {}) => {
|
|
|
|
|
|
|
+const ChangeClient = ({ actionPayload, dataSource: { clientName = '', longleId, clientId } } = {}) => {
|
|
|
const dispatchModal = useModal()
|
|
const dispatchModal = useModal()
|
|
|
const dispatch = useDispatch()
|
|
const dispatch = useDispatch()
|
|
|
if (isNullOrUnDef(clientName) || isEmpty(clientName)) return null
|
|
if (isNullOrUnDef(clientName) || isEmpty(clientName)) return null
|
|
@@ -42,17 +39,11 @@ const ChangeClient = ({
|
|
|
<div className="flex justify-between">
|
|
<div className="flex justify-between">
|
|
|
<div
|
|
<div
|
|
|
className={styles.nameContent}
|
|
className={styles.nameContent}
|
|
|
- onClick={() => dispatchModal('D_CLIENT_DETAIL', { dataId: clientId })}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ onClick={() => dispatchModal('D_CLIENT_DETAIL', { dataId: clientId })}>
|
|
|
{clientName}
|
|
{clientName}
|
|
|
</div>
|
|
</div>
|
|
|
<div className="max-w-55px">
|
|
<div className="max-w-55px">
|
|
|
- <Tooltip
|
|
|
|
|
- placement="right"
|
|
|
|
|
- title="更换客户"
|
|
|
|
|
- className="ml-5px"
|
|
|
|
|
- onClick={openConnectClientModal}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Tooltip placement="right" title="更换客户" className="ml-5px" onClick={openConnectClientModal}>
|
|
|
<span className={styles.switchIcon}>
|
|
<span className={styles.switchIcon}>
|
|
|
<Switch />
|
|
<Switch />
|
|
|
</span>
|
|
</span>
|
|
@@ -63,7 +54,7 @@ const ChangeClient = ({
|
|
|
)
|
|
)
|
|
|
return (
|
|
return (
|
|
|
<div className={styles.companyInput}>
|
|
<div className={styles.companyInput}>
|
|
|
- {clientId !== consts.ENCRYPTION_ZERO ? normalValueRender : notValueRender}
|
|
|
|
|
|
|
+ {clientId && clientId !== consts.ENCRYPTION_ZERO ? normalValueRender : notValueRender}
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|