zhaoxiaoqiang
2021-11-07 c0457bf3334ca6d7b2db01fa1d6739b48ed3535c
src/views/mine/stores/stores.vue
@@ -5,7 +5,7 @@
-->
<template>
  <div class="stores-box h-100-g">
    <v-navbar title="门店管理" fixed></v-navbar>
    <v-navbar title="门店管理1" fixed></v-navbar>
    <van-search class="search" placeholder="请输入门店名称/负责人姓名/负责人手机号/渠道编码" v-model="value" shape='round' @search="onSearch" />
    <div class="item-box">
      <van-list v-model="loading" :finished="finished" immediate-check='false' offset="50" finished-text="没有更多了" @load="onLoad">
@@ -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,
        }
      }