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 @@
-
+
-
+
{{ 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,
From d4c4989b26fb50e90ae4480aed552568532be753 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Wed, 9 Apr 2025 18:02:02 +0800
Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E7=AD=9B=E9=80=89=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E6=9D=A1=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=97=B6=E5=88=86?=
=?UTF-8?q?=E7=A7=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/data/index.vue | 2 +-
src/views/data/sales.vue | 2 +-
src/views/data/table.vue | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/views/data/index.vue b/src/views/data/index.vue
index 4180b14..5a3f855 100644
--- a/src/views/data/index.vue
+++ b/src/views/data/index.vue
@@ -67,7 +67,7 @@
diff --git a/src/views/data/sales.vue b/src/views/data/sales.vue
index 9d96d0b..23576ef 100644
--- a/src/views/data/sales.vue
+++ b/src/views/data/sales.vue
@@ -34,7 +34,7 @@
自定义
diff --git a/src/views/data/table.vue b/src/views/data/table.vue
index 61c6398..b90b648 100644
--- a/src/views/data/table.vue
+++ b/src/views/data/table.vue
@@ -24,7 +24,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
- value-format="YYYY-MM-DD"
+ value-format="YYYY-MM-DD HH:mm:ss"
>