Files
wxapp_escort/pages/escort/recorddetail.wxml
T
2026-10-04 22:13:54 +08:00

327 lines
14 KiB
Plaintext

<view class="page-bg">
<view class="container">
<!-- 状态头:短横色标 + 状态胶囊 + 状态说明。
状态色只包住胶囊文字本身(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>
</view>
<text class="header-subtitle">{{record.statusDesc}}</text>
</view>
<!-- 就诊人信息 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">就诊人信息</text>
<view class="section-link" wx:if="{{!editingPatient}}" bindtap="onEditPatientInfo">
<text class="section-link-text">修改</text>
<t-icon name="edit" size="26rpx" color="#9B4508" />
</view>
</view>
<block wx:if="{{!editingPatient}}">
<view class="info-row">
<text class="info-label">姓名</text>
<text class="info-value">{{record.patientName || '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">性别</text>
<text class="info-value">{{record.patientSexText || '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">年龄</text>
<text class="info-value">{{record.patientAge ? record.patientAge + '岁' : '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">体重</text>
<text class="info-value">{{record.patientWeight ? record.patientWeight + 'kg' : '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">身高</text>
<text class="info-value">{{record.patientHeight ? record.patientHeight + 'cm' : '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">联系电话</text>
<text class="info-value info-link" bindtap="onCallPatient">{{record.patientMobile || '--'}}</text>
</view>
<view class="info-row" wx:if="{{record.patientIdnumber}}">
<text class="info-label">身份证号</text>
<text class="info-value">{{record.patientIdnumber}}</text>
</view>
</block>
<block wx:else>
<view class="edit-row">
<text class="edit-label">姓名</text>
<input class="edit-input" value="{{editPatient.name}}" placeholder="请输入姓名" placeholder-class="input-placeholder" data-field="name" bindinput="onPatientInfoInput" />
</view>
<view class="edit-row">
<text class="edit-label">性别</text>
<view class="edit-radio-group">
<view class="edit-radio {{editPatient.sex === 'male' ? 'active' : ''}}" data-value="male" bindtap="onPatientSexChange">男</view>
<view class="edit-radio {{editPatient.sex === 'female' ? 'active' : ''}}" data-value="female" bindtap="onPatientSexChange">女</view>
</view>
</view>
<view class="edit-row">
<text class="edit-label">出生年月</text>
<picker class="edit-picker" mode="date" value="{{editPatient.birth}}" end="{{today}}" bindchange="onPatientBirthChange">
<view class="edit-input {{editPatient.birth ? '' : 'placeholder'}}">{{editPatient.birth || '请选择'}}</view>
</picker>
</view>
<view class="edit-row">
<text class="edit-label">体重(kg)</text>
<input class="edit-input" type="digit" value="{{editPatient.weight}}" placeholder="请输入" placeholder-class="input-placeholder" data-field="weight" bindinput="onPatientInfoInput" />
</view>
<view class="edit-row">
<text class="edit-label">身高(cm)</text>
<input class="edit-input" type="digit" value="{{editPatient.height}}" placeholder="请输入" placeholder-class="input-placeholder" data-field="height" bindinput="onPatientInfoInput" />
</view>
<view class="edit-row">
<text class="edit-label">联系电话</text>
<input class="edit-input" type="number" value="{{editPatient.mobile}}" placeholder="请输入" placeholder-class="input-placeholder" data-field="mobile" bindinput="onPatientInfoInput" />
</view>
<view class="edit-row">
<text class="edit-label">身份证号</text>
<input class="edit-input" value="{{editPatient.idnumber}}" placeholder="请输入" placeholder-class="input-placeholder" data-field="idnumber" bindinput="onPatientInfoInput" />
</view>
<view class="edit-actions">
<view class="btn btn-ghost" bindtap="onCancelEditPatientInfo">取消</view>
<view class="btn btn-primary" bindtap="onSavePatientInfo">保存</view>
</view>
</block>
</view>
<!-- 医院预约信息 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">医院预约信息</text>
</view>
<view class="info-row">
<text class="info-label">就诊省份</text>
<text class="info-value">{{record.hospitalProvince || '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">就诊医院</text>
<text class="info-value">{{record.hospitalName || '--'}}</text>
</view>
<view class="info-row" wx:if="{{record.hospitalAddress}}">
<text class="info-label">医院地址</text>
<text class="info-value">{{record.hospitalAddress}}</text>
</view>
<view class="info-row">
<text class="info-label">就诊科室</text>
<text class="info-value">{{record.hospitalDepartment || '--'}}</text>
</view>
<view class="info-row" wx:if="{{record.hospitalDoctor}}">
<text class="info-label">就诊医生</text>
<text class="info-value">{{record.hospitalDoctor}}</text>
</view>
<view class="info-row" wx:if="{{record.medicalRecordNo}}">
<text class="info-label">病历号</text>
<text class="info-value">{{record.medicalRecordNo}}</text>
</view>
<view class="info-row">
<text class="info-label">预约日期</text>
<text class="info-value">{{record.scheduleDate || '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">预约时间</text>
<text class="info-value">{{record.scheduleStartTime || '--'}}</text>
</view>
<view class="info-row" wx:if="{{record.scheduleEndTime}}">
<text class="info-label">结束时间</text>
<text class="info-value">{{record.scheduleEndTime}}</text>
</view>
<view class="info-row" wx:if="{{record.scheduleDuration}}">
<text class="info-label">陪诊时长</text>
<text class="info-value">{{record.scheduleDuration}}分钟</text>
</view>
</view>
<!-- 陪诊服务 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">陪诊服务</text>
</view>
<view class="info-row">
<text class="info-label">服务类型</text>
<text class="info-value">{{record.escortServiceName || '陪诊服务'}}</text>
</view>
<view class="info-row" wx:if="{{record.sexRequirementText}}">
<text class="info-label">性别要求</text>
<text class="info-value">{{record.sexRequirementText}}</text>
</view>
<view class="info-row">
<text class="info-label">陪诊员</text>
<text class="info-value">{{record.attendantName || '待分配'}}</text>
</view>
<view class="info-row" wx:if="{{record.attendantMobile}}">
<text class="info-label">陪诊员电话</text>
<text class="info-value info-link" bindtap="onCallAttendant">{{record.attendantMobile}}</text>
</view>
</view>
<!-- 陪诊需求与症状 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">陪诊需求与症状</text>
<view class="section-link" wx:if="{{!editing}}" bindtap="onEditPatientNote">
<text class="section-link-text">修改</text>
<t-icon name="edit" size="26rpx" color="#9B4508" />
</view>
</view>
<block wx:if="{{editing}}">
<textarea
class="note-textarea"
value="{{editPatientNote}}"
placeholder="请输入陪诊需求或症状描述"
maxlength="500"
placeholder-class="input-placeholder"
bindinput="onPatientNoteInput"
focus="{{editing}}"
/>
<view class="edit-actions">
<view class="btn btn-ghost" bindtap="onCancelEdit">取消</view>
<view class="btn btn-primary" bindtap="onSavePatientNote">保存</view>
</view>
</block>
<block wx:else>
<view class="note-block" wx:if="{{record.patientNote}}">
<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-empty" wx:if="{{!record.patientNote && !record.escortNote && !record.medicalSummary}}">
<text class="note-empty-text">暂无备注信息</text>
</view>
</block>
</view>
<!-- 费用信息 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">费用信息</text>
</view>
<view class="info-row">
<text class="info-label">服务费用</text>
<text class="info-value fee-value">¥{{record.totalFee}}</text>
</view>
<view class="info-row">
<text class="info-label">已支付</text>
<text class="info-value">¥{{record.paidFee}}</text>
</view>
<view class="info-row">
<text class="info-label">支付状态</text>
<view
class="status-chip"
style="background: {{record.paymentStatusBg}}; color: {{record.paymentStatusColor}}; border-color: {{record.paymentStatusBorder}};"
>{{record.paymentStatusText}}</view>
</view>
</view>
<!-- 订单信息 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">订单信息</text>
</view>
<view class="info-row">
<text class="info-label">订单编号</text>
<text class="info-value order-id">{{record._id || '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">订单状态</text>
<view
class="status-chip"
style="background: {{record.statusBg}}; color: {{record.statusColor}}; border-color: {{record.statusBorder}};"
>{{record.statusText}}</view>
</view>
<view class="info-row">
<text class="info-label">创建时间</text>
<text class="info-value">{{record.createTime || '--'}}</text>
</view>
<view class="info-row">
<text class="info-label">更新时间</text>
<text class="info-value">{{record.updateTime || '--'}}</text>
</view>
</view>
<!-- 底部占位 -->
<view class="bottom-placeholder"></view>
</view>
<!-- 底部操作栏:同类实心块只保留一处——
再次预约为「已完成」时让位给「确认完成」,为「已取消」时自己成为主操作(§2.1) -->
<view class="bottom-bar">
<view
class="action-btn action-ghost"
wx:if="{{record.status === 'pending' || record.status === 'confirmed'}}"
bindtap="onCancelOrder"
>取消订单</view>
<view
class="action-btn action-ghost"
wx:if="{{record.paymentStatus === 'unpaid' && record.status !== 'completed'}}"
bindtap="onDeleteOrder"
>删除订单</view>
<view
class="action-btn action-primary"
wx:if="{{record.status === 'completed'}}"
bindtap="onConfirmComplete"
>确认完成</view>
<view
class="action-btn {{record.status === 'cancelled' ? 'action-primary' : 'action-ghost'}}"
wx:if="{{record.status === 'completed' || record.status === 'cancelled'}}"
bindtap="onRebook"
>再次预约</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" 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 ? 'active' : ''}}"
wx:for="{{cancelReasons}}"
wx:key="*this"
data-reason="{{item}}"
bindtap="onSelectCancelReason"
>
<view class="reason-radio">
<view class="reason-radio-inner" wx:if="{{cancelReason === item}}"></view>
</view>
<text class="reason-text">{{item}}</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>