Sfoglia il codice sorgente

参照订单数据 分页器

liangy 3 anni fa
parent
commit
fccc7dc492
1 ha cambiato i file con 14 aggiunte e 8 eliminazioni
  1. 14 8
      src/views/shipment-details/referOrderDataModal.vue

+ 14 - 8
src/views/shipment-details/referOrderDataModal.vue

@@ -54,7 +54,7 @@
         :columns="referOerderColumns"
         :data-source="orderListData"
         :loading="loading"
-        :pagination="ipagination"
+        :pagination="pagination"
         :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
         @change="handleTableChange"
         :scroll="{ x: 1500 }"
@@ -354,9 +354,9 @@ export default {
       },
       // 分页
       pagination: {
-        total: 0,
-        current: 0,
-        pageSize: 0
+        // total: 0,
+        // current: 0,
+        // pageSize: 0
       }
     }
   },
@@ -385,6 +385,16 @@ export default {
         })
       })
     },
+    // 分页变化时触发
+    handleTableChange(pagination, filters, sorter) {
+      console.log('分页器信息', pagination)
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+      }
+      this.queryParam.pageNo = pagination.current
+      this.getOrderList()
+    },
 
     // 弹框查询按钮
     searchQuery() {
@@ -427,10 +437,6 @@ export default {
     },
     handleCancel() {
       this.close()
-    },
-    handleTableChange() {
-      console.log('??这是啥')
-      this.$message.error('已取消选择')
     }
   },
   computed: {