|
|
@@ -4,7 +4,7 @@
|
|
|
<!-- 表格 header 按钮 -->
|
|
|
<template #tableHeader="scope">
|
|
|
<div class="table-header-btn">
|
|
|
- <el-button :icon="Plus" class="button" type="primary" @click="newGroupBuying"> 新建团购 </el-button>
|
|
|
+ <el-button :icon="Plus" class="button" type="primary" @click="newGroupBuying" v-if="type"> 新建团购 </el-button>
|
|
|
<el-tabs v-if="showTabs" v-model="activeName" class="tabs" @tab-click="handleClick">
|
|
|
<el-tab-pane v-for="tab in filteredTabOptions" :key="tab.name" :label="tab.label" :name="tab.name" />
|
|
|
</el-tabs>
|
|
|
@@ -149,8 +149,7 @@ import ProTable from "@/components/ProTable/index.vue";
|
|
|
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
|
|
|
import { Plus } from "@element-plus/icons-vue";
|
|
|
import { delThaliById, getThaliList, updateStatus, updateNum } from "@/api/modules/groupPackageManagement";
|
|
|
-import { localGet } from "@/utils";
|
|
|
-
|
|
|
+import { localGet, usePermission } from "@/utils";
|
|
|
const router = useRouter();
|
|
|
const dialogFormVisible = ref(false);
|
|
|
const formInventory: any = ref({
|
|
|
@@ -359,12 +358,14 @@ watch(
|
|
|
);
|
|
|
// 如果表格需要初始化请求参数,直接定义传给 ProTable (之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
|
|
const initParam = reactive({
|
|
|
- storeId: localGet("createdId") || "104",
|
|
|
+ storeId: localGet("createdId") || "",
|
|
|
groupType: localGet("businessSection") || "1",
|
|
|
status: activeName
|
|
|
});
|
|
|
+const type = ref(false);
|
|
|
// 页面加载时触发查询
|
|
|
-onMounted(() => {
|
|
|
+onMounted(async () => {
|
|
|
+ type.value = await usePermission("新建团购");
|
|
|
proTable.value?.getTableList();
|
|
|
});
|
|
|
|
|
|
@@ -487,8 +488,10 @@ const closeRejectReasonDialog = () => {
|
|
|
white-space: normal; // 允许自然换行
|
|
|
}
|
|
|
.table-header-btn {
|
|
|
+ .button {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
.tabs {
|
|
|
- margin-top: 10px;
|
|
|
:deep(.el-tabs__nav-wrap::after) {
|
|
|
height: 0;
|
|
|
}
|