From 7d645c7400191c513295c075359c650dbe17808d Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang <l287285524@qq.com>
Date: Sun, 07 Nov 2021 18:20:10 +0800
Subject: [PATCH] 门店管理

---
 src/views/mine/stores/stores.vue |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/views/mine/stores/stores.vue b/src/views/mine/stores/stores.vue
index aaff8dd..08580ef 100644
--- a/src/views/mine/stores/stores.vue
+++ b/src/views/mine/stores/stores.vue
@@ -24,7 +24,7 @@
       </van-list>
     </div>
 
-    <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)" v-if="orgType!=1">
+    <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)" v-if='isShowAdd'>
       <div class="inner">
         <van-icon name="plus" />
         <span class="text">新增</span>
@@ -46,14 +46,19 @@
       finished: false,
       storeId: '',
       merId: '',
+      merIdType:''//区分当前是商户进入当前页面或者门店进入当前页面
     }
   },
   computed: {
     ...mapState(['userinfo']),
     ...mapGetters(["orgType"]),
+    isShowAdd(){
+      return (this.orgType==1&&this.merIdType)||this.orgType==3;
+    }
   },
   created() {
     this.merId = this.$route.query.merId ? this.$route.query.merId : this.userinfo.orgId;
+    this.merIdType = this.$route.query.merId;
     this.init();
   },
   methods: {
@@ -63,12 +68,12 @@
       if (this.orgType == 1 && !this.$route.query.merId) {
         objForm = {
           searchKey: this.value,
-          //  storeId: this.storeId,
+           storeId: this.storeId,
         }
       } else {
         objForm = {
           searchKey: this.value,
-          // storeId: this.storeId,
+          storeId: this.storeId,
           merId: this.merId,
         }
       }
@@ -108,12 +113,12 @@
       if (this.orgType == 1 && !this.$route.query.merId) {
         objForm = {
           searchKey: this.value,
-          storeId: this.storeId,
+          // storeId: this.storeId,
         }
       } else {
         objForm = {
           searchKey: this.value,
-          storeId: this.storeId,
+          // storeId: this.storeId,
           merId: this.merId,
         }
       }

--
Gitblit v1.8.0