181 lines
8.9 KiB
Plaintext
181 lines
8.9 KiB
Plaintext
<view class="page no-tab">
|
||
<view wx:if="{{loading}}" class="loading-state">店铺设置加载中</view>
|
||
<block wx:else>
|
||
<view class="page-heading">
|
||
<text class="page-title">店铺设置</text>
|
||
<text class="page-subtitle">先看见门店状态,再按需调整细节。</text>
|
||
</view>
|
||
|
||
<view class="cover-card">
|
||
<view wx:if="{{coverImagePreviewUrl}}" class="cover-preview">
|
||
<image src="{{coverImagePreviewUrl}}" mode="aspectFill"></image>
|
||
</view>
|
||
<view wx:else class="cover-preview cover-empty">
|
||
<text class="cover-empty-title">店铺封面</text>
|
||
<text class="cover-empty-desc">上传一张能代表风格的作品图</text>
|
||
</view>
|
||
<view class="cover-badge">门店档案</view>
|
||
<view class="cover-shade">
|
||
<view class="cover-copy">
|
||
<text class="cover-title">{{shopName || '店铺主图'}}</text>
|
||
<text class="cover-desc">{{shopDescription || '色彩、手作与细节管理的预约空间'}}</text>
|
||
</view>
|
||
<button class="cover-btn" bindtap="editProfile">修改档案</button>
|
||
</view>
|
||
</view>
|
||
|
||
<view id="shop-profile-card" class="section">
|
||
<view class="section-head">
|
||
<view>
|
||
<text class="section-title">店铺档案</text>
|
||
<text class="section-subtitle">展示给客户看的第一段介绍</text>
|
||
</view>
|
||
<text class="section-link" bindtap="editProfile">修改</text>
|
||
</view>
|
||
<view class="card profile-summary-card" bindtap="editProfile">
|
||
<view class="summary-row">
|
||
<text class="summary-label">店铺名称</text>
|
||
<text class="summary-value">{{shopName || '未设置'}}</text>
|
||
</view>
|
||
<view class="summary-row summary-row-last">
|
||
<text class="summary-label">门店介绍</text>
|
||
<text class="summary-value summary-description">{{shopDescription || '暂未填写门店介绍'}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view id="shop-tag-card" class="section">
|
||
<view class="section-head">
|
||
<view>
|
||
<text class="section-title">店铺标签</text>
|
||
<text class="section-subtitle">{{tagCountText}}</text>
|
||
</view>
|
||
<text class="section-link" bindtap="editTags">管理</text>
|
||
</view>
|
||
<view class="card tag-summary-card" bindtap="editTags">
|
||
<view wx:if="{{tagList.length}}" class="tag-cloud">
|
||
<text
|
||
wx:for="{{tagList}}"
|
||
wx:key="id"
|
||
class="tag-preview"
|
||
style="background: {{item.bgColor}}; color: {{item.textColor}}; border-color: {{item.borderColor}};"
|
||
>{{item.name}}</text>
|
||
<text class="tag-add">+</text>
|
||
</view>
|
||
<view wx:else class="empty-inline">还没有标签,点击添加门店特色</view>
|
||
<view class="summary-action-row">
|
||
<text>用于预约时快速选择和展示</text>
|
||
<text class="summary-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view id="shop-schedule-card" class="section">
|
||
<view class="section-head">
|
||
<view>
|
||
<text class="section-title">营业安排</text>
|
||
<text class="section-subtitle">排班与特殊日期合并管理</text>
|
||
</view>
|
||
<text class="section-link" data-tab="RULE" bindtap="openScheduleSheet">修改</text>
|
||
</view>
|
||
<view class="card schedule-summary-card" data-tab="RULE" bindtap="openScheduleSheet">
|
||
<view class="schedule-summary-row">
|
||
<view class="summary-icon schedule-icon">◷</view>
|
||
<view class="summary-main">
|
||
<text class="summary-value">{{scheduleSummary}}</text>
|
||
<text class="summary-meta">{{scheduleRemarkText}}</text>
|
||
</view>
|
||
<text class="summary-arrow">›</text>
|
||
</view>
|
||
<view id="shop-exception-card" class="schedule-summary-row special-summary-row" data-tab="EXCEPTION" bindtap="openScheduleSheet">
|
||
<view class="summary-icon exception-icon">●</view>
|
||
<view class="summary-main">
|
||
<text class="summary-value">{{exceptionCountText}}</text>
|
||
<text class="summary-meta">{{exceptionSummary}}</text>
|
||
</view>
|
||
<text class="summary-arrow">›</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</block>
|
||
|
||
<view wx:if="{{scheduleSheetVisible}}" class="sheet-mask" catchtap="closeScheduleSheet">
|
||
<view id="schedule-sheet" class="schedule-sheet" catchtap="stopPropagation">
|
||
<view class="sheet-handle"></view>
|
||
<view class="sheet-head">
|
||
<text class="sheet-title">营业安排</text>
|
||
<text class="sheet-close" bindtap="closeScheduleSheet">×</text>
|
||
</view>
|
||
<view class="sheet-tabs">
|
||
<view class="sheet-tab {{activeScheduleTab === 'RULE' ? 'active' : ''}}" data-tab="RULE" bindtap="switchScheduleTab">常规排班</view>
|
||
<view class="sheet-tab {{activeScheduleTab === 'EXCEPTION' ? 'active' : ''}}" data-tab="EXCEPTION" bindtap="switchScheduleTab">特殊日期</view>
|
||
</view>
|
||
|
||
<block wx:if="{{activeScheduleTab === 'RULE'}}">
|
||
<view class="sheet-field-block">
|
||
<text class="sheet-field-title">营业模式</text>
|
||
<view class="preset-grid">
|
||
<view wx:for="{{presetOptions}}" wx:key="value" class="preset-chip {{item.active ? 'active' : ''}}" data-value="{{item.value}}" bindtap="selectPreset">{{item.label}}</view>
|
||
</view>
|
||
</view>
|
||
<view class="sheet-field-block">
|
||
<text class="sheet-field-title">营业日</text>
|
||
<view class="weekday-grid">
|
||
<view wx:for="{{weekdayOptions}}" wx:key="value" class="weekday-chip {{item.active ? 'active' : ''}}" data-value="{{item.value}}" bindtap="toggleWeekday">{{item.label}}</view>
|
||
</view>
|
||
</view>
|
||
<view class="sheet-field">
|
||
<text class="sheet-field-label">营业开始</text>
|
||
<picker mode="time" value="{{form.startTime}}" bindchange="onStartChange"><view class="sheet-field-value">{{form.startTime}}</view></picker>
|
||
</view>
|
||
<view class="sheet-field">
|
||
<text class="sheet-field-label">营业结束</text>
|
||
<picker mode="time" value="{{form.endTime}}" bindchange="onEndChange"><view class="sheet-field-value">{{form.endTime}}</view></picker>
|
||
</view>
|
||
<view class="sheet-field">
|
||
<text class="sheet-field-label">排班备注</text>
|
||
<input value="{{form.scheduleRemark}}" data-field="scheduleRemark" bindinput="onInput" placeholder="可选" />
|
||
</view>
|
||
<button class="primary-btn sheet-save" loading="{{saving}}" disabled="{{saving}}" bindtap="saveSchedule">保存排班</button>
|
||
</block>
|
||
|
||
<block wx:else>
|
||
<view class="sheet-field">
|
||
<text class="sheet-field-label">日期</text>
|
||
<picker mode="date" value="{{exceptionForm.workDate}}" bindchange="onExceptionDateChange"><view class="sheet-field-value">{{exceptionForm.workDate}}</view></picker>
|
||
</view>
|
||
<view class="sheet-field">
|
||
<text class="sheet-field-label">类型</text>
|
||
<picker range="{{exceptionTypes}}" range-key="label" value="{{exceptionTypeIndex}}" bindchange="onExceptionTypeChange"><view class="sheet-field-value">{{exceptionTypeLabel}}</view></picker>
|
||
</view>
|
||
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="sheet-field">
|
||
<text class="sheet-field-label">开始时间</text>
|
||
<picker mode="time" value="{{exceptionForm.startTime}}" bindchange="onExceptionStartChange"><view class="sheet-field-value">{{exceptionForm.startTime}}</view></picker>
|
||
</view>
|
||
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="sheet-field">
|
||
<text class="sheet-field-label">结束时间</text>
|
||
<picker mode="time" value="{{exceptionForm.endTime}}" bindchange="onExceptionEndChange"><view class="sheet-field-value">{{exceptionForm.endTime}}</view></picker>
|
||
</view>
|
||
<view class="sheet-field">
|
||
<text class="sheet-field-label">备注</text>
|
||
<input value="{{exceptionForm.remark}}" data-field="remark" bindinput="onExceptionInput" placeholder="可选" />
|
||
</view>
|
||
<button class="primary-btn sheet-save" loading="{{saving}}" disabled="{{saving}}" bindtap="saveException">保存特殊日期</button>
|
||
<view class="exception-history">
|
||
<view class="exception-history-head">
|
||
<text>已配置日期</text>
|
||
<text>{{exceptions.length}} 条</text>
|
||
</view>
|
||
<view wx:if="{{exceptions.length}}" class="exception-history-list">
|
||
<view wx:for="{{exceptions}}" wx:key="id" class="exception-history-item">
|
||
<text>{{item.summary}}</text>
|
||
<text wx:if="{{item.remark}}" class="exception-history-remark">{{item.remark}}</text>
|
||
</view>
|
||
</view>
|
||
<view wx:else class="empty-inline">暂无特殊日期</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</view>
|
||
</view>
|