| | |
| | | </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> |
| | |
| | | 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: { |
| | |
| | | if (this.orgType == 1 && !this.$route.query.merId) { |
| | | objForm = { |
| | | searchKey: this.value, |
| | | storeId: this.storeId, |
| | | storeId: this.storeId, |
| | | } |
| | | } else { |
| | | objForm = { |
| | |
| | | onSearch(val) { |
| | | this.list = [] |
| | | this.loading = true |
| | | this.$api.storeStoreList({ |
| | | searchKey: this.value, |
| | | merId: this.merId, |
| | | }).then(res => { |
| | | let objForm = {} |
| | | if (this.orgType == 1 && !this.$route.query.merId) { |
| | | objForm = { |
| | | searchKey: this.value, |
| | | // storeId: this.storeId, |
| | | } |
| | | } else { |
| | | objForm = { |
| | | searchKey: this.value, |
| | | // storeId: this.storeId, |
| | | merId: this.merId, |
| | | } |
| | | } |
| | | this.$api.storeStoreList(objForm).then(res => { |
| | | if (res.body.storeList.length < 10) { |
| | | this.list = [...this.list, ...res.body.storeList] |
| | | this.storeId = '' |