完善店务预约状态与详情流程

This commit is contained in:
2026-07-23 01:34:35 +08:00
parent c347e59b50
commit aeaead1648
18 changed files with 1360 additions and 139 deletions
@@ -15,14 +15,23 @@
</view>
<view class="detail-actions">
<text class="tag">{{appointment.statusText}}</text>
<button wx:if="{{canTransferAppointment && appointment.canEdit}}" class="small-action" bindtap="goTransfer">改派</button>
</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>
@@ -41,19 +50,21 @@
<view wx:if="{{!loadError}}" class="section">
<view class="section-head">
<view class="section-title">作品图片</view>
<button class="text-btn image-action" loading="{{imageUploading}}" disabled="{{imageUploading}}" bindtap="replaceAppointmentImages">{{productImageUrls.length ? '重新上传' : '上传图片'}}</button>
</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 class="detail-image-remove" data-index="{{index}}" catchtap="removeAppointmentImage">×</view>
<view wx:if="{{canEditAppointment}}" class="detail-image-remove" data-index="{{index}}" catchtap="removeAppointmentImage">×</view>
</view>
<view wx:if="{{productImageUrls.length < 9}}" class="detail-image-add {{imageUploading ? 'disabled' : ''}}" bindtap="chooseAppointmentImages">
<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">暂无图片</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>
@@ -62,9 +73,33 @@
<view class="card note-card">{{appointment.remark || '暂无备注'}}</view>
</view>
<view wx:if="{{!loadError}}" class="fixed-bottom action-row">
<button class="secondary-btn" bindtap="confirm">确认</button>
<button class="primary-btn" bindtap="complete">完成</button>
<button class="danger-btn" bindtap="cancel">取消</button>
<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>