|
@@ -291,6 +291,28 @@
|
|
|
>批量移除标签</el-button>
|
|
>批量移除标签</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ plain
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ @click="handleBatchUpdateNotes"
|
|
|
|
|
+ v-hasPermi="['qw:externalContact:edit']"
|
|
|
|
|
+ >批量修改备注
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ plain
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ @click="handleBatchUpdateNotesFilter"
|
|
|
|
|
+ v-hasPermi="['qw:externalContact:edit']"
|
|
|
|
|
+ >批量修改备注(筛选条件)
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
@@ -587,7 +609,53 @@
|
|
|
<el-button @click="resultDialogVisible = false">关闭</el-button>
|
|
<el-button @click="resultDialogVisible = false">关闭</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
-
|
|
|
|
|
|
|
+ <el-dialog title="批量添加客户备注" :visible.sync="notesOpen.open" width="800px" append-to-body>
|
|
|
|
|
+ <el-card>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col>
|
|
|
|
|
+ <el-radio-group v-model="notesOpen.nameType" style="margin-bottom: 2%">
|
|
|
|
|
+ <el-radio :label="1">
|
|
|
|
|
+ 客户名称添加在【新备注】【前】
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ <el-radio :label="2">
|
|
|
|
|
+ 客户名称添加在【新备注】【后】
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ <el-radio :label="3">
|
|
|
|
|
+ 不添加客户名称
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col>
|
|
|
|
|
+ <el-radio-group v-model="notesOpen.type">
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ :label="1"
|
|
|
|
|
+ >添加【新备注】在最【前】面
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ :label="2"
|
|
|
|
|
+ >添加【新备注】在最【后】面
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ :label="3"
|
|
|
|
|
+ >替换所有备注
|
|
|
|
|
+ </el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col>
|
|
|
|
|
+ <el-input v-model="notesOpen.notes" placeholder="请输入客户备注(最多20个字,含已有的)" clearable size="small"
|
|
|
|
|
+ maxlength="20" show-word-limit style="width: 500px;margin-top: 3%"/>
|
|
|
|
|
+ <div style="color: #999;font-size: 14px;display: flex;align-items: center;">
|
|
|
|
|
+ <i class="el-icon-info"></i>
|
|
|
|
|
+ 由于企业微信官方限制,备注最多20个字,且自动会去除末尾超出的字
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button type="primary" @click="notesSubmitForm()">确 定</el-button>
|
|
|
|
|
+ <el-button @click="notesCancel()">取消</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -605,7 +673,7 @@ import {courseList, myListCourseRedPacketLog, videoList} from '@/api/course/cour
|
|
|
import {myListLogs} from "@/api/course/courseAnswerlogs";
|
|
import {myListLogs} from "@/api/course/courseAnswerlogs";
|
|
|
import {getMyQwUserList} from "@/api/qw/user";
|
|
import {getMyQwUserList} from "@/api/qw/user";
|
|
|
import {searchTags} from "../../../api/qw/tag";
|
|
import {searchTags} from "../../../api/qw/tag";
|
|
|
-import {addTagByWatch, delTagByWatch} from "../../../api/qw/externalContact";
|
|
|
|
|
|
|
+import {addTagByWatch, delTagByWatch,batchUpdateExternalContactNotes,batchUpdateExternalContactNotesByWatchLog} from "../../../api/qw/externalContact";
|
|
|
import {allListTagGroup} from "../../../api/qw/tagGroup";
|
|
import {allListTagGroup} from "../../../api/qw/tagGroup";
|
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
|
import Calendar from 'vue-mobile-calendar'
|
|
import Calendar from 'vue-mobile-calendar'
|
|
@@ -781,7 +849,15 @@ export default {
|
|
|
// 表单参数
|
|
// 表单参数
|
|
|
form: {},
|
|
form: {},
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
- rules: {}
|
|
|
|
|
|
|
+ rules: {},
|
|
|
|
|
+ notesOpen: {
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ nameType: 3,
|
|
|
|
|
+ addType: 0,
|
|
|
|
|
+ filter: false,
|
|
|
|
|
+ open: false,
|
|
|
|
|
+ notes: null,
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -1486,6 +1562,69 @@ export default {
|
|
|
this.queryParams.sopId = null;
|
|
this.queryParams.sopId = null;
|
|
|
this.sopSearchText = '';
|
|
this.sopSearchText = '';
|
|
|
},
|
|
},
|
|
|
|
|
+ handleBatchUpdateNotesFilter() {
|
|
|
|
|
+ this.notesOpen.open = true;
|
|
|
|
|
+ this.notesOpen.filter = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ handleBatchUpdateNotes() {
|
|
|
|
|
+
|
|
|
|
|
+ if (this.ids == null || this.ids == "") {
|
|
|
|
|
+ return this.$message('请选择需要添加备注的客户');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.notesOpen.open = true;
|
|
|
|
|
+ this.notesOpen.filter = false;
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ notesCancel(){
|
|
|
|
|
+ this.notesOpen={
|
|
|
|
|
+ open: false,
|
|
|
|
|
+ notes: null,
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ nameType:3,
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ notesSubmitForm() {
|
|
|
|
|
+
|
|
|
|
|
+ if (this.notesOpen.notes == null || this.notesOpen.notes == "") {
|
|
|
|
|
+ return this.$message.error("请输入备注内容");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // let loadingRock = this.$loading({
|
|
|
|
|
+ // lock: true,
|
|
|
|
|
+ // text: '正在执行中请稍后~~请不要刷新页面!!',
|
|
|
|
|
+ // spinner: 'el-icon-loading',
|
|
|
|
|
+ // background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
+ // });
|
|
|
|
|
+
|
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.queryParams))
|
|
|
|
|
+ console.log(obj);
|
|
|
|
|
+ if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
|
|
|
|
|
+ obj.tagIds = obj.tagIds.split(",");
|
|
|
|
|
+ }
|
|
|
|
|
+ batchUpdateExternalContactNotesByWatchLog({
|
|
|
|
|
+ // addType: 0,
|
|
|
|
|
+ watchLogIds: this.ids,
|
|
|
|
|
+ notes: this.notesOpen.notes,
|
|
|
|
|
+ type: this.notesOpen.type,
|
|
|
|
|
+ nameType: this.notesOpen.nameType,
|
|
|
|
|
+ filter: this.notesOpen.filter,
|
|
|
|
|
+ watchLogParam: obj,
|
|
|
|
|
+ fromMyList:1
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+
|
|
|
|
|
+ this.resultMessage = res.msg;
|
|
|
|
|
+ this.$message.success("正在执行中...");
|
|
|
|
|
+ // this.resultDialogVisible = true; // 显示弹窗
|
|
|
|
|
+ // this.resultTitle = '批量修改备注结果';
|
|
|
|
|
+
|
|
|
|
|
+ }).finally(res => {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ // loadingRock.close();
|
|
|
|
|
+ this.notesCancel();
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|