Bladeren bron

手动外呼完新增外呼日志

zyy 3 dagen geleden
bovenliggende
commit
3b3ed43971
2 gewijzigde bestanden met toevoegingen van 58 en 4 verwijderingen
  1. 35 2
      src/views/aiSipCall/aiSipCallManualOutbound.vue
  2. 23 2
      src/views/company/companyVoiceRobotic/index.vue

+ 35 - 2
src/views/aiSipCall/aiSipCallManualOutbound.vue

@@ -436,6 +436,18 @@
                         <el-input v-model="customerForm.communicationHistory" type="textarea" :rows="4" placeholder="历史沟通记录" disabled style="background-color: #f5f7fa;" />
                         <el-input v-model="customerForm.communicationHistory" type="textarea" :rows="4" placeholder="历史沟通记录" disabled style="background-color: #f5f7fa;" />
                     </el-form-item>
                     </el-form-item>
 
 
+                    <el-row :gutter="20">
+                        <el-col :span="12">
+                            <el-form-item label="意向度">
+                                <el-select v-model="intent" placeholder="请选择用户意向" style="width: 100%;">
+                                    <el-option label="A" value="A" />
+                                    <el-option label="B" value="B" />
+                                    <el-option label="C" value="C" />
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+
                     <el-form-item>
                     <el-form-item>
                         <el-button type="primary" @click="saveCustomerForm">保存</el-button>
                         <el-button type="primary" @click="saveCustomerForm">保存</el-button>
                         <el-button @click="closeCustomerForm">关闭</el-button>
                         <el-button @click="closeCustomerForm">关闭</el-button>
@@ -471,6 +483,21 @@ export default {
         initPhoneNumber: {
         initPhoneNumber: {
             type: String,
             type: String,
             default: ''
             default: ''
+        },roboticId: {
+            type: [Number, String],
+            default: null
+        },
+        companyId: {
+            type: [Number, String],
+            default: null
+        },
+        companyUserId: {
+            type: [Number, String],
+            default: null
+        },
+        workflowInstanceId: {
+            type: [Number, String],
+            default: null
         }
         }
     },
     },
     data() {
     data() {
@@ -569,7 +596,8 @@ export default {
                 province: '',
                 province: '',
                 city: '',
                 city: '',
                 county: '',
                 county: '',
-                communicationHistory: ''
+                communicationHistory: '',
+                intent: ''
             },
             },
             currentCallUuid: '', // 当前通话的 uuid
             currentCallUuid: '', // 当前通话的 uuid
             callFinishedAt: '', // 通话结束时间
             callFinishedAt: '', // 通话结束时间
@@ -1306,7 +1334,12 @@ export default {
                 const req = {
                 const req = {
                     uuid: this.currentCallUuid,
                     uuid: this.currentCallUuid,
                     callType: '03',
                     callType: '03',
-                    status: status
+                    status: status,
+                    intent: this.customerForm.intent,
+                    companyId: this.companyId,
+                    companyUserId: this.companyUserId,
+                    workflowInstanceId: this.workflowInstanceId,
+                    roboticId: this.roboticId
                 };
                 };
 
 
                 console.log('[syncByUuid] 准备调用后端记录:', {
                 console.log('[syncByUuid] 准备调用后端记录:', {

+ 23 - 2
src/views/company/companyVoiceRobotic/index.vue

@@ -751,6 +751,10 @@
           :key="manualCallDialog.key"
           :key="manualCallDialog.key"
           ref="callCenterPhoneBar"
           ref="callCenterPhoneBar"
           :init-phone-number="manualCallDialog.phone"
           :init-phone-number="manualCallDialog.phone"
+          :robotic-id="manualCallDialog.roboticId"
+          :company-id="manualCallDialog.companyId"
+          :company-user-id="manualCallDialog.companyUserId"
+          :workflow-instance-id="manualCallDialog.workflowInstanceId"
       />
       />
     </el-dialog>
     </el-dialog>
   </div>
   </div>
@@ -922,10 +926,14 @@ export default {
       },
       },
       manualCallDialog: {
       manualCallDialog: {
         visible: false,
         visible: false,
-        phoneNumber: '',
+        phone: '',
         title: "人工外呼",
         title: "人工外呼",
         record: null,
         record: null,
-        key: 0
+        key: 0,
+        roboticId: null,
+        companyId: null,
+        companyUserId: null,
+        workflowInstanceId: null
       },
       },
       // 表单校验
       // 表单校验
       rules: {
       rules: {
@@ -1522,12 +1530,25 @@ export default {
       this.manualCallDialog.record = record;
       this.manualCallDialog.record = record;
       this.manualCallDialog.phone = phone;
       this.manualCallDialog.phone = phone;
       this.manualCallDialog.title = `人工外呼 - ${record.customerName || '未知客户'}`;
       this.manualCallDialog.title = `人工外呼 - ${record.customerName || '未知客户'}`;
+
+      const currentTask = this.roboticList.find(
+        item => item.id === this.execLogs.currentTaskId
+      );
+      // 带过去的额外参数
+      this.manualCallDialog.roboticId = record.roboticId || null;
+      this.manualCallDialog.companyId = (currentTask && currentTask.companyId) || null;
+      this.manualCallDialog.companyUserId = (currentTask && currentTask.companyUserId) || null;
+      this.manualCallDialog.workflowInstanceId = record.workflowInstanceId || null;
       this.manualCallDialog.key += 1;
       this.manualCallDialog.key += 1;
       this.manualCallDialog.visible = true;
       this.manualCallDialog.visible = true;
     },
     },
     handleManualCallDialogClose() {
     handleManualCallDialogClose() {
       this.manualCallDialog.phone = '';
       this.manualCallDialog.phone = '';
       this.manualCallDialog.record = null;
       this.manualCallDialog.record = null;
+      this.manualCallDialog.roboticId = null;
+      this.manualCallDialog.companyId = null;
+      this.manualCallDialog.companyUserId = null;
+      this.manualCallDialog.workflowInstanceId = null;
     },
     },
   }
   }
 };
 };