Files
wxapp_companion/pages/order/orderDetail.wxml
T
2026-09-03 13:29:39 +08:00

179 lines
7.3 KiB
Plaintext

<!--pages/order/orderDetail.wxml-->
<view class="detail-page">
<!-- 加载中 -->
<view class="loading-box" wx:if="{{!loaded}}">
<text class="loading-text">加载中...</text>
</view>
<block wx:if="{{loaded && order}}">
<!-- 顶部状态栏 -->
<view class="status-header status-{{order.status}}">
<view class="status-content">
<text class="status-text">{{statusText}}</text>
<text class="status-desc">{{statusDesc}}</text>
</view>
</view>
<!-- 患者信息 -->
<view class="info-section">
<text class="section-title">患者信息</text>
<view class="info-card">
<!-- 订单必须关联健康档案:按档案ID加载(不读缓存,直接请求最新) -->
<patient-info
profile-id="{{healthProfileId}}"
use-cache="{{false}}"
dial="{{true}}"
bind:call="callPhone"
bindtap="onProfileTap"
/>
</view>
</view>
<!-- 就诊信息 -->
<view class="info-section">
<text class="section-title">就诊信息</text>
<view class="info-card">
<view class="info-row">
<text class="info-label">医院</text>
<text class="info-value">{{order.hospital.name || '未知医院'}}</text>
</view>
<view class="info-row" wx:if="{{order.hospital.province}}">
<text class="info-label">地区</text>
<text class="info-value">{{order.hospital.province}}</text>
</view>
<view class="info-row" wx:if="{{order.hospital.address}}">
<text class="info-label">地址</text>
<text class="info-value">{{order.hospital.address}}</text>
</view>
<view class="info-row" wx:if="{{order.hospital.department}}">
<text class="info-label">科室</text>
<text class="info-value">{{order.hospital.department}}</text>
</view>
<view class="info-row" wx:if="{{order.hospital.doctor}}">
<text class="info-label">医生</text>
<text class="info-value">{{order.hospital.doctor}}</text>
</view>
<view class="info-row" wx:if="{{order.hospital.medicalRecordNo}}">
<text class="info-label">病历号</text>
<text class="info-value">{{order.hospital.medicalRecordNo}}</text>
</view>
</view>
</view>
<!-- 服务信息 -->
<view class="info-section">
<text class="section-title">服务信息</text>
<view class="info-card">
<view class="info-row" wx:if="{{order.escort.serviceName}}">
<text class="info-label">服务类型</text>
<text class="info-value">{{order.escort.serviceName}}</text>
</view>
<view class="info-row">
<text class="info-label">性别要求</text>
<text class="info-value">{{sexRequirementText}}</text>
</view>
<view class="info-row">
<text class="info-label">预约日期</text>
<text class="info-value">{{scheduleDateText}}</text>
</view>
<view class="info-row" wx:if="{{scheduleStartTimeText}}">
<text class="info-label">开始时间</text>
<text class="info-value">{{scheduleStartTimeText}}</text>
</view>
<view class="info-row" wx:if="{{scheduleEndTimeText}}">
<text class="info-label">结束时间</text>
<text class="info-value">{{scheduleEndTimeText}}</text>
</view>
<view class="info-row" wx:if="{{order.schedule.duration}}">
<text class="info-label">服务时长</text>
<text class="info-value">{{order.schedule.duration}}分钟</text>
</view>
</view>
</view>
<!-- 陪诊员信息 -->
<view class="info-section" wx:if="{{order.attendant.name}}">
<text class="section-title">陪诊员</text>
<view class="info-card">
<view class="attendant-header">
<view class="attendant-avatar">
<text class="avatar-text">{{attendantFirstChar}}</text>
</view>
<view class="attendant-info">
<view class="attendant-name-row">
<text class="attendant-name">{{order.attendant.name}}</text>
<text class="patient-sex male" wx:if="{{attendantSexText}}">{{attendantSexText}}</text>
</view>
<view class="attendant-phone" data-phone="{{order.attendant.mobile}}" bindtap="callPhone">
<text>{{order.attendant.mobile || '暂无电话'}}</text>
<text class="call-icon" wx:if="{{order.attendant.mobile}}"> 拨打</text>
</view>
</view>
</view>
</view>
</view>
<!-- 费用信息 -->
<view class="info-section">
<text class="section-title">费用信息</text>
<view class="info-card">
<view class="info-row">
<text class="info-label">服务费用</text>
<text class="info-value fee-value">¥{{order.payment.totalFee || 0}}</text>
</view>
<view class="info-row">
<text class="info-label">支付状态</text>
<text class="info-value">{{paymentStatusText}}</text>
</view>
</view>
</view>
<!-- 备注信息 -->
<view class="info-section" wx:if="{{order.notes.patientNote || order.notes.escortNote || order.notes.medicalSummary}}">
<text class="section-title">备注信息</text>
<view class="info-card">
<view class="note-block" wx:if="{{order.notes.patientNote}}">
<text class="note-label">患者备注</text>
<text class="note-content">{{order.notes.patientNote}}</text>
</view>
<view class="note-block" wx:if="{{order.notes.escortNote}}">
<text class="note-label">陪诊记录</text>
<text class="note-content">{{order.notes.escortNote}}</text>
</view>
<view class="note-block" wx:if="{{order.notes.medicalSummary}}">
<text class="note-label">就诊摘要</text>
<text class="note-content">{{order.notes.medicalSummary}}</text>
</view>
</view>
</view>
<!-- 订单信息 -->
<view class="info-section">
<text class="section-title">订单信息</text>
<view class="info-card">
<view class="info-row">
<text class="info-label">订单编号</text>
<text class="info-value">{{order._id}}</text>
</view>
<view class="info-row" wx:if="{{createtimeText}}">
<text class="info-label">创建时间</text>
<text class="info-value">{{createtimeText}}</text>
</view>
<view class="info-row" wx:if="{{updatetimeText}}">
<text class="info-label">更新时间</text>
<text class="info-value">{{updatetimeText}}</text>
</view>
</view>
</view>
<!-- 底部操作 -->
<view class="bottom-actions" wx:if="{{showEditBtn || showConfirmBtn || showCancelBtn || showStartBtn || showCompleteBtn}}">
<view class="action-btn btn-ghost" wx:if="{{showEditBtn}}" bindtap="onEdit">编辑订单</view>
<view class="action-btn btn-ghost" wx:if="{{showCancelBtn}}" bindtap="onCancel">取消订单</view>
<view class="action-btn btn-solid" wx:if="{{showConfirmBtn}}" bindtap="onConfirm">确认订单</view>
<view class="action-btn btn-solid" wx:if="{{showStartBtn}}" bindtap="onStart">开始服务</view>
<view class="action-btn btn-solid" wx:if="{{showCompleteBtn}}" bindtap="onComplete">完成服务</view>
</view>
</block>
</view>