Explorar el Código

fix: 协作标签批量操作异常

lanjianrong hace 5 años
padre
commit
944757c466
Se han modificado 2 ficheros con 5 adiciones y 4 borrados
  1. 2 2
      src/pages/Customer/Company/index.jsx
  2. 3 2
      src/pages/Customer/Contact/index.jsx

+ 2 - 2
src/pages/Customer/Company/index.jsx

@@ -338,10 +338,10 @@ const Company = props => {
     }
     }
     if (tagState.tagCooperationIds.length) {
     if (tagState.tagCooperationIds.length) {
       await apiBatchLink({
       await apiBatchLink({
-        tagIds: tagState.tagIds,
+        tagIds: tagState.tagCooperationIds,
         dataIds: clientIds,
         dataIds: clientIds,
         dataType: TagDataTypeEnum.COMPANY,
         dataType: TagDataTypeEnum.COMPANY,
-        tagType: TagTypeEnum.PERSONTAG
+        tagType: TagTypeEnum.TEAMTAG
       })
       })
     }
     }
     refreshData()
     refreshData()

+ 3 - 2
src/pages/Customer/Contact/index.jsx

@@ -66,6 +66,7 @@ const Contact = props => {
   }, [personTags, teamTags, personTagColorMap, teamTagColorMap])
   }, [personTags, teamTags, personTagColorMap, teamTagColorMap])
 
 
   const toolbarOptionsChange = (type, ids) => {
   const toolbarOptionsChange = (type, ids) => {
+    console.log('type', type, 'ids', ids)
     setTagState({ ...tagState, [type]: ids })
     setTagState({ ...tagState, [type]: ids })
   }
   }
 
 
@@ -438,10 +439,10 @@ const Contact = props => {
     }
     }
     if (tagState.tagCooperationIds.length) {
     if (tagState.tagCooperationIds.length) {
       await apiBatchLink({
       await apiBatchLink({
-        tagIds: tagState.tagIds,
+        tagIds: tagState.tagCooperationIds,
         dataIds: clientIds,
         dataIds: clientIds,
         dataType: TagDataTypeEnum.CONTACT,
         dataType: TagDataTypeEnum.CONTACT,
-        tagType: TagTypeEnum.PERSONTAG
+        tagType: TagTypeEnum.TEAMTAG
       })
       })
     }
     }
     refreshData()
     refreshData()