xw il y a 1 semaine
Parent
commit
932a8b443a

+ 11 - 21
src/views/qw/externalContact/index.vue

@@ -743,7 +743,7 @@
     <el-dialog title="批量移除标签" :visible.sync="tagDelOpen" width="800px" append-to-body>
       <div>搜索标签:
         <el-input v-model="queryTagParams.name" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(queryTagParams.name)">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="getPageListTagGroup()">搜索</el-button>
         <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
       </div>
       <el-form ref="form" :model="addTagForm"  label-width="80px">
@@ -1564,28 +1564,15 @@ export default {
       if(this.ids==null||this.ids==""){
         return  this.$message('请选择需要移除标签的客户');
       }
+      this.getPageListTagGroup();
 
-      // 重置查询参数
-      this.queryTagParams.name = null;
-      this.queryTagParams.pageNum = 1;
-      this.queryTagParams.corpId = this.queryParams.corpId;
-      
-      // 使用 searchTags 接口获取包含具体标签的数据
-      searchTags(this.queryTagParams).then(response => {
-        this.tagGroupList = response.rows;
-        this.tagTotal = response.total;
-
-        // 数据加载完成后再初始化选中状态
-        setTimeout(() => {
-          for (let i = 0; i < this.tagGroupList.length; i++) {
-            if (this.tagGroupList[i].tag) {
-              for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
-                this.tagGroupList[i].tag[x].isSelected = false;
-              }
-            }
+      setTimeout(() => {
+        for (let i = 0; i < this.tagGroupList.length; i++) {
+          for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
+            this.tagGroupList[i].tag[x].isSelected=false;
           }
-        }, 100);
-      });
+        }
+      }, 200);
 
       this.tagDelOpen = true;
 
@@ -2349,6 +2336,9 @@ export default {
       if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
         obj.tagIds = obj.tagIds.split(",");
       }
+      if(obj.outTagIds !== null && obj.outTagIds !== undefined && obj.outTagIds !== ''){
+        obj.outTagIds = obj.outTagIds.split(",");
+      }
       batchUpdateExternalContactNotes({
         addType: 0,
         userIds: this.ids,

+ 20 - 38
src/views/qw/externalContact/myExternalContact.vue

@@ -1761,26 +1761,16 @@ export default {
         return  this.$message('请选择需要添加标签的客户');
       }
 
-      // 重置查询参数
-      this.queryTagParams.name = null;
-      this.queryTagParams.pageNum = 1;
-      
-      this.queryTagParams.corpId = this.queryParams.corpId;
-      allListTagGroup(this.queryTagParams).then(response => {
-        this.tagGroupList = response.rows;
-        this.tagTotal = response.total;
-        
-        // 数据加载完成后,初始化选中状态
-        setTimeout(() => {
-          for (let i = 0; i < this.tagGroupList.length; i++) {
-            if (this.tagGroupList[i].tag) {
-              for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
-                this.tagGroupList[i].tag[x].isSelected = false;
-              }
-            }
+      this.getPageListTagGroup();
+
+      setTimeout(() => {
+
+        for (let i = 0; i < this.tagGroupList.length; i++) {
+          for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
+            this.tagGroupList[i].tag[x].isSelected=false;
           }
-        }, 100);
-      });
+        }
+      }, 200);
 
       this.tagOpen = true;
 
@@ -1792,26 +1782,15 @@ export default {
         return  this.$message('请选择需要移除标签的客户');
       }
 
-      // 重置查询参数
-      this.queryTagParams.name = null;
-      this.queryTagParams.pageNum = 1;
-      
-      this.queryTagParams.corpId = this.queryParams.corpId;
-      allListTagGroup(this.queryTagParams).then(response => {
-        this.tagGroupList = response.rows;
-        this.tagTotal = response.total;
-        
-        // 数据加载完成后,初始化选中状态
-        setTimeout(() => {
-          for (let i = 0; i < this.tagGroupList.length; i++) {
-            if (this.tagGroupList[i].tag) {
-              for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
-                this.tagGroupList[i].tag[x].isSelected = false;
-              }
-            }
+      this.getPageListTagGroup();
+
+      setTimeout(() => {
+        for (let i = 0; i < this.tagGroupList.length; i++) {
+          for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
+            this.tagGroupList[i].tag[x].isSelected=false;
           }
-        }, 100);
-      });
+        }
+      }, 200);
 
       this.tagDelOpen = true;
 
@@ -2424,6 +2403,9 @@ export default {
       if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
         obj.tagIds = obj.tagIds.split(",");
       }
+      if(obj.outTagIds !== null && obj.outTagIds !== undefined && obj.outTagIds !== ''){
+        obj.outTagIds = obj.outTagIds.split(",");
+      }
       batchUpdateExternalContactNotes({
         addType: 0,
         userIds: this.ids,