From c70f5e1d471ddf002ef0ebd5f4c6a5ed1c865d0d Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:47:58 +0800
Subject: [PATCH] 测试完成

---
 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