优化店务预约作品快照与图片维护
This commit is contained in:
@@ -31,10 +31,9 @@
|
||||
</picker>
|
||||
</view>
|
||||
<view class="field">
|
||||
<text class="field-label required">预约作品</text>
|
||||
<text class="field-label required">选择作品</text>
|
||||
<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>
|
||||
<text>{{form.manualProductTitle || selectedProduct.title || '请选择作品'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{form.productId || form.manualProductTitle}}" class="field">
|
||||
@@ -98,18 +97,58 @@
|
||||
<text class="tip-text">{{conflictTip}}</text>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{productModalVisible}}" class="modal-mask" bindtap="closeProductModal">
|
||||
<view class="product-modal" catchtap="stopTap">
|
||||
<view wx:if="{{manualProductPanelVisible}}" class="manual-mask" catchtap="stopTap">
|
||||
<view class="manual-sheet" catchtap="stopTap">
|
||||
<view class="manual-sheet-head">
|
||||
<text class="manual-sheet-title">选择作品</text>
|
||||
<view class="modal-close" bindtap="closeManualProductPanel">×</view>
|
||||
</view>
|
||||
<button class="secondary-btn template-entry-btn" bindtap="openProductTemplateSheet">使用已有作品模板</button>
|
||||
<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>
|
||||
<input class="manual-input-full" value="{{form.manualProductDescription}}" data-field="manualProductDescription" bindinput="onInput" placeholder="作品描述(选填)" />
|
||||
<view class="manual-grid single">
|
||||
<picker range="{{tagOptions}}" range-key="name" value="{{tagPickerIndex}}" bindchange="onManualTagChange" disabled="{{tagOptions.length === 0}}">
|
||||
<view class="manual-picker {{form.manualProductTags ? '' : 'placeholder'}}">
|
||||
<text>{{form.manualProductTags || (tagOptions.length ? '请选择标签' : '暂无标签')}}</text>
|
||||
<text class="manual-picker-arrow">›</text>
|
||||
</view>
|
||||
</picker>
|
||||
<input value="{{form.manualProductPrecautions}}" data-field="manualProductPrecautions" bindinput="onInput" placeholder="注意事项(选填)" />
|
||||
</view>
|
||||
<view wx:if="{{tagError}}" class="manual-tag-error">{{tagError}}</view>
|
||||
<view class="manual-image-section">
|
||||
<view class="manual-image-head">
|
||||
<text class="manual-image-title">作品图片</text>
|
||||
</view>
|
||||
<view class="manual-image-list">
|
||||
<view wx:for="{{manualProductImageUrls}}" wx:for-item="imageUrl" wx:key="*this" class="manual-image-item">
|
||||
<image class="manual-image" src="{{imageUrl}}" mode="aspectFill"></image>
|
||||
<view class="manual-image-remove" data-index="{{index}}" catchtap="removeManualProductImage">×</view>
|
||||
</view>
|
||||
<view class="manual-image-add {{manualImageUploading ? 'disabled' : ''}}" bindtap="chooseManualProductImage">
|
||||
<text>{{manualImageUploading ? '...' : '+'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="secondary-btn manual-btn" bindtap="useManualProduct">保存内容</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{productModalVisible}}" class="modal-mask template-mask" catchtap="stopTap">
|
||||
<view class="product-modal template-modal" catchtap="stopTap">
|
||||
<view class="modal-head">
|
||||
<view>
|
||||
<text class="modal-title">选择预约作品</text>
|
||||
<text class="modal-title">使用已有作品模板</text>
|
||||
</view>
|
||||
<view class="modal-close" bindtap="closeProductModal">×</view>
|
||||
</view>
|
||||
<input class="product-search" value="{{productKeyword}}" bindinput="onProductSearch" placeholder="搜索作品、标签、美甲师" />
|
||||
<scroll-view class="product-list" scroll-y>
|
||||
<view wx:if="{{productError}}" class="product-empty">{{productError}}</view>
|
||||
<view wx:for="{{filteredProducts}}" wx:key="id" class="product-option {{form.productId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="selectProduct">
|
||||
<view wx:for="{{filteredProducts}}" wx:key="id" class="product-option" 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">
|
||||
@@ -125,49 +164,6 @@
|
||||
</view>
|
||||
<view wx:if="{{!productError && filteredProducts.length === 0}}" class="product-empty">暂无匹配作品</view>
|
||||
</scroll-view>
|
||||
<view class="manual-entry-card">
|
||||
<view>
|
||||
<text class="manual-entry-title">没有合适作品?</text>
|
||||
<text class="manual-entry-desc">临时新增一个预约作品,提交时会一并保存到预约信息。</text>
|
||||
</view>
|
||||
<button class="secondary-btn manual-entry-btn" bindtap="openManualProductPanel">新增作品</button>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{manualProductPanelVisible}}" class="manual-mask" catchtap="stopTap">
|
||||
<view class="manual-sheet" catchtap="stopTap">
|
||||
<view class="manual-sheet-head">
|
||||
<view>
|
||||
<text class="manual-sheet-title">新增预约作品</text>
|
||||
<text class="manual-sheet-subtitle">填写本次预约使用的作品信息</text>
|
||||
</view>
|
||||
<view class="modal-close" bindtap="closeManualProductPanel">×</view>
|
||||
</view>
|
||||
<text class="manual-title required-label">手动新增预约作品</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>
|
||||
<textarea class="manual-textarea" value="{{form.manualProductDescription}}" data-field="manualProductDescription" bindinput="onInput" placeholder="作品描述(选填)" />
|
||||
<view class="manual-grid single">
|
||||
<input value="{{form.manualProductTags}}" data-field="manualProductTags" bindinput="onInput" placeholder="标签,多个用逗号分隔(选填)" />
|
||||
<input value="{{form.manualProductPrecautions}}" data-field="manualProductPrecautions" bindinput="onInput" placeholder="注意事项(选填)" />
|
||||
</view>
|
||||
<view class="manual-image-section">
|
||||
<view class="manual-image-head">
|
||||
<text class="manual-image-title">作品图片</text>
|
||||
<text class="manual-image-desc">支持上传多张图片</text>
|
||||
</view>
|
||||
<view class="manual-image-list">
|
||||
<view wx:for="{{manualProductImageUrls}}" wx:for-item="imageUrl" wx:key="*this" class="manual-image-item">
|
||||
<image class="manual-image" src="{{imageUrl}}" mode="aspectFill"></image>
|
||||
<view class="manual-image-remove" data-index="{{index}}" catchtap="removeManualProductImage">×</view>
|
||||
</view>
|
||||
<view wx:if="{{manualProductImageUrls.length === 0}}" class="manual-image-empty">图</view>
|
||||
</view>
|
||||
<button class="secondary-btn image-btn" loading="{{manualImageUploading}}" disabled="{{manualImageUploading}}" bindtap="chooseManualProductImage">上传图片</button>
|
||||
</view>
|
||||
<button class="secondary-btn manual-btn" bindtap="useManualProduct">确认新增</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user