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 @@
-
+
-
+
{{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
@@ -33,11 +21,7 @@
{{ scope.row[scope.prop] }}
-
+
@@ -47,12 +31,8 @@
收银机权限设置
-
+
员工权限设置
@@ -62,21 +42,13 @@
-
+
收银机权限设置
-
+
员工权限设置
@@ -143,6 +115,9 @@ const oldeditSubmitFunc = editModalConfig.formAction;
// 数据初始化
async function init() {
// 覆写添加确定方法
+ if (JSON.parse(localStorage.getItem('userInfo') || '{}').isHeadShop == 0) {
+ searchConfig.formItems.splice(0, 1)
+ }
addModalConfig.formAction = function (data) {
return ShopStaffApi.add({
...data,