From bbbc478129f72b26e2ec4a2e981ed8698a96880c Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 22 十月 2026 00:28:18 +0800
Subject: [PATCH] 当service_type=6时,需要根据传入的入院还是离院病区(病区)去后端查询

---
 src/views/patient/archives/components/OutpatientPicker.vue |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/views/patient/archives/components/OutpatientPicker.vue b/src/views/patient/archives/components/OutpatientPicker.vue
index 290ef91..53a1513 100644
--- a/src/views/patient/archives/components/OutpatientPicker.vue
+++ b/src/views/patient/archives/components/OutpatientPicker.vue
@@ -61,7 +61,7 @@
 
 <script>
 import { listPatouthosp } from "@/api/smartor/patouthosp";
-import { loadArchives, saveArchives, buildArchiveRecord } from "../types";
+import { createArchive } from "../apiAdapter";
 import store from "@/store";
 
 export default {
@@ -124,12 +124,14 @@
     },
     handleConfirm() {
       if (!this.currentRow) return;
-      const record = buildArchiveRecord(this.currentRow, this.type, this.sourcePage);
-      const all = loadArchives();
-      all.push(record);
-      saveArchives(all);
-      this.dialogVisible = false;
-      this.$emit("picked", record);
+      this.loading = true;
+      createArchive(this.currentRow, this.type, this.sourcePage || "outpatient")
+        .then((record) => {
+          this.dialogVisible = false;
+          this.$emit("picked", record);
+        })
+        .catch(() => {})
+        .finally(() => { this.loading = false; });
     },
     handleClose() {
       this.currentRow = null;

--
Gitblit v1.9.3