lmx 1 dienu atpakaļ
vecāks
revīzija
8c2746bf80

+ 53 - 0
src/api/company/addwx.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询调用日志_加微信列表
+export function listAddwx(query) {
+  return request({
+    url: '/company/addwxLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// // 查询调用日志_加微信详细
+// export function getAddwx(logId) {
+//   return request({
+//     url: '/company/addwx/' + logId,
+//     method: 'get'
+//   })
+// }
+
+// // 新增调用日志_加微信
+// export function addAddwx(data) {
+//   return request({
+//     url: '/company/addwx',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+// // 修改调用日志_加微信
+// export function updateAddwx(data) {
+//   return request({
+//     url: '/company/addwx',
+//     method: 'put',
+//     data: data
+//   })
+// }
+
+// // 删除调用日志_加微信
+// export function delAddwx(logId) {
+//   return request({
+//     url: '/company/addwx/' + logId,
+//     method: 'delete'
+//   })
+// }
+
+// // 导出调用日志_加微信
+// export function exportAddwx(query) {
+//   return request({
+//     url: '/company/addwx/export',
+//     method: 'get',
+//     params: query
+//   })
+// }

+ 53 - 0
src/api/company/callphone.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询调用日志_ai打电话列表
+export function listCallphone(query) {
+  return request({
+    url: '/company/callphoneLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// // 查询调用日志_ai打电话详细
+// export function getCallphone(logId) {
+//   return request({
+//     url: '/company/callphone/' + logId,
+//     method: 'get'
+//   })
+// }
+
+// // 新增调用日志_ai打电话
+// export function addCallphone(data) {
+//   return request({
+//     url: '/company/callphone',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+// // 修改调用日志_ai打电话
+// export function updateCallphone(data) {
+//   return request({
+//     url: '/company/callphone',
+//     method: 'put',
+//     data: data
+//   })
+// }
+
+// // 删除调用日志_ai打电话
+// export function delCallphone(logId) {
+//   return request({
+//     url: '/company/callphone/' + logId,
+//     method: 'delete'
+//   })
+// }
+
+// // 导出调用日志_ai打电话
+// export function exportCallphone(query) {
+//   return request({
+//     url: '/company/callphone/export',
+//     method: 'get',
+//     params: query
+//   })
+// }

+ 9 - 1
src/api/company/companyVoiceRobotic.js

@@ -131,4 +131,12 @@ export function getSmsTempList() {
     url: '/company/companySmsTemp/getSmsTempList',
     method: 'get'
   })
-}
+}
+
+export function getCIDGroupList(params) {
+  return request({
+    url: 'company/companyVoiceRobotic/getCIDGroupList',
+    method: 'get',
+    params
+  })
+}

+ 62 - 0
src/api/company/sendmsg.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询调用日志_发送短信列表
+export function listSendmsg(query) {
+  return request({
+    url: '/company/sendmsgLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function listByCallerIdAndRoboticId(query) {
+  return request({
+    url: '/company/sendmsgLog/listByCallerIdAndRoboticId',
+    method: 'get',
+    params: query
+  })
+}
+
+// // 查询调用日志_发送短信详细
+// export function getSendmsg(logId) {
+//   return request({
+//     url: '/company/sendmsg/' + logId,
+//     method: 'get'
+//   })
+// }
+
+// // 新增调用日志_发送短信
+// export function addSendmsg(data) {
+//   return request({
+//     url: '/company/sendmsg',
+//     method: 'post',
+//     data: data
+//   })
+// }
+
+// // 修改调用日志_发送短信
+// export function updateSendmsg(data) {
+//   return request({
+//     url: '/company/sendmsg',
+//     method: 'put',
+//     data: data
+//   })
+// }
+
+// // 删除调用日志_发送短信
+// export function delSendmsg(logId) {
+//   return request({
+//     url: '/company/sendmsg/' + logId,
+//     method: 'delete'
+//   })
+// }
+
+// // 导出调用日志_发送短信
+// export function exportSendmsg(query) {
+//   return request({
+//     url: '/company/sendmsg/export',
+//     method: 'get',
+//     params: query
+//   })
+// }

+ 21 - 5
src/views/company/companyVoiceRobotic/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="任务名称" prop="name">
+      <el-form-item label="任务名称1" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入任务名称"
@@ -201,6 +201,11 @@
             <el-select v-model="form.dialogId" filterable>
               <el-option v-for="item in dialogList" :label="item.name" :value="item.id"/>
             </el-select>
+          </el-form-item>
+           <el-form-item label="主叫分组" prop="cidGroupId">
+            <el-select v-model="form.cidGroupId" filterable>
+              <el-option v-for="item in CIDGroupList" :label="item.name" :value="item.id"/>
+            </el-select>
           </el-form-item>
           <el-form-item label="拨打客户" prop="userIds">
             <el-button @click="openSelect">选择客户({{ form.userIds ? form.userIds.length : 0 }})</el-button>
@@ -299,7 +304,7 @@
             <el-button
               size="mini"
               type="text"
-              @click="openCustomer(scope.row.userId)"
+              @click="openCustomer(scope.row.userId,scope.row.idToString,scope.row.roboticId)"
             >客户信息详情</el-button>
           </template>
         </el-table-column>
@@ -355,7 +360,8 @@ import {
   wxList,
   taskRun,
   getTypes,
-  getSmsTempList
+  getSmsTempList,
+  getCIDGroupList
 } from "@/api/company/companyVoiceRobotic";
 import draggable from 'vuedraggable'
 import { listAll } from '@/api/company/wxDialog';
@@ -372,6 +378,7 @@ export default {
     return {
       // 遮罩层
       loading: true,
+      CIDGroupList:[],
       // 选中数组
       ids: [],
       weekList: [
@@ -481,6 +488,15 @@ export default {
     })
     this.getList();
     this.getSmsTempDropList();
+
+    getCIDGroupList().then(res=>{
+      console.log("----------------------")
+      console.log(res);
+      this.CIDGroupList = res.data;
+    }).catch(res=>{
+      console.log("catch_____+++++++")
+      console.log(res);
+    });
   },
   methods: {
     getSmsTempDropList(){
@@ -700,10 +716,10 @@ export default {
         this.wx.loading = false;
       });
     },
-    openCustomer(id) {
+    openCustomer(id,calleesId,roboticId) {
       this.customerDetailShow=true;
       this.$nextTick(() => {
-        this.$refs.customerDetails.getDetails(id);
+        this.$refs.customerDetails.getDetails(id,calleesId,roboticId);
       })
     },
     startRoboticFun(id){

+ 76 - 0
src/views/crm/components/aiAddWxLog.vue

@@ -0,0 +1,76 @@
+<template>
+    <div>
+        <el-table border v-loading="loading" :data="list" >
+            <el-table-column label="ID" align="center" prop="logId" />
+            <el-table-column label="公司名" align="center" prop="companyName" />
+            <el-table-column label="客户名称" align="center" prop="wxClientName" />
+            <el-table-column label="加微微信" align="center" prop="wxAccountName" />
+            <el-table-column label="加微时间" align="center" prop="runTime" ></el-table-column>
+            <el-table-column label="状态" align="center" prop="status" >
+                <template slot-scope="scope">
+                    <el-tag prop="status" v-for="(item, index) in statusOptions"    v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
+                </template>
+            </el-table-column>
+            <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
+        </el-table>
+        <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+        />
+
+    </div>
+</template>
+  
+<script>
+import { listAddwx } from "@/api/company/addwx.js";
+
+import {getDicts} from "@/api/system/dict/data";
+export default {
+        name: "aiAddWxLog",
+        data() {
+            return {
+                statusOptions:[],
+                // 遮罩层
+                loading: true,
+                // 总条数
+                total: 0,
+                list: [],
+                // 查询参数
+                queryParams: {
+                    pageNum: 1,
+                    pageSize: 10,
+                    customerId: null,
+                    roboticId:null
+                },
+            };
+        },
+        created() {
+            getDicts("ai_call_task_status").then((response) => {
+                this.statusOptions = response.data;
+            });
+          
+        },
+        methods: {
+            getData(customerId,roboticId){
+                this.queryParams.roboticId=roboticId;
+                this.queryParams.customerId=customerId;
+                this.queryParams.pageNum=1;
+                this.getList();
+            },
+            getList(){
+                this.loading = true;
+                listAddwx(this.queryParams).then(response => {
+                    this.list = response.rows;
+                    this.total = response.total;
+                    this.loading = false;
+                });
+            },
+        }
+    };
+</script>
+<style lang="scss" scoped> 
+</style>
+ 

+ 38 - 22
src/views/crm/components/aiCallVoiceLog.vue

@@ -1,41 +1,44 @@
 <template>
     <div>
         <el-table border v-loading="loading" :data="list" >
-            <el-table-column label="ID" align="center" prop="voiceId" />
+            <el-table-column label="ID" align="center" prop="logId" />
             <el-table-column label="公司名" align="center" prop="companyName" />
-            <el-table-column label="员工姓名" align="center" prop="userNickName" />
-            <el-table-column label="录制地址" align="center"  show-overflow-tooltip prop="voiceUrl" width="350">
+            <el-table-column label="员工姓名" align="center" prop="companyUserName" />
+            <el-table-column label="录制地址" align="center"  show-overflow-tooltip prop="recordPath" width="350">
                 <template slot-scope="scope">
-                    <audio  v-if="scope.row.voiceUrl!=null"   controls :src="scope.row.voiceUrl"></audio>
+                    <audio  v-if="scope.row.recordPath!=null"   controls :src="handleRecordPath(scope.row.recordPath)"></audio>
                 </template>
             </el-table-column>
-            <el-table-column label="开始时间" align="center" prop="startTime" width="180">
+            <el-table-column label="呼入时间" align="center" prop="callCreateTime" width="180">
                 <template slot-scope="scope">
-                <span>{{ parseTime(scope.row.startTime) }}</span>
+                <span>{{ parseTime(scope.row.callCreateTime) }}</span>
                 </template>
             </el-table-column>
-            <el-table-column label="结束时间" align="center" prop="finishTime" width="180">
+            <el-table-column label="应答时间" align="center" prop="callAnswerTime" width="180">
                 <template slot-scope="scope">
-                <span>{{ parseTime(scope.row.finishTime) }}</span>
+                <span>{{ parseTime(scope.row.callAnswerTime) }}</span>
                 </template>
             </el-table-column>
-            <el-table-column label="主叫" align="center" prop="callerPhone" />
-            <el-table-column label="被叫" align="center" prop="calleePhone" />
-            <el-table-column label="时长(秒)" align="center" prop="times" width="180">
+            <el-table-column label="主叫" align="center" prop="callerNum" />
+            <el-table-column label="被叫" align="center" prop="calleeNum" />
+            <el-table-column label="时长(秒)" align="center" prop="callTime" width="180">
                 <template slot-scope="scope">
-                <span v-if="scope.row.voiceUrl!=null">{{ scope.row.times}}秒 </span>
+                <span v-if="scope.row.recordPath!=null">{{ scope.row.callTime}}秒 </span>
                 </template>
             </el-table-column>
-            <el-table-column label="计费时长(分)" align="center" prop="billingTime" width="180">
+            <el-table-column label="意向度" align="center" prop="intention" width="180">
+                <template slot-scope="scope">
+                    <el-tag v-for="item in levelList" v-if="scope.row.intention == item.dictValue">{{item.dictLabel}}</el-tag>
+                </template>
             </el-table-column>
-            <el-table-column label="主叫显示号" align="center" prop="displayCallerNumber" />
-            <el-table-column label="被叫显示号" align="center" prop="displayCalleeNumber" />
+            <!-- <el-table-column label="主叫显示号" align="center" prop="displayCallerNumber" />
+            <el-table-column label="被叫显示号" align="center" prop="displayCalleeNumber" /> -->
             <el-table-column label="状态" align="center" prop="status" >
                 <template slot-scope="scope">
                     <el-tag prop="status" v-for="(item, index) in statusOptions"    v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
                 </template>
             </el-table-column>
-            <el-table-column label="备注" align="center" prop="remark" />
+            <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
         </el-table>
         <pagination
         v-show="total>0"
@@ -50,12 +53,15 @@
   
 <script>
 import { listCompanyVoiceLogs, getCompanyVoiceLogs, delCompanyVoiceLogs, addCompanyVoiceLogs, updateCompanyVoiceLogs, exportCompanyVoiceLogs } from "@/api/company/companyVoiceLogs";
+import { listCallphone } from "@/api/company/callphone";
+
+import {getDicts} from "@/api/system/dict/data";
 export default {
-        name: "customerVisit",
+        name: "aiCallVoiceLog",
         data() {
             return {
-                 
                 statusOptions:[],
+                levelList:[],
                 // 遮罩层
                 loading: true,
                 // 总条数
@@ -66,29 +72,39 @@ export default {
                     pageNum: 1,
                     pageSize: 10,
                     customerId: null,
+                    callerId:null
                 },
             };
         },
         created() {
-            this.getDicts("company_voice_logs_status").then((response) => {
+            getDicts("ai_call_task_status").then((response) => {
                 this.statusOptions = response.data;
             });
+            getDicts("customer_intention_level").then(e => {
+                this.levelList = e.data;
+            })
           
         },
         methods: {
-            getData(customerId){
+            getData(customerId,calleesId){
                 this.queryParams.customerId=customerId;
+                this.queryParams.callerId=calleesId;
                 this.queryParams.pageNum=1;
                 this.getList();
             },
-            getList() {
+            getList(){
                 this.loading = true;
-                listCompanyVoiceLogs(this.queryParams).then(response => {
+                listCallphone(this.queryParams).then(response => {
                     this.list = response.rows;
                     this.total = response.total;
                     this.loading = false;
                 });
             },
+            handleRecordPath(url){
+                let path = 'http://118.24.138.129/recordFile/listen?file=' + url;
+                console.log(path);
+                return path;
+            }
         }
     };
 </script>

+ 80 - 0
src/views/crm/components/aiSendMsgLog.vue

@@ -0,0 +1,80 @@
+<template>
+    <div>
+        <el-table border v-loading="loading" :data="list" >
+            <el-table-column label="ID" align="center" prop="logId" />
+            <el-table-column label="公司名" align="center" prop="companyName" />
+            <el-table-column label="员工姓名" align="center" prop="companyUserName" />
+            
+            <el-table-column label="发送时间" align="center" prop="runTime" />
+            <el-table-column label="内容长度" align="center" prop="contentLen" />
+            <el-table-column label="短信模板" align="center" prop="smsTempName" />
+            <el-table-column label="状态" align="center" prop="status" >
+                <template slot-scope="scope">
+                    <el-tag prop="status" v-for="(item, index) in statusOptions"    v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
+                </template>
+            </el-table-column>
+            <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
+        </el-table>
+        <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+        />
+
+    </div>
+</template>
+  
+<script>
+import { listCompanyVoiceLogs, getCompanyVoiceLogs, delCompanyVoiceLogs, addCompanyVoiceLogs, updateCompanyVoiceLogs, exportCompanyVoiceLogs } from "@/api/company/companyVoiceLogs";
+import { listByCallerIdAndRoboticId } from "@/api/company/sendmsg";
+
+export default {
+        name: "aiSendMsgLog",
+        data() {
+            return {
+                statusOptions:[],
+                // 遮罩层
+                loading: true,
+                // 总条数
+                total: 0,
+                list: [],
+                // 查询参数
+                queryParams: {
+                    pageNum: 1,
+                    pageSize: 10,
+                    customerId: null,
+                    callerId:null,
+                    roboticId:null,
+                },
+            };
+        },
+        created() {
+            this.getDicts("ai_call_task_status").then((response) => {
+                this.statusOptions = response.data;
+            });
+          
+        },
+        methods: {
+            getData(customerId,calleesId,roboticId){
+                this.queryParams.customerId=customerId;
+                this.queryParams.callerId=calleesId;
+                this.queryParams.roboticId = roboticId;
+                this.queryParams.pageNum=1;
+                this.getList();
+            },
+            getList(){
+                this.loading = true;
+                listByCallerIdAndRoboticId(this.queryParams).then(response => {
+                    this.list = response.rows;
+                    this.total = response.total;
+                    this.loading = false;
+                });
+            },
+        }
+    };
+</script>
+<style lang="scss" scoped> 
+</style>
+ 

+ 31 - 2
src/views/crm/components/customerDetails.vue

@@ -197,6 +197,12 @@
             <el-tab-pane label="AI通话记录" name="aiVoiceLogs">
                 <ai-call-voice-log ref="aiVoiceRef"></ai-call-voice-log>
             </el-tab-pane>
+             <el-tab-pane label="AI加微记录" name="aiAddWxLogs">
+                <ai-add-wx-log ref="aiAddWxRef"></ai-add-wx-log>
+            </el-tab-pane>
+             <el-tab-pane label="AI短信记录" name="aiSendMsgLogs">
+                <ai-send-msg-log ref="aiSendMsgRef"></ai-send-msg-log>
+            </el-tab-pane>
         </el-tabs>
 
         <el-dialog :title="addTag.title" :visible.sync="addTag.open" width="600px" append-to-body>
@@ -235,6 +241,8 @@
     import customerContacts from './customerContacts.vue';
     import customerHisOrderList from '../components/customerHisOrderList.vue';
     import aiCallVoiceLog from './aiCallVoiceLog';
+    import aiAddWxLog from './aiAddWxLog';
+    import aiSendMsgLog from './aiSendMsgLog';
     import { getCustomerDetails1,updateCustomer,getCustomer1 } from "@/api/crm/customer";
     import addTag from './addTag.vue';
     import addRemark from './addRemark.vue';
@@ -242,9 +250,12 @@
     import addOrEditCustomer from '../components/addOrEditCustomer.vue';
     export default {
         name: "customer",
-        components: {customerHisOrderList,addOrEditCustomer,addSms,addTag,addRemark, customerContacts,customerVisitList,customerLogsList,customerVoiceLogsList,customerStoreOrderList,customerSmsLogsList,duplicateCustomer,aiCallVoiceLog },
+        components: {customerHisOrderList,addOrEditCustomer,addSms,addTag,addRemark, customerContacts,customerVisitList,customerLogsList,
+        customerVoiceLogsList,customerStoreOrderList,customerSmsLogsList,duplicateCustomer,aiCallVoiceLog,aiAddWxLog,aiSendMsgLog },
         data() {
             return {
+                calleesId:null,
+                roboticId:null,
                 customer:{
                     open:false,
                     title:"修改客户"
@@ -396,8 +407,26 @@
                 if(tab.name=="hisOrder"){
                     this.$refs.hisOrder.getData(this.item.customerId);
                 }
+                if(tab.name=="aiVoiceLogs"){
+                    console.log(this.item.customerId);
+                    this.$refs.aiVoiceRef.getData(this.item.customerId,this.calleesId);
+                } else if(tab.name=="aiAddWxLogs"){
+                    console.log(this.item.customerId);
+                    this.$refs.aiAddWxRef.getData(this.item.customerId,this.roboticId);
+                } else if(tab.name=="aiSendMsgLogs"){
+                    console.log(this.item.customerId);
+                    this.$refs.aiSendMsgRef.getData(this.item.customerId,this.calleesId,this.roboticId);
+                }
             },
-            getDetails(customerId) {
+            getDetails(customerId,calleesId,roboticId) {
+                if(!!calleesId){
+                    this.calleesId = calleesId;
+                    console.log(this.calleesId);
+                }
+                if(!!roboticId){
+                    this.roboticId = roboticId;
+                    console.log(this.roboticId);
+                }
                 var data={customerId:customerId}
                 this.customerId=customerId;
                 var that=this;