From fb9591ea38b263afe9d051168e34aa03028494eb Mon Sep 17 00:00:00 2001 From: zhaoxiaoqiang Date: Tue, 18 May 2021 10:03:06 +0800 Subject: [PATCH] 商户添加店员 --- src/views/mine/stores/stores.vue | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/views/mine/stores/stores.vue b/src/views/mine/stores/stores.vue index 567da8c..4d12a22 100644 --- a/src/views/mine/stores/stores.vue +++ b/src/views/mine/stores/stores.vue @@ -5,7 +5,6 @@ --> <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"/> <div class="item-box"> @@ -32,7 +31,7 @@ </van-list> </div> - <van-button class="btn" @click="$router.push('/mine/stores-add')"> + <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)"> <div class="inner"> <van-icon name="plus"/> <span class="text">新增</span> @@ -44,6 +43,7 @@ </template> <script> +import { mapState } from 'vuex'; export default { name: "stores", data() { @@ -56,14 +56,16 @@ merId:'', } }, - + computed:{ + ...mapState(['userinfo']) + }, created(){ - this.merId = this.$route.query.merId; + this.merId = this.$route.query.merId?this.$route.query.merId:this.userinfo.orgId; this.init(); }, methods: { init(){ - console.log("merId:"+this.merId); + console.log("merId:"+this.merId); this.loading = true this.$api.storeStoreList({ searchKey:this.value, @@ -83,17 +85,14 @@ } }) }, - - //跳转到模板详情 - goStoreOprs(merId){ - this.$router.push({ - path:'/mine/storesOprs', - query:{ - storeId:this.storeId - } - }) - }, - + goStoreOprs(storeId){ + this.$router.push({ + path:'/mine/storesOprs', + query:{ + storeId:storeId + } + }) + }, go(id) { this.$router.push({path:'/mine/stores-detail',query:{storeId:id}}); }, @@ -188,6 +187,9 @@ margin-bottom: 5px; font-weight: bold; width:200px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .opr-btn { -- Gitblit v1.8.0