Przeglądaj źródła

标识到达人工外呼节点的数据,增加人工外
呼按钮

zyy 2 dni temu
rodzic
commit
b9be8734a9
1 zmienionych plików z 40 dodań i 3 usunięć
  1. 40 3
      src/views/company/companyVoiceRobotic/index.vue

+ 40 - 3
src/views/company/companyVoiceRobotic/index.vue

@@ -441,13 +441,18 @@
             </el-form-item>
 
             <el-form-item>
+              <span style="margin-right: 8px;">只看待执行外呼任务</span>
+              <el-checkbox v-model="execLogs.onlyCallNode"></el-checkbox>
+            </el-form-item>
+
+            <div style="margin-right:auto;">
               <el-button type="primary" icon="el-icon-search" @click="handleSearch">
                 查询
               </el-button>
               <el-button icon="el-icon-refresh" @click="handleReset">
                 重置
               </el-button>
-            </el-form-item>
+            </div>
           </el-form>
         </el-card>
 
@@ -522,6 +527,16 @@
                           <span class="meta-item node">
                             <i class="el-icon-s-operation"></i>
                             当前节点:<strong>{{ record.currentNodeTypeName }}</strong>
+                            <!-- 外呼未执行标识 -->
+                            <el-button
+                              v-if="record.waitCallNode"
+                              type="danger"
+                              size="mini"
+                              icon="el-icon-phone"
+                              style="margin-left: 8px;"
+                              @click.stop="handleManualCall(record)">
+                              开始人工外呼
+                            </el-button>
                           </span>
                         </div>
                       </div>
@@ -758,7 +773,8 @@ export default {
         total: 0,
         currentTaskId: null,
         customerName: '',
-        customerPhone: ''
+        customerPhone: '',
+        onlyCallNode: false
       },
       // 表单校验
       rules: {
@@ -845,6 +861,7 @@ export default {
           this.execLogs.customerName = ''
           this.execLogs.customerPhone = ''
           this.execLogs.pageNum = 1
+          this.execLogs.onlyCallNode = false
 
           // 可选:重置分页
           this.execLogs.pageSize = 10
@@ -1269,7 +1286,8 @@ export default {
           pageNum: this.execLogs.pageNum,
           pageSize: this.execLogs.pageSize,
           customerName: this.execLogs.customerName,
-          customerPhone: this.execLogs.customerPhone
+          customerPhone: this.execLogs.customerPhone,
+          onlyCallNode: this.execLogs.onlyCallNode
         })
 
         this.execLogs.list = res.rows || []
@@ -1307,7 +1325,26 @@ export default {
       this.execLogs.customerName = ''
       this.execLogs.customerPhone = ''
       this.execLogs.pageNum = 1
+      this.execLogs.onlyCallNode = false
       this.getExecLogs()
+    },
+    handleManualCall(record) {
+      this.$confirm(
+        `确认对客户【${record.customerName}】进行人工外呼吗?`,
+        '提示',
+        {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }
+      ).then(() => {
+
+        // 调用后端接口
+        this.$message.success('已发起人工外呼');
+
+        // TODO: 调接口
+
+      }).catch(() => {});
     }
   }
 };