|
|
|
@ -28,9 +28,10 @@ |
|
|
|
</uni-card> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
<u-loadmore :status="status" /> |
|
|
|
</view> |
|
|
|
<u-empty v-else mode="order" margin-top="200"></u-empty> |
|
|
|
|
|
|
|
</view> |
|
|
|
<u-loadmore :status="status" /> |
|
|
|
<!-- <u-empty v-else mode="order" margin-top="200"></u-empty> --> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -52,7 +53,9 @@ |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
type: '', |
|
|
|
page: 1, |
|
|
|
pages: 1, |
|
|
|
pageNum:1, |
|
|
|
status: 'loadmore' |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
@ -61,6 +64,12 @@ |
|
|
|
onLoad(option) { |
|
|
|
this.inStorageStatus = option.inStorageStatus || '' |
|
|
|
this.type = uni.getStorageSync('type') |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if (this.pageNum >= this.pages) return; |
|
|
|
this.status = 'loading'; |
|
|
|
this.pageNum += 1; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getList() { |
|
|
|
@ -68,10 +77,17 @@ |
|
|
|
inStorageStatus: this.inStorageStatus, |
|
|
|
supplierName: this.supplierName, |
|
|
|
startDate: this.startDate, |
|
|
|
endDate: this.endDate |
|
|
|
endDate: this.endDate, |
|
|
|
pageNum:this.pageNum, |
|
|
|
pageSize:10, |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.list = res.result |
|
|
|
if (res.code == 200) { |
|
|
|
this.pages = res.result.pages |
|
|
|
if (this.pages == 1) { |
|
|
|
this.list = res.result.records |
|
|
|
} else { |
|
|
|
this.list = [...this.list, ...res.result.records] |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
|