diff --git a/src/components/CURD/PageSearch.vue b/src/components/CURD/PageSearch.vue index 361d6c6..b05e811 100644 --- a/src/components/CURD/PageSearch.vue +++ b/src/components/CURD/PageSearch.vue @@ -108,7 +108,7 @@ 本月 自定义 -
+
diff --git a/src/utils/index.ts b/src/utils/index.ts index 1ada8db..f17566b 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -116,4 +116,16 @@ export function downloadFile(obj: BlobPart, name: string, suffix: string, useUni document.body.appendChild(link); link.click(); document.body.removeChild(link); -} \ No newline at end of file +} + +/** + * 判断主店同步是否启用 + */ +export function isSyncStatus() { + let userInfo = ref(JSON.parse(localStorage.getItem('userInfo') || '{}')) + if (userInfo.value.isHeadShop == 0 && userInfo.value.isEnableProdSync == 1 && userInfo.value.isEnableVipSync == 1 && userInfo.value.isEnableConsSync == 1) { + return true + }else { + return false + } +} diff --git a/src/views/admin/system/menu/index.vue b/src/views/admin/system/menu/index.vue index 140584b..1ef4177 100644 --- a/src/views/admin/system/menu/index.vue +++ b/src/views/admin/system/menu/index.vue @@ -162,7 +162,7 @@ 接口 - + - + - + diff --git a/src/views/product/index.vue b/src/views/product/index.vue index 3d9d32f..f700cab 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -159,6 +159,7 @@ import UserAPI from "@/api/product/index"; import { useRouter } from "vue-router"; import type { IObject, IOperatData } from "@/components/CURD/types"; import usePage from "@/components/CURD/usePage"; +import { isSyncStatus } from "@/utils/index"; import addModalConfig from "./indexconfig/add"; import contentConfig from "./indexconfig/content"; import MultiImageUpload from "@/components/Upload/MultiImageUpload.vue" @@ -199,11 +200,19 @@ let datas = reactive({ remark: "", images: [] }); -if (JSON.parse(localStorage.getItem('userInfo') || '{}').isHeadShop == 0) { - contentConfig.toolbar.splice(0, 1) +if (isSyncStatus()) { + if( JSON.stringify(contentConfig.toolbar)?.indexOf("add") != -1){ + contentConfig.toolbar?.splice(0, 1) + } + if( JSON.stringify(contentConfig.cols[contentConfig.cols.length-1].operat)?.indexOf("delete") != -1){ + contentConfig.cols[contentConfig.cols.length-1].operat?.splice(2, 1) + } }else { - contentConfig.toolbar.splice(1, 1) + if( JSON.stringify(contentConfig.toolbar)?.indexOf("custom2") != -1){ + contentConfig.toolbar?.splice(1, 1) + } } + onMounted(() => { console.log(route.query); if (route.query.id) { diff --git a/src/views/shop/branchStore/index.vue b/src/views/shop/branchStore/index.vue index fe95978..12fa3c2 100644 --- a/src/views/shop/branchStore/index.vue +++ b/src/views/shop/branchStore/index.vue @@ -117,8 +117,7 @@ async function getTableData() { const res = await ShopBranchApi.getList({ page: state.tableData.page, size: state.tableData.size, - shopName: state.query.name, - status: state.query.status, + branchShopName: state.query.name, }); state.tableData.loading = false; state.tableData.list = res.records;