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