Browse Source

物料申请分页

jbb 2 years ago
parent
commit
346d6ff9d8
1 changed files with 13 additions and 2 deletions
  1. 13 2
      src/views/system/MaterialRegistration.vue

+ 13 - 2
src/views/system/MaterialRegistration.vue

@@ -70,7 +70,7 @@
         rowKey="id"
         :columns="columns"
         :dataSource="dataSource"
-        :pagination="ipagination"
+        :pagination="pagination"
         :scroll="{x: 1500 , y: 500 }"
         :loading="loading"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@@ -209,7 +209,8 @@ import moment from 'moment'
             scopedSlots: { customRender: 'operation' },
             width: 120
           },
-        ]
+        ],
+        pagination:{  }
       }
     },
     computed: {
@@ -236,6 +237,11 @@ import moment from 'moment'
                     // console.log('>>>>', this.queryParam)
                     if (res.success) {
                        this.dataSource =res.result.records
+                       this.pagination = {
+                          total: res.result.total,
+                           current: res.result.current,
+                           pageSize: res.result.size
+                        }
                     }else{
                        this.$message.error(res.message);
                     }
@@ -336,6 +342,11 @@ import moment from 'moment'
            this.selectedRowKeys = keys;
             this.selectedRows = rows;
          },
+         // 分页变化时触发
+         handleTableChange(pagination, filters, sorter) {
+           this.queryParam.pageNo = pagination.current
+             this.getData()
+          },
        handleCl(){
          this.getData()
        }