完善管理师预约项目与美甲师创建

This commit is contained in:
2026-06-24 20:54:41 +08:00
parent 03c972d90c
commit eda109cb62
28 changed files with 911 additions and 32 deletions
@@ -22,9 +22,10 @@
</view>
<view class="field">
<text class="field-label">项目内容</text>
<picker range="{{products}}" range-key="title" bindchange="onProductChange">
<view class="field-value">{{selectedProduct.title || '请选择项目'}}</view>
</picker>
<view class="field-value product-value" bindtap="openProductModal">
<text>{{selectedProduct.title || form.manualProductTitle || '请选择项目'}}</text>
<text wx:if="{{form.manualProductTitle && !form.productId}}" class="manual-badge">手动</text>
</view>
</view>
<view class="field">
<text class="field-label">预计时长</text>
@@ -53,7 +54,44 @@
<text class="tip-text">{{conflictTip}}</text>
</view>
<view wx:if="{{productModalVisible}}" class="modal-mask" bindtap="closeProductModal">
<view class="product-modal" catchtap="stopTap">
<view class="modal-head">
<view>
<text class="modal-title">选择项目内容</text>
</view>
<button class="modal-close" bindtap="closeProductModal">×</button>
</view>
<input class="product-search" value="{{productKeyword}}" bindinput="onProductSearch" placeholder="搜索作品、标签、美甲师" />
<scroll-view class="product-list" scroll-y>
<view wx:for="{{filteredProducts}}" wx:key="id" class="product-option {{form.productId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="selectProduct">
<image wx:if="{{item.coverImage}}" class="product-cover" src="{{item.coverImage}}" mode="aspectFill"></image>
<view wx:else class="product-cover placeholder">图</view>
<view class="product-info">
<view class="product-title-row">
<text class="product-title">{{item.title}}</text>
<text class="product-price">{{item.priceText}}</text>
</view>
<text class="product-meta">{{item.artistText}} · {{item.durationText || '时长待定'}}</text>
<view class="tag-row">
<text wx:for="{{item.tagList}}" wx:for-item="tag" wx:key="*this" class="tag-pill">{{tag}}</text>
</view>
</view>
</view>
<view wx:if="{{filteredProducts.length === 0}}" class="product-empty">暂无匹配作品</view>
</scroll-view>
<view class="manual-panel">
<text class="manual-title">手动新增项目</text>
<view class="manual-grid">
<input value="{{form.manualProductTitle}}" data-field="manualProductTitle" bindinput="onInput" placeholder="项目名称" />
<input value="{{form.manualProductPrice}}" data-field="manualProductPrice" bindinput="onInput" type="digit" placeholder="价格" />
</view>
<button class="secondary-btn manual-btn" bindtap="useManualProduct">使用手动项目</button>
</view>
</view>
</view>
<view class="fixed-bottom">
<button class="primary-btn" loading="{{loading}}" bindtap="submit">保存预约</button>
<button wx:if="{{canCreateAppointment}}" class="primary-btn" loading="{{loading}}" bindtap="submit">保存预约</button>
</view>
</view>