Files
JayuCloud/JC-Salon-WeChat/pages/appointment-detail/index.wxml
T
xiaowang 69ea01eaa4
自动发布开发环境 Nacos 配置 / publish (push) Successful in 34s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 11s
小程序预约详情支持图片预览、编辑预约与完成收款拆分
2026-11-09 15:18:27 +08:00

119 lines
5.2 KiB
Plaintext

<view class="page no-tab">
<view wx:if="{{loadError}}" class="empty card detail-error">
<text>{{loadError}}</text>
<button class="secondary-btn retry-btn" bindtap="loadDetail">重试</button>
</view>
<view wx:else class="card detail-card">
<view class="detail-head">
<view class="detail-person">
<view class="avatar">{{avatarText}}</view>
<view>
<text class="customer">{{appointment.customerNameText}}</text>
<view class="phone-row">
<text class="phone">{{appointment.customerPhoneText}}</text>
<button
wx:if="{{appointment.customerPhoneAvailable && appointment.orderId}}"
class="call-btn"
size="mini"
loading="{{dialing}}"
bindtap="dialCustomer"
>呼叫</button>
</view>
</view>
</view>
<view class="head-actions">
<button wx:if="{{showEdit}}" class="edit-btn" size="mini" bindtap="goEdit">编辑</button>
<text class="status-tag {{appointment.status === 2 ? 'completed' : appointment.status === 3 ? 'cancelled' : ''}}">{{appointment.historicalBackfill ? '历史补单 · ' : ''}}{{appointment.statusText}}</text>
</view>
</view>
<view class="detail-grid">
<view class="detail-field">
<text class="label">订单编号</text>
<text class="value">{{appointment.orderNoText}}</text>
</view>
<view class="detail-field">
<text class="label">服务项目</text>
<text class="value">{{appointment.productTitleText}}</text>
</view>
<view class="detail-field">
<text class="label">美甲师</text>
<text class="value">{{appointment.artistNameText}}</text>
</view>
<view class="detail-field">
<text class="label">时间</text>
<text class="value">{{timeText}}</text>
</view>
<view class="detail-field">
<text class="label">时长</text>
<text class="value">{{appointment.durationText}}</text>
</view>
<view class="detail-field amount-field">
<text class="label">成交金额</text>
<text class="value">{{appointment.amountText}}</text>
</view>
<view class="detail-field">
<text class="label">收款状态</text>
<text class="value">{{appointment.paymentStatusText}}</text>
</view>
</view>
<view wx:if="{{appointment.cancelReasonText}}" class="cancel-reason">
<text class="label">取消原因</text>
<text class="cancel-reason-text">{{appointment.cancelReasonText}}</text>
</view>
</view>
<view wx:if="{{!loadError && coverImages.length}}" class="section cover-section">
<view class="cover-head">
<text class="section-title">项目图片</text>
<text class="cover-count">{{coverIndex + 1}} / {{coverImages.length}}</text>
</view>
<view class="cover-card">
<swiper class="cover-swiper" circular="{{coverImages.length > 1}}" bindchange="onCoverChange">
<swiper-item wx:for="{{coverImages}}" wx:key="*this">
<image
class="cover-image"
src="{{item}}"
mode="aspectFill"
data-index="{{index}}"
bindtap="previewCoverImage"
binderror="onCoverImageError"
/>
</swiper-item>
</swiper>
<view class="cover-dots">
<view wx:for="{{coverImages}}" wx:key="*this" class="cover-dot {{index === coverIndex ? 'active' : ''}}"></view>
</view>
</view>
<scroll-view class="cover-thumbs" scroll-x>
<view class="cover-thumb-list">
<image
wx:for="{{coverImages}}"
wx:key="*this"
class="cover-thumb {{index === coverIndex ? 'active' : ''}}"
src="{{item}}"
mode="aspectFill"
data-index="{{index}}"
bindtap="previewCoverImage"
binderror="onCoverImageError"
/>
</view>
</scroll-view>
<text class="cover-hint">点击图片可放大查看</text>
</view>
<view wx:if="{{!loadError}}" class="section">
<view class="section-title">备注</view>
<view class="card note-card">{{appointment.remarkText}}</view>
</view>
<view wx:if="{{!loadError && (showTransfer || showConfirm || showCollect || showComplete || showCancel)}}" class="fixed-bottom action-row">
<button wx:if="{{showTransfer}}" class="primary-btn transfer-action" loading="{{updating}}" disabled="{{updating}}" bindtap="goTransfer">{{isUnassigned ? '分配美甲师' : '改派美甲师'}}</button>
<button wx:if="{{showConfirm}}" class="secondary-btn" loading="{{updating}}" disabled="{{updating}}" bindtap="confirm">确认预约</button>
<button wx:if="{{showCollect}}" class="secondary-btn" loading="{{paying}}" disabled="{{paying || updating}}" bindtap="collect">完成收款</button>
<button wx:if="{{showComplete}}" class="secondary-btn" loading="{{updating}}" disabled="{{updating || paying}}" bindtap="complete">{{appointment.historicalBackfill ? '完成补单' : '完成服务'}}</button>
<button wx:if="{{showCancel}}" class="danger-btn" loading="{{updating}}" disabled="{{updating}}" bindtap="cancel">取消预约</button>
</view>
<action-modal id="actionModal" />
</view>