Parcourir la source

侧边栏语音分组/催课看板显示课节/修改客户等级

三七 il y a 12 heures
Parent
commit
caa95e20dd

+ 53 - 0
src/api/qw/QwSopTempVoiceGroup.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询语音分类-主要是区分侧边栏语音类型列表
+export function listQwSopTempVoiceGroup(query) {
+  return request({
+    url: '/qw/QwSopTempVoiceGroup/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询语音分类-主要是区分侧边栏语音类型详细
+export function getQwSopTempVoiceGroup(id) {
+  return request({
+    url: '/qw/QwSopTempVoiceGroup/' + id,
+    method: 'get'
+  })
+}
+
+// 新增语音分类-主要是区分侧边栏语音类型
+export function addQwSopTempVoiceGroup(data) {
+  return request({
+    url: '/qw/QwSopTempVoiceGroup',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改语音分类-主要是区分侧边栏语音类型
+export function updateQwSopTempVoiceGroup(data) {
+  return request({
+    url: '/qw/QwSopTempVoiceGroup',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除语音分类-主要是区分侧边栏语音类型
+export function delQwSopTempVoiceGroup(id) {
+  return request({
+    url: '/qw/QwSopTempVoiceGroup/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出语音分类-主要是区分侧边栏语音类型
+export function exportQwSopTempVoiceGroup(query) {
+  return request({
+    url: '/qw/QwSopTempVoiceGroup/export',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 0
src/api/qw/externalContact.js

@@ -194,6 +194,15 @@ export function updateExternalContactStatus(query) {
     params: query
   })
 }
+
+export function extChangeLevel(data) {
+    return request({
+        url: '/qw/externalContact/changeLevel',
+        method: 'post',
+        data: data
+    })
+}
+
 // 修改企业微信客户
 export function editStatus(data) {
   return request({

+ 262 - 0
src/views/qw/QwSopTempVoiceGroup/index.vue

@@ -0,0 +1,262 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="${comment}" prop="voiceGroupName">
+        <el-select v-model="queryParams.voiceGroupName" placeholder="请选择${comment}" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['QwSopTempVoiceGroup:QwSopTempVoiceGroup:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['QwSopTempVoiceGroup:QwSopTempVoiceGroup:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['QwSopTempVoiceGroup:QwSopTempVoiceGroup:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['QwSopTempVoiceGroup:QwSopTempVoiceGroup:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="QwSopTempVoiceGroupList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="${comment}" align="center" prop="id" />
+      <el-table-column label="${comment}" align="center" prop="voiceGroupName" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['QwSopTempVoiceGroup:QwSopTempVoiceGroup:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['QwSopTempVoiceGroup:QwSopTempVoiceGroup:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改语音分类-主要是区分侧边栏语音类型对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="${comment}" prop="voiceGroupName">
+          <el-select v-model="form.voiceGroupName" placeholder="请选择${comment}">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listQwSopTempVoiceGroup, getQwSopTempVoiceGroup, delQwSopTempVoiceGroup, addQwSopTempVoiceGroup, updateQwSopTempVoiceGroup, exportQwSopTempVoiceGroup } from "@/api/qw/QwSopTempVoiceGroup";
+
+export default {
+  name: "QwSopTempVoiceGroup",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 语音分类-主要是区分侧边栏语音类型表格数据
+      QwSopTempVoiceGroupList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        voiceGroupName: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询语音分类-主要是区分侧边栏语音类型列表 */
+    getList() {
+      this.loading = true;
+      listQwSopTempVoiceGroup(this.queryParams).then(response => {
+        this.QwSopTempVoiceGroupList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        voiceGroupName: null,
+        createTime: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加语音分类-主要是区分侧边栏语音类型";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getQwSopTempVoiceGroup(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改语音分类-主要是区分侧边栏语音类型";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateQwSopTempVoiceGroup(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addQwSopTempVoiceGroup(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除语音分类-主要是区分侧边栏语音类型编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delQwSopTempVoiceGroup(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有语音分类-主要是区分侧边栏语音类型数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportQwSopTempVoiceGroup(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 1 - 1
src/views/qw/QwWorkTaskNew/deptWorkTask.vue

@@ -80,7 +80,6 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="客户昵称" align="center" prop="name" />
       <el-table-column label="企微账号" align="center" prop="qwUserName" />
-	  <el-table-column label="企微昵称" align="center" prop="nickName" />
       <el-table-column label="状态" align="center" prop="status">
 		 <template slot-scope="scope">
 		   <dict-tag :options="statusOptions" :value="scope.row.status"/>
@@ -97,6 +96,7 @@
 	    </template>
 	  </el-table-column>
       <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="具体课节" align="center" prop="videoName" />
       <el-table-column label="描述" align="center" prop="description" />
       <el-table-column label="分值" align="center" prop="score">
         <template slot-scope="scope">

+ 1 - 0
src/views/qw/QwWorkTaskNew/index.vue

@@ -86,6 +86,7 @@
 	    </template>
 	  </el-table-column>
       <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="具体课节" align="center" prop="videoName" />
       <el-table-column label="描述" align="center" prop="description" />
       <el-table-column label="分值" align="center" prop="score">
         <template slot-scope="scope">

+ 1 - 1
src/views/qw/QwWorkTaskNew/qwWorkTask.vue

@@ -80,7 +80,6 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="客户昵称" align="center" prop="name" />
       <el-table-column label="企微账号" align="center" prop="qwUserName" />
-	  <el-table-column label="企微昵称" align="center" prop="nickName" />
       <el-table-column label="状态" align="center" prop="status">
 		 <template slot-scope="scope">
 		   <dict-tag :options="statusOptions" :value="scope.row.status"/>
@@ -97,6 +96,7 @@
 	    </template>
 	  </el-table-column>
       <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="具体课节" align="center" prop="videoName" />
       <el-table-column label="描述" align="center" prop="description" />
       <el-table-column label="分值" align="center" prop="score">
         <template slot-scope="scope">

+ 95 - 1
src/views/qw/externalContact/deptIndex.vue

@@ -307,6 +307,28 @@
           v-hasPermi="['qw:externalContactInfo:deptUpdateTalk']"
         >批量更改交流状态</el-button>
       </el-col>
+
+        <el-col :span="1.5">
+            <el-button
+                type="warning"
+                plain
+                icon="el-icon-edit"
+                size="mini"
+                @click="handleBatchUpdateLevel"
+                v-hasPermi="['qw:externalContact:changeLevel']"
+            >批量修改客户等级
+            </el-button>
+        </el-col>
+        <el-col :span="1.5">
+            <el-button
+                type="warning"
+                plain
+                icon="el-icon-edit"
+                size="mini"
+                @click="handleBatchUpdateLevelFilter"
+                v-hasPermi="['qw:externalContact:changeLevel']"
+            >批量修改客户等级(筛选条件)
+            </el-button>
       <!--       <el-col :span="1.5">-->
       <!--        <el-button-->
       <!--          type="primary"-->
@@ -898,6 +920,22 @@
         <el-tag v-for="item in repeat.list">{{item.qwUserName}}</el-tag>
       </el-row>
     </el-dialog>
+    <el-dialog :title="ratingOpen.title" :visible.sync="ratingOpen.open" width="600px" append-to-body>
+          <div style="padding: 20px 0;">
+              <el-select v-model="ratingOpen.level" placeholder="客户等级" clearable size="small">
+                  <el-option
+                      v-for="dict in ratingType"
+                      :key="dict.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                  />
+              </el-select>
+          </div>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="ratingSubmitForm()">确 定</el-button>
+              <el-button @click="ratingCancel">取 消</el-button>
+          </div>
+    </el-dialog>
 
     <!-- 重粉记录 -->
     <el-drawer title="重粉记录" :visible.sync="repeatRecord.open" size="75%" append-to-body>
@@ -1020,7 +1058,13 @@ export default {
   components:{PaginationMore, mycustomer,customerDetails,SopDialog,selectUser,info,healthRecordDetails,userDetails,customerDetail,createOder},
   data() {
     return {
-
+     ratingOpen:{
+        open:false,
+        title:'',
+        level:null,
+        userIds:null,
+        filter:false,
+      },
       resultDialogVisible: false,
       resultMessage: '',
       resultTitle:'',
@@ -1308,6 +1352,56 @@ export default {
 
   },
   methods: {
+
+    handleBatchUpdateLevel(){
+
+      if (this.ids == null || this.ids == "") {
+          return this.$message('请选择需要添加备注的客户');
+      }
+
+      this.ratingOpen.open=true;
+      this.ratingOpen.title='批量修改客户等级'
+      this.ratingOpen.filter=false;
+    },
+
+    handleBatchUpdateLevelFilter(){
+      this.ratingOpen.open=true;
+      this.ratingOpen.title='批量修改客户等级'
+      this.ratingOpen.filter=true;
+    },
+
+    ratingSubmitForm(){
+
+          if (!this.ratingOpen.level){
+              return this.$message.error('请选择要修改的等级');
+          }
+
+          this.ratingOpen.userIds = this.ids;
+
+          let obj = JSON.parse(JSON.stringify(this.queryParams))
+          if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
+              obj.tagIds = obj.tagIds.split(",");
+          }
+          this.ratingOpen.param = obj;
+
+          extChangeLevel(this.ratingOpen).then(response => {
+              this.msgSuccess("修改完成");
+              this.getList();
+          }).finally(() => {
+              this.ratingCancel();
+          });
+
+        },
+
+
+    ratingCancel(){
+          this.ratingOpen={
+              open: false,
+              title: '',
+              level: null,
+              userIds: null
+          }
+        },
     loadExternalContactFuncDict() {
       this.getDicts("sys_qw_external_contact_func").then(response => {
         const list = response.data || [];

+ 117 - 17
src/views/qw/externalContact/index.vue

@@ -355,6 +355,28 @@
         v-hasPermi="['qw:externalContactInfo:updateTalk']"
 	    >批量更改交流状态</el-button>
 	  </el-col>
+        <el-col :span="1.5">
+            <el-button
+                type="warning"
+                plain
+                icon="el-icon-edit"
+                size="mini"
+                @click="handleBatchUpdateLevel"
+                v-hasPermi="['qw:externalContact:changeLevel']"
+            >批量修改客户等级
+            </el-button>
+        </el-col>
+        <el-col :span="1.5">
+            <el-button
+                type="warning"
+                plain
+                icon="el-icon-edit"
+                size="mini"
+                @click="handleBatchUpdateLevelFilter"
+                v-hasPermi="['qw:externalContact:changeLevel']"
+            >批量修改客户等级(筛选条件)
+            </el-button>
+        </el-col>
 <!--       <el-col :span="1.5">-->
 <!--        <el-button-->
 <!--          type="primary"-->
@@ -1108,27 +1130,49 @@
       <el-button type="primary" @click="submitStatusForm">提 交</el-button>
     </div>
   </el-dialog>
+
+        <el-dialog :title="ratingOpen.title" :visible.sync="ratingOpen.open" width="600px" append-to-body>
+          <div style="padding: 20px 0;">
+              <el-select v-model="ratingOpen.level" placeholder="客户等级" clearable size="small">
+                  <el-option
+                      v-for="dict in ratingType"
+                      :key="dict.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                  />
+              </el-select>
+          </div>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="ratingSubmitForm()">确 定</el-button>
+              <el-button @click="ratingCancel">取 消</el-button>
+          </div>
+        </el-dialog>
   </div>
 </template>
 
 <script>
 import {
-  bindUserId,
-  addTag,
-  delTag,
-  batchUpdateExternalContactNotes,
-  listExternalContact,
-  getExternalContact,
-  delExternalContact,
-  addExternalContact,
-  updateExternalContact,
-  updateRemarkMobiles,
-  exportExternalContact,
-  editbindCustomer,
-  setCustomerCourseSop,
-  getCustomerCourseSop,
-  setCustomerCourseSopList,
-  unBindUserId, updateExternalContactCall,updateExternalContactStatus,getWatchLogList,getRepeatRecordList
+    bindUserId,
+    addTag,
+    delTag,
+    batchUpdateExternalContactNotes,
+    listExternalContact,
+    getExternalContact,
+    delExternalContact,
+    addExternalContact,
+    updateExternalContact,
+    updateRemarkMobiles,
+    exportExternalContact,
+    editbindCustomer,
+    setCustomerCourseSop,
+    getCustomerCourseSop,
+    setCustomerCourseSopList,
+    unBindUserId,
+    updateExternalContactCall,
+    updateExternalContactStatus,
+    getWatchLogList,
+    getRepeatRecordList,
+    extChangeLevel
 } from '@/api/qw/externalContact'
 import {getMyQwUserList, getMyQwCompanyList, updateUser,getQwUserListLikeName} from "@/api/qw/user";
 import {listTag, getTag, searchTags} from "@/api/qw/tag";
@@ -1407,6 +1451,13 @@ export default {
         corpId: null,
         customerRow: null,
       },
+        ratingOpen:{
+            open:false,
+            title:'',
+            level:null,
+            userIds:null,
+            filter:false,
+        },
     };
   },
   created() {
@@ -1460,7 +1511,56 @@ export default {
 
   },
   methods: {
-    loadExternalContactFuncDict() {
+
+      handleBatchUpdateLevel(){
+
+          if (this.ids == null || this.ids == "") {
+              return this.$message('请选择需要添加备注的客户');
+          }
+
+          this.ratingOpen.open=true;
+          this.ratingOpen.title='批量修改客户等级'
+          this.ratingOpen.filter=false;
+      },
+
+      handleBatchUpdateLevelFilter(){
+          this.ratingOpen.open=true;
+          this.ratingOpen.title='批量修改客户等级'
+          this.ratingOpen.filter=true;
+      },
+      ratingSubmitForm(){
+
+          if (!this.ratingOpen.level){
+              return this.$message.error('请选择要修改的等级');
+          }
+
+          this.ratingOpen.userIds = this.ids;
+
+          let obj = JSON.parse(JSON.stringify(this.queryParams))
+          if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
+              obj.tagIds = obj.tagIds.split(",");
+          }
+          this.ratingOpen.param = obj;
+
+          extChangeLevel(this.ratingOpen).then(response => {
+              this.msgSuccess("修改完成");
+              this.getList();
+          }).finally(() => {
+              this.ratingCancel();
+          });
+
+      },
+
+      ratingCancel(){
+          this.ratingOpen={
+              open: false,
+              title: '',
+              level: null,
+              userIds: null
+          }
+      },
+
+      loadExternalContactFuncDict() {
       this.getDicts("sys_qw_external_contact_func").then(response => {
         const list = response.data || [];
         const btnDict = list.find(item => String(item.dictSort) === "1");

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

@@ -339,6 +339,28 @@
         v-hasPermi="['qw:externalContactInfo:myUpdateAllTalk']"
 	    >更改全部交流状态</el-button>
 	  </el-col>
+        <el-col :span="1.5">
+            <el-button
+                type="warning"
+                plain
+                icon="el-icon-edit"
+                size="mini"
+                @click="handleBatchUpdateLevel"
+                v-hasPermi="['qw:externalContact:changeLevel']"
+            >批量修改客户等级
+            </el-button>
+        </el-col>
+        <el-col :span="1.5">
+            <el-button
+                type="warning"
+                plain
+                icon="el-icon-edit"
+                size="mini"
+                @click="handleBatchUpdateLevelFilter"
+                v-hasPermi="['qw:externalContact:changeLevel']"
+            >批量修改客户等级(筛选条件)
+            </el-button>
+        </el-col>
 <!--     <el-col :span="1.5">-->
 <!--        <el-button-->
 <!--          type="primary"-->
@@ -1192,29 +1214,53 @@
       <el-button type="primary" @click="submitStatusForm">提 交</el-button>
     </div>
   </el-dialog>
+
+      <el-dialog :title="ratingOpen.title" :visible.sync="ratingOpen.open" width="600px" append-to-body>
+          <div style="padding: 20px 0;">
+              <el-select v-model="ratingOpen.level" placeholder="客户等级" clearable size="small">
+                  <el-option
+                      v-for="dict in ratingType"
+                      :key="dict.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                  />
+              </el-select>
+          </div>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="ratingSubmitForm()">确 定</el-button>
+              <el-button @click="ratingCancel">取 消</el-button>
+          </div>
+      </el-dialog>
   </div>
 </template>
 
 <script>
 import {
-  myList,
-  bindUserId,
-  addTag,
-  batchUpdateExternalContactNotes,
-  delTag,
-  listExternalContact,
-  getExternalContact,
-  delExternalContact,
-  addExternalContact,
-  updateExternalContact,
-  updateRemarkMobiles,
-  exportExternalContact,
-  editbindCustomer,
-  syncMyAddExternalContact,
-  setCustomerCourseSop,
-  getCustomerCourseSop,
-  setCustomerCourseSopList,
-  syncMyExternalContact, unBindUserId, updateExternalContactCall,exportMyExternalContact,updateExternalContactStatus,getWatchLogList,getRepeatRecordList
+    myList,
+    bindUserId,
+    addTag,
+    batchUpdateExternalContactNotes,
+    delTag,
+    listExternalContact,
+    getExternalContact,
+    delExternalContact,
+    addExternalContact,
+    updateExternalContact,
+    updateRemarkMobiles,
+    exportExternalContact,
+    editbindCustomer,
+    syncMyAddExternalContact,
+    setCustomerCourseSop,
+    getCustomerCourseSop,
+    setCustomerCourseSopList,
+    syncMyExternalContact,
+    unBindUserId,
+    updateExternalContactCall,
+    exportMyExternalContact,
+    updateExternalContactStatus,
+    getWatchLogList,
+    getRepeatRecordList,
+    extChangeLevel
 } from '@/api/qw/externalContact'
 import info from "@/views/qw/externalContact/info.vue";
 import {getMyQwUserList, getMyQwCompanyList, handleInputAuthAppKey, updateUser} from "@/api/qw/user";
@@ -1239,7 +1285,15 @@ export default {
   components:{PaginationMore, mycustomer,customerDetails,SopDialog,selectUser,info,Collection,userDetails,customerDetail,createOder},
   data() {
     return {
-      aiAnalyze: {
+        ratingOpen:{
+            open:false,
+            title:'',
+            level:null,
+            userIds:null,
+            filter:false,
+        },
+
+        aiAnalyze: {
         title: "AI 分析",
         open: false,
         userId: null,
@@ -1534,7 +1588,58 @@ export default {
 
   },
   methods: {
-    loadExternalContactFuncDict() {
+
+      handleBatchUpdateLevel(){
+
+          if (this.ids == null || this.ids == "") {
+              return this.$message('请选择需要添加备注的客户');
+          }
+
+          this.ratingOpen.open=true;
+          this.ratingOpen.title='批量修改客户等级'
+          this.ratingOpen.filter=false;
+      },
+
+      handleBatchUpdateLevelFilter(){
+          this.ratingOpen.open=true;
+          this.ratingOpen.title='批量修改客户等级'
+          this.ratingOpen.filter=true;
+      },
+
+      ratingSubmitForm(){
+
+          if (!this.ratingOpen.level){
+              return this.$message.error('请选择要修改的等级');
+          }
+
+          this.ratingOpen.userIds = this.ids;
+
+          let obj = JSON.parse(JSON.stringify(this.queryParams))
+          if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
+              obj.tagIds = obj.tagIds.split(",");
+          }
+          this.ratingOpen.param = obj;
+
+          extChangeLevel(this.ratingOpen).then(response => {
+              this.msgSuccess("修改完成");
+              this.getList();
+          }).finally(() => {
+              this.ratingCancel();
+          });
+
+      },
+
+
+      ratingCancel(){
+          this.ratingOpen={
+              open: false,
+              title: '',
+              level: null,
+              userIds: null
+          }
+      },
+
+      loadExternalContactFuncDict() {
       this.getDicts("sys_qw_external_contact_func").then(response => {
         const list = response.data || [];
         const btnDict = list.find(item => String(item.dictSort) === "1");

+ 238 - 103
src/views/qw/qwSopTempVoice/index.vue

@@ -1,113 +1,113 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
-<!--      <el-form-item label="销售用户ID" prop="companyUserId">-->
-<!--        <el-input-->
-<!--          v-model="queryParams.companyUserId"-->
-<!--          placeholder="请输入销售用户ID"-->
-<!--          clearable-->
-<!--          size="small"-->
-<!--          @keyup.enter.native="handleQuery"-->
-<!--        />-->
-<!--      </el-form-item>-->
-
-      <el-form-item label="语音文本" prop="voiceTxt">
-        <el-input
-          v-model="queryParams.voiceTxt"
-          placeholder="请输入语音文本"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-
-<!--      <el-form-item label="是否录制完成" prop="recordType">-->
-<!--        <el-select v-model="queryParams.recordType" placeholder="请选择是否录制完成" clearable size="small">-->
-<!--          <el-option-->
-<!--            v-for="dict in recordTypeOptions"-->
-<!--            :key="dict.dictValue"-->
-<!--            :label="dict.dictLabel"-->
-<!--            :value="parseInt(dict.dictValue)"-->
-<!--          />-->
-<!--        </el-select>-->
-<!--      </el-form-item>-->
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['qw:QwSopTempVoice:add']"
-        >新增</el-button>
-      </el-col>
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="success"-->
-<!--          plain-->
-<!--          icon="el-icon-edit"-->
-<!--          size="mini"-->
-<!--          :disabled="single"-->
-<!--          @click="handleUpdate"-->
-<!--          v-hasPermi="['qw:QwSopTempVoice:edit']"-->
-<!--        >修改</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="danger"-->
-<!--          plain-->
-<!--          icon="el-icon-delete"-->
-<!--          size="mini"-->
-<!--          :disabled="multiple"-->
-<!--          @click="handleDelete"-->
-<!--          v-hasPermi="['qw:QwSopTempVoice:remove']"-->
-<!--        >删除</el-button>-->
-<!--      </el-col>-->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table border v-loading="loading" :data="QwSopTempVoiceList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="语音文本" align="center" prop="voiceTxt" />
-      <el-table-column label="秒" align="center" prop="duration" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-edit"-->
-<!--            @click="handleUpdate(scope.row)"-->
-<!--            v-hasPermi="['qw:QwSopTempVoice:edit']"-->
-<!--          >修改</el-button>-->
+    <div class="voice-layout">
+      <!-- 左侧分组列表 -->
+      <div class="voice-left-panel">
+        <div class="group-title">
+          <span>语音分组</span>
           <el-button
+            type="primary"
             size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['qw:QwSopTempVoice:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
+            icon="el-icon-plus"
+            circle
+            @click="handleAddGroup"
+          ></el-button>
+        </div>
+        <div class="group-list">
+          <div
+            class="group-item"
+            :class="{ active: currentGroupId === null }"
+            @click="selectGroup(null)"
+          >全部</div>
+          <div
+            v-for="item in groupList"
+            :key="item.id"
+            class="group-item"
+            :class="{ active: currentGroupId === item.id }"
+            @click="selectGroup(item.id)"
+          >
+            <span class="group-item-name">{{ item.voiceGroupName }}</span>
+            <i class="el-icon-edit group-item-edit" @click.stop="handleEditGroup(item)"></i>
+          </div>
+        </div>
+      </div>
+      <!-- 右侧内容区 -->
+      <div class="voice-right-panel">
+        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
+          <el-form-item label="语音文本" prop="voiceTxt">
+            <el-input
+              v-model="queryParams.voiceTxt"
+              placeholder="请输入语音文本"
+              clearable
+              size="small"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+          </el-form-item>
+        </el-form>
 
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              v-hasPermi="['qw:QwSopTempVoice:add']"
+            >新增</el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <el-table border v-loading="loading" :data="QwSopTempVoiceList" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55" align="center" />
+          <el-table-column label="语音文本" align="center" prop="voiceTxt" />
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['qw:QwSopTempVoice:remove']"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </div>
+    </div>
 
     <!-- 添加或修改模板对应的销售语音文件对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="语音分组" prop="groupId">
+          <el-select
+            v-model="form.groupId"
+            placeholder="请选择语音分组"
+            clearable
+            size="small"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in groupList"
+              :key="item.id"
+              :label="item.voiceGroupName"
+              :value="item.id"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="语音文本" prop="voiceTxt">
           <el-input type="textarea" :rows="6" v-model="form.voiceTxt" placeholder="请输入语音文本"  />
         </el-form-item>
@@ -117,17 +117,23 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
   </div>
 </template>
 
 <script>
 import { listQwSopTempVoice, getQwSopTempVoice, delQwSopTempVoice, addQwSopTempVoice, updateQwSopTempVoice, exportQwSopTempVoice } from "@/api/qw/QwSopTempVoice";
-import {removeSidebar} from "../../../api/qw/QwSopTempVoice";
+import { removeSidebar } from "@/api/qw/QwSopTempVoice";
+import { listQwSopTempVoiceGroup, addQwSopTempVoiceGroup, updateQwSopTempVoiceGroup } from "@/api/qw/QwSopTempVoiceGroup";
 
 export default {
   name: "QwSopTempVoice",
   data() {
     return {
+      // 分组列表
+      groupList: [],
+      // 当前选中的分组ID,null表示全部
+      currentGroupId: null,
 
       // 是否录制完成字典
       recordTypeOptions: [
@@ -166,6 +172,7 @@ export default {
         ruleId: null,
         dayId: null,
         contentId: null,
+        groupId: null,
         voiceTxt: null,
         voiceUrl: null,
         userVoiceUrl: null,
@@ -177,13 +184,60 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        groupId: [
+          { required: true, message: "请选择语音分组", trigger: "change" }
+        ]
       }
     };
   },
   created() {
+    this.getGroupList();
     this.getList();
   },
   methods: {
+    /** 获取语音分组列表 */
+    getGroupList() {
+      listQwSopTempVoiceGroup({ pageNum: 1, pageSize: 999 }).then(response => {
+        this.groupList = response.rows;
+      });
+    },
+    /** 选择分组 */
+    selectGroup(groupId) {
+      this.currentGroupId = groupId;
+      this.queryParams.groupId = groupId;
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 新增分组 */
+    handleAddGroup() {
+      this.$prompt('请输入语音分组名称', '新增分组', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPattern: /\S/,
+        inputErrorMessage: '分组名称不能为空'
+      }).then(({ value }) => {
+        addQwSopTempVoiceGroup({ voiceGroupName: value }).then(() => {
+          this.msgSuccess('新增成功');
+          this.getGroupList();
+        });
+      }).catch(() => {});
+    },
+    /** 修改分组名称 */
+    handleEditGroup(item) {
+      if (!item) return;
+      this.$prompt('请输入新的分组名称', '修改分组', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPattern: /\S/,
+        inputErrorMessage: '分组名称不能为空',
+        inputValue: item.voiceGroupName
+      }).then(({ value }) => {
+        updateQwSopTempVoiceGroup({ id: item.id, voiceGroupName: value }).then(() => {
+          this.msgSuccess('修改成功');
+          this.getGroupList();
+        });
+      }).catch(() => {});
+    },
     /** 查询模板对应的销售语音文件列表 */
     getList() {
       this.loading = true;
@@ -209,6 +263,7 @@ export default {
         ruleId: null,
         dayId: null,
         contentId: null,
+        groupId: null,
         voiceTxt: null,
         voiceUrl: null,
         userVoiceUrl: null,
@@ -274,7 +329,6 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-
       this.$confirm('是否确认删除模板对应的销售语音文本---"' + row.voiceTxt + '"---的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
@@ -304,3 +358,84 @@ export default {
   }
 };
 </script>
+
+<style scoped>
+.app-container {
+  position: relative;
+  height: calc(100vh - 150px);
+  overflow: hidden;
+  box-sizing: border-box;
+}
+.voice-layout {
+  position: absolute;
+  top: 20px;
+  left: 20px;
+  right: 20px;
+  bottom: 20px;
+  display: flex;
+}
+.voice-left-panel {
+  width: 200px;
+  min-width: 200px;
+  background: #fff;
+  border-right: 1px solid #e8e8e8;
+  display: flex;
+  flex-direction: column;
+}
+.group-title {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  font-size: 16px;
+  font-weight: bold;
+  padding: 16px 16px 12px;
+  border-bottom: 1px solid #e8e8e8;
+  flex-shrink: 0;
+}
+.group-list {
+  padding: 8px 8px 0;
+  overflow-y: auto;
+  flex: 1;
+}
+.group-item {
+  padding: 10px 12px;
+  cursor: pointer;
+  border-radius: 4px;
+  font-size: 14px;
+  color: #333;
+  transition: all 0.2s;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.group-item-name {
+  flex: 1;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.group-item-edit {
+  font-size: 13px;
+  color: #999;
+  flex-shrink: 0;
+  margin-left: 6px;
+}
+.group-item-edit:hover {
+  color: #1890ff;
+}
+.group-item:hover {
+  background: #f0f2f5;
+}
+.group-item.active {
+  background: #e6f7ff;
+  color: #1890ff;
+  font-weight: bold;
+}
+.voice-right-panel {
+  flex: 1;
+  padding-left: 16px;
+  min-width: 0;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+</style>

+ 9 - 9
src/views/qw/sopLogs/sopLogsList.vue

@@ -105,15 +105,15 @@
           @click="handleDelete"
           v-hasPermi="['qw:sopLogs:remove']"
         >批量删除</el-button>
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="multiple"
-          @click="handleEditCourse"
-          v-hasPermi="['qw:sopLogs:editCourse']"
-        >再次发送记录</el-button>
+<!--        <el-button-->
+<!--          type="success"-->
+<!--          plain-->
+<!--          icon="el-icon-edit"-->
+<!--          size="mini"-->
+<!--          :disabled="multiple"-->
+<!--          @click="handleEditCourse"-->
+<!--          v-hasPermi="['qw:sopLogs:editCourse']"-->
+<!--        >再次发送记录</el-button>-->
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>