add product
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<t-cell-group
|
||||
v-for="(group, index) in visibleMenuGroupList"
|
||||
:key="group.title"
|
||||
class="menu-group"
|
||||
:title="group.title"
|
||||
theme="card"
|
||||
v-entrance-transition="index * 70"
|
||||
@@ -15,17 +16,18 @@
|
||||
<t-cell
|
||||
v-for="item in group.items"
|
||||
:key="item.path"
|
||||
class="item"
|
||||
class="menu-item"
|
||||
:title="item.title"
|
||||
arrow
|
||||
hover
|
||||
@click="go(item.path)"
|
||||
>
|
||||
<template #leftIcon>
|
||||
<t-icon :name="item.icon" size="1.75rem" />
|
||||
<span class="icon-wrap" :class="`tone-${index}`"><t-icon :name="item.icon" size="1.35rem" /></span>
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<div v-if="!visibleMenuGroupList.length" class="empty" v-text="'当前账号暂无产品管理权限'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -53,35 +55,47 @@ const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const menuGroupList = computed<MenuGroup[]>(() => [
|
||||
{
|
||||
title: "套餐",
|
||||
{
|
||||
title: "产品管理",
|
||||
items: [
|
||||
{
|
||||
icon: "catalog",
|
||||
path: "/management/product-categories",
|
||||
title: "产品分类",
|
||||
visible: userStore.hasPermissions(permissionCodes.productCategory.read)
|
||||
},
|
||||
{
|
||||
icon: "layers",
|
||||
path: "/management/package-configs",
|
||||
title: "套餐配置",
|
||||
visible: userStore.hasPermissions(permissionCodes.packageConfig.read)
|
||||
path: "/management/products",
|
||||
title: "产品库",
|
||||
visible: userStore.hasPermissions(permissionCodes.product.read)
|
||||
},
|
||||
{
|
||||
icon: "order-list",
|
||||
path: "/management/customer-packages",
|
||||
title: "客户套餐",
|
||||
visible: userStore.hasPermissions(permissionCodes.customerPackage.read)
|
||||
},
|
||||
{
|
||||
icon: "upload",
|
||||
path: "/management/package-deliveries",
|
||||
title: "发放记录",
|
||||
visible: userStore.hasPermissions(permissionCodes.packageDelivery.read)
|
||||
},
|
||||
{
|
||||
icon: "money",
|
||||
path: "/management/fund-records",
|
||||
title: "资金流水",
|
||||
visible: userStore.hasPermissions(permissionCodes.fundRecord.read)
|
||||
icon: "wallet",
|
||||
path: "/management/product-stocks",
|
||||
title: "库存与库存流水",
|
||||
visible: userStore.hasPermissions(permissionCodes.productStock.read)
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "交易管理",
|
||||
items: [
|
||||
{ icon: "order", path: "/management/sales-orders", title: "销售订单", visible: userStore.hasPermissions(permissionCodes.salesOrder.read) },
|
||||
{ icon: "wallet", path: "/management/sales-orders?view=pending-receive", title: "待收款", visible: userStore.hasPermissions(permissionCodes.salesOrder.read) },
|
||||
{ icon: "discount", path: "/management/sales-orders?view=pending-refund", title: "待退款", visible: userStore.hasPermissions(permissionCodes.salesOrder.read) },
|
||||
{ icon: "wallet", path: "/management/fund-records", title: "资金流水", visible: userStore.hasPermissions(permissionCodes.fundRecord.read) },
|
||||
{ icon: "task", path: "/management/order-fulfillments", title: "统一履约", visible: userStore.hasPermissions(permissionCodes.orderFulfillment.read) }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "套餐管理",
|
||||
items: [
|
||||
{ icon: "layers", path: "/management/package-configs", title: "套餐配置", visible: userStore.hasPermissions(permissionCodes.packageConfig.read) },
|
||||
{ icon: "calendar", path: "/management/registration-events", title: "套餐购买事件绑定", visible: userStore.hasPermissions([permissionCodes.event.read, permissionCodes.packageConfig.read], "and") },
|
||||
{ icon: "usergroup", path: "/management/customer-packages", title: "客户套餐", visible: userStore.hasPermissions(permissionCodes.customerPackage.read) }
|
||||
]
|
||||
}
|
||||
]);
|
||||
|
||||
const visibleMenuGroupList = computed<MenuGroup[]>(() => menuGroupList.value
|
||||
|
||||
Reference in New Issue
Block a user