Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13a1160ad2 | ||
|
|
10a77a9d1b | ||
|
|
569848b97e | ||
|
|
4c8dadc7bc | ||
|
|
1c2cd2506b | ||
|
|
3d1c030a6f |
@@ -9,6 +9,8 @@ export type CustomerPage = Page<Customer> & {
|
|||||||
keyword?: string;
|
keyword?: string;
|
||||||
storeId?: string;
|
storeId?: string;
|
||||||
tagIdList?: string[];
|
tagIdList?: string[];
|
||||||
|
beginCreatedAt?: number;
|
||||||
|
endCreatedAt?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
async function list(page: CustomerPage): Promise<PageResult<Customer>> {
|
async function list(page: CustomerPage): Promise<PageResult<Customer>> {
|
||||||
@@ -19,6 +21,8 @@ async function list(page: CustomerPage): Promise<PageResult<Customer>> {
|
|||||||
keyword: page.keyword || page.likesExample?.code || page.likesExample?.name || page.likesExample?.telephone,
|
keyword: page.keyword || page.likesExample?.code || page.likesExample?.name || page.likesExample?.telephone,
|
||||||
storeId: page.storeId || req.equalsExample?.storeId,
|
storeId: page.storeId || req.equalsExample?.storeId,
|
||||||
tagIdList: page.tagIdList || [],
|
tagIdList: page.tagIdList || [],
|
||||||
|
beginCreatedAt: page.beginCreatedAt,
|
||||||
|
endCreatedAt: page.endCreatedAt,
|
||||||
orderMap: page.orderMap || {}
|
orderMap: page.orderMap || {}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { axios } from "timi-web-api";
|
import { axios } from "timi-web-api/api/BaseAPI";
|
||||||
import type { Page, PageResult } from "timi-web-api";
|
import type { Page, PageResult } from "timi-web-api";
|
||||||
import type { Store, StoreBusinessDay } from "@/types/Store";
|
import type { Store, StoreBusinessDay } from "@/types/Store";
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import AppNavBar from "@/components/navbar/index.vue";
|
|||||||
import PageTransition from "@/components/PageTransition.vue";
|
import PageTransition from "@/components/PageTransition.vue";
|
||||||
import { useTabBarStore } from "@/store/tabBarStore";
|
import { useTabBarStore } from "@/store/tabBarStore";
|
||||||
import { permissionCodes } from "@/utils/permission";
|
import { permissionCodes } from "@/utils/permission";
|
||||||
import { useUserStore } from "timi-web-api";
|
import { useUserStore } from "timi-web-api/store";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
+12
-9
@@ -4,18 +4,20 @@ import router from "@/router";
|
|||||||
import Root from "@/Root.vue";
|
import Root from "@/Root.vue";
|
||||||
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
||||||
|
|
||||||
import "tdesign-mobile-vue/es/style/index.css";
|
import { configureUserStore, useUserStore } from "timi-web-api/store";
|
||||||
import "timi-web/style.css";
|
import Network from "timi-web-api/utils/Network";
|
||||||
import "timi-tdesign-mobile/style.css";
|
import { VCan, VRole } from "timi-web-api/utils/directives/Access";
|
||||||
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
||||||
import "@/assets/styles/tdesign-custom.css";
|
|
||||||
import "@/assets/styles/global.less";
|
|
||||||
import TimiWebUI from "timi-web";
|
|
||||||
import { configureUserStore, Network, useUserStore, VCan, VRole } from "timi-web-api";
|
|
||||||
import type { ApiResponse } from "timi-web-api";
|
import type { ApiResponse } from "timi-web-api";
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import vEntranceTransition from "@/directives/entranceTransition";
|
import vEntranceTransition from "@/directives/entranceTransition";
|
||||||
|
|
||||||
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
||||||
|
import "tdesign-mobile-vue/es/style/index.css";
|
||||||
|
import "timi-web/style.css";
|
||||||
|
import "timi-tdesign-mobile/style.css";
|
||||||
|
import "@/assets/styles/tdesign-custom.css";
|
||||||
|
import "@/assets/styles/global.less";
|
||||||
|
|
||||||
export const pinia = createPinia();
|
export const pinia = createPinia();
|
||||||
const apiBaseURL = import.meta.env.VITE_API_BASE_URL as string | undefined;
|
const apiBaseURL = import.meta.env.VITE_API_BASE_URL as string | undefined;
|
||||||
|
|
||||||
@@ -47,7 +49,6 @@ Network.setGlobalRequestInterceptor((config: any) => {
|
|||||||
async function bootstrap(): Promise<void> {
|
async function bootstrap(): Promise<void> {
|
||||||
const app = createApp(Root);
|
const app = createApp(Root);
|
||||||
app.use(pinia);
|
app.use(pinia);
|
||||||
app.use(TimiWebUI);
|
|
||||||
app.directive("can", VCan);
|
app.directive("can", VCan);
|
||||||
app.directive("role", VRole);
|
app.directive("role", VRole);
|
||||||
app.directive("entrance-transition", vEntranceTransition);
|
app.directive("entrance-transition", vEntranceTransition);
|
||||||
@@ -64,6 +65,8 @@ async function bootstrap(): Promise<void> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
|
await router.isReady();
|
||||||
|
await import("timi-tdesign-mobile");
|
||||||
app.mount("#root");
|
app.mount("#root");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,19 +21,19 @@
|
|||||||
</t-button>
|
</t-button>
|
||||||
</template>
|
</template>
|
||||||
</t-input>
|
</t-input>
|
||||||
<t-button
|
<t-dropdown-menu ref="filterMenu" class="menus">
|
||||||
|
<t-dropdown-item
|
||||||
|
v-model="dateFilterType"
|
||||||
|
:label="dateFilterLabel"
|
||||||
|
:options="dateOptions"
|
||||||
|
@change="selectDateFilter"
|
||||||
|
/>
|
||||||
|
<t-dropdown-item
|
||||||
v-if="canReadTag"
|
v-if="canReadTag"
|
||||||
class="tag-filter"
|
:label="tagFilterText"
|
||||||
size="small"
|
@open="handleTagFilterOpen"
|
||||||
theme="primary"
|
/>
|
||||||
variant="outline"
|
</t-dropdown-menu>
|
||||||
@click="tagSelectorVisible = true"
|
|
||||||
>
|
|
||||||
<template #icon>
|
|
||||||
<t-icon name="tag" />
|
|
||||||
</template>
|
|
||||||
<span v-text="tagFilterText" />
|
|
||||||
</t-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="scannerVisible" class="scanner-wrapper">
|
<div v-if="scannerVisible" class="scanner-wrapper">
|
||||||
<code-scanner
|
<code-scanner
|
||||||
@@ -54,6 +54,20 @@
|
|||||||
/>
|
/>
|
||||||
<t-button size="extra-small" variant="text" @click="clearTagFilter">清空</t-button>
|
<t-button size="extra-small" variant="text" @click="clearTagFilter">清空</t-button>
|
||||||
</div>
|
</div>
|
||||||
|
<t-cell-group v-if="dateFilterType !== 'all'" class="date-summary" theme="card">
|
||||||
|
<t-cell
|
||||||
|
title="开始时间"
|
||||||
|
:note="dateRange[0] || '-'"
|
||||||
|
arrow
|
||||||
|
@click="openStartTime"
|
||||||
|
/>
|
||||||
|
<t-cell
|
||||||
|
title="结束时间"
|
||||||
|
:note="dateRange[1] || '-'"
|
||||||
|
arrow
|
||||||
|
@click="openEndTime"
|
||||||
|
/>
|
||||||
|
</t-cell-group>
|
||||||
<t-pull-down-refresh
|
<t-pull-down-refresh
|
||||||
class="list-wrapper fix-last-cell-line"
|
class="list-wrapper fix-last-cell-line"
|
||||||
v-model="isRefreshing"
|
v-model="isRefreshing"
|
||||||
@@ -106,9 +120,34 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<nav-bar-action-menu v-if="canShowActionMenu" :actions="actionList" />
|
<nav-bar-action-menu v-if="canShowActionMenu" :actions="actionList" />
|
||||||
|
<t-popup v-model="startVisible" placement="bottom">
|
||||||
|
<t-date-time-picker
|
||||||
|
v-if="startVisible"
|
||||||
|
v-model="startDraft"
|
||||||
|
format="YYYY-MM-DD HH:mm"
|
||||||
|
:mode="['date', 'minute']"
|
||||||
|
title="开始时间"
|
||||||
|
:default-value="startDraft"
|
||||||
|
@cancel="cancelStartTime"
|
||||||
|
@confirm="confirmStartTime"
|
||||||
|
/>
|
||||||
|
</t-popup>
|
||||||
|
<t-popup v-model="endVisible" placement="bottom">
|
||||||
|
<t-date-time-picker
|
||||||
|
v-if="endVisible"
|
||||||
|
v-model="endDraft"
|
||||||
|
format="YYYY-MM-DD HH:mm"
|
||||||
|
:mode="['date', 'minute']"
|
||||||
|
title="结束时间"
|
||||||
|
:default-value="endDraft"
|
||||||
|
@cancel="cancelEndTime"
|
||||||
|
@confirm="confirmEndTime"
|
||||||
|
/>
|
||||||
|
</t-popup>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import type { DropdownValue } from "tdesign-mobile-vue";
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import { Time, Toolkit, WebToolkit } from "timi-web";
|
import { Time, Toolkit, WebToolkit } from "timi-web";
|
||||||
import { type Page, type PageResult, useUserStore } from "timi-web-api";
|
import { type Page, type PageResult, useUserStore } from "timi-web-api";
|
||||||
@@ -128,6 +167,8 @@ defineOptions({
|
|||||||
name: "CustomerList"
|
name: "CustomerList"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
type DateFilterType = "today" | "yesterday" | "lastWeek" | "thisMonth" | "lastMonth" | "all" | "custom";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const currentStoreStore = useCurrentStoreStore();
|
const currentStoreStore = useCurrentStoreStore();
|
||||||
@@ -148,6 +189,23 @@ const canShowActionMenu = computed(() => canCreateCustomer.value || canExportCus
|
|||||||
const scannerVisible = ref(false);
|
const scannerVisible = ref(false);
|
||||||
const scanStatus = ref("点击扫码开始识别");
|
const scanStatus = ref("点击扫码开始识别");
|
||||||
let latestDecodedText = "";
|
let latestDecodedText = "";
|
||||||
|
const dateOptions: Array<{ label: string; value: DateFilterType }> = [
|
||||||
|
{ label: "全部", value: "all" },
|
||||||
|
{ label: "今天", value: "today" },
|
||||||
|
{ label: "昨天", value: "yesterday" },
|
||||||
|
{ label: "上周", value: "lastWeek" },
|
||||||
|
{ label: "本月", value: "thisMonth" },
|
||||||
|
{ label: "上个月", value: "lastMonth" },
|
||||||
|
{ label: "自定义范围", value: "custom" }
|
||||||
|
];
|
||||||
|
const dateFilterType = ref<DateFilterType>("all");
|
||||||
|
const dateRange = ref<[string, string]>(buildPresetRange("all"));
|
||||||
|
const startDraft = ref("");
|
||||||
|
const endDraft = ref("");
|
||||||
|
const startVisible = ref(false);
|
||||||
|
const endVisible = ref(false);
|
||||||
|
const filterMenu = ref<{ toggle?: (index?: number) => void }>();
|
||||||
|
const dateFilterLabel = computed(() => `录入时间:${dateOptions.find(item => item.value === dateFilterType.value)?.label || "全部"}`);
|
||||||
|
|
||||||
async function toggleScanner(): Promise<void> {
|
async function toggleScanner(): Promise<void> {
|
||||||
scannerVisible.value = !scannerVisible.value;
|
scannerVisible.value = !scannerVisible.value;
|
||||||
@@ -205,6 +263,65 @@ const actionList = computed<NavBarAction[]>(() => {
|
|||||||
return list;
|
return list;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ---------- 录入时间筛选 ----------
|
||||||
|
|
||||||
|
async function selectDateFilter(value: DropdownValue): Promise<void> {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dateFilterType.value = String(value) as DateFilterType;
|
||||||
|
if (dateFilterType.value !== "custom") {
|
||||||
|
dateRange.value = buildPresetRange(dateFilterType.value);
|
||||||
|
await refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function openStartTime(): void {
|
||||||
|
startDraft.value = dateRange.value[0] || `${Time.formatDate(new Date())} 00:00`;
|
||||||
|
startVisible.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function openEndTime(): void {
|
||||||
|
endDraft.value = dateRange.value[1] || `${Time.formatDate(new Date())} 23:59`;
|
||||||
|
endVisible.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancelStartTime(): void {
|
||||||
|
startVisible.value = false;
|
||||||
|
startDraft.value = dateRange.value[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancelEndTime(): void {
|
||||||
|
endVisible.value = false;
|
||||||
|
endDraft.value = dateRange.value[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
async function confirmStartTime(value?: string | number): Promise<void> {
|
||||||
|
startVisible.value = false;
|
||||||
|
dateRange.value = [String(value || startDraft.value), dateRange.value[1]];
|
||||||
|
await confirmCustomRange();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function confirmEndTime(value?: string | number): Promise<void> {
|
||||||
|
endVisible.value = false;
|
||||||
|
dateRange.value = [dateRange.value[0], String(value || endDraft.value)];
|
||||||
|
await confirmCustomRange();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function confirmCustomRange(): Promise<void> {
|
||||||
|
if (dateRange.value[0] && dateRange.value[1] && dateRange.value[1] < dateRange.value[0]) {
|
||||||
|
dateRange.value = [dateRange.value[1], dateRange.value[0]];
|
||||||
|
}
|
||||||
|
dateFilterType.value = "custom";
|
||||||
|
await refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleTagFilterOpen(): void {
|
||||||
|
tagSelectorVisible.value = true;
|
||||||
|
filterMenu.value?.toggle?.();
|
||||||
|
}
|
||||||
|
|
||||||
// ---------- 标签筛选 ----------
|
// ---------- 标签筛选 ----------
|
||||||
|
|
||||||
const selectedTagList = ref<Tag[]>([]);
|
const selectedTagList = ref<Tag[]>([]);
|
||||||
@@ -244,11 +361,14 @@ const page = reactive<Page<Customer>>({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const fetch = Toolkit.debounce(async () => {
|
const fetch = Toolkit.debounce(async () => {
|
||||||
|
const [beginCreatedAt, endCreatedAt] = buildCreatedAtRange();
|
||||||
const result = await CustomerAPI.list({
|
const result = await CustomerAPI.list({
|
||||||
...page,
|
...page,
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
storeId: currentStoreStore.currentStoreId,
|
storeId: currentStoreStore.currentStoreId,
|
||||||
tagIdList: selectedTagIdList.value
|
tagIdList: selectedTagIdList.value,
|
||||||
|
beginCreatedAt,
|
||||||
|
endCreatedAt
|
||||||
});
|
});
|
||||||
pageResult.total = result.total;
|
pageResult.total = result.total;
|
||||||
pageResult.list = pageResult.list.concat(result.list);
|
pageResult.list = pageResult.list.concat(result.list);
|
||||||
@@ -360,6 +480,65 @@ async function doExport(): Promise<void> {
|
|||||||
isExporting.value = false;
|
isExporting.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildCreatedAtRange(): [number | undefined, number | undefined] {
|
||||||
|
if (dateFilterType.value === "all") {
|
||||||
|
return [undefined, undefined];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
dateRange.value[0] ? Time.toTimestamp(parseDateTime(dateRange.value[0], false)) : undefined,
|
||||||
|
dateRange.value[1] ? Time.toTimestamp(parseDateTime(dateRange.value[1], true)) : undefined
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildPresetRange(type: Exclude<DateFilterType, "custom">): [string, string] {
|
||||||
|
if (type === "all") {
|
||||||
|
return ["", ""];
|
||||||
|
}
|
||||||
|
if (type === "lastWeek") {
|
||||||
|
const current = new Date();
|
||||||
|
current.setHours(0, 0, 0, 0);
|
||||||
|
const day = current.getDay() || 7;
|
||||||
|
const thisWeekMonday = new Date(current);
|
||||||
|
thisWeekMonday.setDate(current.getDate() - day + 1);
|
||||||
|
const lastWeekMonday = new Date(thisWeekMonday);
|
||||||
|
lastWeekMonday.setDate(thisWeekMonday.getDate() - 7);
|
||||||
|
const lastWeekSunday = new Date(thisWeekMonday);
|
||||||
|
lastWeekSunday.setDate(thisWeekMonday.getDate() - 1);
|
||||||
|
return [`${Time.formatDate(lastWeekMonday)} 00:00`, `${Time.formatDate(lastWeekSunday)} 23:59`];
|
||||||
|
}
|
||||||
|
if (type === "thisMonth") {
|
||||||
|
const current = new Date();
|
||||||
|
const begin = new Date(current.getFullYear(), current.getMonth(), 1);
|
||||||
|
return [`${Time.formatDate(begin)} 00:00`, `${Time.formatDate(current)} 23:59`];
|
||||||
|
}
|
||||||
|
if (type === "lastMonth") {
|
||||||
|
const current = new Date();
|
||||||
|
const begin = new Date(current.getFullYear(), current.getMonth() - 1, 1);
|
||||||
|
const end = new Date(current.getFullYear(), current.getMonth(), 0);
|
||||||
|
return [`${Time.formatDate(begin)} 00:00`, `${Time.formatDate(end)} 23:59`];
|
||||||
|
}
|
||||||
|
|
||||||
|
const offsetMap: Record<Exclude<DateFilterType, "all" | "custom" | "lastWeek" | "thisMonth" | "lastMonth">, number> = {
|
||||||
|
today: 0,
|
||||||
|
yesterday: 1
|
||||||
|
};
|
||||||
|
const date = new Date();
|
||||||
|
date.setHours(0, 0, 0, 0);
|
||||||
|
date.setDate(date.getDate() - offsetMap[type]);
|
||||||
|
return [`${Time.formatDate(date)} 00:00`, `${Time.formatDate(date)} 23:59`];
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseDateTime(value: string, isEnd: boolean): Date {
|
||||||
|
if (!value) {
|
||||||
|
return isEnd ? new Date() : new Date(0);
|
||||||
|
}
|
||||||
|
const [dateText, timeText = isEnd ? "23:59" : "00:00"] = value.split(" ");
|
||||||
|
const [year, month, day] = dateText.split("-").map(Number);
|
||||||
|
const [hour, minute] = timeText.split(":").map(Number);
|
||||||
|
return new Date(year, month - 1, day, hour || 0, minute || 0, isEnd ? 59 : 0, 0);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@@ -367,33 +546,38 @@ async function doExport(): Promise<void> {
|
|||||||
padding: var(--app-nav-height) 0 1rem 0;
|
padding: var(--app-nav-height) 0 1rem 0;
|
||||||
|
|
||||||
.filter {
|
.filter {
|
||||||
gap: .5rem;
|
|
||||||
top: var(--app-nav-height);
|
top: var(--app-nav-height);
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
padding: .5rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
padding: .75rem 1rem;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
background: #f5f5f8;
|
||||||
box-shadow: var(--td-shadow-1);
|
box-shadow: var(--td-shadow-1);
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
--td-button-border-radius: .875rem;
|
--td-button-border-radius: .75rem;
|
||||||
--td-input-vertical-padding: .25rem 1rem;
|
--td-input-vertical-padding: .25rem 1rem;
|
||||||
|
|
||||||
width: 100%;
|
border: 1px solid rgba(148, 163, 184, .28);
|
||||||
border: 1px solid var(--td-component-border);
|
z-index: 2;
|
||||||
|
background: #f8fbff;
|
||||||
padding-right: .3rem;
|
padding-right: .3rem;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-filter {
|
.menus {
|
||||||
--td-button-border-radius: 1rem;
|
--td-spacer-1: 6px;
|
||||||
|
|
||||||
flex: 0 0 auto;
|
width: 100%;
|
||||||
height: auto;
|
overflow: hidden;
|
||||||
align-self: stretch;
|
margin-top: -1rem;
|
||||||
|
padding-top: .8rem;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid rgba(148, 163, 184, .18);
|
||||||
|
border-radius: 0 0 1rem 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,14 +615,19 @@ async function doExport(): Promise<void> {
|
|||||||
:global(html.theme-dark) {
|
:global(html.theme-dark) {
|
||||||
.customer-list {
|
.customer-list {
|
||||||
|
|
||||||
.filter-bar {
|
.filter {
|
||||||
background: #10161f;
|
background: #10161f;
|
||||||
|
|
||||||
.text-input {
|
.search {
|
||||||
color: #e2e8f0;
|
color: #e2e8f0;
|
||||||
background: rgba(15, 23, 42, .72);
|
background: rgba(15, 23, 42, .72);
|
||||||
border-color: rgba(148, 163, 184, .16);
|
border-color: rgba(148, 163, 184, .16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menus {
|
||||||
|
background: #172033;
|
||||||
|
border-color: rgba(148, 163, 184, .16);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.items {
|
.items {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-can="permissionCodes.eventRecord.read" class="registration-record-list">
|
<div v-can="permissionCodes.eventRecord.read" class="registration-record-list">
|
||||||
<div class="search-bar">
|
<div class="search-bar">
|
||||||
<div class="search-status">
|
<div class="search-date">
|
||||||
<t-input
|
<t-input
|
||||||
v-model.trim="keyword"
|
v-model.trim="keyword"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
@@ -750,7 +750,7 @@ onUnmounted(() => {
|
|||||||
box-shadow: var(--td-shadow-1);
|
box-shadow: var(--td-shadow-1);
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.search-status {
|
.search-date {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.search-input {
|
.search-input {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ const sourceItems = computed<GaoSalesOrderItem[]>(() => (order.value?.itemList |
|
|||||||
&& 0 < comparePackageQuantity(item.availableBaseQuantity ?? "0", "0")));
|
&& 0 < comparePackageQuantity(item.availableBaseQuantity ?? "0", "0")));
|
||||||
const unitPickerOptions = computed(() => {
|
const unitPickerOptions = computed(() => {
|
||||||
const item = sourceItems.value.find(value => value.id === unitPickerSourceItemId.value);
|
const item = sourceItems.value.find(value => value.id === unitPickerSourceItemId.value);
|
||||||
return item ? getSellableUnitList(item).map(unit => ({ label: unit.name, value: unit.id || "" })) : [];
|
return item ? getFulfillmentUnitList(item).map(unit => ({ label: unit.name, value: unit.id || "" })) : [];
|
||||||
});
|
});
|
||||||
const canFulfillByPayment = computed(() => order.value?.paymentStatus === "PAID" || userStore.hasRoles(gaoRoleCodes.storeManager));
|
const canFulfillByPayment = computed(() => order.value?.paymentStatus === "PAID" || userStore.hasRoles(gaoRoleCodes.storeManager));
|
||||||
|
|
||||||
@@ -191,8 +191,8 @@ async function loadFulfillmentSkuList(): Promise<void> {
|
|||||||
if (!item.id || fulfillmentUnitMap[item.id]) {
|
if (!item.id || fulfillmentUnitMap[item.id]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const originalUnit = getSellableUnitList(item).find(unit => unit.id === item.skuUnitId);
|
const originalUnit = getFulfillmentUnitList(item).find(unit => unit.id === item.skuUnitId);
|
||||||
const defaultUnit = getFulfillmentUnitForAvailableQuantity(item, originalUnit || getSellableUnitList(item)[0]);
|
const defaultUnit = getFulfillmentUnitForAvailableQuantity(item, originalUnit || getFulfillmentUnitList(item)[0]);
|
||||||
if (defaultUnit?.id) {
|
if (defaultUnit?.id) {
|
||||||
fulfillmentUnitMap[item.id] = defaultUnit.id;
|
fulfillmentUnitMap[item.id] = defaultUnit.id;
|
||||||
}
|
}
|
||||||
@@ -222,7 +222,7 @@ function getBaseUnitName(item: GaoSalesOrderItem): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getBaseUnit(item: GaoSalesOrderItem): ProductSkuUnit | undefined {
|
function getBaseUnit(item: GaoSalesOrderItem): ProductSkuUnit | undefined {
|
||||||
return getSellableUnitList(item).find(unit => unit.isBase);
|
return getFulfillmentUnitList(item).find(unit => unit.isBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldDowngradeUnit(item: GaoSalesOrderItem, unit?: ProductSkuUnit): boolean {
|
function shouldDowngradeUnit(item: GaoSalesOrderItem, unit?: ProductSkuUnit): boolean {
|
||||||
@@ -254,12 +254,25 @@ function fillAllQuantity(item: GaoSalesOrderItem): void {
|
|||||||
quantityMap[item.id] = quantity;
|
quantityMap[item.id] = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSellableUnitList(item: GaoSalesOrderItem): ProductSkuUnit[] {
|
function getFulfillmentUnitList(item: GaoSalesOrderItem): ProductSkuUnit[] {
|
||||||
return (item.skuId ? fulfillmentSkuMap[item.skuId]?.unitList : [])?.filter(unit => unit.allowSale !== false && !!unit.id) || [];
|
const unitList = (item.skuId ? fulfillmentSkuMap[item.skuId]?.unitList : [])?.filter(unit => !!unit.id) || [];
|
||||||
|
if (!item.skuUnitId) {
|
||||||
|
return unitList;
|
||||||
|
}
|
||||||
|
const originalUnit: ProductSkuUnit = {
|
||||||
|
...(unitList.find(unit => unit.id === item.skuUnitId) || {}),
|
||||||
|
id: item.skuUnitId,
|
||||||
|
skuId: item.skuId,
|
||||||
|
name: item.unitSnapshot || "成交单位",
|
||||||
|
baseQuantityPerUnit: item.baseQuantityPerUnitSnapshot ?? "1",
|
||||||
|
allowPurchase: false,
|
||||||
|
allowSale: false
|
||||||
|
};
|
||||||
|
return [originalUnit, ...unitList.filter(unit => unit.id !== item.skuUnitId)];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFulfillmentUnit(item: GaoSalesOrderItem): ProductSkuUnit | undefined {
|
function getFulfillmentUnit(item: GaoSalesOrderItem): ProductSkuUnit | undefined {
|
||||||
return getSellableUnitList(item).find(unit => unit.id === fulfillmentUnitMap[item.id || ""]);
|
return getFulfillmentUnitList(item).find(unit => unit.id === fulfillmentUnitMap[item.id || ""]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setFulfillmentUnit(item: GaoSalesOrderItem, unit: ProductSkuUnit): void {
|
function setFulfillmentUnit(item: GaoSalesOrderItem, unit: ProductSkuUnit): void {
|
||||||
@@ -282,19 +295,19 @@ function openUnitPicker(item: GaoSalesOrderItem): void {
|
|||||||
if (!item.id) {
|
if (!item.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!getSellableUnitList(item).length) {
|
if (!getFulfillmentUnitList(item).length) {
|
||||||
Message.warning("当前 SKU 没有可用于履约的销售单位");
|
Message.warning("当前 SKU 没有可用于履约的单位");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
unitPickerSourceItemId.value = item.id;
|
unitPickerSourceItemId.value = item.id;
|
||||||
unitPickerDraft.value = [fulfillmentUnitMap[item.id] || getSellableUnitList(item)[0]?.id || ""];
|
unitPickerDraft.value = [fulfillmentUnitMap[item.id] || getFulfillmentUnitList(item)[0]?.id || ""];
|
||||||
unitPickerVisible.value = true;
|
unitPickerVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmUnitPicker(value: Array<string | number>): void {
|
function confirmUnitPicker(value: Array<string | number>): void {
|
||||||
const skuUnitId = String(value[0] || "");
|
const skuUnitId = String(value[0] || "");
|
||||||
const item = sourceItems.value.find(sourceItem => sourceItem.id === unitPickerSourceItemId.value);
|
const item = sourceItems.value.find(sourceItem => sourceItem.id === unitPickerSourceItemId.value);
|
||||||
const selectedUnit = item ? getSellableUnitList(item).find(unit => unit.id === skuUnitId) : undefined;
|
const selectedUnit = item ? getFulfillmentUnitList(item).find(unit => unit.id === skuUnitId) : undefined;
|
||||||
const fulfillmentUnit = item ? getFulfillmentUnitForAvailableQuantity(item, selectedUnit) : selectedUnit;
|
const fulfillmentUnit = item ? getFulfillmentUnitForAvailableQuantity(item, selectedUnit) : selectedUnit;
|
||||||
if (item?.id && fulfillmentUnit?.id) {
|
if (item?.id && fulfillmentUnit?.id) {
|
||||||
setFulfillmentUnit(item, fulfillmentUnit);
|
setFulfillmentUnit(item, fulfillmentUnit);
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
</t-cell>
|
</t-cell>
|
||||||
<t-cell title="当前 SKU" :note="`${form.skuList.length} 个`" />
|
<t-cell title="当前 SKU" :note="`${form.skuList.length} 个`" />
|
||||||
</t-cell-group>
|
</t-cell-group>
|
||||||
<t-cell-group v-if="form.skuList.length" theme="card" class="sku-list">
|
<t-cell-group v-if="form.skuList.length" theme="card" class="sku-list fix-last-cell-line">
|
||||||
<product-sku-editor
|
<product-sku-editor
|
||||||
v-for="(sku, skuIndex) in form.skuList"
|
v-for="(sku, skuIndex) in form.skuList"
|
||||||
:key="sku.clientKey"
|
:key="sku.clientKey"
|
||||||
@@ -418,11 +418,19 @@ function closeBatchUnitEditor(): void {
|
|||||||
|
|
||||||
function applyBatchUnitTemplate(): void {
|
function applyBatchUnitTemplate(): void {
|
||||||
const templateList = batchUnitList.value;
|
const templateList = batchUnitList.value;
|
||||||
|
for (const sku of form.skuList) {
|
||||||
|
const templateNameSet = new Set(templateList.map(unit => unit.name.trim()));
|
||||||
|
if (sku.unitList.some(unit => !!unit.id && !templateNameSet.has(unit.name.trim()))) {
|
||||||
|
Message.warning("统一配置不能删除或重命名已保存单位,请在 SKU 明细中停售");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
form.skuList.forEach(sku => {
|
form.skuList.forEach(sku => {
|
||||||
const oldUnitList = sku.unitList;
|
const oldUnitList = sku.unitList;
|
||||||
|
const oldUnitMap = new Map(oldUnitList.filter(unit => !!unit.id).map(unit => [unit.name.trim(), unit]));
|
||||||
sku.unitList = templateList.map((unit, unitIndex) => ({
|
sku.unitList = templateList.map((unit, unitIndex) => ({
|
||||||
...unit,
|
...unit,
|
||||||
id: oldUnitList[unitIndex]?.id,
|
id: oldUnitMap.get(unit.name.trim())?.id,
|
||||||
skuId: sku.id,
|
skuId: sku.id,
|
||||||
clientKey: window.crypto.randomUUID(),
|
clientKey: window.crypto.randomUUID(),
|
||||||
sort: unitIndex
|
sort: unitIndex
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<t-swipe-cell class="sku-cell">
|
<t-swipe-cell class="sku-cell item">
|
||||||
<t-cell role="button" tabindex="0" arrow @click="openEditor">
|
<t-cell role="button" tabindex="0" arrow @click="openEditor">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
@@ -41,8 +41,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</t-cell>
|
</t-cell>
|
||||||
<template #right>
|
<template #right>
|
||||||
<t-button class="delete-action" theme="danger" @click.stop="requestRemove">
|
<t-button class="delete-action swipe-cell-button" theme="danger" @click.stop="requestRemove">
|
||||||
删除
|
停用
|
||||||
</t-button>
|
</t-button>
|
||||||
</template>
|
</template>
|
||||||
</t-swipe-cell>
|
</t-swipe-cell>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<t-form-item v-if="sku.stockEnabled" label="最低库存" help="基础单位数量,最多三位小数">
|
<t-form-item v-if="sku.stockEnabled" label="最低库存" help="基础单位数量,最多三位小数">
|
||||||
<t-input v-model.trim="sku.minStockQuantityText" type="number" align="right" borderless placeholder="0" />
|
<t-input v-model.trim="sku.minStockQuantityText" type="number" align="right" borderless placeholder="0" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="明细状态" content-align="right">
|
<t-form-item label="启用" content-align="right">
|
||||||
<t-switch :model-value="sku.status === 'ACTIVE'" size="small" @change="setSkuStatus" />
|
<t-switch :model-value="sku.status === 'ACTIVE'" size="small" @change="setSkuStatus" />
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item label="备注">
|
<t-form-item label="备注">
|
||||||
|
|||||||
@@ -28,7 +28,15 @@
|
|||||||
<div v-for="(unit, unitIndex) in sku.unitList" :key="unit.clientKey" class="unit-card">
|
<div v-for="(unit, unitIndex) in sku.unitList" :key="unit.clientKey" class="unit-card">
|
||||||
<div class="unit-card-header">
|
<div class="unit-card-header">
|
||||||
<strong v-text="`单位 ${unitIndex + 1}`" />
|
<strong v-text="`单位 ${unitIndex + 1}`" />
|
||||||
<t-button v-if="1 < sku.unitList.length" theme="danger" variant="text" size="extra-small" content="删除" @click="removeUnit(unitIndex)" />
|
<t-button
|
||||||
|
v-if="1 < sku.unitList.length"
|
||||||
|
theme="danger"
|
||||||
|
variant="text"
|
||||||
|
size="extra-small"
|
||||||
|
:content="unit.id ? '停售' : '删除'"
|
||||||
|
:disabled="!!unit.id && unit.allowSale === false && unit.allowPurchase === false"
|
||||||
|
@click="removeUnit(unitIndex)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<t-form class="unit-form" label-align="left" label-width="6rem">
|
<t-form class="unit-form" label-align="left" label-width="6rem">
|
||||||
<t-form-item label="单位名称" required-mark>
|
<t-form-item label="单位名称" required-mark>
|
||||||
@@ -134,6 +142,13 @@ function removeUnit(index: number): void {
|
|||||||
Message.warning("每个 SKU 至少需要一个单位");
|
Message.warning("每个 SKU 至少需要一个单位");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const unit = sku.value.unitList[index];
|
||||||
|
if (unit?.id) {
|
||||||
|
unit.allowSale = false;
|
||||||
|
unit.allowPurchase = false;
|
||||||
|
Message.success("单位已停售并禁止采购,历史订单仍可履约");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const wasBase = sku.value.unitList[index]?.isBase;
|
const wasBase = sku.value.unitList[index]?.isBase;
|
||||||
sku.value.unitList.splice(index, 1);
|
sku.value.unitList.splice(index, 1);
|
||||||
if (wasBase && sku.value.unitList[0]) {
|
if (wasBase && sku.value.unitList[0]) {
|
||||||
|
|||||||
@@ -526,11 +526,13 @@ onMounted(async () => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.keyword {
|
.keyword {
|
||||||
--td-input-vertical-padding: 8px 14px;
|
--td-button-border-radius: .75rem;
|
||||||
|
--td-input-vertical-padding: .25rem 1rem;
|
||||||
|
|
||||||
border: 1px solid var(--td-component-border);
|
border: 1px solid var(--td-component-border);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background: var(--td-bg-color-container);
|
background: var(--td-bg-color-container);
|
||||||
|
padding-right: .3rem;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
@@ -552,20 +554,6 @@ onMounted(async () => {
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid rgba(148, 163, 184, .18);
|
border: 1px solid rgba(148, 163, 184, .18);
|
||||||
border-radius: 0 0 1rem 1rem;
|
border-radius: 0 0 1rem 1rem;
|
||||||
|
|
||||||
&:after {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.t-dropdown-menu__item) {
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.t-dropdown-menu__title) {
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,16 +15,18 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Time } from "timi-web";
|
import { Time } from "timi-web";
|
||||||
import type { EChartsOption } from "echarts";
|
import type { DefaultLabelFormatterCallbackParams, EChartsOption } from "echarts";
|
||||||
import StoreChartAPI from "@/api/StoreChartAPI";
|
import StoreChartAPI from "@/api/StoreChartAPI";
|
||||||
import ChartRangeSlider from "@/components/ChartRangeSlider.vue";
|
import ChartRangeSlider from "@/components/ChartRangeSlider.vue";
|
||||||
import type { CustomerDailyStatView } from "@/types/Customer";
|
import type { CustomerDailyStatCustomerView, CustomerDailyStatView } from "@/types/Customer";
|
||||||
import { buildStoreBaseChartOption, useStoreChart, useStoreChartWindow } from "@/pages/store/component/useStoreChart";
|
import { buildStoreBaseChartOption, useStoreChart, useStoreChartWindow } from "@/pages/store/component/useStoreChart";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
dateTextList: string[];
|
dateTextList: string[];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const MAX_TOOLTIP_CUSTOMER_COUNT = 24;
|
||||||
|
|
||||||
// ---------- 图表数据 ----------
|
// ---------- 图表数据 ----------
|
||||||
|
|
||||||
const statList = ref<CustomerDailyStatView[]>([]);
|
const statList = ref<CustomerDailyStatView[]>([]);
|
||||||
@@ -43,6 +45,13 @@ const {
|
|||||||
} = useStoreChartWindow(dateTextList);
|
} = useStoreChartWindow(dateTextList);
|
||||||
const chartOption = computed<EChartsOption>(() => ({
|
const chartOption = computed<EChartsOption>(() => ({
|
||||||
...buildStoreBaseChartOption(visibleDateTextList.value),
|
...buildStoreBaseChartOption(visibleDateTextList.value),
|
||||||
|
grid: {
|
||||||
|
top: 48,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
@@ -74,6 +83,7 @@ const chartOption = computed<EChartsOption>(() => ({
|
|||||||
type: "line",
|
type: "line",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
showSymbol: false,
|
||||||
data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.totalCustomerCount || 0)
|
data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.totalCustomerCount || 0)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -82,7 +92,12 @@ const chartOption = computed<EChartsOption>(() => ({
|
|||||||
yAxisIndex: 1,
|
yAxisIndex: 1,
|
||||||
data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.newCustomerCount || 0)
|
data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.newCustomerCount || 0)
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
tooltip: {
|
||||||
|
trigger: "axis",
|
||||||
|
formatter: params => formatGrowthTooltip(params),
|
||||||
|
extraCssText: "max-width: min(19rem, calc(100vw - 2rem));"
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const { chartElement } = useStoreChart(chartOption);
|
const { chartElement } = useStoreChart(chartOption);
|
||||||
@@ -115,6 +130,45 @@ function getDailyStat(dateText: string): CustomerDailyStatView | undefined {
|
|||||||
return statList.value.find(item => item.dateValue === dateValue);
|
return statList.value.find(item => item.dateValue === dateValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatGrowthTooltip(params: DefaultLabelFormatterCallbackParams | DefaultLabelFormatterCallbackParams[]): string {
|
||||||
|
const firstParam = Array.isArray(params) ? params[0] : params;
|
||||||
|
const dateText = visibleDateTextList.value[firstParam?.dataIndex ?? -1];
|
||||||
|
const stat = dateText ? getDailyStat(dateText) : undefined;
|
||||||
|
if (!dateText || !stat) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
const customerList = stat.customerList || [];
|
||||||
|
const visibleCustomerList = customerList.slice(0, MAX_TOOLTIP_CUSTOMER_COUNT);
|
||||||
|
const customerHTML = visibleCustomerList.length
|
||||||
|
? visibleCustomerList.map(formatCustomerTooltipItem).join("")
|
||||||
|
: "";
|
||||||
|
const hiddenCustomerCount = Math.max(0, customerList.length - visibleCustomerList.length);
|
||||||
|
const hiddenCustomerHTML = hiddenCustomerCount
|
||||||
|
? `<div style="color:#94a3b8;margin-top:4px;">还有 ${hiddenCustomerCount} 人未显示</div>`
|
||||||
|
: "";
|
||||||
|
return [
|
||||||
|
`<div style="font-weight:700;margin-bottom:6px;">${escapeTooltipHTML(dateText)}</div>`,
|
||||||
|
`<div>客户总量:${stat.totalCustomerCount || 0} 人</div>`,
|
||||||
|
`<div>新客户量:${stat.newCustomerCount || 0} 人</div>`,
|
||||||
|
`<div style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px 10px;margin-top:6px;">${customerHTML}${hiddenCustomerHTML}</div>`
|
||||||
|
].join("");
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatCustomerTooltipItem(customer: CustomerDailyStatCustomerView): string {
|
||||||
|
return `<div style="line-height:1.6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">${escapeTooltipHTML(customer.name || "未命名客户")}</div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escapeTooltipHTML(value: string): string {
|
||||||
|
return value.replace(/[&<>"']/g, character => ({
|
||||||
|
"&": "&",
|
||||||
|
"<": "<",
|
||||||
|
">": ">",
|
||||||
|
"\"": """,
|
||||||
|
"'": "'"
|
||||||
|
}[character] || character));
|
||||||
|
}
|
||||||
|
|
||||||
// ---------- 日期 ----------
|
// ---------- 日期 ----------
|
||||||
|
|
||||||
function getDateStart(dateText: string): Date {
|
function getDateStart(dateText: string): Date {
|
||||||
@@ -137,7 +191,7 @@ function getDateEnd(dateText: string): Date {
|
|||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
color: #0f172a;
|
color: #0f172a;
|
||||||
margin: 0 0 .875rem 0;
|
margin: 0 0 .5rem 0;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ export function buildStoreBaseChartOption(dateTextList: string[]): EChartsOption
|
|||||||
return {
|
return {
|
||||||
color: ["#2563eb", "#0f766e", "#d97706", "#db2777", "#7c3aed"],
|
color: ["#2563eb", "#0f766e", "#d97706", "#db2777", "#7c3aed"],
|
||||||
grid: {
|
grid: {
|
||||||
top: 48,
|
top: 0,
|
||||||
left: 12,
|
left: 0,
|
||||||
right: 12,
|
right: 0,
|
||||||
bottom: 12,
|
bottom: 0,
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
|||||||
+4
-7
@@ -1,8 +1,5 @@
|
|||||||
import { createRouter, createWebHistory, type RouteLocationNormalized } from "vue-router";
|
import { createRouter, createWebHistory, type RouteLocationNormalized } from "vue-router";
|
||||||
import RootLayout from "@/layout/RootLayout.vue";
|
import RootLayout from "@/layout/RootLayout.vue";
|
||||||
import MainLayout from "@/layout/MainLayout.vue";
|
|
||||||
import Login from "@/pages/user/LoginIndex.vue";
|
|
||||||
import InviteRegister from "@/pages/user/InviteRegister.vue";
|
|
||||||
import chartRoutes from "@/router/routes/chartRoutes";
|
import chartRoutes from "@/router/routes/chartRoutes";
|
||||||
import customerRoutes from "@/router/routes/customerRoutes";
|
import customerRoutes from "@/router/routes/customerRoutes";
|
||||||
import { managementAccountRoutes, managementSettingRoutes, storeRoutes } from "@/router/routes/managementRoutes";
|
import { managementAccountRoutes, managementSettingRoutes, storeRoutes } from "@/router/routes/managementRoutes";
|
||||||
@@ -19,7 +16,7 @@ import fulfillmentRoutes from "@/router/routes/fulfillmentRoutes";
|
|||||||
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
||||||
import { useGlobalUIStore } from "@/store/globalUI";
|
import { useGlobalUIStore } from "@/store/globalUI";
|
||||||
import { gaoRoleCodes } from "@/utils/permission";
|
import { gaoRoleCodes } from "@/utils/permission";
|
||||||
import { useUserStore } from "timi-web-api";
|
import { useUserStore } from "timi-web-api/store";
|
||||||
|
|
||||||
const detailRoutes = [
|
const detailRoutes = [
|
||||||
...customerRoutes,
|
...customerRoutes,
|
||||||
@@ -62,7 +59,7 @@ const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: "login",
|
path: "login",
|
||||||
name: "Login",
|
name: "Login",
|
||||||
component: Login,
|
component: () => import("@/pages/user/LoginIndex.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 1,
|
depth: 1,
|
||||||
navBarVisible: false,
|
navBarVisible: false,
|
||||||
@@ -74,7 +71,7 @@ const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: "gao/invite/register",
|
path: "gao/invite/register",
|
||||||
name: "InviteRegister",
|
name: "InviteRegister",
|
||||||
component: InviteRegister,
|
component: () => import("@/pages/user/InviteRegister.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 1,
|
depth: 1,
|
||||||
navBarVisible: false,
|
navBarVisible: false,
|
||||||
@@ -85,7 +82,7 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
component: MainLayout,
|
component: () => import("@/layout/MainLayout.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 1,
|
depth: 1,
|
||||||
navBarVisible: false,
|
navBarVisible: false,
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import QuickSignInPage from "@/pages/home/QuickSignInPage.vue";
|
|
||||||
import EventRecordEdit from "@/pages/event/EventRecordEdit.vue";
|
|
||||||
import CustomerList from "@/pages/customer/CustomerList.vue";
|
|
||||||
import CustomerInviteRank from "@/pages/customer/CustomerInviteRank.vue";
|
|
||||||
import CustomerInviteRelation from "@/pages/customer/CustomerInviteRelation.vue";
|
|
||||||
import CustomerDetail from "@/pages/customer/CustomerDetail.vue";
|
|
||||||
import CustomerInviteeList from "@/pages/customer/CustomerInviteeList.vue";
|
|
||||||
import CustomerEdit from "@/pages/customer/CustomerEdit.vue";
|
|
||||||
|
|
||||||
const customerRoutes: RouteRecordRaw[] = [
|
const customerRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/customer/quick-sign-in",
|
path: "/customer/quick-sign-in",
|
||||||
name: "QuickSignInPage",
|
name: "QuickSignInPage",
|
||||||
component: QuickSignInPage,
|
component: () => import("@/pages/home/QuickSignInPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -26,7 +18,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/customer/registration",
|
path: "/customer/registration",
|
||||||
name: "CustomerEventRecordCreate",
|
name: "CustomerEventRecordCreate",
|
||||||
component: EventRecordEdit,
|
component: () => import("@/pages/event/EventRecordEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -40,7 +32,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers",
|
path: "/management/customers",
|
||||||
name: "CustomerList",
|
name: "CustomerList",
|
||||||
component: CustomerList,
|
component: () => import("@/pages/customer/CustomerList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -54,7 +46,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customer-invite-rank",
|
path: "/management/customer-invite-rank",
|
||||||
name: "CustomerInviteRank",
|
name: "CustomerInviteRank",
|
||||||
component: CustomerInviteRank,
|
component: () => import("@/pages/customer/CustomerInviteRank.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -68,7 +60,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customer-invite-relation",
|
path: "/management/customer-invite-relation",
|
||||||
name: "CustomerInviteRelation",
|
name: "CustomerInviteRelation",
|
||||||
component: CustomerInviteRelation,
|
component: () => import("@/pages/customer/CustomerInviteRelation.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -82,7 +74,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/create",
|
path: "/management/customers/create",
|
||||||
name: "CustomerCreate",
|
name: "CustomerCreate",
|
||||||
component: CustomerEdit,
|
component: () => import("@/pages/customer/CustomerEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -96,7 +88,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/:id",
|
path: "/management/customers/:id",
|
||||||
name: "CustomerDetail",
|
name: "CustomerDetail",
|
||||||
component: CustomerDetail,
|
component: () => import("@/pages/customer/CustomerDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -110,7 +102,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/:id/invitees",
|
path: "/management/customers/:id/invitees",
|
||||||
name: "CustomerInviteeList",
|
name: "CustomerInviteeList",
|
||||||
component: CustomerInviteeList,
|
component: () => import("@/pages/customer/CustomerInviteeList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -124,7 +116,7 @@ const customerRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/customers/:id/edit",
|
path: "/management/customers/:id/edit",
|
||||||
name: "CustomerEdit",
|
name: "CustomerEdit",
|
||||||
component: CustomerEdit,
|
component: () => import("@/pages/customer/CustomerEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import OrderFulfillmentList from "@/pages/fulfillment/OrderFulfillmentList.vue";
|
|
||||||
import OrderFulfillmentCreate from "@/pages/fulfillment/OrderFulfillmentCreate.vue";
|
|
||||||
import OrderFulfillmentDetail from "@/pages/fulfillment/OrderFulfillmentDetail.vue";
|
|
||||||
|
|
||||||
function meta(title: string, depth = 3): RouteRecordRaw["meta"] {
|
function meta(title: string, depth = 3): RouteRecordRaw["meta"] {
|
||||||
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: "#F5F5F8", darkBodyBackground: "#10161f" };
|
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: "#F5F5F8", darkBodyBackground: "#10161f" };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: "/management/order-fulfillments", name: "OrderFulfillmentList", component: OrderFulfillmentList, meta: meta("统一履约") },
|
{ path: "/management/order-fulfillments", name: "OrderFulfillmentList", component: () => import("@/pages/fulfillment/OrderFulfillmentList.vue"), meta: meta("统一履约") },
|
||||||
{ path: "/management/order-fulfillments/create", name: "OrderFulfillmentCreate", component: OrderFulfillmentCreate, meta: meta("创建履约单", 4) },
|
{ path: "/management/order-fulfillments/create", name: "OrderFulfillmentCreate", component: () => import("@/pages/fulfillment/OrderFulfillmentCreate.vue"), meta: meta("创建履约单", 4) },
|
||||||
{ path: "/management/order-fulfillments/:id", name: "OrderFulfillmentDetail", component: OrderFulfillmentDetail, meta: meta("履约单详情", 4) }
|
{ path: "/management/order-fulfillments/:id", name: "OrderFulfillmentDetail", component: () => import("@/pages/fulfillment/OrderFulfillmentDetail.vue"), meta: meta("履约单详情", 4) }
|
||||||
] as RouteRecordRaw[];
|
] as RouteRecordRaw[];
|
||||||
|
|||||||
@@ -1,28 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import About from "@/pages/setting/About.vue";
|
|
||||||
import Agreement from "@/pages/setting/Agreement.vue";
|
|
||||||
import AppSettings from "@/pages/setting/AppSettings.vue";
|
|
||||||
import NotifyList from "@/pages/notify/NotifyList.vue";
|
|
||||||
import NotifyCreate from "@/pages/notify/NotifyCreate.vue";
|
|
||||||
import NotifyDetail from "@/pages/notify/NotifyDetail.vue";
|
|
||||||
import NotifyRecipientList from "@/pages/notify/NotifyRecipientList.vue";
|
|
||||||
import UserProfile from "@/pages/user/UserProfile.vue";
|
|
||||||
import UserPassword from "@/pages/user/UserPassword.vue";
|
|
||||||
import CustomerQrCode from "@/pages/customer/CustomerQrCode.vue";
|
|
||||||
import StoreBusinessDayCalendar from "@/pages/store/StoreBusinessDayCalendar.vue";
|
|
||||||
import StoreEdit from "@/pages/store/StoreEdit.vue";
|
|
||||||
import StoreList from "@/pages/store/StoreList.vue";
|
|
||||||
import StoreSort from "@/pages/store/StoreSort.vue";
|
|
||||||
import StoreDiaryDetail from "@/pages/store/StoreDiaryDetail.vue";
|
|
||||||
import StoreDiaryEdit from "@/pages/store/StoreDiaryEdit.vue";
|
|
||||||
import StoreDiaryList from "@/pages/store/StoreDiaryList.vue";
|
|
||||||
import TagList from "@/pages/tag/TagList.vue";
|
|
||||||
|
|
||||||
export const storeRoutes: RouteRecordRaw[] = [
|
export const storeRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/stores",
|
path: "/management/stores",
|
||||||
name: "StoreList",
|
name: "StoreList",
|
||||||
component: StoreList,
|
component: () => import("@/pages/store/StoreList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -36,7 +18,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/create",
|
path: "/management/stores/create",
|
||||||
name: "StoreCreate",
|
name: "StoreCreate",
|
||||||
component: StoreEdit,
|
component: () => import("@/pages/store/StoreEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -50,7 +32,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/sort",
|
path: "/management/stores/sort",
|
||||||
name: "StoreSort",
|
name: "StoreSort",
|
||||||
component: StoreSort,
|
component: () => import("@/pages/store/StoreSort.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -64,7 +46,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/:id",
|
path: "/management/stores/:id",
|
||||||
name: "StoreEdit",
|
name: "StoreEdit",
|
||||||
component: StoreEdit,
|
component: () => import("@/pages/store/StoreEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -78,7 +60,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/stores/:id/business-days",
|
path: "/management/stores/:id/business-days",
|
||||||
name: "StoreBusinessDayCalendar",
|
name: "StoreBusinessDayCalendar",
|
||||||
component: StoreBusinessDayCalendar,
|
component: () => import("@/pages/store/StoreBusinessDayCalendar.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -92,7 +74,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries",
|
path: "/management/store-diaries",
|
||||||
name: "StoreDiaryList",
|
name: "StoreDiaryList",
|
||||||
component: StoreDiaryList,
|
component: () => import("@/pages/store/StoreDiaryList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -106,7 +88,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries/create",
|
path: "/management/store-diaries/create",
|
||||||
name: "StoreDiaryCreate",
|
name: "StoreDiaryCreate",
|
||||||
component: StoreDiaryEdit,
|
component: () => import("@/pages/store/StoreDiaryEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -120,7 +102,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries/:id",
|
path: "/management/store-diaries/:id",
|
||||||
name: "StoreDiaryDetail",
|
name: "StoreDiaryDetail",
|
||||||
component: StoreDiaryDetail,
|
component: () => import("@/pages/store/StoreDiaryDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -134,7 +116,7 @@ export const storeRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/store-diaries/:id/edit",
|
path: "/management/store-diaries/:id/edit",
|
||||||
name: "StoreDiaryEdit",
|
name: "StoreDiaryEdit",
|
||||||
component: StoreDiaryEdit,
|
component: () => import("@/pages/store/StoreDiaryEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -151,7 +133,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about",
|
path: "/management/about",
|
||||||
name: "About",
|
name: "About",
|
||||||
component: About,
|
component: () => import("@/pages/setting/About.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -165,7 +147,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about/service-agreement/:id",
|
path: "/management/about/service-agreement/:id",
|
||||||
name: "ServiceAgreement",
|
name: "ServiceAgreement",
|
||||||
component: Agreement,
|
component: () => import("@/pages/setting/Agreement.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -179,7 +161,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about/privacy-agreement/:id",
|
path: "/management/about/privacy-agreement/:id",
|
||||||
name: "PrivacyAgreement",
|
name: "PrivacyAgreement",
|
||||||
component: Agreement,
|
component: () => import("@/pages/setting/Agreement.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -193,7 +175,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/about/open-source-agreement/:id",
|
path: "/management/about/open-source-agreement/:id",
|
||||||
name: "OpenSourceAgreement",
|
name: "OpenSourceAgreement",
|
||||||
component: Agreement,
|
component: () => import("@/pages/setting/Agreement.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -207,7 +189,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/settings",
|
path: "/management/settings",
|
||||||
name: "AppSettings",
|
name: "AppSettings",
|
||||||
component: AppSettings,
|
component: () => import("@/pages/setting/AppSettings.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -221,7 +203,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications",
|
path: "/management/notifications",
|
||||||
name: "NotifyList",
|
name: "NotifyList",
|
||||||
component: NotifyList,
|
component: () => import("@/pages/notify/NotifyList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -235,7 +217,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications/create",
|
path: "/management/notifications/create",
|
||||||
name: "NotifyCreate",
|
name: "NotifyCreate",
|
||||||
component: NotifyCreate,
|
component: () => import("@/pages/notify/NotifyCreate.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -249,7 +231,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications/:id",
|
path: "/management/notifications/:id",
|
||||||
name: "NotifyDetail",
|
name: "NotifyDetail",
|
||||||
component: NotifyDetail,
|
component: () => import("@/pages/notify/NotifyDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -263,7 +245,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/notifications/:id/recipients",
|
path: "/management/notifications/:id/recipients",
|
||||||
name: "NotifyRecipientList",
|
name: "NotifyRecipientList",
|
||||||
component: NotifyRecipientList,
|
component: () => import("@/pages/notify/NotifyRecipientList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -277,7 +259,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/tags",
|
path: "/management/tags",
|
||||||
name: "TagList",
|
name: "TagList",
|
||||||
component: TagList,
|
component: () => import("@/pages/tag/TagList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -294,7 +276,7 @@ export const managementAccountRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/profile",
|
path: "/management/profile",
|
||||||
name: "UserProfile",
|
name: "UserProfile",
|
||||||
component: UserProfile,
|
component: () => import("@/pages/user/UserProfile.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -308,7 +290,7 @@ export const managementAccountRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/profile/password",
|
path: "/management/profile/password",
|
||||||
name: "UserPassword",
|
name: "UserPassword",
|
||||||
component: UserPassword,
|
component: () => import("@/pages/user/UserPassword.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -322,7 +304,7 @@ export const managementAccountRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/qr-code",
|
path: "/management/qr-code",
|
||||||
name: "CustomerQrCode",
|
name: "CustomerQrCode",
|
||||||
component: CustomerQrCode,
|
component: () => import("@/pages/customer/CustomerQrCode.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import UserNotifyDetail from "@/pages/notify/UserNotifyDetail.vue";
|
|
||||||
import UserNotifyList from "@/pages/notify/UserNotifyList.vue";
|
|
||||||
|
|
||||||
const notifyRoutes: RouteRecordRaw[] = [
|
const notifyRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/notify",
|
path: "/notify",
|
||||||
name: "UserNotifyList",
|
name: "UserNotifyList",
|
||||||
component: UserNotifyList,
|
component: () => import("@/pages/notify/UserNotifyList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -20,7 +18,7 @@ const notifyRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/notify/:id",
|
path: "/notify/:id",
|
||||||
name: "UserNotifyDetail",
|
name: "UserNotifyDetail",
|
||||||
component: UserNotifyDetail,
|
component: () => import("@/pages/notify/UserNotifyDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import PackageConfigList from "@/pages/package/PackageConfigList.vue";
|
|
||||||
import PackageConfigEdit from "@/pages/package/PackageConfigEdit.vue";
|
|
||||||
import PackageConfigDetail from "@/pages/package/PackageConfigDetail.vue";
|
|
||||||
import PackagePurchase from "@/pages/package/PackagePurchase.vue";
|
|
||||||
|
|
||||||
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
||||||
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: "/management/package-configs", name: "PackageConfigList", component: PackageConfigList, meta: pageMeta("套餐配置") },
|
{ path: "/management/package-configs", name: "PackageConfigList", component: () => import("@/pages/package/PackageConfigList.vue"), meta: pageMeta("套餐配置") },
|
||||||
{ path: "/management/package-configs/create", name: "PackageConfigCreate", component: PackageConfigEdit, meta: pageMeta("新增套餐配置", 4) },
|
{ path: "/management/package-configs/create", name: "PackageConfigCreate", component: () => import("@/pages/package/PackageConfigEdit.vue"), meta: pageMeta("新增套餐配置", 4) },
|
||||||
{ path: "/management/package-configs/:id", name: "PackageConfigDetail", component: PackageConfigDetail, meta: pageMeta("套餐配置详情", 4) },
|
{ path: "/management/package-configs/:id", name: "PackageConfigDetail", component: () => import("@/pages/package/PackageConfigDetail.vue"), meta: pageMeta("套餐配置详情", 4) },
|
||||||
{ path: "/management/package-configs/:id/edit", name: "PackageConfigEdit", component: PackageConfigEdit, meta: pageMeta("编辑套餐配置", 5) },
|
{ path: "/management/package-configs/:id/edit", name: "PackageConfigEdit", component: () => import("@/pages/package/PackageConfigEdit.vue"), meta: pageMeta("编辑套餐配置", 5) },
|
||||||
{ path: "/management/package-configs/:id/purchase", name: "PackagePurchase", component: PackagePurchase, meta: pageMeta("购买套餐", 5) },
|
{ path: "/management/package-configs/:id/purchase", name: "PackagePurchase", component: () => import("@/pages/package/PackagePurchase.vue"), meta: pageMeta("购买套餐", 5) },
|
||||||
{ path: "/management/customer-packages/create", name: "CustomerPackageCreate", component: PackagePurchase, meta: pageMeta("创建客户套餐", 4) }
|
{ path: "/management/customer-packages/create", name: "CustomerPackageCreate", component: () => import("@/pages/package/PackagePurchase.vue"), meta: pageMeta("创建客户套餐", 4) }
|
||||||
] as RouteRecordRaw[];
|
] as RouteRecordRaw[];
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import PermissionSettings from "@/pages/permission/PermissionSettings.vue";
|
|
||||||
import RoleList from "@/pages/permission/RoleList.vue";
|
|
||||||
import RoleEdit from "@/pages/permission/RoleEdit.vue";
|
|
||||||
import PermissionList from "@/pages/permission/PermissionList.vue";
|
|
||||||
import RolePermissionAssign from "@/pages/permission/RolePermissionAssign.vue";
|
|
||||||
import RoleDelegationPermissionAssign from "@/pages/permission/RoleDelegationPermissionAssign.vue";
|
|
||||||
import UserRoleAssign from "@/pages/user/UserRoleAssign.vue";
|
|
||||||
|
|
||||||
const permissionRoutes: RouteRecordRaw[] = [
|
const permissionRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/permissions",
|
path: "/management/permissions",
|
||||||
name: "PermissionSettings",
|
name: "PermissionSettings",
|
||||||
component: PermissionSettings,
|
component: () => import("@/pages/permission/PermissionSettings.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -25,7 +18,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles",
|
path: "/management/permissions/roles",
|
||||||
name: "RoleList",
|
name: "RoleList",
|
||||||
component: RoleList,
|
component: () => import("@/pages/permission/RoleList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -39,7 +32,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/create",
|
path: "/management/permissions/roles/create",
|
||||||
name: "RoleCreate",
|
name: "RoleCreate",
|
||||||
component: RoleEdit,
|
component: () => import("@/pages/permission/RoleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -53,7 +46,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/:id",
|
path: "/management/permissions/roles/:id",
|
||||||
name: "RoleEdit",
|
name: "RoleEdit",
|
||||||
component: RoleEdit,
|
component: () => import("@/pages/permission/RoleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -67,7 +60,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/:id/assign/p",
|
path: "/management/permissions/roles/:id/assign/p",
|
||||||
name: "RolePermissionAssignFromRole",
|
name: "RolePermissionAssignFromRole",
|
||||||
component: RolePermissionAssign,
|
component: () => import("@/pages/permission/RolePermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 6,
|
depth: 6,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -81,7 +74,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/roles/:id/assign/d",
|
path: "/management/permissions/roles/:id/assign/d",
|
||||||
name: "RoleDelegationPermissionAssignFromRole",
|
name: "RoleDelegationPermissionAssignFromRole",
|
||||||
component: RoleDelegationPermissionAssign,
|
component: () => import("@/pages/permission/RoleDelegationPermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 6,
|
depth: 6,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -95,7 +88,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/items",
|
path: "/management/permissions/items",
|
||||||
name: "PermissionList",
|
name: "PermissionList",
|
||||||
component: PermissionList,
|
component: () => import("@/pages/permission/PermissionList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -113,7 +106,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/assign/p",
|
path: "/management/permissions/assign/p",
|
||||||
name: "RolePermissionAssign",
|
name: "RolePermissionAssign",
|
||||||
component: RolePermissionAssign,
|
component: () => import("@/pages/permission/RolePermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -127,7 +120,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/assign/d",
|
path: "/management/permissions/assign/d",
|
||||||
name: "RoleDelegationPermissionAssign",
|
name: "RoleDelegationPermissionAssign",
|
||||||
component: RoleDelegationPermissionAssign,
|
component: () => import("@/pages/permission/RoleDelegationPermissionAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -141,7 +134,7 @@ const permissionRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/permissions/user-roles",
|
path: "/management/permissions/user-roles",
|
||||||
name: "UserRoleAssign",
|
name: "UserRoleAssign",
|
||||||
component: UserRoleAssign,
|
component: () => import("@/pages/user/UserRoleAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,19 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import PointAccountDetail from "@/pages/point/PointAccountDetail.vue";
|
|
||||||
import PointAccountList from "@/pages/point/PointAccountList.vue";
|
|
||||||
import PointAdjust from "@/pages/point/PointAdjust.vue";
|
|
||||||
import PointLedgerDetail from "@/pages/point/PointLedgerDetail.vue";
|
|
||||||
import PointLedgerList from "@/pages/point/PointLedgerList.vue";
|
|
||||||
import PointRuleDetail from "@/pages/point/PointRuleDetail.vue";
|
|
||||||
import PointRuleEdit from "@/pages/point/PointRuleEdit.vue";
|
|
||||||
import PointRuleList from "@/pages/point/PointRuleList.vue";
|
|
||||||
import PointRuleSort from "@/pages/point/PointRuleSort.vue";
|
|
||||||
|
|
||||||
const pointRoutes: RouteRecordRaw[] = [
|
const pointRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/points/account",
|
path: "/management/points/account",
|
||||||
name: "PointAccountList",
|
name: "PointAccountList",
|
||||||
component: PointAccountList,
|
component: () => import("@/pages/point/PointAccountList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -27,7 +18,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/account/:id",
|
path: "/management/points/account/:id",
|
||||||
name: "PointAccountDetail",
|
name: "PointAccountDetail",
|
||||||
component: PointAccountDetail,
|
component: () => import("@/pages/point/PointAccountDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -41,7 +32,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/sort",
|
path: "/management/points/rules/sort",
|
||||||
name: "PointRuleSort",
|
name: "PointRuleSort",
|
||||||
component: PointRuleSort,
|
component: () => import("@/pages/point/PointRuleSort.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -55,7 +46,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/ledger",
|
path: "/management/points/ledger",
|
||||||
name: "PointLedgerList",
|
name: "PointLedgerList",
|
||||||
component: PointLedgerList,
|
component: () => import("@/pages/point/PointLedgerList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -69,7 +60,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/ledger/:id",
|
path: "/management/points/ledger/:id",
|
||||||
name: "PointLedgerDetail",
|
name: "PointLedgerDetail",
|
||||||
component: PointLedgerDetail,
|
component: () => import("@/pages/point/PointLedgerDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -83,7 +74,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/adjust",
|
path: "/management/points/adjust",
|
||||||
name: "PointAdjust",
|
name: "PointAdjust",
|
||||||
component: PointAdjust,
|
component: () => import("@/pages/point/PointAdjust.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -97,7 +88,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules",
|
path: "/management/points/rules",
|
||||||
name: "PointRuleList",
|
name: "PointRuleList",
|
||||||
component: PointRuleList,
|
component: () => import("@/pages/point/PointRuleList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -111,7 +102,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/create",
|
path: "/management/points/rules/create",
|
||||||
name: "PointRuleCreate",
|
name: "PointRuleCreate",
|
||||||
component: PointRuleEdit,
|
component: () => import("@/pages/point/PointRuleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -125,7 +116,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/:id",
|
path: "/management/points/rules/:id",
|
||||||
name: "PointRuleDetail",
|
name: "PointRuleDetail",
|
||||||
component: PointRuleDetail,
|
component: () => import("@/pages/point/PointRuleDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -139,7 +130,7 @@ const pointRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/points/rules/:id/edit",
|
path: "/management/points/rules/:id/edit",
|
||||||
name: "PointRuleEdit",
|
name: "PointRuleEdit",
|
||||||
component: PointRuleEdit,
|
component: () => import("@/pages/point/PointRuleEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import ProductCategoryList from "@/pages/product/ProductCategoryList.vue";
|
|
||||||
import ProductCategoryRank from "@/pages/product/ProductCategoryRank.vue";
|
|
||||||
import ProductDetail from "@/pages/product/ProductDetail.vue";
|
|
||||||
import ProductEdit from "@/pages/product/ProductEdit.vue";
|
|
||||||
import ProductList from "@/pages/product/ProductList.vue";
|
|
||||||
import ProductStockDetail from "@/pages/product/ProductStockDetail.vue";
|
|
||||||
import ProductStockList from "@/pages/product/ProductStockList.vue";
|
|
||||||
import ProductStockSkuList from "@/pages/product/ProductStockSkuList.vue";
|
|
||||||
import ProductStockRecordDetail from "@/pages/product/ProductStockRecordDetail.vue";
|
|
||||||
import ProductStockRecordList from "@/pages/product/ProductStockRecordList.vue";
|
|
||||||
|
|
||||||
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
function pageMeta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
||||||
return {
|
return {
|
||||||
@@ -26,67 +16,67 @@ const productRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/product-categories",
|
path: "/management/product-categories",
|
||||||
name: "ProductCategoryList",
|
name: "ProductCategoryList",
|
||||||
component: ProductCategoryList,
|
component: () => import("@/pages/product/ProductCategoryList.vue"),
|
||||||
meta: pageMeta("产品分类")
|
meta: pageMeta("产品分类")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-categories/rank",
|
path: "/management/product-categories/rank",
|
||||||
name: "ProductCategoryRank",
|
name: "ProductCategoryRank",
|
||||||
component: ProductCategoryRank,
|
component: () => import("@/pages/product/ProductCategoryRank.vue"),
|
||||||
meta: pageMeta("产品分类排序", 4)
|
meta: pageMeta("产品分类排序", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products",
|
path: "/management/products",
|
||||||
name: "ProductList",
|
name: "ProductList",
|
||||||
component: ProductList,
|
component: () => import("@/pages/product/ProductList.vue"),
|
||||||
meta: pageMeta("产品库")
|
meta: pageMeta("产品库")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products/create",
|
path: "/management/products/create",
|
||||||
name: "ProductCreate",
|
name: "ProductCreate",
|
||||||
component: ProductEdit,
|
component: () => import("@/pages/product/ProductEdit.vue"),
|
||||||
meta: pageMeta("新增产品", 4)
|
meta: pageMeta("新增产品", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products/:id",
|
path: "/management/products/:id",
|
||||||
name: "ProductDetail",
|
name: "ProductDetail",
|
||||||
component: ProductDetail,
|
component: () => import("@/pages/product/ProductDetail.vue"),
|
||||||
meta: pageMeta("产品详情", 4)
|
meta: pageMeta("产品详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/products/:id/edit",
|
path: "/management/products/:id/edit",
|
||||||
name: "ProductEdit",
|
name: "ProductEdit",
|
||||||
component: ProductEdit,
|
component: () => import("@/pages/product/ProductEdit.vue"),
|
||||||
meta: pageMeta("编辑产品", 5)
|
meta: pageMeta("编辑产品", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stocks",
|
path: "/management/product-stocks",
|
||||||
name: "ProductStockList",
|
name: "ProductStockList",
|
||||||
component: ProductStockList,
|
component: () => import("@/pages/product/ProductStockList.vue"),
|
||||||
meta: pageMeta("选择产品")
|
meta: pageMeta("选择产品")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stocks/:productId/skus",
|
path: "/management/product-stocks/:productId/skus",
|
||||||
name: "ProductStockSkuList",
|
name: "ProductStockSkuList",
|
||||||
component: ProductStockSkuList,
|
component: () => import("@/pages/product/ProductStockSkuList.vue"),
|
||||||
meta: pageMeta("选择 SKU", 4)
|
meta: pageMeta("选择 SKU", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stock-records",
|
path: "/management/product-stock-records",
|
||||||
name: "ProductStockRecordList",
|
name: "ProductStockRecordList",
|
||||||
component: ProductStockRecordList,
|
component: () => import("@/pages/product/ProductStockRecordList.vue"),
|
||||||
meta: pageMeta("库存流水")
|
meta: pageMeta("库存流水")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stock-records/:id",
|
path: "/management/product-stock-records/:id",
|
||||||
name: "ProductStockRecordDetail",
|
name: "ProductStockRecordDetail",
|
||||||
component: ProductStockRecordDetail,
|
component: () => import("@/pages/product/ProductStockRecordDetail.vue"),
|
||||||
meta: pageMeta("库存流水详情", 4)
|
meta: pageMeta("库存流水详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/product-stocks/:skuId",
|
path: "/management/product-stocks/:skuId",
|
||||||
name: "ProductStockDetail",
|
name: "ProductStockDetail",
|
||||||
component: ProductStockDetail,
|
component: () => import("@/pages/product/ProductStockDetail.vue"),
|
||||||
meta: pageMeta("库存详情", 5)
|
meta: pageMeta("库存详情", 5)
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import EventDetail from "@/pages/event/EventDetail.vue";
|
|
||||||
import EventEdit from "@/pages/event/EventEdit.vue";
|
|
||||||
import eventList from "@/pages/event/EventList.vue";
|
|
||||||
import EventSort from "@/pages/event/EventSort.vue";
|
|
||||||
import EventRecordDetail from "@/pages/event/EventRecordDetail.vue";
|
|
||||||
import EventRecordEdit from "@/pages/event/EventRecordEdit.vue";
|
|
||||||
import EventRecordList from "@/pages/event/EventRecordList.vue";
|
|
||||||
import EventRecordRank from "@/pages/event/EventRecordRank.vue";
|
|
||||||
|
|
||||||
const registrationRoutes: RouteRecordRaw[] = [
|
const registrationRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/registration-events",
|
path: "/management/registration-events",
|
||||||
name: "eventList",
|
name: "eventList",
|
||||||
component: eventList,
|
component: () => import("@/pages/event/EventList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -26,7 +18,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/sort",
|
path: "/management/registration-events/sort",
|
||||||
name: "EventSort",
|
name: "EventSort",
|
||||||
component: EventSort,
|
component: () => import("@/pages/event/EventSort.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -40,7 +32,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/create",
|
path: "/management/registration-events/create",
|
||||||
name: "EventCreate",
|
name: "EventCreate",
|
||||||
component: EventEdit,
|
component: () => import("@/pages/event/EventEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -54,7 +46,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/:id",
|
path: "/management/registration-events/:id",
|
||||||
name: "EventDetail",
|
name: "EventDetail",
|
||||||
component: EventDetail,
|
component: () => import("@/pages/event/EventDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -68,7 +60,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-events/:id/edit",
|
path: "/management/registration-events/:id/edit",
|
||||||
name: "EventEdit",
|
name: "EventEdit",
|
||||||
component: EventEdit,
|
component: () => import("@/pages/event/EventEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -82,7 +74,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records",
|
path: "/management/registration-event-records",
|
||||||
name: "EventRecordList",
|
name: "EventRecordList",
|
||||||
component: EventRecordList,
|
component: () => import("@/pages/event/EventRecordList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -96,7 +88,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-record-rank",
|
path: "/management/registration-event-record-rank",
|
||||||
name: "EventRecordRank",
|
name: "EventRecordRank",
|
||||||
component: EventRecordRank,
|
component: () => import("@/pages/event/EventRecordRank.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -110,7 +102,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records/create",
|
path: "/management/registration-event-records/create",
|
||||||
name: "EventRecordCreate",
|
name: "EventRecordCreate",
|
||||||
component: EventRecordEdit,
|
component: () => import("@/pages/event/EventRecordEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -124,7 +116,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records/:id",
|
path: "/management/registration-event-records/:id",
|
||||||
name: "EventRecordDetail",
|
name: "EventRecordDetail",
|
||||||
component: EventRecordDetail,
|
component: () => import("@/pages/event/EventRecordDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -138,7 +130,7 @@ const registrationRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/registration-event-records/:id/edit",
|
path: "/management/registration-event-records/:id/edit",
|
||||||
name: "EventRecordEdit",
|
name: "EventRecordEdit",
|
||||||
component: EventRecordEdit,
|
component: () => import("@/pages/event/EventRecordEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,70 +1,59 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import SalesOrderList from "@/pages/salesOrder/SalesOrderList.vue";
|
|
||||||
import SalesOrderCreate from "@/pages/salesOrder/SalesOrderCreate.vue";
|
|
||||||
import SalesOrderDetail from "@/pages/salesOrder/SalesOrderDetail.vue";
|
|
||||||
import SalesOrderPayment from "@/pages/salesOrder/SalesOrderPayment.vue";
|
|
||||||
import SalesOrderRefund from "@/pages/salesOrder/SalesOrderRefund.vue";
|
|
||||||
import SalesOrderNoRefund from "@/pages/salesOrder/SalesOrderNoRefund.vue";
|
|
||||||
import SalesOrderCancel from "@/pages/salesOrder/SalesOrderCancel.vue";
|
|
||||||
import FundRecordList from "@/pages/salesOrder/FundRecordList.vue";
|
|
||||||
import FundRecordDetail from "@/pages/salesOrder/FundRecordDetail.vue";
|
|
||||||
import FundRecordRevoke from "@/pages/salesOrder/FundRecordRevoke.vue";
|
|
||||||
import ConsumptionRecordList from "@/pages/salesOrder/ConsumptionRecordList.vue";
|
|
||||||
|
|
||||||
function meta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
function meta(title: string, depth = 3, background = "#F5F5F8"): RouteRecordRaw["meta"] {
|
||||||
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
return { depth, navBarVisible: true, navBarCanBack: true, navBarTitle: title, tabBarVisible: false, bodyBackground: background, darkBodyBackground: "#10161f" };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: "/management/sales-orders", name: "SalesOrderList", component: SalesOrderList, meta: meta("销售订单") },
|
{ path: "/management/sales-orders", name: "SalesOrderList", component: () => import("@/pages/salesOrder/SalesOrderList.vue"), meta: meta("销售订单") },
|
||||||
{ path: "/management/consumption-records", name: "ConsumptionRecordList", component: ConsumptionRecordList, meta: meta("消费记录") },
|
{ path: "/management/consumption-records", name: "ConsumptionRecordList", component: () => import("@/pages/salesOrder/ConsumptionRecordList.vue"), meta: meta("消费记录") },
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/create",
|
path: "/management/sales-orders/create",
|
||||||
name: "SalesOrderCreate",
|
name: "SalesOrderCreate",
|
||||||
component: SalesOrderCreate,
|
component: () => import("@/pages/salesOrder/SalesOrderCreate.vue"),
|
||||||
meta: meta("直接产品下单", 4)
|
meta: meta("直接产品下单", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id",
|
path: "/management/sales-orders/:id",
|
||||||
name: "SalesOrderDetail",
|
name: "SalesOrderDetail",
|
||||||
component: SalesOrderDetail,
|
component: () => import("@/pages/salesOrder/SalesOrderDetail.vue"),
|
||||||
meta: meta("销售订单详情", 4)
|
meta: meta("销售订单详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/payment",
|
path: "/management/sales-orders/:id/payment",
|
||||||
name: "SalesOrderPayment",
|
name: "SalesOrderPayment",
|
||||||
component: SalesOrderPayment,
|
component: () => import("@/pages/salesOrder/SalesOrderPayment.vue"),
|
||||||
meta: meta("登记收款", 5)
|
meta: meta("登记收款", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/refund",
|
path: "/management/sales-orders/:id/refund",
|
||||||
name: "SalesOrderRefund",
|
name: "SalesOrderRefund",
|
||||||
component: SalesOrderRefund,
|
component: () => import("@/pages/salesOrder/SalesOrderRefund.vue"),
|
||||||
meta: meta("登记退款", 5)
|
meta: meta("登记退款", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/no-refund",
|
path: "/management/sales-orders/:id/no-refund",
|
||||||
name: "SalesOrderNoRefund",
|
name: "SalesOrderNoRefund",
|
||||||
component: SalesOrderNoRefund,
|
component: () => import("@/pages/salesOrder/SalesOrderNoRefund.vue"),
|
||||||
meta: meta("确认无需退款", 5)
|
meta: meta("确认无需退款", 5)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/sales-orders/:id/cancel",
|
path: "/management/sales-orders/:id/cancel",
|
||||||
name: "SalesOrderCancel",
|
name: "SalesOrderCancel",
|
||||||
component: SalesOrderCancel,
|
component: () => import("@/pages/salesOrder/SalesOrderCancel.vue"),
|
||||||
meta: meta("取消销售订单", 5)
|
meta: meta("取消销售订单", 5)
|
||||||
},
|
},
|
||||||
{ path: "/management/fund-records", name: "FundRecordList", component: FundRecordList, meta: meta("资金流水") },
|
{ path: "/management/fund-records", name: "FundRecordList", component: () => import("@/pages/salesOrder/FundRecordList.vue"), meta: meta("资金流水") },
|
||||||
{
|
{
|
||||||
path: "/management/fund-records/:id",
|
path: "/management/fund-records/:id",
|
||||||
name: "FundRecordDetail",
|
name: "FundRecordDetail",
|
||||||
component: FundRecordDetail,
|
component: () => import("@/pages/salesOrder/FundRecordDetail.vue"),
|
||||||
meta: meta("资金记录详情", 4)
|
meta: meta("资金记录详情", 4)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/management/fund-records/:id/revoke",
|
path: "/management/fund-records/:id/revoke",
|
||||||
name: "FundRecordRevoke",
|
name: "FundRecordRevoke",
|
||||||
component: FundRecordRevoke,
|
component: () => import("@/pages/salesOrder/FundRecordRevoke.vue"),
|
||||||
meta: meta("资金冲正", 5)
|
meta: meta("资金冲正", 5)
|
||||||
}
|
}
|
||||||
] as RouteRecordRaw[];
|
] as RouteRecordRaw[];
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import HomeTab from "@/pages/tabs/HomeTab.vue";
|
|
||||||
import ProductTab from "@/pages/tabs/ProductTab.vue";
|
|
||||||
import SettingTab from "@/pages/tabs/SettingTab.vue";
|
|
||||||
import StoreTab from "@/pages/tabs/StoreTab.vue";
|
|
||||||
|
|
||||||
const tabRoutes: RouteRecordRaw[] = [
|
const tabRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/customers",
|
path: "/customers",
|
||||||
name: "HomeTab",
|
name: "HomeTab",
|
||||||
component: HomeTab,
|
component: () => import("@/pages/tabs/HomeTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -22,7 +18,7 @@ const tabRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/store",
|
path: "/store",
|
||||||
name: "StoreTab",
|
name: "StoreTab",
|
||||||
component: StoreTab,
|
component: () => import("@/pages/tabs/StoreTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -36,7 +32,7 @@ const tabRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/product",
|
path: "/product",
|
||||||
name: "ProductTab",
|
name: "ProductTab",
|
||||||
component: ProductTab,
|
component: () => import("@/pages/tabs/ProductTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -50,7 +46,7 @@ const tabRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management",
|
path: "/management",
|
||||||
name: "SettingTab",
|
name: "SettingTab",
|
||||||
component: SettingTab,
|
component: () => import("@/pages/tabs/SettingTab.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 2,
|
depth: 2,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
import type { RouteRecordRaw } from "vue-router";
|
import type { RouteRecordRaw } from "vue-router";
|
||||||
import UserList from "@/pages/user/UserList.vue";
|
|
||||||
import UserDetail from "@/pages/user/UserDetail.vue";
|
|
||||||
import UserEdit from "@/pages/user/UserEdit.vue";
|
|
||||||
import UserRoleAssign from "@/pages/user/UserRoleAssign.vue";
|
|
||||||
import UserInvitePoster from "@/pages/user/UserInvitePoster.vue";
|
|
||||||
|
|
||||||
const userRoutes: RouteRecordRaw[] = [
|
const userRoutes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: "/management/users/invite/poster",
|
path: "/management/users/invite/poster",
|
||||||
name: "UserInvitePoster",
|
name: "UserInvitePoster",
|
||||||
component: UserInvitePoster,
|
component: () => import("@/pages/user/UserInvitePoster.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -23,7 +18,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users",
|
path: "/management/users",
|
||||||
name: "UserList",
|
name: "UserList",
|
||||||
component: UserList,
|
component: () => import("@/pages/user/UserList.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 3,
|
depth: 3,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -37,7 +32,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/create",
|
path: "/management/users/create",
|
||||||
name: "UserCreatePage",
|
name: "UserCreatePage",
|
||||||
component: UserEdit,
|
component: () => import("@/pages/user/UserEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -51,7 +46,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/:id",
|
path: "/management/users/:id",
|
||||||
name: "UserDetail",
|
name: "UserDetail",
|
||||||
component: UserDetail,
|
component: () => import("@/pages/user/UserDetail.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 4,
|
depth: 4,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -65,7 +60,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/:id/edit",
|
path: "/management/users/:id/edit",
|
||||||
name: "UserEdit",
|
name: "UserEdit",
|
||||||
component: UserEdit,
|
component: () => import("@/pages/user/UserEdit.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
@@ -79,7 +74,7 @@ const userRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/management/users/:id/roles",
|
path: "/management/users/:id/roles",
|
||||||
name: "UserRoleAssignFromUser",
|
name: "UserRoleAssignFromUser",
|
||||||
component: UserRoleAssign,
|
component: () => import("@/pages/user/UserRoleAssign.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
depth: 5,
|
depth: 5,
|
||||||
navBarVisible: true,
|
navBarVisible: true,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
import { useUserStore } from "timi-web-api";
|
import { useUserStore } from "timi-web-api/store";
|
||||||
import StoreAPI from "@/api/StoreAPI";
|
import StoreAPI from "@/api/StoreAPI";
|
||||||
import type { Store } from "@/types/Store";
|
import type { Store } from "@/types/Store";
|
||||||
import { gaoRoleCodes, gaoStoreScopePermissionCodes } from "@/utils/permission";
|
import { gaoRoleCodes, gaoStoreScopePermissionCodes } from "@/utils/permission";
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import {
|
import { PermissionAPI } from "timi-web-api/api/PermissionAPI";
|
||||||
PermissionAPI,
|
import { RoleAPI } from "timi-web-api/api/RoleAPI";
|
||||||
RoleAPI,
|
import type { ModuleCode, PermissionPayload, Role as UserRole } from "timi-web-api/types";
|
||||||
type ModuleCode,
|
|
||||||
type PermissionPayload,
|
|
||||||
type Role as UserRole
|
|
||||||
} from "timi-web-api";
|
|
||||||
import type {
|
import type {
|
||||||
Permission,
|
Permission,
|
||||||
PermissionDraft,
|
PermissionDraft,
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ export type CustomerDailyStatView = {
|
|||||||
dateValue?: number;
|
dateValue?: number;
|
||||||
newCustomerCount?: number;
|
newCustomerCount?: number;
|
||||||
totalCustomerCount?: number;
|
totalCustomerCount?: number;
|
||||||
|
customerList?: CustomerDailyStatCustomerView[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type CustomerDailyStatCustomerView = {
|
||||||
|
name?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CustomerGenderStatView = {
|
export type CustomerGenderStatView = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MessagePlugin as TDesignMessage } from "tdesign-mobile-vue";
|
import { MessagePlugin as TDesignMessage } from "tdesign-mobile-vue/es/message";
|
||||||
import type { MessagePluginOptions } from "tdesign-mobile-vue/es/message/message";
|
import type { MessagePluginOptions } from "tdesign-mobile-vue/es/message/message";
|
||||||
|
|
||||||
/** Message 支持的调用参数。 */
|
/** Message 支持的调用参数。 */
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
import type { StoreBusinessDayStatus, StoreStatus } from "@/types/Store";
|
import type { StoreBusinessDayStatus, StoreStatus } from "@/types/Store";
|
||||||
import { permissionCodes } from "@/utils/permission";
|
import { permissionCodes } from "@/utils/permission";
|
||||||
import { type Page, useUserStore } from "timi-web-api";
|
import type { Page } from "timi-web-api/types";
|
||||||
|
import { useUserStore } from "timi-web-api/store";
|
||||||
|
|
||||||
export const currentStoreIdStorageKey = "gao-customer-h5:current-store-id";
|
export const currentStoreIdStorageKey = "gao-customer-h5:current-store-id";
|
||||||
export const loginStoreIdStorageKey = "gao-customer-h5:login-store-id";
|
export const loginStoreIdStorageKey = "gao-customer-h5:login-store-id";
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* 客户端实际使用的 timi-web 能力出口。
|
||||||
|
*
|
||||||
|
* 不从 timi-web 根入口导入,避免把编辑器、弹窗和未使用组件带入公共包。
|
||||||
|
*/
|
||||||
|
export { default as Captcha } from "../../../timi-web/src/components/captcha";
|
||||||
|
export { default as ContactNumber } from "../../../timi-web/src/components/contact-number";
|
||||||
|
export { default as Copyright } from "../../../timi-web/src/components/copyright";
|
||||||
|
export { default as MarkdownEditor } from "../../../timi-web/src/components/markdown-editor";
|
||||||
|
export { default as MarkdownView } from "../../../timi-web/src/components/markdown-view";
|
||||||
|
export { default as PassTimeLabel } from "../../../timi-web/src/components/passtime-label";
|
||||||
|
|
||||||
|
export { default as Cooker } from "../../../timi-web/src/utils/Cooker";
|
||||||
|
export { default as Storage } from "../../../timi-web/src/utils/Storage";
|
||||||
|
export { default as WebToolkit } from "../../../timi-web/src/utils/WebToolkit";
|
||||||
|
|
||||||
|
export { Text, Time, Toolkit } from "../../../timi-ts/src/index";
|
||||||
+10
-1
@@ -6,11 +6,12 @@ import Components from "unplugin-vue-components/vite";
|
|||||||
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
||||||
|
|
||||||
const localTimiWebRoot = fileURLToPath(new URL("../timi-web", import.meta.url));
|
const localTimiWebRoot = fileURLToPath(new URL("../timi-web", import.meta.url));
|
||||||
const localTimiWebModule = fileURLToPath(new URL("../timi-web/dist/timi-web.mjs", import.meta.url));
|
const localTimiWebModule = fileURLToPath(new URL("./src/utils/timiWeb.ts", import.meta.url));
|
||||||
const localTimiWebStyle = fileURLToPath(new URL("../timi-web/dist/timi-web.css", import.meta.url));
|
const localTimiWebStyle = fileURLToPath(new URL("../timi-web/dist/timi-web.css", import.meta.url));
|
||||||
const localTimiWebEditor = fileURLToPath(new URL("../timi-web/src/editor/index.ts", import.meta.url));
|
const localTimiWebEditor = fileURLToPath(new URL("../timi-web/src/editor/index.ts", import.meta.url));
|
||||||
const localTimiWebApiRoot = fileURLToPath(new URL("../timi-web-api", import.meta.url));
|
const localTimiWebApiRoot = fileURLToPath(new URL("../timi-web-api", import.meta.url));
|
||||||
const localTimiWebApiModule = fileURLToPath(new URL("../timi-web-api/dist/index.js", import.meta.url));
|
const localTimiWebApiModule = fileURLToPath(new URL("../timi-web-api/dist/index.js", import.meta.url));
|
||||||
|
const localTimiTsModule = fileURLToPath(new URL("../timi-ts/src/index.ts", import.meta.url));
|
||||||
const localTimiTDesignMobileRoot = fileURLToPath(new URL("../timi-tdesign-mobile", import.meta.url));
|
const localTimiTDesignMobileRoot = fileURLToPath(new URL("../timi-tdesign-mobile", import.meta.url));
|
||||||
const localTimiTDesignMobileModule = fileURLToPath(new URL("../timi-tdesign-mobile/src/index.ts", import.meta.url));
|
const localTimiTDesignMobileModule = fileURLToPath(new URL("../timi-tdesign-mobile/src/index.ts", import.meta.url));
|
||||||
const localTimiTDesignMobileStyle = fileURLToPath(new URL("../timi-tdesign-mobile/dist/timi-tdesign-mobile.css", import.meta.url));
|
const localTimiTDesignMobileStyle = fileURLToPath(new URL("../timi-tdesign-mobile/dist/timi-tdesign-mobile.css", import.meta.url));
|
||||||
@@ -52,6 +53,14 @@ export default defineConfig(({ mode }) => {
|
|||||||
find: /^timi-web-api\//,
|
find: /^timi-web-api\//,
|
||||||
replacement: `${localTimiWebApiRoot}/dist/`
|
replacement: `${localTimiWebApiRoot}/dist/`
|
||||||
},
|
},
|
||||||
|
...(useLocalTimiWeb
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
find: /^timi-ts$/,
|
||||||
|
replacement: localTimiTsModule
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: []),
|
||||||
...(useLocalTimiTDesignMobile
|
...(useLocalTimiTDesignMobile
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user