From 9d7ce3f56a223ed69160d33ea2681014fd8aa8d7 Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang
Date: Mon, 17 May 2021 16:54:57 +0800
Subject: [PATCH] 升档

---
 src/views/mine/stores/storeOprs.vue |   48 ++++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/views/mine/stores/storeOprs.vue b/src/views/mine/stores/storeOprs.vue
index 54c58df..bc25800 100644
--- a/src/views/mine/stores/storeOprs.vue
+++ b/src/views/mine/stores/storeOprs.vue
@@ -5,9 +5,8 @@
 -->
 <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"
@@ -17,28 +16,25 @@
         finished-text="没有更多了"
         @load="onLoad"
       >
-        <div class="stores-item flex-start-g" v-for="(item, index) in list" :key="index" @click="go(item.storeId)">
+        <div class="stores-item flex-start-g" v-for="(item, index) in list" :key="index" @click="go(item.id)">
           <p class="icon-box flex-center-g">
             <svg class="icon" aria-hidden="true" style="width:25px;height:25px;fill:#fff" >
               <use xlink:href="#iconyonghu"></use>
             </svg>
           </p>
           <div>
-            <p class="name" v-text="item.storeName || ''">店员名称</p>
-            <p class="c-text-666-g font-12-g" v-text="item.priMblNo || ''">13586695442</p>
+            <p class="name" v-text="item.name || ''">店员名称</p>
+            <p class="c-text-666-g font-12-g" v-text="item.mblNo || ''">13586695442</p>
           </div>
         </div>
       </van-list>
     </div>
-
-    <van-button class="btn" @click="$router.push('/mine/stores-add')">
+    <van-button class="btn" @click="goAdd">
       <div class="inner">
         <van-icon name="plus"/>
         <span class="text">新增</span>
       </div>
     </van-button>
-
-
   </div>
 </template>
 
@@ -51,55 +47,59 @@
         list:[],
         loading:false,
         finished:false,
-        storeId:''
+        storeId:'',
+        queryStoreId:""
       }
     },
 
     created(){
+      this.queryStoreId =this.$route.query.storeId;
       this.init();
     },
     methods: {
       init(){
         this.loading = true
-        this.$api.storeStoreList({
+        this.$api.storeStorePersonList({
           searchKey:this.value,
-          storeId:this.storeId,
+          orgId:this.queryStoreId,
         }).then((res) => {
-          if(res.body.storeList.length < 10){
-            this.list = [...this.list,...res.body.storeList]
+          if(res.body.length < 10){
+            this.list = [...this.list,...res.body]
             this.storeId = ''
             this.finished = true
             this.loading = false
           }else{
-            this.list = [...this.list,...res.body.storeList]
+            this.list = [...this.list,...res.body]
             this.storeId = this.list[this.list.length-1].storeId
             this.finished = false
             this.loading = false
           }
         })
       },
-
-
       go(id) {
-        this.$router.push({path:'/mine/stores-detail',query:{storeId:id}});
+        this.$router.push({path:'/mine/storeOprs-detail',query:{mgrId:id,storeId:this.queryStoreId}});
       },
-
+      goAdd(){
+        console.log(this.storeId)
+        this.$router.push({path:'/mine/storeOprs-add',query:{storeId:this.queryStoreId}})
+      },
       onLoad(){
         this.init()
       },
       onSearch(val){
         this.list = []
         this.loading = true
-        this.$api.storeStoreList({
+        this.$api.storeStorePersonList({
           searchKey:this.value,
+          orgId:this.queryStoreId,
         }).then(res=>{
-          if(res.body.storeList.length < 10){
-            this.list = [...this.list,...res.body.storeList]
+          if(res.body.length < 10){
+            this.list = [...this.list,...res.body]
             this.storeId = ''
             this.finished = true
             this.loading = false
           }else{
-            this.list = [...this.list,...res.body.storeList]
+            this.list = [...this.list,...res.body]
             this.storeId = this.list[this.list.length-1].storeId
             this.finished = false
             this.loading = false
@@ -117,7 +117,7 @@
 
     background-color: @c-bg-f5;
     padding-top: 44px;
-
+    box-sizing: border-box;
     .btn {
       position: fixed;
       width: 50px;

--
Gitblit v1.8.0