This commit is contained in:
lik
2026-10-06 21:19:20 +08:00
parent 40d0df3330
commit 509a10e4f1
12 changed files with 440 additions and 314 deletions
+46 -42
View File
@@ -1,50 +1,60 @@
<view class="container">
<!-- 顶部说明 -->
<view class="page-tip" wx:if="{{profiles.length > 0}}">
<t-icon name="info-circle" size="28rpx" color="#D4A853" />
<text class="page-tip-text">下单时可直接选择已保存的就诊人,无需重复填写</text>
<!-- 说明砖:浅橙底 + 2rpx --brand-line 描边托形(不加阴影),走全站「说明砖」档;
文案说明就诊人的用途 -->
<view class="tip-card" wx:if="{{profiles.length > 0}}">
<t-icon name="info-circle" class="tip-icon" size="28rpx" />
<text class="tip-text">下单时可直接选择已保存的就诊人,无需重复填写</text>
</view>
<!-- 就诊人列表 -->
<!-- 就诊人列表:通栏白块(白面 + 上下 2rpx 发丝线 + 中性阴影,圆角 0),
与「邮寄地址」列表同源。每条主体可点进编辑(右侧 chevron 是点击暗示),
不做无暗示的整卡可点;删除动作单独一行、走 --muted -->
<view class="profile-list" wx:if="{{profiles.length > 0}}">
<view class="profile-card" wx:for="{{profiles}}" wx:key="_id" data-id="{{item._id}}" bindtap="onEdit">
<view class="card-header">
<view class="name-wrap">
<text class="profile-name">{{item.name}}</text>
<text class="sex-tag" wx:if="{{item.sexText}}">{{item.sexText}}</text>
</view>
<view class="delete-btn" data-id="{{item._id}}" catchtap="onDelete">
<t-icon name="delete" size="32rpx" color="#9CA3AF" />
<view
class="profile-card {{index === profiles.length - 1 ? 'profile-card-last' : ''}}"
wx:for="{{profiles}}"
wx:key="_id"
>
<view class="profile-main" data-id="{{item._id}}" bindtap="onEdit" hover-class="profile-main-hover">
<view class="profile-info">
<view class="profile-top">
<text class="profile-name">{{item.name}}</text>
<text class="sex-tag" wx:if="{{item.sexText}}">{{item.sexText}}</text>
</view>
<view class="info-row">
<text class="info-label">出生年月</text>
<text class="info-value">{{item.birth || '未填写'}}</text>
</view>
<view class="info-row">
<text class="info-label">联系电话</text>
<text class="info-value">{{item.mobile || '未填写'}}</text>
</view>
<view class="info-row">
<text class="info-label">证件号</text>
<text class="info-value">{{item.idnumberText}}</text>
</view>
<view class="info-row" wx:if="{{item.remark}}">
<text class="info-label">健康备注</text>
<text class="info-value">{{item.remark}}</text>
</view>
</view>
<t-icon name="chevron-right" class="profile-arrow" size="32rpx" />
</view>
<view class="card-body">
<view class="info-row">
<text class="info-label">出生年月</text>
<text class="info-value">{{item.birth || '未填写'}}</text>
</view>
<view class="info-row">
<text class="info-label">联系电话</text>
<text class="info-value">{{item.mobile || '未填写'}}</text>
</view>
<view class="info-row">
<text class="info-label">证件号</text>
<text class="info-value">{{item.idnumberText}}</text>
</view>
<view class="info-row" wx:if="{{item.remark}}">
<text class="info-label">健康备注</text>
<text class="info-value">{{item.remark}}</text>
<view class="profile-actions">
<view class="profile-action" data-id="{{item._id}}" bindtap="onDelete">
<t-icon name="delete" class="profile-action-icon" size="32rpx" />
<text class="profile-action-text">删除</text>
</view>
</view>
</view>
</view>
<!-- 空状态 -->
<view class="empty-state" wx:if="{{!loading && profiles.length === 0}}">
<t-icon name="file-safety" size="120rpx" color="#D1D5DB" />
<text class="empty-text">还没有就诊人</text>
<text class="empty-subtext">添加就诊人后,下单时可一键带入信息</text>
<view class="profile-empty" wx:if="{{!loading && profiles.length === 0}}">
<t-icon name="user-checked" class="profile-empty-icon" size="80rpx" />
<text class="profile-empty-text">还没有就诊人,添加后下单即可一键带入</text>
</view>
<!-- 加载中 -->
@@ -52,15 +62,9 @@
<t-loading theme="circular" size="40rpx" text="加载中..." />
</view>
<!-- 底部留白,避免被固定按钮遮挡 -->
<view class="bottom-space"></view>
<!-- 新增按钮 -->
<!-- 底部固定操作栏 -->
<view class="footer-bar">
<view class="add-btn" bindtap="onAdd">
<t-icon name="add" size="34rpx" color="#FFFFFF" />
<text class="add-btn-text">新增就诊人</text>
</view>
<button class="primary-btn" bindtap="onAdd">新增就诊人</button>
</view>
</view>
</view>