修改了页面样式。

This commit is contained in:
lik
2026-11-03 16:15:41 +08:00
parent f78025e935
commit 82ed5c31a7
30 changed files with 3791 additions and 2989 deletions
+188 -156
View File
@@ -1,10 +1,11 @@
<view class="page-bg">
<!-- 数据到位前不渲染内容:record 初始是 {},直接铺开会先闪一帧
「就诊医院待补充 / ¥0.00 / 暂无备注信息」的假数据,用 _id 作到位判据 -->
「就诊医院待补充 / ¥0.00」的假数据,用 _id 作到位判据 -->
<view class="container" wx:if="{{record._id}}">
<!-- 状态头:短横色标 + 状态胶囊 + 状态说明,是本页的「单据抬头」,不走卡片。
状态色只包住胶囊文字本身(DESIGN.md §三),不做整块主色面板 -->
状态色只包住胶囊文字本身(DESIGN.md §三),不做整块主色面板;
客服入口收到抬头右侧:支付、改期、退款等问题不必等某个提示行出现才找得到 -->
<view class="page-header">
<view class="header-accent"></view>
<view class="status-row">
@@ -12,108 +13,190 @@
class="status-chip status-chip-lg"
style="background: {{record.statusBg}}; color: {{record.statusColor}}; border-color: {{record.statusBorder}};"
>{{record.statusText}}</view>
<text class="header-subtitle">{{record.statusDesc}}</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="{{record.healthProfileId}}" bindtap="onEditProfile">
<text class="section-link-text">修改</text>
<t-icon name="edit" size="26rpx" color="#6F655C" />
</view>
</view>
<!-- 身份牌:首字牌定位「是谁」,姓名、体征元信息、证件号收进首字牌右侧纵列;
发丝线之下只留一个动作(拨打) -->
<view class="card patient-card">
<view class="patient-head">
<!-- 首字牌沿用「浅橙衬底承载标识」:有姓名取姓氏首字,无则退到 user 图标 -->
<view class="patient-mark">
<text wx:if="{{record.patientInitial}}" class="patient-mark-text">{{record.patientInitial}}</text>
<t-icon wx:else name="user" size="44rpx" color="#9B4508" />
</view>
<view class="patient-info">
<text class="patient-name">{{record.patientName || '--'}}</text>
<!-- 体征行:空值已在 JS 里整项剔除,这里只按序插竖线 -->
<view class="meta-list patient-meta-row" 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>
<text class="patient-id" wx:if="{{record.patientIdnumber}}">身份证号 {{record.patientIdnumber}}</text>
</view>
</view>
<!-- 发丝线之上是「是谁」,之下是唯一动作:整行可点拨打 -->
<view class="patient-contact" bindtap="onCallPatient">
<t-icon name="call" size="30rpx" color="#9B4508" />
<text class="patient-contact-text">{{record.patientMobile || '--'}}</text>
<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="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">医院预约信息</text>
<view class="section-link" wx:if="{{record.canEditBooking}}" bindtap="onEditHospital">
<text class="section-link-text">修改</text>
<t-icon name="edit" size="26rpx" color="#6F655C" />
</view>
</view>
<!-- 本页面向就诊人或家属,默认只回答「何时、给谁、去哪、什么服务、多少钱」。
档案、支付明细和订单技术信息收进展开区;所有修改仍沿用分区入口 -->
<view class="card hospital-card">
<!-- 省份提到右上角,与医院名同一行:名称是主信息,省份降为右侧小字标签 -->
<view class="hospital-head">
<text class="hospital-name {{!record.hospitalName ? 'is-empty' : ''}}">{{record.hospitalName || '就诊医院待补充'}}</text>
<text class="hospital-province" wx:if="{{record.hospitalProvince}}">{{record.hospitalProvince}}</text>
</view>
<!-- 就诊基本信息卡:这页是就诊人自己看「哪天几点去哪、谁陪我」,
不是商家认顾客的订单卡——不铺自己的头像与手机号,
时间提到首落点,陪诊师单独一行(平台分配后才是本人最需要认的人) -->
<view class="card appointment-card">
<view class="meta-list hospital-meta" wx:if="{{record.hospitalMeta.length > 0}}">
<block wx:for="{{record.hospitalMeta}}" wx:key="id">
<view class="meta-sep" wx:if="{{index > 0}}"></view>
<text class="meta-item">{{item.text}}</text>
</block>
</view>
<text class="hospital-address" wx:if="{{record.hospitalAddress}}">{{record.hospitalAddress}}</text>
<!-- 预约时间条:日期(带星期)在左、时段与陪诊时长在右,一行排开;空值有兜底文案 -->
<view class="schedule-row">
<!-- 时间:卡内首落点。日期给全卡最大字号,时段用暖橙同处一行。
完整信息的入口不再是一行文字开关:卡片右上角一枚向下箭头,
点开后就在原位铺开展开区 -->
<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.escortServiceName || '陪诊服务'}}</text>
<text class="appt-text" wx:if="{{record.sexRequirementText}}"> · 性别要求{{record.sexRequirementText}}</text>
</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>
<!-- 费用:标签与金额同行对齐;支付状态胶囊收在行尾 -->
<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>
<!-- 陪诊需求与症状:纯文本块展示,修改走底部弹窗(textarea 在弹窗里) -->
<view class="section">
<!-- 陪诊师卡片:已派单显示名与电话;派单正常时后台会写姓名,
若只有 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 class="section-link" wx:if="{{record.canEditNote}}" bindtap="onEditPatientNote">
<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">
<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}}">
@@ -124,79 +207,17 @@
<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>
</view>
</view>
<!-- 服务与费用:服务名称为主、支付状态胶囊收尾同行(仅待处理时显示,已付清不出现);
费用行用字号差做层级(金额是全卡唯一的大字号焦点),不铺清单行;
未付清时在费用行下补一句客服指引(全站没有线上支付入口,本页给不出可点的动作)。
位置收在末尾:前面各块回答「服务什么」(人 → 去哪 → 要什么),
费用与订单号同属「账与单」,连排在最后 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">服务与费用</text>
</view>
<view class="card service-card">
<view class="service-head">
<text class="service-name">{{record.escortServiceName || '陪诊服务'}}</text>
<!-- 支付完成(paid)是常态不显示胶囊;只有待处理(未支付/部分支付/已退款)才提示 -->
<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 class="meta-list service-meta" wx:if="{{record.sexRequirementText}}">
<text class="meta-item">陪诊师性别要求 {{record.sexRequirementText}}</text>
</view>
<view class="fee-row">
<view class="fee-main">
<text class="fee-label">服务费用</text>
<text class="fee-amount">¥{{record.totalFee}}</text>
</view>
<text class="fee-paid" wx:if="{{record.showPaidFee}}">已支付 ¥{{record.paidFee}}</text>
</view>
<!-- 支付与退款问题都进入带订单上下文的客服页 -->
<view class="pay-hint" wx:if="{{record.paymentHint}}" bindtap="onContactSupport">
<text class="pay-hint-text">{{record.paymentHint}}</text>
<t-icon name="chevron-right" size="26rpx" color="#6F655C" />
</view>
</view>
</view>
<!-- 收货信息为下单时的订单快照,不随后续就诊人资料变化 -->
<view class="section" wx:if="{{record.shippingAddress && record.shippingAddress.address}}">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">收货信息</text>
</view>
<view class="card">
<text class="shipping-recipient">{{record.shippingAddress.recipientName}} {{record.shippingAddress.mobile}}</text>
<text class="shipping-address">{{record.shippingAddress.address}}</text>
</view>
</view>
<!-- 订单信息:编号脱敏展示,完整编号由客服入口安全携带 -->
<view class="section">
<view class="section-head">
<view class="section-bar"></view>
<text class="section-title">订单信息</text>
</view>
<view class="card order-card">
<text class="order-no">订单编号 {{record.displayId}}</text>
<view class="meta-list order-meta">
<text class="meta-item">创建于 {{record.createTime || '--'}}</text>
<view class="meta-sep"></view>
<text class="meta-item">更新于 {{record.updateTime || '--'}}</text>
</view>
<view class="order-extra" wx:if="{{record.cancelReason}}">
<text class="order-extra-label">取消原因</text>
<text class="order-extra-value">{{record.cancelReason}}</text>
<!-- 可编辑且三段全空:给一个轻量添加入口,避免用户失去补充需求的路径 -->
<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>
@@ -215,6 +236,17 @@
<!-- 底部操作栏:完成状态仅由平台流转,用户不确认完成 -->
<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}}"