Преглед изворни кода

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

lanjianrong пре 5 година
родитељ
комит
944757c466
2 измењених фајлова са 5 додато и 4 уклоњено
  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) {
       await apiBatchLink({
-        tagIds: tagState.tagIds,
+        tagIds: tagState.tagCooperationIds,
         dataIds: clientIds,
         dataType: TagDataTypeEnum.COMPANY,
-        tagType: TagTypeEnum.PERSONTAG
+        tagType: TagTypeEnum.TEAMTAG
       })
     }
     refreshData()

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

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