106 lines
4.8 KiB
Plaintext
106 lines
4.8 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.customerName}}</text>
|
||
<text class="phone">{{appointment.customerPhone}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="detail-actions">
|
||
<text class="tag">{{appointment.statusText}}</text>
|
||
</view>
|
||
</view>
|
||
<view wx:if="{{detailTags.length}}" class="detail-tag-row">
|
||
<text wx:for="{{detailTags}}" wx:key="key" class="detail-tag {{item.type}}">{{item.label}}</text>
|
||
</view>
|
||
<view class="detail-grid">
|
||
<view>
|
||
<text class="label">项目</text>
|
||
<text class="value">{{appointment.productTitle}}</text>
|
||
</view>
|
||
<view>
|
||
<text class="label">价格</text>
|
||
<view class="price-value-row">
|
||
<text class="value price-value">{{priceText}}</text>
|
||
<button wx:if="{{canEditAppointment}}" class="price-edit-btn" bindtap="openPriceEditor">修改</button>
|
||
</view>
|
||
</view>
|
||
<view>
|
||
<text class="label">美甲师</text>
|
||
<text class="value">{{appointment.artistName}}</text>
|
||
</view>
|
||
<view>
|
||
<text class="label">时间</text>
|
||
<text class="value">{{timeText}}</text>
|
||
</view>
|
||
<view>
|
||
<text class="label">时长</text>
|
||
<text class="value">{{appointment.durationMinutes}}分钟</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{!loadError}}" class="section">
|
||
<view class="section-head">
|
||
<view class="section-title">作品图片</view>
|
||
</view>
|
||
<view class="card image-card">
|
||
<view wx:if="{{productImageUrls.length}}" class="detail-image-list">
|
||
<view wx:for="{{productImageUrls}}" wx:key="*this" class="detail-image-item">
|
||
<image class="detail-image" src="{{item}}" mode="aspectFill" data-index="{{index}}" bindtap="previewProductImage"></image>
|
||
<view wx:if="{{canEditAppointment}}" class="detail-image-remove" data-index="{{index}}" catchtap="removeAppointmentImage">×</view>
|
||
</view>
|
||
<view wx:if="{{canEditAppointment && productImageUrls.length < 9}}" class="detail-image-add {{imageUploading ? 'disabled' : ''}}" bindtap="chooseAppointmentImages">
|
||
<text>{{imageUploading ? '...' : '+'}}</text>
|
||
</view>
|
||
</view>
|
||
<view wx:else class="detail-image-empty">
|
||
<text>{{imageUploading ? '上传中...' : '暂无图片'}}</text>
|
||
<button wx:if="{{canEditAppointment}}" class="text-btn image-empty-action" loading="{{imageUploading}}" disabled="{{imageUploading}}" bindtap="chooseAppointmentImages">上传图片</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{!loadError}}" class="section">
|
||
<view class="section-title">备注</view>
|
||
<view class="card note-card">{{appointment.remark || '暂无备注'}}</view>
|
||
</view>
|
||
|
||
<view wx:if="{{priceModalVisible}}" class="detail-modal-mask" catchtap="stopTap">
|
||
<view class="price-modal" catchtap="stopTap">
|
||
<view class="price-modal-head">
|
||
<text class="price-modal-title">修改价格</text>
|
||
<view class="price-modal-close" bindtap="closePriceEditor">×</view>
|
||
</view>
|
||
<view class="price-pending-option {{priceForm.pricePending ? 'active' : ''}}" bindtap="togglePricePending">
|
||
<view class="price-pending-check">{{priceForm.pricePending ? '✓' : ''}}</view>
|
||
<text>价格未定</text>
|
||
</view>
|
||
<view class="price-field {{priceForm.pricePending ? 'disabled' : ''}}">
|
||
<text class="price-field-label">本次价格</text>
|
||
<view class="price-input-wrap">
|
||
<input value="{{priceForm.priceText}}" disabled="{{priceForm.pricePending}}" bindinput="onPriceInput" type="digit" placeholder="请输入价格" />
|
||
<text>元</text>
|
||
</view>
|
||
</view>
|
||
<view class="price-modal-actions">
|
||
<button class="secondary-btn" bindtap="closePriceEditor">取消</button>
|
||
<button class="primary-btn" loading="{{priceSaving}}" disabled="{{priceSaving}}" bindtap="savePrice">保存</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{!loadError && showActionRow}}" class="fixed-bottom action-row {{showRestoreAction ? 'single' : ''}}">
|
||
<button wx:if="{{showPendingActions}}" class="primary-btn" bindtap="complete">完成</button>
|
||
<button wx:if="{{showPendingActions}}" class="danger-btn" bindtap="deleteAppointment">删除此订单</button>
|
||
<button wx:if="{{showRestoreAction}}" class="secondary-btn" bindtap="restorePending">修改状态</button>
|
||
</view>
|
||
</view>
|