|
@@ -261,7 +261,7 @@ const Contact = props => {
|
|
|
dataId={record.id}
|
|
dataId={record.id}
|
|
|
tagIds={record.tagIds}
|
|
tagIds={record.tagIds}
|
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
|
- tagColumn={TagDataTypeEnum.CONTACT}
|
|
|
|
|
|
|
+ tagColumn={TagDataTypeEnum.CLIENT}
|
|
|
checkCallBack={refreshData}
|
|
checkCallBack={refreshData}
|
|
|
modeType={LabelModeType.column}>
|
|
modeType={LabelModeType.column}>
|
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
@@ -297,7 +297,7 @@ const Contact = props => {
|
|
|
dataId={record.id}
|
|
dataId={record.id}
|
|
|
tagIds={record.tagCooperationIds}
|
|
tagIds={record.tagCooperationIds}
|
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
|
- tagColumn={TagDataTypeEnum.CONTACT}
|
|
|
|
|
|
|
+ tagColumn={TagDataTypeEnum.CLIENT}
|
|
|
checkCallBack={refreshData}
|
|
checkCallBack={refreshData}
|
|
|
modeType={LabelModeType.column}>
|
|
modeType={LabelModeType.column}>
|
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
<Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
|
|
@@ -428,21 +428,21 @@ const Contact = props => {
|
|
|
// initData()
|
|
// initData()
|
|
|
if (!personTags.length) {
|
|
if (!personTags.length) {
|
|
|
dispatch({
|
|
dispatch({
|
|
|
- type: 'contact/fetchTags',
|
|
|
|
|
- payload: { tagType: TagTypeEnum.PERSONTAG, tagColumn: TagDataTypeEnum.CONTACT }
|
|
|
|
|
|
|
+ type: 'client/fetchTags',
|
|
|
|
|
+ payload: { tagType: TagTypeEnum.PERSONTAG, tagColumn: TagDataTypeEnum.CLIENT }
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
if (!teamTags.length) {
|
|
if (!teamTags.length) {
|
|
|
dispatch({
|
|
dispatch({
|
|
|
- type: 'contact/fetchTags',
|
|
|
|
|
- payload: { tagType: TagTypeEnum.TEAMTAG, tagColumn: TagDataTypeEnum.CONTACT }
|
|
|
|
|
|
|
+ type: 'client/fetchTags',
|
|
|
|
|
+ payload: { tagType: TagTypeEnum.TEAMTAG, tagColumn: TagDataTypeEnum.CLIENT }
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
if (shouldUpdate) {
|
|
if (shouldUpdate) {
|
|
|
tRef.current.reload()
|
|
tRef.current.reload()
|
|
|
dispatch({
|
|
dispatch({
|
|
|
- type: 'refresh/contact',
|
|
|
|
|
- payload: 'contact'
|
|
|
|
|
|
|
+ type: 'refresh/commitAction',
|
|
|
|
|
+ payload: 'client '
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}, [shouldUpdate])
|
|
}, [shouldUpdate])
|
|
@@ -452,19 +452,10 @@ const Contact = props => {
|
|
|
setState({ ...state, params: { ...state.params, search: value } })
|
|
setState({ ...state, params: { ...state.params, search: value } })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // const searchOnchange = e => {
|
|
|
|
|
- // const { value = '' } = e.target
|
|
|
|
|
- // tRef.current?.setFieldsValue({ search: value })
|
|
|
|
|
- // tRef.current?.submit()
|
|
|
|
|
- // // initData({ search: value })
|
|
|
|
|
- // }
|
|
|
|
|
- // const { run: handleSearchInputChange } = useDebounceFn(searchOnchange)
|
|
|
|
|
-
|
|
|
|
|
const onDistrictChange = value => {
|
|
const onDistrictChange = value => {
|
|
|
tRef.current.reset()
|
|
tRef.current.reset()
|
|
|
const [province = '', city = '', area = ''] = value
|
|
const [province = '', city = '', area = ''] = value
|
|
|
setState({ ...state, params: { ...state.params, province, city, area } })
|
|
setState({ ...state, params: { ...state.params, province, city, area } })
|
|
|
- // initData({ province, city, area })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 批量设置-确认触发
|
|
// 批量设置-确认触发
|
|
@@ -473,7 +464,7 @@ const Contact = props => {
|
|
|
await apiBatchLink({
|
|
await apiBatchLink({
|
|
|
tagIds: tagState.tagIds,
|
|
tagIds: tagState.tagIds,
|
|
|
dataIds: clientIds,
|
|
dataIds: clientIds,
|
|
|
- dataType: TagDataTypeEnum.CONTACT,
|
|
|
|
|
|
|
+ dataType: TagDataTypeEnum.CLIENT,
|
|
|
tagType: TagTypeEnum.PERSONTAG
|
|
tagType: TagTypeEnum.PERSONTAG
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -481,7 +472,7 @@ const Contact = props => {
|
|
|
await apiBatchLink({
|
|
await apiBatchLink({
|
|
|
tagIds: tagState.tagCooperationIds,
|
|
tagIds: tagState.tagCooperationIds,
|
|
|
dataIds: clientIds,
|
|
dataIds: clientIds,
|
|
|
- dataType: TagDataTypeEnum.CONTACT,
|
|
|
|
|
|
|
+ dataType: TagDataTypeEnum.CLIENT,
|
|
|
tagType: TagTypeEnum.TEAMTAG
|
|
tagType: TagTypeEnum.TEAMTAG
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -494,7 +485,7 @@ const Contact = props => {
|
|
|
<div className="mr-5px">
|
|
<div className="mr-5px">
|
|
|
<PersonLabel
|
|
<PersonLabel
|
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
tagType={TagTypeEnum.PERSONTAG}
|
|
|
- tagColumn={TagDataTypeEnum.CONTACT}
|
|
|
|
|
|
|
+ tagColumn={TagDataTypeEnum.CLIENT}
|
|
|
checkCallBack={toolbarOptionsChange}
|
|
checkCallBack={toolbarOptionsChange}
|
|
|
modeType={LabelModeType.toolbar}>
|
|
modeType={LabelModeType.toolbar}>
|
|
|
{tagState.tagIds.length ? (
|
|
{tagState.tagIds.length ? (
|
|
@@ -519,7 +510,7 @@ const Contact = props => {
|
|
|
<div className="mr-5">
|
|
<div className="mr-5">
|
|
|
<PersonLabel
|
|
<PersonLabel
|
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
tagType={TagTypeEnum.TEAMTAG}
|
|
|
- tagColumn={TagDataTypeEnum.CONTACT}
|
|
|
|
|
|
|
+ tagColumn={TagDataTypeEnum.CLIENT}
|
|
|
checkCallBack={toolbarOptionsChange}
|
|
checkCallBack={toolbarOptionsChange}
|
|
|
modeType={LabelModeType.toolbar}>
|
|
modeType={LabelModeType.toolbar}>
|
|
|
{tagState.tagCooperationIds.length ? (
|
|
{tagState.tagCooperationIds.length ? (
|
|
@@ -605,11 +596,11 @@ const Contact = props => {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export default connect(({ contact, refresh, loading }) => ({
|
|
|
|
|
- personTagColorMap: contact.personTagColorMap,
|
|
|
|
|
- personTags: contact.personTags,
|
|
|
|
|
- teamTagColorMap: contact.teamTagColorMap,
|
|
|
|
|
- teamTags: contact.teamTags,
|
|
|
|
|
- loading: loading.models.contact,
|
|
|
|
|
- shouldUpdate: refresh.contact
|
|
|
|
|
|
|
+export default connect(({ client, refresh, loading }) => ({
|
|
|
|
|
+ personTagColorMap: client.personTagColorMap,
|
|
|
|
|
+ personTags: client.personTags,
|
|
|
|
|
+ teamTagColorMap: client.teamTagColorMap,
|
|
|
|
|
+ teamTags: client.teamTags,
|
|
|
|
|
+ loading: loading.models.client,
|
|
|
|
|
+ shouldUpdate: refresh.client
|
|
|
}))(Contact)
|
|
}))(Contact)
|