|
|
@ -37,7 +37,10 @@ |
|
|
return { |
|
|
return { |
|
|
supplierId: '', |
|
|
supplierId: '', |
|
|
consigneeName: '', |
|
|
consigneeName: '', |
|
|
list: [], |
|
|
list: [], |
|
|
|
|
|
status: 'loadmore', |
|
|
|
|
|
pages:1, |
|
|
|
|
|
pageNumber:1, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onShow(){ |
|
|
onShow(){ |
|
|
@ -46,14 +49,31 @@ |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
this.supplierId = options.supplierId |
|
|
this.supplierId = options.supplierId |
|
|
this.consigneeName = options.consigneeName |
|
|
this.consigneeName = options.consigneeName |
|
|
|
|
|
}, |
|
|
|
|
|
onReachBottom() { |
|
|
|
|
|
if (this.pages >= this.pageNum) return; |
|
|
|
|
|
this.status = 'loading'; |
|
|
|
|
|
this.pages = ++this.pages; |
|
|
|
|
|
this.getList(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getList() { |
|
|
getList() { |
|
|
this.tui.request("/app/purchase/debtPurchase", "get", { |
|
|
this.tui.request("/app/purchase/debtPurchase", "get", { |
|
|
supplierId: this.supplierId |
|
|
supplierId: this.supplierId, |
|
|
}, false, true).then((res) => { |
|
|
pageVo: { |
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
pageNumber: this.pageNumber |
|
|
|
|
|
} |
|
|
|
|
|
}, false, true).then((res) => { |
|
|
|
|
|
this.status = 'nomore'; |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
this.list = res.result |
|
|
// this.list = res.result |
|
|
|
|
|
if (this.pages == 1) { |
|
|
|
|
|
this.list = res.result |
|
|
|
|
|
} else { |
|
|
|
|
|
this.list = [...this.list, ...res.result] |
|
|
|
|
|
} |
|
|
|
|
|
this.pageNumber = res.result.pages |
|
|
} else { |
|
|
} else { |
|
|
this.tui.toast(res.message) |
|
|
this.tui.toast(res.message) |
|
|
} |
|
|
} |
|
|
|