fix: 更新路由为后台配置,修改admim文件名称为admin
This commit is contained in:
parent
6735d8dedb
commit
ace23e89ee
|
|
@ -0,0 +1,723 @@
|
|||
import type { App } from "vue";
|
||||
import { createRouter, createWebHashHistory, type RouteRecordRaw } from "vue-router";
|
||||
|
||||
export const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
// 静态路由
|
||||
export const constantRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: "/redirect",
|
||||
component: Layout,
|
||||
meta: { hidden: true },
|
||||
children: [
|
||||
{
|
||||
path: "/redirect/:path(.*)",
|
||||
component: () => import("@/views/redirect/index.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/login",
|
||||
component: () => import("@/views/login/index.vue"),
|
||||
meta: { hidden: true },
|
||||
},
|
||||
|
||||
{
|
||||
path: "/",
|
||||
component: Layout,
|
||||
redirect: "/index",
|
||||
meta: {
|
||||
title: "数据统计",
|
||||
icon: "index",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/data/index.vue"),
|
||||
name: "dataStatistics",
|
||||
meta: {
|
||||
title: "数据统计",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "sales",
|
||||
name: "salesStatistics",
|
||||
component: () => import("@/views/data/sales.vue"),
|
||||
meta: {
|
||||
title: "销售统计",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "table",
|
||||
name: "tableStatistics",
|
||||
component: () => import("@/views/data/table.vue"),
|
||||
meta: {
|
||||
title: "桌台统计",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "credit",
|
||||
name: "creditStatistics",
|
||||
component: () => import("@/views/data/credit/index.vue"),
|
||||
meta: {
|
||||
title: "挂账管理",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "credit-detail",
|
||||
name: "creditDetail",
|
||||
component: () => import("@/views/data/credit/detail.vue"),
|
||||
meta: {
|
||||
title: "挂账明细",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "work",
|
||||
name: "workStatistics",
|
||||
component: () => import("@/views/data/work.vue"),
|
||||
meta: {
|
||||
title: "交班记录",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "401",
|
||||
component: () => import("@/views/error/401.vue"),
|
||||
meta: { hidden: true },
|
||||
},
|
||||
{
|
||||
path: "404",
|
||||
component: () => import("@/views/error/404.vue"),
|
||||
meta: { hidden: true },
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// path: "/shop",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "店铺管理",
|
||||
// icon: "shopping",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/shop/config/index.vue"),
|
||||
// name: "shopConfig",
|
||||
// meta: {
|
||||
// title: "店铺配置",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "list",
|
||||
// component: () => import("@/views/shop/list/index.vue"),
|
||||
// name: "shopList",
|
||||
// meta: {
|
||||
// title: "店铺列表",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "role",
|
||||
// component: () => import("@/views/admin/system/role/index.vue"),
|
||||
// name: "shopRole",
|
||||
// meta: {
|
||||
// title: "角色管理",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "staff",
|
||||
// component: () => import("@/views/shop/staff/index.vue"),
|
||||
// name: "shopStaff",
|
||||
// meta: {
|
||||
// title: "员工列表",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "log",
|
||||
// component: () => import("@/views/shop/log/index.vue"),
|
||||
// name: "shopLog",
|
||||
// meta: {
|
||||
// title: "操作日志",
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/system",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "系统管理",
|
||||
// icon: "system",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "params",
|
||||
// component: () => import("@/views/admin/system/params/index.vue"),
|
||||
// name: "adminSysParams",
|
||||
// meta: {
|
||||
// title: "系统参数",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "user",
|
||||
// component: () => import("@/views/admin/system/user/index.vue"),
|
||||
// name: "adminSysUser",
|
||||
// meta: {
|
||||
// title: "系统用户",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "role",
|
||||
// component: () => import("@/views/admin/system/role/index.vue"),
|
||||
// name: "adminSysRole",
|
||||
// meta: {
|
||||
// title: "角色管理",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "menu",
|
||||
// component: () => import("@/views/admin/system/menu/index.vue"),
|
||||
// name: "adminSysMenu",
|
||||
// meta: {
|
||||
// title: "菜单管理",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "miniAppPages",
|
||||
// component: () => import("@/views/admin/system/miniAppPages/index.vue"),
|
||||
// name: "adminSysMiniAppPages",
|
||||
// meta: {
|
||||
// title: "小程序页面",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "version",
|
||||
// component: () => import("@/views/admin/system/version/index.vue"),
|
||||
// name: "adminSysVersion",
|
||||
// meta: {
|
||||
// title: "版本管理",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/register",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "激活码",
|
||||
// icon: "chain",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/register/index.vue"),
|
||||
// name: "registerIndex",
|
||||
// meta: {
|
||||
// title: "激活码列表",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/online-shop",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "线上店铺",
|
||||
// icon: "system1",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/online-shop/index.vue"),
|
||||
// name: "shopDecoration",
|
||||
// meta: {
|
||||
// title: "店铺装修",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "goods-group",
|
||||
// component: () => import("@/views/online-shop/goods-group.vue"),
|
||||
// name: "goodsGroup",
|
||||
// meta: {
|
||||
// title: "商品分组",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "pad",
|
||||
// component: () => import("@/views/online-shop/pad-setting.vue"),
|
||||
// name: "pad",
|
||||
// meta: {
|
||||
// title: "Pad点单设置",
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/system-setting",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "系统设置",
|
||||
// icon: "system",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "pay-types",
|
||||
// component: () => import("@/views/system-setting/pay-types/index.vue"),
|
||||
// name: "payTypes",
|
||||
// meta: {
|
||||
// title: "支付方式",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
|
||||
// {
|
||||
// path: "/tool",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "经营工具",
|
||||
// icon: "tools",
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/tool/Instead/index.vue"),
|
||||
// name: "toolIndex",
|
||||
// meta: {
|
||||
// title: "代客下单",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "table",
|
||||
// component: () => import("@/views/tool/table/index.vue"),
|
||||
// name: "table",
|
||||
// meta: {
|
||||
// title: "台桌管理",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/application",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "应用中心",
|
||||
// icon: "tree",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "marketing",
|
||||
// component: () => import("@/views/application/marketing/index.vue"),
|
||||
// name: "applicationMarketing",
|
||||
// meta: {
|
||||
// title: "营销中心",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/application/list/index.vue"),
|
||||
// name: "applicationIndex",
|
||||
// meta: {
|
||||
// title: "列表管理",
|
||||
// affix: false,
|
||||
// keepAlive: false,
|
||||
// },
|
||||
|
||||
// },
|
||||
// /**
|
||||
// * 营销中心 start
|
||||
// */
|
||||
// {
|
||||
// path: "coupon",
|
||||
// component: () => import("@/views/application/marketing/coupon/list.vue"),
|
||||
// name: "coupon",
|
||||
// meta: {
|
||||
// title: "优惠券",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "bwc",
|
||||
// component: () => import("@/views/application/marketing/bwc.vue"),
|
||||
// name: "bwc",
|
||||
// meta: {
|
||||
// title: "霸王餐",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "invite",
|
||||
// component: () => import("@/views/application/marketing/share/index.vue"),
|
||||
// name: "invite",
|
||||
// meta: {
|
||||
// title: "邀请裂变",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "points",
|
||||
// component: () => import("@/views/application/marketing/points/index.vue"),
|
||||
// name: "points",
|
||||
// meta: {
|
||||
// title: "积分",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "ad",
|
||||
// component: () => import("@/views/application/list/ad/index.vue"),
|
||||
// name: "ad",
|
||||
// meta: {
|
||||
// title: "广告",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// /** 营销中心end */
|
||||
|
||||
// /**列表start */
|
||||
|
||||
// {
|
||||
// path: "lineUplist",
|
||||
// component: () => import("@/views/application/list/lineUplist/index.vue"),
|
||||
// name: "lineUplist",
|
||||
// meta: {
|
||||
// title: "叫号",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "lineUpRecord",
|
||||
// component: () => import("@/views/application/list/lineUplist/record.vue"),
|
||||
// name: "lineUpRecord",
|
||||
// meta: {
|
||||
// title: "叫号记录",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "advertisement",
|
||||
// component: () => import("@/views/application/list/advertisement/index.vue"),
|
||||
// name: "advertisement",
|
||||
// meta: {
|
||||
// title: "广告",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "storingWine",
|
||||
// component: () => import("@/views/application/list/storingWine/index.vue"),
|
||||
// name: "storingWine",
|
||||
// meta: {
|
||||
// title: "存酒",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
|
||||
// /**列表end */
|
||||
|
||||
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/devices",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "设备管理",
|
||||
// icon: "tab",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "printer",
|
||||
// component: () => import("@/views/devices/printer.vue"),
|
||||
// name: "devicesPrinter",
|
||||
// meta: {
|
||||
// title: "打印机",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/product",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "商品管理",
|
||||
// icon: "money",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/product/index.vue"),
|
||||
// name: "productIndex",
|
||||
// meta: {
|
||||
// title: "商品列表",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "addgoods",
|
||||
// component: () => import("@/views/product/indexconfig/addgoods.vue"),
|
||||
// name: "addgoods",
|
||||
// meta: {
|
||||
// title: "新增商品",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "unit",
|
||||
// component: () => import("@/views/product/unit.vue"),
|
||||
// name: "productUnit",
|
||||
// meta: {
|
||||
// title: "常用单位",
|
||||
// affix: false,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "category",
|
||||
// component: () => import("@/views/product/category.vue"),
|
||||
// name: "productCategory",
|
||||
// meta: {
|
||||
// title: "商品分类",
|
||||
// affix: false,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "specifications",
|
||||
// component: () => import("@/views/product/specifications.vue"),
|
||||
// name: "specifications",
|
||||
// meta: {
|
||||
// title: "商品规格",
|
||||
// affix: false,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/inventory",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "进销存",
|
||||
// icon: "tab",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "consumables",
|
||||
// component: () => import("@/views/inventory/consumables/index.vue"),
|
||||
// name: "consumables",
|
||||
// meta: {
|
||||
// title: "耗材列表",
|
||||
// affix: false,
|
||||
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "supplier",
|
||||
// component: () => import("@/views/inventory/supplier/index.vue"),
|
||||
// name: "supplier",
|
||||
// meta: {
|
||||
// title: "供应商管理",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "operation_in",
|
||||
// component: () => import("@/views/inventory/operation_in/index.vue"),
|
||||
// name: "operation_in",
|
||||
// meta: {
|
||||
// title: "出入库",
|
||||
// affix: false,
|
||||
// hidden: true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "paymentRecord",
|
||||
// component: () => import("@/views/inventory/payment-record.vue"),
|
||||
// name: "paymentRecord",
|
||||
// meta: {
|
||||
// title: "结款记录",
|
||||
// affix: false,
|
||||
// hidden: true,
|
||||
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "classification",
|
||||
// component: () => import("@/views/inventory/classification/index.vue"),
|
||||
// name: "classification",
|
||||
// meta: {
|
||||
// title: "分类管理",
|
||||
// affix: false,
|
||||
// hidden: true,
|
||||
|
||||
// },
|
||||
// },
|
||||
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/user",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "用户管理",
|
||||
// icon: "peoples",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/user/list/index.vue"),
|
||||
// name: "userIndex",
|
||||
// meta: {
|
||||
// title: "用户列表",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "active",
|
||||
// component: () => import("@/views/user/active/index.vue"),
|
||||
// name: "userActive",
|
||||
// meta: {
|
||||
// title: "活动管理",
|
||||
// affix: false,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/order",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "订单管理",
|
||||
// icon: "menu",
|
||||
// alwaysShow: true,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/order/index/index.vue"),
|
||||
// name: "orderIndex",
|
||||
// meta: {
|
||||
// title: "订单列表",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "group-purchase",
|
||||
// component: () => import("@/views/order/group-purchase.vue"),
|
||||
// name: "orderRefund",
|
||||
// meta: {
|
||||
// title: "团购订单",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: "/mytemplate",
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: "我的模板",
|
||||
// icon: "tab",
|
||||
// alwaysShow: true,
|
||||
// hidden: true
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "index",
|
||||
// component: () => import("@/views/mytemplate/index.vue"),
|
||||
// name: "mytemplateIndex",
|
||||
// meta: {
|
||||
// title: "我的模板",
|
||||
// affix: false,
|
||||
// keepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
];
|
||||
|
||||
/**
|
||||
* 创建路由
|
||||
*/
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: constantRoutes,
|
||||
// 刷新时,滚动条位置还原
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
});
|
||||
|
||||
// 全局注册 router
|
||||
export function setupRouter(app: App<Element>) {
|
||||
app.use(router);
|
||||
}
|
||||
|
||||
export default router;
|
||||
|
|
@ -0,0 +1,723 @@
|
|||
import type { App } from "vue";
|
||||
import { createRouter, createWebHashHistory, type RouteRecordRaw } from "vue-router";
|
||||
|
||||
export const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
// 静态路由
|
||||
export const constantRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: "/redirect",
|
||||
component: Layout,
|
||||
meta: { hidden: true },
|
||||
children: [
|
||||
{
|
||||
path: "/redirect/:path(.*)",
|
||||
component: () => import("@/views/redirect/index.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/login",
|
||||
component: () => import("@/views/login/index.vue"),
|
||||
meta: { hidden: true },
|
||||
},
|
||||
|
||||
{
|
||||
path: "/",
|
||||
component: Layout,
|
||||
redirect: "/index",
|
||||
meta: {
|
||||
title: "数据统计",
|
||||
icon: "index",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/data/index.vue"),
|
||||
name: "dataStatistics",
|
||||
meta: {
|
||||
title: "数据统计",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "sales",
|
||||
name: "salesStatistics",
|
||||
component: () => import("@/views/data/sales.vue"),
|
||||
meta: {
|
||||
title: "销售统计",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "table",
|
||||
name: "tableStatistics",
|
||||
component: () => import("@/views/data/table.vue"),
|
||||
meta: {
|
||||
title: "桌台统计",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "credit",
|
||||
name: "creditStatistics",
|
||||
component: () => import("@/views/data/credit/index.vue"),
|
||||
meta: {
|
||||
title: "挂账管理",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "credit-detail",
|
||||
name: "creditDetail",
|
||||
component: () => import("@/views/data/credit/detail.vue"),
|
||||
meta: {
|
||||
title: "挂账明细",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "work",
|
||||
name: "workStatistics",
|
||||
component: () => import("@/views/data/work.vue"),
|
||||
meta: {
|
||||
title: "交班记录",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "401",
|
||||
component: () => import("@/views/error/401.vue"),
|
||||
meta: { hidden: true },
|
||||
},
|
||||
{
|
||||
path: "404",
|
||||
component: () => import("@/views/error/404.vue"),
|
||||
meta: { hidden: true },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/shop",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "店铺管理",
|
||||
icon: "shopping",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/shop/config/index.vue"),
|
||||
name: "shopConfig",
|
||||
meta: {
|
||||
title: "店铺配置",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "list",
|
||||
component: () => import("@/views/shop/list/index.vue"),
|
||||
name: "shopList",
|
||||
meta: {
|
||||
title: "店铺列表",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "role",
|
||||
component: () => import("@/views/admin/system/role/index.vue"),
|
||||
name: "shopRole",
|
||||
meta: {
|
||||
title: "角色管理",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "staff",
|
||||
component: () => import("@/views/shop/staff/index.vue"),
|
||||
name: "shopStaff",
|
||||
meta: {
|
||||
title: "员工列表",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "log",
|
||||
component: () => import("@/views/shop/log/index.vue"),
|
||||
name: "shopLog",
|
||||
meta: {
|
||||
title: "操作日志",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/system",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "系统管理",
|
||||
icon: "system",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "params",
|
||||
component: () => import("@/views/admin/system/params/index.vue"),
|
||||
name: "adminSysParams",
|
||||
meta: {
|
||||
title: "系统参数",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "user",
|
||||
component: () => import("@/views/admin/system/user/index.vue"),
|
||||
name: "adminSysUser",
|
||||
meta: {
|
||||
title: "系统用户",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "role",
|
||||
component: () => import("@/views/admin/system/role/index.vue"),
|
||||
name: "adminSysRole",
|
||||
meta: {
|
||||
title: "角色管理",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "menu",
|
||||
component: () => import("@/views/admin/system/menu/index.vue"),
|
||||
name: "adminSysMenu",
|
||||
meta: {
|
||||
title: "菜单管理",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "miniAppPages",
|
||||
component: () => import("@/views/admin/system/miniAppPages/index.vue"),
|
||||
name: "adminSysMiniAppPages",
|
||||
meta: {
|
||||
title: "小程序页面",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "version",
|
||||
component: () => import("@/views/admin/system/version/index.vue"),
|
||||
name: "adminSysVersion",
|
||||
meta: {
|
||||
title: "版本管理",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/register",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "激活码",
|
||||
icon: "chain",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/register/index.vue"),
|
||||
name: "registerIndex",
|
||||
meta: {
|
||||
title: "激活码列表",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/online-shop",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "线上店铺",
|
||||
icon: "system1",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/online-shop/index.vue"),
|
||||
name: "shopDecoration",
|
||||
meta: {
|
||||
title: "店铺装修",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "goods-group",
|
||||
component: () => import("@/views/online-shop/goods-group.vue"),
|
||||
name: "goodsGroup",
|
||||
meta: {
|
||||
title: "商品分组",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "pad",
|
||||
component: () => import("@/views/online-shop/pad-setting.vue"),
|
||||
name: "pad",
|
||||
meta: {
|
||||
title: "Pad点单设置",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/system-setting",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "系统设置",
|
||||
icon: "system",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "pay-types",
|
||||
component: () => import("@/views/system-setting/pay-types/index.vue"),
|
||||
name: "payTypes",
|
||||
meta: {
|
||||
title: "支付方式",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
path: "/tool",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "经营工具",
|
||||
icon: "tools",
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/tool/Instead/index.vue"),
|
||||
name: "toolIndex",
|
||||
meta: {
|
||||
title: "代客下单",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "table",
|
||||
component: () => import("@/views/tool/table/index.vue"),
|
||||
name: "table",
|
||||
meta: {
|
||||
title: "台桌管理",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/application",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "应用中心",
|
||||
icon: "tree",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "marketing",
|
||||
component: () => import("@/views/application/marketing/index.vue"),
|
||||
name: "applicationMarketing",
|
||||
meta: {
|
||||
title: "营销中心",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/application/list/index.vue"),
|
||||
name: "applicationIndex",
|
||||
meta: {
|
||||
title: "列表管理",
|
||||
affix: false,
|
||||
keepAlive: false,
|
||||
},
|
||||
|
||||
},
|
||||
/**
|
||||
* 营销中心 start
|
||||
*/
|
||||
{
|
||||
path: "coupon",
|
||||
component: () => import("@/views/application/marketing/coupon/list.vue"),
|
||||
name: "coupon",
|
||||
meta: {
|
||||
title: "优惠券",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "bwc",
|
||||
component: () => import("@/views/application/marketing/bwc.vue"),
|
||||
name: "bwc",
|
||||
meta: {
|
||||
title: "霸王餐",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "invite",
|
||||
component: () => import("@/views/application/marketing/share/index.vue"),
|
||||
name: "invite",
|
||||
meta: {
|
||||
title: "邀请裂变",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "points",
|
||||
component: () => import("@/views/application/marketing/points/index.vue"),
|
||||
name: "points",
|
||||
meta: {
|
||||
title: "积分",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "ad",
|
||||
component: () => import("@/views/application/list/ad/index.vue"),
|
||||
name: "ad",
|
||||
meta: {
|
||||
title: "广告",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
/** 营销中心end */
|
||||
|
||||
/**列表start */
|
||||
|
||||
{
|
||||
path: "lineUplist",
|
||||
component: () => import("@/views/application/list/lineUplist/index.vue"),
|
||||
name: "lineUplist",
|
||||
meta: {
|
||||
title: "叫号",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "lineUpRecord",
|
||||
component: () => import("@/views/application/list/lineUplist/record.vue"),
|
||||
name: "lineUpRecord",
|
||||
meta: {
|
||||
title: "叫号记录",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "advertisement",
|
||||
component: () => import("@/views/application/list/advertisement/index.vue"),
|
||||
name: "advertisement",
|
||||
meta: {
|
||||
title: "广告",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "storingWine",
|
||||
component: () => import("@/views/application/list/storingWine/index.vue"),
|
||||
name: "storingWine",
|
||||
meta: {
|
||||
title: "存酒",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
|
||||
/**列表end */
|
||||
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/devices",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "设备管理",
|
||||
icon: "tab",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "printer",
|
||||
component: () => import("@/views/devices/printer.vue"),
|
||||
name: "devicesPrinter",
|
||||
meta: {
|
||||
title: "打印机",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/product",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "商品管理",
|
||||
icon: "money",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/product/index.vue"),
|
||||
name: "productIndex",
|
||||
meta: {
|
||||
title: "商品列表",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "addgoods",
|
||||
component: () => import("@/views/product/indexconfig/addgoods.vue"),
|
||||
name: "addgoods",
|
||||
meta: {
|
||||
title: "新增商品",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "unit",
|
||||
component: () => import("@/views/product/unit.vue"),
|
||||
name: "productUnit",
|
||||
meta: {
|
||||
title: "常用单位",
|
||||
affix: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "category",
|
||||
component: () => import("@/views/product/category.vue"),
|
||||
name: "productCategory",
|
||||
meta: {
|
||||
title: "商品分类",
|
||||
affix: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "specifications",
|
||||
component: () => import("@/views/product/specifications.vue"),
|
||||
name: "specifications",
|
||||
meta: {
|
||||
title: "商品规格",
|
||||
affix: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/inventory",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "进销存",
|
||||
icon: "tab",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "consumables",
|
||||
component: () => import("@/views/inventory/consumables/index.vue"),
|
||||
name: "consumables",
|
||||
meta: {
|
||||
title: "耗材列表",
|
||||
affix: false,
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "supplier",
|
||||
component: () => import("@/views/inventory/supplier/index.vue"),
|
||||
name: "supplier",
|
||||
meta: {
|
||||
title: "供应商管理",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "operation_in",
|
||||
component: () => import("@/views/inventory/operation_in/index.vue"),
|
||||
name: "operation_in",
|
||||
meta: {
|
||||
title: "出入库",
|
||||
affix: false,
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "paymentRecord",
|
||||
component: () => import("@/views/inventory/payment-record.vue"),
|
||||
name: "paymentRecord",
|
||||
meta: {
|
||||
title: "结款记录",
|
||||
affix: false,
|
||||
hidden: true,
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "classification",
|
||||
component: () => import("@/views/inventory/classification/index.vue"),
|
||||
name: "classification",
|
||||
meta: {
|
||||
title: "分类管理",
|
||||
affix: false,
|
||||
hidden: true,
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/user",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "用户管理",
|
||||
icon: "peoples",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/user/list/index.vue"),
|
||||
name: "userIndex",
|
||||
meta: {
|
||||
title: "用户列表",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "active",
|
||||
component: () => import("@/views/user/active/index.vue"),
|
||||
name: "userActive",
|
||||
meta: {
|
||||
title: "活动管理",
|
||||
affix: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/order",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "订单管理",
|
||||
icon: "menu",
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/order/index/index.vue"),
|
||||
name: "orderIndex",
|
||||
meta: {
|
||||
title: "订单列表",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "group-purchase",
|
||||
component: () => import("@/views/order/group-purchase.vue"),
|
||||
name: "orderRefund",
|
||||
meta: {
|
||||
title: "团购订单",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/mytemplate",
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: "我的模板",
|
||||
icon: "tab",
|
||||
alwaysShow: true,
|
||||
hidden: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "index",
|
||||
component: () => import("@/views/mytemplate/index.vue"),
|
||||
name: "mytemplateIndex",
|
||||
meta: {
|
||||
title: "我的模板",
|
||||
affix: false,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 创建路由
|
||||
*/
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: constantRoutes,
|
||||
// 刷新时,滚动条位置还原
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
});
|
||||
|
||||
// 全局注册 router
|
||||
export function setupRouter(app: App<Element>) {
|
||||
app.use(router);
|
||||
}
|
||||
|
||||
export default router;
|
||||
1170
src/router/index.ts
1170
src/router/index.ts
File diff suppressed because it is too large
Load Diff
|
|
@ -4,7 +4,7 @@ import { store } from "@/store";
|
|||
import router from "@/router";
|
||||
|
||||
import MenuAPI, { type RouteVO } from "@/api/account/menu";
|
||||
const isTest = true//是否是本地调试
|
||||
const isTest = false//是否是本地调试
|
||||
const modules = import.meta.glob("../../views/**/**.vue");
|
||||
const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ export const usePermissionStore = defineStore("permission", () => {
|
|||
if (!isTest) {
|
||||
const dynamicRoutes = parseDynamicRoutes(data.filter(v => v.type == 0));
|
||||
routes.value = [...constantRoutes, ...dynamicRoutes];
|
||||
console.log(routes.value)
|
||||
isRoutesLoaded.value = true;
|
||||
resolve(dynamicRoutes);
|
||||
} else {
|
||||
|
|
@ -103,7 +104,6 @@ export const usePermissionStore = defineStore("permission", () => {
|
|||
const parseDynamicRoutes = (rawRoutes: RouteVO[]): RouteRecordRaw[] => {
|
||||
const parsedRoutes: RouteRecordRaw[] = [];
|
||||
rawRoutes.forEach((route) => {
|
||||
console.log(route.path)
|
||||
const normalizedRoute = {
|
||||
path: route.path,
|
||||
meta: {
|
||||
|
|
@ -113,24 +113,26 @@ const parseDynamicRoutes = (rawRoutes: RouteVO[]): RouteRecordRaw[] => {
|
|||
alwaysShow: route.path && route.path.startsWith('/') ? true : false,
|
||||
hidden: route.hidden,
|
||||
},
|
||||
name: route.name,
|
||||
children: route.children,
|
||||
component: route.component,
|
||||
} as RouteRecordRaw;
|
||||
|
||||
// 处理组件路径
|
||||
|
||||
normalizedRoute.component =
|
||||
!normalizedRoute.component
|
||||
? Layout
|
||||
: modules[`../../views/${normalizedRoute.component}.vue`] ||
|
||||
modules["../../views/error-page/404.vue"];
|
||||
|
||||
// 递归解析子路由
|
||||
if (normalizedRoute.children) {
|
||||
// normalizedRoute.redirect = (!normalizedRoute.redirect && route.children.length <= 1) ? normalizedRoute.children[0].path : normalizedRoute.path
|
||||
normalizedRoute.children = parseDynamicRoutes(route.children);
|
||||
}
|
||||
console.log(normalizedRoute)
|
||||
|
||||
parsedRoutes.push(normalizedRoute);
|
||||
if (normalizedRoute.path !== '/' && normalizedRoute.path) {
|
||||
parsedRoutes.push(normalizedRoute);
|
||||
}
|
||||
});
|
||||
|
||||
return parsedRoutes;
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@
|
|||
<div class="top">
|
||||
<div class="item earnings">
|
||||
<div class="num_wrap">
|
||||
<div class="num">{{ formatDecimal(tradeSale.incomeAmountAll || 0) }}</div>
|
||||
<div class="num">{{ formatDecimal(trade.saleAmount || 0) }}</div>
|
||||
<div class="tips">
|
||||
营业实收(元)
|
||||
<el-tooltip popper-class="popper" effect="light" placement="bottom">
|
||||
<template #content>
|
||||
<div class="tips_row">
|
||||
<div class="item" v-for="(item, index) in tradeSale.payCount" :key="index">
|
||||
<div class="item" v-for="(item, index) in payCount" :key="index">
|
||||
<div class="left">
|
||||
<img class="icon" :src="item.icon" />
|
||||
<span>{{ item.payType }}</span>
|
||||
|
|
@ -108,9 +108,7 @@
|
|||
class="gropress l"
|
||||
:style="{
|
||||
width: `${
|
||||
tradeSale.incomeAmount
|
||||
? (tradeSale.incomeAmount / tradeSale.totalSaleAmount) * 100
|
||||
: 0
|
||||
trade.refundAmount ? (trade.refundAmount / trade.saleAmount) * 100 : 0
|
||||
}%`,
|
||||
}"
|
||||
></div>
|
||||
|
|
@ -118,9 +116,7 @@
|
|||
class="gropress r"
|
||||
:style="{
|
||||
width: `${
|
||||
tradeSale.refundAmount
|
||||
? (tradeSale.refundAmount / tradeSale.totalSaleAmount) * 100
|
||||
: 0
|
||||
trade.refundAmount ? (trade.refundAmount / trade.saleAmount) * 100 : 0
|
||||
}%`,
|
||||
}"
|
||||
></div>
|
||||
|
|
@ -128,8 +124,8 @@
|
|||
<div class="line_btm">
|
||||
<el-icon class="icon el-icon-caret-right" />
|
||||
<div class="info">
|
||||
<span class="l_t">收:{{ formatDecimal(tradeSale.incomeAmount || 0) }}</span>
|
||||
<span class="l_r">退:{{ formatDecimal(tradeSale.refundAmount || 0) }}</span>
|
||||
<span class="l_t">收:{{ formatDecimal(trade.saleAmount || 0) }}</span>
|
||||
<span class="l_r">退:{{ formatDecimal(trade.refundAmount || 0) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -143,8 +139,8 @@
|
|||
class="gropress l"
|
||||
:style="{
|
||||
width: `${
|
||||
tradeSale.inAmount
|
||||
? (tradeSale.inAmount / tradeSale.totalVipAmount) * 100
|
||||
trade.rechargeAmount
|
||||
? (trade.rechargeAmount / trade.memberPayAmount) * 100
|
||||
: 0
|
||||
}%`,
|
||||
}"
|
||||
|
|
@ -153,8 +149,8 @@
|
|||
class="gropress r"
|
||||
:style="{
|
||||
width: `${
|
||||
tradeSale.inAmount
|
||||
? (tradeSale.outAmount / tradeSale.totalVipAmount) * 100
|
||||
trade.rechargeAmount
|
||||
? (trade.rechargeAmount / trade.memberPayAmount) * 100
|
||||
: 0
|
||||
}%`,
|
||||
}"
|
||||
|
|
@ -163,8 +159,8 @@
|
|||
<div class="line_btm">
|
||||
<el-icon class="icon el-icon-caret-right" />
|
||||
<div class="info">
|
||||
<span class="l_t">收:{{ formatDecimal(tradeSale.inAmount || 0) }}</span>
|
||||
<span class="l_r">退:{{ formatDecimal(tradeSale.outAmount || 0) }}</span>
|
||||
<span class="l_t">收:{{ formatDecimal(trade.rechargeAmount || 0) }}</span>
|
||||
<span class="l_r">退:{{ formatDecimal(0) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -173,18 +169,18 @@
|
|||
<div class="item data">
|
||||
<div class="data_item">
|
||||
<div class="num_wrap">
|
||||
<div class="num">{{ formatDecimal(tradeVip.useAmount || 0) }}</div>
|
||||
<div class="num">{{ formatDecimal(trade.memberPayAmount || 0) }}</div>
|
||||
<div class="tips">会员消费(元)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data_item_right">
|
||||
<div class="t">
|
||||
<span>新增会员数</span>
|
||||
<span class="n">{{ tradeVip.newFlow || 0 }}(人)</span>
|
||||
<span class="n">{{ 0 }}(人)</span>
|
||||
</div>
|
||||
<div class="t">
|
||||
<span>会员消费笔数</span>
|
||||
<span class="n">{{ tradeVip.useNum || 0 }}</span>
|
||||
<span class="n">{{ trade.memberPayCount || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -194,7 +190,7 @@
|
|||
<div class="title">客单价</div>
|
||||
<div class="icon_wrap">
|
||||
<img class="img" src="@/assets/images/data_home_item1_icon.png" />
|
||||
<div class="t">{{ formatDecimal(tradeCount.unitPrice || 0) }}</div>
|
||||
<div class="t">{{ formatDecimal(trade.customerUnitPrice || 0) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item item2">
|
||||
|
|
@ -210,21 +206,21 @@
|
|||
</div>
|
||||
<div class="icon_wrap">
|
||||
<img class="img" src="@/assets/images/data_home_item2_icon.png" />
|
||||
<div class="t">{{ tradeCount.turnoverRate }}</div>
|
||||
<div class="t">{{ trade.tableTurnoverRate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item item3">
|
||||
<div class="title">优惠金额</div>
|
||||
<div class="icon_wrap">
|
||||
<img class="img" src="@/assets/images/data_home_item3_icon.png" />
|
||||
<div class="t">{{ formatDecimal(tradeCount.saveAmount || 0) }}</div>
|
||||
<div class="t">{{ formatDecimal(trade.discountAmount || 0) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item item4">
|
||||
<div class="title">优惠笔数</div>
|
||||
<div class="icon_wrap">
|
||||
<img class="img" src="@/assets/images/data_home_item4_icon.png" />
|
||||
<div class="t">{{ tradeCount.saveNum || 0 }}</div>
|
||||
<div class="t">{{ trade.discountCount || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -298,8 +294,8 @@
|
|||
<div class="product_chart_wrap" ref="productSumChart"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table :data="saleTable" v-loading="saleTableLoading">
|
||||
<div class="table w-full">
|
||||
<el-table :data="saleTable" v-loading="saleTableLoading" style="width: 100%">
|
||||
<!-- <el-table-column label="排名" prop="productId"></el-table-column> -->
|
||||
<el-table-column label="商品名称" prop="productName"></el-table-column>
|
||||
<el-table-column label="数量" prop="salesNum"></el-table-column>
|
||||
|
|
@ -346,6 +342,51 @@ export default {
|
|||
name: "home",
|
||||
data() {
|
||||
return {
|
||||
payCount: [
|
||||
{
|
||||
icon: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/static/wx.png",
|
||||
isAmount: "1",
|
||||
payAmount: 0,
|
||||
payType: "微信小程序",
|
||||
saveAmount: null,
|
||||
},
|
||||
{
|
||||
icon: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/static/ali.png",
|
||||
isAmount: "1",
|
||||
payAmount: 0,
|
||||
payType: "支付宝小程序",
|
||||
saveAmount: null,
|
||||
},
|
||||
{
|
||||
icon: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/static/scan.png",
|
||||
isAmount: "1",
|
||||
payAmount: 0,
|
||||
payType: "主扫收款",
|
||||
saveAmount: null,
|
||||
},
|
||||
{
|
||||
icon: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/static/bscan.png",
|
||||
isAmount: "1",
|
||||
payAmount: 0,
|
||||
payType: "收款码收款",
|
||||
saveAmount: null,
|
||||
},
|
||||
{
|
||||
icon: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/static/cash.png",
|
||||
isAmount: "1",
|
||||
payAmount: 0,
|
||||
payType: "现金",
|
||||
saveAmount: null,
|
||||
},
|
||||
{
|
||||
icon: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/static/vipIn.png",
|
||||
isAmount: "1",
|
||||
payAmount: 0,
|
||||
payType: "充值",
|
||||
saveAmount: null,
|
||||
},
|
||||
],
|
||||
trade: {},
|
||||
formatDecimal,
|
||||
topData: "",
|
||||
saleTab: "sale",
|
||||
|
|
@ -485,9 +526,10 @@ export default {
|
|||
try {
|
||||
this.tradeLoading = true;
|
||||
const res = await dataSummaryApi.trade({
|
||||
startTime: this.query.createdAt[0],
|
||||
beginTime: this.query.createdAt[0],
|
||||
endTime: this.query.createdAt[1],
|
||||
});
|
||||
this.trade = res;
|
||||
this.tradeLoading = false;
|
||||
this.tradeSale = res.sale;
|
||||
this.tradeVip = res.vip;
|
||||
|
|
|
|||
Loading…
Reference in New Issue