소스 검색

计划内外筛选分销店请求接口添加参数

zhujindu 7 달 전
부모
커밋
b11b263794
3개의 변경된 파일14개의 추가작업 그리고 5개의 파일을 삭제
  1. 7 2
      src/components/filtrate.vue
  2. 2 2
      src/views/deviceOutside/index.vue
  3. 5 1
      src/views/deviceWithin/index.vue

+ 7 - 2
src/components/filtrate.vue

@@ -143,11 +143,17 @@ export default {
       type: Boolean,
       default: false,
     },
+    entry: {
+      type: Number,
+    },
   },
   watch: {
     showFilter: {
       handler(val) {
         // this.CustomerName = '';
+        if (val) {
+          this.getStoreTypeList();
+        }
       },
       deep: true,
       immediate: true,
@@ -184,7 +190,6 @@ export default {
   created() {},
   mounted() {
     this.getStoreLabels();
-    this.getStoreTypeList();
   },
   methods: {
     closePopup(flag = false) {
@@ -263,7 +268,7 @@ export default {
       });
     },
     getStoreTypeList() {
-      getStoreTypeListlp({}).then((res) => {
+      getStoreTypeListlp({ entry: this.entry }).then((res) => {
         this.storeTypeLists = res.data;
         this.storeTypeList = res.data;
       });

+ 2 - 2
src/views/deviceOutside/index.vue

@@ -741,7 +741,6 @@ export default {
     }
     this.query = this.$route.query;
     localStorage.removeItem('visitId');
-    this.getStoreTypeList();
     this.getStoreLabels();
     var postType = localStorage.getItem('postType');
     if (postType == 'GZ') {
@@ -998,7 +997,7 @@ export default {
       this.onSearch();
     },
     getStoreTypeList() {
-      getStoreTypeListlp({}).then((res) => {
+      getStoreTypeListlp({ entry: this.tabVal == '0' ? 1 : 2 }).then((res) => {
         this.storeTypeLists = res.data;
         this.storeTypeList = res.data;
       });
@@ -1062,6 +1061,7 @@ export default {
     searchFn() {
       this.showPicker = true;
       this.CustomerName = '';
+      this.getStoreTypeList();
     },
     moreSearch() {
       this.onSearch();

+ 5 - 1
src/views/deviceWithin/index.vue

@@ -360,7 +360,11 @@
         @cancel="show = false" />
     </van-popup>
     <!-- 筛选模块 -->
-    <filtrate v-show="showFilter" :showFilter="showFilter" @closePopup="closePopup"></filtrate>
+    <filtrate
+      v-show="showFilter"
+      :showFilter="showFilter"
+      @closePopup="closePopup"
+      :entry="0"></filtrate>
     <tab-bar tabBarActive="deviceWithin"></tab-bar>
   </div>
 </template>