feat(escort): 记录详情页陪诊需求改为病历与诉求并支持编辑保存

This commit is contained in:
lik
2026-11-05 22:02:35 +08:00
parent 8ae07dd501
commit 221f2c8203
3 changed files with 130 additions and 81 deletions
+21 -10
View File
@@ -34,7 +34,8 @@ Page({
loadError: '',
// 编辑全部收进底部弹窗:页面只读,表单只活在弹窗里,两个弹窗各自一个开关
showNotePopup: false,
editPatientNote: '',
editMedicalHistory: '',
editDemand: '',
// 医院预约规则与下单页一致,均由订单关联的服务目录下发
showHospitalPopup: false,
provinces: [],
@@ -279,6 +280,8 @@ Page({
canPay,
canSwitchPayChannel,
patientNote: item.notes?.patientNote || '',
medicalHistory: item.inquiry?.medicalHistory || '',
demand: item.inquiry?.demand || '',
escortNote: item.notes?.escortNote || '',
medicalSummary: item.notes?.medicalSummary || '',
status: displayStatus,
@@ -450,28 +453,35 @@ Page({
})
},
// ===== 陪诊需求编辑(底部弹窗) =====
// ===== 病历与诉求编辑(底部弹窗) =====
onEditPatientNote() {
onEditInquiry() {
this.setData({
showNotePopup: true,
editPatientNote: this.data.record.patientNote || ''
editMedicalHistory: this.data.record.medicalHistory || '',
editDemand: this.data.record.demand || ''
})
},
onPatientNoteInput(e) {
this.setData({ editPatientNote: e.detail.value })
onMedicalHistoryInput(e) {
this.setData({ editMedicalHistory: e.detail.value })
},
onDemandInput(e) {
this.setData({ editDemand: e.detail.value })
},
onCancelEdit() {
this.setData({ showNotePopup: false })
},
onSavePatientNote() {
const note = this.data.editPatientNote.trim()
onSaveInquiry() {
const medicalHistory = this.data.editMedicalHistory.trim()
const demand = this.data.editDemand.trim()
wx.showLoading({ title: '保存中...' })
API.escort.updateRecord(this.data.recordId, {
'notes.patientNote': note
'inquiry.medicalHistory': medicalHistory,
'inquiry.demand': demand
})
.then((res) => {
wx.hideLoading()
@@ -479,7 +489,8 @@ Page({
wx.showToast({ title: '保存成功', icon: 'success' })
this.setData({
showNotePopup: false,
'record.patientNote': note
'record.medicalHistory': medicalHistory,
'record.demand': demand
})
} else {
wx.showToast({ title: res.msg || '保存失败', icon: 'none' })