|
|
|
@ -141,7 +141,7 @@ |
|
|
|
<el-table :data="cardBillList" width="100%" :height="window.pageHeight < 600 |
|
|
|
? 210 |
|
|
|
: Math.floor((window.pageHeight - 300) / 2) |
|
|
|
" row-key="id" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"> |
|
|
|
" row-key="id" highlight-current-row ref="cardBillList" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column prop="payModeId" label="支付方式"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
@ -997,15 +997,15 @@ export default { |
|
|
|
btnQuery() { |
|
|
|
let body = this.getQueryBody() |
|
|
|
|
|
|
|
body.maxResultCount = this.loadOptsInit?.maxResultCount || 0 |
|
|
|
body.skipCount = this.loadOptsInit?.skipCount || 0 |
|
|
|
body.maxResultCount = this.loadOpts?.maxResultCount || 1000 |
|
|
|
body.skipCount = 0 |
|
|
|
|
|
|
|
|
|
|
|
this.loadOptsInit = Object.assign({}, this.loadOpts); |
|
|
|
postapi("/api/app/cardregister/getcardregisterlist", body).then((res) => { |
|
|
|
if (res.code > -1) { |
|
|
|
this.dataList = res.data.items; |
|
|
|
this.loadOpts.totalCount = res.data.totalCount |
|
|
|
//this.loadOpts.skipCount = 0 |
|
|
|
if (res?.code > -1) { |
|
|
|
this.dataList = res.data?.items; |
|
|
|
this.loadOpts.totalCount = res.data?.totalCount||0 |
|
|
|
if(res.data?.items?.length > 0) this.loadOpts.skipCount = 1 |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
@ -1021,9 +1021,9 @@ export default { |
|
|
|
if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) { |
|
|
|
// 获取到的不是全部数据 当滚动到底部 |
|
|
|
// console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight); |
|
|
|
if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { |
|
|
|
if (Number(this.loadOpts.skipCount) * (this.loadOpts?.maxResultCount || 1000) >= Number(this.loadOpts.totalCount)) { |
|
|
|
this.lazyLoading = false |
|
|
|
this.$message.warning({showClose:true,message:'没有更多的数据可拉取!'}) |
|
|
|
//this.$message.warning({showClose:true,message:'没有更多的数据可拉取!'}) |
|
|
|
} else { |
|
|
|
this.lazyLoading = true |
|
|
|
this.loadQuery() |
|
|
|
@ -1035,18 +1035,16 @@ export default { |
|
|
|
|
|
|
|
loadQuery() { |
|
|
|
let body = this.getQueryBody() |
|
|
|
if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount || 100) >= Number(this.loadOpts.totalCount)) { |
|
|
|
this.$message.warning({ showClose: true, message: '没有更多的数据可拉取' }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
body.maxResultCount = this.loadOpts?.maxResultCount || 1000 |
|
|
|
body.skipCount = this.loadOpts.skipCount |
|
|
|
body.skipCount = Number(this.loadOpts.skipCount) |
|
|
|
|
|
|
|
postapi("/api/app/cardregister/getcardregisterlist", body).then((res) => { |
|
|
|
if (res?.code > -1) { |
|
|
|
this.dataList = this.dataList.concat(res?.data?.items||[]); |
|
|
|
console.log('this.dataList = this.dataList.concat(res?.data?.items||[]);',this.dataList,res?.data?.items) |
|
|
|
this.dataList = [].concat(this.dataList,res?.data?.items||[]); |
|
|
|
this.loadOpts.totalCount = res.data.totalCount |
|
|
|
this.loadOpts.skipCount++ |
|
|
|
this.loadOpts.skipCount = Number(this.loadOpts.skipCount||0) + 1 |
|
|
|
this.lazyLoading = false |
|
|
|
} |
|
|
|
}); |
|
|
|
|