From f9902f7a3b79d22bde9f199263ac36de26816470 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 08 五月 2026 14:46:10 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/record/detailpage/index.vue |  164 ++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 144 insertions(+), 20 deletions(-)

diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 65aeb31..cfe9b61 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -76,7 +76,8 @@
                   gettoken360(
                     scope.row.sfzh,
                     scope.row.drcode,
-                    scope.row.drname
+                    scope.row.drname,
+                    scope.row.patid
                   )
                 "
                 ><span class="button-textsc">{{
@@ -558,11 +559,7 @@
             <div class="header-actions">
               <!-- 鍩虹鎿嶄綔鎸夐挳缁� -->
               <div class="action-group basic-actions">
-                <el-button
-                  type="primary"
-                  plain
-                  @click="Editsingletasksonyic('')"
-                >
+                <el-button type="primary" plain @click="alterpatient('')">
                   淇濆瓨鍩虹淇℃伅
                 </el-button>
 
@@ -580,7 +577,7 @@
                   type="primary"
                   round
                   @click="sendAgain"
-                  v-if="form.isVisitAgain != 2"
+                  v-if="(form.isVisitAgain != 2) & (visitAgain == 2)"
                 >
                   鍐嶆闅忚
                 </el-button>
@@ -755,12 +752,44 @@
                   />
                 </div>
               </div>
-
+              <el-form-item label="浠诲姟澶勭悊鐘舵��">
+                <el-select
+                  v-model="serviceStates"
+                  placeholder="璇烽�夋嫨鐘舵��"
+                  clearable
+                  style="width: 150px; margin-right: 10px"
+                >
+                  <el-option
+                    v-for="item in serviceState"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
               <!-- 闅忚鍐呭/璁板綍 -->
               <el-form-item
                 :label="orgname == '涓芥按甯備腑鍖婚櫌' ? '闅忚鍐呭' : '闅忚璁板綍'"
               >
-                <el-input type="textarea" v-model="form.remark"></el-input>
+                <!-- 蹇嵎鐭鏍囩 -->
+                <div style="margin-bottom: 8px">
+                  <el-tag
+                    v-for="(item, index) in dict.type.quickfollow_up"
+                    :key="index"
+                    style="margin-right: 8px; cursor: pointer"
+                    @click="insertText(item.value)"
+                  >
+                    {{ item.value }}
+                  </el-tag>
+                </div>
+                <!-- 鏂囨湰鍩� -->
+                <el-input
+                  type="textarea"
+                  :rows="4"
+                  v-model="form.remark"
+                  ref="textareaRef"
+                  placeholder="鍙偣鍑讳笂鏂瑰揩鎹锋爣绛炬垨鎵嬪姩杈撳叆"
+                ></el-input>
               </el-form-item>
 
               <!-- 闅忚鎯呭喌 -->
@@ -1138,6 +1167,7 @@
 import CallButton from "@/components/CallButton";
 import MergeAndModify from "./MergeAndModify.vue";
 import CallCenterLs from "@/components/CallCenterLs";
+import store from "@/store";
 export default {
   components: {
     CallButton,
@@ -1205,7 +1235,13 @@
       },
     },
   },
-  dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
+  dicts: [
+    "sys_normal_disable",
+    "quickfollow_up",
+    "sys_user_sex",
+    "sys_yujing",
+    "sys_suggest",
+  ],
   data() {
     const validatePhone = (rule, value, callback) => {
       if (!value) {
@@ -1220,6 +1256,7 @@
       }, 300);
     };
     return {
+      visitAgain: 1,
       userid: "",
       currentPhoneNumber: "",
       callType: "", // 鐢ㄤ簬鍖哄垎鏄摢涓數璇�
@@ -1230,6 +1267,29 @@
       isEndingCall: false,
       CaldialogVisible: false,
       currentCall: null, // 褰撳墠閫氳瘽瀵硅薄
+      serviceStates: 6,
+      serviceState: [
+        {
+          value: 2,
+          label: "寰呴殢璁�",
+        },
+        {
+          value: 3,
+          label: "琛ㄥ崟宸插彂閫�",
+        },
+        {
+          value: 5,
+          label: "鍙戦�佸け璐�",
+        },
+        {
+          value: 6,
+          label: "宸插畬鎴�",
+        },
+        {
+          value: 4,
+          label: "涓嶆墽琛�",
+        },
+      ],
       // 鏂板鍔熻兘鏁版嵁
       showPatientInfo: true,
       showContinuationCareBtn: false, // 鎺у埗寤剁画鎶ょ悊鎸夐挳鏄剧ず
@@ -1275,6 +1335,14 @@
           label: "鍏朵粬",
           value: "7",
         },
+      ],
+      quickContents: [
+        "鐥呮儏绋冲畾锛岀户缁綋鍓嶆不鐤�",
+        "鎮h�呭凡姝讳骸",
+        "鎮h�呬笉闇�瑕侀殢璁�",
+        "鎸夋椂鏈嶈嵂锛屾敞鎰忎紤鎭�",
+        "楗娓呮贰锛屽繉杈涜荆",
+        "棰勭害涓嬫澶嶈瘖",
       ],
       tableDatatop: [], //棰樼洰琛�
       voiceDatatop: [], //棰樼洰琛�
@@ -1506,6 +1574,10 @@
     this.Voicetype = this.$route.query.Voicetype;
     this.visitCount = this.$route.query.visitCount;
     this.serviceType = this.$route.query.serviceType;
+    this.visitAgain = store.getters.visitAgain;
+    console.log(store.getters.visitAgain);
+
+
     this.orgname = localStorage.getItem("orgname");
     if (this.orgname == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯") {
       this.showContinuationCareBtn = true;
@@ -1589,6 +1661,29 @@
       }
       return ""; // 姝e父 - 鏃犵壒娈婃牱寮�
     },
+    insertText(text) {
+      const textarea = this.$refs.textareaRef;
+      console.log(textarea);
+
+      if (!textarea) return;
+
+      const target = textarea.$el.querySelector("textarea");
+      const start = target.selectionStart;
+      const end = target.selectionEnd;
+      const original = this.form.remark;
+      console.log(original, 11);
+
+      // 鍦ㄥ厜鏍囧鎻掑叆锛屽苟鏇存柊鍏夋爣浣嶇疆
+      this.form.remark =
+        original.substring(0, start) + text + original.substring(end);
+
+      // 淇濇寔鐒︾偣骞剁Щ鍔ㄥ厜鏍囧埌鎻掑叆鍐呭鍚�
+      this.$nextTick(() => {
+        target.focus();
+        const newPos = start + text.length;
+        target.setSelectionRange(newPos, newPos);
+      });
+    },
     // 鑾峰彇闂嵎鏁版嵁
     getsearchrResults(id) {
       getsearchrResults({
@@ -1629,8 +1724,25 @@
       });
     },
     //鎮h��360璺宠浆
-    gettoken360(sfzh, drcode, drname) {
-      // this.$modal.msgWarning("360鍔熻兘鏆傛湭寮�閫�");
+    gettoken360(sfzh, drcode, drname, id) {
+      const orgname = localStorage.getItem("orgname");
+      if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
+        query360PatInfonh(id).then((res) => {
+          if (res.url) {
+            window.open(res.url, "_blank");
+          } else {
+            this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
+          }
+        });
+        return;
+      } else if (
+        orgname == "绗竴浜烘皯鍖婚櫌婀栨花闄㈠尯" ||
+        orgname == "绗竴浜烘皯鍖婚櫌鍚村北闄㈠尯"
+      ) {
+        let url = `http://192.200.81.189:9100/blj/view?BINGRENID=${id}&YONGHUID=DBA`;
+        window.open(url, "_blank");
+        return;
+      }
 
       this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
 
@@ -1806,10 +1918,7 @@
         // 澶勭悊 scriptResult锛岀洿鎺ヤ慨鏀瑰師濮嬫暟鎹�
         if (item.scriptType == 2 && item.scriptResult) {
           // 澶勭悊鏁扮粍绫诲瀷鐨� scriptResult
-          if (
-            Array.isArray(item.scriptResult) &&
-            item.scriptResult.length > 0
-          ) {
+          if (Array.isArray(item.scriptResult)) {
             item.originalScriptResult = item.scriptResult; // 淇濆瓨鍘熷鏁扮粍锛堝彲閫夛級
             item.scriptResult = item.scriptResult.join("&"); // 杞崲涓哄瓧绗︿覆
           }
@@ -1840,10 +1949,10 @@
       savequestiondetail(obj).then((res) => {
         if (res.code == 200) {
           this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
-          this.Editsingletasksonyic(6);
+          this.Editsingletasksonyic(this.serviceStates);
           const orgName = localStorage.getItem("orgname");
 
-          if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌") {
+          if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌"||this.visitAgain==1) {
             this.Torouter();
             return;
           }
@@ -2023,6 +2132,9 @@
         }
         item.patid = this.patid;
         item.templateid = item.templateID;
+        if (item.nextScriptno == null) {
+          item.nextScriptno = index == dataToSubmit.length - 1 ? 0 : index + 2;
+        }
       });
       console.log("c", 3);
 
@@ -2037,7 +2149,7 @@
       const orgName = localStorage.getItem("orgname");
       console.log(orgName, "orgName");
 
-      if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌") {
+      if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌"||this.visitAgain==1) {
         this.Torouter();
         return;
       }
@@ -2102,12 +2214,15 @@
           this.form = res.rows[0].serviceSubtaskList.find(
             (item) => item.id == this.id
           );
-
+          this.form.remark = this.form.remark || "";
           this.logsheetlist = res.rows[0].serviceSubtaskList;
           this.templateid = this.form.templateid;
           this.selectedTag = this.form.excep;
           const targetDate = new Date(this.form.visitTime); // 鐩爣鏃ユ湡
           const now = new Date(); // 褰撳墠鏃堕棿
+          console.log(now,'褰撳墠鏃堕棿');
+          console.log(targetDate,'鐩爣鏃ユ湡');
+
           if (now < targetDate && this.form.sendstate == 2) {
             this.$confirm("褰撳墠鏈嶅姟鏈埌鍙戦�佹椂闂磋璋ㄦ厧淇敼", "鎻愮ず", {
               confirmButtonText: "纭畾",
@@ -2202,6 +2317,15 @@
         }
       });
     },
+    alterpatient(sendstate) {
+      alterpatient(this.userform).then((res) => {
+        if (res.code == 200) {
+          this.$modal.msgSuccess("鍩虹淇℃伅淇濆瓨鎴愬姛");
+        } else {
+          this.$modal.msgError("鍩虹淇℃伅淇敼澶辫触");
+        }
+      });
+    },
     // 寮傚父鍒楁覆鏌�
     tableRowClassName({ row, rowIndex }) {
       if (row.id == this.id) {

--
Gitblit v1.9.3