自助入司分页问题修改

This commit is contained in:
mengxiaolong
2020-07-28 09:29:51 +08:00
parent 9e4a7f518b
commit 7e3b9b5b5a

View File

@@ -1,7 +1,7 @@
<template>
<div class="sale-list-container pb50">
<van-sticky>
<van-tabs v-model="appntNode" v-if="branchType === '1'">
<van-tabs v-model="appntNode" v-if="branchType === '1'" @change="change">
<van-tab title="营业区经理" name="1"> </van-tab>
<van-tab title="三级机构负责人" name="3"> </van-tab>
<van-tab title="人员管理岗" name="5"> </van-tab>
@@ -89,16 +89,31 @@ export default {
} else {
return this.$toast(res.resultMessage)
}
this.loadMore()
this.getOrderList({
pageNum: this.currentPage
})
},
methods: {
change(tab) {
this.currentPage = 1
this.approveList = []
this.finished = false
this.loading = true
this.finishedText = ''
this.getOrderList(
{
pageNum: this.currentPage
},
tab
)
},
loadMore() {
let pageInfo = {
pageNum: this.currentPage
// pageSize: this.pageSize
}
console.log('pageInfo==', pageInfo)
this.getOrderList(pageInfo)
this.getOrderList(pageInfo, this.appntNode)
},
//初始化审批列表
getOrderList(pageInfo, appntNode = '1') {
@@ -110,6 +125,7 @@ export default {
agentAddApproval(data).then(res => {
this.$toast.clear()
if (res.result == '0') {
this.currentPage++
let resData = res.content.approveWaitPageInfo
if (resData.list.length > 0) {
this.isSuccess = true
@@ -145,13 +161,17 @@ export default {
},
watch: {
//审批级别变化时触发
appntNode(val) {
let pageInfo = {
pageNum: this.currentPage
}
this.approveList = []
this.getOrderList(pageInfo, val)
}
// appntNode(val) {
// this.currentPage = 1
// this.finished = false
// this.loading = false
// let pageInfo = {
// pageNum: this.currentPage
// }
// this.approveList = []
// // this.getOrderList(pageInfo, val)
// this.loadMore()
// }
}
}
</script>