更新
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user