442 lines
20 KiB
Plaintext
442 lines
20 KiB
Plaintext
<view class="page-bg">
|
||
<!-- 数据到位前不渲染内容:record 初始是 {},直接铺开会先闪一帧
|
||
「就诊医院待补充 / ¥0.00」的假数据,用 _id 作到位判据 -->
|
||
<view class="container" wx:if="{{record._id}}">
|
||
|
||
<!-- 状态头:短横色标 + 状态胶囊 + 状态说明,是本页的「单据抬头」,不走卡片。
|
||
状态色只包住胶囊文字本身(DESIGN.md §三),不做整块主色面板;
|
||
客服入口收到抬头右侧:支付、改期、退款等问题不必等某个提示行出现才找得到 -->
|
||
<view class="page-header">
|
||
<view class="header-accent"></view>
|
||
<view class="status-row">
|
||
<view
|
||
class="status-chip status-chip-lg"
|
||
style="background: {{record.statusBg}}; color: {{record.statusColor}}; border-color: {{record.statusBorder}};"
|
||
>{{record.statusText}}</view>
|
||
<text class="header-subtitle" wx:if="{{record.status !== 'completed' && record.status !== 'cancelled'}}">{{record.statusDesc}}</text>
|
||
<view
|
||
class="header-support"
|
||
aria-role="button"
|
||
aria-label="联系客服"
|
||
bindtap="onContactSupport"
|
||
>
|
||
<t-icon name="help-circle" size="32rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 本页面向就诊人或家属,默认只回答「何时、去哪、给谁、什么服务、多少钱」。
|
||
档案、支付明细和订单技术信息收进展开区;所有修改仍沿用分区入口 -->
|
||
|
||
<!-- 就诊基本信息卡:这页是就诊人自己看「哪天几点去哪、谁陪我」,
|
||
不是商家认顾客的订单卡——不铺自己的头像与手机号,
|
||
时间提到首落点,陪诊师单独一行(平台分配后才是本人最需要认的人) -->
|
||
<view class="card appointment-card">
|
||
|
||
<!-- 时间:卡内首落点。日期给全卡最大字号,时段用暖橙同处一行。
|
||
完整信息的入口不再是一行文字开关:卡片右上角一枚向下箭头,
|
||
点开后就在原位铺开展开区 -->
|
||
<view class="schedule-row">
|
||
<view class="schedule-block">
|
||
<text class="schedule-date {{!record.scheduleDateText ? 'is-empty' : ''}}">{{record.scheduleDateText || '预约日期待定'}}</text>
|
||
<text class="schedule-time" wx:if="{{record.scheduleTimeText}}">{{record.scheduleTimeText}}</text>
|
||
</view>
|
||
<view
|
||
class="details-expand"
|
||
aria-role="button"
|
||
aria-label="{{showAllDetails ? '收起完整订单信息' : '展开完整订单信息'}}"
|
||
aria-expanded="{{showAllDetails}}"
|
||
bindtap="onToggleDetails"
|
||
>
|
||
<view class="details-expand-icon {{showAllDetails ? 'is-expanded' : ''}}">
|
||
<t-icon name="chevron-down" size="32rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 医院 / 服务 / 就诊人:两字小标签逐行作答 -->
|
||
<view class="appt-rows">
|
||
<view class="appt-row">
|
||
<text class="appt-label">医院</text>
|
||
<view class="appt-value">
|
||
<text class="appt-text {{!record.hospitalName ? 'is-empty' : ''}}">{{record.hospitalName || '就诊医院待补充'}}</text>
|
||
<text class="appt-text" wx:if="{{record.hospitalDepartment}}"> · {{record.hospitalDepartment}}</text>
|
||
<text class="appt-sub" wx:if="{{record.hospitalAddress}}">{{record.hospitalAddress}}</text>
|
||
</view>
|
||
<view
|
||
class="row-entry"
|
||
wx:if="{{record.canEditBooking}}"
|
||
aria-role="button"
|
||
aria-label="修改医院预约信息"
|
||
bindtap="onEditHospital"
|
||
>
|
||
<t-icon name="edit" size="28rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
<!-- 就诊人先于服务:家属打开单据第一件事往往是核对「是不是我家老人」,
|
||
这比看订的是哪项服务更靠前;就诊人降为一行即可,
|
||
陪诊师不在此行重复,下方独立卡片承载姓名与电话 -->
|
||
<view class="appt-row">
|
||
<text class="appt-label">就诊人</text>
|
||
<view class="appt-value">
|
||
<text class="appt-text">{{record.patientName || '--'}}</text>
|
||
<text class="appt-text" wx:if="{{record.patientBrief.length > 0}}"> · {{record.patientBrief[0].text}}</text>
|
||
<text class="appt-text" wx:if="{{record.patientBrief.length > 1}}"> · {{record.patientBrief[1].text}}</text>
|
||
</view>
|
||
<view
|
||
class="row-entry"
|
||
wx:if="{{record.healthProfileId}}"
|
||
aria-role="button"
|
||
aria-label="查看就诊人档案"
|
||
bindtap="onViewProfile"
|
||
>
|
||
<t-icon name="chevron-right" size="28rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
<view class="appt-row">
|
||
<text class="appt-label">服务</text>
|
||
<view class="appt-value">
|
||
<text class="appt-text">{{record.escortServiceName || '陪诊服务'}}</text>
|
||
<text class="appt-text" wx:if="{{record.sexRequirementText}}"> · 性别要求{{record.sexRequirementText}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 费用:标签与金额同行对齐;支付状态胶囊收在行尾 -->
|
||
<view class="fee-line">
|
||
<text class="appt-label">费用</text>
|
||
<text class="fee-amount">¥{{record.totalFee}}</text>
|
||
<view class="fee-side">
|
||
<view
|
||
class="status-chip"
|
||
wx:if="{{record.paymentStatus !== 'paid'}}"
|
||
style="background: {{record.paymentStatusBg}}; color: {{record.paymentStatusColor}}; border-color: {{record.paymentStatusBorder}};"
|
||
>{{record.paymentStatusText}}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 支付与退款的引导统一由抬头的客服入口承担,
|
||
不再在卡内挂一行「请联系客服…」:那句话只对未支付状态成立,
|
||
却长期占着卡内一条常驻行位 -->
|
||
|
||
<view class="cancel-summary" wx:if="{{record.status === 'cancelled' && record.cancelReason}}">
|
||
<text class="cancel-summary-label">取消原因</text>
|
||
<text class="cancel-summary-value">{{record.cancelReason}}</text>
|
||
</view>
|
||
|
||
<!-- 完整信息按需展开,已完成、已取消等只读订单也始终可以核对 -->
|
||
<view class="full-details" wx:if="{{showAllDetails}}">
|
||
<!-- 手机号已不在摘要卡里(本人知道自己号码),此处也只留核对用的身高体重与证件号 -->
|
||
<view class="detail-group" wx:if="{{record.patientMeta.length > 0 || record.patientIdnumber}}">
|
||
<text class="detail-group-title">就诊人资料</text>
|
||
<view class="meta-list detail-patient-meta" wx:if="{{record.patientMeta.length > 0}}">
|
||
<block wx:for="{{record.patientMeta}}" wx:key="id">
|
||
<view class="meta-sep" wx:if="{{index > 0}}"></view>
|
||
<text class="meta-item">{{item.text}}</text>
|
||
</block>
|
||
</view>
|
||
<view class="detail-row" wx:if="{{record.patientIdnumber}}">
|
||
<text class="detail-label">身份证号</text>
|
||
<text class="detail-value">{{record.patientIdnumber}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 收货信息为下单时的订单快照,不随后续就诊人资料变化 -->
|
||
<view class="detail-group" wx:if="{{record.shippingAddress && record.shippingAddress.address}}">
|
||
<text class="detail-group-title">收货信息</text>
|
||
<text class="shipping-recipient">{{record.shippingAddress.recipientName}} {{record.shippingAddress.mobile}}</text>
|
||
<text class="shipping-address">{{record.shippingAddress.address}}</text>
|
||
</view>
|
||
|
||
<view class="detail-group">
|
||
<text class="detail-group-title">订单信息</text>
|
||
<view class="detail-row">
|
||
<text class="detail-label">订单编号</text>
|
||
<text class="detail-value order-no">{{record.displayId}}</text>
|
||
</view>
|
||
<view class="detail-row">
|
||
<text class="detail-label">创建时间</text>
|
||
<text class="detail-value">{{record.createTime || '--'}}</text>
|
||
</view>
|
||
<view class="detail-row">
|
||
<text class="detail-label">更新时间</text>
|
||
<text class="detail-value">{{record.updateTime || '--'}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 陪诊师卡片:已派单显示名与电话;派单正常时后台会写姓名,
|
||
若只有 id 未冗余名则退成「已安排」,不误报「待分配」。
|
||
未派单(如待确认)显示占位,让用户知道「会有一位陪诊师」;
|
||
已取消、已完成且无人可联系时不出现——那是正常结果,不必提示 -->
|
||
<view class="section attendant-section" wx:if="{{record.hasAttendant || (record.status !== 'cancelled' && record.status !== 'completed')}}">
|
||
<view class="section-head">
|
||
<view class="section-bar"></view>
|
||
<text class="section-title">陪诊师</text>
|
||
</view>
|
||
|
||
<view class="card attendant-card">
|
||
<text class="attendant-name" wx:if="{{record.hasAttendant}}">{{record.attendantName || '已安排'}}</text>
|
||
<text class="attendant-empty" wx:else>待分配</text>
|
||
<text class="attendant-phone" wx:if="{{record.attendantMobile}}">{{record.attendantMobile}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 有内容才铺正文;可编辑但内容为空时只留一个添加入口,不让空卡占位。
|
||
已完成订单的陪诊记录和就诊摘要直接展示,不收入展开区 -->
|
||
<view class="section note-section" wx:if="{{record.patientNote || record.escortNote || record.medicalSummary || record.canEditNote}}">
|
||
<view class="section-head">
|
||
<view class="section-bar"></view>
|
||
<text class="section-title">{{record.status === 'completed' && (record.escortNote || record.medicalSummary) ? '服务结果' : (record.escortNote || record.medicalSummary ? '陪诊需求与记录' : '陪诊需求')}}</text>
|
||
<view class="section-link" wx:if="{{record.canEditNote && (record.patientNote || record.escortNote || record.medicalSummary)}}" bindtap="onEditPatientNote">
|
||
<text class="section-link-text">修改</text>
|
||
<t-icon name="edit" size="26rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
|
||
<view class="card note-card">
|
||
<view class="note-block" wx:if="{{record.patientNote}}">
|
||
<text class="note-label" wx:if="{{record.escortNote || record.medicalSummary}}">陪诊需求</text>
|
||
<text class="note-text">{{record.patientNote}}</text>
|
||
</view>
|
||
<view class="note-block" wx:if="{{record.escortNote}}">
|
||
<text class="note-label">陪诊记录</text>
|
||
<text class="note-text">{{record.escortNote}}</text>
|
||
</view>
|
||
<view class="note-block" wx:if="{{record.medicalSummary}}">
|
||
<text class="note-label">就诊摘要</text>
|
||
<text class="note-text">{{record.medicalSummary}}</text>
|
||
</view>
|
||
|
||
<!-- 可编辑且三段全空:给一个轻量添加入口,避免用户失去补充需求的路径 -->
|
||
<view
|
||
class="note-add"
|
||
wx:if="{{record.canEditNote && !record.patientNote && !record.escortNote && !record.medicalSummary}}"
|
||
aria-role="button"
|
||
aria-label="添加陪诊需求"
|
||
bindtap="onEditPatientNote"
|
||
>
|
||
<t-icon name="add" size="28rpx" color="#9B4508" />
|
||
<text class="note-add-text">添加陪诊需求</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 底部占位:只为垫开固定底栏,底栏不出现时不留这段空 -->
|
||
<view class="bottom-placeholder" wx:if="{{record.showBottomBar}}"></view>
|
||
</view>
|
||
|
||
<view class="page-state" wx:if="{{loading && !record._id}}">
|
||
<t-loading theme="circular" size="40rpx" text="加载中..." />
|
||
</view>
|
||
<view class="page-state" wx:if="{{!loading && loadError && !record._id}}">
|
||
<text class="page-state-text">{{loadError}}</text>
|
||
<button class="page-retry" bindtap="retryLoad">重新加载</button>
|
||
</view>
|
||
|
||
<!-- 底部操作栏:完成状态仅由平台流转,用户不确认完成 -->
|
||
<view class="bottom-bar" wx:if="{{record.showBottomBar}}">
|
||
<!-- 首页入口:底栏最左的固定位图标按钮,点了直接回首页。
|
||
独立于订单动作,固定宽度、不参与右侧按钮的等宽分配;
|
||
首页是 tabBar 页,必须走 switchTab,navigateTo 跳不过去 -->
|
||
<view
|
||
class="home-btn"
|
||
aria-role="button"
|
||
aria-label="返回首页"
|
||
bindtap="onGoHome"
|
||
>
|
||
<view class="home-icon"></view>
|
||
</view>
|
||
<view
|
||
class="action-btn action-ghost"
|
||
wx:if="{{record.canCancel}}"
|
||
bindtap="onCancelOrder"
|
||
>取消订单</view>
|
||
<view
|
||
class="action-btn {{record.status === 'cancelled' ? 'action-primary' : 'action-ghost'}}"
|
||
wx:if="{{record.canRebook}}"
|
||
bindtap="onRebook"
|
||
>再次预约</view>
|
||
</view>
|
||
|
||
<!-- 医院预约信息编辑弹窗:页面内嵌表单全部收进这里。
|
||
弹窗比取消弹窗高(popup-tall),表单行可滚动 -->
|
||
<view class="popup-mask {{showHospitalPopup ? 'show' : ''}}" bindtap="onCancelHospitalEdit"></view>
|
||
<view class="popup-content popup-tall {{showHospitalPopup ? 'show' : ''}}">
|
||
<view class="popup-header">
|
||
<text class="popup-title">修改医院预约信息</text>
|
||
<view class="popup-close" aria-role="button" aria-label="关闭弹窗" bindtap="onCancelHospitalEdit">
|
||
<t-icon name="close" size="40rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
<view class="popup-body">
|
||
<view class="form-row">
|
||
<text class="form-label">就诊省份</text>
|
||
<picker
|
||
class="form-picker"
|
||
mode="selector"
|
||
range="{{provinces}}"
|
||
value="{{editHospital.provinceIndex}}"
|
||
bindchange="onProvinceChange"
|
||
>
|
||
<view class="form-picker-value">{{editHospital.province || '请选择省份'}}</view>
|
||
</picker>
|
||
</view>
|
||
<view class="form-row">
|
||
<text class="form-label">就诊医院</text>
|
||
<input
|
||
class="form-input"
|
||
value="{{editHospital.name}}"
|
||
placeholder="请输入医院名称"
|
||
placeholder-class="input-placeholder"
|
||
bindinput="onHospitalFieldInput"
|
||
data-field="name"
|
||
/>
|
||
</view>
|
||
<view class="form-row">
|
||
<text class="form-label">医院地址</text>
|
||
<input
|
||
class="form-input"
|
||
value="{{editHospital.address}}"
|
||
placeholder="请输入医院地址"
|
||
placeholder-class="input-placeholder"
|
||
bindinput="onHospitalFieldInput"
|
||
data-field="address"
|
||
/>
|
||
</view>
|
||
<view class="form-row">
|
||
<text class="form-label">就诊科室</text>
|
||
<input
|
||
class="form-input"
|
||
value="{{editHospital.department}}"
|
||
placeholder="请输入就诊科室"
|
||
placeholder-class="input-placeholder"
|
||
bindinput="onHospitalFieldInput"
|
||
data-field="department"
|
||
/>
|
||
</view>
|
||
<view class="form-row">
|
||
<text class="form-label">就诊医生</text>
|
||
<input
|
||
class="form-input"
|
||
value="{{editHospital.doctor}}"
|
||
placeholder="请输入就诊医生"
|
||
placeholder-class="input-placeholder"
|
||
bindinput="onHospitalFieldInput"
|
||
data-field="doctor"
|
||
/>
|
||
</view>
|
||
<view class="form-row">
|
||
<text class="form-label">病历号</text>
|
||
<input
|
||
class="form-input"
|
||
value="{{editHospital.medicalRecordNo}}"
|
||
placeholder="请输入病历号"
|
||
placeholder-class="input-placeholder"
|
||
bindinput="onHospitalFieldInput"
|
||
data-field="medicalRecordNo"
|
||
/>
|
||
</view>
|
||
<view class="form-row">
|
||
<text class="form-label">预约日期</text>
|
||
<picker
|
||
class="form-picker"
|
||
mode="date"
|
||
value="{{editHospital.scheduleDate}}"
|
||
start="{{minAppointmentDate}}"
|
||
bindchange="onScheduleDateChange"
|
||
>
|
||
<view class="form-picker-value">{{editHospital.scheduleDate || '请选择日期'}}</view>
|
||
</picker>
|
||
</view>
|
||
<view class="form-row">
|
||
<text class="form-label">预约时间</text>
|
||
<picker
|
||
wx:if="{{fixedTime}}"
|
||
class="form-picker"
|
||
mode="selector"
|
||
range="{{timeOptions}}"
|
||
value="{{editHospital.sessionIndex}}"
|
||
bindchange="onStartTimeChange"
|
||
>
|
||
<view class="form-picker-value">{{timeOptions[editHospital.sessionIndex] || '请选择服务班次'}}</view>
|
||
</picker>
|
||
<picker
|
||
wx:else
|
||
class="form-picker"
|
||
mode="time"
|
||
value="{{editHospital.startTime}}"
|
||
start="{{timeStart}}"
|
||
end="{{timeEnd}}"
|
||
bindchange="onStartTimeChange"
|
||
>
|
||
<view class="form-picker-value">{{editHospital.startTime || '请选择时间'}}</view>
|
||
</picker>
|
||
</view>
|
||
</view>
|
||
<view class="popup-footer">
|
||
<view class="popup-btn popup-btn-ghost" bindtap="onCancelHospitalEdit">取消</view>
|
||
<view class="popup-btn popup-btn-primary" bindtap="onSaveHospital">保存</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 陪诊需求编辑弹窗 -->
|
||
<view class="popup-mask {{showNotePopup ? 'show' : ''}}" bindtap="onCancelEdit"></view>
|
||
<view class="popup-content {{showNotePopup ? 'show' : ''}}">
|
||
<view class="popup-header">
|
||
<text class="popup-title">修改陪诊需求</text>
|
||
<view class="popup-close" aria-role="button" aria-label="关闭弹窗" bindtap="onCancelEdit">
|
||
<t-icon name="close" size="40rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
<view class="popup-body">
|
||
<textarea
|
||
class="note-textarea"
|
||
value="{{editPatientNote}}"
|
||
placeholder="请输入陪诊需求或症状描述"
|
||
maxlength="500"
|
||
placeholder-class="input-placeholder"
|
||
bindinput="onPatientNoteInput"
|
||
focus="{{showNotePopup}}"
|
||
/>
|
||
</view>
|
||
<view class="popup-footer">
|
||
<view class="popup-btn popup-btn-ghost" bindtap="onCancelEdit">取消</view>
|
||
<view class="popup-btn popup-btn-primary" bindtap="onSavePatientNote">保存</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 取消订单弹窗 -->
|
||
<view class="popup-mask {{showCancelPopup ? 'show' : ''}}" bindtap="onCloseCancelPopup"></view>
|
||
<view class="popup-content {{showCancelPopup ? 'show' : ''}}">
|
||
<view class="popup-header">
|
||
<text class="popup-title">取消订单</text>
|
||
<view class="popup-close" aria-role="button" aria-label="关闭弹窗" bindtap="onCloseCancelPopup">
|
||
<t-icon name="close" size="40rpx" color="#6F655C" />
|
||
</view>
|
||
</view>
|
||
<view class="popup-body">
|
||
<text class="cancel-tip">确定要取消该陪诊订单吗?取消后陪诊师将收到通知。</text>
|
||
<view class="cancel-reason-list">
|
||
<view
|
||
class="cancel-reason-item {{cancelReason === item.text ? 'active' : ''}}"
|
||
wx:for="{{cancelReasons}}"
|
||
wx:key="id"
|
||
data-reason="{{item.text}}"
|
||
bindtap="onSelectCancelReason"
|
||
>
|
||
<view class="reason-radio">
|
||
<view class="reason-radio-inner" wx:if="{{cancelReason === item.text}}"></view>
|
||
</view>
|
||
<text class="reason-text">{{item.text}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="popup-footer">
|
||
<view class="popup-btn popup-btn-ghost" bindtap="onCloseCancelPopup">再想想</view>
|
||
<view class="popup-btn popup-btn-primary" bindtap="onConfirmCancel">确认取消</view>
|
||
</view>
|
||
</view>
|
||
</view>
|