瀏覽代碼

fix: 经销提货汇总

zh 2 年之前
父節點
當前提交
ed2fa2e83f
共有 1 個文件被更改,包括 17 次插入28 次删除
  1. 17 28
      src/views/supply/pickup/sum_list.vue

+ 17 - 28
src/views/supply/pickup/sum_list.vue

@@ -94,44 +94,33 @@ export default {
       orderId: '',
       logisticsDetail: [],
       flag: false,
-      searchData: [
+      searchData: this.$route.query.id?[
         {
           param: 'pms.invoice_id',
           compare: '=',
-          value: this.$route.query.id
+          value: this.$route.query.id || ''
         }
-      ]
+      ]:[]
     }
   },
   watch: {
-    '$route.query.id'(val, oval) {
-      if (val) {
-        this.screenForm.orderNum = val
-        this.searchData = [
-          {
-            param: 'pms.invoice_id',
-            compare: '=',
-            value: val
-          }
-        ]
-        this.$refs.pageRef.refreshList()
-      }
-    }
-  },
-  activated() {
-    if (this.$route.query && this.$route.query.id) {
-      this.searchData = [
-        {
-          param: 'pms.invoice_id',
-          compare: '=',
-          value: this.$route.query.id
+    $route(val, oval) {
+      if (val && this.$route.path === '/supply/pickup/sum_list') {
+        if (this.$route.query.id) {
+          this.screenForm.orderNum = val.query.id
+          this.searchData = [
+            {
+              param: 'pms.invoice_id',
+              compare: '=',
+              value: val.query.id
+            }
+          ]
+          // this.$refs.pageRef.refreshList()
         }
-      ]
-      this.$refs.pageRef.refreshList()
-    } else {
-      this.screenForm.orderNum = ''
+      }
     }
   },
+
   methods: {
     // 列表请求函数
     getList(...p) {