From f1e85eeb275d253ee08f5a3d38fa41946d77859d Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Wed, 9 Apr 2025 17:32:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat=EF=BC=9A=E5=88=86=E5=BA=97=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=98=BE=E7=A4=BA=E6=9D=A1=E4=BB=B6=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 2 +- src/views/data/index.vue | 4 ++- src/views/data/sales.vue | 4 ++- src/views/data/table.vue | 3 +- src/views/shop/staff/index.vue | 53 +++++++++------------------------- 5 files changed, 23 insertions(+), 43 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 5c6e0be..3e8eabd 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -63,7 +63,7 @@ export const useUserStore = defineStore("user", () => { console.log(userInfo) console.log(data) localStorage.setItem("shopId", "" + data.id); - Object.assign(userInfo.value, { ...data, roles: [], promissionList: [], shopId: userInfo.value.shopId }); + Object.assign(userInfo.value, { ...data, roles: [], promissionList: [], shopId: data.id }); resolve(userInfo.value); }) .catch((error) => { diff --git a/src/views/data/index.vue b/src/views/data/index.vue index 788111c..4180b14 100644 --- a/src/views/data/index.vue +++ b/src/views/data/index.vue @@ -52,7 +52,7 @@ 营业
- +
@@ -428,6 +428,8 @@ export default { }, tradeVip: "", tradeCount: "", + isHeadShop: JSON.parse(localStorage.getItem("userInfo")).isHeadShop + }; }, computed: { diff --git a/src/views/data/sales.vue b/src/views/data/sales.vue index e972574..9d96d0b 100644 --- a/src/views/data/sales.vue +++ b/src/views/data/sales.vue @@ -11,7 +11,7 @@ - + @@ -185,6 +185,8 @@ export default { payCountTotal: 0, branchList: [], shopId: null, + isHeadShop: JSON.parse(localStorage.getItem("userInfo")).isHeadShop + }; }, filters: { diff --git a/src/views/data/table.vue b/src/views/data/table.vue index e12e2d6..61c6398 100644 --- a/src/views/data/table.vue +++ b/src/views/data/table.vue @@ -28,7 +28,7 @@ >
- +
@@ -133,6 +133,7 @@ export default { payCountTotal: 0, shopId: null, branchList: [], + isHeadShop: JSON.parse(localStorage.getItem("userInfo")).isHeadShop }; }, filters: { diff --git a/src/views/shop/staff/index.vue b/src/views/shop/staff/index.vue index bc4a7af..4c09e6e 100644 --- a/src/views/shop/staff/index.vue +++ b/src/views/shop/staff/index.vue @@ -2,24 +2,12 @@
- + - + @@ -47,12 +31,8 @@

收银机权限设置

- +

员工权限设置

@@ -62,21 +42,13 @@ - +