Browse Source

管理员才可以修改门店

cr 4 years ago
parent
commit
5c9a7fec9b
3 changed files with 35 additions and 6 deletions
  1. 4 0
      releaselog.md
  2. 28 3
      src/pages/index/index.vue
  3. 3 3
      src/pages/manage/index.vue

+ 4 - 0
releaselog.md

@@ -1,4 +1,8 @@
1 1
 
2
+# 0.4.3 (21.01.27 18:00) 
3
+### 管理员才可以修改门店
4
+
5
+
2 6
 # 0.4.2 (21.01.13 18:00) 
3 7
 ### 增加收银挂单
4 8
 

+ 28 - 3
src/pages/index/index.vue

@@ -1,9 +1,9 @@
1 1
 <template>
2 2
     <div class="page">
3 3
         <div class="page__top">
4
-            <div class="shop-main">
4
+            <div class="shop-main" v-if="isAdmin">
5 5
                 <div class="name">当前门店:</div>
6
-                <div class="shop" v-if="!hideShop" @click="goShopSelect">
6
+                <div class="shop" @click="goShopSelect">
7 7
                     <div class="shop__name">
8 8
                         <!-- 最多6字 -->
9 9
                         {{ curShopName }}
@@ -11,6 +11,16 @@
11 11
                     </div>
12 12
                 </div>
13 13
             </div>
14
+            <div class="shop-main" v-else>
15
+                <div class="name">当前门店:</div>
16
+                <div class="shop">
17
+                    <div class="shop__name">
18
+                        <!-- 最多6字 -->
19
+                        {{ user.storeName }}
20
+                        <!-- <i class="iconfont iconyoujiantou shop__arrow"></i> -->
21
+                    </div>
22
+                </div>
23
+            </div>
14 24
             <div class="scan">
15 25
                 <my-image
16 26
                     class="scan-img"
@@ -1109,7 +1119,22 @@ export default {
1109 1119
         },
1110 1120
 
1111 1121
         curShopId() {
1112
-            return this.$store.state.common.curShop.id;
1122
+            if(this.isAdmin){
1123
+                return this.$store.state.common.curShop.id;
1124
+            }else{
1125
+                return this.user.storeId;
1126
+            }
1127
+        },
1128
+        isAdmin() {
1129
+            //店铺管理员  系统管理员
1130
+            if (
1131
+                this.user.roleId === "50c41c5d-b54c-43ed-b587-10dcb60e72e5" ||
1132
+                this.user.roleId === "75b71b24-25de-40ac-a866-c8f5555b8b92"
1133
+            ) {
1134
+                return true;
1135
+            } else {
1136
+                return false;
1137
+            }
1113 1138
         },
1114 1139
     },
1115 1140
 

+ 3 - 3
src/pages/manage/index.vue

@@ -42,7 +42,7 @@
42 42
                     ></my-image>
43 43
                     <span class="text">账号设置</span>
44 44
                 </li> -->
45
-                <li class="item" @click="jump('/pages/manage/cashier/index')">
45
+                <!-- <li class="item" @click="jump('/pages/manage/cashier/index')">
46 46
                     <my-image
47 47
                         class="img"
48 48
                         src="/static/icon/cashier.png"
@@ -55,14 +55,14 @@
55 55
                         src="/static/icon/cashier-list.png"
56 56
                     ></my-image>
57 57
                     <span class="text">历史单据</span>
58
-                </li>
58
+                </li> -->
59 59
               
60 60
             </ul>
61 61
         </div>
62 62
 
63 63
         <button class="btn" @click="layout">退出登录</button>
64 64
 
65
-        <div class="ver">0.4.2</div>
65
+        <div class="ver">0.4.3</div>
66 66
     </div>
67 67
 </template>
68 68