yangc 7 лет назад
Родитель
Сommit
6ce61c9a4d

+ 1 - 1
components/mobile/base/BaseFilter.vue

@@ -65,7 +65,7 @@
       defaultVal: {
         handler: function (val) {
           this.val = val
-          this.$emit('selectAction', {
+          this.$emit('valueAction', {
             key: this.selectOption,
             value: this.selectOption === 'date' ? this.getDateObj(val) : val
           })

+ 7 - 6
pages/mobile/center/user/payCenter.vue

@@ -125,6 +125,7 @@
           :defaultVal="filterOption.defaultVal"
           :selectOption="filterOption.selectOption"
           @selectAction="onSelectAction"
+          @valueAction="onValueAction"
           :title="filterOption.title"></base-filter>
       </div>
       <ul class="mp-list record-list mp-list-record">
@@ -316,9 +317,6 @@
       EmptyStatus,
       BaseFilter
     },
-    fetch ({store, route}) {
-      return
-    },
     filters: {
       payTypeFilter: function (type) {
         if (type === 'PAIDTOVENDOR') {
@@ -473,7 +471,7 @@
           this.showSelectCurrency = false
         }
       },
-      setSelect (type, val) {
+      setSelect (type, val, isReload) {
 //        if (type === 'method') {
 //          this.filterParams.method = val
 //          this.setShowSelect('method', false)
@@ -495,10 +493,13 @@
         } else {
           this.filterParams[type] = val
         }
-        this.filterRecord()
+        isReload && this.filterRecord()
       },
       onSelectAction (selectObj) {
-        this.setSelect(selectObj.key, selectObj.value)
+        this.setSelect(selectObj.key, selectObj.value, true)
+      },
+      onValueAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value, false)
       },
       setDate (type) {
         if (this.dateObj[type]) {

+ 8 - 3
pages/mobile/center/vendor/outOfStorage/index.vue

@@ -31,6 +31,7 @@
               :defaultVal="filterOption.defaultVal"
               :selectOption="filterOption.selectOption"
               @selectAction="onSelectAction"
+              @valueAction="onValueAction"
               :title="filterOption.title">
             </base-filter>
           </div>
@@ -103,6 +104,7 @@
     created () {
       this.switchType = this.$route.query.type ? this.$route.query.type : 'INBOUND'
       this.handleItem = this.$route.query.handleItem ? Number(this.$route.query.handleItem) : 0
+      this.reloadList()
     },
     watch: {
       'storageData': {
@@ -168,7 +170,7 @@
           }
         }
       },
-      setSelect (type, val) {
+      setSelect (type, val, isReload) {
         if (type === 'date') {
           if (val) {
             this.filterParams.fromDate = val.fromDate
@@ -185,7 +187,7 @@
           this.filterParams[type] = val
           this.filter[type] = val
         }
-        this.filterRecord()
+        isReload && this.filterRecord()
       },
       initFilterParams () {
         this.filterParams = {
@@ -201,7 +203,10 @@
           }
       },
       onSelectAction (selectObj) {
-        this.setSelect(selectObj.key, selectObj.value)
+        this.setSelect(selectObj.key, selectObj.value, true)
+      },
+      onValueAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value, false)
       },
       filterRecord () {
         this.filterParams.page = 1

+ 7 - 3
pages/mobile/center/vendor/payCenter.vue

@@ -99,6 +99,7 @@
           :defaultVal="filterOption.defaultVal"
           :selectOption="filterOption.selectOption"
           @selectAction="onSelectAction"
+          @valueAction="valueAction"
           :title="filterOption.title"></base-filter>
       </div>
       <ul class="mp-list record-list mp-list-record" v-if="recordList.length">
@@ -485,9 +486,12 @@
         this.reloadList()
       },
       onSelectAction (selectObj) {
-        this.setSelect(selectObj.key, selectObj.value)
+        this.setSelect(selectObj.key, selectObj.value, true)
       },
-      setSelect (type, val) {
+      onValueAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value, false)
+      },
+      setSelect (type, val, isReload) {
         if (type === 'date') {
           if (val) {
             this.filterParams.fromDate = val.fromDate
@@ -499,7 +503,7 @@
         } else {
           this.filterParams[type] = val
         }
-        this.filterRecord()
+        isReload && this.filterRecord()
       },
       setDate (type) {
         if (this.dateObj[type]) {