优化店务前端二级页导航和设置说明

This commit is contained in:
2026-07-01 00:51:39 +08:00
parent 354e8feb7d
commit 4c455e47e0
5 changed files with 78 additions and 45 deletions
+6 -2
View File
@@ -1,5 +1,6 @@
<template> <template>
<div class="about-page"> <MobileShell title="关于">
<div class="about-page">
<section class="card brand-card"> <section class="card brand-card">
<img class="logo" :src="appIconUrl" alt="甲屿云" /> <img class="logo" :src="appIconUrl" alt="甲屿云" />
<strong>甲屿云</strong> <strong>甲屿云</strong>
@@ -16,10 +17,13 @@
<span class="muted">规划 / 客户 / 员工 / 我的</span> <span class="muted">规划 / 客户 / 员工 / 我的</span>
</div> </div>
</section> </section>
</div> </div>
</MobileShell>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import MobileShell from '@/components/MobileShell.vue'
const appIconUrl = `${import.meta.env.BASE_URL}assets/images/app-icon.png` const appIconUrl = `${import.meta.env.BASE_URL}assets/images/app-icon.png`
</script> </script>
+5 -2
View File
@@ -1,5 +1,6 @@
<template> <template>
<div class="export-view"> <MobileShell title="导出">
<div class="export-view">
<section class="card form-card"> <section class="card form-card">
<label class="field"> <label class="field">
<span class="field-label">导出类型</span> <span class="field-label">导出类型</span>
@@ -46,13 +47,15 @@
<button class="primary-btn" type="button" @click="exportExcel">导出 Excel</button> <button class="primary-btn" type="button" @click="exportExcel">导出 Excel</button>
</div> </div>
</div> </div>
</div> </div>
</MobileShell>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref } from 'vue' import { onMounted, ref } from 'vue'
import EmptyState from '@/components/EmptyState.vue' import EmptyState from '@/components/EmptyState.vue'
import LoadingState from '@/components/LoadingState.vue' import LoadingState from '@/components/LoadingState.vue'
import MobileShell from '@/components/MobileShell.vue'
import { managerCustomersApi } from '@/api/managerCustomers' import { managerCustomersApi } from '@/api/managerCustomers'
import { managerEmployeesApi } from '@/api/managerEmployees' import { managerEmployeesApi } from '@/api/managerEmployees'
import { managerPlanningApi } from '@/api/managerPlanning' import { managerPlanningApi } from '@/api/managerPlanning'
+5 -2
View File
@@ -1,5 +1,6 @@
<template> <template>
<div class="password-view"> <MobileShell title="修改密码">
<div class="password-view">
<section class="card form-card"> <section class="card form-card">
<label class="field"> <label class="field">
<span class="field-label">原密码</span> <span class="field-label">原密码</span>
@@ -20,11 +21,13 @@
<button class="primary-btn" type="button" @click="save">保存密码</button> <button class="primary-btn" type="button" @click="save">保存密码</button>
</div> </div>
</div> </div>
</div> </div>
</MobileShell>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive } from 'vue' import { reactive } from 'vue'
import MobileShell from '@/components/MobileShell.vue'
import { useToastStore } from '@/stores/toast' import { useToastStore } from '@/stores/toast'
const toast = useToastStore() const toast = useToastStore()
+2 -2
View File
@@ -144,8 +144,8 @@
@click="selectDate(day.date)" @click="selectDate(day.date)"
> >
<span class="month-day">{{ day.day }}</span> <span class="month-day">{{ day.day }}</span>
<span v-if="!day.isPast && day.dayStatus === 'full'" class="day-mark full">满</span> <span v-if="!day.isPast && day.totalCount > 0 && day.dayStatus === 'full'" class="day-mark full">满</span>
<span v-else-if="!day.isPast && day.dayStatus === 'rest'" class="day-mark rest">休</span> <span v-else-if="!day.isPast && day.totalCount > 0 && day.dayStatus === 'rest'" class="day-mark rest">休</span>
<div v-if="monthDisplayMode === 'count'" class="month-bars"> <div v-if="monthDisplayMode === 'count'" class="month-bars">
<span v-for="count in day.artistCounts.filter(item => item.count > 0)" :key="String(count.artistId)" :style="{ backgroundColor: count.color }"> <span v-for="count in day.artistCounts.filter(item => item.count > 0)" :key="String(count.artistId)" :style="{ backgroundColor: count.color }">
{{ count.shortName }}{{ count.count }} {{ count.shortName }}{{ count.count }}
+60 -37
View File
@@ -1,7 +1,8 @@
<template> <template>
<div class="settings-view"> <MobileShell title="店铺设置">
<LoadingState v-if="loading" text="店铺信息加载中" /> <div class="settings-view">
<section v-else class="card form-card"> <LoadingState v-if="loading" text="店铺信息加载中" />
<section v-else class="card form-card">
<label class="field"> <label class="field">
<span class="field-label">店铺名称</span> <span class="field-label">店铺名称</span>
<input v-model.trim="form.shopName" placeholder="请输入店铺名称" /> <input v-model.trim="form.shopName" placeholder="请输入店铺名称" />
@@ -15,41 +16,45 @@
<input v-model="form.endTime" class="field-value" type="time" /> <input v-model="form.endTime" class="field-value" type="time" />
</label> </label>
<label class="field"> <label class="field">
<span class="field-label">默认时长</span> <span class="label-with-help">
<span class="field-label">默认时长</span>
<button class="help-badge" type="button" aria-label="默认时长说明" @click.stop.prevent="showDurationHelp">?</button>
</span>
<input v-model.trim="form.defaultDuration" inputmode="numeric" placeholder="60" /> <input v-model.trim="form.defaultDuration" inputmode="numeric" placeholder="60" />
<span class="muted">分钟</span> <span class="muted">分钟</span>
</label> </label>
<label class="field field--stack"> <label class="field field--stack">
<span class="field-label">预约规则</span> <span class="label-with-help">
<span class="field-label">预约规则</span>
<button class="help-badge" type="button" aria-label="预约规则说明" @click.stop.prevent="showRuleHelp">?</button>
</span>
<textarea v-model.trim="form.rule" placeholder="例如:必须选择已有作品作为项目来源"></textarea> <textarea v-model.trim="form.rule" placeholder="例如:必须选择已有作品作为项目来源"></textarea>
</label> </label>
</section> </section>
<div class="help-list"> <BaseModal v-model="helpModal.visible" :title="helpModal.title">
<button class="card help-row" type="button" @click="showDurationHelp"> <p class="help-content">{{ helpModal.content }}</p>
<Clock :size="18" aria-hidden="true" /> <template #footer>
<span>默认时长说明</span> <button class="primary-btn" type="button" @click="helpModal.visible = false">知道了</button>
</button> </template>
<button class="card help-row" type="button" @click="showRuleHelp"> </BaseModal>
<Info :size="18" aria-hidden="true" />
<span>预约规则说明</span>
</button>
</div>
<div class="fixed-bottom"> <div class="fixed-bottom">
<div class="fixed-bottom__inner"> <div class="fixed-bottom__inner">
<button class="primary-btn" type="button" :disabled="saving" @click="save"> <button class="primary-btn" type="button" :disabled="saving" @click="save">
{{ saving ? '保存中...' : '保存设置' }} {{ saving ? '保存中...' : '保存设置' }}
</button> </button>
</div>
</div> </div>
</div> </div>
</div> </MobileShell>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, reactive, ref } from 'vue' import { onMounted, reactive, ref } from 'vue'
import { Clock, Info } from 'lucide-vue-next' import BaseModal from '@/components/BaseModal.vue'
import LoadingState from '@/components/LoadingState.vue' import LoadingState from '@/components/LoadingState.vue'
import MobileShell from '@/components/MobileShell.vue'
import { managerShopApi } from '@/api/managerShop' import { managerShopApi } from '@/api/managerShop'
import { useToastStore } from '@/stores/toast' import { useToastStore } from '@/stores/toast'
@@ -63,6 +68,11 @@ const form = reactive({
defaultDuration: '60', defaultDuration: '60',
rule: '必须选择已有作品作为项目来源' rule: '必须选择已有作品作为项目来源'
}) })
const helpModal = reactive({
visible: false,
title: '',
content: ''
})
const loadInfo = async (): Promise<void> => { const loadInfo = async (): Promise<void> => {
loading.value = true loading.value = true
@@ -78,11 +88,15 @@ const loadInfo = async (): Promise<void> => {
} }
const showDurationHelp = (): void => { const showDurationHelp = (): void => {
window.alert('用于手动创建预约或未选择作品时的默认服务时长,会影响可约时间校验和预约结束时间估算。') helpModal.title = '默认时长'
helpModal.content = '用于手动创建预约或未选择作品时的默认服务时长,会影响可约时间校验和预约结束时间估算。'
helpModal.visible = true
} }
const showRuleHelp = (): void => { const showRuleHelp = (): void => {
window.alert('这是店铺给员工看的预约备注或说明文案,不参与自动排班、容量或冲突校验。') helpModal.title = '预约规则'
helpModal.content = '这是店铺给员工看的预约备注或说明文案,不参与自动排班、容量或冲突校验。'
helpModal.visible = true
} }
const save = async (): Promise<void> => { const save = async (): Promise<void> => {
@@ -110,21 +124,30 @@ onMounted(loadInfo)
padding-bottom: 86px; padding-bottom: 86px;
} }
.help-list { .label-with-help {
display: grid; display: inline-flex;
gap: 10px; align-items: center;
margin-top: 14px; gap: 6px;
} }
.help-row { .help-badge {
display: flex; display: inline-flex;
align-items: center; align-items: center;
gap: 10px; justify-content: center;
width: 100%; width: 18px;
min-height: 48px; height: 18px;
padding: 0 14px; border-radius: 50%;
background: #e5eee9;
color: #4e7165;
font-size: 12px;
font-weight: 900;
line-height: 1;
}
.help-content {
margin: 0;
padding: 16px;
color: #504a43; color: #504a43;
font-weight: 760; line-height: 1.7;
text-align: left;
} }
</style> </style>