From bc9538a9e071259ca8bbb6de52c60c9d7a55a03b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 23 九月 2026 14:02:44 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/record/detailpage/index.vue |   80 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 73 insertions(+), 7 deletions(-)

diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index cb7e4ef..cb22dd1 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -127,6 +127,29 @@
               </el-tooltip>
             </template>
           </el-table-column>
+                <el-table-column
+            v-if="
+              orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�' ||
+              orgname == '涓芥按甯備腑鍖婚櫌'
+            "
+            label="鎷ㄥ彿鐘舵��"
+            width="120"
+            align="center"
+            key="isManuallyCalled"
+            prop="isManuallyCalled"
+          >
+            <template slot-scope="scope">
+              <el-tag
+                v-if="Number(scope.row.isManuallyCalled) > 0"
+                type="success"
+                :disable-transitions="false"
+                >鎷ㄩ�歿{ scope.row.isManuallyCalled }}娆�</el-tag
+              >
+              <el-tag v-else type="info" :disable-transitions="false"
+                >鏈嫧閫�</el-tag
+              >
+            </template>
+          </el-table-column>
           <el-table-column
             prop="finishtime"
             align="center"
@@ -282,6 +305,8 @@
             show-overflow-tooltip
           >
           </el-table-column>
+
+
 
           <el-table-column
             prop="bankcardno"
@@ -1312,7 +1337,11 @@
         :visible.sync="CaldialogVisible"
         width="60%"
       >
-        <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" />
+        <CallCenterLs
+          ref="CallCenterLs"
+          :initial-phone="currentPhoneNumber"
+          @call-connected="recordCallConnected"
+        />
       </el-dialog>
     </div>
   </div>
@@ -2349,7 +2378,7 @@
         this.CaldialogVisible = true;
         return;
       }
-      // 涓嬫柟鏄腑鍖婚櫌鍛煎彨
+      // 涓嬫柟鏄附姘村競涓尰闄�
       if (this.isSipRegistering) {
         this.$message.warning("绯荤粺姝e湪鍒濆鍖栵紝璇风◢鍊�...");
         return;
@@ -2379,11 +2408,15 @@
       this.callStatus = status.type;
 
       if (status.type === "connected") {
-        this.currentCall = {
-          phone: this.currentPhoneNumber,
-          type: this.callType,
-          startTime: new Date(),
-        };
+        if (!this.currentCall) {
+          this.currentCall = {
+            phone: this.currentPhoneNumber,
+            type: this.callType,
+            startTime: new Date(),
+          };
+          // 涓芥按甯備腑鍖婚櫌锛氱數璇濇帴閫氬悗璁板綍鎷ㄦ墦鎴愬姛娆℃暟
+          this.recordCallConnected();
+        }
       } else if (status.type === "ended" || status.type === "failed") {
         this.currentCall = null;
       }
@@ -2393,6 +2426,39 @@
         this.$message.error(`鍛煎彨澶辫触: ${status.text}`);
       }
     },
+    // 鐢佃瘽鎷ㄦ墦鎴愬姛鍚庯紙鎺ラ�氾級娆℃暟 +1锛屽苟閫氳繃 Editsingletaskson 鏇存柊鏈嶅姟鏁版嵁
+    // 浠呴檺鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄笌涓芥按甯備腑鍖婚櫌
+    recordCallConnected() {
+      const allowedOrgs = ["鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�", "涓芥按甯備腑鍖婚櫌"];
+      if (!allowedOrgs.includes(this.orgname)) return;
+
+      getTaskservelist({
+        patid: this.patid,
+        subId: this.id,
+      }).then((res) => {
+        if (res.code == 200) {
+          const objson = res.rows[0].serviceSubtaskList.find(
+            (item) => item.id == this.id
+          );
+          if (!objson) return;
+          objson.isManuallyCalled = (Number(objson.isManuallyCalled) || 0) + 1;
+          Editsingletaskson(objson).then((r) => {
+            if (r.code == 200) {
+              // 鍙婃椂鏇存柊椤堕儴鏈嶅姟鍒楄〃涓庤〃鍗曚腑鐨勬嫧鍙风姸鎬�
+              const localRow = (this.logsheetlist || []).find(
+                (item) => item.id == this.id
+              );
+              if (localRow) {
+                localRow.isManuallyCalled = objson.isManuallyCalled;
+              }
+              if (this.form && this.form.id == this.id) {
+                this.form.isManuallyCalled = objson.isManuallyCalled;
+              }
+            }
+          });
+        }
+      });
+    },
     // 缁撴潫褰撳墠閫氳瘽
     endCurrentCall() {
       if (!this.currentCall) return;

--
Gitblit v1.9.3