| | |
| | | <template> |
| | | <div class="stores-box h-100-g"> |
| | | <v-navbar title="门店管理" fixed></v-navbar> |
| | | <van-search class="search" placeholder="请输入门店名称/负责人姓名/负责人手机号" v-model="value" shape='round' @search="onSearch" /> |
| | | <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"> |
| | | <div class="stores-item flex-start-g" v-for="(item, index) in list" :key="index" @click="go(item.storeId)"> |
| | |
| | | init() { |
| | | this.loading = true |
| | | let objForm = {} |
| | | if (this.orgType == 1) { |
| | | 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, |
| | | } |
| | | } |
| | |
| | | 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 = '' |