feat(escort): 病历与诉求改为多材料录入与四段摘要确认
新增独立编辑页,支持 PDF、图片、语音和文字输入,解析任务可跨页面 恢复,四段结果可手动修改后确认保存;详情页改为四段只读展示, 移除原两段文本弹窗。
This commit is contained in:
@@ -36,10 +36,6 @@ Page({
|
||||
service: null,
|
||||
loading: false,
|
||||
loadError: '',
|
||||
// 编辑全部收进底部弹窗:页面只读,表单只活在弹窗里,两个弹窗各自一个开关
|
||||
showNotePopup: false,
|
||||
editMedicalHistory: '',
|
||||
editDemand: '',
|
||||
// 医院预约规则与下单页一致,均由订单关联的服务目录下发
|
||||
showHospitalPopup: false,
|
||||
provinces: [],
|
||||
@@ -264,6 +260,13 @@ Page({
|
||||
|
||||
// 预约时间派生:日期行(带星期)与开始时间同一行
|
||||
const scheduleMeta = this.buildScheduleMeta(item.schedule || {})
|
||||
const basicHealth = item.inquiry?.basicHealth || ''
|
||||
const medications = item.inquiry?.medications || ''
|
||||
const hasStructuredInquiry = Boolean(basicHealth || item.inquiry?.treatmentHistory || medications)
|
||||
const treatmentHistory = hasStructuredInquiry
|
||||
? (item.inquiry?.treatmentHistory || '')
|
||||
: (item.inquiry?.medicalHistory || '')
|
||||
const demand = item.inquiry?.demand || ''
|
||||
|
||||
return {
|
||||
_id: item._id,
|
||||
@@ -313,8 +316,11 @@ Page({
|
||||
canPay,
|
||||
canSwitchPayChannel,
|
||||
patientNote: item.notes?.patientNote || '',
|
||||
medicalHistory: item.inquiry?.medicalHistory || '',
|
||||
demand: item.inquiry?.demand || '',
|
||||
basicHealth,
|
||||
treatmentHistory,
|
||||
medications,
|
||||
demand,
|
||||
hasInquiryContent: Boolean(basicHealth || treatmentHistory || medications || demand),
|
||||
escortNote: item.notes?.escortNote || '',
|
||||
medicalSummary: item.notes?.medicalSummary || '',
|
||||
status: displayStatus,
|
||||
@@ -485,53 +491,9 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// ===== 病历与诉求编辑(底部弹窗) =====
|
||||
|
||||
// 多材料采集、异步解析和四段草稿确认统一在独立编辑页完成。
|
||||
onEditInquiry() {
|
||||
this.setData({
|
||||
showNotePopup: true,
|
||||
editMedicalHistory: this.data.record.medicalHistory || '',
|
||||
editDemand: this.data.record.demand || ''
|
||||
})
|
||||
},
|
||||
|
||||
onMedicalHistoryInput(e) {
|
||||
this.setData({ editMedicalHistory: e.detail.value })
|
||||
},
|
||||
|
||||
onDemandInput(e) {
|
||||
this.setData({ editDemand: e.detail.value })
|
||||
},
|
||||
|
||||
onCancelEdit() {
|
||||
this.setData({ showNotePopup: false })
|
||||
},
|
||||
|
||||
onSaveInquiry() {
|
||||
const medicalHistory = this.data.editMedicalHistory.trim()
|
||||
const demand = this.data.editDemand.trim()
|
||||
wx.showLoading({ title: '保存中...' })
|
||||
API.escort.updateRecord(this.data.recordId, {
|
||||
'inquiry.medicalHistory': medicalHistory,
|
||||
'inquiry.demand': demand
|
||||
})
|
||||
.then((res) => {
|
||||
wx.hideLoading()
|
||||
if (res.code === 0) {
|
||||
wx.showToast({ title: '保存成功', icon: 'success' })
|
||||
this.setData({
|
||||
showNotePopup: false,
|
||||
'record.medicalHistory': medicalHistory,
|
||||
'record.demand': demand
|
||||
})
|
||||
} else {
|
||||
wx.showToast({ title: res.msg || '保存失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
wx.hideLoading()
|
||||
wx.showToast({ title: '网络请求失败', icon: 'none' })
|
||||
})
|
||||
wx.navigateTo({ url: `/pages/escort/inquiryedit?id=${this.data.recordId}` })
|
||||
},
|
||||
|
||||
// ===== 医院预约信息编辑(底部弹窗) =====
|
||||
|
||||
Reference in New Issue
Block a user