From 294fee4d880c27b78046a81d4db8bbe97e441086 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 14 Mar 2026 18:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/tcm-prescription/index.vue | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/admin/src/components/tcm-prescription/index.vue b/admin/src/components/tcm-prescription/index.vue index 5e86d7d1..a0cf43a5 100644 --- a/admin/src/components/tcm-prescription/index.vue +++ b/admin/src/components/tcm-prescription/index.vue @@ -548,6 +548,29 @@ const handleSave = async () => { } const handleNewPrescription = () => { + const saved = savedPrescription.value + if (saved) { + // 将患者信息、诊断信息填入表单,新建处方时保留 + formData.diagnosis_id = saved.diagnosis_id ?? formData.diagnosis_id + formData.appointment_id = saved.appointment_id ?? formData.appointment_id + formData.patient_name = saved.patient_name || '' + formData.gender = saved.gender ?? 0 + formData.gender_desc = saved.gender === 1 ? '男' : '女' + formData.age = saved.age ?? 0 + formData.phone = saved.phone || '' + formData.visit_no = saved.visit_no || '' + formData.prescription_date = new Date().toISOString().slice(0, 10) + formData.pulse = saved.pulse || '' + formData.tongue = saved.tongue || '' + formData.clinical_diagnosis = saved.clinical_diagnosis || '' + formData.dose_count = 1 + formData.usage_instruction = '水煎服一日二次' + formData.amount = 0 + formData.doctor_name = userStore.userInfo?.name || saved.doctor_name || '' + formData.doctor_signature = '' + formData.herbs = [] + setTimeout(() => initSignatureCanvas(), 100) + } savedPrescription.value = null }