| | |
| | | <v-navbar title="门店管理" 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" |
| | | > |
| | | <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)"> |
| | | <p class="icon-box flex-center-g"> |
| | | <svg class="icon" aria-hidden="true" style="width:25px;height:25px;fill:#fff" > |
| | |
| | | </van-list> |
| | | </div> |
| | | |
| | | <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)"> |
| | | <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)" v-if="orgType!=1"> |
| | | <div class="inner"> |
| | | <van-icon name="plus"/> |
| | | <span class="text">新增</span> |
| | | </div> |
| | | </van-button> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex'; |
| | | import { mapState, mapGetters } from "vuex"; |
| | | export default { |
| | | name: "stores", |
| | | data() { |
| | |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapState(['userinfo']) |
| | | ...mapState(['userinfo']), |
| | | ...mapGetters(["orgType"]), |
| | | }, |
| | | created(){ |
| | | this.merId = this.$route.query.merId?this.$route.query.merId:this.userinfo.orgId; |
| | |
| | | methods: { |
| | | init(){ |
| | | this.loading = true |
| | | this.$api.storeStoreList({ |
| | | let objForm = {} |
| | | if (this.orgType == 1) { |
| | | objForm = { |
| | | searchKey: this.value, |
| | | storeId: this.storeId, |
| | | } |
| | | } else { |
| | | objForm = { |
| | | searchKey:this.value, |
| | | storeId:this.storeId, |
| | | merId:this.merId, |
| | | }).then((res) => { |
| | | } |
| | | } |
| | | this.$api.storeStoreList(objForm).then((res) => { |
| | | if(res.body.storeList.length < 10){ |
| | | this.list = [...this.list,...res.body.storeList] |
| | | this.storeId = '' |
| | |
| | | |
| | | <style scoped lang="less"> |
| | | .stores-box { |
| | | |
| | | background-color: @c-bg-f5; |
| | | padding-top: 44px; |
| | | |
| | |
| | | color: @c-text-f5; |
| | | z-index: @zIndex-50; |
| | | box-shadow: 0px 5px 9px 0px rgba(80, 47, 183, 0.2); |
| | | background: linear-gradient(0deg, rgba(106, 79, 188, 1), rgba(137, 110, 219, 1)); |
| | | background: linear-gradient( |
| | | 0deg, |
| | | rgba(106, 79, 188, 1), |
| | | rgba(137, 110, 219, 1) |
| | | ); |
| | | |
| | | .inner { |
| | | display: flex; |
| | |
| | | padding: 15px 8px; |
| | | } |
| | | |
| | | |
| | | .item-box { |
| | | background-color: @c-bg-fff; |
| | | padding-bottom: 25px; |
| | | } |
| | | |
| | | |
| | | .stores-item { |
| | | height: 67px; |
| | |
| | | color: @c-text-fff; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </style> |